{"version":3,"sources":["jsdelivr-header.js","/npm/is-domain-name@1.0.1/index.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,ACNA,aA6BA,IAAI,gBAAkB,mGAQtB,OAAO,QAAU,SAAuB,EAAY,GAGlD,GAFe,MAAX,IAAiB,GAAU,GAE3B,EAAW,OAAS,EAAG,OAAO,EAClC,GAAI,EAAW,OAAS,IAAK,OAAO,EAEpC,IAAI,EAAW,EAAW,EAAW,OAAS,GAC9C,GAAI,GACF,GAAiB,MAAb,EAAkB,OAAO,OAE7B,GAAiB,MAAb,EAAkB,OAAO,EAG/B,OAAO,gBAAgB,KAAK,EAC9B","file":"/npm/is-domain-name@1.0.1/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.37.0.\n * Original file: /npm/is-domain-name@1.0.1/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","'use strict'\n\n// Adapted from RFC 2181 (See section 11)\n//\n// The RFC defines a Domain Name to be at most 255 chars including seperators\n// between labels.\n// Subdomains are labels plus a seperator. A label is a string starting and\n// ending with an alphanum, with dashes allowed in the middle. It is between 1 and 63 chars.\n//\n// We make some assumptions below that go beyond the RFC. We assume the TLD\n// to be at least 2 chars. The regex also allows domains longer than 255 chars,\n// but allows at most 127 subdomains, as assuming a lower-bound of one char per\n// subdomain will yield 252, and adding a TLD of 2 chars sums to 254.\n/*\n(?:                   // Group 1: This is for subdomain, which is composed of a label and a seperator (length = [1, 63] + 1)\n  [a-z0-9]\n  (?:\n    [a-z0-9\\-]{0,61} // Limited to 61 chars as we have at least two chars if we reach this group (61 + 2 = 63 which is the limit)\n    [a-z0-9]\n  )?\n  \\.                  // Label seperator\n){0,126}             // If we assume the lower-bound of 1 char labels, we can at most have 126 groups before approaching the total limit of 255 chars\n(?:                   // Group 2: Assume that the TLD is at least 2 chars (for sanity)\n  [a-z0-9]\n  [a-z0-9\\-]{0,61}\n  [a-z0-9]\n)\n\\.?                   // Some consider a trailing dot to be considered valid as it signifies the root of the domain tree\n */\nvar domainNameRegex = /^(?:[a-z0-9](?:[a-z0-9\\-]{0,61}[a-z0-9])?\\.){0,126}(?:[a-z0-9](?:[a-z0-9\\-]{0,61}[a-z0-9]))\\.?$/i\n\n/**\n * Test whether a string is a valid domain name, optionally checking for a root dot as well\n * @param  {String}  domainName\n * @param  {Boolean} rootDot    Check for a root dot eg. 'example.com.'. Defaults to false\n * @return {Boolean}\n */\nmodule.exports = function isDomainName (domainName, rootDot) {\n  if (rootDot == null) rootDot = false\n\n  if (domainName.length < 2) return false\n  if (domainName.length > 255) return false\n\n  var lastChar = domainName[domainName.length - 1]\n  if (rootDot) {\n    if (lastChar !== '.') return false\n  } else {\n    if (lastChar === '.') return false\n  }\n\n  return domainNameRegex.test(domainName)\n}\n"]}