@springmicro/auth 0.1.9 → 0.2.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (135) hide show
  1. package/dist/Index-652aeb8c-BTQ1rBi7.js +2818 -0
  2. package/dist/Index-c419311f-BOZhAAW3.js +1054 -0
  3. package/dist/Web3Auth-hACKSouN.js +32769 -0
  4. package/dist/alphawallet-B7eovdf-.js +26 -0
  5. package/dist/apexwallet-ysP20G9D.js +93 -0
  6. package/dist/atoken-BBnNTzcz.js +27 -0
  7. package/dist/bifrostwallet-CNNBO92h.js +11 -0
  8. package/dist/binance-DvPgAzCw.js +14 -0
  9. package/dist/bitget-DZOUrwgy.js +4 -0
  10. package/dist/bitpie-C_uxmEzw.js +25 -0
  11. package/dist/bitski-DpzkHNkv.js +4 -0
  12. package/dist/blockwallet-BL69cqkA.js +8 -0
  13. package/dist/brave-DnRzMQYW.js +35 -0
  14. package/dist/ccip-c78d2f16-DLcRlwod.js +165 -0
  15. package/dist/coin98wallet-CkFdOvXt.js +4 -0
  16. package/dist/coinbase-CaGNx5if.js +9 -0
  17. package/dist/core-9rK8tWud.js +7 -0
  18. package/dist/defiwallet-0AsgJBSy.js +10 -0
  19. package/dist/detected-CX_JZaUk.js +6 -0
  20. package/dist/echooo-CmaetT_Z.js +14 -0
  21. package/dist/enkrypt-BibtwvK7.js +20 -0
  22. package/dist/exodus-BxzkDWWP.js +4 -0
  23. package/dist/fordefi-CvKyVwhI.js +6 -0
  24. package/dist/foxwallet-D7c_LDTf.js +4 -0
  25. package/dist/frame-CDfNmjUy.js +7 -0
  26. package/dist/frontier-DqKNSj2z.js +8 -0
  27. package/dist/huobiwallet-CxSwqa5L.js +14 -0
  28. package/dist/hyperpay-nmHE3WqM.js +7 -0
  29. package/dist/icon-2Zqy7pqQ.js +8 -0
  30. package/dist/icon-CGWI1Ies.js +43 -0
  31. package/dist/icon-C_O4nprO.js +9 -0
  32. package/dist/icon-DbgmZCnU.js +9 -0
  33. package/dist/icon-cAd7RhSC.js +9 -0
  34. package/dist/icon-duCa3gfT.js +11 -0
  35. package/dist/imtoken-yENtOTS3.js +17 -0
  36. package/dist/index-021f6a62-Zz543EDB.js +2583 -0
  37. package/dist/index-40a497ea-Bn2mC0r7.js +1010 -0
  38. package/dist/index-BHkXn9Ss.js +4010 -0
  39. package/dist/index-BaYEABY7.js +7089 -0
  40. package/dist/index-BtLU53lm.js +6023 -0
  41. package/dist/index-CynP9H3X.js +6188 -0
  42. package/dist/index-Dg8m-Szw.js +31 -0
  43. package/dist/index-Dt6M8ha9.js +161 -0
  44. package/dist/index-DtJfAdfq.js +5822 -0
  45. package/dist/index-klU8YB0c.js +1983 -0
  46. package/dist/index.d.ts +124 -0
  47. package/dist/index.js +5 -43
  48. package/dist/index.umd.cjs +1937 -1
  49. package/dist/infinitywallet-C8J4FUYw.js +42 -0
  50. package/dist/kayros-AIrUK1za.js +27 -0
  51. package/dist/lif3wallet-C5D6r8pg.js +41 -0
  52. package/dist/liquality-nbCtErVq.js +16 -0
  53. package/dist/mathwallet-CWkivCXo.js +50 -0
  54. package/dist/meetone-kKmvI8md.js +13 -0
  55. package/dist/metamask-BN7yiDV1.js +64 -0
  56. package/dist/mykey-CQZ6UcLH.js +13 -0
  57. package/dist/number-BXHWhlom.js +1529 -0
  58. package/dist/okxwallet-CJLVogh2.js +8 -0
  59. package/dist/oneInch-CciyZ4Pz.js +72 -0
  60. package/dist/onekey-Dal8kYjU.js +9 -0
  61. package/dist/opera-DnKg-TJU.js +24 -0
  62. package/dist/ownbit-BshJUVuW.js +18 -0
  63. package/dist/phantom-CJ8dIcov.js +35 -0
  64. package/dist/rabby-D4thTcd6.js +27 -0
  65. package/dist/rainbow-mXld6yWV.js +69 -0
  66. package/dist/roninwallet-ZyYrd-D1.js +9 -0
  67. package/dist/safeheron-Eg1Jb29V.js +23 -0
  68. package/dist/safepal-DVIKy94N.js +105 -0
  69. package/dist/sequence-BS2IbtDg.js +70 -0
  70. package/dist/stablewallet-jyB079Wb.js +20 -0
  71. package/dist/status-FrAvQjfn.js +4 -0
  72. package/dist/subwallet-DMvFqKyY.js +25 -0
  73. package/dist/talisman-Bp8zUXqB.js +16 -0
  74. package/dist/tallywallet-B4OS9nIr.js +16 -0
  75. package/dist/tokenary-C7jjcbQa.js +18 -0
  76. package/dist/tokenpocket-9ZRPmAFA.js +28 -0
  77. package/dist/tp-V2em5bdl.js +13 -0
  78. package/dist/transactionRequest-be6a8ea9-CUKWo5mx.js +1117 -0
  79. package/dist/trust-gPypS1O7.js +11 -0
  80. package/dist/xdefi-COVIyGz4.js +38 -0
  81. package/dist/zeal-DxHbDqm0.js +9 -0
  82. package/dist/zerion-BfW0UElc.js +8 -0
  83. package/dist/zodiacpilot-CrId6F4w.js +6 -0
  84. package/package.json +35 -15
  85. package/src/auth/config.ts +0 -2
  86. package/src/components/SignUp.tsx +442 -0
  87. package/src/components/forms/AgreementModal.tsx +88 -0
  88. package/src/components/forms/CaptchaController.tsx +94 -0
  89. package/src/components/forms/CaptchaModal.jsx +171 -0
  90. package/src/components/forms/CaptchaWidget.jsx +146 -0
  91. package/src/components/forms/PasswordChecker.ts +88 -0
  92. package/src/components/forms/SendCodeInput.tsx +149 -0
  93. package/src/components/forms/SignUpFormItem.tsx +704 -0
  94. package/src/components/forms/util/application-api.ts +155 -0
  95. package/src/components/forms/util/auth-api.ts +198 -0
  96. package/src/components/forms/util/auth-util.tsx +346 -0
  97. package/src/components/forms/util/core.ts +493 -0
  98. package/src/components/forms/util/invitation-api.ts +132 -0
  99. package/src/components/forms/util/provider.tsx +603 -0
  100. package/src/components/forms/util/user-api.ts +303 -0
  101. package/src/components/provider/AdfsLoginButton.jsx +38 -0
  102. package/src/components/provider/AlipayLoginButton.jsx +38 -0
  103. package/src/components/provider/AppleLoginButton.jsx +38 -0
  104. package/src/components/provider/AzureADB2CLoginButton.jsx +38 -0
  105. package/src/components/provider/AzureADLoginButton.jsx +38 -0
  106. package/src/components/provider/BaiduLoginButton.jsx +38 -0
  107. package/src/components/provider/BilibiliLoginButton.jsx +37 -0
  108. package/src/components/provider/CasdoorLoginButton.jsx +38 -0
  109. package/src/components/provider/DingTalkLoginButton.jsx +37 -0
  110. package/src/components/provider/DouyinLoginButton.jsx +38 -0
  111. package/src/components/provider/FacebookLoginButton.jsx +37 -0
  112. package/src/components/provider/GitHubLoginButton.jsx +37 -0
  113. package/src/components/provider/GitLabLoginButton.jsx +38 -0
  114. package/src/components/provider/GiteeLoginButton.jsx +34 -0
  115. package/src/components/provider/GoogleLoginButton.jsx +68 -0
  116. package/src/components/provider/InfoflowLoginButton.jsx +38 -0
  117. package/src/components/provider/LarkLoginButton.jsx +38 -0
  118. package/src/components/provider/LinkedInLoginButton.jsx +37 -0
  119. package/src/components/provider/LoginButton.jsx +33 -0
  120. package/src/components/provider/OktaLoginButton.jsx +38 -0
  121. package/src/components/provider/Provider.jsx +3 -0
  122. package/src/components/provider/ProviderButton.jsx +327 -0
  123. package/src/components/provider/QqLoginButton.jsx +31 -0
  124. package/src/components/provider/SelfLoginButton.jsx +47 -0
  125. package/src/components/provider/SlackLoginButton.jsx +38 -0
  126. package/src/components/provider/SteamLoginButton.jsx +38 -0
  127. package/src/components/provider/WeComLoginButton.jsx +34 -0
  128. package/src/components/provider/Web3Auth.jsx +365 -0
  129. package/src/components/provider/WechatLoginButton.jsx +37 -0
  130. package/src/components/provider/WeiboLoginButton.jsx +34 -0
  131. package/src/components/util.tsx +173 -0
  132. package/src/i18n/en/signup.json +48 -0
  133. package/src/i18n/index.ts +17 -0
  134. package/src/index.tsx +6 -1
  135. package/vite.config.ts +33 -25
@@ -0,0 +1,4010 @@
1
+ import { defineConfig as kn } from "auth-astro";
2
+ import m, { useEffect as Rt } from "react";
3
+ import { useTranslation as Te, initReactI18next as Sn, I18nextProvider as _n } from "react-i18next";
4
+ import Q from "i18next";
5
+ const fr = ({
6
+ casdoorEndpoint: t,
7
+ clientId: e,
8
+ clientSecret: o
9
+ }) => kn({
10
+ // Configure one or more authentication providers
11
+ providers: [
12
+ {
13
+ id: "casdoor",
14
+ name: "SpringMicroHost",
15
+ type: "oidc",
16
+ issuer: t,
17
+ authorization: { params: { scope: "openid email profile" } },
18
+ token: !0,
19
+ checks: ["state"],
20
+ clientId: e,
21
+ clientSecret: o,
22
+ profile(r) {
23
+ return {
24
+ id: r.id,
25
+ name: r.displayName,
26
+ email: r.email,
27
+ username: r.name ?? r.email,
28
+ image: r.avatar
29
+ };
30
+ }
31
+ }
32
+ ],
33
+ pages: {
34
+ signIn: "/sign-in"
35
+ },
36
+ callbacks: {
37
+ async jwt({ token: r, account: a, user: l }) {
38
+ return a && (r.accessToken = a.access_token ?? "", r.username = l.username, r.id = l.id), r;
39
+ },
40
+ async session({ session: r, token: a, user: l }) {
41
+ return r.accessToken = a.accessToken, r.user.id = a.id, r.user.username = a.username, r;
42
+ }
43
+ }
44
+ });
45
+ var Ze = { exports: {} }, we = {};
46
+ /**
47
+ * @license React
48
+ * react-jsx-runtime.production.min.js
49
+ *
50
+ * Copyright (c) Facebook, Inc. and its affiliates.
51
+ *
52
+ * This source code is licensed under the MIT license found in the
53
+ * LICENSE file in the root directory of this source tree.
54
+ */
55
+ var wt;
56
+ function Cn() {
57
+ if (wt) return we;
58
+ wt = 1;
59
+ var t = m, e = Symbol.for("react.element"), o = Symbol.for("react.fragment"), r = Object.prototype.hasOwnProperty, a = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, l = { key: !0, ref: !0, __self: !0, __source: !0 };
60
+ function u(g, c, f) {
61
+ var h, $ = {}, w = null, b = null;
62
+ f !== void 0 && (w = "" + f), c.key !== void 0 && (w = "" + c.key), c.ref !== void 0 && (b = c.ref);
63
+ for (h in c) r.call(c, h) && !l.hasOwnProperty(h) && ($[h] = c[h]);
64
+ if (g && g.defaultProps) for (h in c = g.defaultProps, c) $[h] === void 0 && ($[h] = c[h]);
65
+ return { $$typeof: e, type: g, key: w, ref: b, props: $, _owner: a.current };
66
+ }
67
+ return we.Fragment = o, we.jsx = u, we.jsxs = u, we;
68
+ }
69
+ var be = {};
70
+ /**
71
+ * @license React
72
+ * react-jsx-runtime.development.js
73
+ *
74
+ * Copyright (c) Facebook, Inc. and its affiliates.
75
+ *
76
+ * This source code is licensed under the MIT license found in the
77
+ * LICENSE file in the root directory of this source tree.
78
+ */
79
+ var bt;
80
+ function En() {
81
+ return bt || (bt = 1, process.env.NODE_ENV !== "production" && function() {
82
+ var t = m, e = Symbol.for("react.element"), o = Symbol.for("react.portal"), r = Symbol.for("react.fragment"), a = Symbol.for("react.strict_mode"), l = Symbol.for("react.profiler"), u = Symbol.for("react.provider"), g = Symbol.for("react.context"), c = Symbol.for("react.forward_ref"), f = Symbol.for("react.suspense"), h = Symbol.for("react.suspense_list"), $ = Symbol.for("react.memo"), w = Symbol.for("react.lazy"), b = Symbol.for("react.offscreen"), L = Symbol.iterator, F = "@@iterator";
83
+ function E(n) {
84
+ if (n === null || typeof n != "object")
85
+ return null;
86
+ var s = L && n[L] || n[F];
87
+ return typeof s == "function" ? s : null;
88
+ }
89
+ var _ = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
90
+ function k(n) {
91
+ {
92
+ for (var s = arguments.length, p = new Array(s > 1 ? s - 1 : 0), y = 1; y < s; y++)
93
+ p[y - 1] = arguments[y];
94
+ q("error", n, p);
95
+ }
96
+ }
97
+ function q(n, s, p) {
98
+ {
99
+ var y = _.ReactDebugCurrentFrame, S = y.getStackAddendum();
100
+ S !== "" && (s += "%s", p = p.concat([S]));
101
+ var C = p.map(function(x) {
102
+ return String(x);
103
+ });
104
+ C.unshift("Warning: " + s), Function.prototype.apply.call(console[n], console, C);
105
+ }
106
+ }
107
+ var Y = !1, U = !1, ie = !1, pe = !1, ne = !1, R;
108
+ R = Symbol.for("react.module.reference");
109
+ function ze(n) {
110
+ return !!(typeof n == "string" || typeof n == "function" || n === r || n === l || ne || n === a || n === f || n === h || pe || n === b || Y || U || ie || typeof n == "object" && n !== null && (n.$$typeof === w || n.$$typeof === $ || n.$$typeof === u || n.$$typeof === g || n.$$typeof === c || // This needs to include all possible module reference object
111
+ // types supported by any Flight configuration anywhere since
112
+ // we don't know which Flight build this will end up being used
113
+ // with.
114
+ n.$$typeof === R || n.getModuleId !== void 0));
115
+ }
116
+ function ge(n, s, p) {
117
+ var y = n.displayName;
118
+ if (y)
119
+ return y;
120
+ var S = s.displayName || s.name || "";
121
+ return S !== "" ? p + "(" + S + ")" : p;
122
+ }
123
+ function he(n) {
124
+ return n.displayName || "Context";
125
+ }
126
+ function H(n) {
127
+ if (n == null)
128
+ return null;
129
+ if (typeof n.tag == "number" && k("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof n == "function")
130
+ return n.displayName || n.name || null;
131
+ if (typeof n == "string")
132
+ return n;
133
+ switch (n) {
134
+ case r:
135
+ return "Fragment";
136
+ case o:
137
+ return "Portal";
138
+ case l:
139
+ return "Profiler";
140
+ case a:
141
+ return "StrictMode";
142
+ case f:
143
+ return "Suspense";
144
+ case h:
145
+ return "SuspenseList";
146
+ }
147
+ if (typeof n == "object")
148
+ switch (n.$$typeof) {
149
+ case g:
150
+ var s = n;
151
+ return he(s) + ".Consumer";
152
+ case u:
153
+ var p = n;
154
+ return he(p._context) + ".Provider";
155
+ case c:
156
+ return ge(n, n.render, "ForwardRef");
157
+ case $:
158
+ var y = n.displayName || null;
159
+ return y !== null ? y : H(n.type) || "Memo";
160
+ case w: {
161
+ var S = n, C = S._payload, x = S._init;
162
+ try {
163
+ return H(x(C));
164
+ } catch {
165
+ return null;
166
+ }
167
+ }
168
+ }
169
+ return null;
170
+ }
171
+ var X = Object.assign, re = 0, ke, Se, M, Oe, et, tt, nt;
172
+ function ot() {
173
+ }
174
+ ot.__reactDisabledLog = !0;
175
+ function Kt() {
176
+ {
177
+ if (re === 0) {
178
+ ke = console.log, Se = console.info, M = console.warn, Oe = console.error, et = console.group, tt = console.groupCollapsed, nt = console.groupEnd;
179
+ var n = {
180
+ configurable: !0,
181
+ enumerable: !0,
182
+ value: ot,
183
+ writable: !0
184
+ };
185
+ Object.defineProperties(console, {
186
+ info: n,
187
+ log: n,
188
+ warn: n,
189
+ error: n,
190
+ group: n,
191
+ groupCollapsed: n,
192
+ groupEnd: n
193
+ });
194
+ }
195
+ re++;
196
+ }
197
+ }
198
+ function Jt() {
199
+ {
200
+ if (re--, re === 0) {
201
+ var n = {
202
+ configurable: !0,
203
+ enumerable: !0,
204
+ writable: !0
205
+ };
206
+ Object.defineProperties(console, {
207
+ log: X({}, n, {
208
+ value: ke
209
+ }),
210
+ info: X({}, n, {
211
+ value: Se
212
+ }),
213
+ warn: X({}, n, {
214
+ value: M
215
+ }),
216
+ error: X({}, n, {
217
+ value: Oe
218
+ }),
219
+ group: X({}, n, {
220
+ value: et
221
+ }),
222
+ groupCollapsed: X({}, n, {
223
+ value: tt
224
+ }),
225
+ groupEnd: X({}, n, {
226
+ value: nt
227
+ })
228
+ });
229
+ }
230
+ re < 0 && k("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
231
+ }
232
+ }
233
+ var Be = _.ReactCurrentDispatcher, Re;
234
+ function _e(n, s, p) {
235
+ {
236
+ if (Re === void 0)
237
+ try {
238
+ throw Error();
239
+ } catch (S) {
240
+ var y = S.stack.trim().match(/\n( *(at )?)/);
241
+ Re = y && y[1] || "";
242
+ }
243
+ return `
244
+ ` + Re + n;
245
+ }
246
+ }
247
+ var Pe = !1, Ce;
248
+ {
249
+ var Qt = typeof WeakMap == "function" ? WeakMap : Map;
250
+ Ce = new Qt();
251
+ }
252
+ function at(n, s) {
253
+ if (!n || Pe)
254
+ return "";
255
+ {
256
+ var p = Ce.get(n);
257
+ if (p !== void 0)
258
+ return p;
259
+ }
260
+ var y;
261
+ Pe = !0;
262
+ var S = Error.prepareStackTrace;
263
+ Error.prepareStackTrace = void 0;
264
+ var C;
265
+ C = Be.current, Be.current = null, Kt();
266
+ try {
267
+ if (s) {
268
+ var x = function() {
269
+ throw Error();
270
+ };
271
+ if (Object.defineProperty(x.prototype, "props", {
272
+ set: function() {
273
+ throw Error();
274
+ }
275
+ }), typeof Reflect == "object" && Reflect.construct) {
276
+ try {
277
+ Reflect.construct(x, []);
278
+ } catch (D) {
279
+ y = D;
280
+ }
281
+ Reflect.construct(n, [], x);
282
+ } else {
283
+ try {
284
+ x.call();
285
+ } catch (D) {
286
+ y = D;
287
+ }
288
+ n.call(x.prototype);
289
+ }
290
+ } else {
291
+ try {
292
+ throw Error();
293
+ } catch (D) {
294
+ y = D;
295
+ }
296
+ n();
297
+ }
298
+ } catch (D) {
299
+ if (D && y && typeof D.stack == "string") {
300
+ for (var v = D.stack.split(`
301
+ `), N = y.stack.split(`
302
+ `), z = v.length - 1, B = N.length - 1; z >= 1 && B >= 0 && v[z] !== N[B]; )
303
+ B--;
304
+ for (; z >= 1 && B >= 0; z--, B--)
305
+ if (v[z] !== N[B]) {
306
+ if (z !== 1 || B !== 1)
307
+ do
308
+ if (z--, B--, B < 0 || v[z] !== N[B]) {
309
+ var V = `
310
+ ` + v[z].replace(" at new ", " at ");
311
+ return n.displayName && V.includes("<anonymous>") && (V = V.replace("<anonymous>", n.displayName)), typeof n == "function" && Ce.set(n, V), V;
312
+ }
313
+ while (z >= 1 && B >= 0);
314
+ break;
315
+ }
316
+ }
317
+ } finally {
318
+ Pe = !1, Be.current = C, Jt(), Error.prepareStackTrace = S;
319
+ }
320
+ var de = n ? n.displayName || n.name : "", le = de ? _e(de) : "";
321
+ return typeof n == "function" && Ce.set(n, le), le;
322
+ }
323
+ function Zt(n, s, p) {
324
+ return at(n, !1);
325
+ }
326
+ function Xt(n) {
327
+ var s = n.prototype;
328
+ return !!(s && s.isReactComponent);
329
+ }
330
+ function Ee(n, s, p) {
331
+ if (n == null)
332
+ return "";
333
+ if (typeof n == "function")
334
+ return at(n, Xt(n));
335
+ if (typeof n == "string")
336
+ return _e(n);
337
+ switch (n) {
338
+ case f:
339
+ return _e("Suspense");
340
+ case h:
341
+ return _e("SuspenseList");
342
+ }
343
+ if (typeof n == "object")
344
+ switch (n.$$typeof) {
345
+ case c:
346
+ return Zt(n.render);
347
+ case $:
348
+ return Ee(n.type, s, p);
349
+ case w: {
350
+ var y = n, S = y._payload, C = y._init;
351
+ try {
352
+ return Ee(C(S), s, p);
353
+ } catch {
354
+ }
355
+ }
356
+ }
357
+ return "";
358
+ }
359
+ var me = Object.prototype.hasOwnProperty, it = {}, rt = _.ReactDebugCurrentFrame;
360
+ function je(n) {
361
+ if (n) {
362
+ var s = n._owner, p = Ee(n.type, n._source, s ? s.type : null);
363
+ rt.setExtraStackFrame(p);
364
+ } else
365
+ rt.setExtraStackFrame(null);
366
+ }
367
+ function en(n, s, p, y, S) {
368
+ {
369
+ var C = Function.call.bind(me);
370
+ for (var x in n)
371
+ if (C(n, x)) {
372
+ var v = void 0;
373
+ try {
374
+ if (typeof n[x] != "function") {
375
+ var N = Error((y || "React class") + ": " + p + " type `" + x + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof n[x] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
376
+ throw N.name = "Invariant Violation", N;
377
+ }
378
+ v = n[x](s, x, y, p, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
379
+ } catch (z) {
380
+ v = z;
381
+ }
382
+ v && !(v instanceof Error) && (je(S), k("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", y || "React class", p, x, typeof v), je(null)), v instanceof Error && !(v.message in it) && (it[v.message] = !0, je(S), k("Failed %s type: %s", p, v.message), je(null));
383
+ }
384
+ }
385
+ }
386
+ var tn = Array.isArray;
387
+ function Ie(n) {
388
+ return tn(n);
389
+ }
390
+ function nn(n) {
391
+ {
392
+ var s = typeof Symbol == "function" && Symbol.toStringTag, p = s && n[Symbol.toStringTag] || n.constructor.name || "Object";
393
+ return p;
394
+ }
395
+ }
396
+ function on(n) {
397
+ try {
398
+ return lt(n), !1;
399
+ } catch {
400
+ return !0;
401
+ }
402
+ }
403
+ function lt(n) {
404
+ return "" + n;
405
+ }
406
+ function ct(n) {
407
+ if (on(n))
408
+ return k("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", nn(n)), lt(n);
409
+ }
410
+ var ye = _.ReactCurrentOwner, an = {
411
+ key: !0,
412
+ ref: !0,
413
+ __self: !0,
414
+ __source: !0
415
+ }, st, ut, Fe;
416
+ Fe = {};
417
+ function rn(n) {
418
+ if (me.call(n, "ref")) {
419
+ var s = Object.getOwnPropertyDescriptor(n, "ref").get;
420
+ if (s && s.isReactWarning)
421
+ return !1;
422
+ }
423
+ return n.ref !== void 0;
424
+ }
425
+ function ln(n) {
426
+ if (me.call(n, "key")) {
427
+ var s = Object.getOwnPropertyDescriptor(n, "key").get;
428
+ if (s && s.isReactWarning)
429
+ return !1;
430
+ }
431
+ return n.key !== void 0;
432
+ }
433
+ function cn(n, s) {
434
+ if (typeof n.ref == "string" && ye.current && s && ye.current.stateNode !== s) {
435
+ var p = H(ye.current.type);
436
+ Fe[p] || (k('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', H(ye.current.type), n.ref), Fe[p] = !0);
437
+ }
438
+ }
439
+ function sn(n, s) {
440
+ {
441
+ var p = function() {
442
+ st || (st = !0, k("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", s));
443
+ };
444
+ p.isReactWarning = !0, Object.defineProperty(n, "key", {
445
+ get: p,
446
+ configurable: !0
447
+ });
448
+ }
449
+ }
450
+ function un(n, s) {
451
+ {
452
+ var p = function() {
453
+ ut || (ut = !0, k("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", s));
454
+ };
455
+ p.isReactWarning = !0, Object.defineProperty(n, "ref", {
456
+ get: p,
457
+ configurable: !0
458
+ });
459
+ }
460
+ }
461
+ var dn = function(n, s, p, y, S, C, x) {
462
+ var v = {
463
+ // This tag allows us to uniquely identify this as a React Element
464
+ $$typeof: e,
465
+ // Built-in properties that belong on the element
466
+ type: n,
467
+ key: s,
468
+ ref: p,
469
+ props: x,
470
+ // Record the component responsible for creating this element.
471
+ _owner: C
472
+ };
473
+ return v._store = {}, Object.defineProperty(v._store, "validated", {
474
+ configurable: !1,
475
+ enumerable: !1,
476
+ writable: !0,
477
+ value: !1
478
+ }), Object.defineProperty(v, "_self", {
479
+ configurable: !1,
480
+ enumerable: !1,
481
+ writable: !1,
482
+ value: y
483
+ }), Object.defineProperty(v, "_source", {
484
+ configurable: !1,
485
+ enumerable: !1,
486
+ writable: !1,
487
+ value: S
488
+ }), Object.freeze && (Object.freeze(v.props), Object.freeze(v)), v;
489
+ };
490
+ function fn(n, s, p, y, S) {
491
+ {
492
+ var C, x = {}, v = null, N = null;
493
+ p !== void 0 && (ct(p), v = "" + p), ln(s) && (ct(s.key), v = "" + s.key), rn(s) && (N = s.ref, cn(s, S));
494
+ for (C in s)
495
+ me.call(s, C) && !an.hasOwnProperty(C) && (x[C] = s[C]);
496
+ if (n && n.defaultProps) {
497
+ var z = n.defaultProps;
498
+ for (C in z)
499
+ x[C] === void 0 && (x[C] = z[C]);
500
+ }
501
+ if (v || N) {
502
+ var B = typeof n == "function" ? n.displayName || n.name || "Unknown" : n;
503
+ v && sn(x, B), N && un(x, B);
504
+ }
505
+ return dn(n, v, N, S, y, ye.current, x);
506
+ }
507
+ }
508
+ var Ne = _.ReactCurrentOwner, dt = _.ReactDebugCurrentFrame;
509
+ function ue(n) {
510
+ if (n) {
511
+ var s = n._owner, p = Ee(n.type, n._source, s ? s.type : null);
512
+ dt.setExtraStackFrame(p);
513
+ } else
514
+ dt.setExtraStackFrame(null);
515
+ }
516
+ var De;
517
+ De = !1;
518
+ function Ue(n) {
519
+ return typeof n == "object" && n !== null && n.$$typeof === e;
520
+ }
521
+ function ft() {
522
+ {
523
+ if (Ne.current) {
524
+ var n = H(Ne.current.type);
525
+ if (n)
526
+ return `
527
+
528
+ Check the render method of \`` + n + "`.";
529
+ }
530
+ return "";
531
+ }
532
+ }
533
+ function pn(n) {
534
+ return "";
535
+ }
536
+ var pt = {};
537
+ function gn(n) {
538
+ {
539
+ var s = ft();
540
+ if (!s) {
541
+ var p = typeof n == "string" ? n : n.displayName || n.name;
542
+ p && (s = `
543
+
544
+ Check the top-level render call using <` + p + ">.");
545
+ }
546
+ return s;
547
+ }
548
+ }
549
+ function gt(n, s) {
550
+ {
551
+ if (!n._store || n._store.validated || n.key != null)
552
+ return;
553
+ n._store.validated = !0;
554
+ var p = gn(s);
555
+ if (pt[p])
556
+ return;
557
+ pt[p] = !0;
558
+ var y = "";
559
+ n && n._owner && n._owner !== Ne.current && (y = " It was passed a child from " + H(n._owner.type) + "."), ue(n), k('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', p, y), ue(null);
560
+ }
561
+ }
562
+ function ht(n, s) {
563
+ {
564
+ if (typeof n != "object")
565
+ return;
566
+ if (Ie(n))
567
+ for (var p = 0; p < n.length; p++) {
568
+ var y = n[p];
569
+ Ue(y) && gt(y, s);
570
+ }
571
+ else if (Ue(n))
572
+ n._store && (n._store.validated = !0);
573
+ else if (n) {
574
+ var S = E(n);
575
+ if (typeof S == "function" && S !== n.entries)
576
+ for (var C = S.call(n), x; !(x = C.next()).done; )
577
+ Ue(x.value) && gt(x.value, s);
578
+ }
579
+ }
580
+ }
581
+ function hn(n) {
582
+ {
583
+ var s = n.type;
584
+ if (s == null || typeof s == "string")
585
+ return;
586
+ var p;
587
+ if (typeof s == "function")
588
+ p = s.propTypes;
589
+ else if (typeof s == "object" && (s.$$typeof === c || // Note: Memo only checks outer props here.
590
+ // Inner props are checked in the reconciler.
591
+ s.$$typeof === $))
592
+ p = s.propTypes;
593
+ else
594
+ return;
595
+ if (p) {
596
+ var y = H(s);
597
+ en(p, n.props, "prop", y, n);
598
+ } else if (s.PropTypes !== void 0 && !De) {
599
+ De = !0;
600
+ var S = H(s);
601
+ k("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", S || "Unknown");
602
+ }
603
+ typeof s.getDefaultProps == "function" && !s.getDefaultProps.isReactClassApproved && k("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
604
+ }
605
+ }
606
+ function mn(n) {
607
+ {
608
+ for (var s = Object.keys(n.props), p = 0; p < s.length; p++) {
609
+ var y = s[p];
610
+ if (y !== "children" && y !== "key") {
611
+ ue(n), k("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", y), ue(null);
612
+ break;
613
+ }
614
+ }
615
+ n.ref !== null && (ue(n), k("Invalid attribute `ref` supplied to `React.Fragment`."), ue(null));
616
+ }
617
+ }
618
+ var mt = {};
619
+ function yt(n, s, p, y, S, C) {
620
+ {
621
+ var x = ze(n);
622
+ if (!x) {
623
+ var v = "";
624
+ (n === void 0 || typeof n == "object" && n !== null && Object.keys(n).length === 0) && (v += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
625
+ var N = pn();
626
+ N ? v += N : v += ft();
627
+ var z;
628
+ n === null ? z = "null" : Ie(n) ? z = "array" : n !== void 0 && n.$$typeof === e ? (z = "<" + (H(n.type) || "Unknown") + " />", v = " Did you accidentally export a JSX literal instead of a component?") : z = typeof n, k("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", z, v);
629
+ }
630
+ var B = fn(n, s, p, S, C);
631
+ if (B == null)
632
+ return B;
633
+ if (x) {
634
+ var V = s.children;
635
+ if (V !== void 0)
636
+ if (y)
637
+ if (Ie(V)) {
638
+ for (var de = 0; de < V.length; de++)
639
+ ht(V[de], n);
640
+ Object.freeze && Object.freeze(V);
641
+ } else
642
+ k("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
643
+ else
644
+ ht(V, n);
645
+ }
646
+ if (me.call(s, "key")) {
647
+ var le = H(n), D = Object.keys(s).filter(function($n) {
648
+ return $n !== "key";
649
+ }), We = D.length > 0 ? "{key: someKey, " + D.join(": ..., ") + ": ...}" : "{key: someKey}";
650
+ if (!mt[le + We]) {
651
+ var xn = D.length > 0 ? "{" + D.join(": ..., ") + ": ...}" : "{}";
652
+ k(`A props object containing a "key" prop is being spread into JSX:
653
+ let props = %s;
654
+ <%s {...props} />
655
+ React keys must be passed directly to JSX without using spread:
656
+ let props = %s;
657
+ <%s key={someKey} {...props} />`, We, le, xn, le), mt[le + We] = !0;
658
+ }
659
+ }
660
+ return n === r ? mn(B) : hn(B), B;
661
+ }
662
+ }
663
+ function yn(n, s, p) {
664
+ return yt(n, s, p, !0);
665
+ }
666
+ function wn(n, s, p) {
667
+ return yt(n, s, p, !1);
668
+ }
669
+ var bn = wn, vn = yn;
670
+ be.Fragment = r, be.jsx = bn, be.jsxs = vn;
671
+ }()), be;
672
+ }
673
+ process.env.NODE_ENV === "production" ? Ze.exports = Cn() : Ze.exports = En();
674
+ var i = Ze.exports;
675
+ const d = "https://cdn.casbin.org", I = {
676
+ casdoor: "https://casdoor",
677
+ springmicro: void 0
678
+ };
679
+ function jn() {
680
+ return "en";
681
+ }
682
+ function Z() {
683
+ return "en;q=0.9,en;q=0.8";
684
+ }
685
+ function G(t, e) {
686
+ alert(e);
687
+ }
688
+ function Ln(t) {
689
+ t !== void 0 && (window.location.href = t);
690
+ }
691
+ function Pt(t) {
692
+ return !(t.provider === void 0 || t.provider === null || !["OAuth", "SAML", "Web3"].includes(t.provider.category) || t.provider.type === "WeChatMiniProgram");
693
+ }
694
+ function Tn(t) {
695
+ return Pt(t) && t.prompted;
696
+ }
697
+ function An(t) {
698
+ return t.visible && t.prompted;
699
+ }
700
+ function Mn(t) {
701
+ var e;
702
+ return (e = t.providers) == null ? void 0 : e.filter(
703
+ (o) => Tn(o)
704
+ );
705
+ }
706
+ function zn(t) {
707
+ var e;
708
+ return (e = t.signupItems) == null ? void 0 : e.filter(
709
+ (o) => An(o)
710
+ );
711
+ }
712
+ function On(t, e) {
713
+ var r;
714
+ const o = (r = t.signupItems) == null ? void 0 : r.filter(
715
+ (a) => a.name === e
716
+ );
717
+ return (o == null ? void 0 : o.length) ?? !1 ? o[0] : null;
718
+ }
719
+ function Bn(t) {
720
+ const e = On(t, "Affiliation");
721
+ return e === null ? !1 : e.prompted;
722
+ }
723
+ function vt(t) {
724
+ return /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(t);
725
+ }
726
+ function Ae(t, e) {
727
+ return t && t.signinMethods ? t.signinMethods.filter((o) => o.name === e).length > 0 : !1;
728
+ }
729
+ function Rn(t) {
730
+ return Ae(t, "Password");
731
+ }
732
+ function Pn(t) {
733
+ return Ae(t, "Verification code");
734
+ }
735
+ function In(t) {
736
+ return Ae(t, "WebAuthn");
737
+ }
738
+ function Fn(t) {
739
+ return Ae(t, "LDAP");
740
+ }
741
+ function Nn(t) {
742
+ const e = Mn(t);
743
+ if ((e == null ? void 0 : e.length) ?? !1)
744
+ return !0;
745
+ const o = zn(t);
746
+ return (o == null ? void 0 : o.length) ?? !1 ? !0 : Bn(t);
747
+ }
748
+ function se(t) {
749
+ if (t.type === "Custom" && t.customLogo)
750
+ return t.customLogo;
751
+ if (t.category === "OAuth")
752
+ return `${d}/img/social_${t.type.toLowerCase()}.png`;
753
+ {
754
+ const e = Dn[t.category][t.type];
755
+ return e ? e.logo : "";
756
+ }
757
+ }
758
+ const Dn = {
759
+ SMS: {
760
+ "Aliyun SMS": {
761
+ logo: `${d}/img/social_aliyun.png`,
762
+ url: "https://aliyun.com/product/sms"
763
+ },
764
+ "Amazon SNS": {
765
+ logo: `${d}/img/social_aws.png`,
766
+ url: "https://aws.amazon.com/cn/sns/"
767
+ },
768
+ "Azure ACS": {
769
+ logo: `${d}/img/social_azure.png`,
770
+ url: "https://azure.microsoft.com/en-us/products/communication-services"
771
+ },
772
+ "Infobip SMS": {
773
+ logo: `${d}/img/social_infobip.png`,
774
+ url: "https://portal.infobip.com/homepage/"
775
+ },
776
+ "Tencent Cloud SMS": {
777
+ logo: `${d}/img/social_tencent_cloud.jpg`,
778
+ url: "https://cloud.tencent.com/product/sms"
779
+ },
780
+ "Baidu Cloud SMS": {
781
+ logo: `${d}/img/social_baidu_cloud.png`,
782
+ url: "https://cloud.baidu.com/product/sms.html"
783
+ },
784
+ "Volc Engine SMS": {
785
+ logo: `${d}/img/social_volc_engine.jpg`,
786
+ url: "https://www.volcengine.com/products/cloud-sms"
787
+ },
788
+ "Huawei Cloud SMS": {
789
+ logo: `${d}/img/social_huawei.png`,
790
+ url: "https://www.huaweicloud.com/product/msgsms.html"
791
+ },
792
+ "UCloud SMS": {
793
+ logo: `${d}/img/social_ucloud.png`,
794
+ url: "https://www.ucloud.cn/site/product/usms.html"
795
+ },
796
+ "Twilio SMS": {
797
+ logo: `${d}/img/social_twilio.svg`,
798
+ url: "https://www.twilio.com/messaging"
799
+ },
800
+ "SmsBao SMS": {
801
+ logo: `${d}/img/social_smsbao.png`,
802
+ url: "https://www.smsbao.com/"
803
+ },
804
+ "SUBMAIL SMS": {
805
+ logo: `${d}/img/social_submail.svg`,
806
+ url: "https://www.mysubmail.com"
807
+ },
808
+ "Msg91 SMS": {
809
+ logo: `${d}/img/social_msg91.ico`,
810
+ url: "https://control.msg91.com/app/"
811
+ },
812
+ "OSON SMS": {
813
+ logo: "https://osonsms.com/images/osonsms-logo.svg",
814
+ url: "https://osonsms.com/"
815
+ },
816
+ "Custom HTTP SMS": {
817
+ logo: `${d}/img/social_default.png`,
818
+ url: "https://casdoor.org/docs/provider/sms/overview"
819
+ },
820
+ "Mock SMS": {
821
+ logo: `${d}/img/social_default.png`,
822
+ url: ""
823
+ }
824
+ },
825
+ Email: {
826
+ Default: {
827
+ logo: `${d}/img/email_default.png`,
828
+ url: ""
829
+ },
830
+ SUBMAIL: {
831
+ logo: `${d}/img/social_submail.svg`,
832
+ url: "https://www.mysubmail.com"
833
+ },
834
+ Mailtrap: {
835
+ logo: `${d}/img/email_mailtrap.png`,
836
+ url: "https://mailtrap.io"
837
+ },
838
+ "Azure ACS": {
839
+ logo: `${d}/img/social_azure.png`,
840
+ url: "https://learn.microsoft.com/zh-cn/azure/communication-services"
841
+ },
842
+ SendGrid: {
843
+ logo: `${d}/img/email_sendgrid.png`,
844
+ url: "https://sendgrid.com/"
845
+ },
846
+ "Custom HTTP Email": {
847
+ logo: `${d}/img/social_default.png`,
848
+ url: "https://casdoor.org/docs/provider/email/overview"
849
+ }
850
+ },
851
+ Storage: {
852
+ "Local File System": {
853
+ logo: `${d}/img/social_file.png`,
854
+ url: ""
855
+ },
856
+ "AWS S3": {
857
+ logo: `${d}/img/social_aws.png`,
858
+ url: "https://aws.amazon.com/s3"
859
+ },
860
+ MinIO: {
861
+ logo: "https://min.io/resources/img/logo.svg",
862
+ url: "https://min.io/"
863
+ },
864
+ "Aliyun OSS": {
865
+ logo: `${d}/img/social_aliyun.png`,
866
+ url: "https://aliyun.com/product/oss"
867
+ },
868
+ "Tencent Cloud COS": {
869
+ logo: `${d}/img/social_tencent_cloud.jpg`,
870
+ url: "https://cloud.tencent.com/product/cos"
871
+ },
872
+ "Azure Blob": {
873
+ logo: `${d}/img/social_azure.png`,
874
+ url: "https://azure.microsoft.com/en-us/services/storage/blobs/"
875
+ },
876
+ "Qiniu Cloud Kodo": {
877
+ logo: `${d}/img/social_qiniu_cloud.png`,
878
+ url: "https://www.qiniu.com/solutions/storage"
879
+ },
880
+ "Google Cloud Storage": {
881
+ logo: `${d}/img/social_google_cloud.png`,
882
+ url: "https://cloud.google.com/storage"
883
+ },
884
+ Synology: {
885
+ logo: `${d}/img/social_synology.png`,
886
+ url: "https://www.synology.com/en-global/dsm/feature/file_sharing"
887
+ }
888
+ },
889
+ SAML: {
890
+ "Aliyun IDaaS": {
891
+ logo: `${d}/img/social_aliyun.png`,
892
+ url: "https://aliyun.com/product/idaas"
893
+ },
894
+ Keycloak: {
895
+ logo: `${d}/img/social_keycloak.png`,
896
+ url: "https://www.keycloak.org/"
897
+ },
898
+ Custom: {
899
+ logo: `${d}/img/social_custom.png`,
900
+ url: "https://door.casdoor.com/"
901
+ }
902
+ },
903
+ Payment: {
904
+ Dummy: {
905
+ logo: `${d}/img/payment_paypal.png`,
906
+ url: ""
907
+ },
908
+ Alipay: {
909
+ logo: `${d}/img/payment_alipay.png`,
910
+ url: "https://www.alipay.com/"
911
+ },
912
+ "WeChat Pay": {
913
+ logo: `${d}/img/payment_wechat_pay.png`,
914
+ url: "https://pay.weixin.qq.com/"
915
+ },
916
+ PayPal: {
917
+ logo: `${d}/img/payment_paypal.png`,
918
+ url: "https://www.paypal.com/"
919
+ },
920
+ Stripe: {
921
+ logo: `${d}/img/social_stripe.png`,
922
+ url: "https://stripe.com/"
923
+ },
924
+ GC: {
925
+ logo: `${d}/img/payment_gc.png`,
926
+ url: "https://gc.org"
927
+ }
928
+ },
929
+ Captcha: {
930
+ Default: {
931
+ logo: `${d}/img/captcha_default.png`,
932
+ url: "https://pkg.go.dev/github.com/dchest/captcha"
933
+ },
934
+ reCAPTCHA: {
935
+ logo: `${d}/img/social_recaptcha.png`,
936
+ url: "https://www.google.com/recaptcha"
937
+ },
938
+ hCaptcha: {
939
+ logo: `${d}/img/social_hcaptcha.png`,
940
+ url: "https://www.hcaptcha.com"
941
+ },
942
+ "Aliyun Captcha": {
943
+ logo: `${d}/img/social_aliyun.png`,
944
+ url: "https://help.aliyun.com/product/28308.html"
945
+ },
946
+ GEETEST: {
947
+ logo: `${d}/img/social_geetest.png`,
948
+ url: "https://www.geetest.com"
949
+ },
950
+ "Cloudflare Turnstile": {
951
+ logo: `${d}/img/social_cloudflare.png`,
952
+ url: "https://www.cloudflare.com/products/turnstile/"
953
+ }
954
+ },
955
+ AI: {
956
+ "OpenAI API - GPT": {
957
+ logo: `${d}/img/social_openai.svg`,
958
+ url: "https://platform.openai.com"
959
+ }
960
+ },
961
+ Web3: {
962
+ MetaMask: {
963
+ logo: `${d}/img/social_metamask.svg`,
964
+ url: "https://metamask.io/"
965
+ },
966
+ Web3Onboard: {
967
+ logo: `${d}/img/social_web3onboard.svg`,
968
+ url: "https://onboard.blocknative.com/"
969
+ }
970
+ },
971
+ Notification: {
972
+ Telegram: {
973
+ logo: `${d}/img/social_telegram.png`,
974
+ url: "https://telegram.org/"
975
+ },
976
+ "Custom HTTP": {
977
+ logo: `${d}/img/email_default.png`,
978
+ url: "https://casdoor.org/docs/provider/notification/overview"
979
+ },
980
+ DingTalk: {
981
+ logo: `${d}/img/social_dingtalk.png`,
982
+ url: "https://www.dingtalk.com/"
983
+ },
984
+ Lark: {
985
+ logo: `${d}/img/social_lark.png`,
986
+ url: "https://www.larksuite.com/"
987
+ },
988
+ "Microsoft Teams": {
989
+ logo: `${d}/img/social_teams.png`,
990
+ url: "https://www.microsoft.com/microsoft-teams"
991
+ },
992
+ Bark: {
993
+ logo: `${d}/img/social_bark.png`,
994
+ url: "https://apps.apple.com/us/app/bark-customed-notifications/id1403753865"
995
+ },
996
+ Pushover: {
997
+ logo: `${d}/img/social_pushover.png`,
998
+ url: "https://pushover.net/"
999
+ },
1000
+ Pushbullet: {
1001
+ logo: `${d}/img/social_pushbullet.png`,
1002
+ url: "https://www.pushbullet.com/"
1003
+ },
1004
+ Slack: {
1005
+ logo: `${d}/img/social_slack.png`,
1006
+ url: "https://slack.com/"
1007
+ },
1008
+ Webpush: {
1009
+ logo: `${d}/img/email_default.png`,
1010
+ url: "https://developer.mozilla.org/en-US/docs/Web/API/Push_API"
1011
+ },
1012
+ Discord: {
1013
+ logo: `${d}/img/social_discord.png`,
1014
+ url: "https://discord.com/"
1015
+ },
1016
+ "Google Chat": {
1017
+ logo: `${d}/img/social_google_chat.png`,
1018
+ url: "https://workspace.google.com/intl/en/products/chat/"
1019
+ },
1020
+ Line: {
1021
+ logo: `${d}/img/social_line.png`,
1022
+ url: "https://line.me/"
1023
+ },
1024
+ Matrix: {
1025
+ logo: `${d}/img/social_matrix.png`,
1026
+ url: "https://www.matrix.org/"
1027
+ },
1028
+ Twitter: {
1029
+ logo: `${d}/img/social_twitter.png`,
1030
+ url: "https://twitter.com/"
1031
+ },
1032
+ Reddit: {
1033
+ logo: `${d}/img/social_reddit.png`,
1034
+ url: "https://www.reddit.com/"
1035
+ },
1036
+ "Rocket Chat": {
1037
+ logo: `${d}/img/social_rocket_chat.png`,
1038
+ url: "https://rocket.chat/"
1039
+ },
1040
+ Viber: {
1041
+ logo: `${d}/img/social_viber.png`,
1042
+ url: "https://www.viber.com/"
1043
+ }
1044
+ }
1045
+ };
1046
+ function Un(t = "") {
1047
+ return fetch(`${I.casdoor}/api/get-account${t}`, {
1048
+ method: "GET",
1049
+ credentials: "include",
1050
+ headers: {
1051
+ "Accept-Language": Z()
1052
+ }
1053
+ }).then((e) => e.json());
1054
+ }
1055
+ function Wn(t) {
1056
+ let e = `${I.casdoor}/api/signup`;
1057
+ return I.springmicro && (e = `${I.springmicro}/api/accounts/users/register`), fetch(e, {
1058
+ method: "POST",
1059
+ credentials: "include",
1060
+ body: JSON.stringify(t),
1061
+ headers: {
1062
+ "Accept-Language": Z(),
1063
+ "Content-Type": "application/json"
1064
+ }
1065
+ }).then((o) => o.json());
1066
+ }
1067
+ function Hn(t) {
1068
+ return `?type=${t == null ? void 0 : t.type}&id=${t == null ? void 0 : t.id}&redirectUri=${t == null ? void 0 : t.service}`;
1069
+ }
1070
+ function Vn(t) {
1071
+ return t == null ? "" : `?clientId=${t.clientId}&responseType=${t.responseType}&redirectUri=${encodeURIComponent(t.redirectUri)}&type=${t.type}&scope=${t.scope}&state=${t.state}&nonce=${t.nonce}&code_challenge_method=${t.challengeMethod}&code_challenge=${t.codeChallenge}`;
1072
+ }
1073
+ function It(t) {
1074
+ const e = (t == null ? void 0 : t.type) === "cas" ? Hn(t) : Vn(t);
1075
+ return fetch(`${I.casdoor}/api/get-app-login${e}`, {
1076
+ method: "GET",
1077
+ credentials: "include",
1078
+ headers: {
1079
+ "Accept-Language": Z()
1080
+ }
1081
+ }).then((o) => o.json());
1082
+ }
1083
+ function Gn(t, e) {
1084
+ return fetch(
1085
+ `${I.casdoor}/api/get-saml-login?id=${t}&relayState=${e}`,
1086
+ {
1087
+ method: "GET",
1088
+ credentials: "include",
1089
+ headers: {
1090
+ "Accept-Language": Z()
1091
+ }
1092
+ }
1093
+ ).then((o) => o.json());
1094
+ }
1095
+ function qn(t) {
1096
+ return fetch(`${I.casdoor}/api/get-webhook-event?ticket=${t}`, {
1097
+ method: "GET",
1098
+ credentials: "include",
1099
+ headers: {
1100
+ "Accept-Language": Z()
1101
+ }
1102
+ }).then((e) => e.json());
1103
+ }
1104
+ function Yn(t) {
1105
+ return fetch(`${I.casdoor}/api/get-qrcode?id=${t}`, {
1106
+ method: "GET",
1107
+ credentials: "include",
1108
+ headers: {
1109
+ "Accept-Language": Z()
1110
+ }
1111
+ }).then((e) => e.json());
1112
+ }
1113
+ function Xe(t, e) {
1114
+ return fetch(
1115
+ `${I.casdoor}/api/get-application?id=${t}/${encodeURIComponent(
1116
+ e
1117
+ )}`,
1118
+ {
1119
+ method: "GET",
1120
+ credentials: "include",
1121
+ headers: {
1122
+ "Accept-Language": Z()
1123
+ }
1124
+ }
1125
+ ).then((o) => o.json());
1126
+ }
1127
+ const ce = {
1128
+ Google: {
1129
+ scope: "profile+email",
1130
+ endpoint: "https://accounts.google.com/signin/oauth"
1131
+ },
1132
+ GitHub: {
1133
+ scope: "user:email+read:user",
1134
+ endpoint: "https://github.com/login/oauth/authorize"
1135
+ },
1136
+ QQ: {
1137
+ scope: "get_user_info",
1138
+ endpoint: "https://graph.qq.com/oauth2.0/authorize"
1139
+ },
1140
+ WeChat: {
1141
+ scope: "snsapi_login",
1142
+ endpoint: "https://open.weixin.qq.com/connect/qrconnect",
1143
+ mpScope: "snsapi_userinfo",
1144
+ mpEndpoint: "https://open.weixin.qq.com/connect/oauth2/authorize"
1145
+ },
1146
+ WeChatMiniProgram: {
1147
+ endpoint: "https://mp.weixin.qq.com/"
1148
+ },
1149
+ Facebook: {
1150
+ scope: "email,public_profile",
1151
+ endpoint: "https://www.facebook.com/dialog/oauth"
1152
+ },
1153
+ DingTalk: {
1154
+ scope: "openid",
1155
+ endpoint: "https://login.dingtalk.com/oauth2/auth"
1156
+ },
1157
+ Weibo: {
1158
+ scope: "email",
1159
+ endpoint: "https://api.weibo.com/oauth2/authorize"
1160
+ },
1161
+ Gitee: {
1162
+ scope: "user_info%20emails",
1163
+ endpoint: "https://gitee.com/oauth/authorize"
1164
+ },
1165
+ LinkedIn: {
1166
+ scope: "r_liteprofile%20r_emailaddress",
1167
+ endpoint: "https://www.linkedin.com/oauth/v2/authorization"
1168
+ },
1169
+ WeCom: {
1170
+ scope: "snsapi_userinfo",
1171
+ endpoint: "https://open.work.weixin.qq.com/wwopen/sso/3rd_qrConnect",
1172
+ silentEndpoint: "https://open.weixin.qq.com/connect/oauth2/authorize",
1173
+ internalEndpoint: "https://open.work.weixin.qq.com/wwopen/sso/qrConnect"
1174
+ },
1175
+ Lark: {
1176
+ // scope: "email",
1177
+ endpoint: "https://open.feishu.cn/open-apis/authen/v1/index"
1178
+ },
1179
+ GitLab: {
1180
+ scope: "read_user+profile",
1181
+ endpoint: "https://gitlab.com/oauth/authorize"
1182
+ },
1183
+ ADFS: {
1184
+ scope: "openid",
1185
+ endpoint: "http://example.com"
1186
+ },
1187
+ Baidu: {
1188
+ scope: "basic",
1189
+ endpoint: "http://openapi.baidu.com/oauth/2.0/authorize"
1190
+ },
1191
+ Alipay: {
1192
+ scope: "basic",
1193
+ endpoint: "https://openauth.alipay.com/oauth2/publicAppAuthorize.htm"
1194
+ },
1195
+ Casdoor: {
1196
+ scope: "openid%20profile%20email",
1197
+ endpoint: "http://example.com"
1198
+ },
1199
+ Infoflow: {
1200
+ endpoint: "https://xpc.im.baidu.com/oauth2/authorize"
1201
+ },
1202
+ Apple: {
1203
+ scope: "name%20email",
1204
+ endpoint: "https://appleid.apple.com/auth/authorize"
1205
+ },
1206
+ AzureAD: {
1207
+ scope: "user.read",
1208
+ endpoint: "https://login.microsoftonline.com/common/oauth2/v2.0/authorize"
1209
+ },
1210
+ AzureADB2C: {
1211
+ scope: "openid",
1212
+ endpoint: "https://tenant.b2clogin.com/tenant.onmicrosoft.com/userflow/oauth2/v2.0/authorize"
1213
+ },
1214
+ Slack: {
1215
+ scope: "users:read",
1216
+ endpoint: "https://slack.com/oauth/authorize"
1217
+ },
1218
+ Steam: {
1219
+ endpoint: "https://steamcommunity.com/openid/login"
1220
+ },
1221
+ Okta: {
1222
+ scope: "openid%20profile%20email",
1223
+ endpoint: "http://example.com"
1224
+ },
1225
+ Douyin: {
1226
+ scope: "user_info",
1227
+ endpoint: "https://open.douyin.com/platform/oauth/connect"
1228
+ },
1229
+ Custom: {
1230
+ endpoint: "https://example.com/"
1231
+ },
1232
+ Bilibili: {
1233
+ endpoint: "https://passport.bilibili.com/register/pc_oauth2.html"
1234
+ },
1235
+ Line: {
1236
+ scope: "profile%20openid%20email",
1237
+ endpoint: "https://access.line.me/oauth2/v2.1/authorize"
1238
+ },
1239
+ Amazon: {
1240
+ scope: "profile",
1241
+ endpoint: "https://www.amazon.com/ap/oa"
1242
+ },
1243
+ Auth0: {
1244
+ scope: "openid%20profile%20email",
1245
+ endpoint: "http://auth0.com/authorize"
1246
+ },
1247
+ BattleNet: {
1248
+ scope: "openid",
1249
+ endpoint: "https://oauth.battlenet.com.cn/authorize"
1250
+ },
1251
+ Bitbucket: {
1252
+ scope: "account",
1253
+ endpoint: "https://bitbucket.org/site/oauth2/authorize"
1254
+ },
1255
+ Box: {
1256
+ scope: "root_readwrite",
1257
+ endpoint: "https://account.box.com/api/oauth2/authorize"
1258
+ },
1259
+ CloudFoundry: {
1260
+ scope: "cloud_controller.read",
1261
+ endpoint: "https://login.cloudfoundry.org/oauth/authorize"
1262
+ },
1263
+ Dailymotion: {
1264
+ scope: "userinfo",
1265
+ endpoint: "https://api.dailymotion.com/oauth/authorize"
1266
+ },
1267
+ Deezer: {
1268
+ scope: "basic_access",
1269
+ endpoint: "https://connect.deezer.com/oauth/auth.php"
1270
+ },
1271
+ DigitalOcean: {
1272
+ scope: "read",
1273
+ endpoint: "https://cloud.digitalocean.com/v1/oauth/authorize"
1274
+ },
1275
+ Discord: {
1276
+ scope: "identify%20email",
1277
+ endpoint: "https://discord.com/api/oauth2/authorize"
1278
+ },
1279
+ Dropbox: {
1280
+ scope: "account_info.read",
1281
+ endpoint: "https://www.dropbox.com/oauth2/authorize"
1282
+ },
1283
+ EveOnline: {
1284
+ scope: "publicData",
1285
+ endpoint: "https://login.eveonline.com/oauth/authorize"
1286
+ },
1287
+ Fitbit: {
1288
+ scope: "activity%20heartrate%20location%20nutrition%20profile%20settings%20sleep%20social%20weight",
1289
+ endpoint: "https://www.fitbit.com/oauth2/authorize"
1290
+ },
1291
+ Gitea: {
1292
+ scope: "user:email",
1293
+ endpoint: "https://gitea.com/login/oauth/authorize"
1294
+ },
1295
+ Heroku: {
1296
+ scope: "global",
1297
+ endpoint: "https://id.heroku.com/oauth/authorize"
1298
+ },
1299
+ InfluxCloud: {
1300
+ scope: "read:org",
1301
+ endpoint: "https://cloud2.influxdata.com/oauth/authorize"
1302
+ },
1303
+ Instagram: {
1304
+ scope: "user_profile",
1305
+ endpoint: "https://api.instagram.com/oauth/authorize"
1306
+ },
1307
+ Intercom: {
1308
+ scope: "user.read",
1309
+ endpoint: "https://app.intercom.com/oauth"
1310
+ },
1311
+ Kakao: {
1312
+ scope: "account_email",
1313
+ endpoint: "https://kauth.kakao.com/oauth/authorize"
1314
+ },
1315
+ Lastfm: {
1316
+ scope: "user_read",
1317
+ endpoint: "https://www.last.fm/api/auth"
1318
+ },
1319
+ Mailru: {
1320
+ scope: "userinfo",
1321
+ endpoint: "https://oauth.mail.ru/login"
1322
+ },
1323
+ Meetup: {
1324
+ scope: "basic",
1325
+ endpoint: "https://secure.meetup.com/oauth2/authorize"
1326
+ },
1327
+ MicrosoftOnline: {
1328
+ scope: "openid%20profile%20email",
1329
+ endpoint: "https://login.microsoftonline.com/common/oauth2/v2.0/authorize"
1330
+ },
1331
+ Naver: {
1332
+ scope: "profile",
1333
+ endpoint: "https://nid.naver.com/oauth2.0/authorize"
1334
+ },
1335
+ Nextcloud: {
1336
+ scope: "openid%20profile%20email",
1337
+ endpoint: "https://cloud.example.org/apps/oauth2/authorize"
1338
+ },
1339
+ OneDrive: {
1340
+ scope: "offline_access%20onedrive.readonly",
1341
+ endpoint: "https://login.live.com/oauth20_authorize.srf"
1342
+ },
1343
+ Oura: {
1344
+ scope: "personal",
1345
+ endpoint: "https://cloud.ouraring.com/oauth/authorize"
1346
+ },
1347
+ Patreon: {
1348
+ scope: "identity",
1349
+ endpoint: "https://www.patreon.com/oauth2/authorize"
1350
+ },
1351
+ PayPal: {
1352
+ scope: "openid%20profile%20email",
1353
+ endpoint: "https://www.sandbox.paypal.com/connect"
1354
+ },
1355
+ SalesForce: {
1356
+ scope: "openid%20profile%20email",
1357
+ endpoint: "https://login.salesforce.com/services/oauth2/authorize"
1358
+ },
1359
+ Shopify: {
1360
+ scope: "read_products",
1361
+ endpoint: "https://myshopify.com/admin/oauth/authorize"
1362
+ },
1363
+ Soundcloud: {
1364
+ scope: "non-expiring",
1365
+ endpoint: "https://api.soundcloud.com/connect"
1366
+ },
1367
+ Spotify: {
1368
+ scope: "user-read-email",
1369
+ endpoint: "https://accounts.spotify.com/authorize"
1370
+ },
1371
+ Strava: {
1372
+ scope: "read",
1373
+ endpoint: "https://www.strava.com/oauth/authorize"
1374
+ },
1375
+ Stripe: {
1376
+ scope: "read_only",
1377
+ endpoint: "https://connect.stripe.com/oauth/authorize"
1378
+ },
1379
+ TikTok: {
1380
+ scope: "user.info.basic",
1381
+ endpoint: "https://www.tiktok.com/auth/authorize/"
1382
+ },
1383
+ Tumblr: {
1384
+ scope: "email",
1385
+ endpoint: "https://www.tumblr.com/oauth2/authorize"
1386
+ },
1387
+ Twitch: {
1388
+ scope: "user_read",
1389
+ endpoint: "https://id.twitch.tv/oauth2/authorize"
1390
+ },
1391
+ Twitter: {
1392
+ scope: "users.read%20tweet.read",
1393
+ endpoint: "https://twitter.com/i/oauth2/authorize"
1394
+ },
1395
+ Typetalk: {
1396
+ scope: "my",
1397
+ endpoint: "https://typetalk.com/oauth2/authorize"
1398
+ },
1399
+ Uber: {
1400
+ scope: "profile",
1401
+ endpoint: "https://login.uber.com/oauth/v2/authorize"
1402
+ },
1403
+ VK: {
1404
+ scope: "email",
1405
+ endpoint: "https://oauth.vk.com/authorize"
1406
+ },
1407
+ Wepay: {
1408
+ scope: "manage_accounts%20view_user",
1409
+ endpoint: "https://www.wepay.com/v2/oauth2/authorize"
1410
+ },
1411
+ Xero: {
1412
+ scope: "openid%20profile%20email",
1413
+ endpoint: "https://login.xero.com/identity/connect/authorize"
1414
+ },
1415
+ Yahoo: {
1416
+ scope: "openid%20profile%20email",
1417
+ endpoint: "https://api.login.yahoo.com/oauth2/request_auth"
1418
+ },
1419
+ Yammer: {
1420
+ scope: "user",
1421
+ endpoint: "https://www.yammer.com/oauth2/authorize"
1422
+ },
1423
+ Yandex: {
1424
+ scope: "login:email",
1425
+ endpoint: "https://oauth.yandex.com/authorize"
1426
+ },
1427
+ Zoom: {
1428
+ scope: "user:read",
1429
+ endpoint: "https://zoom.us/oauth/authorize"
1430
+ },
1431
+ MetaMask: {
1432
+ scope: "",
1433
+ endpoint: ""
1434
+ },
1435
+ Web3Onboard: {
1436
+ scope: "",
1437
+ endpoint: ""
1438
+ }
1439
+ };
1440
+ function Kn(t, e, o, r) {
1441
+ if (t === null || e === null)
1442
+ return "";
1443
+ let a = ce[e.type].endpoint, l = `${window.location.origin}/callback`;
1444
+ const u = ce[e.type].scope, g = e.type === "WeChat" && navigator.userAgent.includes("MicroMessenger") || e.type === "Twitter", c = Jn(
1445
+ t.name,
1446
+ e.name,
1447
+ o,
1448
+ g
1449
+ ), f = "P3S-a7dr8bgM4bF6vOyiKkKETDl16rcAzao9F8UIL1Y";
1450
+ if (e.type === "AzureAD" ? e.domain !== "" && (a = a.replace("common", e.domain)) : e.type === "Apple" && (l = `${window.location.origin}/api/callback`), e.type === "Google" || e.type === "GitHub" || e.type === "QQ" || e.type === "Facebook" || e.type === "Weibo" || e.type === "Gitee" || e.type === "LinkedIn" || e.type === "GitLab" || e.type === "AzureAD" || e.type === "Slack" || e.type === "Line" || e.type === "Amazon" || e.type === "Auth0" || e.type === "BattleNet" || e.type === "Bitbucket" || e.type === "Box" || e.type === "CloudFoundry" || e.type === "Dailymotion" || e.type === "DigitalOcean" || e.type === "Discord" || e.type === "Dropbox" || e.type === "EveOnline" || e.type === "Gitea" || e.type === "Heroku" || e.type === "InfluxCloud" || e.type === "Instagram" || e.type === "Intercom" || e.type === "Kakao" || e.type === "MailRu" || e.type === "Meetup" || e.type === "MicrosoftOnline" || e.type === "Naver" || e.type === "Nextcloud" || e.type === "OneDrive" || e.type === "Oura" || e.type === "Patreon" || e.type === "PayPal" || e.type === "SalesForce" || e.type === "SoundCloud" || e.type === "Spotify" || e.type === "Strava" || e.type === "Stripe" || e.type === "Tumblr" || e.type === "Twitch" || e.type === "Typetalk" || e.type === "Uber" || e.type === "VK" || e.type === "Wepay" || e.type === "Xero" || e.type === "Yahoo" || e.type === "Yammer" || e.type === "Yandex" || e.type === "Zoom")
1451
+ return `${a}?client_id=${e.clientId}&redirect_uri=${l}&scope=${u}&response_type=code&state=${c}`;
1452
+ if (e.type === "AzureADB2C")
1453
+ return `https://${e.domain}.b2clogin.com/${e.domain}.onmicrosoft.com/${e.appId}/oauth2/v2.0/authorize?client_id=${e.clientId}&nonce=defaultNonce&redirect_uri=${encodeURIComponent(
1454
+ l
1455
+ )}&scope=${u}&response_type=code&state=${c}&prompt=login`;
1456
+ if (e.type === "DingTalk")
1457
+ return `${a}?client_id=${e.clientId}&redirect_uri=${l}&scope=${u}&response_type=code&prompt=consent&state=${c}`;
1458
+ if (e.type === "WeChat")
1459
+ return navigator.userAgent.includes("MicroMessenger") ? `${ce[e.type].mpEndpoint}?appid=${e.clientId2}&redirect_uri=${l}&state=${c}&scope=${ce[e.type].mpScope}&response_type=code#wechat_redirect` : e.clientId2 && (e != null && e.disableSsl) && (e == null ? void 0 : e.signName) === "media" ? `${window.location.origin}/callback?state=${c}&code=${"wechat_oa:" + r}` : `${a}?appid=${e.clientId}&redirect_uri=${l}&scope=${u}&response_type=code&state=${c}#wechat_redirect`;
1460
+ if (e.type === "WeCom")
1461
+ return e.subType === "Internal" ? e.method === "Silent" ? (a = ce[e.type].silentEndpoint, `${a}?appid=${e.clientId}&redirect_uri=${l}&state=${c}&scope=${u}&response_type=code#wechat_redirect`) : e.method === "Normal" ? (a = ce[e.type].internalEndpoint, `${a}?appid=${e.clientId}&agentid=${e.appId}&redirect_uri=${l}&state=${c}&usertype=member`) : `https://error:not-supported-provider-method:${e.method}` : e.subType === "Third-party" ? e.method === "Silent" ? (a = ce[e.type].silentEndpoint, `${a}?appid=${e.clientId}&redirect_uri=${l}&state=${c}&scope=${u}&response_type=code#wechat_redirect`) : e.method === "Normal" ? `${a}?appid=${e.clientId}&redirect_uri=${l}&state=${c}&usertype=member` : `https://error:not-supported-provider-method:${e.method}` : `https://error:not-supported-provider-sub-type:${e.subType}`;
1462
+ if (e.type === "Lark")
1463
+ return `${a}?app_id=${e.clientId}&redirect_uri=${l}&state=${c}`;
1464
+ if (e.type === "ADFS")
1465
+ return `${e.domain}/adfs/oauth2/authorize?client_id=${e.clientId}&redirect_uri=${l}&state=${c}&response_type=code&nonce=casdoor&scope=openid`;
1466
+ if (e.type === "Baidu")
1467
+ return `${a}?client_id=${e.clientId}&redirect_uri=${l}&state=${c}&response_type=code&scope=${u}&display=popup`;
1468
+ if (e.type === "Alipay")
1469
+ return `${a}?app_id=${e.clientId}&scope=auth_user&redirect_uri=${l}&state=${c}&response_type=code&scope=${u}&display=popup`;
1470
+ if (e.type === "Casdoor")
1471
+ return `${e.domain}/login/oauth/authorize?client_id=${e.clientId}&redirect_uri=${l}&state=${c}&response_type=code&scope=${u}`;
1472
+ if (e.type === "Infoflow")
1473
+ return `${a}?appid=${e.clientId}&redirect_uri=${l}?state=${c}`;
1474
+ if (e.type === "Apple")
1475
+ return `${a}?client_id=${e.clientId}&redirect_uri=${l}&state=${c}&response_type=code%20id_token&scope=${u}&response_mode=form_post`;
1476
+ if (e.type === "Steam")
1477
+ return `${a}?openid.claimed_id=http://specs.openid.net/auth/2.0/identifier_select&openid.identity=http://specs.openid.net/auth/2.0/identifier_select&openid.mode=checkid_setup&openid.ns=http://specs.openid.net/auth/2.0&openid.realm=${window.location.origin}&openid.return_to=${l}?state=${c}`;
1478
+ if (e.type === "Okta")
1479
+ return `${e.domain}/v1/authorize?client_id=${e.clientId}&redirect_uri=${l}&state=${c}&response_type=code&scope=${u}`;
1480
+ if (e.type === "Douyin" || e.type === "TikTok")
1481
+ return `${a}?client_key=${e.clientId}&redirect_uri=${l}&state=${c}&response_type=code&scope=${u}`;
1482
+ if (e.type === "Custom")
1483
+ return `${e.customAuthUrl}?client_id=${e.clientId}&redirect_uri=${l}&scope=${e.scopes}&response_type=code&state=${c}`;
1484
+ if (e.type === "Bilibili")
1485
+ return `${a}#/?client_id=${e.clientId}&return_url=${l}&state=${c}&response_type=code`;
1486
+ if (e.type === "Deezer")
1487
+ return `${a}?app_id=${e.clientId}&redirect_uri=${l}&perms=${u}`;
1488
+ if (e.type === "Lastfm")
1489
+ return `${a}?api_key=${e.clientId}&cb=${l}`;
1490
+ if (e.type === "Shopify")
1491
+ return `${a}?client_id=${e.clientId}&redirect_uri=${l}&scope=${u}&state=${c}&grant_options[]=per-user`;
1492
+ if (e.type === "Twitter" || e.type === "Fitbit")
1493
+ return `${a}?client_id=${e.clientId}&redirect_uri=${l}&state=${c}&response_type=code&scope=${u}&code_challenge=${f}&code_challenge_method=S256`;
1494
+ if (e.type === "MetaMask")
1495
+ return `${l}?state=${c}`;
1496
+ if (e.type === "Web3Onboard")
1497
+ return `${l}?state=${c}`;
1498
+ }
1499
+ function K(t) {
1500
+ return t ?? "";
1501
+ }
1502
+ function He(t) {
1503
+ const o = window.location.href.split(`${t}=`)[1];
1504
+ if (!o)
1505
+ return "";
1506
+ let r = o.split("&")[0];
1507
+ return r ? (r = decodeURIComponent(r), r) : "";
1508
+ }
1509
+ function Ft(t) {
1510
+ const e = new URLSearchParams(window.location.search), o = K(e.get("client_id")), r = K(e.get("response_type"));
1511
+ let a = He("redirect_uri");
1512
+ a === "" && (a = K(e.get("redirect_uri")));
1513
+ let l = K(e.get("scope"));
1514
+ a.includes("#") && l === "" && (l = He("scope"));
1515
+ let u = K(e.get("state"));
1516
+ u.startsWith("/auth/oauth2/login.php?wantsurl=") && (u = encodeURIComponent(u)), a.includes("#") && u === "" && (u = He("state"));
1517
+ const g = K(e.get("nonce")), c = K(e.get("code_challenge_method")), f = K(e.get("code_challenge")), h = K(e.get("SAMLRequest")), $ = K(e.get("RelayState")), w = K(e.get("noRedirect"));
1518
+ return o === "" && h === "" ? null : {
1519
+ clientId: o,
1520
+ responseType: r,
1521
+ redirectUri: a,
1522
+ scope: l,
1523
+ state: u,
1524
+ nonce: g,
1525
+ challengeMethod: c,
1526
+ codeChallenge: f,
1527
+ samlRequest: h,
1528
+ relayState: $,
1529
+ noRedirect: w,
1530
+ type: "code"
1531
+ };
1532
+ }
1533
+ function Jn(t, e, o, r) {
1534
+ let a = window.location.search;
1535
+ if (a = `${a}&application=${encodeURIComponent(
1536
+ t
1537
+ )}&provider=${encodeURIComponent(e)}&method=${o}`, o === "link" && (a = `${a}&from=${window.location.pathname}`), r) {
1538
+ const l = e;
1539
+ return sessionStorage.setItem(l, a), l;
1540
+ } else
1541
+ return btoa(a);
1542
+ }
1543
+ function Qn(t, e, o, r) {
1544
+ qn(o).then((a) => {
1545
+ if (a.data === "SCAN" || a.data === "subscribe") {
1546
+ const l = a == null ? void 0 : a.data2;
1547
+ Ln(
1548
+ Kn(t, e, r ?? "signup", l)
1549
+ );
1550
+ }
1551
+ });
1552
+ }
1553
+ async function Zn(t, e, o) {
1554
+ document.addEventListener("click", function(a) {
1555
+ const l = document.getElementById("WechatOfficialAccountModal");
1556
+ l && a.target === l && l.close();
1557
+ });
1558
+ function r(a, l) {
1559
+ function u() {
1560
+ const h = document.getElementById("WechatOfficialAccountModal");
1561
+ h && h.showModal();
1562
+ }
1563
+ function g() {
1564
+ window.clearInterval(l);
1565
+ const h = document.getElementById("WechatOfficialAccountModal");
1566
+ h && h.close();
1567
+ }
1568
+ window.closeDialog = g;
1569
+ const c = `
1570
+ <div style="margin-right: 34px;">
1571
+ <img src="data:image/png;base64,${a.data}" alt="Wechat QR code" style="width: 100%;" />
1572
+ </div>
1573
+ <button onclick="window.closeDialog()">Close</button>
1574
+ `, f = document.createElement("dialog");
1575
+ f.innerHTML = c, f.id = "WechatOfficialAccountModal", document.body.appendChild(f), u();
1576
+ }
1577
+ Yn(`${e.owner}/${e.name}`).then(
1578
+ async (a) => {
1579
+ if (a.status !== "ok") {
1580
+ G("error", a == null ? void 0 : a.msg);
1581
+ return;
1582
+ }
1583
+ const l = setInterval(
1584
+ await Qn,
1585
+ 1e3,
1586
+ t,
1587
+ e,
1588
+ a.data2,
1589
+ o
1590
+ );
1591
+ r(a, l);
1592
+ }
1593
+ );
1594
+ }
1595
+ function Nt(t, e) {
1596
+ return fetch(
1597
+ `${I.casdoor}/api/get-invitation-info?code=${t}&applicationId=${encodeURIComponent(
1598
+ e
1599
+ )}`,
1600
+ {
1601
+ method: "GET",
1602
+ credentials: "include",
1603
+ headers: {
1604
+ "Accept-Language": Z()
1605
+ }
1606
+ }
1607
+ ).then((o) => o.json());
1608
+ }
1609
+ function Dt(t, e, o, r, a = "", l, u, g, c = "") {
1610
+ const f = new FormData();
1611
+ return f.append("captchaType", t), f.append("captchaToken", e), f.append("clientSecret", o), f.append("method", r), f.append("countryCode", a), f.append("dest", l), f.append("type", u), f.append("applicationId", "admin/" + g), f.append("checkUser", c), console.log(Object.fromEntries(f.entries())), fetch(`${I.casdoor}/api/send-verification-code`, {
1612
+ method: "POST",
1613
+ credentials: "include",
1614
+ body: f,
1615
+ headers: {
1616
+ "Accept-Language": Z()
1617
+ }
1618
+ }).then((h) => h.json()).then((h) => h.status === "ok" ? (G("success", "Verification code sent"), !0) : (G("error", h.msg), !1));
1619
+ }
1620
+ function Ut(t, e, o) {
1621
+ return fetch(
1622
+ `${I.casdoor}/api/get-captcha?applicationId=${t}/${encodeURIComponent(
1623
+ e
1624
+ )}&isCurrentProvider=${o}`,
1625
+ {
1626
+ method: "GET",
1627
+ headers: {
1628
+ "Accept-Language": Z()
1629
+ }
1630
+ }
1631
+ ).then((r) => r.json()).then((r) => r.data);
1632
+ }
1633
+ const Xn = (t) => {
1634
+ const {
1635
+ captchaType: e,
1636
+ subType: o,
1637
+ siteKey: r,
1638
+ clientSecret: a,
1639
+ clientId2: l,
1640
+ clientSecret2: u,
1641
+ onChange: g
1642
+ } = t, c = (f) => {
1643
+ const h = document.createElement("script");
1644
+ h.async = !1, h.src = f, document.getElementsByTagName("body")[0].appendChild(h);
1645
+ };
1646
+ return Rt(() => {
1647
+ switch (e) {
1648
+ case "reCAPTCHA": {
1649
+ const f = setInterval(() => {
1650
+ window.grecaptcha || c("https://recaptcha.net/recaptcha/api.js"), window.grecaptcha && window.grecaptcha.render && (window.grecaptcha.render("captcha", {
1651
+ sitekey: r,
1652
+ callback: g
1653
+ }), clearInterval(f));
1654
+ }, 300);
1655
+ break;
1656
+ }
1657
+ case "hCaptcha": {
1658
+ const f = setInterval(() => {
1659
+ window.hcaptcha || c("https://js.hcaptcha.com/1/api.js"), window.hcaptcha && window.hcaptcha.render && (window.hcaptcha.render("captcha", {
1660
+ sitekey: r,
1661
+ callback: g
1662
+ }), clearInterval(f));
1663
+ }, 300);
1664
+ break;
1665
+ }
1666
+ case "Aliyun Captcha": {
1667
+ const f = setInterval(() => {
1668
+ window.AWSC || c("https://g.alicdn.com/AWSC/AWSC/awsc.js"), window.AWSC && (u && u !== "***" && window.AWSC.use(o, function(h, $) {
1669
+ $.init({
1670
+ appkey: u,
1671
+ scene: l,
1672
+ renderTo: "captcha",
1673
+ success: function(w) {
1674
+ g(
1675
+ `SessionId=${w.sessionId}&AccessKeyId=${r}&Scene=${l}&AppKey=${u}&Token=${w.token}&Sig=${w.sig}&RemoteIp=192.168.0.1`
1676
+ );
1677
+ }
1678
+ });
1679
+ }), clearInterval(f));
1680
+ }, 300);
1681
+ break;
1682
+ }
1683
+ case "GEETEST": {
1684
+ let f = !1;
1685
+ const h = setInterval(() => {
1686
+ if (window.initGeetest4 || c("https://static.geetest.com/v4/gt4.js"), window.initGeetest4 && r && !f) {
1687
+ const $ = String(r);
1688
+ window.initGeetest4(
1689
+ {
1690
+ captchaId: $,
1691
+ product: "float"
1692
+ },
1693
+ function(w) {
1694
+ f || (w.appendTo("#captcha"), f = !0), w.onSuccess(function() {
1695
+ const b = w.getValidate();
1696
+ g(
1697
+ `lot_number=${b.lot_number}&captcha_output=${b.captcha_output}&pass_token=${b.pass_token}&gen_time=${b.gen_time}&captcha_id=${r}`
1698
+ );
1699
+ });
1700
+ }
1701
+ ), clearInterval(h);
1702
+ }
1703
+ }, 500);
1704
+ break;
1705
+ }
1706
+ case "Cloudflare Turnstile": {
1707
+ const f = setInterval(() => {
1708
+ window.turnstile || c("https://challenges.cloudflare.com/turnstile/v0/api.js"), window.turnstile && window.turnstile.render && (window.turnstile.render("#captcha", {
1709
+ sitekey: r,
1710
+ callback: g
1711
+ }), clearInterval(f));
1712
+ }, 300);
1713
+ break;
1714
+ }
1715
+ }
1716
+ }, [e, o, r, a, l, u]), /* @__PURE__ */ i.jsx("div", { id: "captcha" });
1717
+ }, eo = (t) => {
1718
+ const { t: e } = Te(), { owner: o, name: r, visible: a, onOk: l, onCancel: u, isCurrentProvider: g } = t, [c, f] = m.useState("none"), [h, $] = m.useState(""), [w, b] = m.useState(""), [L, F] = m.useState(""), [E, _] = m.useState(""), [k, q] = m.useState(""), [Y, U] = m.useState(!1), [ie, pe] = m.useState(""), [ne, R] = m.useState(""), ze = m.useRef(null);
1719
+ Rt(() => {
1720
+ a ? H() : (he(), U(!1));
1721
+ }, [a]);
1722
+ const ge = () => {
1723
+ l == null || l(c, ne, w);
1724
+ }, he = () => {
1725
+ R(""), u == null || u();
1726
+ }, H = () => {
1727
+ Ut(o, r, g).then((M) => {
1728
+ M.type === "none" ? ge() : M.type === "Default" ? (U(!0), b(M.captchaId), pe(M.captchaImage), f("Default")) : (U(!0), f(M.type), $(M.clientId), b(M.clientSecret), F(M.subType), _(M.clientId2), q(M.clientSecret2));
1729
+ });
1730
+ }, X = () => /* @__PURE__ */ i.jsxs("div", { className: "flex flex-col items-center", children: [
1731
+ /* @__PURE__ */ i.jsx(
1732
+ "div",
1733
+ {
1734
+ className: "bg-no-repeat mb-4 border border-current rounded w-[200px] h-[80px]",
1735
+ style: {
1736
+ backgroundImage: `url('data:image/png;base64,${ie}')`
1737
+ }
1738
+ }
1739
+ ),
1740
+ /* @__PURE__ */ i.jsx(
1741
+ "input",
1742
+ {
1743
+ className: "input input-bordered w-[200px]",
1744
+ type: "text",
1745
+ ref: ze,
1746
+ value: ne,
1747
+ placeholder: e("general.captcha"),
1748
+ onKeyDown: (M) => M.key === "Enter" ? ge() : null,
1749
+ onChange: (M) => R(M.target.value)
1750
+ }
1751
+ )
1752
+ ] }), re = (M) => {
1753
+ R(M);
1754
+ }, ke = () => c === "Default" ? X() : /* @__PURE__ */ i.jsx("div", { className: "flex justify-center", children: /* @__PURE__ */ i.jsx(
1755
+ Xn,
1756
+ {
1757
+ captchaType: c,
1758
+ subType: L,
1759
+ siteKey: h,
1760
+ clientSecret: w,
1761
+ onChange: re,
1762
+ clientId2: E,
1763
+ clientSecret2: k
1764
+ }
1765
+ ) }), Se = () => {
1766
+ let M = !1;
1767
+ return c === "Default" ? /^\d{5}$/.test(ne) || (M = !0) : ne === "" && (M = !0), [
1768
+ /* @__PURE__ */ i.jsx("button", { className: "btn", onClick: he, children: "Cancel" }, "closebtn"),
1769
+ /* @__PURE__ */ i.jsx(
1770
+ "button",
1771
+ {
1772
+ className: "btn btn-primary",
1773
+ disabled: M,
1774
+ onClick: ge,
1775
+ children: "OK"
1776
+ },
1777
+ "okbtn"
1778
+ )
1779
+ ];
1780
+ };
1781
+ return /* @__PURE__ */ i.jsx("dialog", { id: "captcha-modal", className: "modal", children: /* @__PURE__ */ i.jsxs("div", { className: "modal-box", children: [
1782
+ /* @__PURE__ */ i.jsx("div", { className: "mt-4 mb-8", children: ke() }),
1783
+ /* @__PURE__ */ i.jsxs("div", { className: "modal-action", children: [
1784
+ /* @__PURE__ */ i.jsx("form", { method: "dialog", className: "modal-backdrop", children: /* @__PURE__ */ i.jsx("button", { children: "Close" }) }),
1785
+ /* @__PURE__ */ i.jsx("form", { method: "dialog", className: "flex gap-3", children: Se() })
1786
+ ] })
1787
+ ] }) });
1788
+ }, to = ({
1789
+ value: t,
1790
+ disabled: e,
1791
+ textBefore: o,
1792
+ onChange: r,
1793
+ onButtonClickArgs: a,
1794
+ application: l,
1795
+ method: u,
1796
+ countryCode: g
1797
+ }) => {
1798
+ const { t: c } = Te(), [f, h] = m.useState(!1), [$, w] = m.useState(0), [b, L] = m.useState(!1), F = m.useRef(null), E = (q = 60) => {
1799
+ let Y = q;
1800
+ w(Y);
1801
+ const U = () => {
1802
+ Y--, w(Y), Y !== 0 && setTimeout(U, 1e3);
1803
+ };
1804
+ setTimeout(U, 1e3);
1805
+ }, _ = (q, Y, U) => {
1806
+ h(!1), L(!0), Dt(
1807
+ q,
1808
+ Y,
1809
+ U,
1810
+ u,
1811
+ g,
1812
+ ...a
1813
+ ).then((ie) => {
1814
+ L(!1), ie && E(60);
1815
+ });
1816
+ }, k = () => {
1817
+ h(!1);
1818
+ };
1819
+ return m.useEffect(() => {
1820
+ F.current = document.getElementById("captcha-modal");
1821
+ }, []), m.useEffect(() => {
1822
+ F.current && (f ? F.current.showModal() : F.current.close());
1823
+ }, [f]), /* @__PURE__ */ i.jsxs(m.Fragment, { children: [
1824
+ /* @__PURE__ */ i.jsxs("div", { className: "flex", children: [
1825
+ /* @__PURE__ */ i.jsx(
1826
+ "input",
1827
+ {
1828
+ className: "input",
1829
+ disabled: e,
1830
+ value: t,
1831
+ placeholder: "Enter your code",
1832
+ onChange: (q) => r(q.target.value),
1833
+ autoComplete: "one-time-code"
1834
+ }
1835
+ ),
1836
+ /* @__PURE__ */ i.jsx(
1837
+ "button",
1838
+ {
1839
+ className: "btn",
1840
+ disabled: e || $ > 0,
1841
+ onClick: () => h(!0),
1842
+ children: $ > 0 ? `${$} s` : c(b ? "code.sending" : "code.sendCode")
1843
+ }
1844
+ )
1845
+ ] }),
1846
+ /* @__PURE__ */ i.jsx(
1847
+ eo,
1848
+ {
1849
+ owner: l.owner,
1850
+ name: l.name,
1851
+ visible: f,
1852
+ onOk: _,
1853
+ onCancel: k,
1854
+ isCurrentProvider: !1
1855
+ }
1856
+ )
1857
+ ] });
1858
+ };
1859
+ var no = Object.create, $e = Object.defineProperty, oo = Object.defineProperties, ao = Object.getOwnPropertyDescriptor, io = Object.getOwnPropertyDescriptors, ro = Object.getOwnPropertyNames, xt = Object.getOwnPropertySymbols, lo = Object.getPrototypeOf, Wt = Object.prototype.hasOwnProperty, co = Object.prototype.propertyIsEnumerable, $t = (t, e, o) => e in t ? $e(t, e, { enumerable: !0, configurable: !0, writable: !0, value: o }) : t[e] = o, P = (t, e) => {
1860
+ for (var o in e || (e = {}))
1861
+ Wt.call(e, o) && $t(t, o, e[o]);
1862
+ if (xt)
1863
+ for (var o of xt(e))
1864
+ co.call(e, o) && $t(t, o, e[o]);
1865
+ return t;
1866
+ }, Ht = (t, e) => oo(t, io(e)), so = (t, e) => {
1867
+ for (var o in e)
1868
+ $e(t, o, { get: e[o], enumerable: !0 });
1869
+ }, Vt = (t, e, o, r) => {
1870
+ if (e && typeof e == "object" || typeof e == "function")
1871
+ for (let a of ro(e))
1872
+ !Wt.call(t, a) && a !== o && $e(t, a, { get: () => e[a], enumerable: !(r = ao(e, a)) || r.enumerable });
1873
+ return t;
1874
+ }, A = (t, e, o) => (o = t != null ? no(lo(t)) : {}, Vt(
1875
+ // If the importer is in node compatibility mode or this is not an ESM
1876
+ // file that has been converted to a CommonJS file using a Babel-
1877
+ // compatible transform (i.e. "__esModule" has not been set), then set
1878
+ // "default" to the CommonJS "module.exports" for node compatibility.
1879
+ !t || !t.__esModule ? $e(o, "default", { value: t, enumerable: !0 }) : o,
1880
+ t
1881
+ )), uo = (t) => Vt($e({}, "__esModule", { value: !0 }), t), Gt = {};
1882
+ so(Gt, {
1883
+ AmazonLoginButton: () => zo,
1884
+ AppleLoginButton: () => Qo,
1885
+ BufferLoginButton: () => Vo,
1886
+ DiscordLoginButton: () => ea,
1887
+ FacebookLoginButton: () => xo,
1888
+ GithubLoginButton: () => Eo,
1889
+ GitlabLoginButton: () => xa,
1890
+ GoogleLoginButton: () => So,
1891
+ InstagramLoginButton: () => Ro,
1892
+ LinkedInLoginButton: () => Fo,
1893
+ MetamaskLoginButton: () => wa,
1894
+ MicrosoftLoginButton: () => Uo,
1895
+ OktaLoginButton: () => oa,
1896
+ SlackLoginButton: () => ra,
1897
+ TelegramLoginButton: () => Yo,
1898
+ TikTokLoginButton: () => ha,
1899
+ TwitterLoginButton: () => To,
1900
+ XLoginButton: () => Sa,
1901
+ YahooLoginButton: () => sa,
1902
+ ZaloLoginButton: () => fa,
1903
+ createButton: () => O
1904
+ });
1905
+ var j = uo(Gt), Ve = A(m), oe = A(m), fo = A(m), po = ({ name: t, size: e, format: o }) => /* @__PURE__ */ fo.default.createElement("i", { className: o(t), style: { fontSize: e } }), go = po, kt = A(m), ho = ({ type: t, size: e, format: o, color: r = "#FFFFFF" }) => typeof t == "string" ? /* @__PURE__ */ kt.default.createElement(go, P({}, { format: o, name: t, size: e })) : /* @__PURE__ */ kt.default.createElement(t, { size: e, color: r }), mo = "#FFFFFF", yo = (t) => {
1906
+ const [e, o] = (0, oe.useState)(!1), [r, a] = (0, oe.useState)(!1), l = () => {
1907
+ var R;
1908
+ a(!0), (R = t.onMouseEnter) == null || R.call(t);
1909
+ }, u = () => {
1910
+ var R;
1911
+ a(!1), (R = t.onMouseLeave) == null || R.call(t);
1912
+ }, g = () => o(!0), c = () => o(!1), f = () => {
1913
+ var R;
1914
+ return (R = t.onClick) == null ? void 0 : R.call(t);
1915
+ }, {
1916
+ activeStyle: h,
1917
+ align: $ = "left",
1918
+ text: w,
1919
+ children: b = w,
1920
+ className: L,
1921
+ icon: F,
1922
+ iconFormat: E = (R) => R,
1923
+ iconSize: _ = "26px",
1924
+ iconColor: k = mo,
1925
+ preventActiveStyles: q = !1,
1926
+ size: Y = "50px",
1927
+ style: U,
1928
+ disabled: ie,
1929
+ type: pe = "button"
1930
+ } = t, ne = wo(Ge.button, {
1931
+ activeStyle: q ? U : h,
1932
+ customStyle: U,
1933
+ active: r || e,
1934
+ size: Y
1935
+ });
1936
+ return /* @__PURE__ */ oe.default.createElement(
1937
+ "button",
1938
+ P({
1939
+ style: ne,
1940
+ onClick: f,
1941
+ onMouseEnter: l,
1942
+ onMouseLeave: u,
1943
+ onFocus: g,
1944
+ onBlur: c
1945
+ }, { className: L, disabled: ie, type: pe }),
1946
+ /* @__PURE__ */ oe.default.createElement("div", { style: Ge.flex }, !St(_) && !!F && /* @__PURE__ */ oe.default.createElement(
1947
+ "div",
1948
+ {
1949
+ style: {
1950
+ display: "flex",
1951
+ justifyContent: "center",
1952
+ minWidth: _
1953
+ }
1954
+ },
1955
+ /* @__PURE__ */ oe.default.createElement(ho, { type: F, size: _, format: E, color: k })
1956
+ ), !St(_) && /* @__PURE__ */ oe.default.createElement("div", { style: Ge.divider }), /* @__PURE__ */ oe.default.createElement("div", { style: { textAlign: $, width: "100%" } }, b))
1957
+ );
1958
+ }, St = (t) => t === "0" || t === "0px" || t === 0, wo = (t, {
1959
+ size: e,
1960
+ customStyle: o,
1961
+ active: r,
1962
+ activeStyle: a
1963
+ }) => P(P(Ht(P({}, t), {
1964
+ height: e
1965
+ }), o), r && a), Ge = {
1966
+ button: {
1967
+ display: "block",
1968
+ border: 0,
1969
+ borderRadius: 3,
1970
+ boxShadow: "rgba(0, 0, 0, 0.5) 0 1px 2px",
1971
+ color: "#ffffff",
1972
+ cursor: "pointer",
1973
+ fontSize: "19px",
1974
+ margin: "5px",
1975
+ width: "calc(100% - 10px)",
1976
+ overflow: "hidden",
1977
+ padding: "0 10px",
1978
+ userSelect: "none"
1979
+ },
1980
+ divider: {
1981
+ width: "10px"
1982
+ },
1983
+ flex: {
1984
+ alignItems: "center",
1985
+ display: "flex",
1986
+ height: "100%"
1987
+ }
1988
+ }, bo = A(m), O = (t) => (e) => {
1989
+ const o = Ht(P(P({
1990
+ activeStyle: P(P({}, t == null ? void 0 : t.activeStyle), e.activeStyle)
1991
+ }, t), e), {
1992
+ style: P(P({}, t == null ? void 0 : t.style), e.style)
1993
+ });
1994
+ return /* @__PURE__ */ bo.default.createElement(yo, P({}, o));
1995
+ }, vo = {
1996
+ activeStyle: { background: "#293e69" },
1997
+ icon: $o,
1998
+ style: { background: "#3b5998" },
1999
+ text: "Log in with Facebook"
2000
+ }, xo = O(vo);
2001
+ function $o({ size: t, color: e }) {
2002
+ return /* @__PURE__ */ Ve.default.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: t, height: t, viewBox: "0 0 90 90" }, /* @__PURE__ */ Ve.default.createElement("g", null, /* @__PURE__ */ Ve.default.createElement(
2003
+ "path",
2004
+ {
2005
+ d: "M90,15.001C90,7.119,82.884,0,75,0H15C7.116,0,0,7.119,0,15.001v59.998 C0,82.881,7.116,90,15.001,90H45V56H34V41h11v-5.844C45,25.077,52.568,16,61.875,16H74v15H61.875C60.548,31,59,32.611,59,35.024V41 h15v15H59v34h16c7.884,0,15-7.119,15-15.001V15.001z",
2006
+ fill: e
2007
+ }
2008
+ )));
2009
+ }
2010
+ var T = A(m), ko = {
2011
+ activeStyle: { background: "#EFF0EE" },
2012
+ icon: _o,
2013
+ style: { background: "white", color: "black" },
2014
+ text: "Log in with Google"
2015
+ }, So = O(ko);
2016
+ function _o({ size: t }) {
2017
+ return /* @__PURE__ */ T.default.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 64 64", width: t, height: t }, /* @__PURE__ */ T.default.createElement(
2018
+ "linearGradient",
2019
+ {
2020
+ id: "95yY7w43Oj6n2vH63j6HJb",
2021
+ x1: "29.401",
2022
+ x2: "29.401",
2023
+ y1: "4.064",
2024
+ y2: "106.734",
2025
+ gradientTransform: "matrix(1 0 0 -1 0 66)",
2026
+ gradientUnits: "userSpaceOnUse"
2027
+ },
2028
+ /* @__PURE__ */ T.default.createElement("stop", { offset: "0", stopColor: "#ff5840" }),
2029
+ /* @__PURE__ */ T.default.createElement("stop", { offset: ".007", stopColor: "#ff5840" }),
2030
+ /* @__PURE__ */ T.default.createElement("stop", { offset: ".989", stopColor: "#fa528c" }),
2031
+ /* @__PURE__ */ T.default.createElement("stop", { offset: "1", stopColor: "#fa528c" })
2032
+ ), /* @__PURE__ */ T.default.createElement(
2033
+ "path",
2034
+ {
2035
+ fill: "url(#95yY7w43Oj6n2vH63j6HJb)",
2036
+ d: `M47.46,15.5l-1.37,1.48c-1.34,1.44-3.5,1.67-5.15,0.6c-2.71-1.75-6.43-3.13-11-2.37 c-4.94,0.83-9.17,3.85-11.64,
2037
+ 7.97l-8.03-6.08C14.99,9.82,23.2,5,32.5,5c5,0,9.94,1.56,14.27,4.46 C48.81,10.83,49.13,13.71,47.46,15.5z`
2038
+ }
2039
+ ), /* @__PURE__ */ T.default.createElement(
2040
+ "linearGradient",
2041
+ {
2042
+ id: "95yY7w43Oj6n2vH63j6HJc",
2043
+ x1: "12.148",
2044
+ x2: "12.148",
2045
+ y1: ".872",
2046
+ y2: "47.812",
2047
+ gradientTransform: "matrix(1 0 0 -1 0 66)",
2048
+ gradientUnits: "userSpaceOnUse"
2049
+ },
2050
+ /* @__PURE__ */ T.default.createElement("stop", { offset: "0", stopColor: "#feaa53" }),
2051
+ /* @__PURE__ */ T.default.createElement("stop", { offset: ".612", stopColor: "#ffcd49" }),
2052
+ /* @__PURE__ */ T.default.createElement("stop", { offset: "1", stopColor: "#ffde44" })
2053
+ ), /* @__PURE__ */ T.default.createElement(
2054
+ "path",
2055
+ {
2056
+ fill: "url(#95yY7w43Oj6n2vH63j6HJc)",
2057
+ d: `M16.01,30.91c-0.09,2.47,0.37,4.83,1.27,6.96l-8.21,6.05c-1.35-2.51-2.3-5.28-2.75-8.22 c-1.06-6.88,0.54-13.38,
2058
+ 3.95-18.6l8.03,6.08C16.93,25.47,16.1,28.11,16.01,30.91z`
2059
+ }
2060
+ ), /* @__PURE__ */ T.default.createElement(
2061
+ "linearGradient",
2062
+ {
2063
+ id: "95yY7w43Oj6n2vH63j6HJd",
2064
+ x1: "29.76",
2065
+ x2: "29.76",
2066
+ y1: "32.149",
2067
+ y2: "-6.939",
2068
+ gradientTransform: "matrix(1 0 0 -1 0 66)",
2069
+ gradientUnits: "userSpaceOnUse"
2070
+ },
2071
+ /* @__PURE__ */ T.default.createElement("stop", { offset: "0", stopColor: "#42d778" }),
2072
+ /* @__PURE__ */ T.default.createElement("stop", { offset: ".428", stopColor: "#3dca76" }),
2073
+ /* @__PURE__ */ T.default.createElement("stop", { offset: "1", stopColor: "#34b171" })
2074
+ ), /* @__PURE__ */ T.default.createElement(
2075
+ "path",
2076
+ {
2077
+ fill: "url(#95yY7w43Oj6n2vH63j6HJd)",
2078
+ d: `M50.45,51.28c-4.55,4.07-10.61,6.57-17.36,6.71C22.91,58.2,13.66,52.53,9.07,43.92l8.21-6.05 C19.78,43.81,
2079
+ 25.67,48,32.5,48c3.94,0,7.52-1.28,10.33-3.44L50.45,51.28z`
2080
+ }
2081
+ ), /* @__PURE__ */ T.default.createElement(
2082
+ "linearGradient",
2083
+ {
2084
+ id: "95yY7w43Oj6n2vH63j6HJe",
2085
+ x1: "46",
2086
+ x2: "46",
2087
+ y1: "3.638",
2088
+ y2: "35.593",
2089
+ gradientTransform: "matrix(1 0 0 -1 0 66)",
2090
+ gradientUnits: "userSpaceOnUse"
2091
+ },
2092
+ /* @__PURE__ */ T.default.createElement("stop", { offset: "0", stopColor: "#155cde" }),
2093
+ /* @__PURE__ */ T.default.createElement("stop", { offset: ".278", stopColor: "#1f7fe5" }),
2094
+ /* @__PURE__ */ T.default.createElement("stop", { offset: ".569", stopColor: "#279ceb" }),
2095
+ /* @__PURE__ */ T.default.createElement("stop", { offset: ".82", stopColor: "#2cafef" }),
2096
+ /* @__PURE__ */ T.default.createElement("stop", { offset: "1", stopColor: "#2eb5f0" })
2097
+ ), /* @__PURE__ */ T.default.createElement(
2098
+ "path",
2099
+ {
2100
+ fill: "url(#95yY7w43Oj6n2vH63j6HJe)",
2101
+ d: `M59,31.97c0.01,7.73-3.26,14.58-8.55,19.31l-7.62-6.72c2.1-1.61,3.77-3.71,4.84-6.15
2102
+ c0.29-0.66-0.2-1.41-0.92-1.41H37c-2.21,0-4-1.79-4-4v-2c0-2.21,1.79-4,4-4h17C56.75,27,59,29.22,59,31.97z`
2103
+ }
2104
+ ));
2105
+ }
2106
+ var _t = A(m), Co = {
2107
+ activeStyle: { background: "#555555" },
2108
+ icon: jo,
2109
+ style: { background: "#333333" },
2110
+ text: "Log in with GitHub"
2111
+ }, Eo = O(Co);
2112
+ function jo({ size: t, color: e }) {
2113
+ return /* @__PURE__ */ _t.default.createElement("svg", { fill: e, role: "img", viewBox: "0 0 24 24", width: t, height: t, xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ _t.default.createElement("path", { d: "M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12" }));
2114
+ }
2115
+ var Ct = A(m), Lo = {
2116
+ activeStyle: { background: "#282e36" },
2117
+ icon: Ao,
2118
+ style: { background: "#0f1419" },
2119
+ text: "Log in with Twitter"
2120
+ }, To = O(Lo);
2121
+ function Ao({ size: t, color: e }) {
2122
+ return /* @__PURE__ */ Ct.default.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: t, height: t, viewBox: "0 0 24 24" }, /* @__PURE__ */ Ct.default.createElement(
2123
+ "path",
2124
+ {
2125
+ fill: e,
2126
+ d: "M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"
2127
+ }
2128
+ ));
2129
+ }
2130
+ var Et = A(m), Mo = {
2131
+ activeStyle: { background: "#ff9f23" },
2132
+ icon: Oo,
2133
+ style: { background: "#f9ae32" },
2134
+ text: "Log in with Amazon"
2135
+ }, zo = O(Mo);
2136
+ function Oo({ size: t, color: e }) {
2137
+ return /* @__PURE__ */ Et.default.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", fill: e, width: t, height: t, viewBox: "0 0 24 24" }, /* @__PURE__ */ Et.default.createElement(
2138
+ "path",
2139
+ {
2140
+ d: "M13.958 10.09c0 1.232.029 2.256-.591 3.351-.502.891-1.301 1.438-2.186 1.438-1.214 0-1.922-.924-1.922-2.292 0-2.692 2.415-3.182 4.7-3.182v.685zm3.186 7.705c-.209.189-.512.201-.745.074-1.052-.872-1.238-1.276-1.814-2.106-1.734 1.767-2.962 2.297-5.209 2.297-2.66 0-4.731-1.641-4.731-4.925 0-2.565 1.391-4.309 3.37-5.164 1.715-.754 4.11-.891 5.942-1.095v-.41c0-.753.06-1.642-.383-2.294-.385-.579-1.124-.82-1.775-.82-1.205 0-2.277.618-2.54 1.897-.054.285-.261.567-.549.582l-3.061-.333c-.259-.056-.548-.266-.472-.66.704-3.716 4.06-4.838 7.066-4.838 1.537 0 3.547.41 4.758 1.574 1.538 1.436 1.392 3.352 1.392 5.438v4.923c0 1.481.616 2.13 1.192 2.929.204.287.247.63-.01.839-.647.541-1.794 1.537-2.423 2.099l-.008-.007zm3.559 1.988c-2.748 1.472-5.735 2.181-8.453 2.181-4.027 0-7.927-1.393-11.081-3.706-.277-.202-.481.154-.251.416 2.925 3.326 6.786 5.326 11.076 5.326 3.061 0 6.614-1.214 9.066-3.494.406-.377.058-.945-.357-.723zm.67 2.216c-.091.227.104.32.31.147 1.339-1.12 1.685-3.466 1.411-3.804-.272-.336-2.612-.626-4.04.377-.22.154-.182.367.062.337.805-.096 2.595-.312 2.913.098.319.41-.355 2.094-.656 2.845z",
2141
+ fillRule: "evenodd",
2142
+ clipRule: "evenodd"
2143
+ }
2144
+ ));
2145
+ }
2146
+ var ve = A(m), Bo = {
2147
+ activeStyle: {
2148
+ background: "linear-gradient(to right, rgb(214, 146, 60) 0%, rgb(160, 11, 143) 50%, rgb(56, 10, 115) 100%)"
2149
+ },
2150
+ icon: Po,
2151
+ style: {
2152
+ background: "linear-gradient(to right, rgb(236, 146, 35) 0%, rgb(177, 42, 160) 50%, rgb(105, 14, 224) 100%)"
2153
+ },
2154
+ text: "Log in with Instagram"
2155
+ }, Ro = O(Bo);
2156
+ function Po({ size: t, color: e }) {
2157
+ return /* @__PURE__ */ ve.default.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: t, height: t, viewBox: "0 0 169.063 169.063" }, /* @__PURE__ */ ve.default.createElement("g", { fill: e }, /* @__PURE__ */ ve.default.createElement("path", { d: "M122.406,0H46.654C20.929,0,0,20.93,0,46.655v75.752c0,25.726,20.929,46.655,46.654,46.655h75.752 c25.727,0,46.656-20.93,46.656-46.655V46.655C169.063,20.93,148.133,0,122.406,0z M154.063,122.407 c0,17.455-14.201,31.655-31.656,31.655H46.654C29.2,154.063,15,139.862,15,122.407V46.655C15,29.201,29.2,15,46.654,15h75.752 c17.455,0,31.656,14.201,31.656,31.655V122.407z" }), /* @__PURE__ */ ve.default.createElement("path", { d: "M84.531,40.97c-24.021,0-43.563,19.542-43.563,43.563c0,24.02,19.542,43.561,43.563,43.561s43.563-19.541,43.563-43.561 C128.094,60.512,108.552,40.97,84.531,40.97z M84.531,113.093c-15.749,0-28.563-12.812-28.563-28.561 c0-15.75,12.813-28.563,28.563-28.563s28.563,12.813,28.563,28.563C113.094,100.281,100.28,113.093,84.531,113.093z" }), /* @__PURE__ */ ve.default.createElement("path", { d: "M129.921,28.251c-2.89,0-5.729,1.17-7.77,3.22c-2.051,2.04-3.23,4.88-3.23,7.78c0,2.891,1.18,5.73,3.23,7.78 c2.04,2.04,4.88,3.22,7.77,3.22c2.9,0,5.73-1.18,7.78-3.22c2.05-2.05,3.22-4.89,3.22-7.78c0-2.9-1.17-5.74-3.22-7.78 C135.661,29.421,132.821,28.251,129.921,28.251z" })));
2158
+ }
2159
+ var qe = A(m), Io = {
2160
+ activeStyle: { background: "rgb(7, 112, 169)" },
2161
+ icon: No,
2162
+ style: { background: "rgb(26, 129, 185)" },
2163
+ text: "Log in with LinkedIn"
2164
+ }, Fo = O(Io);
2165
+ function No({ size: t, color: e }) {
2166
+ return /* @__PURE__ */ qe.default.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: t, height: t, viewBox: "0 0 430.117 430.117" }, /* @__PURE__ */ qe.default.createElement("g", null, /* @__PURE__ */ qe.default.createElement(
2167
+ "path",
2168
+ {
2169
+ d: "M430.117,261.543V420.56h-92.188V272.193c0-37.271-13.334-62.707-46.703-62.707 c-25.473,0-40.632,17.142-47.301,33.724c-2.432,5.928-3.058,14.179-3.058,22.477V420.56h-92.219c0,0,1.242-251.285,0-277.32h92.21 v39.309c-0.187,0.294-0.43,0.611-0.606,0.896h0.606v-0.896c12.251-18.869,34.13-45.824,83.102-45.824 C384.633,136.724,430.117,176.361,430.117,261.543z M52.183,9.558C20.635,9.558,0,30.251,0,57.463 c0,26.619,20.038,47.94,50.959,47.94h0.616c32.159,0,52.159-21.317,52.159-47.94C103.128,30.251,83.734,9.558,52.183,9.558z M5.477,420.56h92.184v-277.32H5.477V420.56z",
2170
+ fill: e
2171
+ }
2172
+ )));
2173
+ }
2174
+ var xe = A(m), Do = {
2175
+ activeStyle: { background: "#555555" },
2176
+ icon: Wo,
2177
+ style: { background: "#333333" },
2178
+ text: "Log in with Microsoft"
2179
+ }, Uo = O(Do);
2180
+ function Wo({ size: t, color: e }) {
2181
+ return /* @__PURE__ */ xe.default.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: t, height: t, fill: e, x: "0px", y: "0px", viewBox: "0 0 48 48" }, /* @__PURE__ */ xe.default.createElement("path", { fill: "#ff5722", d: "M6 6H22V22H6z", transform: "rotate(-180 14 14)" }), /* @__PURE__ */ xe.default.createElement("path", { fill: "#4caf50", d: "M26 6H42V22H26z", transform: "rotate(-180 34 14)" }), /* @__PURE__ */ xe.default.createElement("path", { fill: "#ffc107", d: "M26 26H42V42H26z", transform: "rotate(-180 34 34)" }), /* @__PURE__ */ xe.default.createElement("path", { fill: "#03a9f4", d: "M6 26H22V42H6z", transform: "rotate(-180 14 34)" }));
2182
+ }
2183
+ var jt = A(m), Ho = {
2184
+ activeStyle: { background: "#1171BB" },
2185
+ icon: Go,
2186
+ style: { background: "#168EEA" },
2187
+ text: "Log in with Buffer"
2188
+ }, Vo = O(Ho);
2189
+ function Go({ size: t, color: e }) {
2190
+ return /* @__PURE__ */ jt.default.createElement(
2191
+ "svg",
2192
+ {
2193
+ "aria-labelledby": "simpleicons-buffer-icon",
2194
+ role: "img",
2195
+ viewBox: "0 0 24 24",
2196
+ width: t,
2197
+ height: t,
2198
+ xmlns: "http://www.w3.org/2000/svg"
2199
+ },
2200
+ /* @__PURE__ */ jt.default.createElement(
2201
+ "path",
2202
+ {
2203
+ d: "M23.784 18.24c.287.142.287.267 0 .374l-11.357 5.223c-.287.145-.57.145-.854 0L.213 18.614c-.284-.107-.284-.232 0-.375l2.722-1.23c.284-.14.57-.14.852 0l7.787 3.573c.285.14.57.14.854 0l7.787-3.574c.283-.14.568-.14.852 0l2.717 1.23zm0-6.454c.287.143.287.285 0 .426L12.427 17.44c-.287.104-.57.104-.854 0L.213 12.21c-.284-.143-.284-.284 0-.426l2.722-1.227c.284-.144.57-.144.852 0l7.787 3.57c.285.144.57.144.854 0l7.787-3.57c.283-.144.568-.144.852 0l2.717 1.226zM.214 5.76c-.285-.143-.285-.267 0-.375L11.574.16c.283-.14.57-.14.852 0l11.358 5.23c.287.107.287.232 0 .375l-11.357 5.223c-.287.143-.57.143-.854 0L.213 5.76z",
2204
+ fill: e
2205
+ }
2206
+ )
2207
+ );
2208
+ }
2209
+ var ee = A(m), qo = {
2210
+ activeStyle: {
2211
+ background: "#0088cc"
2212
+ },
2213
+ icon: Ko,
2214
+ style: {
2215
+ background: "#54a9eb"
2216
+ },
2217
+ text: "Log in with Telegram"
2218
+ }, Yo = O(qo);
2219
+ function Ko({ size: t }) {
2220
+ return /* @__PURE__ */ ee.default.createElement(
2221
+ "svg",
2222
+ {
2223
+ xmlns: "http://www.w3.org/2000/svg",
2224
+ viewBox: "0 0 240 240",
2225
+ width: t,
2226
+ height: t,
2227
+ style: { transform: "scale(1.5)" }
2228
+ },
2229
+ /* @__PURE__ */ ee.default.createElement("defs", null, /* @__PURE__ */ ee.default.createElement("linearGradient", { id: "b", x1: ".66", x2: ".851", y1: ".437", y2: ".802" }, /* @__PURE__ */ ee.default.createElement("stop", { offset: "0", stopColor: "#eff7fc" }), /* @__PURE__ */ ee.default.createElement("stop", { offset: "1", stopColor: "#fff" }))),
2230
+ /* @__PURE__ */ ee.default.createElement("circle", { cx: "120", cy: "120", r: "120", fill: "url(#a)" }),
2231
+ /* @__PURE__ */ ee.default.createElement("path", { fill: "#c8daea", d: "M98 175c-3.888 0-3.227-1.468-4.568-5.17L82 132.207 170 80" }),
2232
+ /* @__PURE__ */ ee.default.createElement("path", { fill: "#a9c9dd", d: "M98 175c3 0 4.325-1.372 6-3l16-15.558-19.958-12.035" }),
2233
+ /* @__PURE__ */ ee.default.createElement(
2234
+ "path",
2235
+ {
2236
+ fill: "url(#b)",
2237
+ d: "M100.04 144.41l48.36 35.729c5.519 3.045 9.501 1.468 10.876-5.123l19.685-92.763c2.015-8.08-3.08-11.746-8.36-9.349l-115.59 44.571c-7.89 3.165-7.843 7.567-1.438 9.528l29.663 9.259 68.673-43.325c3.242-1.966 6.218-.91 3.776 1.258"
2238
+ }
2239
+ )
2240
+ );
2241
+ }
2242
+ var Ye = A(m), Jo = {
2243
+ activeStyle: { background: "#EFF0EE" },
2244
+ icon: Zo,
2245
+ style: { background: "#FFFFFF", color: "#000000" },
2246
+ text: "Log in with Apple"
2247
+ }, Qo = O(Jo);
2248
+ function Zo({ size: t }) {
2249
+ return /* @__PURE__ */ Ye.default.createElement(
2250
+ "svg",
2251
+ {
2252
+ width: t,
2253
+ height: t,
2254
+ viewBox: "0 0 56 56",
2255
+ style: { transform: "scale(2.5)" },
2256
+ version: "1.1",
2257
+ xmlns: "http://www.w3.org/2000/svg"
2258
+ },
2259
+ /* @__PURE__ */ Ye.default.createElement("g", { stroke: "none", strokeWidth: "1", fill: "none", fillRule: "evenodd" }, /* @__PURE__ */ Ye.default.createElement(
2260
+ "path",
2261
+ {
2262
+ d: "M28.2226562,20.3846154 C29.0546875,20.3846154 30.0976562,19.8048315 30.71875,19.0317864 C31.28125,18.3312142 31.6914062,17.352829 31.6914062,16.3744437 C31.6914062,16.2415766 31.6796875,16.1087095 31.65625,16 C30.7304687,16.0362365 29.6171875,16.640178 28.9492187,17.4494596 C28.421875,18.06548 27.9414062,19.0317864 27.9414062,20.0222505 C27.9414062,20.1671964 27.9648438,20.3121424 27.9765625,20.3604577 C28.0351562,20.3725366 28.1289062,20.3846154 28.2226562,20.3846154 Z M25.2929688,35 C26.4296875,35 26.9335938,34.214876 28.3515625,34.214876 C29.7929688,34.214876 30.109375,34.9758423 31.375,34.9758423 C32.6171875,34.9758423 33.4492188,33.792117 34.234375,32.6325493 C35.1132812,31.3038779 35.4765625,29.9993643 35.5,29.9389701 C35.4179688,29.9148125 33.0390625,28.9122695 33.0390625,26.0979021 C33.0390625,23.6579784 34.9140625,22.5588048 35.0195312,22.474253 C33.7773438,20.6382708 31.890625,20.5899555 31.375,20.5899555 C29.9804688,20.5899555 28.84375,21.4596313 28.1289062,21.4596313 C27.3554688,21.4596313 26.3359375,20.6382708 25.1289062,20.6382708 C22.8320312,20.6382708 20.5,22.5950413 20.5,26.2911634 C20.5,28.5861411 21.3671875,31.013986 22.4335938,32.5842339 C23.3476562,33.9129053 24.1445312,35 25.2929688,35 Z",
2263
+ fill: "#000000",
2264
+ fillRule: "nonzero"
2265
+ }
2266
+ ))
2267
+ );
2268
+ }
2269
+ var Ke = A(m), Xo = {
2270
+ activeStyle: { background: "#697ec4" },
2271
+ icon: ta,
2272
+ style: { background: "#7289DA" },
2273
+ text: "Log in with Discord"
2274
+ }, ea = O(Xo);
2275
+ function ta({ size: t, color: e }) {
2276
+ return /* @__PURE__ */ Ke.default.createElement("svg", { role: "img", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", fill: e, width: t, height: t }, /* @__PURE__ */ Ke.default.createElement("title", null, "Discord icon"), /* @__PURE__ */ Ke.default.createElement("path", { d: "M20.222 0c1.406 0 2.54 1.137 2.607 2.475V24l-2.677-2.273-1.47-1.338-1.604-1.398.67 2.205H3.71c-1.402 0-2.54-1.065-2.54-2.476V2.48C1.17 1.142 2.31.003 3.715.003h16.5L20.222 0zm-6.118 5.683h-.03l-.202.2c2.073.6 3.076 1.537 3.076 1.537-1.336-.668-2.54-1.002-3.744-1.137-.87-.135-1.74-.064-2.475 0h-.2c-.47 0-1.47.2-2.81.735-.467.203-.735.336-.735.336s1.002-1.002 3.21-1.537l-.135-.135s-1.672-.064-3.477 1.27c0 0-1.805 3.144-1.805 7.02 0 0 1 1.74 3.743 1.806 0 0 .4-.533.805-1.002-1.54-.468-2.14-1.404-2.14-1.404s.134.066.335.2h.06c.03 0 .044.015.06.03v.006c.016.016.03.03.06.03.33.136.66.27.93.4.466.202 1.065.403 1.8.536.93.135 1.996.2 3.21 0 .6-.135 1.2-.267 1.8-.535.39-.2.87-.4 1.397-.737 0 0-.6.936-2.205 1.404.33.466.795 1 .795 1 2.744-.06 3.81-1.8 3.87-1.726 0-3.87-1.815-7.02-1.815-7.02-1.635-1.214-3.165-1.26-3.435-1.26l.056-.02zm.168 4.413c.703 0 1.27.6 1.27 1.335 0 .74-.57 1.34-1.27 1.34-.7 0-1.27-.6-1.27-1.334.002-.74.573-1.338 1.27-1.338zm-4.543 0c.7 0 1.266.6 1.266 1.335 0 .74-.57 1.34-1.27 1.34-.7 0-1.27-.6-1.27-1.334 0-.74.57-1.338 1.27-1.338z" }));
2277
+ }
2278
+ var ae = A(m), na = {
2279
+ activeStyle: { background: "#f5f5f5" },
2280
+ icon: aa,
2281
+ style: { background: "white", color: "black" },
2282
+ text: "Log in with Okta"
2283
+ }, oa = O(na);
2284
+ function aa({ size: t }) {
2285
+ return /* @__PURE__ */ ae.default.createElement(
2286
+ "svg",
2287
+ {
2288
+ version: "1.1",
2289
+ xmlns: "http://www.w3.org/2000/svg",
2290
+ x: "0px",
2291
+ y: "0px",
2292
+ viewBox: "0 0 400 134.7",
2293
+ width: t,
2294
+ height: t
2295
+ },
2296
+ /* @__PURE__ */ ae.default.createElement("g", null, /* @__PURE__ */ ae.default.createElement("g", null, /* @__PURE__ */ ae.default.createElement(
2297
+ "path",
2298
+ {
2299
+ fill: "#007DC1",
2300
+ d: `M50.3,33.8C22.5,33.8,0,56.3,0,84.1s22.5,50.3,50.3,50.3s50.3-22.5,50.3-50.3S78.1,33.8,50.3,33.8z
2301
+ M50.3,109.3c-13.9,0-25.2-11.3-25.2-25.2s11.3-25.2,25.2-25.2s25.2,11.3,25.2,25.2S64.2,109.3,50.3,109.3z`
2302
+ }
2303
+ )), /* @__PURE__ */ ae.default.createElement(
2304
+ "path",
2305
+ {
2306
+ fill: "#007DC1",
2307
+ d: `M138.7,101c0-4,4.8-5.9,7.6-3.1c12.6,12.8,33.4,34.8,33.5,34.9c0.3,0.3,0.6,0.8,1.8,1.2
2308
+ c0.5,0.2,1.3,0.2,2.2,0.2l22.7,0c4.1,0,5.3-4.7,3.4-7.1l-37.6-38.5l-2-2c-4.3-5.1-3.8-7.1,1.1-12.3L201.2,41c1.9-2.4,0.7-7-3.5-7
2309
+ h-20.6c-0.8,0-1.4,0-2,0.2c-1.2,0.4-1.7,0.8-2,1.2c-0.1,0.1-16.6,17.9-26.8,28.8c-2.8,3-7.8,1-7.8-3.1l0-57.1c0-2.9-2.4-4-4.3-4
2310
+ h-16.8c-2.9,0-4.3,1.9-4.3,3.6v126.6c0,2.9,2.4,3.7,4.4,3.7h16.8c2.6,0,4.3-1.9,4.3-3.8v-1.3V101z`
2311
+ }
2312
+ ), /* @__PURE__ */ ae.default.createElement(
2313
+ "path",
2314
+ {
2315
+ fill: "#007DC1",
2316
+ d: `M275.9,129.6l-1.8-16.8c-0.2-2.3-2.4-3.9-4.7-3.5c-1.3,0.2-2.6,0.3-3.9,0.3c-13.4,0-24.3-10.5-25.1-23.8
2317
+ c0-0.4,0-0.9,0-1.4V63.8c0-2.7,2-4.9,4.7-4.9l22.5,0c1.6,0,4-1.4,4-4.3V38.7c0-3.1-2-4.7-3.8-4.7h-22.7c-2.6,0-4.7-1.9-4.8-4.5
2318
+ l0-25.5c0-1.6-1.2-4-4.3-4h-16.7c-2.1,0-4.1,1.3-4.1,3.9c0,0,0,81.5,0,81.9c0.7,27.2,23,48.9,50.3,48.9c2.3,0,4.5-0.2,6.7-0.5
2319
+ C274.6,133.9,276.2,131.9,275.9,129.6z`
2320
+ }
2321
+ )),
2322
+ /* @__PURE__ */ ae.default.createElement("g", null, /* @__PURE__ */ ae.default.createElement(
2323
+ "path",
2324
+ {
2325
+ fill: "#007DC1",
2326
+ d: `M397.1,108.5c-14.2,0-16.4-5.1-16.4-24.2c0-0.1,0-0.1,0-0.2l0-45.9c0-1.6-1.2-4.3-4.4-4.3h-16.8
2327
+ c-2.1,0-4.4,1.7-4.4,4.3l0,2.1c-7.3-4.2-15.8-6.6-24.8-6.6c-27.8,0-50.3,22.5-50.3,50.3c0,27.8,22.5,50.3,50.3,50.3
2328
+ c12.5,0,23.9-4.6,32.7-12.1c4.7,7.2,12.3,12,24.2,12.1c2,0,12.8,0.4,12.8-4.7v-17.9C400,110.2,398.8,108.5,397.1,108.5z
2329
+ M330.4,109.3c-13.9,0-25.2-11.3-25.2-25.2c0-13.9,11.3-25.2,25.2-25.2c13.9,0,25.2,11.3,25.2,25.2
2330
+ C355.5,98,344.2,109.3,330.4,109.3z`
2331
+ }
2332
+ ))
2333
+ );
2334
+ }
2335
+ var fe = A(m), ia = {
2336
+ activeStyle: { background: "#f5f5f5" },
2337
+ icon: la,
2338
+ style: { background: "white", color: "black" },
2339
+ text: "Log in with Slack"
2340
+ }, ra = O(ia);
2341
+ function la({ size: t, color: e }) {
2342
+ return /* @__PURE__ */ fe.default.createElement(
2343
+ "svg",
2344
+ {
2345
+ enableBackground: "new 0 0 2447.6 2452.5",
2346
+ viewBox: "0 0 2447.6 2452.5",
2347
+ fill: e,
2348
+ width: t,
2349
+ height: t,
2350
+ xmlns: "http://www.w3.org/2000/svg"
2351
+ },
2352
+ /* @__PURE__ */ fe.default.createElement("g", { clipRule: "evenodd", fillRule: "evenodd" }, /* @__PURE__ */ fe.default.createElement(
2353
+ "path",
2354
+ {
2355
+ d: "m897.4 0c-135.3.1-244.8 109.9-244.7 245.2-.1 135.3 109.5 245.1 244.8 245.2h244.8v-245.1c.1-135.3-109.5-245.1-244.9-245.3.1 0 .1 0 0 0m0 654h-652.6c-135.3.1-244.9 109.9-244.8 245.2-.2 135.3 109.4 245.1 244.7 245.3h652.7c135.3-.1 244.9-109.9 244.8-245.2.1-135.4-109.5-245.2-244.8-245.3z",
2356
+ fill: "#36c5f0"
2357
+ }
2358
+ ), /* @__PURE__ */ fe.default.createElement(
2359
+ "path",
2360
+ {
2361
+ d: "m2447.6 899.2c.1-135.3-109.5-245.1-244.8-245.2-135.3.1-244.9 109.9-244.8 245.2v245.3h244.8c135.3-.1 244.9-109.9 244.8-245.3zm-652.7 0v-654c.1-135.2-109.4-245-244.7-245.2-135.3.1-244.9 109.9-244.8 245.2v654c-.2 135.3 109.4 245.1 244.7 245.3 135.3-.1 244.9-109.9 244.8-245.3z",
2362
+ fill: "#2eb67d"
2363
+ }
2364
+ ), /* @__PURE__ */ fe.default.createElement(
2365
+ "path",
2366
+ {
2367
+ d: "m1550.1 2452.5c135.3-.1 244.9-109.9 244.8-245.2.1-135.3-109.5-245.1-244.8-245.2h-244.8v245.2c-.1 135.2 109.5 245 244.8 245.2zm0-654.1h652.7c135.3-.1 244.9-109.9 244.8-245.2.2-135.3-109.4-245.1-244.7-245.3h-652.7c-135.3.1-244.9 109.9-244.8 245.2-.1 135.4 109.4 245.2 244.7 245.3z",
2368
+ fill: "#ecb22e"
2369
+ }
2370
+ ), /* @__PURE__ */ fe.default.createElement(
2371
+ "path",
2372
+ {
2373
+ d: "m0 1553.2c-.1 135.3 109.5 245.1 244.8 245.2 135.3-.1 244.9-109.9 244.8-245.2v-245.2h-244.8c-135.3.1-244.9 109.9-244.8 245.2zm652.7 0v654c-.2 135.3 109.4 245.1 244.7 245.3 135.3-.1 244.9-109.9 244.8-245.2v-653.9c.2-135.3-109.4-245.1-244.7-245.3-135.4 0-244.9 109.8-244.8 245.1 0 0 0 .1 0 0",
2374
+ fill: "#e01e5a"
2375
+ }
2376
+ ))
2377
+ );
2378
+ }
2379
+ var Le = A(m), ca = {
2380
+ activeStyle: { background: "#ac3ade" },
2381
+ icon: ua,
2382
+ style: { background: "#720E9E" },
2383
+ text: "Log in with Yahoo"
2384
+ }, sa = O(ca);
2385
+ function ua({ size: t, color: e }) {
2386
+ return /* @__PURE__ */ Le.default.createElement(
2387
+ "svg",
2388
+ {
2389
+ version: "1.1",
2390
+ xmlns: "http://www.w3.org/2000/svg",
2391
+ x: "0px",
2392
+ y: "0px",
2393
+ viewBox: "0 0 291.319 291.319",
2394
+ xmlSpace: "preserve",
2395
+ fill: e,
2396
+ width: t,
2397
+ height: t
2398
+ },
2399
+ /* @__PURE__ */ Le.default.createElement("g", null, /* @__PURE__ */ Le.default.createElement(
2400
+ "path",
2401
+ {
2402
+ fill: "transparent",
2403
+ d: `M145.659,0c80.45,0,145.66,65.219,145.66,145.66c0,80.45-65.21,145.659-145.66,145.659
2404
+ S0,226.109,0,145.66C0,65.219,65.21,0,145.659,0z`
2405
+ }
2406
+ ), /* @__PURE__ */ Le.default.createElement(
2407
+ "path",
2408
+ {
2409
+ fill: "#FFFFFF",
2410
+ d: `M212.353,114.98l0.155-0.027l4.825-5.371l-0.237-0.018l0.51-0.801h-67.595l2.604,9.249h18.444
2411
+ l-31.044,28.722c-6.336-9.24-21.184-30.479-31.544-46.411h19.254v-6.555l0.264-1.884l-0.264-0.036v-0.765H54.631v9.24H77.49
2412
+ c8.876,7.328,47.358,54.049,48.76,58.51c0.564,4.179,1.366,28.841-0.291,30.698c-1.994,2.868-22.814,1.32-26.483,1.593
2413
+ l-0.137,9.058c6.7,0.2,26.801-0.009,33.584-0.009c13.364,0,36.77-0.346,40.065-0.082l0.41-8.576l-26.901-0.401
2414
+ c-0.564-3.887-1.183-28.422-0.619-31.098c2.54-7.765,43.816-39.902,48.059-41.112l3.997-0.901h12.472
2415
+ C210.405,118.002,212.353,114.98,212.353,114.98z M202.266,179.079l11.689,0.892l13.628-49.979
2416
+ c-2.276-0.082-22.95-1.93-25.636-2.431L202.266,179.079z M200.245,187.091l0.064,12.208l5.917,0.492l6.391,0.446l1.875-11.944
2417
+ l-6.737-0.31C207.756,187.983,200.245,187.091,200.245,187.091z`
2418
+ }
2419
+ ))
2420
+ );
2421
+ }
2422
+ var Lt = A(m), da = {
2423
+ activeStyle: { background: "#008FF3" },
2424
+ icon: pa,
2425
+ style: { background: "#0573ff" },
2426
+ text: "Log in with Zalo"
2427
+ }, fa = O(da);
2428
+ function pa({ size: t, color: e }) {
2429
+ return /* @__PURE__ */ Lt.default.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: t, height: t, viewBox: "0 0 24 24" }, /* @__PURE__ */ Lt.default.createElement(
2430
+ "path",
2431
+ {
2432
+ fill: e,
2433
+ d: "M12.49 10.2722v-.4496h1.3467v6.3218h-.7704a.576.576 0 01-.5763-.5729l-.0006.0005a3.273 3.273 0 01-1.9372.6321c-1.8138 0-3.2844-1.4697-3.2844-3.2823 0-1.8125 1.4706-3.2822 3.2844-3.2822a3.273 3.273 0 011.9372.6321l.0006.0005zM6.9188 7.7896v.205c0 .3823-.051.6944-.2995 1.0605l-.03.0343c-.0542.0615-.1815.206-.2421.2843L2.024 14.8h4.8948v.7682a.5764.5764 0 01-.5767.5761H0v-.3622c0-.4436.1102-.6414.2495-.8476L4.8582 9.23H.1922V7.7896h6.7266zm8.5513 8.3548a.4805.4805 0 01-.4803-.4798v-7.875h1.4416v8.3548H15.47zM20.6934 9.6C22.52 9.6 24 11.0807 24 12.9044c0 1.8252-1.4801 3.306-3.3066 3.306-1.8264 0-3.3066-1.4808-3.3066-3.306 0-1.8237 1.4802-3.3044 3.3066-3.3044zm-10.1412 5.253c1.0675 0 1.9324-.8645 1.9324-1.9312 0-1.065-.865-1.9295-1.9324-1.9295s-1.9324.8644-1.9324 1.9295c0 1.0667.865 1.9312 1.9324 1.9312zm10.1412-.0033c1.0737 0 1.945-.8707 1.945-1.9453 0-1.073-.8713-1.9436-1.945-1.9436-1.0753 0-1.945.8706-1.945 1.9436 0 1.0746.8697 1.9453 1.945 1.9453z"
2434
+ }
2435
+ ));
2436
+ }
2437
+ var Tt = A(m), ga = {
2438
+ activeStyle: { background: "#333333" },
2439
+ icon: ma,
2440
+ style: { background: "#000000", color: "#FFFFFF" },
2441
+ text: "Log in with TikTok"
2442
+ }, ha = O(ga);
2443
+ function ma({ size: t, color: e }) {
2444
+ return /* @__PURE__ */ Tt.default.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: t, height: t, fill: e, viewBox: "0 0 512 512" }, /* @__PURE__ */ Tt.default.createElement("path", { d: "M412.19 118.66a109.27 109.27 0 01-9.45-5.5 132.87 132.87 0 01-24.27-20.62c-18.1-20.71-24.86-41.72-27.35-56.43h.1C349.14 23.9 350 16 350.13 16h-82.44v318.78c0 4.28 0 8.51-.18 12.69 0 .52-.05 1-.08 1.56 0 .23 0 .47-.05.71v.18a70 70 0 01-35.22 55.56 68.8 68.8 0 01-34.11 9c-38.41 0-69.54-31.32-69.54-70s31.13-70 69.54-70a68.9 68.9 0 0121.41 3.39l.1-83.94a153.14 153.14 0 00-118 34.52 161.79 161.79 0 00-35.3 43.53c-3.48 6-16.61 30.11-18.2 69.24-1 22.21 5.67 45.22 8.85 54.73v.2c2 5.6 9.75 24.71 22.38 40.82A167.53 167.53 0 00115 470.66v-.2l.2.2c39.91 27.12 84.16 25.34 84.16 25.34 7.66-.31 33.32 0 62.46-13.81 32.32-15.31 50.72-38.12 50.72-38.12a158.46 158.46 0 0027.64-45.93c7.46-19.61 9.95-43.13 9.95-52.53V176.49c1 .6 14.32 9.41 14.32 9.41s19.19 12.3 49.13 20.31c21.48 5.7 50.42 6.9 50.42 6.9v-81.84c-10.14 1.1-30.73-2.1-51.81-12.61z" }));
2445
+ }
2446
+ var W = A(m), ya = {
2447
+ activeStyle: { background: "#eeeeee" },
2448
+ icon: ba,
2449
+ style: { background: "#ffffff", color: "#333333" },
2450
+ text: "Log in with Metamask"
2451
+ }, wa = O(ya);
2452
+ function ba({ size: t }) {
2453
+ return /* @__PURE__ */ W.default.createElement(
2454
+ "svg",
2455
+ {
2456
+ xmlns: "http://www.w3.org/2000/svg",
2457
+ x: "0",
2458
+ y: "0",
2459
+ version: "1.1",
2460
+ width: t,
2461
+ height: t,
2462
+ viewBox: "0 0 318.6 318.6",
2463
+ xmlSpace: "preserve"
2464
+ },
2465
+ /* @__PURE__ */ W.default.createElement(
2466
+ "path",
2467
+ {
2468
+ fill: "#e2761b",
2469
+ stroke: "#e2761b",
2470
+ strokeLinecap: "round",
2471
+ strokeLinejoin: "round",
2472
+ d: "M274.1 35.5l-99.5 73.9L193 65.8z"
2473
+ }
2474
+ ),
2475
+ /* @__PURE__ */ W.default.createElement(
2476
+ "path",
2477
+ P({
2478
+ d: "M44.4 35.5l98.7 74.6-17.5-44.3zm193.9 171.3l-26.5 40.6 56.7 15.6 16.3-55.3zm-204.4.9L50.1 263l56.7-15.6-26.5-40.6z"
2479
+ }, At)
2480
+ ),
2481
+ /* @__PURE__ */ W.default.createElement(
2482
+ "path",
2483
+ P({
2484
+ d: "M103.6 138.2l-15.8 23.9 56.3 2.5-2-60.5zm111.3 0l-39-34.8-1.3 61.2 56.2-2.5zM106.8 247.4l33.8-16.5-29.2-22.8zm71.1-16.5l33.9 16.5-4.7-39.3z"
2485
+ }, At)
2486
+ ),
2487
+ /* @__PURE__ */ W.default.createElement(
2488
+ "path",
2489
+ {
2490
+ fill: "#d7c1b3",
2491
+ stroke: "#d7c1b3",
2492
+ strokeLinecap: "round",
2493
+ strokeLinejoin: "round",
2494
+ d: "M211.8 247.4l-33.9-16.5 2.7 22.1-.3 9.3zm-105 0l31.5 14.9-.2-9.3 2.5-22.1z"
2495
+ }
2496
+ ),
2497
+ /* @__PURE__ */ W.default.createElement(
2498
+ "path",
2499
+ {
2500
+ fill: "#233447",
2501
+ stroke: "#233447",
2502
+ strokeLinecap: "round",
2503
+ strokeLinejoin: "round",
2504
+ d: "M138.8 193.5l-28.2-8.3 19.9-9.1zm40.9 0l8.3-17.4 20 9.1z"
2505
+ }
2506
+ ),
2507
+ /* @__PURE__ */ W.default.createElement(
2508
+ "path",
2509
+ {
2510
+ fill: "#cd6116",
2511
+ stroke: "#cd6116",
2512
+ strokeLinecap: "round",
2513
+ strokeLinejoin: "round",
2514
+ d: "M106.8 247.4l4.8-40.6-31.3.9zM207 206.8l4.8 40.6 26.5-39.7zm23.8-44.7l-56.2 2.5 5.2 28.9 8.3-17.4 20 9.1zm-120.2 23.1l20-9.1 8.2 17.4 5.3-28.9-56.3-2.5z"
2515
+ }
2516
+ ),
2517
+ /* @__PURE__ */ W.default.createElement(
2518
+ "path",
2519
+ {
2520
+ fill: "#e4751f",
2521
+ stroke: "#e4751f",
2522
+ strokeLinecap: "round",
2523
+ strokeLinejoin: "round",
2524
+ d: "M87.8 162.1l23.6 46-.8-22.9zm120.3 23.1l-1 22.9 23.7-46zm-64-20.6l-5.3 28.9 6.6 34.1 1.5-44.9zm30.5 0l-2.7 18 1.2 45 6.7-34.1z"
2525
+ }
2526
+ ),
2527
+ /* @__PURE__ */ W.default.createElement(
2528
+ "path",
2529
+ P({
2530
+ d: "M179.8 193.5l-6.7 34.1 4.8 3.3 29.2-22.8 1-22.9zm-69.2-8.3l.8 22.9 29.2 22.8 4.8-3.3-6.6-34.1z"
2531
+ }, Mt)
2532
+ ),
2533
+ /* @__PURE__ */ W.default.createElement(
2534
+ "path",
2535
+ {
2536
+ fill: "#c0ad9e",
2537
+ stroke: "#c0ad9e",
2538
+ strokeLinecap: "round",
2539
+ strokeLinejoin: "round",
2540
+ d: "M180.3 262.3l.3-9.3-2.5-2.2h-37.7l-2.3 2.2.2 9.3-31.5-14.9 11 9 22.3 15.5h38.3l22.4-15.5 11-9z"
2541
+ }
2542
+ ),
2543
+ /* @__PURE__ */ W.default.createElement(
2544
+ "path",
2545
+ {
2546
+ fill: "#161616",
2547
+ stroke: "#161616",
2548
+ strokeLinecap: "round",
2549
+ strokeLinejoin: "round",
2550
+ d: "M177.9 230.9l-4.8-3.3h-27.7l-4.8 3.3-2.5 22.1 2.3-2.2h37.7l2.5 2.2z"
2551
+ }
2552
+ ),
2553
+ /* @__PURE__ */ W.default.createElement(
2554
+ "path",
2555
+ {
2556
+ fill: "#763d16",
2557
+ stroke: "#763d16",
2558
+ strokeLinecap: "round",
2559
+ strokeLinejoin: "round",
2560
+ d: "M278.3 114.2l8.5-40.8-12.7-37.9-96.2 71.4 37 31.3 52.3 15.3 11.6-13.5-5-3.6 8-7.3-6.2-4.8 8-6.1zM31.8 73.4l8.5 40.8-5.4 4 8 6.1-6.1 4.8 8 7.3-5 3.6 11.5 13.5 52.3-15.3 37-31.3-96.2-71.4z"
2561
+ }
2562
+ ),
2563
+ /* @__PURE__ */ W.default.createElement(
2564
+ "path",
2565
+ P({
2566
+ d: "M267.2 153.5l-52.3-15.3 15.9 23.9-23.7 46 31.2-.4h46.5zm-163.6-15.3l-52.3 15.3-17.4 54.2h46.4l31.1.4-23.6-46zm71 26.4l3.3-57.7 15.2-41.1h-67.5l15 41.1 3.5 57.7 1.2 18.2.1 44.8h27.7l.2-44.8z"
2567
+ }, Mt)
2568
+ )
2569
+ );
2570
+ }
2571
+ var At = {
2572
+ fill: "#e4761b",
2573
+ stroke: "#e4761b",
2574
+ strokeLinecap: "round",
2575
+ strokeLinejoin: "round"
2576
+ }, Mt = {
2577
+ fill: "#f6851b",
2578
+ stroke: "#f6851b",
2579
+ strokeLinecap: "round",
2580
+ strokeLinejoin: "round"
2581
+ }, zt = A(m), va = {
2582
+ icon: $a,
2583
+ style: { background: "#fc6d26" },
2584
+ activeStyle: { background: "#d55a1c" },
2585
+ text: "Log in with Gitlab"
2586
+ }, xa = O(va);
2587
+ function $a({ size: t, color: e }) {
2588
+ return /* @__PURE__ */ zt.default.createElement("svg", { fill: e, role: "img", viewBox: "0 0 24 24", width: t, height: t, xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ zt.default.createElement("path", { d: "M21.94 13.11L20.89 9.89C20.89 9.86 20.88 9.83 20.87 9.8L18.76 3.32C18.65 3 18.33 2.75 17.96 2.75C17.6 2.75 17.28 3 17.17 3.33L15.17 9.5H8.84L6.83 3.33C6.72 3 6.4 2.75 6.04 2.75H6.04C5.67 2.75 5.35 3 5.24 3.33L3.13 9.82C3.13 9.82 3.13 9.83 3.13 9.83L2.06 13.11C1.9 13.61 2.07 14.15 2.5 14.45L11.72 21.16C11.89 21.28 12.11 21.28 12.28 21.15L21.5 14.45C21.93 14.15 22.1 13.61 21.94 13.11M8.15 10.45L10.72 18.36L4.55 10.45M13.28 18.37L15.75 10.78L15.85 10.45H19.46L13.87 17.61M17.97 3.94L19.78 9.5H16.16M14.86 10.45L13.07 15.96L12 19.24L9.14 10.45M6.03 3.94L7.84 9.5H4.23M3.05 13.69C2.96 13.62 2.92 13.5 2.96 13.4L3.75 10.97L9.57 18.42M20.95 13.69L14.44 18.42L14.46 18.39L20.25 10.97L21.04 13.4C21.08 13.5 21.04 13.62 20.95 13.69" }));
2589
+ }
2590
+ var Ot = A(m), ka = {
2591
+ activeStyle: { background: "#282e36" },
2592
+ icon: _a,
2593
+ style: { background: "#0f1419" },
2594
+ text: "Log in with X"
2595
+ }, Sa = O(ka);
2596
+ function _a({ size: t, color: e }) {
2597
+ return /* @__PURE__ */ Ot.default.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: t, height: t, viewBox: "0 0 24 24" }, /* @__PURE__ */ Ot.default.createElement(
2598
+ "path",
2599
+ {
2600
+ fill: e,
2601
+ d: "M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"
2602
+ }
2603
+ ));
2604
+ }
2605
+ function Ca({ width: t = 24, height: e = 24, color: o }) {
2606
+ return /* @__PURE__ */ i.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", height: "48", width: "32", viewBox: "-18.15 -35.9725 157.3 215.835", children: [
2607
+ /* @__PURE__ */ i.jsx("path", { fill: "#faab07", d: "M60.503 142.237c-12.533 0-24.038-4.195-31.445-10.46-3.762 1.124-8.574 2.932-11.61 5.175-2.6 1.918-2.275 3.874-1.807 4.663 2.056 3.47 35.273 2.216 44.862 1.136zm0 0c12.535 0 24.039-4.195 31.447-10.46 3.76 1.124 8.573 2.932 11.61 5.175 2.598 1.918 2.274 3.874 1.805 4.663-2.056 3.47-35.272 2.216-44.862 1.136zm0 0" }),
2608
+ /* @__PURE__ */ i.jsx("path", { d: "M60.576 67.119c20.698-.14 37.286-4.147 42.907-5.683 1.34-.367 2.056-1.024 2.056-1.024.005-.189.085-3.37.085-5.01C105.624 27.768 92.58.001 60.5 0 28.42.001 15.375 27.769 15.375 55.401c0 1.642.08 4.822.086 5.01 0 0 .583.615 1.65.913 5.19 1.444 22.09 5.65 43.312 5.795zm56.245 23.02c-1.283-4.129-3.034-8.944-4.808-13.568 0 0-1.02-.126-1.537.023-15.913 4.623-35.202 7.57-49.9 7.392h-.153c-14.616.175-33.774-2.737-49.634-7.315-.606-.175-1.802-.1-1.802-.1-1.774 4.624-3.525 9.44-4.808 13.568-6.119 19.69-4.136 27.838-2.627 28.02 3.239.392 12.606-14.821 12.606-14.821 0 15.459 13.957 39.195 45.918 39.413h.848c31.96-.218 45.917-23.954 45.917-39.413 0 0 9.368 15.213 12.607 14.822 1.508-.183 3.491-8.332-2.627-28.021" }),
2609
+ /* @__PURE__ */ i.jsx("path", { fill: "#fff", d: "M49.085 40.824c-4.352.197-8.07-4.76-8.304-11.063-.236-6.305 3.098-11.576 7.45-11.773 4.347-.195 8.064 4.76 8.3 11.065.238 6.306-3.097 11.577-7.446 11.771m31.133-11.063c-.233 6.302-3.951 11.26-8.303 11.063-4.35-.195-7.684-5.465-7.446-11.77.236-6.305 3.952-11.26 8.3-11.066 4.352.197 7.686 5.468 7.449 11.773" }),
2610
+ /* @__PURE__ */ i.jsx("path", { fill: "#faab07", d: "M87.952 49.725C86.79 47.15 75.077 44.28 60.578 44.28h-.156c-14.5 0-26.212 2.87-27.375 5.446a.863.863 0 00-.085.367.88.88 0 00.16.496c.98 1.427 13.985 8.487 27.3 8.487h.156c13.314 0 26.319-7.058 27.299-8.487a.873.873 0 00.16-.498.856.856 0 00-.085-.365" }),
2611
+ /* @__PURE__ */ i.jsx("path", { d: "M54.434 29.854c.199 2.49-1.167 4.702-3.046 4.943-1.883.242-3.568-1.58-3.768-4.07-.197-2.492 1.167-4.704 3.043-4.944 1.886-.244 3.574 1.58 3.771 4.07m11.956.833c.385-.689 3.004-4.312 8.427-2.993 1.425.347 2.084.857 2.223 1.057.205.296.262.718.053 1.286-.412 1.126-1.263 1.095-1.734.875-.305-.142-4.082-2.66-7.562 1.097-.24.257-.668.346-1.073.04-.407-.308-.574-.93-.334-1.362" }),
2612
+ /* @__PURE__ */ i.jsx("path", { fill: "#fff", d: "M60.576 83.08h-.153c-9.996.12-22.116-1.204-33.854-3.518-1.004 5.818-1.61 13.132-1.09 21.853 1.316 22.043 14.407 35.9 34.614 36.1h.82c20.208-.2 33.298-14.057 34.616-36.1.52-8.723-.087-16.035-1.092-21.854-11.739 2.315-23.862 3.64-33.86 3.518" }),
2613
+ /* @__PURE__ */ i.jsx("path", { fill: "#eb1923", d: "M32.102 81.235v21.693s9.937 2.004 19.893.616V83.535c-6.307-.357-13.109-1.152-19.893-2.3" }),
2614
+ /* @__PURE__ */ i.jsx("path", { fill: "#eb1923", d: "M105.539 60.412s-19.33 6.102-44.963 6.275h-.153c-25.591-.172-44.896-6.255-44.962-6.275L8.987 76.57c16.193 4.882 36.261 8.028 51.436 7.845h.153c15.175.183 35.242-2.963 51.437-7.845zm0 0" })
2615
+ ] });
2616
+ }
2617
+ const Ea = {
2618
+ text: "Sign in with QQ",
2619
+ icon: Ca,
2620
+ iconFormat: (t) => `fa fa-${t}`,
2621
+ style: { background: "rgb(94,188,249)" },
2622
+ activeStyle: { background: "rgb(76,143,208)" }
2623
+ }, ja = j.createButton(Ea);
2624
+ function La({ width: t = 24, height: e = 24, color: o }) {
2625
+ return /* @__PURE__ */ i.jsx(
2626
+ "img",
2627
+ {
2628
+ src: `${d}/buttons/facebook.svg`,
2629
+ alt: "Sign in with Facebook"
2630
+ }
2631
+ );
2632
+ }
2633
+ const Ta = {
2634
+ text: "Sign in with Facebook",
2635
+ icon: La,
2636
+ iconFormat: (t) => `fa fa-${t}`,
2637
+ style: { background: "#3b5998" },
2638
+ activeStyle: { background: "#2b3f65" }
2639
+ }, Aa = j.createButton(Ta);
2640
+ function Ma({ width: t = 24, height: e = 24, color: o }) {
2641
+ return /* @__PURE__ */ i.jsx("img", { src: `${d}/buttons/weibo.svg`, alt: "Sign in with Weibo" });
2642
+ }
2643
+ const za = {
2644
+ text: "Sign in with Weibo",
2645
+ icon: Ma,
2646
+ iconFormat: (t) => `fa fa-${t}`,
2647
+ style: { background: "#e62329" },
2648
+ activeStyle: { background: "#e54329" }
2649
+ }, Oa = j.createButton(za);
2650
+ function Ba({ width: t = 24, height: e = 24, color: o }) {
2651
+ return /* @__PURE__ */ i.jsx("img", { src: `${d}/buttons/gitee.svg`, alt: "Sign in with Gitee" });
2652
+ }
2653
+ const Ra = {
2654
+ text: "Sign in with Gitee",
2655
+ icon: Ba,
2656
+ iconFormat: (t) => `fa fa-${t}`,
2657
+ style: { background: "rgb(199,29,35)" },
2658
+ activeStyle: { background: "rgb(147,22,26)" }
2659
+ }, Pa = j.createButton(Ra);
2660
+ function Ia({ width: t = 24, height: e = 24, color: o }) {
2661
+ return /* @__PURE__ */ i.jsx(
2662
+ "img",
2663
+ {
2664
+ src: `${d}/buttons/wechat.svg`,
2665
+ alt: "Sign in with Wechat"
2666
+ }
2667
+ );
2668
+ }
2669
+ const Fa = {
2670
+ text: "Sign in with Wechat",
2671
+ icon: Ia,
2672
+ iconFormat: (t) => `fa fa-${t}`,
2673
+ style: { background: "rgb(0,194,80)" },
2674
+ activeStyle: { background: "rgb(0,158,64)" }
2675
+ }, Na = j.createButton(Fa);
2676
+ function Da({ width: t = 24, height: e = 24, color: o }) {
2677
+ return /* @__PURE__ */ i.jsx(
2678
+ "img",
2679
+ {
2680
+ src: `${d}/buttons/dingtalk.svg`,
2681
+ alt: "Sign in with DingTalk"
2682
+ }
2683
+ );
2684
+ }
2685
+ const Ua = {
2686
+ text: "Sign in with DingTalk",
2687
+ icon: Da,
2688
+ iconFormat: (t) => `fa fa-${t}`,
2689
+ style: { background: "#0191e0" },
2690
+ activeStyle: { background: "rgb(76,143,208)" }
2691
+ }, Wa = j.createButton(Ua);
2692
+ function Ha({ width: t = 24, height: e = 24, color: o }) {
2693
+ return /* @__PURE__ */ i.jsx(
2694
+ "img",
2695
+ {
2696
+ src: `${d}/buttons/linkedin.svg`,
2697
+ alt: "Sign in with LinkedIn"
2698
+ }
2699
+ );
2700
+ }
2701
+ const Va = {
2702
+ text: "Sign in with LinkedIn",
2703
+ icon: Ha,
2704
+ iconFormat: (t) => `fa fa-${t}`,
2705
+ style: { background: "rgb(255,255,255)", color: "#000000" },
2706
+ activeStyle: { background: "rgb(240,240,250)" }
2707
+ }, Ga = j.createButton(Va);
2708
+ function qa({ width: t = 24, height: e = 24, color: o }) {
2709
+ return /* @__PURE__ */ i.jsx("img", { src: `${d}/buttons/wecom.svg`, alt: "Sign in with WeCom" });
2710
+ }
2711
+ const Ya = {
2712
+ text: "Sign in with WeCom",
2713
+ icon: qa,
2714
+ iconFormat: (t) => `fa fa-${t}`,
2715
+ style: { background: "rgb(255,255,255)", color: "#000000" },
2716
+ activeStyle: { background: "rgb(100,150,250)" }
2717
+ }, Ka = j.createButton(Ya);
2718
+ function Ja({ width: t = 24, height: e = 24, color: o }) {
2719
+ return /* @__PURE__ */ i.jsx(
2720
+ "img",
2721
+ {
2722
+ src: `${d}/buttons/lark.svg`,
2723
+ alt: "Sign in with Lark",
2724
+ style: { width: 24, height: 24 }
2725
+ }
2726
+ );
2727
+ }
2728
+ const Qa = {
2729
+ text: "Sign in with Lark",
2730
+ icon: Ja,
2731
+ iconFormat: (t) => `fa fa-${t}`,
2732
+ style: { background: "#ffffff", color: "#000000" },
2733
+ activeStyle: { background: "#ededee" }
2734
+ }, Za = j.createButton(Qa);
2735
+ function Xa({ width: t = 24, height: e = 24, color: o }) {
2736
+ return /* @__PURE__ */ i.jsx(
2737
+ "img",
2738
+ {
2739
+ src: `${d}/buttons/gitlab.svg`,
2740
+ alt: "Sign in with GitLab",
2741
+ style: { width: 24, height: 24 }
2742
+ }
2743
+ );
2744
+ }
2745
+ const ei = {
2746
+ text: "Sign in with GitLab",
2747
+ icon: Xa,
2748
+ iconFormat: (t) => `fa fa-${t}`,
2749
+ style: { background: "rgb(255,255,255)", color: "#000000" },
2750
+ activeStyle: { background: "rgb(100,150,250)" }
2751
+ }, ti = j.createButton(ei);
2752
+ function ni({ width: t = 24, height: e = 24, color: o }) {
2753
+ return /* @__PURE__ */ i.jsx(
2754
+ "img",
2755
+ {
2756
+ src: `${d}/buttons/adfs.svg`,
2757
+ alt: "Sign in with ADFS",
2758
+ style: { width: 24, height: 24 }
2759
+ }
2760
+ );
2761
+ }
2762
+ const oi = {
2763
+ text: "Sign in with ADFS",
2764
+ icon: ni,
2765
+ iconFormat: (t) => `fa fa-${t}`,
2766
+ style: { background: "#ffffff", color: "#000000" },
2767
+ activeStyle: { background: "#ededee" }
2768
+ }, ai = j.createButton(oi);
2769
+ function ii({ width: t = 24, height: e = 24, color: o }) {
2770
+ return /* @__PURE__ */ i.jsx(
2771
+ "img",
2772
+ {
2773
+ src: `${d}/buttons/casdoor.svg`,
2774
+ alt: "Sign in with Casdoor",
2775
+ style: { width: 24, height: 24 }
2776
+ }
2777
+ );
2778
+ }
2779
+ const ri = {
2780
+ text: "Sign in with Casdoor",
2781
+ icon: ii,
2782
+ iconFormat: (t) => `fa fa-${t}`,
2783
+ style: { background: "#ffffff", color: "#000000" },
2784
+ activeStyle: { background: "#ededee" }
2785
+ }, li = j.createButton(ri);
2786
+ function ci({ width: t = 24, height: e = 24, color: o }) {
2787
+ return /* @__PURE__ */ i.jsx(
2788
+ "img",
2789
+ {
2790
+ src: `${d}/buttons/baidu.svg`,
2791
+ alt: "Sign in with Baidu",
2792
+ style: { width: 24, height: 24 }
2793
+ }
2794
+ );
2795
+ }
2796
+ const si = {
2797
+ text: "Sign in with Baidu",
2798
+ icon: ci,
2799
+ iconFormat: (t) => `fa fa-${t}`,
2800
+ style: { background: "#ffffff", color: "#000000" },
2801
+ activeStyle: { background: "#ededee" }
2802
+ }, ui = j.createButton(si);
2803
+ function di({ width: t = 24, height: e = 24, color: o }) {
2804
+ return /* @__PURE__ */ i.jsx(
2805
+ "img",
2806
+ {
2807
+ src: `${d}/buttons/alipay.svg`,
2808
+ alt: "Sign in with Alipay",
2809
+ style: { width: 24, height: 24 }
2810
+ }
2811
+ );
2812
+ }
2813
+ const fi = {
2814
+ text: "Sign in with Alipay",
2815
+ icon: di,
2816
+ iconFormat: (t) => `fa fa-${t}`,
2817
+ style: { background: "#ffffff", color: "#000000" },
2818
+ activeStyle: { background: "#ededee" }
2819
+ }, pi = j.createButton(fi);
2820
+ function gi({ width: t = 24, height: e = 24, color: o }) {
2821
+ return /* @__PURE__ */ i.jsx(
2822
+ "img",
2823
+ {
2824
+ src: `${d}/buttons/infoflow.svg`,
2825
+ alt: "Sign in with Infoflow",
2826
+ style: { width: 24, height: 24 }
2827
+ }
2828
+ );
2829
+ }
2830
+ const hi = {
2831
+ text: "Sign in with Infoflow",
2832
+ icon: gi,
2833
+ iconFormat: (t) => `fa fa-${t}`,
2834
+ style: { background: "#ffffff", color: "#000000" },
2835
+ activeStyle: { background: "#ededee" }
2836
+ }, mi = j.createButton(hi);
2837
+ function yi({ width: t = 24, height: e = 24, color: o }) {
2838
+ return /* @__PURE__ */ i.jsx(
2839
+ "img",
2840
+ {
2841
+ src: `${d}/buttons/apple.svg`,
2842
+ alt: "Sign in with Apple",
2843
+ style: { width: 24, height: 24 }
2844
+ }
2845
+ );
2846
+ }
2847
+ const wi = {
2848
+ text: "Sign in with Apple",
2849
+ icon: yi,
2850
+ iconFormat: (t) => `fa fa-${t}`,
2851
+ style: { background: "#ffffff", color: "#000000" },
2852
+ activeStyle: { background: "#ededee" }
2853
+ }, bi = j.createButton(wi);
2854
+ function vi({ width: t = 24, height: e = 24, color: o }) {
2855
+ return /* @__PURE__ */ i.jsx(
2856
+ "img",
2857
+ {
2858
+ src: `${d}/buttons/azuread.svg`,
2859
+ alt: "Sign in with Azure AD",
2860
+ style: { width: 24, height: 24 }
2861
+ }
2862
+ );
2863
+ }
2864
+ const xi = {
2865
+ text: "Sign in with Azure AD",
2866
+ icon: vi,
2867
+ iconFormat: (t) => `fa fa-${t}`,
2868
+ style: { background: "#ffffff", color: "#000000" },
2869
+ activeStyle: { background: "#ededee" }
2870
+ }, $i = j.createButton(xi);
2871
+ function ki({ width: t = 24, height: e = 24, color: o }) {
2872
+ return /* @__PURE__ */ i.jsx(
2873
+ "img",
2874
+ {
2875
+ src: `${d}/buttons/azuread.svg`,
2876
+ alt: "Sign in with Azure AD B2C",
2877
+ style: { width: 24, height: 24 }
2878
+ }
2879
+ );
2880
+ }
2881
+ const Si = {
2882
+ text: "Sign in with Azure AD B2C",
2883
+ icon: ki,
2884
+ iconFormat: (t) => `fa fa-${t}`,
2885
+ style: { background: "#ffffff", color: "#000000" },
2886
+ activeStyle: { background: "#ededee" }
2887
+ }, _i = j.createButton(Si);
2888
+ function Ci({ width: t = 24, height: e = 24, color: o }) {
2889
+ return /* @__PURE__ */ i.jsx(
2890
+ "img",
2891
+ {
2892
+ src: `${d}/buttons/slack.svg`,
2893
+ alt: "Sign in with Slack",
2894
+ style: { width: 24, height: 24 }
2895
+ }
2896
+ );
2897
+ }
2898
+ const Ei = {
2899
+ text: "Sign in with Slack",
2900
+ icon: Ci,
2901
+ iconFormat: (t) => `fa fa-${t}`,
2902
+ style: { background: "#ffffff", color: "#000000" },
2903
+ activeStyle: { background: "#ededee" }
2904
+ }, ji = j.createButton(Ei);
2905
+ function Li({ width: t = 24, height: e = 24, color: o }) {
2906
+ return /* @__PURE__ */ i.jsx(
2907
+ "img",
2908
+ {
2909
+ src: `${d}/buttons/steam.svg`,
2910
+ alt: "Sign in with Steam",
2911
+ style: { width: 24, height: 24 }
2912
+ }
2913
+ );
2914
+ }
2915
+ const Ti = {
2916
+ text: "Sign in with Steam",
2917
+ icon: Li,
2918
+ iconFormat: (t) => `fa fa-${t}`,
2919
+ style: { background: "#ffffff", color: "#000000" },
2920
+ activeStyle: { background: "#ededee" }
2921
+ }, Ai = j.createButton(Ti);
2922
+ function Mi({ width: t = 24, height: e = 24, color: o }) {
2923
+ return /* @__PURE__ */ i.jsx(
2924
+ "img",
2925
+ {
2926
+ src: `${d}/buttons/bilibili.svg`,
2927
+ alt: "Sign in with Bilibili"
2928
+ }
2929
+ );
2930
+ }
2931
+ const zi = {
2932
+ text: "Sign in with Bilibili",
2933
+ icon: Mi,
2934
+ iconFormat: (t) => `fa fa-${t}`,
2935
+ style: { background: "#0191e0" },
2936
+ activeStyle: { background: "rgb(76,143,208)" }
2937
+ }, Oi = j.createButton(zi);
2938
+ function Bi({ width: t = 24, height: e = 24, color: o }) {
2939
+ return /* @__PURE__ */ i.jsx(
2940
+ "img",
2941
+ {
2942
+ src: `${d}/buttons/okta.svg`,
2943
+ alt: "Sign in with Okta",
2944
+ style: { width: 24, height: 24 }
2945
+ }
2946
+ );
2947
+ }
2948
+ const Ri = {
2949
+ text: "Sign in with Okta",
2950
+ icon: Bi,
2951
+ iconFormat: (t) => `fa fa-${t}`,
2952
+ style: { background: "#ffffff", color: "#000000" },
2953
+ activeStyle: { background: "#ededee" }
2954
+ }, Pi = j.createButton(Ri);
2955
+ function Ii({ width: t = 24, height: e = 24, color: o }) {
2956
+ return /* @__PURE__ */ i.jsx(
2957
+ "img",
2958
+ {
2959
+ src: `${d}/buttons/douyin.svg`,
2960
+ alt: "Sign in with Douyin",
2961
+ style: { width: 24, height: 24 }
2962
+ }
2963
+ );
2964
+ }
2965
+ const Fi = {
2966
+ text: "Sign in with Douyin",
2967
+ icon: Ii,
2968
+ iconFormat: (t) => `fa fa-${t}`,
2969
+ style: { background: "#ffffff", color: "#000000" },
2970
+ activeStyle: { background: "#ededee" }
2971
+ }, Ni = j.createButton(Fi);
2972
+ function Di({ type: t, logoUrl: e, align: o = "center", style: r = { background: "#ffffff", color: "#000000" }, activeStyle: a = { background: "#ededee" } }) {
2973
+ function l({ width: f = 24, height: h = 24, color: $ }) {
2974
+ return /* @__PURE__ */ i.jsx("img", { src: e, alt: `Sign in with ${t}`, style: { width: f, height: h } });
2975
+ }
2976
+ const u = {
2977
+ text: `Sign in with ${t}`,
2978
+ icon: l,
2979
+ style: r,
2980
+ activeStyle: a
2981
+ }, g = j.createButton(u), c = Q.t("login:Sign in with {type}").replace("{type}", t);
2982
+ return /* @__PURE__ */ i.jsx(g, { text: c, align: o });
2983
+ }
2984
+ function Je(t) {
2985
+ const e = Q.t("login:Sign in with {type}").replace(
2986
+ "{type}",
2987
+ t.displayName !== "" ? t.displayName : t.type
2988
+ );
2989
+ return t.type === "GitHub" ? /* @__PURE__ */ i.jsx(j.GithubLoginButton, { text: e, align: "center" }) : t.type === "Google" ? /* @__PURE__ */ i.jsx(j.GoogleLoginButton, { text: e, align: "center" }) : t.type === "QQ" ? /* @__PURE__ */ i.jsx(ja, { text: e, align: "center" }) : t.type === "Facebook" ? /* @__PURE__ */ i.jsx(Aa, { text: e, align: "center" }) : t.type === "Weibo" ? /* @__PURE__ */ i.jsx(Oa, { text: e, align: "center" }) : t.type === "Gitee" ? /* @__PURE__ */ i.jsx(Pa, { text: e, align: "center" }) : t.type === "WeChat" ? /* @__PURE__ */ i.jsx(Na, { text: e, align: "center" }) : t.type === "DingTalk" ? /* @__PURE__ */ i.jsx(Wa, { text: e, align: "center" }) : t.type === "LinkedIn" ? /* @__PURE__ */ i.jsx(Ga, { text: e, align: "center" }) : t.type === "WeCom" ? /* @__PURE__ */ i.jsx(Ka, { text: e, align: "center" }) : t.type === "Lark" ? /* @__PURE__ */ i.jsx(Za, { text: e, align: "center" }) : t.type === "GitLab" ? /* @__PURE__ */ i.jsx(ti, { text: e, align: "center" }) : t.type === "ADFS" ? /* @__PURE__ */ i.jsx(ai, { text: e, align: "center" }) : t.type === "Casdoor" ? /* @__PURE__ */ i.jsx(li, { text: e, align: "center" }) : t.type === "Baidu" ? /* @__PURE__ */ i.jsx(ui, { text: e, align: "center" }) : t.type === "Alipay" ? /* @__PURE__ */ i.jsx(pi, { text: e, align: "center" }) : t.type === "Infoflow" ? /* @__PURE__ */ i.jsx(mi, { text: e, align: "center" }) : t.type === "Apple" ? /* @__PURE__ */ i.jsx(bi, { text: e, align: "center" }) : t.type === "AzureAD" ? /* @__PURE__ */ i.jsx($i, { text: e, align: "center" }) : t.type === "AzureADB2C" ? /* @__PURE__ */ i.jsx(_i, { text: e, align: "center" }) : t.type === "Slack" ? /* @__PURE__ */ i.jsx(ji, { text: e, align: "center" }) : t.type === "Steam" ? /* @__PURE__ */ i.jsx(Ai, { text: e, align: "center" }) : t.type === "Bilibili" ? /* @__PURE__ */ i.jsx(Oi, { text: e, align: "center" }) : t.type === "Okta" ? /* @__PURE__ */ i.jsx(Pi, { text: e, align: "center" }) : t.type === "Douyin" ? /* @__PURE__ */ i.jsx(Ni, { text: e, align: "center" }) : /* @__PURE__ */ i.jsx(
2990
+ Di,
2991
+ {
2992
+ type: t.type,
2993
+ logoUrl: se(t)
2994
+ },
2995
+ t.type
2996
+ );
2997
+ }
2998
+ function Qe(t, e) {
2999
+ const o = new URLSearchParams(e.search), r = o.get("client_id") ?? "", a = o.get("state"), l = o.get("redirect_uri"), u = `${window.location.origin}/callback/saml`, g = t.name, c = `${r}&${a}&${g}&${l}&${u}`;
3000
+ Gn(
3001
+ `${t.owner}/${g}`,
3002
+ btoa(c)
3003
+ ).then((f) => {
3004
+ f.data2 === "POST" ? document.write(f.data) : window.location.href = f.data;
3005
+ });
3006
+ }
3007
+ function Bt(t, e, o) {
3008
+ e.type === "MetaMask" ? import("./Web3Auth-hACKSouN.js").then((r) => r.bR).then((r) => {
3009
+ const a = r.authViaMetaMask;
3010
+ a(t, e, o);
3011
+ }) : e.type === "Web3Onboard" && import("./Web3Auth-hACKSouN.js").then((r) => r.bR).then((r) => {
3012
+ const a = r.authViaWeb3Onboard;
3013
+ a(t, e, o);
3014
+ });
3015
+ }
3016
+ function Ui(t, e, o, r, a, l) {
3017
+ if (a === "small") {
3018
+ if (t.category === "OAuth")
3019
+ return t.type === "WeChat" && t.clientId2 !== "" && t.clientSecret2 !== "" && t.disableSsl === !0 && !navigator.userAgent.includes("MicroMessenger") ? /* @__PURE__ */ i.jsx("a", { children: /* @__PURE__ */ i.jsx(
3020
+ "img",
3021
+ {
3022
+ width: o,
3023
+ height: o,
3024
+ src: se(t),
3025
+ alt: t.displayName,
3026
+ className: "provider-img",
3027
+ style: { margin: r },
3028
+ onClick: () => {
3029
+ Zn(e, t, "signup");
3030
+ }
3031
+ }
3032
+ ) }, t.displayName) : /* @__PURE__ */ i.jsx(
3033
+ "a",
3034
+ {
3035
+ href: (void 0)(e, t, "signup"),
3036
+ children: /* @__PURE__ */ i.jsx(
3037
+ "img",
3038
+ {
3039
+ width: o,
3040
+ height: o,
3041
+ src: se(t),
3042
+ alt: t.displayName,
3043
+ className: "provider-img",
3044
+ style: { margin: r }
3045
+ }
3046
+ )
3047
+ },
3048
+ t.displayName
3049
+ );
3050
+ if (t.category === "SAML")
3051
+ return /* @__PURE__ */ i.jsx(
3052
+ "a",
3053
+ {
3054
+ onClick: () => Qe(t, l),
3055
+ children: /* @__PURE__ */ i.jsx(
3056
+ "img",
3057
+ {
3058
+ width: o,
3059
+ height: o,
3060
+ src: se(t),
3061
+ alt: t.displayName,
3062
+ className: "provider-img",
3063
+ style: { margin: r }
3064
+ }
3065
+ )
3066
+ },
3067
+ t.displayName
3068
+ );
3069
+ if (t.category === "Web3")
3070
+ return /* @__PURE__ */ i.jsx(
3071
+ "a",
3072
+ {
3073
+ onClick: () => Bt(e, t, "signup"),
3074
+ children: /* @__PURE__ */ i.jsx(
3075
+ "img",
3076
+ {
3077
+ width: o,
3078
+ height: o,
3079
+ src: se(t),
3080
+ alt: t.displayName,
3081
+ className: "provider-img",
3082
+ style: { margin: r }
3083
+ }
3084
+ )
3085
+ },
3086
+ t.displayName
3087
+ );
3088
+ } else if (t.type === "Custom") {
3089
+ const u = Q.t("login:Sign in with {type}").replace("{type}", t.displayName), g = { display: "block", height: "55px", color: "#000" }, c = {
3090
+ display: "flex",
3091
+ alignItems: "center",
3092
+ width: "calc(100% - 10px)",
3093
+ height: "50px",
3094
+ margin: "5px",
3095
+ padding: "0 10px",
3096
+ backgroundColor: "transparent",
3097
+ boxShadow: "0px 1px 3px rgba(0,0,0,0.5)",
3098
+ border: "0px",
3099
+ borderRadius: "3px",
3100
+ cursor: "pointer"
3101
+ }, f = { justfyContent: "space-between" }, h = {
3102
+ textAlign: "center",
3103
+ width: "100%",
3104
+ fontSize: "19px"
3105
+ };
3106
+ if (t.category === "OAuth")
3107
+ return /* @__PURE__ */ i.jsx(
3108
+ "a",
3109
+ {
3110
+ href: (void 0)(e, t, "signup"),
3111
+ style: g,
3112
+ children: /* @__PURE__ */ i.jsxs("div", { style: c, children: [
3113
+ /* @__PURE__ */ i.jsx(
3114
+ "img",
3115
+ {
3116
+ width: 26,
3117
+ src: se(t),
3118
+ alt: t.displayName,
3119
+ className: "provider-img",
3120
+ style: f
3121
+ }
3122
+ ),
3123
+ /* @__PURE__ */ i.jsx("span", { style: h, children: u })
3124
+ ] })
3125
+ },
3126
+ t.displayName
3127
+ );
3128
+ if (t.category === "SAML")
3129
+ return /* @__PURE__ */ i.jsx(
3130
+ "a",
3131
+ {
3132
+ onClick: () => Qe(t, l),
3133
+ style: g,
3134
+ children: /* @__PURE__ */ i.jsxs("div", { style: c, children: [
3135
+ /* @__PURE__ */ i.jsx(
3136
+ "img",
3137
+ {
3138
+ width: 26,
3139
+ src: se(t),
3140
+ alt: t.displayName,
3141
+ className: "provider-img",
3142
+ style: f
3143
+ }
3144
+ ),
3145
+ /* @__PURE__ */ i.jsx("span", { style: h, children: u })
3146
+ ] })
3147
+ },
3148
+ t.displayName
3149
+ );
3150
+ } else
3151
+ return t.category === "SAML" ? /* @__PURE__ */ i.jsx("div", { className: "provider-big-img", children: /* @__PURE__ */ i.jsx("a", { onClick: () => Qe(t, l), children: Je(t) }) }, t.displayName) : t.category === "Web3" ? /* @__PURE__ */ i.jsx("div", { className: "provider-big-img", children: /* @__PURE__ */ i.jsx("a", { onClick: () => Bt(e, t, "signup"), children: Je(t) }) }, t.displayName) : /* @__PURE__ */ i.jsx("div", { className: "provider-big-img", children: /* @__PURE__ */ i.jsx("a", { href: (void 0)(e, t, "signup"), children: Je(t) }) }, t.displayName);
3152
+ }
3153
+ function Wi(t) {
3154
+ return t.length < 6 ? Q.t("user:The password must have at least 6 characters") : "";
3155
+ }
3156
+ function Hi(t) {
3157
+ return t.length < 8 ? Q.t("user:The password must have at least 8 characters") : "";
3158
+ }
3159
+ function Vi(t) {
3160
+ return /^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9]).+$/.test(t) ? "" : Q.t(
3161
+ "user:The password must contain at least one uppercase letter, one lowercase letter and one digit"
3162
+ );
3163
+ }
3164
+ function Gi(t) {
3165
+ return /^(?=.*[!-/:-@[-`{-~]).+$/.test(t) ? "" : Q.t(
3166
+ "user:The password must contain at least one special character"
3167
+ );
3168
+ }
3169
+ function qi(t) {
3170
+ return /(.)\1+/.test(t) ? Q.t(
3171
+ "user:The password must not contain any repeated characters"
3172
+ ) : "";
3173
+ }
3174
+ function Yi(t, e) {
3175
+ if (t.length === 0)
3176
+ return Q.t("login:Please input your password!");
3177
+ (!e || e.length === 0) && (e = ["AtLeast6"]);
3178
+ const o = {
3179
+ AtLeast6: Wi,
3180
+ AtLeast8: Hi,
3181
+ Aa123: Vi,
3182
+ SpecialChar: Gi,
3183
+ NoRepeat: qi
3184
+ };
3185
+ for (const r of e) {
3186
+ const a = o[r];
3187
+ if (a) {
3188
+ const l = a(t);
3189
+ if (l !== "")
3190
+ return l;
3191
+ }
3192
+ }
3193
+ return "";
3194
+ }
3195
+ function Ki({
3196
+ application: t,
3197
+ state: e,
3198
+ setState: o
3199
+ }) {
3200
+ const [r, a] = m.useState(!1), l = m.useRef(null);
3201
+ m.useEffect(() => {
3202
+ l.current || (l.current = document.getElementById(
3203
+ "agreementDialog"
3204
+ ));
3205
+ }, []), m.useEffect(() => {
3206
+ l.current && (r ? l.current.showModal() : l.current.close());
3207
+ }, [r]);
3208
+ const u = () => {
3209
+ o({ ...e, agreement: !1 }), a(!1);
3210
+ }, g = () => {
3211
+ o({ ...e, agreement: !0 }), a(!1);
3212
+ }, c = () => {
3213
+ a(!0);
3214
+ };
3215
+ return /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
3216
+ /* @__PURE__ */ i.jsx("dialog", { id: "agreementDialog", className: "modal", children: /* @__PURE__ */ i.jsxs("div", { className: "modal-box", children: [
3217
+ /* @__PURE__ */ i.jsx("div", { className: "mt-4 mb-8", children: /* @__PURE__ */ i.jsx(
3218
+ "iframe",
3219
+ {
3220
+ src: t.termsOfUse,
3221
+ width: "100%",
3222
+ height: "300px",
3223
+ sandbox: "allow-scripts"
3224
+ }
3225
+ ) }),
3226
+ /* @__PURE__ */ i.jsxs("div", { className: "modal-action", children: [
3227
+ /* @__PURE__ */ i.jsx("form", { method: "dialog", className: "modal-backdrop", children: /* @__PURE__ */ i.jsx("button", { children: "Close" }) }),
3228
+ /* @__PURE__ */ i.jsxs("form", { method: "dialog", className: "flex gap-3", children: [
3229
+ /* @__PURE__ */ i.jsx("button", { className: "btn", onClick: u, children: "Cancel" }, "closebtn"),
3230
+ /* @__PURE__ */ i.jsx(
3231
+ "button",
3232
+ {
3233
+ className: "btn btn-primary",
3234
+ onClick: g,
3235
+ children: "OK"
3236
+ },
3237
+ "okbtn"
3238
+ )
3239
+ ] })
3240
+ ] })
3241
+ ] }) }),
3242
+ /* @__PURE__ */ i.jsx("input", { checked: !!e.agreement, type: "checkbox", readOnly: !0 }),
3243
+ /* @__PURE__ */ i.jsx("button", { onClick: c, children: "Open Terms" })
3244
+ ] });
3245
+ }
3246
+ async function Ji(t, e, o) {
3247
+ const { callbackUrl: r = window.location.href, redirect: a = !0 } = {}, { prefix: l = "/api/auth", ...u } = {}, c = t === "email", h = `${`${l}/signin/${t}`}?${new URLSearchParams(o)}`, $ = await fetch(`${l}/csrf`), { csrfToken: w } = await $.json(), b = await fetch(h, {
3248
+ method: "post",
3249
+ headers: {
3250
+ "Content-Type": "application/x-www-form-urlencoded",
3251
+ "X-Auth-Return-Redirect": "1"
3252
+ },
3253
+ // @ts-expect-error -- ignore
3254
+ body: new URLSearchParams({
3255
+ ...u,
3256
+ csrfToken: w,
3257
+ callbackUrl: r
3258
+ })
3259
+ }), L = await b.clone().json(), F = new URL(L.url).searchParams.get("error");
3260
+ if (a || !c || !F) {
3261
+ window.location.href = L.url ?? r, L.url.includes("#") && window.location.reload();
3262
+ return;
3263
+ }
3264
+ return b;
3265
+ }
3266
+ function J({
3267
+ label: t,
3268
+ name: e,
3269
+ rules: o,
3270
+ inputEl: r,
3271
+ setFieldValue: a,
3272
+ onChange: l,
3273
+ ...u
3274
+ }) {
3275
+ return /* @__PURE__ */ i.jsxs("label", { className: "form-control w-full max-w-xs", htmlFor: e, children: [
3276
+ /* @__PURE__ */ i.jsx("div", { className: "label", children: /* @__PURE__ */ i.jsx("span", { className: "label-text", children: t }) }),
3277
+ r || /* @__PURE__ */ i.jsx(
3278
+ "input",
3279
+ {
3280
+ type: "text",
3281
+ ...u,
3282
+ name: e,
3283
+ className: "input input-bordered w-full max-w-xs",
3284
+ onChange: (g) => {
3285
+ a(e, g.target.value), l == null || l(g);
3286
+ }
3287
+ }
3288
+ ),
3289
+ /* @__PURE__ */ i.jsx("div", { className: "label flex-col", children: o == null ? void 0 : o.map((g, c) => /* @__PURE__ */ i.jsx("span", { className: "label-text-alt", children: g.message }, e + c)) })
3290
+ ] });
3291
+ }
3292
+ const Qi = (t, e) => (delete t.applicationName, delete t.emailOrPhoneMode, delete t.isTermsOfUseVisible, {
3293
+ application: e.name,
3294
+ organization: e.organization,
3295
+ plan: null,
3296
+ pricing: null,
3297
+ ...t
3298
+ }), Zi = (t, e, o) => {
3299
+ t.preventDefault();
3300
+ const r = Qi(e, o);
3301
+ console.log(r), Wn(r).then((a) => {
3302
+ a.status === "ok" ? (r.username = a.data.split("/")[1], o && Nn(o) ? Un("").then((l) => {
3303
+ let u = null;
3304
+ l.status === "ok" ? (u = l.data, u.organization = l.data2, console.log("account", u), alert("redirect")) : G("error", `Failed to sign in: ${l.msg}`);
3305
+ }) : (alert("redirect"), Ji())) : G("error", a.msg);
3306
+ });
3307
+ };
3308
+ function Xi(t, e, o, r, a) {
3309
+ if (!e.visible)
3310
+ return null;
3311
+ const l = (g, c) => {
3312
+ o[g] = c, r(o);
3313
+ }, u = e.required;
3314
+ if (e.name === "Username")
3315
+ return /* @__PURE__ */ i.jsx(
3316
+ J,
3317
+ {
3318
+ name: "username",
3319
+ className: "signup-username",
3320
+ label: e.label ? e.label : a("signup.username"),
3321
+ rules: [
3322
+ {
3323
+ required: u,
3324
+ message: a("forget.username"),
3325
+ whitespace: !0
3326
+ }
3327
+ ],
3328
+ placeholder: e.placeholder,
3329
+ disabled: o.invitation !== void 0 && o.invitation.username !== "",
3330
+ setFieldValue: l
3331
+ }
3332
+ );
3333
+ if (e.name === "Display name")
3334
+ return e.rule === "First, last" && jn() !== "zh" ? /* @__PURE__ */ i.jsxs(m.Fragment, { children: [
3335
+ /* @__PURE__ */ i.jsx(
3336
+ J,
3337
+ {
3338
+ name: "firstName",
3339
+ className: "signup-first-name",
3340
+ label: e.label ? e.label : a("general.firstName"),
3341
+ rules: [
3342
+ {
3343
+ required: u,
3344
+ message: a("forget.firstName"),
3345
+ whitespace: !0
3346
+ }
3347
+ ],
3348
+ placeholder: e.placeholder,
3349
+ setFieldValue: l
3350
+ }
3351
+ ),
3352
+ /* @__PURE__ */ i.jsx(
3353
+ J,
3354
+ {
3355
+ name: "lastName",
3356
+ className: "signup-last-name",
3357
+ label: e.label ? e.label : a("general.lastName"),
3358
+ rules: [
3359
+ {
3360
+ required: u,
3361
+ message: a("forget.lastName"),
3362
+ whitespace: !0
3363
+ }
3364
+ ],
3365
+ placeholder: e.placeholder,
3366
+ setFieldValue: l
3367
+ }
3368
+ )
3369
+ ] }) : /* @__PURE__ */ i.jsx(
3370
+ J,
3371
+ {
3372
+ name: "name",
3373
+ className: "signup-name",
3374
+ label: e.label ? e.label : e.rule === "Real name" || e.rule === "First, last" ? a("general.realName") : a("general.displayName"),
3375
+ rules: [
3376
+ {
3377
+ required: u,
3378
+ message: e.rule === "Real name" || e.rule === "First, last" ? a("forget.realName") : a("forget.displayName"),
3379
+ whitespace: !0
3380
+ }
3381
+ ],
3382
+ placeholder: e.placeholder,
3383
+ setFieldValue: l
3384
+ }
3385
+ );
3386
+ if (e.name === "Affiliation")
3387
+ return /* @__PURE__ */ i.jsx(
3388
+ J,
3389
+ {
3390
+ name: "affiliation",
3391
+ className: "signup-affiliation",
3392
+ label: e.label ? e.label : a("user.affiliation"),
3393
+ rules: [
3394
+ {
3395
+ required: u,
3396
+ message: a("forget.affiliation"),
3397
+ whitespace: !0
3398
+ }
3399
+ ],
3400
+ placeholder: e.placeholder,
3401
+ setFieldValue: l
3402
+ }
3403
+ );
3404
+ if (e.name === "ID card")
3405
+ return /* @__PURE__ */ i.jsx(
3406
+ J,
3407
+ {
3408
+ name: "idCard",
3409
+ className: "signup-idcard",
3410
+ label: e.label ? e.label : a("user.idCard"),
3411
+ rules: [
3412
+ {
3413
+ required: u,
3414
+ message: a("forget.idCard"),
3415
+ whitespace: !0
3416
+ },
3417
+ {
3418
+ required: u,
3419
+ pattern: new RegExp(
3420
+ /^[1-9]\d{5}(18|19|20)\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9X]$/,
3421
+ "g"
3422
+ ),
3423
+ message: a("format.idCard")
3424
+ }
3425
+ ],
3426
+ placeholder: e.placeholder,
3427
+ setFieldValue: l
3428
+ }
3429
+ );
3430
+ if (e.name === "Email" || e.name === "Phone" || e.name === "Email or Phone" || e.name === "Phone or Email") {
3431
+ const g = () => /* @__PURE__ */ i.jsxs(m.Fragment, { children: [
3432
+ /* @__PURE__ */ i.jsx(
3433
+ J,
3434
+ {
3435
+ name: "email",
3436
+ label: e.label ? e.label : a("general.email"),
3437
+ rules: [
3438
+ {
3439
+ required: u,
3440
+ message: a("forget.email")
3441
+ }
3442
+ ],
3443
+ placeholder: e.placeholder,
3444
+ disabled: o.invitation !== void 0 && o.invitation.email !== "",
3445
+ onChange: (f) => {
3446
+ const h = f.target.value;
3447
+ console.log("email", h, vt(h)), h !== "" && !vt(h) ? r({ ...o, email: h, validEmail: !1 }) : r({ ...o, email: h, validEmail: !0 });
3448
+ },
3449
+ setFieldValue: l
3450
+ }
3451
+ ),
3452
+ e.rule !== "No verification" && /* @__PURE__ */ i.jsx(
3453
+ J,
3454
+ {
3455
+ name: "emailCode",
3456
+ className: "signup-email-code",
3457
+ label: e.label ? e.label : a("code.email"),
3458
+ rules: [
3459
+ {
3460
+ required: u,
3461
+ message: a("forget.code")
3462
+ }
3463
+ ],
3464
+ inputEl: /* @__PURE__ */ i.jsx(
3465
+ to,
3466
+ {
3467
+ disabled: !o.validEmail,
3468
+ method: "signup",
3469
+ onButtonClickArgs: [o.email, "email", t.name],
3470
+ application: t,
3471
+ countryCode: "US",
3472
+ onChange: (f) => r({ ...o, emailCode: f })
3473
+ }
3474
+ ),
3475
+ setFieldValue: l
3476
+ }
3477
+ )
3478
+ ] }), c = () => /* @__PURE__ */ i.jsx(i.Fragment, {});
3479
+ if (e.name === "Email")
3480
+ return g();
3481
+ if (e.name === "Phone")
3482
+ return c();
3483
+ if (e.name === "Email or Phone" || e.name === "Phone or Email") {
3484
+ let f = o.emailOrPhoneMode;
3485
+ return f === "" && (f = e.name === "Email or Phone" ? "Email" : "Phone"), /* @__PURE__ */ i.jsxs(m.Fragment, { children: [
3486
+ /* @__PURE__ */ i.jsx("div", { style: { marginTop: "30px", marginBottom: "20px" } }),
3487
+ f === "Email" ? g() : c()
3488
+ ] });
3489
+ } else
3490
+ return null;
3491
+ } else {
3492
+ if (e.name === "Password")
3493
+ return /* @__PURE__ */ i.jsx(
3494
+ J,
3495
+ {
3496
+ name: "password",
3497
+ className: "signup-password",
3498
+ label: e.label ? e.label : a("general.password"),
3499
+ rules: [
3500
+ {
3501
+ required: u,
3502
+ validateTrigger: "onChange",
3503
+ validator: (g, c) => {
3504
+ const f = Yi(
3505
+ c,
3506
+ t.organizationObj.passwordOptions
3507
+ );
3508
+ return f === "" ? Promise.resolve() : Promise.reject(f);
3509
+ }
3510
+ }
3511
+ ],
3512
+ setFieldValue: l,
3513
+ type: "password",
3514
+ placeholder: e.placeholder
3515
+ }
3516
+ );
3517
+ if (e.name === "Confirm password")
3518
+ return /* @__PURE__ */ i.jsx(
3519
+ J,
3520
+ {
3521
+ name: "confirm",
3522
+ className: "signup-confirm",
3523
+ label: e.label ? e.label : a("signup.confirm"),
3524
+ rules: [
3525
+ {
3526
+ required: u,
3527
+ message: a("forget.confirm")
3528
+ }
3529
+ // ({ getFieldValue }) => ({
3530
+ // validator(rule, value) {
3531
+ // if (!value || getFieldValue("password") === value) {
3532
+ // return Promise.resolve();
3533
+ // }
3534
+ // return Promise.reject(
3535
+ // t(
3536
+ // "signup:Your confirmed password is inconsistent with the password!"
3537
+ // )
3538
+ // );
3539
+ // },
3540
+ // }),
3541
+ ],
3542
+ type: "password",
3543
+ placeholder: e.placeholder,
3544
+ setFieldValue: l
3545
+ }
3546
+ );
3547
+ if (e.name === "Invitation code")
3548
+ return /* @__PURE__ */ i.jsx(
3549
+ J,
3550
+ {
3551
+ name: "invitationCode",
3552
+ className: "signup-invitation-code",
3553
+ label: e.label ? e.label : a("application.invitationCode"),
3554
+ rules: [
3555
+ {
3556
+ required: u,
3557
+ message: a("forget.invitationCode")
3558
+ }
3559
+ ],
3560
+ placeholder: e.placeholder,
3561
+ disabled: o.invitation !== void 0 && o.invitation !== "",
3562
+ setFieldValue: l
3563
+ }
3564
+ );
3565
+ if (e.name === "Agreement")
3566
+ return /* @__PURE__ */ i.jsx(
3567
+ Ki,
3568
+ {
3569
+ state: o,
3570
+ setState: r,
3571
+ application: t
3572
+ }
3573
+ );
3574
+ if (e.name.startsWith("Text "))
3575
+ return /* @__PURE__ */ i.jsx("div", { dangerouslySetInnerHTML: { __html: e.label } });
3576
+ if (e.name === "Signup button")
3577
+ return /* @__PURE__ */ i.jsxs("form", { onSubmit: (g) => Zi(g, o, t), children: [
3578
+ /* @__PURE__ */ i.jsx("button", { className: "btn btn-primary", type: "submit", children: a("signup.signUp") }),
3579
+ "  ",
3580
+ a("signup.haveAccount"),
3581
+ " ",
3582
+ /* @__PURE__ */ i.jsx(
3583
+ "a",
3584
+ {
3585
+ className: "signup-link",
3586
+ onClick: () => {
3587
+ const g = sessionStorage.getItem("signinUrl");
3588
+ alert("redirect");
3589
+ },
3590
+ children: a("signup.signInNow")
3591
+ }
3592
+ )
3593
+ ] });
3594
+ if (e.name === "Providers" && t.providers) {
3595
+ const g = Rn(t) || Pn(t) || In(t) || Fn(t);
3596
+ return (e.rule === "None" || e.rule === "") && (e.rule = g ? "small" : "big"), t.providers.filter((c) => Pt(c)).map((c) => Ui(
3597
+ c.provider,
3598
+ t,
3599
+ null,
3600
+ null,
3601
+ e.rule,
3602
+ { search: window.location.search }
3603
+ ));
3604
+ }
3605
+ }
3606
+ return e.name;
3607
+ }
3608
+ const er = {
3609
+ signup: {
3610
+ username: "Username",
3611
+ confirm: "Confirm password",
3612
+ signInNow: "Sign In Now",
3613
+ signUp: "Sign Up",
3614
+ haveAccount: "Have account?"
3615
+ },
3616
+ forget: {
3617
+ username: "Please input your username.",
3618
+ firstName: "Please input your first name.",
3619
+ lastName: "Please input your last name.",
3620
+ realName: "Please input your real name.",
3621
+ displayName: "Please input your display name.",
3622
+ affliation: "Please input your affliation.",
3623
+ idCard: "Please input your ID card number.",
3624
+ code: "Please input your verification code.",
3625
+ email: "Please input your email.",
3626
+ confirm: "Please confirm your password and ensure it matches.",
3627
+ invitationCode: "Please input your invitation code."
3628
+ },
3629
+ format: {
3630
+ idCard: "The ID card number format is incorrect."
3631
+ },
3632
+ general: {
3633
+ firstName: "First name",
3634
+ lastName: "Last name",
3635
+ displayName: "Display name",
3636
+ realName: "Real name",
3637
+ email: "Email",
3638
+ password: "Password",
3639
+ captcha: "Captcha"
3640
+ },
3641
+ user: {
3642
+ affliation: "Affliation",
3643
+ idCard: "ID card"
3644
+ },
3645
+ code: {
3646
+ email: "Email code",
3647
+ sending: "Sending",
3648
+ sendCode: "Send code"
3649
+ },
3650
+ application: {
3651
+ invitationCode: "Invitation code"
3652
+ }
3653
+ }, tr = {
3654
+ translation: er
3655
+ };
3656
+ Q.use(Sn).init({
3657
+ lng: "en",
3658
+ fallbackLng: "en",
3659
+ // use en if detected lng is not available
3660
+ resources: {
3661
+ en: tr
3662
+ }
3663
+ });
3664
+ function nr(t, e, o) {
3665
+ const r = /* @__PURE__ */ i.jsxs(
3666
+ "svg",
3667
+ {
3668
+ xmlns: "http://www.w3.org/2000/svg",
3669
+ width: "24",
3670
+ height: "24",
3671
+ viewBox: "0 0 24 24",
3672
+ fill: "none",
3673
+ stroke: "currentColor",
3674
+ "stroke-width": "2",
3675
+ "stroke-linecap": "round",
3676
+ "stroke-linejoin": "round",
3677
+ className: "lucide lucide-eye",
3678
+ children: [
3679
+ /* @__PURE__ */ i.jsx("path", { d: "M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z" }),
3680
+ /* @__PURE__ */ i.jsx("circle", { cx: "12", cy: "12", r: "3" })
3681
+ ]
3682
+ }
3683
+ ), a = /* @__PURE__ */ i.jsxs(
3684
+ "svg",
3685
+ {
3686
+ xmlns: "http://www.w3.org/2000/svg",
3687
+ width: "24",
3688
+ height: "24",
3689
+ viewBox: "0 0 24 24",
3690
+ fill: "none",
3691
+ stroke: "currentColor",
3692
+ "stroke-width": "2",
3693
+ "stroke-linecap": "round",
3694
+ "stroke-linejoin": "round",
3695
+ className: "lucide lucide-eye-off",
3696
+ children: [
3697
+ /* @__PURE__ */ i.jsx("path", { d: "M9.88 9.88a3 3 0 1 0 4.24 4.24" }),
3698
+ /* @__PURE__ */ i.jsx("path", { d: "M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68" }),
3699
+ /* @__PURE__ */ i.jsx("path", { d: "M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61" }),
3700
+ /* @__PURE__ */ i.jsx("line", { x1: "2", x2: "22", y1: "2", y2: "22" })
3701
+ ]
3702
+ }
3703
+ ), l = Me(t), u = te(t);
3704
+ if (l === "password") {
3705
+ const g = e.password.state[u];
3706
+ return /* @__PURE__ */ i.jsxs(
3707
+ o,
3708
+ {
3709
+ variant: "ghost",
3710
+ size: "icon",
3711
+ className: "absolute top-1/2 right-2 -translate-y-1/2",
3712
+ onClick: (c) => {
3713
+ c.preventDefault(), c.stopPropagation(), e.password.setState({
3714
+ ...e.password.state,
3715
+ [u]: !g
3716
+ });
3717
+ },
3718
+ children: [
3719
+ g ? a : r,
3720
+ /* @__PURE__ */ i.jsx("span", { className: "sr-only", children: "Toggle password visibility" })
3721
+ ]
3722
+ }
3723
+ );
3724
+ } else
3725
+ return null;
3726
+ }
3727
+ function te(t) {
3728
+ const e = {
3729
+ ID: "id",
3730
+ Username: "username",
3731
+ // also firstName, lastName
3732
+ "Display name": "name",
3733
+ Affiliation: "affiliation",
3734
+ "ID card": "idCard",
3735
+ Email: "email",
3736
+ Phone: "phone",
3737
+ Password: "password",
3738
+ "Confirm password": "confirm",
3739
+ "Invitation code": "invitationCode",
3740
+ "Country/Region": "country_region",
3741
+ Agreement: "agreement"
3742
+ };
3743
+ return Object.keys(e).includes(t.name) ? e[t.name] : t.name;
3744
+ }
3745
+ function Me(t, e) {
3746
+ const o = ["password", "confirm"], r = te(t);
3747
+ return o.includes(r) && !(e != null && e.hidePassword[r]) ? "password" : "text";
3748
+ }
3749
+ function or(t) {
3750
+ return Object.fromEntries(
3751
+ t.filter((e) => Me(e) === "password").map((e) => [te(e), !1])
3752
+ );
3753
+ }
3754
+ function ar(t) {
3755
+ return {
3756
+ name: te(t),
3757
+ label: t.label || t.name,
3758
+ placeholder: t.placeholder,
3759
+ required: t.required,
3760
+ type: Me(t)
3761
+ };
3762
+ }
3763
+ function ir(t, e) {
3764
+ const o = te(e);
3765
+ let r = t.string();
3766
+ return o === "email" && (r = r.email()), e.required || (r = r.optional()), r;
3767
+ }
3768
+ function rr(t) {
3769
+ const e = t.map((r) => [te(r), ""]), o = t.filter((r) => qt(r)).map((r) => [te(r) + "Code", ""]);
3770
+ return Object.fromEntries([...e, ...o]);
3771
+ }
3772
+ function qt(t) {
3773
+ const e = te(t);
3774
+ return (e === "email" || e === "phone") && t.rule !== "No verification";
3775
+ }
3776
+ function lr(t) {
3777
+ var $;
3778
+ const { t: e, i18n: o } = Te(), [r, a] = m.useState({
3779
+ applicationName: t.applicationName ?? null,
3780
+ email: "",
3781
+ phone: "",
3782
+ emailOrPhoneMode: "",
3783
+ countryCode: "",
3784
+ emailCode: "",
3785
+ phoneCode: "",
3786
+ validEmail: !1,
3787
+ validPhone: !1,
3788
+ region: "",
3789
+ isTermsOfUseVisible: !1,
3790
+ termsOfUseContent: ""
3791
+ });
3792
+ m.useRef();
3793
+ const l = (w) => {
3794
+ w !== void 0 && Xe("admin", w).then(
3795
+ (b) => {
3796
+ if (b.status === "error") {
3797
+ G("error", b.msg);
3798
+ return;
3799
+ }
3800
+ f(b.data);
3801
+ }
3802
+ );
3803
+ }, u = (w) => {
3804
+ It(w).then((b) => {
3805
+ if (b.status === "ok") {
3806
+ const L = b.data;
3807
+ f(L);
3808
+ } else
3809
+ f(null), a({
3810
+ ...r,
3811
+ msg: b.msg
3812
+ });
3813
+ });
3814
+ }, g = () => t.application, c = (w, b) => {
3815
+ Nt(w, b).then(
3816
+ (L) => {
3817
+ if (L.status === "error") {
3818
+ G("error", L.msg);
3819
+ return;
3820
+ }
3821
+ a({ ...r, invitation: L.data });
3822
+ }
3823
+ );
3824
+ }, f = (w) => {
3825
+ t.onUpdateApplication(w);
3826
+ };
3827
+ m.useEffect(() => {
3828
+ const w = Ft();
3829
+ if (w !== null) {
3830
+ const b = window.location.pathname.replace(
3831
+ "/signup/oauth/authorize",
3832
+ "/login/oauth/authorize"
3833
+ );
3834
+ sessionStorage.setItem("signinUrl", b + window.location.search);
3835
+ }
3836
+ if (g() === void 0)
3837
+ if (r.applicationName !== null) {
3838
+ l(r.applicationName);
3839
+ const b = new URLSearchParams(window.location.search);
3840
+ if (b.has("invitationCode")) {
3841
+ const L = b.get("invitationCode") ?? "";
3842
+ a({ ...r, invitationCode: L }), L !== "" && c(
3843
+ L,
3844
+ "admin/" + r.applicationName
3845
+ );
3846
+ }
3847
+ } else w !== null ? u(w) : (G(
3848
+ "error",
3849
+ `Unknown application name: ${r.applicationName}`
3850
+ ), f(null));
3851
+ }, []);
3852
+ const h = g();
3853
+ return h == null ? null : ($ = h.signupItems) == null ? void 0 : $.map((w, b) => /* @__PURE__ */ i.jsx("div", { children: Xi(h, w, r, a, e) }, b));
3854
+ }
3855
+ function pr({
3856
+ applicationName: t,
3857
+ casdoorApiRoot: e,
3858
+ springmicroApiRoot: o
3859
+ }) {
3860
+ I.casdoor = e, o && (I.springmicro = o);
3861
+ const [r, a] = m.useState({ application: null }), l = () => {
3862
+ Xe("admin", t).then(
3863
+ (u) => {
3864
+ if (console.log(u), u.status === "error") {
3865
+ G("error", u.msg);
3866
+ return;
3867
+ }
3868
+ a({
3869
+ application: u.data
3870
+ });
3871
+ }
3872
+ );
3873
+ };
3874
+ return m.useEffect(() => {
3875
+ l();
3876
+ }, []), r.application === void 0 ? /* @__PURE__ */ i.jsx(i.Fragment, {}) : /* @__PURE__ */ i.jsx(_n, { i18n: Q, children: /* @__PURE__ */ i.jsx(
3877
+ lr,
3878
+ {
3879
+ application: r.application,
3880
+ onUpdateApplication: (u) => {
3881
+ a({
3882
+ application: u
3883
+ });
3884
+ }
3885
+ }
3886
+ ) });
3887
+ }
3888
+ const Yt = m.createContext(
3889
+ void 0
3890
+ );
3891
+ function gr({
3892
+ applicationName: t,
3893
+ casdoorApiRoot: e,
3894
+ springmicroApiRoot: o,
3895
+ children: r
3896
+ }) {
3897
+ Te(), I.casdoor = e, o && (I.springmicro = o);
3898
+ const [a, l] = m.useState({ application: null }), [u, g] = m.useState({}), c = () => {
3899
+ Xe("admin", t).then(
3900
+ (E) => {
3901
+ if (console.log(E), E.status === "error") {
3902
+ G("error", E.msg);
3903
+ return;
3904
+ }
3905
+ l({
3906
+ application: E.data
3907
+ });
3908
+ }
3909
+ );
3910
+ }, f = (E) => {
3911
+ l({
3912
+ application: E
3913
+ });
3914
+ }, h = (E, _) => {
3915
+ Nt(E, _).then(
3916
+ (k) => {
3917
+ if (k.status === "error") {
3918
+ G("error", k.msg);
3919
+ return;
3920
+ }
3921
+ l({ ...a, invitation: k.data });
3922
+ }
3923
+ );
3924
+ }, $ = (E) => {
3925
+ It(E).then((_) => {
3926
+ if (_.status === "ok") {
3927
+ const k = _.data;
3928
+ f(k);
3929
+ } else
3930
+ f(null), l({
3931
+ ...a,
3932
+ msg: _.msg
3933
+ });
3934
+ });
3935
+ }, w = (E, _) => nr(
3936
+ E,
3937
+ {
3938
+ password: {
3939
+ state: u,
3940
+ setState: g
3941
+ }
3942
+ },
3943
+ _
3944
+ ), b = (E) => Me(E, {
3945
+ hidePassword: u
3946
+ }), L = Dt, F = Ut;
3947
+ return m.useEffect(() => {
3948
+ c();
3949
+ }, []), m.useEffect(() => {
3950
+ a.application && g(
3951
+ or(a.application.signupItems)
3952
+ );
3953
+ }, [a.application]), m.useEffect(() => {
3954
+ const E = Ft();
3955
+ if (E !== null) {
3956
+ const _ = window.location.pathname.replace(
3957
+ "/signup/oauth/authorize",
3958
+ "/login/oauth/authorize"
3959
+ );
3960
+ sessionStorage.setItem("signinUrl", _ + window.location.search);
3961
+ }
3962
+ if (a.application === void 0)
3963
+ if (a.applicationName !== null) {
3964
+ c();
3965
+ const _ = new URLSearchParams(window.location.search);
3966
+ if (_.has("invitationCode")) {
3967
+ const k = _.get("invitationCode") ?? "";
3968
+ l({ ...a, invitationCode: k }), k !== "" && h(
3969
+ k,
3970
+ "admin/" + a.applicationName
3971
+ );
3972
+ }
3973
+ } else E !== null ? $(E) : (G(
3974
+ "error",
3975
+ `Unknown application name: ${a.applicationName}`
3976
+ ), f(null));
3977
+ }, []), a.application === void 0 || a.application === null ? null : /* @__PURE__ */ i.jsx(
3978
+ Yt.Provider,
3979
+ {
3980
+ value: {
3981
+ application: a.application,
3982
+ getDefaultValues: rr,
3983
+ getFormProps: ar,
3984
+ icon: w,
3985
+ getZod: ir,
3986
+ getKey: te,
3987
+ type: b,
3988
+ sendCode: L,
3989
+ requiresCode: qt,
3990
+ getCaptcha: F
3991
+ },
3992
+ children: r
3993
+ }
3994
+ );
3995
+ }
3996
+ const hr = () => {
3997
+ const t = m.useContext(Yt);
3998
+ if (!t)
3999
+ throw new Error("useSignUp must be used within a SignUpProvider");
4000
+ return t;
4001
+ };
4002
+ export {
4003
+ pr as S,
4004
+ Ln as a,
4005
+ fr as b,
4006
+ gr as c,
4007
+ Kn as g,
4008
+ G as s,
4009
+ hr as u
4010
+ };