@lokalise/harmony 1.8.0 → 1.8.2
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/README.md +0 -64
- package/dist/harmony.cjs +1 -1
- package/dist/harmony.mjs +507 -923
- package/dist/types/src/node.d.ts +1 -2
- package/package.json +4 -20
- package/dist/types/src/features/auth/backend/services/getAuthenticatedSessionDetailFromRequest.d.ts +0 -10
- package/dist/types/src/features/auth/backend/services/getAuthenticatedSessionPayloadFromRequest.test.d.ts +0 -1
- package/dist/types/src/features/auth/core/jwtTokenPayload.d.ts +0 -7
- package/dist/types/src/features/auth/core/jwtTokenPayload.test.d.ts +0 -1
- package/dist/types/src/features/auth/core/lokaliseAuthAddon.d.ts +0 -14
- package/dist/types/src/features/auth/core/middleware/jwtAuthMiddleware.d.ts +0 -13
- package/dist/types/src/features/auth/core/middleware/jwtAuthMiddleware.test.d.ts +0 -1
- package/dist/types/src/features/auth/core/middleware/publicApiHeadersMiddleware.d.ts +0 -5
- package/dist/types/src/features/auth/core/types/jwtTokenPayload.d.ts +0 -42
- package/dist/types/src/features/auth/core/types/jwtTokenPayload.fixture.d.ts +0 -27
- package/dist/types/src/features/auth/core/utils/makeAuthHeader.d.ts +0 -2
- package/dist/types/src/features/auth/core/utils/makeAuthHeader.test.d.ts +0 -1
- package/dist/types/src/features/auth/frontend/addon/lokaliseAuthBrowserAddon.d.ts +0 -35
- package/dist/types/src/features/auth/frontend/events/NewJwtIssuedEvent.d.ts +0 -20
- package/dist/types/src/features/auth/frontend/hooks/useAuthenticatedProjectContributor.d.ts +0 -28
- package/dist/types/src/features/auth/frontend/hooks/useAuthenticatedSessionPayload.d.ts +0 -18
- package/dist/types/src/features/auth/frontend/hooks/useAuthenticatedUser.d.ts +0 -18
- package/dist/types/src/features/auth/frontend/hooks/useGetPromotedClassicSessionJwtQuery.d.ts +0 -12
- package/dist/types/src/features/auth/frontend/middleware/promoteClassicSessionToJwtMiddleware.d.ts +0 -14
- package/dist/types/src/features/auth/frontend/middleware/promoteClassicSessionToJwtMiddleware.test.d.ts +0 -1
- package/dist/types/src/features/auth/frontend/utils/cookieTokenUtils.d.ts +0 -4
- package/dist/types/src/features/auth/frontend/utils/cookieTokenUtils.test.d.ts +0 -1
- package/dist/types/src/features/auth/node.d.ts +0 -9
- package/dist/types/src/features/node.d.ts +0 -2
- package/dist/types/src/features/publicApi/contributors.d.ts +0 -111
- package/dist/types/src/features/publicApi/hooks/useCreateProjectMutation.d.ts +0 -76
- package/dist/types/src/features/publicApi/hooks/useGetTeamUsersQuery.d.ts +0 -26
- package/dist/types/src/features/publicApi/hooks/useGetUserTokenQuery.d.ts +0 -20
- package/dist/types/src/features/publicApi/hooks/useListProjectsQuery.d.ts +0 -81
- package/dist/types/src/features/publicApi/hooks/useRetrieveContributorQuery.d.ts +0 -34
- package/dist/types/src/features/publicApi/hooks/useRetrieveProjectQuery.d.ts +0 -72
- package/dist/types/src/features/publicApi/node.d.ts +0 -16
- package/dist/types/src/features/publicApi/projects.d.ts +0 -1132
- package/dist/types/src/features/publicApi/teamUsers.d.ts +0 -61
- package/dist/types/src/features/publicApi/types/contributorTypes.d.ts +0 -171
- package/dist/types/src/features/publicApi/types/languageTypes.d.ts +0 -29
- package/dist/types/src/features/publicApi/types/projectTypes.d.ts +0 -1061
- package/dist/types/src/features/publicApi/types/teamRoleTypes.d.ts +0 -3
- package/dist/types/src/features/publicApi/types/teamUserTypes.d.ts +0 -70
- package/dist/types/src/features/publicApi/types/userTokenTypes.d.ts +0 -26
- package/dist/types/src/features/publicApi/userToken.d.ts +0 -35
- package/dist/types/src/utils/testing/createMockFactoryWithDefaults.d.ts +0 -2
- package/dist/types/src/utils/testing/createMockFactoryWithDefaults.test.d.ts +0 -1
- package/dist/types/src/utils/testing/deepOverride.d.ts +0 -4
- package/dist/types/src/utils/testing/deepOverride.test.d.ts +0 -1
- package/dist/types/src/utils/types/apiMutationOverrides.d.ts +0 -2
- package/dist/types/src/utils/types/apiQueryOverrides.d.ts +0 -2
package/dist/harmony.mjs
CHANGED
@@ -1,1107 +1,691 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
import {
|
5
|
-
import
|
6
|
-
import {
|
7
|
-
|
8
|
-
|
9
|
-
import { toZonedTime as qt } from "date-fns-tz";
|
10
|
-
import { z as r } from "zod";
|
11
|
-
import { sendByPayloadRoute as K, sendByGetRoute as W } from "@lokalise/frontend-http-client";
|
12
|
-
import { buildPayloadRoute as ut } from "@lokalise/universal-ts-utils/api-contracts/apiContracts";
|
13
|
-
import { useQuery as x, useMutation as Mt } from "@tanstack/react-query";
|
14
|
-
import { buildGetRoute as Q } from "@lokalise/universal-ts-utils/node";
|
15
|
-
var H = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
16
|
-
function dt(e) {
|
1
|
+
import { jsx as i, jsxs as b, Fragment as $e } from "react/jsx-runtime";
|
2
|
+
import * as k from "react";
|
3
|
+
import { useRef as on, useState as Ue, useCallback as me, useEffect as ie, useContext as sn, createContext as cn, cloneElement as ln, Fragment as De, forwardRef as un } from "react";
|
4
|
+
import { Tooltip as ae, Link as ze, Menu as oe, MenuList as se, CaretUpIcon as dn, UserIcon as Fe, MenuItem as $, MenuDivider as We, Tag as fn } from "@lokalise/louis";
|
5
|
+
import { format as He } from "date-fns";
|
6
|
+
import { toZonedTime as mn } from "date-fns-tz";
|
7
|
+
var B = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
8
|
+
function Ge(e) {
|
17
9
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
18
10
|
}
|
19
|
-
var
|
20
|
-
function
|
21
|
-
if (
|
22
|
-
|
23
|
-
function e(
|
24
|
-
var
|
25
|
-
return
|
11
|
+
var D, he;
|
12
|
+
function ce() {
|
13
|
+
if (he) return D;
|
14
|
+
he = 1;
|
15
|
+
function e(n) {
|
16
|
+
var t = typeof n;
|
17
|
+
return n != null && (t == "object" || t == "function");
|
26
18
|
}
|
27
|
-
return
|
28
|
-
}
|
29
|
-
var
|
30
|
-
function
|
31
|
-
if (
|
32
|
-
|
33
|
-
var e = typeof
|
34
|
-
return
|
35
|
-
}
|
36
|
-
var
|
37
|
-
function
|
38
|
-
if (
|
39
|
-
|
40
|
-
var e =
|
41
|
-
return
|
42
|
-
}
|
43
|
-
var
|
44
|
-
function
|
45
|
-
if (
|
46
|
-
|
47
|
-
var e =
|
19
|
+
return D = e, D;
|
20
|
+
}
|
21
|
+
var z, ge;
|
22
|
+
function hn() {
|
23
|
+
if (ge) return z;
|
24
|
+
ge = 1;
|
25
|
+
var e = typeof B == "object" && B && B.Object === Object && B;
|
26
|
+
return z = e, z;
|
27
|
+
}
|
28
|
+
var F, pe;
|
29
|
+
function Ve() {
|
30
|
+
if (pe) return F;
|
31
|
+
pe = 1;
|
32
|
+
var e = hn(), n = typeof self == "object" && self && self.Object === Object && self, t = e || n || Function("return this")();
|
33
|
+
return F = t, F;
|
34
|
+
}
|
35
|
+
var W, be;
|
36
|
+
function gn() {
|
37
|
+
if (be) return W;
|
38
|
+
be = 1;
|
39
|
+
var e = Ve(), n = function() {
|
48
40
|
return e.Date.now();
|
49
41
|
};
|
50
|
-
return
|
42
|
+
return W = n, W;
|
51
43
|
}
|
52
|
-
var
|
53
|
-
function
|
54
|
-
if (
|
55
|
-
|
44
|
+
var H, _e;
|
45
|
+
function pn() {
|
46
|
+
if (_e) return H;
|
47
|
+
_e = 1;
|
56
48
|
var e = /\s/;
|
57
|
-
function t
|
58
|
-
for (var
|
49
|
+
function n(t) {
|
50
|
+
for (var r = t.length; r-- && e.test(t.charAt(r)); )
|
59
51
|
;
|
60
|
-
return
|
52
|
+
return r;
|
61
53
|
}
|
62
|
-
return
|
63
|
-
}
|
64
|
-
var
|
65
|
-
function
|
66
|
-
if (
|
67
|
-
|
68
|
-
var e =
|
69
|
-
function
|
70
|
-
return
|
54
|
+
return H = n, H;
|
55
|
+
}
|
56
|
+
var G, ve;
|
57
|
+
function bn() {
|
58
|
+
if (ve) return G;
|
59
|
+
ve = 1;
|
60
|
+
var e = pn(), n = /^\s+/;
|
61
|
+
function t(r) {
|
62
|
+
return r && r.slice(0, e(r) + 1).replace(n, "");
|
71
63
|
}
|
72
|
-
return
|
73
|
-
}
|
74
|
-
var
|
75
|
-
function
|
76
|
-
if (
|
77
|
-
|
78
|
-
var e =
|
79
|
-
return
|
80
|
-
}
|
81
|
-
var
|
82
|
-
function
|
83
|
-
if (
|
84
|
-
|
85
|
-
var e =
|
86
|
-
function s
|
87
|
-
var
|
64
|
+
return G = t, G;
|
65
|
+
}
|
66
|
+
var V, Te;
|
67
|
+
function Ye() {
|
68
|
+
if (Te) return V;
|
69
|
+
Te = 1;
|
70
|
+
var e = Ve(), n = e.Symbol;
|
71
|
+
return V = n, V;
|
72
|
+
}
|
73
|
+
var Y, we;
|
74
|
+
function _n() {
|
75
|
+
if (we) return Y;
|
76
|
+
we = 1;
|
77
|
+
var e = Ye(), n = Object.prototype, t = n.hasOwnProperty, r = n.toString, a = e ? e.toStringTag : void 0;
|
78
|
+
function o(s) {
|
79
|
+
var l = t.call(s, a), u = s[a];
|
88
80
|
try {
|
89
|
-
|
90
|
-
var
|
81
|
+
s[a] = void 0;
|
82
|
+
var c = !0;
|
91
83
|
} catch {
|
92
84
|
}
|
93
|
-
var
|
94
|
-
return
|
85
|
+
var d = r.call(s);
|
86
|
+
return c && (l ? s[a] = u : delete s[a]), d;
|
95
87
|
}
|
96
|
-
return
|
97
|
-
}
|
98
|
-
var
|
99
|
-
function
|
100
|
-
if (
|
101
|
-
|
102
|
-
var e = Object.prototype,
|
103
|
-
function
|
104
|
-
return
|
88
|
+
return Y = o, Y;
|
89
|
+
}
|
90
|
+
var Z, Ie;
|
91
|
+
function vn() {
|
92
|
+
if (Ie) return Z;
|
93
|
+
Ie = 1;
|
94
|
+
var e = Object.prototype, n = e.toString;
|
95
|
+
function t(r) {
|
96
|
+
return n.call(r);
|
105
97
|
}
|
106
|
-
return
|
107
|
-
}
|
108
|
-
var
|
109
|
-
function
|
110
|
-
if (
|
111
|
-
|
112
|
-
var e =
|
113
|
-
function
|
114
|
-
return
|
98
|
+
return Z = t, Z;
|
99
|
+
}
|
100
|
+
var X, ye;
|
101
|
+
function Tn() {
|
102
|
+
if (ye) return X;
|
103
|
+
ye = 1;
|
104
|
+
var e = Ye(), n = _n(), t = vn(), r = "[object Null]", a = "[object Undefined]", o = e ? e.toStringTag : void 0;
|
105
|
+
function s(l) {
|
106
|
+
return l == null ? l === void 0 ? a : r : o && o in Object(l) ? n(l) : t(l);
|
115
107
|
}
|
116
|
-
return
|
117
|
-
}
|
118
|
-
var
|
119
|
-
function
|
120
|
-
if (
|
121
|
-
|
122
|
-
function e(
|
123
|
-
return
|
108
|
+
return X = s, X;
|
109
|
+
}
|
110
|
+
var J, Ne;
|
111
|
+
function wn() {
|
112
|
+
if (Ne) return J;
|
113
|
+
Ne = 1;
|
114
|
+
function e(n) {
|
115
|
+
return n != null && typeof n == "object";
|
124
116
|
}
|
125
|
-
return
|
126
|
-
}
|
127
|
-
var
|
128
|
-
function
|
129
|
-
if (
|
130
|
-
|
131
|
-
var e =
|
132
|
-
function a
|
133
|
-
return typeof
|
117
|
+
return J = e, J;
|
118
|
+
}
|
119
|
+
var K, Se;
|
120
|
+
function In() {
|
121
|
+
if (Se) return K;
|
122
|
+
Se = 1;
|
123
|
+
var e = Tn(), n = wn(), t = "[object Symbol]";
|
124
|
+
function r(a) {
|
125
|
+
return typeof a == "symbol" || n(a) && e(a) == t;
|
134
126
|
}
|
135
|
-
return
|
136
|
-
}
|
137
|
-
var
|
138
|
-
function
|
139
|
-
if (
|
140
|
-
|
141
|
-
var e =
|
142
|
-
function
|
143
|
-
if (typeof
|
144
|
-
return
|
145
|
-
if (
|
146
|
-
return
|
147
|
-
if (
|
148
|
-
var
|
149
|
-
|
127
|
+
return K = r, K;
|
128
|
+
}
|
129
|
+
var Q, Ee;
|
130
|
+
function yn() {
|
131
|
+
if (Ee) return Q;
|
132
|
+
Ee = 1;
|
133
|
+
var e = bn(), n = ce(), t = In(), r = NaN, a = /^[-+]0x[0-9a-f]+$/i, o = /^0b[01]+$/i, s = /^0o[0-7]+$/i, l = parseInt;
|
134
|
+
function u(c) {
|
135
|
+
if (typeof c == "number")
|
136
|
+
return c;
|
137
|
+
if (t(c))
|
138
|
+
return r;
|
139
|
+
if (n(c)) {
|
140
|
+
var d = typeof c.valueOf == "function" ? c.valueOf() : c;
|
141
|
+
c = n(d) ? d + "" : d;
|
150
142
|
}
|
151
|
-
if (typeof
|
152
|
-
return
|
153
|
-
|
154
|
-
var
|
155
|
-
return
|
143
|
+
if (typeof c != "string")
|
144
|
+
return c === 0 ? c : +c;
|
145
|
+
c = e(c);
|
146
|
+
var h = o.test(c);
|
147
|
+
return h || s.test(c) ? l(c.slice(2), h ? 2 : 8) : a.test(c) ? r : +c;
|
156
148
|
}
|
157
|
-
return
|
149
|
+
return Q = u, Q;
|
158
150
|
}
|
159
|
-
var
|
160
|
-
function
|
161
|
-
if (
|
162
|
-
|
163
|
-
var e =
|
164
|
-
function
|
165
|
-
var
|
166
|
-
if (typeof
|
167
|
-
throw new TypeError(
|
168
|
-
|
169
|
-
function
|
170
|
-
var
|
171
|
-
return
|
151
|
+
var ee, Pe;
|
152
|
+
function Ze() {
|
153
|
+
if (Pe) return ee;
|
154
|
+
Pe = 1;
|
155
|
+
var e = ce(), n = gn(), t = yn(), r = "Expected a function", a = Math.max, o = Math.min;
|
156
|
+
function s(l, u, c) {
|
157
|
+
var d, h, T, N, m, v, w = 0, I = !1, g = !1, S = !0;
|
158
|
+
if (typeof l != "function")
|
159
|
+
throw new TypeError(r);
|
160
|
+
u = t(u) || 0, e(c) && (I = !!c.leading, g = "maxWait" in c, T = g ? a(t(c.maxWait) || 0, u) : T, S = "trailing" in c ? !!c.trailing : S);
|
161
|
+
function _(f) {
|
162
|
+
var E = d, L = h;
|
163
|
+
return d = h = void 0, w = f, N = l.apply(L, E), N;
|
172
164
|
}
|
173
|
-
function
|
174
|
-
return w = f,
|
165
|
+
function p(f) {
|
166
|
+
return w = f, m = setTimeout(q, u), I ? _(f) : N;
|
175
167
|
}
|
176
|
-
function
|
177
|
-
var
|
178
|
-
return g ?
|
168
|
+
function A(f) {
|
169
|
+
var E = f - v, L = f - w, fe = u - E;
|
170
|
+
return g ? o(fe, T - L) : fe;
|
179
171
|
}
|
180
|
-
function
|
181
|
-
var
|
182
|
-
return
|
172
|
+
function ue(f) {
|
173
|
+
var E = f - v, L = f - w;
|
174
|
+
return v === void 0 || E >= u || E < 0 || g && L >= T;
|
183
175
|
}
|
184
|
-
function
|
185
|
-
var f =
|
186
|
-
if (
|
187
|
-
return
|
188
|
-
|
176
|
+
function q() {
|
177
|
+
var f = n();
|
178
|
+
if (ue(f))
|
179
|
+
return de(f);
|
180
|
+
m = setTimeout(q, A(f));
|
189
181
|
}
|
190
|
-
function
|
191
|
-
return
|
182
|
+
function de(f) {
|
183
|
+
return m = void 0, S && d ? _(f) : (d = h = void 0, N);
|
192
184
|
}
|
193
|
-
function
|
194
|
-
|
185
|
+
function rn() {
|
186
|
+
m !== void 0 && clearTimeout(m), w = 0, d = v = h = m = void 0;
|
195
187
|
}
|
196
|
-
function
|
197
|
-
return
|
188
|
+
function an() {
|
189
|
+
return m === void 0 ? N : de(n());
|
198
190
|
}
|
199
|
-
function
|
200
|
-
var f =
|
201
|
-
if (
|
202
|
-
if (
|
203
|
-
return
|
191
|
+
function U() {
|
192
|
+
var f = n(), E = ue(f);
|
193
|
+
if (d = arguments, h = this, v = f, E) {
|
194
|
+
if (m === void 0)
|
195
|
+
return p(v);
|
204
196
|
if (g)
|
205
|
-
return clearTimeout(
|
197
|
+
return clearTimeout(m), m = setTimeout(q, u), _(v);
|
206
198
|
}
|
207
|
-
return
|
199
|
+
return m === void 0 && (m = setTimeout(q, u)), N;
|
208
200
|
}
|
209
|
-
return
|
201
|
+
return U.cancel = rn, U.flush = an, U;
|
210
202
|
}
|
211
|
-
return
|
212
|
-
}
|
213
|
-
var
|
214
|
-
const
|
215
|
-
var
|
216
|
-
function
|
217
|
-
if (
|
218
|
-
|
219
|
-
var e =
|
220
|
-
function a
|
221
|
-
var
|
222
|
-
if (typeof
|
223
|
-
throw new TypeError(
|
224
|
-
return
|
225
|
-
leading:
|
226
|
-
maxWait:
|
227
|
-
trailing:
|
203
|
+
return ee = s, ee;
|
204
|
+
}
|
205
|
+
var Nn = Ze();
|
206
|
+
const Sn = /* @__PURE__ */ Ge(Nn);
|
207
|
+
var ne, je;
|
208
|
+
function En() {
|
209
|
+
if (je) return ne;
|
210
|
+
je = 1;
|
211
|
+
var e = Ze(), n = ce(), t = "Expected a function";
|
212
|
+
function r(a, o, s) {
|
213
|
+
var l = !0, u = !0;
|
214
|
+
if (typeof a != "function")
|
215
|
+
throw new TypeError(t);
|
216
|
+
return n(s) && (l = "leading" in s ? !!s.leading : l, u = "trailing" in s ? !!s.trailing : u), e(a, o, {
|
217
|
+
leading: l,
|
218
|
+
maxWait: o,
|
219
|
+
trailing: u
|
228
220
|
});
|
229
221
|
}
|
230
|
-
return
|
222
|
+
return ne = r, ne;
|
231
223
|
}
|
232
|
-
var
|
233
|
-
const
|
234
|
-
switch (
|
224
|
+
var Pn = En();
|
225
|
+
const jn = /* @__PURE__ */ Ge(Pn), Rn = (e, n, t, r) => {
|
226
|
+
switch (n) {
|
235
227
|
case "debounce":
|
236
|
-
return
|
228
|
+
return Sn(e, t, r);
|
237
229
|
case "throttle":
|
238
|
-
return
|
230
|
+
return jn(e, t, r);
|
239
231
|
default:
|
240
232
|
return e;
|
241
233
|
}
|
242
|
-
},
|
234
|
+
}, xn = (
|
243
235
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
244
236
|
(e) => {
|
245
|
-
const
|
246
|
-
return
|
247
|
-
|
248
|
-
}),
|
249
|
-
var
|
250
|
-
return (
|
237
|
+
const n = k.useRef(e);
|
238
|
+
return k.useEffect(() => {
|
239
|
+
n.current = e;
|
240
|
+
}), k.useMemo(() => (...t) => {
|
241
|
+
var r;
|
242
|
+
return (r = n.current) === null || r === void 0 ? void 0 : r.call(n, ...t);
|
251
243
|
}, []);
|
252
244
|
}
|
253
|
-
),
|
245
|
+
), Cn = (
|
254
246
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
255
247
|
(e) => {
|
256
|
-
const [
|
248
|
+
const [n, t] = k.useState((e == null ? void 0 : e.current) || null);
|
257
249
|
return e && setTimeout(() => {
|
258
|
-
e.current !==
|
259
|
-
}, 0), { refProxy:
|
260
|
-
|
250
|
+
e.current !== n && t(e.current);
|
251
|
+
}, 0), { refProxy: k.useMemo(() => new Proxy((a) => {
|
252
|
+
a !== n && t(a);
|
261
253
|
}, {
|
262
|
-
get(
|
263
|
-
return
|
254
|
+
get(a, o) {
|
255
|
+
return o === "current" ? n : a[o];
|
264
256
|
},
|
265
|
-
set(o, s
|
266
|
-
return
|
257
|
+
set(a, o, s) {
|
258
|
+
return o === "current" ? t(s) : a[o] = s, !0;
|
267
259
|
}
|
268
|
-
}), [
|
260
|
+
}), [n]), refElement: n, setRefElement: t };
|
269
261
|
}
|
270
|
-
),
|
262
|
+
), Ln = (e, n) => n === "border-box" ? {
|
271
263
|
width: e.borderBoxSize[0].inlineSize,
|
272
264
|
height: e.borderBoxSize[0].blockSize
|
273
|
-
} :
|
265
|
+
} : n === "content-box" ? {
|
274
266
|
width: e.contentBoxSize[0].inlineSize,
|
275
267
|
height: e.contentBoxSize[0].blockSize
|
276
268
|
} : {
|
277
269
|
width: e.contentRect.width,
|
278
270
|
height: e.contentRect.height
|
279
271
|
};
|
280
|
-
function
|
281
|
-
const
|
272
|
+
function kn({ skipOnMount: e = !1, refreshMode: n, refreshRate: t = 1e3, refreshOptions: r, handleWidth: a = !0, handleHeight: o = !0, targetRef: s, observerOptions: l, onResize: u } = {}) {
|
273
|
+
const c = on(e), d = xn(u), [h, T] = Ue({
|
282
274
|
width: void 0,
|
283
275
|
height: void 0
|
284
|
-
}), { refProxy:
|
285
|
-
if (!
|
276
|
+
}), { refProxy: N, refElement: m } = Cn(s), { box: v } = l || {}, w = me((g) => {
|
277
|
+
if (!a && !o)
|
286
278
|
return;
|
287
|
-
if (
|
288
|
-
|
279
|
+
if (c.current) {
|
280
|
+
c.current = !1;
|
289
281
|
return;
|
290
282
|
}
|
291
|
-
const
|
292
|
-
g.forEach((
|
293
|
-
const
|
294
|
-
|
295
|
-
width:
|
296
|
-
height:
|
297
|
-
entry:
|
298
|
-
}),
|
283
|
+
const S = (_, p) => a && _.width !== p.width || o && _.height !== p.height;
|
284
|
+
g.forEach((_) => {
|
285
|
+
const p = Ln(_, v);
|
286
|
+
T((A) => S(A, p) ? (d == null || d({
|
287
|
+
width: p.width,
|
288
|
+
height: p.height,
|
289
|
+
entry: _
|
290
|
+
}), p) : A);
|
299
291
|
});
|
300
|
-
}, [
|
292
|
+
}, [a, o, c, v]), I = me(Rn(w, n, t, r), [
|
301
293
|
w,
|
302
|
-
t,
|
303
294
|
n,
|
304
|
-
|
295
|
+
t,
|
296
|
+
r
|
305
297
|
]);
|
306
|
-
return
|
298
|
+
return ie(() => {
|
307
299
|
let g;
|
308
|
-
return
|
300
|
+
return m ? (g = new window.ResizeObserver(I), g.observe(m, l)) : (h.width || h.height) && (d == null || d({
|
309
301
|
width: null,
|
310
302
|
height: null,
|
311
303
|
entry: null
|
312
|
-
}),
|
313
|
-
var
|
314
|
-
(
|
304
|
+
}), T({ width: void 0, height: void 0 })), () => {
|
305
|
+
var S, _, p;
|
306
|
+
(S = g == null ? void 0 : g.disconnect) === null || S === void 0 || S.call(g), (p = (_ = I).cancel) === null || p === void 0 || p.call(_);
|
315
307
|
};
|
316
|
-
}, [
|
308
|
+
}, [I, m]), Object.assign({ ref: N }, h);
|
317
309
|
}
|
318
|
-
function
|
319
|
-
var
|
320
|
-
if (typeof e == "string" || typeof e == "number")
|
310
|
+
function Xe(e) {
|
311
|
+
var n, t, r = "";
|
312
|
+
if (typeof e == "string" || typeof e == "number") r += e;
|
321
313
|
else if (typeof e == "object") if (Array.isArray(e)) {
|
322
|
-
var
|
323
|
-
for (
|
324
|
-
} else for (
|
325
|
-
return
|
326
|
-
}
|
327
|
-
function
|
328
|
-
for (var e,
|
329
|
-
return
|
330
|
-
}
|
331
|
-
const
|
332
|
-
headerContainer:
|
333
|
-
navigationTabList:
|
334
|
-
navigationTab:
|
335
|
-
headerContent:
|
336
|
-
staticEnabled:
|
337
|
-
},
|
338
|
-
const { ref:
|
314
|
+
var a = e.length;
|
315
|
+
for (n = 0; n < a; n++) e[n] && (t = Xe(e[n])) && (r && (r += " "), r += t);
|
316
|
+
} else for (t in e) e[t] && (r && (r += " "), r += t);
|
317
|
+
return r;
|
318
|
+
}
|
319
|
+
function R() {
|
320
|
+
for (var e, n, t = 0, r = "", a = arguments.length; t < a; t++) (e = arguments[t]) && (n = Xe(e)) && (r && (r += " "), r += n);
|
321
|
+
return r;
|
322
|
+
}
|
323
|
+
const On = "_headerContainer_1cubo_1", An = "_navigationTabList_1cubo_8", qn = "_navigationTab_1cubo_8", Bn = "_headerContent_1cubo_34", Mn = "_staticEnabled_1cubo_50", C = {
|
324
|
+
headerContainer: On,
|
325
|
+
navigationTabList: An,
|
326
|
+
navigationTab: qn,
|
327
|
+
headerContent: Bn,
|
328
|
+
staticEnabled: Mn
|
329
|
+
}, $n = 77, M = ({ sticky: e, children: n }) => {
|
330
|
+
const { ref: t, height: r } = kn({
|
339
331
|
refreshMode: "debounce",
|
340
332
|
refreshRate: 0
|
341
|
-
}), [
|
342
|
-
|
343
|
-
const
|
344
|
-
|
333
|
+
}), [a, o] = Ue(!1), s = () => a ? !e : !0;
|
334
|
+
ie(() => {
|
335
|
+
const u = () => {
|
336
|
+
o(window.scrollY > 0);
|
345
337
|
};
|
346
|
-
return window.addEventListener("scroll",
|
338
|
+
return window.addEventListener("scroll", u), () => window.removeEventListener("scroll", u);
|
347
339
|
}, []);
|
348
|
-
const
|
349
|
-
return /* @__PURE__ */ i("div", { style: { minHeight:
|
340
|
+
const l = `${r || $n}px`;
|
341
|
+
return /* @__PURE__ */ i("div", { style: { minHeight: l }, children: /* @__PURE__ */ i("div", { children: /* @__PURE__ */ b(
|
350
342
|
"div",
|
351
343
|
{
|
352
|
-
ref:
|
353
|
-
className:
|
354
|
-
[
|
344
|
+
ref: t,
|
345
|
+
className: R(C.headerContent, {
|
346
|
+
[C.staticEnabled]: s()
|
355
347
|
}),
|
356
348
|
children: [
|
357
|
-
/* @__PURE__ */ i(
|
358
|
-
/* @__PURE__ */ i(
|
359
|
-
|
349
|
+
/* @__PURE__ */ i(M.Header, {}),
|
350
|
+
/* @__PURE__ */ i(M.Tabs, {}),
|
351
|
+
n
|
360
352
|
]
|
361
353
|
}
|
362
354
|
) }) });
|
363
355
|
};
|
364
|
-
|
365
|
-
|
366
|
-
const
|
367
|
-
sidebarContainer:
|
368
|
-
},
|
369
|
-
logoLink:
|
370
|
-
},
|
371
|
-
link:
|
372
|
-
active:
|
373
|
-
},
|
374
|
-
|
356
|
+
M.Header = ({ children: e }) => /* @__PURE__ */ i("div", { className: C.headerContainer, children: e });
|
357
|
+
M.Tabs = ({ children: e }) => /* @__PURE__ */ i("div", { className: "flex justify-between gap-2 nowrap", children: e });
|
358
|
+
const Un = "_sidebarContainer_bmdti_1", Dn = {
|
359
|
+
sidebarContainer: Un
|
360
|
+
}, zn = "_logoLink_1baxb_1", Fn = {
|
361
|
+
logoLink: zn
|
362
|
+
}, Wn = ({ src: e, href: n = "/", ariaLabel: t = "Home", alt: r = "Lokalise" }) => /* @__PURE__ */ i("a", { className: Fn.logoLink, href: n, "aria-label": t, children: /* @__PURE__ */ i("img", { src: e, alt: r }) }), Hn = "_link_1weq1_1", Gn = "_active_1weq1_18", Re = {
|
363
|
+
link: Hn,
|
364
|
+
active: Gn
|
365
|
+
}, Vn = ({ label: e, to: n, icon: t }) => /* @__PURE__ */ i(ae, { placement: "right", tooltip: e, children: /* @__PURE__ */ i(
|
366
|
+
ze,
|
375
367
|
{
|
376
|
-
className:
|
377
|
-
[
|
368
|
+
className: R(Re.link, {
|
369
|
+
[Re.active]: window.location.pathname.startsWith(n)
|
378
370
|
}),
|
379
|
-
href:
|
380
|
-
children: /* @__PURE__ */ i(
|
371
|
+
href: n,
|
372
|
+
children: /* @__PURE__ */ i(t, { size: "25px" })
|
381
373
|
}
|
382
|
-
) }),
|
383
|
-
dropdownButton:
|
384
|
-
dropdownButtonActive:
|
385
|
-
},
|
386
|
-
|
374
|
+
) }), Yn = "_dropdownButton_hwh0c_1", Zn = "_dropdownButtonActive_hwh0c_18", xe = {
|
375
|
+
dropdownButton: Yn,
|
376
|
+
dropdownButtonActive: Zn
|
377
|
+
}, Xn = ({ children: e, icon: n }) => /* @__PURE__ */ i(
|
378
|
+
oe,
|
387
379
|
{
|
388
|
-
menuButton: ({ opened:
|
380
|
+
menuButton: ({ opened: t }) => /* @__PURE__ */ i(ae, { placement: "right", tooltip: "Help", children: /* @__PURE__ */ i(
|
389
381
|
"button",
|
390
382
|
{
|
391
383
|
type: "button",
|
392
|
-
className:
|
393
|
-
[
|
384
|
+
className: R(xe.dropdownButton, {
|
385
|
+
[xe.dropdownButtonActive]: t
|
394
386
|
}),
|
395
|
-
children: /* @__PURE__ */ i(
|
387
|
+
children: /* @__PURE__ */ i(n, { size: "25px" })
|
396
388
|
}
|
397
389
|
) }),
|
398
|
-
children: /* @__PURE__ */ i(
|
390
|
+
children: /* @__PURE__ */ i(se, { placement: "right-start", children: e })
|
399
391
|
}
|
400
|
-
),
|
401
|
-
iconContainer:
|
402
|
-
},
|
392
|
+
), Jn = "_iconContainer_nz34m_1", Kn = {
|
393
|
+
iconContainer: Jn
|
394
|
+
}, Je = ({ className: e = "" }) => /* @__PURE__ */ i(
|
403
395
|
"div",
|
404
396
|
{
|
405
397
|
"aria-label": "Upgrade Icon",
|
406
|
-
className:
|
407
|
-
|
398
|
+
className: R(
|
399
|
+
Kn.iconContainer,
|
408
400
|
"flex-row",
|
409
401
|
"items-center",
|
410
402
|
"justify-center",
|
411
403
|
e
|
412
404
|
),
|
413
|
-
children: /* @__PURE__ */ i(
|
405
|
+
children: /* @__PURE__ */ i(dn, {})
|
414
406
|
}
|
415
|
-
),
|
416
|
-
menuContainer:
|
417
|
-
profileButton:
|
418
|
-
profileImage:
|
419
|
-
profileImageHighlight:
|
420
|
-
profileImageUpgradeIcon:
|
421
|
-
userIconWrapper:
|
422
|
-
},
|
407
|
+
), Qn = "_menuContainer_wbu3u_5", et = "_profileButton_wbu3u_16", nt = "_profileImage_wbu3u_29", tt = "_profileImageHighlight_wbu3u_37", rt = "_profileImageUpgradeIcon_wbu3u_41", it = "_userIconWrapper_wbu3u_47", P = {
|
408
|
+
menuContainer: Qn,
|
409
|
+
profileButton: et,
|
410
|
+
profileImage: nt,
|
411
|
+
profileImageHighlight: tt,
|
412
|
+
profileImageUpgradeIcon: rt,
|
413
|
+
userIconWrapper: it
|
414
|
+
}, Ke = cn({}), O = () => sn(Ke), at = ({ children: e }) => {
|
423
415
|
const {
|
424
|
-
currentTeam:
|
425
|
-
otherTeams:
|
426
|
-
showUpgradeCta:
|
427
|
-
showBillingButton:
|
428
|
-
allowTeamCreation:
|
429
|
-
isProviderAlpha:
|
430
|
-
canAccessTeamSettings:
|
431
|
-
isEndOfTrialActive:
|
432
|
-
isTeamSuspended:
|
433
|
-
isFullyAuthenticated:
|
434
|
-
} =
|
416
|
+
currentTeam: n,
|
417
|
+
otherTeams: t,
|
418
|
+
showUpgradeCta: r,
|
419
|
+
showBillingButton: a,
|
420
|
+
allowTeamCreation: o,
|
421
|
+
isProviderAlpha: s,
|
422
|
+
canAccessTeamSettings: l,
|
423
|
+
isEndOfTrialActive: u,
|
424
|
+
isTeamSuspended: c,
|
425
|
+
isFullyAuthenticated: d
|
426
|
+
} = O();
|
435
427
|
return /* @__PURE__ */ i(
|
436
|
-
|
428
|
+
oe,
|
437
429
|
{
|
438
|
-
menuButton: () => /* @__PURE__ */
|
439
|
-
|
430
|
+
menuButton: () => /* @__PURE__ */ b("button", { className: P.profileButton, "aria-label": "Profile menu", type: "button", children: [
|
431
|
+
n != null && n.logoUrl ? /* @__PURE__ */ i(
|
440
432
|
"img",
|
441
433
|
{
|
442
|
-
src:
|
443
|
-
className:
|
444
|
-
[
|
434
|
+
src: n.logoUrl,
|
435
|
+
className: R(P.profileImage, {
|
436
|
+
[P.profileImageHighlight]: r
|
445
437
|
}),
|
446
438
|
alt: "Team Logo"
|
447
439
|
}
|
448
440
|
) : /* @__PURE__ */ i(
|
449
441
|
"div",
|
450
442
|
{
|
451
|
-
className:
|
452
|
-
[
|
443
|
+
className: R(P.userIconWrapper, "flex-row", "align-center", "items-center", {
|
444
|
+
[P.profileImageHighlight]: r
|
453
445
|
}),
|
454
|
-
children: /* @__PURE__ */ i(
|
446
|
+
children: /* @__PURE__ */ i(Fe, { size: "25px" })
|
455
447
|
}
|
456
448
|
),
|
457
|
-
|
449
|
+
r && /* @__PURE__ */ i(Je, { className: P.profileImageUpgradeIcon })
|
458
450
|
] }),
|
459
|
-
children: /* @__PURE__ */ i(
|
460
|
-
allowTeamCreation:
|
461
|
-
otherTeams:
|
462
|
-
canAccessTeamSettings:
|
463
|
-
isEndOfTrialActive:
|
464
|
-
isTeamSuspended:
|
465
|
-
showBillingButton:
|
466
|
-
isProviderAlpha:
|
467
|
-
isFullyAuthenticated:
|
451
|
+
children: /* @__PURE__ */ i(se, { placement: "right-end", className: P.menuContainer, children: e({
|
452
|
+
allowTeamCreation: o,
|
453
|
+
otherTeams: t,
|
454
|
+
canAccessTeamSettings: l,
|
455
|
+
isEndOfTrialActive: u,
|
456
|
+
isTeamSuspended: c,
|
457
|
+
showBillingButton: a,
|
458
|
+
isProviderAlpha: s,
|
459
|
+
isFullyAuthenticated: d
|
468
460
|
}) })
|
469
461
|
}
|
470
462
|
);
|
471
|
-
},
|
472
|
-
const
|
473
|
-
if (
|
463
|
+
}, Qe = 0, ot = 9999, st = [150, 151, 250, 251], ct = [152, 153, 252, 253], lt = [154, 155, 157, 158, 254, 255, 258, 354, 355, 358], ut = [156, 159, 160, 256, 259, 260], en = 9998, le = (e) => e === Qe, nn = (e) => e === ot, Jt = (e) => st.includes(e), Kt = (e) => ct.includes(e), Qt = (e) => lt.includes(e), er = (e) => ut.includes(e), nr = (e) => e > Qe && e < en, tr = (e) => e === en, dt = /\n/, Ce = (e, n, t) => e.split(n).flatMap((r, a) => a !== 0 ? [ln(t, { key: Math.random().toString(32).slice(0, 10) }), r] : r), ft = (e, n, t) => typeof e == "string" ? Ce(e, n, t) : e.flatMap((r) => typeof r == "string" ? Ce(r, n, t) : r), rr = (e) => ft(e, dt, /* @__PURE__ */ i("br", {})), mt = /(\b(https?|):\/\/[-a-zA-Zа-яА-Я0-9+&@#/%?=~_|!:,.;]*[-a-zA-Zа-яА-Я0-9+&@#/%=~_|])/gi, ht = (e) => e.match(mt) ?? [], Le = (e, n, t) => {
|
464
|
+
const r = e.split(n);
|
465
|
+
if (r.length === 1)
|
474
466
|
return e;
|
475
|
-
const
|
476
|
-
return
|
477
|
-
/* @__PURE__ */ i("a", { href:
|
478
|
-
),
|
479
|
-
},
|
480
|
-
const
|
481
|
-
return
|
482
|
-
},
|
483
|
-
|
484
|
-
},
|
467
|
+
const a = [];
|
468
|
+
return r[0] !== "" && a.push(r[0]), r.shift(), r[r.length - 1] === "" && r.pop(), a.push(
|
469
|
+
/* @__PURE__ */ i("a", { href: n, target: "_blank", rel: "noreferrer noopener", children: n }, n + t)
|
470
|
+
), a.push(r.join(n)), a.filter((o) => o !== "");
|
471
|
+
}, ke = (e) => {
|
472
|
+
const n = ht(e);
|
473
|
+
return n != null && n.length ? n.reduce((t, r, a) => typeof t == "string" ? Le(t, r, a) : t.flatMap((o) => typeof o == "string" ? Le(o, r, a) : o), e) : e;
|
474
|
+
}, ir = (e) => typeof e == "string" ? ke(e) : e.flatMap((n) => typeof n == "string" ? ke(n) : n, e), ar = (e, n = "PP") => He(e, n), or = (e, n, t = "PP") => He(mn(e, n), t), sr = (e) => {
|
475
|
+
ie(e, []);
|
476
|
+
}, Oe = {
|
485
477
|
biller: "biller",
|
486
478
|
owner: "owner"
|
487
|
-
},
|
488
|
-
|
489
|
-
|
490
|
-
],
|
491
|
-
const { teams:
|
492
|
-
...
|
493
|
-
currentTeam:
|
494
|
-
otherTeams:
|
495
|
-
canChangeBilling:
|
496
|
-
canAccessTeamSettings:
|
497
|
-
isOnFreeOrTrialPlan:
|
498
|
-
showUpgradeCta:
|
499
|
-
showBillingButton:
|
500
|
-
allowTeamCreation:
|
479
|
+
}, Ae = [
|
480
|
+
Oe.biller,
|
481
|
+
Oe.owner
|
482
|
+
], gt = ({ children: e, config: n }) => {
|
483
|
+
const { teams: t, currentTeamId: r, planId: a, isEndOfTrialActive: o, isFullyAuthenticated: s, userTeamRole: l } = n, u = t.find((I) => I.id === r), c = t.filter((I) => I.id !== r), d = Ae.includes(l), h = Ae.includes(l), T = le(a) || nn(a), w = {
|
484
|
+
...n,
|
485
|
+
currentTeam: u,
|
486
|
+
otherTeams: c,
|
487
|
+
canChangeBilling: d,
|
488
|
+
canAccessTeamSettings: h,
|
489
|
+
isOnFreeOrTrialPlan: T,
|
490
|
+
showUpgradeCta: s && T && d,
|
491
|
+
showBillingButton: s && h && d,
|
492
|
+
allowTeamCreation: s && !o
|
501
493
|
};
|
502
|
-
return /* @__PURE__ */ i(
|
503
|
-
},
|
504
|
-
container:
|
505
|
-
profileEmail:
|
506
|
-
},
|
494
|
+
return /* @__PURE__ */ i(Ke.Provider, { value: w, children: e });
|
495
|
+
}, pt = ({ config: e, children: n }) => /* @__PURE__ */ i(gt, { config: e, children: /* @__PURE__ */ i(at, { children: n }) }), bt = "_container_q5pot_1", _t = "_profileEmail_q5pot_5", qe = {
|
496
|
+
container: bt,
|
497
|
+
profileEmail: _t
|
498
|
+
}, vt = ({
|
507
499
|
href: e,
|
508
|
-
onClick:
|
509
|
-
userEmail:
|
510
|
-
hideBottomDivider:
|
500
|
+
onClick: n,
|
501
|
+
userEmail: t,
|
502
|
+
hideBottomDivider: r
|
511
503
|
}) => {
|
512
|
-
const { isEndOfTrialActive:
|
513
|
-
return
|
504
|
+
const { isEndOfTrialActive: a, isTeamSuspended: o } = O();
|
505
|
+
return a || o ? null : /* @__PURE__ */ b($e, { children: [
|
514
506
|
/* @__PURE__ */ i(
|
515
|
-
|
507
|
+
$,
|
516
508
|
{
|
517
509
|
href: e,
|
518
510
|
onClick: () => {
|
519
|
-
|
511
|
+
n == null || n();
|
520
512
|
},
|
521
|
-
children: /* @__PURE__ */
|
513
|
+
children: /* @__PURE__ */ b("div", { className: `flex-col ${qe.container}`, children: [
|
522
514
|
/* @__PURE__ */ i("span", { children: "Profile Settings" }),
|
523
|
-
/* @__PURE__ */ i("span", { className:
|
515
|
+
/* @__PURE__ */ i("span", { className: qe.profileEmail, children: t })
|
524
516
|
] })
|
525
517
|
}
|
526
518
|
),
|
527
|
-
!
|
519
|
+
!r && /* @__PURE__ */ i(We, {})
|
528
520
|
] });
|
529
|
-
},
|
530
|
-
wrapper:
|
531
|
-
profileImage:
|
532
|
-
teamName:
|
533
|
-
planLabel:
|
534
|
-
membership:
|
535
|
-
defaultProfileImage:
|
536
|
-
},
|
537
|
-
const { currentTeam:
|
538
|
-
if (!
|
521
|
+
}, Tt = "_wrapper_15d85_1", wt = "_profileImage_15d85_14", It = "_teamName_15d85_22", yt = "_planLabel_15d85_29", Nt = "_membership_15d85_38", St = "_defaultProfileImage_15d85_44", x = {
|
522
|
+
wrapper: Tt,
|
523
|
+
profileImage: wt,
|
524
|
+
teamName: It,
|
525
|
+
planLabel: yt,
|
526
|
+
membership: Nt,
|
527
|
+
defaultProfileImage: St
|
528
|
+
}, tn = ({ team: e, onClick: n, hidePlanLabel: t }) => {
|
529
|
+
const { currentTeam: r, planId: a } = O(), o = e || r;
|
530
|
+
if (!o)
|
539
531
|
return null;
|
540
|
-
const
|
541
|
-
return /* @__PURE__ */
|
542
|
-
|
532
|
+
const s = le(a) ? "Free" : nn(a) ? "Trial" : void 0;
|
533
|
+
return /* @__PURE__ */ b(
|
534
|
+
n ? $ : "div",
|
543
535
|
{
|
544
|
-
className: `flex-row gap-2 flex-nowrap items-center ${
|
545
|
-
...
|
536
|
+
className: `flex-row gap-2 flex-nowrap items-center ${x.wrapper}`,
|
537
|
+
...n && { onClick: () => n(o) },
|
546
538
|
children: [
|
547
|
-
|
548
|
-
/* @__PURE__ */
|
549
|
-
/* @__PURE__ */
|
550
|
-
/* @__PURE__ */ i("span", { title:
|
551
|
-
|
539
|
+
o.logoUrl ? /* @__PURE__ */ i("img", { className: x.profileImage, src: o.logoUrl, alt: "Team Logo" }) : /* @__PURE__ */ i("span", { className: `flex-row justify-center items-center ${x.defaultProfileImage}`, children: /* @__PURE__ */ i(Fe, { size: "25px" }) }),
|
540
|
+
/* @__PURE__ */ b("div", { className: "flex-col items-start", children: [
|
541
|
+
/* @__PURE__ */ b("div", { className: "flex-row items-center flex-nowrap gap-2", children: [
|
542
|
+
/* @__PURE__ */ i("span", { title: o.name, className: x.teamName, children: o.name }),
|
543
|
+
s && !t && /* @__PURE__ */ i("span", { className: `flex-row justify-center items-center ${x.planLabel}`, children: s })
|
552
544
|
] }),
|
553
|
-
/* @__PURE__ */ i("span", { className:
|
545
|
+
/* @__PURE__ */ i("span", { className: x.membership, children: o.role })
|
554
546
|
] })
|
555
547
|
]
|
556
548
|
}
|
557
549
|
);
|
558
|
-
},
|
559
|
-
teamsContainer:
|
560
|
-
},
|
561
|
-
const { otherTeams:
|
562
|
-
return
|
563
|
-
},
|
564
|
-
container:
|
565
|
-
planCta:
|
566
|
-
upgradeIconWrapper:
|
567
|
-
},
|
568
|
-
const { planId:
|
569
|
-
if (!
|
550
|
+
}, Et = "_teamsContainer_1t68g_1", Pt = {
|
551
|
+
teamsContainer: Et
|
552
|
+
}, jt = ({ onSwitchTeam: e }) => {
|
553
|
+
const { otherTeams: n } = O();
|
554
|
+
return n.length === 0 ? null : /* @__PURE__ */ i("div", { className: `flex-col items-stretch ${Pt.teamsContainer}`, children: n.map((t) => /* @__PURE__ */ i(tn, { team: t, onClick: e, hidePlanLabel: !0 }, t.id)) });
|
555
|
+
}, Rt = "_container_1u995_1", xt = "_planCta_1u995_15", Ct = "_upgradeIconWrapper_1u995_19", te = {
|
556
|
+
container: Rt,
|
557
|
+
planCta: xt,
|
558
|
+
upgradeIconWrapper: Ct
|
559
|
+
}, Lt = ({ upgradeOptionHref: e }) => {
|
560
|
+
const { planId: n, trialDaysLeft: t, showUpgradeCta: r } = O();
|
561
|
+
if (!r)
|
570
562
|
return null;
|
571
|
-
const
|
572
|
-
return /* @__PURE__ */
|
573
|
-
/* @__PURE__ */ i("span", { className:
|
574
|
-
/* @__PURE__ */
|
575
|
-
/* @__PURE__ */ i(
|
563
|
+
const s = le(n) ? "Your team is currently on the Free plan" : `Free trial ends in ${t} ${t === 1 ? "day" : "days"}`;
|
564
|
+
return /* @__PURE__ */ b($, { href: e, className: `flex-col gap-1 items-start ${te.container}`, children: [
|
565
|
+
/* @__PURE__ */ i("span", { className: te.planCta, children: s }),
|
566
|
+
/* @__PURE__ */ b("div", { className: `flex-row items-center gap-1 ${te.upgradeIconWrapper}`, children: [
|
567
|
+
/* @__PURE__ */ i(Je, {}),
|
576
568
|
/* @__PURE__ */ i("span", { children: "See upgrade options" })
|
577
569
|
] })
|
578
570
|
] });
|
579
|
-
},
|
580
|
-
|
581
|
-
const
|
582
|
-
|
583
|
-
|
584
|
-
|
585
|
-
|
586
|
-
|
587
|
-
|
588
|
-
|
589
|
-
|
590
|
-
|
591
|
-
const
|
592
|
-
breadcrumbsItem:
|
593
|
-
breadcrumbs:
|
594
|
-
},
|
595
|
-
/* @__PURE__ */ i(
|
596
|
-
|
597
|
-
] }, `${
|
598
|
-
!!
|
599
|
-
|
600
|
-
] },
|
601
|
-
badge:
|
602
|
-
tag:
|
603
|
-
withNavLinkStyle:
|
604
|
-
disabled:
|
605
|
-
projectNavigationItem:
|
606
|
-
projectNavigationItemDisabled:
|
607
|
-
},
|
608
|
-
/* @__PURE__ */
|
571
|
+
}, y = ({ children: e, ...n }) => /* @__PURE__ */ i("nav", { ...n, className: Dn.sidebarContainer, children: e }), kt = ({ children: e }) => /* @__PURE__ */ i("div", { children: e });
|
572
|
+
y.Top = kt;
|
573
|
+
const Ot = ({ children: e }) => /* @__PURE__ */ i("div", { children: e });
|
574
|
+
y.Bottom = Ot;
|
575
|
+
y.Avatar = Wn;
|
576
|
+
y.IconLink = Vn;
|
577
|
+
y.Menu = Xn;
|
578
|
+
y.ProfileMenu = pt;
|
579
|
+
y.TeamSwitch = jt;
|
580
|
+
y.TeamMenuItem = tn;
|
581
|
+
y.UpgradeMenuItem = Lt;
|
582
|
+
y.ProfileSettingsMenuItem = vt;
|
583
|
+
const At = "_breadcrumbsItem_1hm6a_1", qt = "_breadcrumbs_1hm6a_1", Be = {
|
584
|
+
breadcrumbsItem: At,
|
585
|
+
breadcrumbs: qt
|
586
|
+
}, cr = ({ items: e }) => /* @__PURE__ */ i("nav", { "aria-label": "breadcrumb", className: Be.breadcrumbs, children: e.map((n, t) => /* @__PURE__ */ b(De, { children: [
|
587
|
+
/* @__PURE__ */ i(ze, { className: Be.breadcrumbsItem, href: n.link, rel: "noreferrer", children: n.name }),
|
588
|
+
t < e.length - 1 && /* @__PURE__ */ i("span", { children: " — " })
|
589
|
+
] }, `${n.link}-${n.name}`)) }), Bt = ({ items: e }) => /* @__PURE__ */ i($e, { children: e.map((n, t) => /* @__PURE__ */ b(De, { children: [
|
590
|
+
!!t && n.some((r) => r.visible) && /* @__PURE__ */ i(We, {}),
|
591
|
+
n.filter(({ visible: r }) => r).map(({ link: r, label: a, onClick: o }) => /* @__PURE__ */ i($, { href: r || "#", "aria-label": a, onClick: o, children: a }, a))
|
592
|
+
] }, n[0].label)) }), Mt = "_badge_1pc1v_1", $t = "_tag_1pc1v_15", Ut = "_withNavLinkStyle_1pc1v_42 _withLinkStyle_1pc1v_21", Dt = "_disabled_1pc1v_57", zt = "_projectNavigationItem_1pc1v_61", Ft = "_projectNavigationItemDisabled_1pc1v_67", j = {
|
593
|
+
badge: Mt,
|
594
|
+
tag: $t,
|
595
|
+
withNavLinkStyle: Ut,
|
596
|
+
disabled: Dt,
|
597
|
+
projectNavigationItem: zt,
|
598
|
+
projectNavigationItemDisabled: Ft
|
599
|
+
}, Me = ({ label: e, badge: n, novel: t }) => /* @__PURE__ */ b("div", { className: "flex gap-1", children: [
|
600
|
+
/* @__PURE__ */ b("div", { children: [
|
609
601
|
/* @__PURE__ */ i("span", { children: e }),
|
610
|
-
!!
|
602
|
+
!!n && /* @__PURE__ */ i("div", { className: j.badge, "aria-label": `${n} items requiring attention`, children: n > 9 ? "9+" : n })
|
611
603
|
] }),
|
612
|
-
!!
|
613
|
-
] }),
|
614
|
-
({ label: e, href:
|
604
|
+
!!t && /* @__PURE__ */ i(fn, { className: j.tag, children: t })
|
605
|
+
] }), re = un(
|
606
|
+
({ label: e, href: n = "", disabled: t = !1, badge: r, onClick: a, novel: o }, s) => /* @__PURE__ */ i(ae, { tooltip: "You do not have access to this function", show: t, children: /* @__PURE__ */ i(
|
615
607
|
"div",
|
616
608
|
{
|
617
|
-
className:
|
618
|
-
children:
|
609
|
+
className: t ? j.projectNavigationItemDisabled : j.projectNavigationItem,
|
610
|
+
children: a || t || !n ? /* @__PURE__ */ i(
|
619
611
|
"button",
|
620
612
|
{
|
621
613
|
type: "button",
|
622
|
-
ref:
|
623
|
-
className: j
|
624
|
-
[
|
614
|
+
ref: s,
|
615
|
+
className: R(j.withNavLinkStyle, {
|
616
|
+
[j.disabled]: t
|
625
617
|
}),
|
626
|
-
disabled:
|
627
|
-
onClick:
|
628
|
-
children: /* @__PURE__ */ i(
|
618
|
+
disabled: t,
|
619
|
+
onClick: a,
|
620
|
+
children: /* @__PURE__ */ i(Me, { label: e, badge: r, novel: o })
|
629
621
|
}
|
630
|
-
) : /* @__PURE__ */ i("a", { href:
|
622
|
+
) : /* @__PURE__ */ i("a", { href: n, className: j.withNavLinkStyle, children: /* @__PURE__ */ i(Me, { label: e, badge: r, novel: o }) })
|
631
623
|
}
|
632
624
|
) })
|
633
625
|
);
|
634
|
-
|
635
|
-
const
|
636
|
-
var a, o
|
637
|
-
return
|
626
|
+
re.displayName = "NavigationTabsItem";
|
627
|
+
const Wt = (e) => (e == null ? void 0 : e.some((n) => n.some((t) => t.visible))) ?? !1, Ht = (e) => e.visible && (!e.dropdown || Wt(e.dropdown)), lr = ({ navigation: e, activeItem: n }) => /* @__PURE__ */ i("nav", { "aria-label": "Project", children: /* @__PURE__ */ i("ul", { className: C.navigationTabList, "aria-orientation": "horizontal", children: e.filter(Ht).map((t) => {
|
628
|
+
var r, a, o;
|
629
|
+
return t.dropdown ? /* @__PURE__ */ i(
|
638
630
|
"li",
|
639
631
|
{
|
640
|
-
className:
|
641
|
-
"data-testid":
|
642
|
-
"aria-selected": (
|
632
|
+
className: C.navigationTab,
|
633
|
+
"data-testid": t.key,
|
634
|
+
"aria-selected": (r = t.isActive) == null ? void 0 : r.call(t, n),
|
643
635
|
children: /* @__PURE__ */ i(
|
644
|
-
|
636
|
+
oe,
|
645
637
|
{
|
646
|
-
menuButton: ({ opened:
|
647
|
-
children: /* @__PURE__ */ i(
|
638
|
+
menuButton: ({ opened: s }) => /* @__PURE__ */ i(re, { label: t.label, disabled: t.disabled, active: s }),
|
639
|
+
children: /* @__PURE__ */ i(se, { children: /* @__PURE__ */ i(Bt, { items: t.dropdown }) })
|
648
640
|
}
|
649
641
|
)
|
650
642
|
},
|
651
|
-
|
643
|
+
t.key
|
652
644
|
) : /* @__PURE__ */ i(
|
653
645
|
"li",
|
654
646
|
{
|
655
|
-
className:
|
656
|
-
"data-testid":
|
657
|
-
"aria-selected": (
|
647
|
+
className: C.navigationTab,
|
648
|
+
"data-testid": t.key,
|
649
|
+
"aria-selected": (a = t.isActive) == null ? void 0 : a.call(t, n),
|
658
650
|
children: /* @__PURE__ */ i(
|
659
|
-
|
651
|
+
re,
|
660
652
|
{
|
661
|
-
label:
|
662
|
-
href:
|
663
|
-
onClick:
|
664
|
-
disabled:
|
665
|
-
badge:
|
666
|
-
novel:
|
667
|
-
active: (
|
653
|
+
label: t.label,
|
654
|
+
href: t.link,
|
655
|
+
onClick: t.onClick,
|
656
|
+
disabled: t.disabled,
|
657
|
+
badge: t.badge,
|
658
|
+
novel: t.novel,
|
659
|
+
active: (o = t.isActive) == null ? void 0 : o.call(t, n)
|
668
660
|
}
|
669
661
|
)
|
670
662
|
},
|
671
|
-
|
663
|
+
t.key
|
672
664
|
);
|
673
|
-
}) }) })
|
674
|
-
accessToken: r.string(),
|
675
|
-
refreshToken: r.string()
|
676
|
-
}), hr = r.union([
|
677
|
-
r.object({ Authorization: r.string().startsWith("Bearer ") }),
|
678
|
-
r.object({ "x-csrf-token": r.string() })
|
679
|
-
]), we = ut({
|
680
|
-
description: "Takes a teamId and returns a JWT token access and refresh token for the user",
|
681
|
-
method: "post",
|
682
|
-
requestPathParamsSchema: r.object({ teamId: r.number() }),
|
683
|
-
pathResolver: (e) => `/team/${e.teamId}/actions/get-user-token`,
|
684
|
-
requestHeaderSchema: hr,
|
685
|
-
requestBodySchema: r.undefined(),
|
686
|
-
successResponseBodySchema: gr
|
687
|
-
}), pr = {
|
688
|
-
teamKeyCsrf: (e, t) => ["getUserToken", "x-csrf-token", t, e],
|
689
|
-
teamKeyJwt: (e, t) => ["getUserToken", "Authorization", `Bearer ${t}`, e]
|
690
|
-
}, vr = (e, t) => x({
|
691
|
-
...t,
|
692
|
-
queryFn: ({ queryKey: [n, a, o, s] }) => K(e, we, {
|
693
|
-
pathParams: { teamId: s },
|
694
|
-
headers: a === "x-csrf-token" ? { "x-csrf-token": o } : { Authorization: o }
|
695
|
-
})
|
696
|
-
}), wt = r.union([
|
697
|
-
r.literal("owner"),
|
698
|
-
r.literal("admin"),
|
699
|
-
r.literal("biller"),
|
700
|
-
r.literal("member")
|
701
|
-
]), Tr = r.object({
|
702
|
-
userId: r.number(),
|
703
|
-
userUuid: r.string(),
|
704
|
-
teamId: r.number(),
|
705
|
-
userTeamRole: wt,
|
706
|
-
userEmail: r.string().email(),
|
707
|
-
userName: r.string(),
|
708
|
-
userCurrentTeamId: r.number(),
|
709
|
-
planId: r.number(),
|
710
|
-
planName: r.string(),
|
711
|
-
isProviderAlpha: r.boolean(),
|
712
|
-
isFullyAuthenticated: r.boolean(),
|
713
|
-
exp: r.number()
|
714
|
-
});
|
715
|
-
function Y(e) {
|
716
|
-
try {
|
717
|
-
const t = e.split(".")[1], n = atob(t);
|
718
|
-
return Tr.parse(JSON.parse(n));
|
719
|
-
} catch {
|
720
|
-
return;
|
721
|
-
}
|
722
|
-
}
|
723
|
-
const G = class G extends CustomEvent {
|
724
|
-
constructor(t) {
|
725
|
-
super(G.eventName, {
|
726
|
-
detail: { token: t, payload: Y(t.accessToken) }
|
727
|
-
});
|
728
|
-
}
|
729
|
-
};
|
730
|
-
Re(G, "eventName", "new-jwt-issued");
|
731
|
-
let O = G;
|
732
|
-
function Se() {
|
733
|
-
const e = _e(document.cookie, "accessToken"), t = _e(document.cookie, "refreshToken");
|
734
|
-
if (!(!e || !t))
|
735
|
-
return { accessToken: e, refreshToken: t };
|
736
|
-
}
|
737
|
-
function St() {
|
738
|
-
return _e(document.cookie, "csrf_token");
|
739
|
-
}
|
740
|
-
function _e(e, t) {
|
741
|
-
var n, a;
|
742
|
-
return (a = (n = e.split(";").find((o) => o.trim().startsWith(`${t}=`))) == null ? void 0 : n.trim()) == null ? void 0 : a.substring(t.length + 1);
|
743
|
-
}
|
744
|
-
function ha(e, t) {
|
745
|
-
const n = St(), a = vr(e, {
|
746
|
-
queryKey: pr.teamKeyCsrf(t, n ?? ""),
|
747
|
-
enabled: n !== void 0
|
748
|
-
}), o = at();
|
749
|
-
return M(() => {
|
750
|
-
a.data && a.data.accessToken !== o.current && (window.dispatchEvent(new O(a.data)), o.current = a.data.accessToken);
|
751
|
-
}, [a.data]), a;
|
752
|
-
}
|
753
|
-
function It() {
|
754
|
-
const [e, t] = ge();
|
755
|
-
return M(() => {
|
756
|
-
const n = (o) => {
|
757
|
-
t(o.detail.payload);
|
758
|
-
}, a = Se();
|
759
|
-
return t(a && Y(a.accessToken)), window.addEventListener(O.eventName, n), () => {
|
760
|
-
window.removeEventListener(O.eventName, n);
|
761
|
-
};
|
762
|
-
}, []), e;
|
763
|
-
}
|
764
|
-
const yr = r.object({
|
765
|
-
user_id: r.number(),
|
766
|
-
email: r.string().email(),
|
767
|
-
fullname: r.string(),
|
768
|
-
created_at: r.string(),
|
769
|
-
created_at_timestamp: r.number(),
|
770
|
-
role: wt
|
771
|
-
}), wr = r.object({
|
772
|
-
team_id: r.number(),
|
773
|
-
team_user: yr
|
774
|
-
}), Sr = Q({
|
775
|
-
description: "Get the details of a team user",
|
776
|
-
requestPathParamsSchema: r.object({ teamId: r.number(), userId: r.number() }),
|
777
|
-
pathResolver: ({ teamId: e, userId: t }) => `/teams/${e}/users/${t}`,
|
778
|
-
successResponseBodySchema: wr
|
779
|
-
}), Ir = {
|
780
|
-
teamUserKey: (e, t) => ["GetTeamUsers", e, t]
|
781
|
-
}, Er = (e, t) => x({
|
782
|
-
...t,
|
783
|
-
queryFn: ({ queryKey: [n, a, o] }) => W(e, Sr, { pathParams: { teamId: a, userId: o } })
|
784
|
-
});
|
785
|
-
function pa(e) {
|
786
|
-
const t = It();
|
787
|
-
return Er(e, {
|
788
|
-
queryKey: Ir.teamUserKey((t == null ? void 0 : t.teamId) ?? 0, (t == null ? void 0 : t.userId) ?? 0),
|
789
|
-
enabled: (t == null ? void 0 : t.userId) !== void 0 && t.teamId !== void 0
|
790
|
-
});
|
791
|
-
}
|
792
|
-
const kr = r.object({
|
793
|
-
lang_id: r.number(),
|
794
|
-
lang_iso: r.string(),
|
795
|
-
lang_name: r.string(),
|
796
|
-
is_writable: r.union([r.literal(0), r.literal(1)])
|
797
|
-
}), Cr = r.object({
|
798
|
-
user_id: r.number(),
|
799
|
-
email: r.string().email(),
|
800
|
-
fullname: r.string(),
|
801
|
-
created_at: r.string(),
|
802
|
-
created_at_timestamp: r.number(),
|
803
|
-
admin_rights: r.array(r.string()),
|
804
|
-
languages: r.array(kr),
|
805
|
-
is_admin: r.boolean(),
|
806
|
-
is_reviewer: r.boolean()
|
807
|
-
}), Nr = r.object({
|
808
|
-
project_id: r.string(),
|
809
|
-
contributors: r.array(Cr)
|
810
|
-
}), Rr = Q({
|
811
|
-
description: "Get the details of a project contributor",
|
812
|
-
requestPathParamsSchema: r.object({ projectId: r.string(), contributorId: r.number() }),
|
813
|
-
pathResolver: ({ projectId: e, contributorId: t }) => `/projects/${e}/contributors/${t}`,
|
814
|
-
successResponseBodySchema: Nr
|
815
|
-
}), jr = {
|
816
|
-
projectUserKey: (e, t) => ["RetrieveContributor", e, t]
|
817
|
-
}, Pr = (e, t) => x({
|
818
|
-
...t,
|
819
|
-
queryFn: ({ queryKey: [n, a, o] }) => W(e, Rr, {
|
820
|
-
pathParams: { projectId: a, contributorId: o }
|
821
|
-
})
|
822
|
-
});
|
823
|
-
function va(e, t) {
|
824
|
-
const n = It();
|
825
|
-
return Pr(e, {
|
826
|
-
queryKey: jr.projectUserKey(t, (n == null ? void 0 : n.userId) ?? 0),
|
827
|
-
enabled: n !== void 0
|
828
|
-
});
|
829
|
-
}
|
830
|
-
function Ta() {
|
831
|
-
const e = Se();
|
832
|
-
if (!e)
|
833
|
-
return;
|
834
|
-
const t = Y(e.accessToken);
|
835
|
-
if (t)
|
836
|
-
return { ...e, payload: t };
|
837
|
-
}
|
838
|
-
function ya() {
|
839
|
-
return (e) => (t, n) => e(t, {
|
840
|
-
...n,
|
841
|
-
headers: {
|
842
|
-
...n.headers,
|
843
|
-
"x-lokalise-plugin": "true"
|
844
|
-
},
|
845
|
-
credentials: "omit"
|
846
|
-
});
|
847
|
-
}
|
848
|
-
function D(e) {
|
849
|
-
return { Authorization: `Bearer ${e}` };
|
850
|
-
}
|
851
|
-
function Ar(e, t) {
|
852
|
-
return (n) => async (a, o) => {
|
853
|
-
var u;
|
854
|
-
const s = await t.getCachedJwtToken();
|
855
|
-
if (s === void 0)
|
856
|
-
return n(a, o);
|
857
|
-
const c = await n(a, {
|
858
|
-
...o,
|
859
|
-
headers: { ...o.headers, ...D(s.accessToken) }
|
860
|
-
});
|
861
|
-
if (s && (c.status === 401 || c.status === 403)) {
|
862
|
-
const d = Y(s.accessToken);
|
863
|
-
if (!d)
|
864
|
-
return c;
|
865
|
-
const l = await K(e, we, {
|
866
|
-
pathParams: { teamId: d.teamId },
|
867
|
-
headers: D(s.refreshToken)
|
868
|
-
});
|
869
|
-
return await ((u = t.onNewJwtTokenIssued) == null ? void 0 : u.call(t, l)), n(a, {
|
870
|
-
...o,
|
871
|
-
headers: { ...o.headers, ...D(l.accessToken) }
|
872
|
-
});
|
873
|
-
}
|
874
|
-
return c;
|
875
|
-
};
|
876
|
-
}
|
877
|
-
const Or = {
|
878
|
-
wretch: {
|
879
|
-
lokaliseAuth(e) {
|
880
|
-
return this.middlewares([Ar(this, e)]);
|
881
|
-
}
|
882
|
-
}
|
883
|
-
};
|
884
|
-
function Lr(e, t) {
|
885
|
-
return (n) => async (a, o) => {
|
886
|
-
var d;
|
887
|
-
if (await t.getCachedJwtToken() !== void 0)
|
888
|
-
return n(a, o);
|
889
|
-
const c = await t.getCsrfToken();
|
890
|
-
if (c === void 0)
|
891
|
-
return n(a, o);
|
892
|
-
const u = await K(e, we, {
|
893
|
-
pathParams: { teamId: await t.getTeamId() },
|
894
|
-
headers: { "x-csrf-token": c }
|
895
|
-
});
|
896
|
-
return await ((d = t.onNewJwtTokenIssued) == null ? void 0 : d.call(t, u)), n(a, {
|
897
|
-
...o,
|
898
|
-
headers: { ...o.headers, ...D(u.accessToken) }
|
899
|
-
});
|
900
|
-
};
|
901
|
-
}
|
902
|
-
const wa = {
|
903
|
-
wretch: {
|
904
|
-
lokaliseAuth(e = {}) {
|
905
|
-
return this.addon(Or).lokaliseAuth(nt(e));
|
906
|
-
},
|
907
|
-
promoteClassicSession(e) {
|
908
|
-
const t = nt(e);
|
909
|
-
return this.middlewares([Lr(this, t)]);
|
910
|
-
}
|
911
|
-
}
|
912
|
-
};
|
913
|
-
function nt(e) {
|
914
|
-
return {
|
915
|
-
...e,
|
916
|
-
getCachedJwtToken: e.getCachedJwtToken ?? (async () => Se()),
|
917
|
-
getCsrfToken: "getCsrfToken" in e ? e.getCsrfToken : async () => St(),
|
918
|
-
onNewJwtTokenIssued: (t) => {
|
919
|
-
var n;
|
920
|
-
return window.dispatchEvent(new O(t)), ((n = e.onNewJwtTokenIssued) == null ? void 0 : n.call(e, t)) ?? Promise.resolve();
|
921
|
-
}
|
922
|
-
};
|
923
|
-
}
|
924
|
-
const qr = r.object({
|
925
|
-
lang_iso: r.string(),
|
926
|
-
custom_iso: r.string().optional()
|
927
|
-
}), Mr = r.object({
|
928
|
-
language_id: r.number(),
|
929
|
-
language_iso: r.string(),
|
930
|
-
progress: r.number(),
|
931
|
-
words_to_do: r.number()
|
932
|
-
}), Ie = r.union([
|
933
|
-
r.literal("localization_files"),
|
934
|
-
r.literal("paged_documents"),
|
935
|
-
r.literal("marketing")
|
936
|
-
]), xr = r.object({
|
937
|
-
per_platform_key_names: r.boolean(),
|
938
|
-
reviewing: r.boolean(),
|
939
|
-
auto_toggle_unverified: r.boolean(),
|
940
|
-
offline_translation: r.boolean(),
|
941
|
-
key_editing: r.boolean(),
|
942
|
-
inline_machine_translations: r.boolean(),
|
943
|
-
custom_translation_statuses: r.boolean(),
|
944
|
-
custom_translation_statuses_allow_multiple: r.boolean(),
|
945
|
-
segmentation: r.boolean(),
|
946
|
-
contributor_preview_download_enabled: r.boolean()
|
947
|
-
}), Ur = r.object({
|
948
|
-
not_reviewed: r.number(),
|
949
|
-
unverified: r.number(),
|
950
|
-
spelling_grammar: r.number(),
|
951
|
-
inconsistent_placeholders: r.number(),
|
952
|
-
inconsistent_html: r.number(),
|
953
|
-
different_number_of_urls: r.number(),
|
954
|
-
different_urls: r.number(),
|
955
|
-
leading_whitespace: r.number(),
|
956
|
-
trailing_whitespace: r.number(),
|
957
|
-
different_number_of_email_address: r.number(),
|
958
|
-
different_email_address: r.number(),
|
959
|
-
different_brackets: r.number(),
|
960
|
-
different_numbers: r.number(),
|
961
|
-
double_space: r.number(),
|
962
|
-
special_placeholder: r.number(),
|
963
|
-
unbalanced_brackets: r.number()
|
964
|
-
}), Br = r.object({
|
965
|
-
progress_total: r.number(),
|
966
|
-
keys_total: r.number(),
|
967
|
-
team: r.number(),
|
968
|
-
base_words: r.number(),
|
969
|
-
qa_issues_total: r.number(),
|
970
|
-
qa_issues: Ur,
|
971
|
-
languages: r.array(Mr)
|
972
|
-
}), F = r.object({
|
973
|
-
project_id: r.string(),
|
974
|
-
uuid: r.string().uuid(),
|
975
|
-
project_type: Ie,
|
976
|
-
name: r.string(),
|
977
|
-
description: r.string(),
|
978
|
-
created_at: r.string(),
|
979
|
-
created_at_timestamp: r.number(),
|
980
|
-
created_by: r.number(),
|
981
|
-
created_by_email: r.string(),
|
982
|
-
team_id: r.number(),
|
983
|
-
base_language_id: r.number(),
|
984
|
-
base_language_iso: r.string(),
|
985
|
-
settings: xr,
|
986
|
-
statistics: Br
|
987
|
-
}), $r = r.object({
|
988
|
-
name: r.string(),
|
989
|
-
team_id: r.string(),
|
990
|
-
base_lang_iso: r.string(),
|
991
|
-
languages: r.array(qr),
|
992
|
-
project_type: Ie,
|
993
|
-
is_segmentation_enabled: r.boolean()
|
994
|
-
}), Hr = r.object({
|
995
|
-
project_type: Ie.optional(),
|
996
|
-
filter_team_id: r.number().optional(),
|
997
|
-
filter_names: r.string().optional(),
|
998
|
-
include_statistics: r.boolean().optional(),
|
999
|
-
include_settings: r.boolean().optional(),
|
1000
|
-
limit: r.number().optional(),
|
1001
|
-
page: r.number().optional()
|
1002
|
-
}), Dr = r.array(
|
1003
|
-
r.union([
|
1004
|
-
F.omit({ statistics: !0, settings: !0 }),
|
1005
|
-
F.pick({ settings: !0, statistics: !0 }).partial()
|
1006
|
-
])
|
1007
|
-
), zr = r.object({
|
1008
|
-
project_id: r.string()
|
1009
|
-
}), Ee = () => "/projects", Fr = ut({
|
1010
|
-
description: "Create a new project",
|
1011
|
-
method: "post",
|
1012
|
-
pathResolver: Ee,
|
1013
|
-
requestBodySchema: $r,
|
1014
|
-
successResponseBodySchema: F
|
1015
|
-
}), Gr = Q({
|
1016
|
-
description: "List all projects",
|
1017
|
-
pathResolver: Ee,
|
1018
|
-
requestQuerySchema: Hr,
|
1019
|
-
successResponseBodySchema: Dr
|
1020
|
-
}), Jr = Q({
|
1021
|
-
description: "Retrieve a project",
|
1022
|
-
pathResolver: Ee,
|
1023
|
-
requestQuerySchema: zr,
|
1024
|
-
successResponseBodySchema: F
|
1025
|
-
});
|
1026
|
-
function Sa(e, t = {}) {
|
1027
|
-
return Mt({
|
1028
|
-
...t,
|
1029
|
-
mutationFn: (n) => K(e, Fr, {
|
1030
|
-
body: n
|
1031
|
-
})
|
1032
|
-
});
|
1033
|
-
}
|
1034
|
-
const Ia = {
|
1035
|
-
paramsKey: (e) => ["listProjects", e]
|
1036
|
-
};
|
1037
|
-
function Ea(e, t) {
|
1038
|
-
return x({
|
1039
|
-
...t,
|
1040
|
-
queryFn: ({ queryKey: [n, a] }) => W(e, Gr, {
|
1041
|
-
queryParams: a
|
1042
|
-
})
|
1043
|
-
});
|
1044
|
-
}
|
1045
|
-
const ka = {
|
1046
|
-
projectIdKey: (e) => ["retrieveProject", e]
|
1047
|
-
};
|
1048
|
-
function Ca(e, t) {
|
1049
|
-
return x({
|
1050
|
-
...t,
|
1051
|
-
queryFn: ({ queryKey: [n, a] }) => W(e, Jr, {
|
1052
|
-
queryParams: { project_id: a }
|
1053
|
-
})
|
1054
|
-
});
|
1055
|
-
}
|
665
|
+
}) }) });
|
1056
666
|
export {
|
1057
|
-
|
1058
|
-
|
1059
|
-
|
1060
|
-
|
1061
|
-
|
1062
|
-
|
1063
|
-
|
1064
|
-
|
1065
|
-
|
1066
|
-
|
1067
|
-
|
1068
|
-
|
1069
|
-
|
1070
|
-
|
1071
|
-
|
1072
|
-
|
1073
|
-
|
1074
|
-
|
1075
|
-
|
1076
|
-
|
1077
|
-
|
1078
|
-
|
1079
|
-
|
1080
|
-
|
1081
|
-
oa as isEssentialPlan,
|
1082
|
-
ye as isFreePlan,
|
1083
|
-
ca as isPaidPlan,
|
1084
|
-
ia as isProPlan,
|
1085
|
-
aa as isStartPlan,
|
1086
|
-
Tt as isTrialPlan,
|
1087
|
-
Gr as listProjects,
|
1088
|
-
Ia as listProjectsKey,
|
1089
|
-
da as makeUrlClickable,
|
1090
|
-
Y as parseJwtTokenPayload,
|
1091
|
-
ya as publicApiHeadersMiddleware,
|
1092
|
-
Rr as retrieveContributor,
|
1093
|
-
jr as retrieveContributorKeys,
|
1094
|
-
Jr as retrieveProject,
|
1095
|
-
ka as retrieveProjectQueryKey,
|
1096
|
-
va as useAuthenticatedProjectContributor,
|
1097
|
-
It as useAuthenticatedSessionPayload,
|
1098
|
-
pa as useAuthenticatedUser,
|
1099
|
-
Sa as useCreateProjectMutation,
|
1100
|
-
ba as useEffectOnce,
|
1101
|
-
ha as useGetPromotedClassicSessionJwtQuery,
|
1102
|
-
Er as useGetTeamUsersQuery,
|
1103
|
-
vr as useGetUserTokenQuery,
|
1104
|
-
Ea as useListProjectsQuery,
|
1105
|
-
Pr as useRetrieveContributorQuery,
|
1106
|
-
Ca as useRetrieveProjectQuery
|
667
|
+
cr as Breadcrumbs,
|
668
|
+
en as ENTERPRISE_OPENSOURCE_PLAN_ID,
|
669
|
+
ut as ENTERPRISE_PLAN_IDS,
|
670
|
+
ct as ESSENTIAL_PLAN_IDS,
|
671
|
+
Qe as FREE_PLAN_ID,
|
672
|
+
M as NavigationPanel,
|
673
|
+
lr as NavigationTabs,
|
674
|
+
lt as PRO_PLAN_IDS,
|
675
|
+
st as START_PLAN_IDS,
|
676
|
+
y as Sidebar,
|
677
|
+
ot as TRIAL_PLAN_ID,
|
678
|
+
rr as convertNewLineToBreakTag,
|
679
|
+
ar as formatDate,
|
680
|
+
or as formatDateTz,
|
681
|
+
tr as isEnterpriseOpenSourcePlan,
|
682
|
+
er as isEnterprisePlan,
|
683
|
+
Kt as isEssentialPlan,
|
684
|
+
le as isFreePlan,
|
685
|
+
nr as isPaidPlan,
|
686
|
+
Qt as isProPlan,
|
687
|
+
Jt as isStartPlan,
|
688
|
+
nn as isTrialPlan,
|
689
|
+
ir as makeUrlClickable,
|
690
|
+
sr as useEffectOnce
|
1107
691
|
};
|