UNPKG

regex-repo

Version:

A collection of useful regular expressions.

1 lines 78.3 kB
{"version":3,"file":"regex-repo.mjs","sources":["../src/lib/lockdown-re.js","../src/network.mjs","../src/aws.js","../src/lib/uni-non-ascii.mjs","../src/domain-name.mjs","../src/contacts.js","../src/lib/css-color-data.js","../src/lib/numbers-strings.js","../src/css.js","../src/date-times.mjs","../src/ids.js","../src/javascript.js","../src/semver.mjs","../src/npm.js","../src/numbers.js","../src/url.mjs"],"sourcesContent":["/*\nCopyright 2023 Liquid Labs LLC\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n*/\n\nexport const lockdownRe = (str, flags) => new RegExp(`^${str}$`, flags)\n","/*\nCopyright 2023 Liquid Labs LLC\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n*/\nimport { lockdownRe } from './lib/lockdown-re'\n\n// IP address dotted notation octets\n// excludes loopback network 0.0.0.0\n// excludes reserved space >= 224.0.0.0\n// excludes network & broacast addresses\n// (first & last IP address of each class)\nexport const ipHostReString = '(?:[1-9]\\\\d?|1\\\\d\\\\d|2[01]\\\\d|22[0-3])'\n + '(?:\\\\.(?:1?\\\\d{1,2}|2[0-4]\\\\d|25[0-5])){2}'\n + '(?:\\\\.(?:[1-9]\\\\d?|1\\\\d\\\\d|2[0-4]\\\\d|25[0-4]))'\n\n/**\n * Matches a valid, non-localhost IP address.\n * @category Network\n */\nexport const ipHostRe = lockdownRe(ipHostReString)\n\n// used internally\nexport const ipTupleReString = '(?:0|1?\\\\d{1,2}|2[0-4]\\\\d|25[0-5])'\n\nexport const ipAddressReString = `(?:${ipTupleReString}\\\\.){3}${ipTupleReString}`\n\n/**\n * Matches a string in IP address format. Use 'ipHostRe' to match actually valid IP addresses.\n * @category Network\n */\nexport const ipAddressRe = lockdownRe(ipAddressReString)\n\n// credit to: https://stackoverflow.com/a/17871737/929494\nexport const ipV6ReString =\n '(?:(?:[0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|' // 1:2:3:4:5:6:7:8\n + '(?:[0-9a-fA-F]{1,4}:){1,7}:|' // 1:: 1:2:3:4:5:6:7::\n + '(?:[0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|' // 1::8 1:2:3:4:5:6::8 1:2:3:4:5:6::8\n + '(?:[0-9a-fA-F]{1,4}:){1,5}(?::[0-9a-fA-F]{1,4}){1,2}|' // 1::7:8 1:2:3:4:5::7:8 1:2:3:4:5::8\n + '(?:[0-9a-fA-F]{1,4}:){1,4}(?::[0-9a-fA-F]{1,4}){1,3}|' // 1::6:7:8 1:2:3:4::6:7:8 1:2:3:4::8\n + '(?:[0-9a-fA-F]{1,4}:){1,3}(?::[0-9a-fA-F]{1,4}){1,4}|' // 1::5:6:7:8 1:2:3::5:6:7:8 1:2:3::8\n + '(?:[0-9a-fA-F]{1,4}:){1,2}(?::[0-9a-fA-F]{1,4}){1,5}|' // 1::4:5:6:7:8 1:2::4:5:6:7:8 1:2::8\n + '[0-9a-fA-F]{1,4}:(?:(?::[0-9a-fA-F]{1,4}){1,6})|' // 1::3:4:5:6:7:8 1::3:4:5:6:7:8 1::8\n + ':(?:(?::[0-9a-fA-F]{1,4}){1,7}|:)|' // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::\n // (link-local IPv6 addresses with zone index)\n + 'fe80:(?::[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|' // fe80::7:8%eth0 fe80::7:8%1\n + '::(?:ffff(?::0{1,4}){0,1}:){0,1}'\n + '(?:(?:25[0-5]|(?:2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\\\.){3,3}'\n // (IPv4-mapped IPv6 addresses and IPv4-translated addresses)\n + '(?:25[0-5]|(?:2[0-4]|1{0,1}[0-9]){0,1}[0-9])|' // ::255.255.255.255 ::ffff:255.255.255.255 ::ffff:0:255.255.255.255\n + '(?:[0-9a-fA-F]{1,4}:){1,4}:'\n + '(?:(?:25[0-5]|(?:2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\\\.){3,3}'\n // 2001:db8:3:4::192.0.2.33 64:ff9b::192.0.2.33 (IPv4-Embedded IPv6 Address)\n + '(?:25[0-5]|(?:2[0-4]|1{0,1}[0-9]){0,1}[0-9]))'\n\n/**\n * Matches a string in IPV6 format.\n * @category Network\n */\nexport const ipV6Re = lockdownRe(ipV6ReString)\n\nexport const ipVFutureReString = '(?:v[0-9a-fA-F]+\\\\.[a-zA-Z0-9~_.!$&\\'()*+,;=:-]+)'\n\n/**\n * Matches potential future IP protocols.\n * @category Network\n */\nexport const ipVFutureRe = lockdownRe(ipVFutureReString)\n","/*\nCopyright 2023 Liquid Labs LLC\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n*/\nimport { lockdownRe } from './lib/lockdown-re'\nimport { ipAddressReString } from './network'\n\n/**\n * An RE ready string that matches (most) valid S3 Transfer Acceleration compatible bucket names. When using this\n * partial, you should verify the results do not match `invalidS3TaBucketNameReString`. Because of the way the RE\n * is constructed, this is one case where the partial string is not the same as that used to construct the\n * `awsS3TaBucketNameRe` RE.\n * @category AWS\n */\nexport const awsS3TaBucketNameReString = '[a-z0-9][a-z0-9-]{1,61}[a-z0-9]'\n\n/**\n * An RE ready string that matches excluded S3 Transfer Acceleration compatible bucket names that would be matched\n * by `awsS3TaBucketNameReString`. Because of the way the RE is constructed, this is one case where the partial string\n * is not the same as that used to construct the `invalidS3TaBucketNameRe` RE.\n * @category AWS\n */\nexport const invalidS3TaBucketNameReString = `(?:^|\\\\s)${ipAddressReString}|(?:^|\\\\s)xn--|(?:^|\\\\s)sthree-|`\n + '.+-s3alias(?:\\\\s|$)|.+--ol-s3(?:\\\\s|$)'\n\nconst invalidS3PartialsReStringInternal = `(?!^${ipAddressReString}|^xn--|^sthree-|.+-s3alias$|.+--ol-s3$)`\n\nconst awsS3TaBucketNameReStringInternal = invalidS3PartialsReStringInternal + `^${awsS3TaBucketNameReString}$`\n\n/**\n * Matches (most) S3 Transfer Acceleration compatible S3 bucket name. Note `awsS3TaBucketNameReString` cannot be used\n * for partial matches.\n * @category AWS\n */\nexport const awsS3TaBucketNameRe = new RegExp(awsS3TaBucketNameReStringInternal)\n\n/**\n * An RE ready string that matches (most) valid S3 bucket names. When using this partial, you should verify the results\n * do not match `invalidS3PartialsReString`. Because of the way the RE is constructed, this is one case where the\n * partial string is not the same as that used to construct the `awsS3BucketNameRe` RE.\n * @category AWS\n */\nexport const awsS3BucketNameReString = '[a-z0-9](?:\\\\.?[a-z0-9-]+)+[a-z0-9]'\n\nexport const awsS3BucketNameReStringInternal = invalidS3PartialsReStringInternal + `^${awsS3BucketNameReString}$`\n\n/**\n * Matches (most) valid S3 bucket name. Note `awsS3BucketNameReString` cannot be used for partial matches. Does not\n * enforce 63 character limit. Due to checking for invalid S3 bucket names, `awsS3BucketNameReString` embeds '^' and\n * '$' and so cannot be used for partial matches.\n * @category AWS\n */\nexport const awsS3BucketNameRe = lockdownRe(awsS3BucketNameReStringInternal)\n","export const uniNonASCII = '\\\\u0080-\\\\u{e007f}'\n","/*\nCopyright 2023 Liquid Labs LLC\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n*/\nimport { lockdownRe } from './lib/lockdown-re'\nimport { ipTupleReString } from './network'\nimport { uniNonASCII } from './lib/uni-non-ascii'\n\nexport const localhostReString = `(?:localhost|127(?:\\\\.${ipTupleReString}){3}|::1|0:0:0:0:0:0:0:1)`\n\n/**\n * Matches any representation of localhost; the special name, IPV4 loopbacks, or IPV6 loopbacks.\n * @category Domain names\n */\nexport const localhostRe = lockdownRe(localhostReString)\n\n// note the 'v' flag breaks on Ubuntu\nexport const tldNameReString = `(?:[${uniNonASCII}]|[a-zA-Z${uniNonASCII}][a-zA-Z0-9${uniNonASCII}]{1,62})`\n\n/**\n * Matches a Top Level Domain (TLD). See [domain name rules](#domain-name-rules). When using the partial string to\n * create a Re, you must use the 'u' or 'v' flag.\n * @category Domain names\n */\nexport const tldNameRe = lockdownRe(tldNameReString, 'u')\n\nexport const domainLabelReString = `(?:[a-zA-Z${uniNonASCII}]|[a-zA-Z0-9${uniNonASCII}]{2}|`\n // otherwise, verify the 3rd and 4th positions are not '-'\n + `[a-zA-Z0-9${uniNonASCII}][a-zA-Z0-9${uniNonASCII}\\\\-](?!--)[a-zA-Z0-9${uniNonASCII}\\\\-]{0,60}[a-zA-Z0-9${uniNonASCII}])`\n\n/**\n * Matches a non-tld domain label. Enforces the 63 byte domain label limit for non-international (all ASCII) labels.\n * See [domain name rules](#domain-name-rules). When using the partial string to create a Re, you must use the 'u' or\n * 'v' flag.\n * @category Domain names\n */\nexport const domainLabelRe = lockdownRe(domainLabelReString, 'u')\n\n// export const fqDomainNameReString = `(?![0-9\\\\p{L}.\\\\-]{256,})(?:${domainLabelReString}\\\\.)+${tldNameReString}`\nexport const fqDomainNameReString = `(?!.{256,})(?:${domainLabelReString}\\\\.)+${tldNameReString}`\n\n/**\n * Matches fully qualified domain name (one or more subdomains + TLD). Partially enforces the 255 byte FQ domain name\n * limit, but this is only valid for non-international (all ASCII) domain names because we can only count characters.\n * When using the partial string to create a Re, you must use the 'u' or 'v' flag.\n * @category Domain names\n */\nexport const fqDomainNameRe = lockdownRe(fqDomainNameReString, 'u')\n","/*\nCopyright 2023 Liquid Labs LLC\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n*/\nimport { fqDomainNameReString } from './domain-name'\nimport { lockdownRe } from './lib/lockdown-re'\nimport { uniNonASCII } from './lib/uni-non-ascii'\n\nexport const usPhoneReString = '(\\\\+?1[._ -]?)?(\\\\(\\\\d{3}\\\\)|\\\\d{3})[._ -]?\\\\d{3}[._ -]?\\\\d{4}'\n\n/**\n * Matches US phone numbers with optional country code and area code.\n * @category Contacts\n */\nexport const usPhoneRe = lockdownRe(usPhoneReString)\n\nexport const zipCodeReString = '\\\\d{5}([._ -]?\\\\d{4})?'\n\n/**\n * Matches 5 or 9 digit US zip codes.\n * @category Contacts\n */\nexport const zipCodeRe = lockdownRe(zipCodeReString)\n\nexport const emailReString = `([a-zA-Z0-9${uniNonASCII}!#$%&'*+\\\\/=?^_\\`\\\\{\\\\|\\\\}~\\\\-]+(?:\\\\.[a-zA-Z0-9${uniNonASCII}!#$%&'*+\\\\/=?^_\\`\\\\{\\\\|\\\\}~\\\\-]+)*|\"(?:[\\\\x20-\\\\x21\\\\x23-\\\\x5b\\\\x5d-\\\\x7e${uniNonASCII}]|\\\\\\\\[\\\\x20-\\\\x7e${uniNonASCII}])*\")@(${fqDomainNameReString})`\n\n/**\n * Match most valid emails. Provides matching groups 1 (user name) and 2 (domain). When using the partial string to\n * create a Re, you must use the 'u' flag.\n * @category Contacts\n */\nexport const emailRe = lockdownRe(emailReString, 'u')\n","/*\nCopyright 2023 Liquid Labs LLC\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n*/\n\nexport const cssPreColors1 = {\n black : '#000000',\n silver : '#c0c0c0',\n gray : '#808080',\n white : '#ffffff',\n maroon : '#800000',\n red : '#ff0000',\n purple : '#800080',\n fuchsia : '#ff00ff',\n green : '#008000',\n lime : '#00ff00',\n olive : '#808000',\n yellow : '#ffff00',\n navy : '#000080',\n blue : '#0000ff',\n teal : '#008080',\n aqua : '#00ffff',\n}\n\nexport const cssPreColors2 = Object.assign({\n orange : '#ffa500',\n}, cssPreColors1)\n\nexport const cssPreColors3 = Object.assign({\n aliceblue : '#f0f8ff',\n antiquewhite : '#faebd7',\n aquamarine : '#7fffd4',\n azure : '#f0ffff',\n beige : '#f5f5dc',\n bisque : '#ffe4c4',\n blanchedalmond : '#ffebcd',\n blueviolet : '#8a2be2',\n brown : '#a52a2a',\n burlywood : '#deb887',\n cadetblue : '#5f9ea0',\n chartreuse : '#7fff00',\n chocolate : '#d2691e',\n coral : '#ff7f50',\n cornflowerblue : '#6495ed',\n cornsilk : '#fff8dc',\n crimson : '#dc143c',\n cyan : 'aqua',\n darkblue : '#00008b',\n darkcyan : '#008b8b',\n darkgoldenrod : '#b8860b',\n darkgray : '#a9a9a9',\n darkgreen : '#006400',\n darkgrey : '#a9a9a9',\n darkkhaki : '#bdb76b',\n darkmagenta : '#8b008b',\n darkolivegreen : '#556b2f',\n darkorange : '#ff8c00',\n darkorchid : '#9932cc',\n darkred : '#8b0000',\n darksalmon : '#e9967a',\n darkseagreen : '#8fbc8f',\n darkslateblue : '#483d8b',\n darkslategray : '#2f4f4f',\n darkslategrey : '#2f4f4f',\n darkturquoise : '#00ced1',\n darkviolet : '#9400d3',\n deeppink : '#ff1493',\n deepskyblue : '#00bfff',\n dimgray : '#696969',\n dimgrey : '#696969',\n dodgerblue : '#1e90ff',\n firebrick : '#b22222',\n floralwhite : '#fffaf0',\n forestgreen : '#228b22',\n gainsboro : '#dcdcdc',\n ghostwhite : '#f8f8ff',\n gold : '#ffd700',\n goldenrod : '#daa520',\n greenyellow : '#adff2f',\n grey : '#808080',\n honeydew : '#f0fff0',\n hotpink : '#ff69b4',\n indianred : '#cd5c5c',\n indigo : '#4b0082',\n ivory : '#fffff0',\n khaki : '#f0e68c',\n lavender : '#e6e6fa',\n lavenderblush : '#fff0f5',\n lawngreen : '#7cfc00',\n lemonchiffon : '#fffacd',\n lightblue : '#add8e6',\n lightcoral : '#f08080',\n lightcyan : '#e0ffff',\n lightgoldenrodyellow : '#fafad2',\n lightgray : '#d3d3d3',\n lightgreen : '#90ee90',\n lightgrey : '#d3d3d3',\n lightpink : '#ffb6c1',\n lightsalmon : '#ffa07a',\n lightseagreen : '#20b2aa',\n lightskyblue : '#87cefa',\n lightslategray : '#778899',\n lightslategrey : '#778899',\n lightsteelblue : '#b0c4de',\n lightyellow : '#ffffe0',\n limegreen : '#32cd32',\n linen : '#faf0e6',\n magenta : 'fuchsia',\n mediumaquamarine : '#66cdaa',\n mediumblue : '#0000cd',\n mediumorchid : '#ba55d3',\n mediumpurple : '#9370db',\n mediumseagreen : '#3cb371',\n mediumslateblue : '#7b68ee',\n mediumspringgreen : '#00fa9a',\n mediumturquoise : '#48d1cc',\n mediumvioletred : '#c71585',\n midnightblue : '#191970',\n mintcream : '#f5fffa',\n mistyrose : '#ffe4e1',\n moccasin : '#ffe4b5',\n navajowhite : '#ffdead',\n oldlace : '#fdf5e6',\n olivedrab : '#6b8e23',\n orangered : '#ff4500',\n orchid : '#da70d6',\n palegoldenrod : '#eee8aa',\n palegreen : '#98fb98',\n paleturquoise : '#afeeee',\n palevioletred : '#db7093',\n papayawhip : '#ffefd5',\n peachpuff : '#ffdab9',\n peru : '#cd853f',\n pink : '#ffc0cb',\n plum : '#dda0dd',\n powderblue : '#b0e0e6',\n rosybrown : '#bc8f8f',\n royalblue : '#4169e1',\n saddlebrown : '#8b4513',\n salmon : '#fa8072',\n sandybrown : '#f4a460',\n seagreen : '#2e8b57',\n seashell : '#fff5ee',\n sienna : '#a0522d',\n skyblue : '#87ceeb',\n slateblue : '#6a5acd',\n slategray : '#708090',\n slategrey : '#708090',\n snow : '#fffafa',\n springgreen : '#00ff7f',\n steelblue : '#4682b4',\n tan : '#d2b48c',\n thistle : '#d8bfd8',\n tomato : '#ff6347',\n turquoise : '#40e0d0',\n violet : '#ee82ee',\n wheat : '#f5deb3',\n whitesmoke : '#f5f5f5',\n yellowgreen : '#9acd32',\n}, cssPreColors2)\n\nexport const cssPreColors = Object.assign({\n rebeccapurple : '#663399',\n}, cssPreColors3)\n","/*\nCopyright 2023 Liquid Labs LLC\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n*/\n\n// Note, this module is used internally, so these aStr exported to for other\n// modules to use, but the file is not Str-exported through index.\nexport const plainFloatStr = '[+-]?(0(\\\\.[0-9]+)?|[1-9][0-9]*(\\\\.[0-9]+)?)'\n\nexport const scientificFloatStr = `${plainFloatStr}[eE]${plainFloatStr}`\n\nexport const floatStr = `${plainFloatStr}([eE]${plainFloatStr})?`\n\nexport const zeroTo1FloatStr = '(0|0?\\\\.[0-9]+|1(\\\\.0+)?)'\n\nexport const zeroTo100PercentStr = '([0-9]|[1-9][0-9]|100)\\\\%'\n\nexport const zeroTo100FloatPercentStr =\n '(([0-9]|[1-9][0-9])(\\\\.[0-9]+)?|100(\\\\.0+)?)\\\\%'\n\nexport const zeroTo255Str = '([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'\n\nexport const zeroTo255FloatStr =\n '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-4])(\\\\.[0-9]+)?|255(\\\\.0+)?)'\n\nexport const zeroTo360Str = '([0-9]|[1-9][0-9]|[1-2][0-9][0-9]|3[0-5][0-9]|360)'\n\nexport const zeroTo360FloatStr =\n '(([0-9]|[1-9][0-9]|[1-2][0-9][0-9]|3[0-5][0-9])(\\\\.[0-9]+)?|360(\\\\.0+)?)'\n","/*\nCopyright 2023 Liquid Labs LLC\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n*/\nimport * as pre from './lib/css-color-data'\nimport { lockdownRe } from './lib/lockdown-re'\nimport {\n floatStr,\n zeroTo255Str,\n zeroTo1FloatStr,\n zeroTo100PercentStr,\n zeroTo100FloatPercentStr,\n zeroTo255FloatStr,\n zeroTo360Str\n} from './lib/numbers-strings'\n\nexport const hexColorNoAlphaReString = '#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})'\n\n/**\n * Matches hex specified RGB colors with no alpha channel.\n * @category CSS\n */\nexport const hexColorNoAlphaRe = lockdownRe(hexColorNoAlphaReString)\n\n// level 4 adds alpha hex support\nexport const hexColorAlphaReString = '#([a-fA-F0-9]{6}|[a-fA-F0-9]{8}|[a-fA-F0-9]{3,4})'\n\n/**\n * Matches hex specified RGBA colors with an alpha channel.\n * @category CSS\n */\nexport const hexColorAlphaRe = lockdownRe(hexColorAlphaReString)\n\nexport const cssPreColors1ReString = '(?:' + Object.keys(pre.cssPreColors1).join('|') + ')'\n\n/**\n * Matches CSS1 predefined color names.\n * @category CSS\n */\nexport const cssPreColors1Re = lockdownRe(cssPreColors1ReString)\n\nexport const cssPreColors2ReString = '(?:' + Object.keys(pre.cssPreColors2).join('|') + ')'\n\n/**\n * Matches CSS2 predefined color names.\n * @category CSS\n */\nexport const cssPreColors2Re = lockdownRe(cssPreColors2ReString)\n\nexport const cssPreColors3ReString = '(?:' + Object.keys(pre.cssPreColors3).join('|') + ')'\n\n/**\n * Matches CSS3 predefined color names.\n * @category CSS\n */\nexport const cssPreColors3Re = lockdownRe(cssPreColors3ReString)\n\nexport const cssPreColorsReString = '(?:' + Object.keys(pre.cssPreColors).join('|') + ')'\n\n/**\n * Matches CSS4 predefined color names.\n * @category CSS\n */\nexport const cssPreColorsRe = lockdownRe(cssPreColorsReString)\n\nconst alphaStr = `(${zeroTo1FloatStr}|${zeroTo100PercentStr})`\nconst rgb1IntStr = `rgb\\\\((\\\\s*${zeroTo255Str}\\\\s*,){2}\\\\s*${zeroTo255Str}\\\\s*\\\\)`\nconst rgb1PercStr = `rgb\\\\((\\\\s*${zeroTo100PercentStr}\\\\s*,){2}\\\\s*${zeroTo100PercentStr}\\\\s*\\\\)`\nconst rgba3IntStr = `rgba\\\\((\\\\s*${zeroTo255Str}\\\\s*,){3}\\\\s*${alphaStr}\\\\s*\\\\)`\nconst rgba3PercStr = `rgba\\\\((\\\\s*${zeroTo100PercentStr}\\\\s*,){3}\\\\s*${alphaStr}\\\\s*\\\\)`\n\nexport const rgbFuncReString = '(?:' + [rgb1IntStr, rgb1PercStr].join('|') + ')'\n\n/**\n * Matches CSS1 'rgb(...) using '0...255 and percent (integer) notation.\n * @category CSS\n */\nexport const rgbFuncRe = lockdownRe(rgbFuncReString)\n\nexport const rgbaFuncReString = '(?:' + [rgba3IntStr, rgba3PercStr].join('|') + ')'\n\n/**\n * Matches CSS3 'rgba(...) using '0...255 and percent (integer) notation.\n * @category CSS\n */\nexport const rgbaFuncRe = lockdownRe(rgbaFuncReString)\n\n// In level 4, rgba is an alias for rgb, supports floats, and space notation\n// NOTE: The spec allows float values like '+.25e2%', which cannot be recognized\n// via Re and are not supported.\nconst alphaFloatStr = `(${zeroTo1FloatStr}|${zeroTo100FloatPercentStr})`\nconst rgbDecFuncStr = `(\\\\s*${zeroTo255FloatStr}\\\\s*,){2}\\\\s*${zeroTo255FloatStr}\\\\s*(,\\\\s*${alphaFloatStr}\\\\s*)?`\nconst rgbPercFuncStr = `(\\\\s*${zeroTo100FloatPercentStr}\\\\s*,){2}\\\\s*${zeroTo100FloatPercentStr}\\\\s*(,\\\\s*${alphaFloatStr}\\\\s*)?`\nconst rgbDecSpaceStr = `(\\\\s*${zeroTo255FloatStr}\\\\s+){2}${zeroTo255FloatStr}\\\\s*(/\\\\s*${alphaFloatStr}\\\\s*)?`\nconst rgbPercSpaceStr = `(\\\\s*${zeroTo100FloatPercentStr}\\\\s+){2}${zeroTo100FloatPercentStr}\\\\s*(/\\\\s*${alphaFloatStr}\\\\s*)?`\n\nexport const rgbReString = `rgba?\\\\((${rgbDecFuncStr}|${rgbPercFuncStr}|${rgbDecSpaceStr}|${rgbPercSpaceStr})\\\\s*\\\\)`\n\n/**\n * Matches CSS4 'rgb(...) and rgba(...) functios using '0...255 and percent (float) notation.\n * @category CSS\n */\nexport const rgbRe = lockdownRe(rgbReString)\n\nconst hsl3BaseStr = `\\\\s*${zeroTo360Str}(deg)?\\\\s*(,\\\\s*${zeroTo100PercentStr}\\\\s*)`\nconst hsl3Opts = [`hsl\\\\(${hsl3BaseStr}{2}\\\\)`, `hsla\\\\(${hsl3BaseStr}{3}\\\\)`]\n\nexport const hsl3ReString = '(?:' + hsl3Opts.join('|') + ')'\n\n/**\n * Matches CSS3 'hsl(...) and hsla(...) deg and percent notation.\n * @category CSS\n */\nexport const hsl3Re = lockdownRe(hsl3ReString)\n\nexport const hslReString =\n `hsla?\\\\(\\\\s*${floatStr}(deg|grad|rad|turn)?\\\\s*(,\\\\s*${zeroTo100FloatPercentStr}\\\\s*){2,3}\\\\)`\n\n/**\n * Matches CSS4 'hsl(...) and hsla(...) deg, grad, rad, turn and percent notation.\n * @category CSS\n */\nexport const hslRe = lockdownRe(hslReString)\n\nexport const cssColor3ReString = '(?:'\n + [hexColorNoAlphaReString, rgb1IntStr, rgb1PercStr, rgba3IntStr, rgba3PercStr]\n .concat(Object.keys(pre.cssPreColors3))\n .concat(hsl3Opts)\n .join('|')\n + ')'\n\n/**\n * Matches CSS3 'hex, rgb, rgba, hsl, and predefined colors.\n * @category CSS\n */\nexport const cssColor3Re = lockdownRe(cssColor3ReString)\n\nexport const cssColorReString = '(?:'\n + [hexColorAlphaReString, rgbReString, hslReString]\n .concat(Object.keys(pre.cssPreColors))\n .join('|')\n + ')'\n\n/**\n * Matches CSS4 'hex, rgb, rgba, hsl, and predefined colors.\n * @category CSS\n */\nexport const cssColorRe = lockdownRe(cssColorReString)\n","/*\nCopyright 2023 Liquid Labs LLC\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n*/\nimport { lockdownRe } from './lib/lockdown-re'\n\n// Started RE based on https://www.myintervals.com/blog/2009/05/20/iso-8601-date-validation-that-doesnt-suck/\n// Made some corrections, rearranged capture groups.\n\n/**\n * An RE ready string that matches the day designation portion of an ISO 8601 date+time. Provides matching groups:\n * - Group 1: year\n * - Group 3: month\n * - Group 4: day of month\n * - Group 5: week of year\n * - Group 6: day of week date\n * - Group 7: ordinal or Julian date\n * @category Date time\n */\nexport const iso8601DayReString = '(?:([+-]?\\\\d{4})(?:(-?)(?:(0[1-9]|1[0-2])(?:\\\\2([12]\\\\d|0[1-9]|3[01])?)?|W([0-4]\\\\d|5[0-3])(?:\\\\2([1-7]))?|(00[1-9]|0[1-9]\\\\d|[12]\\\\d{2}|3(?:[0-5]\\\\d|6[1-6])))?)?)'\n\n/**\n * An RE ready string that matches the day designation portion of an ISO 8601 date+time. Provides matching groups:\n * - Group 1: year\n * - Group 3: month\n * - Group 4: day of month\n * - Group 5: week of year\n * - Group 6: day of week date\n * - Group 7: ordinal or Julian date\n * @category Date time\n */\nexport const iso8601DayRe = lockdownRe(iso8601DayReString)\n\nconst eod = '(24(?<endSep>:?)00\\\\k<endSep>00)'\nconst frac = '(?:[.,](\\\\d+))'\nconst hr = `(?:([01]\\\\d|2[0-3])${frac}?)`\nconst min = `(?:([0-5]\\\\d)${frac}?)`\nconst sec = `(?:([0-5]\\\\d|60)${frac}?)`\nconst tz = '([zZ]|(?:[+-](?!00(?::?00)?)(?:[01]\\\\d|2[0-3])(?::?[0-5]\\\\d)?))'\n\nexport const iso8601TimeReString = `(?:(?:${eod}|${hr}(?:(?<timeSep>:?)${min}(?:\\\\k<timeSep>${sec})?)?)${tz}?)`\n\n/**\n * An RE ready string that matches the time designation portion of an ISO 8601 date+time. Provides matching groups:\n * - Group 1: special end of day time\n * - Group 3: hours\n * - Group 4: fraction of hour\n * - Group 6: minutes\n * - Group 7: fraction of minute\n * - Group 8: seconds\n * - Group 9: fraction of seconds\n * - Group 10: timezone\n *\n * (Groups 2 and 5 are internal backreferences for separator consistency)\n * @category Date time\n */\nexport const iso8601TimeRe = lockdownRe(iso8601TimeReString)\n\n/**\n * Matches the time designation portion of an ISO 8601 date+time. Provides matching groups:\n * - Group 1: year\n * - Group 3: month\n * - Group 4: day of month\n * - Group 5: week of year\n * - Group 6: day of week date\n * - Group 7: ordinal or Julian date\n * - Group 8: special end of day time\n * - Group 10: hour\n * - Group 11: decimal fraction of hour\n * - Group 13: minute\n * - Group 14: decimal fraction of minute\n * - Group 15: seconds\n * - Group 16: decimal fraction of a second\n * - Group 17: timezone designation\n * @category Date time\n */\nexport const iso8601DateReString = `${iso8601DayReString}(?:T${iso8601TimeReString})?`\n\n/**\n * Matches an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date time like '20240101T1212Z. Provides matching groups:\n * - Group 1: year\n * - Group 3: month\n * - Group 4: day of month\n * - Group 5: week of year\n * - Group 6: day of week date\n * - Group 7: ordinal or Julian date\n * - Group 8: special end of day time\n * - Group 10: hour\n * - Group 11: decimal fraction of hour\n * - Group 13: minute\n * - Group 14: decimal fraction of minute\n * - Group 15: seconds\n * - Group 16: decimal fraction of a second\n * - Group 17: timezone designation\n *\n * (Groups 2, 11, and 13 are internal back references.)\n * @category Date time\n */\nexport const iso8601DateRe = lockdownRe(iso8601DateReString)\n\nexport const iso8601DateTimeReString = `${iso8601DayReString}T${iso8601TimeReString}`\n\n/**\n * Matches an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) _requiring_ both date and time components. See\n * {@link iso8601DateRe} for matching groups.\n * @category Date time\n */\nexport const iso8601DateTimeRe = lockdownRe(iso8601DateTimeReString)\n\nexport const rfc2822DayReString = '(?:(?:(Sun|Mon|Tue|Wed|Thu|Fri|Sat),\\\\s+)?(0[1-9]|[1-2]?[0-9]|3[01])\\\\s+(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\\\s+(\\\\d{2,4}))'\n\n/**\n * Matches the day designation portion of an RFC 2822 date+time. Provides matching groups:\n * - Group 1: day of week name\n * - Group 2: day of month\n * - Group 3: month name\n * - Group 4: year\n * @category Date time\n */\nexport const rfc2822DayRe = lockdownRe(rfc2822DayReString)\n\nexport const timezoneReString = '([+-][0-9]{2}[0-5][0-9]|(?:UT|GMT|[A-Z]{3,5}|[A-IK-Z]))'\n\n/**\n * Matches a general timezone designation; compliant with RFC 2822 timezone portion. Provides matching groups:\n * - Group 1: timezone\n * @category Date time\n */\nexport const timezoneRe = lockdownRe(timezoneReString)\n\nexport const rfc2822TimeReString = `(?:(2[0-3]|[0-1][0-9]):([0-5][0-9])(?::(60|[0-5][0-9]))?(?:\\\\s+${timezoneReString})?)`\n\n/**\n * Matches the time designation portion of an RFC 2822 date+time. Provides matching groups:\n * - Group 1: hour\n * - Group 2: minutes\n * - Group 3: seconds\n * - Group 4: timezone\n * @category Date time\n */\nexport const rfc2822TimeRe = lockdownRe(rfc2822TimeReString)\n\nexport const rfc2822DateReString = `${rfc2822DayReString}\\\\s+${rfc2822TimeReString}`\n\n/**\n * Matches an [RFC 2822](https://datatracker.ietf.org/doc/html/rfc2822#section-3.3) style date like 'Mon, 6 Jan 1992 12:12 UTC'. Provides matching groups:\n * - Group 1: day of week\n * - Group 2: day of month\n * - Group 3: month name\n * - Group 4: year\n * - Group 5: hour\n * - Group 6: min\n * - Group 7: second\n * - Group 8: time zone\n * @category Date time\n */\nexport const rfc2822DateRe = lockdownRe(rfc2822DateReString)\n\nconst seps = '[./-]'\n\nexport const usDateReString = `(0?[1-9]|1[0-2])${seps}(0?[1-9]|[1-2][0-9]|3[0-1])${seps}([+-])?(\\\\d{1,})`\n\n/**\n * Matches a US style 'MM/DD/YYYY' string. Accepts separators '.', '/', '-'. Will except 1 or 2 digits for month and\n * day and 1-4 digits for the year. Also accepts a + or - before the year. Provides capture groups:\n * - Group 1: month\n * - Group 2: day of month\n * - Group 3: BCE/CE indicator\n * - Group 4: year\n * @category Date time\n */\nexport const usDateRe = lockdownRe(usDateReString)\n\nexport const intlDateReString = `([+-])?(\\\\d{1,})${seps}(0?[1-9]|1[0-2])${seps}(0?[1-9]|[1-2][0-9]|3[0-1])`\n\n/**\n * Matches an international style 'YYYY/MM/DD' string. Accepts separators '.', '/', '-'. Will except 1 or 2 digits for\n * month and day and 1-4 digits for the year. Also accepts a + or - before the year. Provides capture groups:\n * - Group 1: BCE/CE indicator\n * - Group 2: year\n * - Group 3: month\n * - Group 4: day\n * @category Date time\n */\nexport const intlDateRe = lockdownRe(intlDateReString)\n\nexport const militaryTimeReString = '(?:(2400)|([0-1][0-9]|2[0-3])([0-5]\\\\d))'\n\n/**\n * Matches military time style 'HHMM' string. Provides capture groups:\n * - Group 1: special 2400 time\n * - Group 2: hour\n * - Group 3: minutes\n * @category Date time\n */\nexport const militaryTimeRe = lockdownRe(militaryTimeReString)\n\nexport const timeReString = '(?:(0?[1-9]|1[0-2]):([0-5][0-9])(?::([0-5][0-9])(?:[.,](\\\\d+))?)?\\\\s*([aApP][mM]))'\n\n/**\n * Matches a twelve hour time designation, requires AM or PM designation. Allows optional leading 0 in hour. Provides matching groups:\n * - Group 1: hour\n * - Group 2: minutes\n * - Group 3: seconds, without decimal fractions\n * - Group 4: decimal fraction seconds\n * - Group 5: AM/PM indicator\n * @category Date time\n */\nexport const timeRe = lockdownRe(timeReString)\n\nexport const twentyFourHourTimeReString = '(?:(24:00(?::00)?)|([01]?[0-9]|2[0-3]):([0-5][0-9])(?::([0-5][0-9])(?:[.,](\\\\d+))?)?)'\n\n/**\n * Matches a twenty-four hour time designationAllows optional leading 0 in hour. Provides matching groups:\n * - Group 1: special 24:00 designation with optional seconds\n * - Group 2: hour\n * - Group 3: minutes\n * - Group 4: seconds, without decimal fractions\n * - Group 5: decimal fraction seconds\n * @category Date time\n */\nexport const twentyFourHourTimeRe = lockdownRe(twentyFourHourTimeReString)\n","/*\nCopyright 2023 Liquid Labs LLC\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n*/\n\nimport { lockdownRe } from './lib/lockdown-re'\n\nexport const uuidReString = '[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}'\n\n/**\n * Matches a UUID.\n * @category Identifiers\n */\nexport const uuidRe = lockdownRe(uuidReString)\n\nexport const ssnReString = '(?!000|666|9\\\\d\\\\d)(\\\\d{3})-?(\\\\d\\\\d)-?(?!0000)(\\\\d{4})'\n\n/**\n * Matches a valid SSN. Provides 3 matching groups, 1 (area number), 2\n * (group number), and 3 (serial number).\n * @category Identifiers\n */\nexport const ssnRe = lockdownRe(ssnReString)\n\n// https://www.irs.gov/businesses/small-businesses-self-employed/how-eins-are-assigned-and-valid-ein-prefixes\nconst validEinPrefix = [10, 12, 60, 67, 50, 53, 1, 2, 3, 4, 5, 6, 11, 13, 14, 16, 21, 22, 23, 25, 34, 51, 52, 54, 55, 56, 57, 58, 59, 65, 30, 32, 35, 36, 37, 38, 61, 15, 24, 40, 44, 94, 95, 80, 90, 33, 39, 41, 42, 43, 48, 62, 63, 64, 66, 68, 71, 72, 73, 74, 75, 76, 77, 82, 83, 84, 85, 86, 87, 88, 91, 92, 93, 98, 99, 20, 26, 27, 45, 46, 47, 81, 31].map((prefix) => ('' + prefix).padStart(2, '0'))\n\nexport const einReString = '(?:' + validEinPrefix.join('|') + ')-?\\\\d{7}'\n\n/**\n * Matches a valid EIN number.\n * @category Identifiers\n */\nexport const einRe = lockdownRe(einReString)\n","/*\nCopyright 2023 Liquid Labs LLC\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n*/\n\nimport { lockdownRe } from './lib/lockdown-re'\n\nexport const jsReservedWordReString = '(?:do|if|in|for|let|new|try|var|case|else|enum|eval|false|null|this|true|void|with|break|catch|class|const|super|throw|while|yield|delete|export|import|public|return|static|switch|typeof|default|extends|finally|package|private|continue|debugger|function|arguments|interface|protected|implements|instanceof)'\n\n/**\n * Matches a JS resereved word.\n * @category Javascript\n */\nexport const jsReservedWordRe = lockdownRe(jsReservedWordReString)\n\n/* credit to: https://stackoverflow.com/questions/1661197/what-characters-are-valid-for-javascript-variable-names */\nexport const jsVariableReString = '(?!(?:(?:^| |;)do|if|in|for|let|new|try|var|case|else|enum|eval|false|null|this|true|void|with|break|catch|class|const|super|throw|while|yield|delete|export|import|public|return|static|switch|typeof|default|extends|finally|package|private|continue|debugger|function|arguments|interface|protected|implements|instanceof)(?: |;|$))[$A-Z_a-z\\\\xaa\\\\xb5\\\\xba\\\\xc0-\\\\xd6\\\\xd8-\\\\xf6\\\\xf8-\\\\u02c1\\\\u02c6-\\\\u02d1\\\\u02e0-\\\\u02e4\\\\u02ec\\\\u02ee\\\\u0370-\\\\u0374\\\\u0376\\\\u0377\\\\u037a-\\\\u037d\\\\u0386\\\\u0388-\\\\u038a\\\\u038c\\\\u038e-\\\\u03a1\\\\u03a3-\\\\u03f5\\\\u03f7-\\\\u0481\\\\u048a-\\\\u0527\\\\u0531-\\\\u0556\\\\u0559\\\\u0561-\\\\u0587\\\\u05d0-\\\\u05ea\\\\u05f0-\\\\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\\\\u08a0\\\\u08a2-\\\\u08ac\\\\u0904-\\\\u0939\\\\u093d\\\\u0950\\\\u0958-\\\\u0961\\\\u0971-\\\\u0977\\\\u0979-\\\\u097f\\\\u0985-\\\\u098c\\\\u098f\\\\u0990\\\\u0993-\\\\u09a8\\\\u09aa-\\\\u09b0\\\\u09b2\\\\u09b6-\\\\u09b9\\\\u09bd\\\\u09ce\\\\u09dc\\\\u09dd\\\\u09df-\\\\u09e1\\\\u09f0\\\\u09f1\\\\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\\\\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-\\\\u0c33\\\\u0c35-\\\\u0c39\\\\u0c3d\\\\u0c58\\\\u0c59\\\\u0c60\\\\u0c61\\\\u0c85-\\\\u0c8c\\\\u0c8e-\\\\u0c90\\\\u0c92-\\\\u0ca8\\\\u0caa-\\\\u0cb3\\\\u0cb5-\\\\u0cb9\\\\u0cbd\\\\u0cde\\\\u0ce0\\\\u0ce1\\\\u0cf1\\\\u0cf2\\\\u0d05-\\\\u0d0c\\\\u0d0e-\\\\u0d10\\\\u0d12-\\\\u0d3a\\\\u0d3d\\\\u0d4e\\\\u0d60\\\\u0d61\\\\u0d7a-\\\\u0d7f\\\\u0d85-\\\\u0d96\\\\u0d9a-\\\\u0db1\\\\u0db3-\\\\u0dbb\\\\u0dbd\\\\u0dc0-\\\\u0dc6\\\\u0e01-\\\\u0e30\\\\u0e32\\\\u0e33\\\\u0e40-\\\\u0e46\\\\u0e81\\\\u0e82\\\\u0e84\\\\u0e87\\\\u0e88\\\\u0e8a\\\\u0e8d\\\\u0e94-\\\\u0e97\\\\u0e99-\\\\u0e9f\\\\u0ea1-\\\\u0ea3\\\\u0ea5\\\\u0ea7\\\\u0eaa\\\\u0eab\\\\u0ead-\\\\u0eb0\\\\u0eb2\\\\u0eb3\\\\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-\\\\u13f4\\\\u1401-\\\\u166c\\\\u166f-\\\\u167f\\\\u1681-\\\\u169a\\\\u16a0-\\\\u16ea\\\\u16ee-\\\\u16f0\\\\u1700-\\\\u170c\\\\u170e-\\\\u1711\\\\u1720-\\\\u1731\\\\u1740-\\\\u1751\\\\u1760-\\\\u176c\\\\u176e-\\\\u1770\\\\u1780-\\\\u17b3\\\\u17d7\\\\u17dc\\\\u1820-\\\\u1877\\\\u1880-\\\\u18a8\\\\u18aa\\\\u18b0-\\\\u18f5\\\\u1900-\\\\u191c\\\\u1950-\\\\u196d\\\\u1970-\\\\u1974\\\\u1980-\\\\u19ab\\\\u19c1-\\\\u19c7\\\\u1a00-\\\\u1a16\\\\u1a20-\\\\u1a54\\\\u1aa7\\\\u1b05-\\\\u1b33\\\\u1b45-\\\\u1b4b\\\\u1b83-\\\\u1ba0\\\\u1bae\\\\u1baf\\\\u1bba-\\\\u1be5\\\\u1c00-\\\\u1c23\\\\u1c4d-\\\\u1c4f\\\\u1c5a-\\\\u1c7d\\\\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\\\\u2119-\\\\u211d\\\\u2124\\\\u2126\\\\u2128\\\\u212a-\\\\u212d\\\\u212f-\\\\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\\\\u2e2f\\\\u3005-\\\\u3007\\\\u3021-\\\\u3029\\\\u3031-\\\\u3035\\\\u3038-\\\\u303c\\\\u3041-\\\\u3096\\\\u309d-\\\\u309f\\\\u30a1-\\\\u30fa\\\\u30fc-\\\\u30ff\\\\u3105-\\\\u312d\\\\u3131-\\\\u318e\\\\u31a0-\\\\u31ba\\\\u31f0-\\\\u31ff\\\\u3400-\\\\u4db5\\\\u4e00-\\\\u9fcc\\\\ua000-\\\\ua48c\\\\ua4d0-\\\\ua4fd\\\\ua500-\\\\ua60c\\\\ua610-\\\\ua61f\\\\ua62a\\\\ua62b\\\\ua640-\\\\ua66e\\\\ua67f-\\\\ua697\\\\ua6a0-\\\\ua6ef\\\\ua717-\\\\ua71f\\\\ua722-\\\\ua788\\\\ua78b-\\\\ua78e\\\\ua790-\\\\ua793\\\\ua7a0-\\\\ua7aa\\\\ua7f8-\\\\ua801\\\\ua803-\\\\ua805\\\\ua807-\\\\ua80a\\\\ua80c-\\\\ua822\\\\ua840-\\\\ua873\\\\ua882-\\\\ua8b3\\\\ua8f2-\\\\ua8f7\\\\ua8fb\\\\ua90a-\\\\ua925\\\\ua930-\\\\ua946\\\\ua960-\\\\ua97c\\\\ua984-\\\\ua9b2\\\\ua9cf\\\\uaa00-\\\\uaa28\\\\uaa40-\\\\uaa42\\\\uaa44-\\\\uaa4b\\\\uaa60-\\\\uaa76\\\\uaa7a\\\\uaa80-\\\\uaaaf\\\\uaab1\\\\uaab5\\\\uaab6\\\\uaab9-\\\\uaabd\\\\uaac0\\\\uaac2\\\\uaadb-\\\\uaadd\\\\uaae0-\\\\uaaea\\\\uaaf2-\\\\uaaf4\\\\uab01-\\\\uab06\\\\uab09-\\\\uab0e\\\\uab11-\\\\uab16\\\\uab20-\\\\uab26\\\\uab28-\\\\uab2e\\\\uabc0-\\\\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-\\\\ufd3d\\\\ufd50-\\\\ufd8f\\\\ufd92-\\\\ufdc7\\\\ufdf0-\\\\ufdfb\\\\ufe70-\\\\ufe74\\\\ufe76-\\\\ufefc\\\\uff21-\\\\uff3a\\\\uff41-\\\\uff5a\\\\uff66-\\\\uffbe\\\\uffc2-\\\\uffc7\\\\uffca-\\\\uffcf\\\\uffd2-\\\\uffd7\\\\uffda-\\\\uffdc][$A-Z_a-z\\\\xaa\\\\xb5\\\\xba\\\\xc0-\\\\xd6\\\\xd8-\\\\xf6\\\\xf8-\\\\u02c1\\\\u02c6-\\\\u02d1\\\\u02e0-\\\\u02e4\\\\u02ec\\\\u02ee\\\\u0370-\\\\u0374\\\\u0376\\\\u0377\\\\u037a-\\\\u037d\\\\u0386\\\\u0388-\\\\u038a\\\\u038c\\\\u038e-\\\\u03a1\\\\u03a3-\\\\u03f5\\\\u03f7-\\\\u0481\\\\u048a-\\\\u0527\\\\u0531-\\\\u0556\\\\u0559\\\\u0561-\\\\u0587\\\\u05d0-\\\\u05ea\\\\u05f0-\\\\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\\\\u08a0\\\\u08a2-\\\\u08ac\\\\u0904-\\\\u0939\\\\u093d\\\\u0950\\\\u0958-\\\\u0961\\\\u0971-\\\\u0977\\\\u0979-\\\\u097f\\\\u0985-\\\\u098c\\\\u098f\\\\u0990\\\\u0993-\\\\u09a8\\\\u09aa-\\\\u09b0\\\\u09b2\\\\u09b6-\\\\u09b9\\\\u09bd\\\\u09ce\\\\u09dc\\\\u09dd\\\\u09df-\\\\u09e1\\\\u09f0\\\\u09f1\\\\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\\\\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-\\\\u0c33\\\\u0c35-\\\\u0c39\\\\u0c3d\\\\u0c58\\\\u0c59\\\\u0c60\\\\u0c61\\\\u0c85-\\\\u0c8c\\\\u0c8e-\\\\u0c90\\\\u0c92-\\\\u0ca8\\\\u0caa-\\\\u0cb3\\\\u0cb5-\\\\u0cb9\\\\u0cbd\\\\u0cde\\\\u0ce0\\\\u0ce1\\\\u0cf1\\\\u0cf2\\\\u0d05-\\\\u0d0c\\\\u0d0e-\\\\u0d10\\\\u0d12-\\\\u0d3a\\\\u0d3d\\\\u0d4e\\\\u0d60\\\\u0d61\\\\u0d7a-\\\\u0d7f\\\\u0d85-\\\\u0d96\\\\u0d9a-\\\\u0db1\\\\u0db3-\\\\u0dbb\\\\u0dbd\\\\u0dc0-\\\\u0dc6\\\\u0e01-\\\\u0e30\\\\u0e32\\\\u0e33\\\\u0e40-\\\\u0e46\\\\u0e81\\\\u0e82\\\\u0e84\\\\u0e87\\\\u0e88\\\\u0e8a\\\\u0e8d\\\\u0e94-\\\\u0e97\\\\u0e99-\\\\u0e9f\\\\u0ea1-\\\\u0ea3\\\\u0ea5\\\\u0ea7\\\\u0eaa\\\\u0eab\\\\u0ead-\\\\u0eb0\\\\u0eb2\\\\u0eb3\\\\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-\\\\u13f4\\\\u1401-\\\\u166c\\\\u166f-\\\\u167f\\\\u1681-\\\\u169a\\\\u16a0-\\\\u16ea\\\\u16ee-\\\\u16f0\\\\u1700-\\\\u170c\\\\u170e-\\\\u1711\\\\u1720-\\\\u1731\\\\u1740-\\\\u1751\\\\u1760-\\\\u176c\\\\u176e-\\\\u1770\\\\u1780-\\\\u17b3\\\\u17d7\\\\u17dc\\\\u1820-\\\\u1877\\\\u1880-\\\\u18a8\\\\u18aa\\\\u18b0-\\\\u18f5\\\\u1900-\\\\u191c\\\\u1950-\\\\u196d\\\\u1970-\\\\u1974\\\\u1980-\\\\u19ab\\\\u19c1-\\\\u19c7\\\\u1a00-\\\\u1a16\\\\u1a20-\\\\u1a54\\\\u1aa7\\\\u1b05-\\\\u1b33\\\\u1b45-\\\\u1b4b\\\\u1b83-\\\\u1ba0\\\\u1bae\\\\u1baf\\\\u1bba-\\\\u1be5\\\\u1c00-\\\\u1c23\\\\u1c4d-\\\\u1c4f\\\\u1c5a-\\\\u1c7d\\\\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\\\\u2119-\\\\u211d\\\\u2124\\\\u2126\\\\u2128\\\\u212a-\\\\u212d\\\\u212f-\\\\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\\\\u2e2f\\\\u3005-\\\\u3007\\\\u3021-\\\\u3029\\\\u3031-\\\\u3035\\\\u3038-\\\\u303c\\\\u3041-\\\\u3096\\\\u309d-\\\\u309f\\\\u30a1-\\\\u30fa\\\\u30fc-\\\\u30ff\\\\u3105-\\\\u312d\\\\u3131-\\\\u318e\\\\u31a0-\\\\u31ba\\\\u31f0-\\\\u31ff\\\\u3400-\\\\u4db5\\\\u4e00-\\\\u9fcc\\\\ua000-\\\\ua48c\\\\ua4d0-\\\\ua4fd\\\\ua500-\\\\ua60c\\\\ua610-\\\\ua61f\\\\ua62a\\\\ua62b\\\\ua640-\\\\ua66e\\\\ua67f-\\\\ua697\\\\ua6a0-\\\\ua6ef\\\\ua717-\\\\ua71f\\\\ua722-\\\\ua788\\\\ua78b-\\\\ua78e\\\\ua790-\\\\ua793\\\\ua7a0-\\\\ua7aa\\\\ua7f8-\\\\ua801\\\\ua803-\\\\ua805\\\\ua807-\\\\ua80a\\\\ua80c-\\\\ua822\\\\ua840-\\\\ua873\\\\ua882-\\\\ua8b3\\\\ua8f2-\\\\ua8f7\\\\ua8fb\\\\ua90a-\\\\ua925\\\\ua930-\\\\ua946\\\\ua960-\\\\ua97c\\\\ua984-\\\\ua9b2\\\\ua9cf\\\\uaa00-\\\\uaa28\\\\uaa40-\\\\uaa42\\\\uaa44-\\\\uaa4b\\\\uaa60-\\\\uaa76\\\\uaa7a\\\\uaa80-\\\\uaaaf\\\\uaab1\\\\uaab5\\\\uaab6\\\\uaab9-\\\\uaabd\\\\uaac0\\\\uaac2\\\\uaadb-\\\\uaadd\\\\uaae0-\\\\uaaea\\\\uaaf2-\\\\uaaf4\\\\uab01-\\\\uab06\\\\uab09-\\\\uab0e\\\\uab11-\\\\uab16\\\\uab20-\\\\uab26\\\\uab28-\\\\uab2e\\\\uabc0-\\\\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-\\\\ufd3d\\\\ufd50-\\\\ufd8f\\\\ufd92-\\\\ufdc7\\\\ufdf0-\\\\ufdfb\\\\ufe70-\\\\ufe74\\\\ufe76-\\\\ufefc\\\\uff21-\\\\uff3a\\\\uff41