<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <link rel="icon" href="favicon.ico" />
  <title></title>
  <style>
      * {
          box-sizing: border-box;
          padding: 0;
          margin: 0;
      }

      .open-platform-wrapper {
          display: flex;
          flex-direction: column;
          align-items: center;
          justify-content: center;
          height: 100vh;
          background-color: #ffffff;
      }

      .open-platform-icon {
          width: 120px;
          height: 120px;
          display: block;
      }

      .open-platform-desc {
          margin-top: 16px;
          line-height: 22px;
          font-size: 14px;
          color: #646a73;
          text-align: center
      }

      .open-platform-back {
          border-radius: 6px;
          font-size: 14px;
          height: 32px;
          line-height: 22px;
          min-width: 80px;
          padding: 4px 11px;
          text-align: center;
          text-decoration: none;
          touch-action: manipulation;
          transition: color .1s ease-in, background-color .1s ease-in, border-color .1s ease-in, width .2s ease-in;
          user-select: none;
          white-space: nowrap;
          background: #1456f0;
          border: 1px solid #1456f0;
          color: #ffffff;
          margin-top: 16px;
      }
  </style>
</head>
<body>
<div class="open-platform-wrapper">
  <img class="open-platform-icon"
       src="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIwIiBoZWlnaHQ9IjEyMCIgdmlld0JveD0iMCAwIDEyMCAxMjAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEyLjkxMyA1NS4yNDRjLTUuNjMyIDIuOTUtOC4yNDYgNi4yODQtOC4yNDYgOS40NHY5LjcyYzAtMy4xNTYgMi42MTQtNi40OSA4LjI0Ni05LjQ0di05LjcyWm05NC4xNjMtMTIuMDg0di05LjcyNmM1LjkzNC0zLjE5IDguOTgxLTYuODkxIDguOTgxLTEwLjcyNXY5LjcyYzAgMy44NC0zLjA0NyA3LjU0My04Ljk4MSAxMC43MzJaIiBmaWxsPSIjMEMyOTZFIi8+PHBhdGggZD0iTTYwLjIyOSAxOS4wNTkgNDguNzMgNDkuOTIyIDYw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YS44MTguODE4IDAgMCAwLS44MTgtLjgxOEg5Ny4xOFptMCAxMy4wOTJhLjgxOC44MTggMCAwIDAtLjgxOC44MTh2MS42MzZjMCAuNDUyLjM2Ni44MTguODE4LjgxOGgxLjYzN2EuODE4LjgxOCAwIDAgMCAuODE4LS44MTh2LTEuNjM2YS44MTguODE4IDAgMCAwLS44MTgtLjgxOUg5Ny4xOFoiIGZpbGw9IiNmZmYiLz48cGF0aCBkPSJNNC4wMjcgODUuMzFjMi40OSA1LjUxIDE0Ljc3IDkuOTQgNDEuNDUgOS45M3Y5LjcyMWMtMjYuNjguMDEtMzguOTYtNC40Mi00MS40NS05Ljkzdi05LjcyWm04NC44MS0yNy4yN2MxNy41Mi0yLjY5IDI1LjgwNy03LjAyNiAyNy4yLTExLjcxdjkuNzJjLS4zMyA0LjY3LTkuNjggOS4wMi0yNy4yIDExLjcxdi05LjcyWiIgZmlsbD0iIzMzNzBGRiIvPjxwYXRoIGQ9Ik04OS4yMzcgMTMuMDFjMTguMDU4IDAgMjYuOCAzLjI1IDI2LjggOS43MnY5LjcyYzAtNi40Ny04Ljc0Mi05LjcyLTI2LjgtOS43MnYtOS43MlptLTg0LjU3IDUxLjdjMCA2LjYgMTEuMzcgMTIuNDUgMzAuNDcgMTIuNDR2OS43MmMtMTkuMSAwLTMwLjQ3LTUuODQtMzAuNDctMTIuNDR2LTkuNzJaIiBmaWxsPSIjMDBENkI5Ii8+PC9zdmc+"
       alt="">
  <div class="open-platform-desc">The page does not exist.</div>
  <a class="open-platform-back" href="/">Go to homepage</a>
</div>
<script>window.gfdatav1={"env":"prod","ver":"1.0.0.13","canary":0,"garrModules":null,"envName":"prod","region":"CN","idc":"lf","webServerCodeType":"DeployServerlessWebServer","runtime":"node","extra":{"canaryType":null}}</script><script>

  function parseQueryString(queryString) {
    // 移除开头的 "?"
    if (queryString.charAt(0) === '?') {
      queryString = queryString.substring(1);
    }

    var params = {};
    if (!queryString) return params;

    // 分割参数对
    var paramPairs = queryString.split('&');

    for (var i = 0; i < paramPairs.length; i++) {
      var paramPair = paramPairs[i].split('=');
      var key = decodeURIComponent(paramPair[0]);
      var value = paramPair.length > 1 ? decodeURIComponent(paramPair[1]) : '';

      // 处理重复参数（转为数组）
      if (params[key] === undefined) {
        params[key] = value;
      } else if (!Array.isArray(params[key])) {
        params[key] = [params[key], value];
      } else {
        params[key].push(value);
      }
    }

    return params;
  }

  function getLocale() {
    var zhLang = 'zh-CN';
    var enLang = 'en-US';

    var queryLang = parseQueryString(window.location.search).lang;
    var cookieLang = getCookieLocale();
    var lang = enLang;

    <!--从cookie中取值-->
    function getCookieLocale() {
      var locale = '';
      var cookies = document.cookie.split('; ');
      var loclaeKey = 'open_locale';

      for (var i = 0; i < cookies.length; i++) {
        var cookie = cookies[i].trim();
        var cookieArr = cookie.split('=');
        if (cookieArr[0] === loclaeKey) {
          locale = cookieArr[1];
          break;
        }
      }
      return locale;
    }

    function setLocaleCookie(lang) {
      var date = new Date();
      // 300天到期
      date.setTime(date.getTime() + (300 * 24 * 60 * 60 * 1000));
      var expires = 'expires=' + date.toUTCString();
      document.cookie = 'open_locale=' + lang + '; ' + expires + '; path=/;';
    }

    // 获取浏览器默认语言
    if (navigator.language.indexOf('en') !== -1) {
      lang = enLang;
    } else if (navigator.language.indexOf('zh') !== -1) {
      lang = zhLang;
    }
    if (cookieLang === enLang) {
      lang = enLang;
    } else if (cookieLang === zhLang) {
      lang = zhLang;
    }
    if (queryLang === enLang) {
      lang = enLang;
    } else if (queryLang === zhLang) {
      lang = zhLang;
    }
    // 设置cookie
    setLocaleCookie(lang);
    return lang;
  }

  // 根据域名获取当前brand
  function isLarkDomain() {
    var defaultBrandMap = {
      lark: ['larksuite'],
      feishu: ['feishu', 'larkoffice', 'larkenterprise'],
    };
    const { hostname } = window.location;

    if (defaultBrandMap.feishu.some((item) => hostname.includes(item))) {
      return false;
    }

    if (defaultBrandMap.lark.some((item) => hostname.includes(item))) {
      return true;
    }

    if (window.domainBrand) {
      return window.domainBrand === 'lark';
    }

    return false;
  }

  var isLarkBrand = isLarkDomain();

  var config = {
    'zh-CN': {
      'desc': '抱歉，您访问的页面不存在',
      'back': '返回首页',
      'title': (isLarkBrand ? 'Lark' : '飞书') + '开放平台',
    },
    'en-US': {
      'desc': 'The page does not exist.',
      'back': 'Go to homepage',
      'title': (isLarkBrand ? 'Lark': 'Feishu') + ' Open Platform',
    },
  };
  var locale = getLocale();
  var descObj = document.querySelector('.open-platform-desc');
  var backObj = document.querySelector('.open-platform-back');
  descObj.innerHTML = config[locale].desc;
  backObj.innerHTML = config[locale].back;
  document.title = config[locale].title;

</script>
</body>
</html>