@lokalise/harmony 1.14.0 → 1.15.0-exp-removeaddon.1

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