
      window.getLoginUrl = function (cUrl = location.href) {
        if (/\{+curl\}+/i.test(LOGIN_SERVICE_URL)) {
          return LOGIN_SERVICE_URL.replace(
            /\{+curl\}+/i,
            encodeURIComponent(cUrl)
          )
        } else if (/=%s/.test(LOGIN_SERVICE_URL)) {
          return LOGIN_SERVICE_URL.replace(/%s/, cUrl)
        } else {
          const loginUrl = new URL(LOGIN_SERVICE_URL)
          if (/=$/.test(loginUrl.search)) {
            return LOGIN_SERVICE_URL + cUrl
          }