consts.ts 1.7 KB
Newer Older
M
MaxKey 已提交
1 2
/*
 * Copyright [2022] [MaxKey of copyright http://www.maxkey.top]
M
MaxKey 已提交
3
 *
M
MaxKey 已提交
4 5 6
 * 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
M
MaxKey 已提交
7
 *
M
MaxKey 已提交
8
 *     http://www.apache.org/licenses/LICENSE-2.0
M
MaxKey 已提交
9
 *
M
MaxKey 已提交
10 11 12 13 14 15 16
 * 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.
 */

M
MaxKey 已提交
17
export const CONSTS = {
M
MaxKey 已提交
18 19 20 21 22 23 24 25 26 27 28
  // Regular expression to check if string is a IP v4 address
  IP_V4_REGEXEXP: /^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$/gi,
  // Regular expression to check if string is a IPv6 address
  IP_V6_REGEXEXP:
    /(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))/gi,
  INST: 'inst',
  CONGRESS: 'congress',
  ONLINE_TICKET: 'online_ticket',
  REDIRECT_URI: 'redirect_uri',
  REMEMBER: 'remember_me',
  TOKEN: '_token',
M
MaxKey 已提交
29
  VERSION: 'v3.5.11 GA'
M
MaxKey 已提交
30
};