@hintergrund/ui 0.2.1 → 0.2.3
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.
- package/dist/Builder-H8tY8V9I.js +14172 -0
- package/dist/admin.js +11160 -9739
- package/dist/{anthropic-UhrJpH25.js → anthropic-messages-C3hIUlsA.js} +1134 -1055
- package/dist/azure-openai-responses-t7u41KMr.js +222 -0
- package/dist/builder.js +2 -2
- package/dist/client-Cd7yMX39.js +7860 -0
- package/dist/deferred-tools-BZWMWBYN.js +28 -0
- package/dist/error-body-BUPcH4GF.js +71 -0
- package/dist/github-copilot-headers-B1RBGoZi.js +21 -0
- package/dist/{global-CFcrkAa3.js → global-Bk9T4Af5.js} +17896 -16508
- package/dist/google-generative-ai-6ZG79NDC.js +264 -0
- package/dist/{google-shared-BmdaIInh.js → google-shared-C6y4fA42.js} +1135 -1104
- package/dist/google-vertex-f2myaAmm.js +305 -0
- package/dist/headers-D4iLzGaS.js +21 -0
- package/dist/json-parse-LZdWp-Nd.js +232 -0
- package/dist/login.js +79 -75
- package/dist/mistral-conversations-D16H8Mgq.js +513 -0
- package/dist/openai-codex-responses-DIHPbnIS.js +947 -0
- package/dist/openai-completions-vDHGFsWV.js +741 -0
- package/dist/{headers-u7rXGJ9f.js → openai-prompt-cache-BJwqbEDx.js} +7 -6
- package/dist/openai-responses-B0rjAJxx.js +184 -0
- package/dist/openai-responses-shared-DqdzMfa_.js +477 -0
- package/dist/pi-messages-DB2BtH-g.js +251 -0
- package/dist/pi-user-agent-CUqx-qiX.js +13 -0
- package/dist/provider-env-D2VjEV3S.js +26 -0
- package/dist/provider-retry-BsigVlMg.js +67 -0
- package/dist/setup.js +275 -188
- package/dist/transform-messages-CsKsy6b4.js +398 -0
- package/package.json +4 -5
- package/dist/Builder-B0XYsyXe.js +0 -163449
- package/dist/azure-openai-responses-DAC03Qw1.js +0 -203
- package/dist/client-Sh7wNjbG.js +0 -5277
- package/dist/github-copilot-headers-DWh_6bE3.js +0 -35
- package/dist/google-CVz_TaG6.js +0 -248
- package/dist/google-vertex-C6GE41DE.js +0 -285
- package/dist/json-parse-DmJ6NiZE.js +0 -93
- package/dist/mistral-DqYbzWvv.js +0 -22932
- package/dist/openai-codex-responses-ZWuD9ryk.js +0 -700
- package/dist/openai-completions-B6B2OwYj.js +0 -535
- package/dist/openai-responses-D9Ip2Wgd.js +0 -142
- package/dist/openai-responses-shared-eUUJSL4D.js +0 -324
- package/dist/transform-messages-CkpQp6fJ.js +0 -132
package/dist/login.js
CHANGED
|
@@ -1,106 +1,110 @@
|
|
|
1
|
-
import {
|
|
2
|
-
typeof globalThis.process > "u" && (globalThis.process = { env: {}, platform: "browser", version: "", versions: {}, browser: !0, nextTick: function(
|
|
3
|
-
return Promise.resolve().then(
|
|
1
|
+
import { $ as W, a0 as X, a1 as Y, ap as ee, K as ae, S as s, a4 as i, a5 as l, aa as y, a6 as te, aA as re, a3 as se, a8 as u, N as t, ab as g, aB as oe, ac as z, ad as ie, U as c, ae as w, ar as le, ai as k, ag as n, a7 as A, aj as N, au as ne } from "./global-Bk9T4Af5.js";
|
|
2
|
+
typeof globalThis.process > "u" && (globalThis.process = { env: {}, platform: "browser", version: "", versions: {}, browser: !0, nextTick: function(x) {
|
|
3
|
+
return Promise.resolve().then(x);
|
|
4
4
|
} });
|
|
5
|
-
var
|
|
6
|
-
const
|
|
5
|
+
var de = w('<div class="flash flash-error"><svg class="octicon" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path d="M2.343 13.657A8 8 0 1 1 13.658 2.343 8 8 0 0 1 2.343 13.657ZM6.03 4.97a.751.751 0 0 0-1.042.018.751.751 0 0 0-.018 1.042L6.94 8 4.97 9.97a.749.749 0 0 0 .326 1.275.749.749 0 0 0 .734-.215L8 9.06l1.97 1.97a.749.749 0 0 0 1.275-.326.749.749 0 0 0-.215-.734L9.06 8l1.97-1.97a.749.749 0 0 0-.326-1.275.749.749 0 0 0-.734.215L8 6.94Z"></path></svg> </div>'), ue = w('<div class="flash flash-success"><svg class="octicon" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path d="M8 16A8 8 0 1 1 8 0a8 8 0 0 1 0 16Zm3.78-9.72a.751.751 0 0 0-.018-1.042.751.751 0 0 0-1.042-.018L6.75 9.19 5.28 7.72a.751.751 0 0 0-1.042.018.751.751 0 0 0-.018 1.042l2 2a.75.75 0 0 0 1.06 0Z"></path></svg> </div>'), ce = w('<div class="form-group"><label for="password">Password</label> <input type="password" id="password" name="password" class="form-control form-control-lg" required="" placeholder="••••••••"/></div>'), ve = w('<div class="form-group"><label for="otp">Email code</label> <input type="text" id="otp" name="otp" class="form-control form-control-lg" required="" inputmode="numeric" autocomplete="one-time-code" maxlength="6" placeholder="123456"/></div>'), fe = w('<main class="auth-wrapper svelte-uxwqu2"><div class="auth-container svelte-uxwqu2"><div class="auth-header svelte-uxwqu2"><svg class="auth-logo svelte-uxwqu2" viewBox="0 0 90 90" width="48" height="48" fill="currentColor"><rect x="12" y="12" width="66" height="66" fill="currentColor"></rect></svg> <h1 class="svelte-uxwqu2">Sign in to Hintergrund</h1></div> <!> <!> <div class="Box"><div class="Box-body"><form autocomplete="off"><div class="form-group"><label for="email">Email</label> <input type="email" id="email" name="email" class="form-control form-control-lg" required="" placeholder="you@example.com"/></div> <!> <!></form></div></div></div></main>');
|
|
6
|
+
const pe = {
|
|
7
7
|
hash: "svelte-uxwqu2",
|
|
8
8
|
code: ".auth-wrapper.svelte-uxwqu2 {min-height:100vh;display:flex;align-items:center;justify-content:center;background-color:var(--bgColor-muted);padding:var(--base-size-24);}.auth-container.svelte-uxwqu2 {width:100%;max-width:340px;}.auth-header.svelte-uxwqu2 {text-align:center;margin-bottom:var(--base-size-24);}.auth-logo.svelte-uxwqu2 {color:var(--fgColor-default);margin-bottom:var(--base-size-16);}.auth-header.svelte-uxwqu2 h1:where(.svelte-uxwqu2) {font-size:var(--text-title-size-medium);font-weight:var(--base-text-weight-light);color:var(--fgColor-default);margin:0;}"
|
|
9
9
|
};
|
|
10
|
-
function
|
|
11
|
-
|
|
12
|
-
let
|
|
13
|
-
|
|
10
|
+
function me(x, T) {
|
|
11
|
+
X(T, !0), Y(x, pe);
|
|
12
|
+
let j = ee(T, "config", 7), m = c(!1), f = c(!1), q = c(""), P = c(""), _ = c(""), p = c(""), b = c(""), v = c(!1);
|
|
13
|
+
ae(() => {
|
|
14
14
|
const e = new URLSearchParams(window.location.search).get("error");
|
|
15
|
-
e && (
|
|
15
|
+
e && (s(p, e, !0), window.history.replaceState({}, "", window.location.pathname));
|
|
16
16
|
});
|
|
17
|
-
async function O(
|
|
18
|
-
|
|
17
|
+
async function O(a) {
|
|
18
|
+
a.preventDefault(), s(p, ""), s(b, ""), s(v, !0);
|
|
19
19
|
try {
|
|
20
20
|
const e = {};
|
|
21
|
-
|
|
22
|
-
const
|
|
21
|
+
t(_) && (e.email = t(_)), t(m) && (e.password = t(q)), t(f) && (e.otp = t(P));
|
|
22
|
+
const o = await (await fetch("/api/admin/login", {
|
|
23
23
|
method: "POST",
|
|
24
24
|
headers: { "Content-Type": "application/json" },
|
|
25
25
|
body: JSON.stringify(e)
|
|
26
26
|
})).json();
|
|
27
|
-
|
|
27
|
+
o.success ? o.requirePassword ? s(m, !0) : o.otpRequired ? (s(f, !0), s(b, o.message || "Check your email for a six-digit sign-in code.", !0)) : window.location.href = "/admin" : (o.requirePassword && (s(m, !0), s(f, !1)), s(p, o.message ?? "An error occurred. Please try again.", !0));
|
|
28
28
|
} catch {
|
|
29
|
-
|
|
29
|
+
s(p, "An error occurred. Please try again.");
|
|
30
30
|
} finally {
|
|
31
|
-
|
|
31
|
+
s(v, !1);
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
|
-
var
|
|
34
|
+
var D = {
|
|
35
35
|
get config() {
|
|
36
|
-
return
|
|
36
|
+
return j();
|
|
37
37
|
},
|
|
38
|
-
set config(
|
|
39
|
-
|
|
38
|
+
set config(a) {
|
|
39
|
+
j(a), le();
|
|
40
40
|
}
|
|
41
|
-
}, C =
|
|
41
|
+
}, C = fe(), E = l(C), Z = i(l(E), 2);
|
|
42
42
|
{
|
|
43
|
-
var
|
|
44
|
-
var e =
|
|
45
|
-
|
|
43
|
+
var H = (a) => {
|
|
44
|
+
var e = de(), r = i(l(e));
|
|
45
|
+
n(e), g(() => N(r, ` ${t(p) ?? ""}`)), u(a, e);
|
|
46
46
|
};
|
|
47
|
-
y(
|
|
48
|
-
|
|
47
|
+
y(Z, (a) => {
|
|
48
|
+
t(p) && a(H);
|
|
49
49
|
});
|
|
50
50
|
}
|
|
51
|
-
var
|
|
51
|
+
var M = i(Z, 2);
|
|
52
52
|
{
|
|
53
|
-
var
|
|
54
|
-
var e =
|
|
55
|
-
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
53
|
+
var K = (a) => {
|
|
54
|
+
var e = ue(), r = i(l(e));
|
|
55
|
+
n(e), g(() => N(r, ` ${t(b) ?? ""}`)), u(a, e);
|
|
56
|
+
};
|
|
57
|
+
y(M, (a) => {
|
|
58
|
+
t(b) && a(K);
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
var R = i(M, 2), U = l(R), S = l(U), B = l(S), L = i(l(B), 2);
|
|
62
|
+
k(L), n(B);
|
|
63
|
+
var J = i(B, 2);
|
|
64
|
+
{
|
|
65
|
+
var $ = (a) => {
|
|
66
|
+
var e = ce(), r = i(l(e), 2);
|
|
67
|
+
k(r), n(e), g(() => r.disabled = t(v)), z(r, () => t(q), (o) => s(q, o)), u(a, e);
|
|
68
|
+
}, F = (a) => {
|
|
69
|
+
var e = ve(), r = i(l(e), 2);
|
|
70
|
+
k(r), ne(r, "pattern", "[0-9]6"), n(e), g(() => r.disabled = t(v)), z(r, () => t(P), (o) => s(P, o)), u(a, e);
|
|
71
|
+
};
|
|
72
|
+
y(J, (a) => {
|
|
73
|
+
t(m) ? a($) : t(f) && a(F, 1);
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
var G = i(J, 2);
|
|
77
|
+
return te(G, {
|
|
78
|
+
type: "submit",
|
|
79
|
+
variant: "primary",
|
|
80
|
+
size: "large",
|
|
81
|
+
block: !0,
|
|
82
|
+
get disabled() {
|
|
83
|
+
return t(v);
|
|
84
|
+
},
|
|
85
|
+
children: (a, e) => {
|
|
86
|
+
var r = re(), o = se(r);
|
|
60
87
|
{
|
|
61
|
-
var
|
|
62
|
-
var
|
|
63
|
-
|
|
88
|
+
var I = (d) => {
|
|
89
|
+
var h = A("Please wait...");
|
|
90
|
+
u(d, h);
|
|
91
|
+
}, Q = (d) => {
|
|
92
|
+
var h = A("Sign in");
|
|
93
|
+
u(d, h);
|
|
94
|
+
}, V = (d) => {
|
|
95
|
+
var h = A("Continue");
|
|
96
|
+
u(d, h);
|
|
64
97
|
};
|
|
65
|
-
y(
|
|
66
|
-
|
|
98
|
+
y(o, (d) => {
|
|
99
|
+
t(v) ? d(I) : t(f) ? d(Q, 1) : d(V, -1);
|
|
67
100
|
});
|
|
68
101
|
}
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
size: "large",
|
|
74
|
-
block: !0,
|
|
75
|
-
get disabled() {
|
|
76
|
-
return a(c);
|
|
77
|
-
},
|
|
78
|
-
children: (v, b) => {
|
|
79
|
-
var f = re(), k = se(f);
|
|
80
|
-
{
|
|
81
|
-
var F = (h) => {
|
|
82
|
-
var z = J("Please wait...");
|
|
83
|
-
n(h, z);
|
|
84
|
-
}, G = (h) => {
|
|
85
|
-
var z = J("Continue");
|
|
86
|
-
n(h, z);
|
|
87
|
-
};
|
|
88
|
-
y(k, (h) => {
|
|
89
|
-
a(c) ? h(F) : h(G, -1);
|
|
90
|
-
});
|
|
91
|
-
}
|
|
92
|
-
n(v, f);
|
|
93
|
-
},
|
|
94
|
-
$$slots: { default: !0 }
|
|
95
|
-
}), i(s), i(d), i(e), q(() => L.disabled = a(c) || a(w)), oe("submit", s, O), N(L, () => a(x), (v) => r(x, v)), n(t, e);
|
|
96
|
-
};
|
|
97
|
-
y(D, (t) => {
|
|
98
|
-
a(_) ? t(H) : t(K, -1);
|
|
99
|
-
});
|
|
100
|
-
}
|
|
101
|
-
return i(Z), i(C), n(p, C), ee(U);
|
|
102
|
+
u(a, r);
|
|
103
|
+
},
|
|
104
|
+
$$slots: { default: !0 }
|
|
105
|
+
}), n(S), n(U), n(R), n(E), n(C), g(() => L.disabled = t(v) || t(m) || t(f)), oe("submit", S, O), z(L, () => t(_), (a) => s(_, a)), u(x, C), ie(D);
|
|
102
106
|
}
|
|
103
|
-
customElements.define("hintergrund-login",
|
|
107
|
+
customElements.define("hintergrund-login", W(me, { config: {} }, [], []));
|
|
104
108
|
export {
|
|
105
|
-
|
|
109
|
+
me as default
|
|
106
110
|
};
|