@lystech/sections 0.4.0 → 0.4.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/dist/editeur.js CHANGED
@@ -1,46 +1,46 @@
1
- import { jsx as e, jsxs as m, Fragment as te } from "react/jsx-runtime";
2
- import { createRoot as ne } from "react-dom/client";
3
- import { useState as L, useRef as B, useEffect as J, useCallback as F, useMemo as K } from "react";
4
- function de({
1
+ import { jsx as e, jsxs as f, Fragment as ne } from "react/jsx-runtime";
2
+ import { createRoot as oe } from "react-dom/client";
3
+ import { useState as L, useRef as H, useEffect as _, useCallback as J, useMemo as $ } from "react";
4
+ function me({
5
5
  jeton: n,
6
6
  site: t,
7
- apiBaseUrl: i,
7
+ apiBaseUrl: s,
8
8
  surJetonRefuse: r
9
9
  }) {
10
10
  const a = {
11
11
  "Content-Type": "application/json",
12
12
  Authorization: "Bearer " + n
13
13
  };
14
- function d(o, c) {
15
- if (c && (o.status === 401 || o.status === 403) && r(), !o.ok) throw new Error(String(o.status));
14
+ function d(o, i) {
15
+ if (i && (o.status === 401 || o.status === 403) && r(), !o.ok) throw new Error(String(o.status));
16
16
  }
17
- async function l(o, c = !0) {
18
- const h = await fetch(i + o, {
19
- headers: c ? a : void 0
17
+ async function l(o, i = !0) {
18
+ const x = await fetch(s + o, {
19
+ headers: i ? a : void 0
20
20
  });
21
- return d(h, c), await h.json();
21
+ return d(x, i), await x.json();
22
22
  }
23
- async function b(o, c, h) {
24
- const g = await fetch(i + o, {
25
- method: c,
23
+ async function b(o, i, x) {
24
+ const v = await fetch(s + o, {
25
+ method: i,
26
26
  headers: a,
27
- body: h === void 0 ? void 0 : JSON.stringify(h)
27
+ body: x === void 0 ? void 0 : JSON.stringify(x)
28
28
  });
29
- return d(g, !0), await g.json();
29
+ return d(v, !0), await v.json();
30
30
  }
31
31
  return {
32
32
  /** Les blocs que le site a déclaré savoir afficher. Route publique. */
33
33
  schemas: () => l("/site-sections/public/" + encodeURIComponent(t) + "/schemas", !1),
34
34
  /** Ce qui existe sur une page, brouillons compris. */
35
35
  pourPage: (o) => l("/site-sections?page=" + encodeURIComponent(o)),
36
- creer: (o, c, h) => b("/site-sections", "POST", { page: o, blockType: c, draft: h }),
37
- enregistrerBrouillon: (o, c) => b("/site-sections/" + o + "/draft", "PUT", { draft: c }),
36
+ creer: (o, i, x) => b("/site-sections", "POST", { page: o, blockType: i, draft: x }),
37
+ enregistrerBrouillon: (o, i) => b("/site-sections/" + o + "/draft", "PUT", { draft: i }),
38
38
  publier: (o) => b("/site-sections/" + o + "/publish", "POST"),
39
39
  /** Ramène le brouillon à ce qui est en ligne. */
40
40
  annuler: (o) => b("/site-sections/" + o + "/revert", "POST")
41
41
  };
42
42
  }
43
- const pe = {
43
+ const fe = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABICAYAAABV7bNHAAAcRElEQVR42u2ce7RsV1Xmf3OuvetxHveZ3FxJI6gJYNKCrUhsEBO6AR8YQcc4B5BWpHWMYINNa2LTw4FUjt12awdfPUQbWm3wSZ/TNEgAQUwIJhgkvAx5ERJy87jhvs89z6rae605+4+1q06d5N68SJThyL5jj1tVp2pX7bnn/L5vfmutDU9uT25Pbk/gJk/48efmdPzsvPOchcsdxJ8M0MQX+MMFbmnRvl6DJk9kXC649NIL1o5ULwiVHFqu1+/75qc9fXnjwIljn3n1wSM6v5QeEBFlbk5YWrJTx/SfUoB6PWVhwc667D/+0fpw+sfLgyu49mORbKBDO1m05Z7o8Vb6m5+fQj734vOe8aV3/ebCiTQ+wFygd56zsGD/ZEvMez3d25m6ttadF9S33evF5kZRmoMFagpMHajR4aaVlu5U0etnS/vwzMm7rrn16qsPp8lSXFpK/1gByjjgrnhPH6fQCMDz1+NTY1E8s5oKobN/b6AoHFV3cdMiWpGGqR09hdCSYat77nqn8xOH6L7nQOfpN+z7wR/7w+fOv+7FQfBxcObmwj8EZj4oQD13RcSQBWNxMeD+tf0IzycRd+37VorWbrzyYmeb7p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vPyVT934kR96u13wnIvTbIt2qlM8sUp18z1w8ATx9vtIXz1BMHOKoOaio3U9iKN1IiSrNA5uaqf+Xz5l7+wHvvj+P/q0jeGhxyO1Lb7+bm4ytxhYmk8O4dvf+96fXTn3rMtqb5298pm7sL8/gB07SXuzpo2QgtOnphimAfXwpKfhobakW6bFP7dzdua6Z+r0jUtLv9kf42avxz/UbSue2DsZuAuaJwzOXfmus+9YLV/Y//Q9T+PwkR1FGboUnqxOwxjTsZTsK8Vw9f5CqsMvbdmx31pa6m9D2gsvLLjoIvt6uJ/HE1Fy4YFXRR7JDVLm5sI/1i0p/sHuH7Qtm5aWlCWApVO/Z+sGTHw93SLnye3J7cntCdv+P7oWqdEFC8mjAAAAAElFTkSuQmCC", be = {
44
44
  apiKey: "AIzaSyCpAeHlt1wZvM5KtYg7X7MDVnWVJT86gvc",
45
45
  authDomain: "lystech.firebaseapp.com",
46
46
  projectId: "lystech",
@@ -48,27 +48,21 @@ const pe = {
48
48
  messagingSenderId: "237347321732",
49
49
  appId: "1:237347321732:web:7f9586d48e488d73ddcfd1"
50
50
  };
51
- function fe() {
52
- return /* @__PURE__ */ m("span", { className: "marque", children: [
53
- /* @__PURE__ */ e("svg", { viewBox: "0 0 24 24", "aria-hidden": "true", focusable: "false", children: /* @__PURE__ */ e(
54
- "path",
55
- {
56
- d: "M12 2c2.6 2.4 3.9 4.9 3.9 7.5 0 1.6-.5 3-1.6 4.2 1.9-.3 3.4-1.1 4.6-2.4-.2 3.4-2.3 5.9-6.1 7.3V22h-1.6v-3.4C7.4 17.2 5.3 14.7 5.1 11.3c1.2 1.3 2.7 2.1 4.6 2.4-1.1-1.2-1.6-2.6-1.6-4.2C8.1 6.9 9.4 4.4 12 2z",
57
- fill: "currentColor"
58
- }
59
- ) }),
51
+ function ge() {
52
+ return /* @__PURE__ */ f("span", { className: "marque", children: [
53
+ /* @__PURE__ */ e("img", { src: fe, alt: "", width: 22, height: 22 }),
60
54
  /* @__PURE__ */ e("span", { className: "marque__mot", children: "Lystech" })
61
55
  ] });
62
56
  }
63
- function me() {
64
- return /* @__PURE__ */ m("svg", { viewBox: "0 0 18 18", "aria-hidden": "true", focusable: "false", className: "logo", children: [
57
+ function xe() {
58
+ return /* @__PURE__ */ f("svg", { viewBox: "0 0 18 18", "aria-hidden": "true", focusable: "false", className: "logo", children: [
65
59
  /* @__PURE__ */ e("path", { fill: "#4285F4", d: "M17.64 9.2c0-.64-.06-1.25-.16-1.84H9v3.48h4.84a4.14 4.14 0 0 1-1.8 2.72v2.26h2.91c1.7-1.57 2.69-3.88 2.69-6.62z" }),
66
60
  /* @__PURE__ */ e("path", { fill: "#34A853", d: "M9 18c2.43 0 4.47-.8 5.96-2.18l-2.91-2.26c-.81.54-1.84.86-3.05.86-2.34 0-4.33-1.58-5.04-3.71H.96v2.33A9 9 0 0 0 9 18z" }),
67
61
  /* @__PURE__ */ e("path", { fill: "#FBBC05", d: "M3.96 10.71a5.41 5.41 0 0 1 0-3.42V4.96H.96a9 9 0 0 0 0 8.08l3-2.33z" }),
68
62
  /* @__PURE__ */ e("path", { fill: "#EA4335", d: "M9 3.58c1.32 0 2.5.45 3.44 1.35l2.58-2.59C13.46.89 11.43 0 9 0A9 9 0 0 0 .96 4.96l3 2.33C4.67 5.16 6.66 3.58 9 3.58z" })
69
63
  ] });
70
64
  }
71
- function be() {
65
+ function he() {
72
66
  return /* @__PURE__ */ e("svg", { viewBox: "0 0 24 24", "aria-hidden": "true", focusable: "false", className: "logo", children: /* @__PURE__ */ e(
73
67
  "path",
74
68
  {
@@ -77,15 +71,15 @@ function be() {
77
71
  }
78
72
  ) });
79
73
  }
80
- function xe({
74
+ function ve({
81
75
  site: n,
82
76
  apiBaseUrl: t,
83
- methodes: i = ["google", "facebook"],
77
+ methodes: s = ["google", "facebook"],
84
78
  surJeton: r,
85
79
  surFermer: a
86
80
  }) {
87
- const [d, l] = L({ nom: "repos" }), b = (g) => {
88
- switch (g) {
81
+ const [d, l] = L({ nom: "repos" }), b = (v) => {
82
+ switch (v) {
89
83
  case "auth/popup-blocked":
90
84
  return "Votre navigateur a bloqué la fenêtre de connexion. Autorisez les fenêtres pour ce site, puis réessayez.";
91
85
  case "auth/popup-closed-by-user":
@@ -100,32 +94,32 @@ function xe({
100
94
  default:
101
95
  return "La connexion a échoué. Réessayez dans un instant.";
102
96
  }
103
- }, o = async (g, C = !1) => {
104
- const E = await fetch(t + "/site-sections/edit-login/third-party", {
97
+ }, o = async (v, A = !1) => {
98
+ const T = await fetch(t + "/site-sections/edit-login/third-party", {
105
99
  method: "POST",
106
100
  headers: { "Content-Type": "application/json" },
107
101
  body: JSON.stringify({
108
102
  site: n,
109
- token: g,
103
+ token: v,
110
104
  tokenType: "firebase",
111
- demanderAcces: C
105
+ demanderAcces: A
112
106
  })
113
107
  });
114
- if (E.status === 429) {
108
+ if (T.status === 429) {
115
109
  l({
116
110
  nom: "erreur",
117
111
  texte: "Trop de tentatives. Réessayez dans quelques minutes."
118
112
  });
119
113
  return;
120
114
  }
121
- const v = await E.json().catch(() => null);
122
- if (v?.ok && v?.token) {
123
- r(v.token);
115
+ const y = await T.json().catch(() => null);
116
+ if (y?.ok && y?.token) {
117
+ r(y.token);
124
118
  return;
125
119
  }
126
- switch (v?.raison) {
120
+ switch (y?.raison) {
127
121
  case "sans_acces":
128
- l({ nom: "sans-acces", jeton: g });
122
+ l({ nom: "sans-acces", jeton: v });
129
123
  return;
130
124
  case "demande_envoyee":
131
125
  l({ nom: "demande-envoyee" });
@@ -151,19 +145,19 @@ function xe({
151
145
  texte: "La connexion a échoué. Réessayez dans un instant."
152
146
  });
153
147
  }
154
- }, c = async (g) => {
155
- l({ nom: "envoi", quoi: g });
148
+ }, i = async (v) => {
149
+ l({ nom: "envoi", quoi: v });
156
150
  try {
157
- const [{ initializeApp: C, getApps: E }, v] = await Promise.all([
151
+ const [{ initializeApp: A, getApps: T }, y] = await Promise.all([
158
152
  import("./morceaux/index.esm-B4AB50RA.js"),
159
153
  import("./morceaux/index.esm-B4hL1FOE.js")
160
- ]), R = E().find((_) => _.name === "lystech-edition") ?? C(pe, "lystech-edition"), q = g === "google" ? new v.GoogleAuthProvider() : new v.FacebookAuthProvider(), w = await (await v.signInWithPopup(v.getAuth(R), q)).user.getIdToken();
161
- await o(w);
162
- } catch (C) {
163
- l({ nom: "erreur", texte: b(String(C?.code ?? "")) });
154
+ ]), P = T().find((U) => U.name === "lystech-edition") ?? A(be, "lystech-edition"), Q = v === "google" ? new y.GoogleAuthProvider() : new y.FacebookAuthProvider(), N = await (await y.signInWithPopup(y.getAuth(P), Q)).user.getIdToken();
155
+ await o(N);
156
+ } catch (A) {
157
+ l({ nom: "erreur", texte: b(String(A?.code ?? "")) });
164
158
  }
165
- }, h = d.nom === "envoi";
166
- return /* @__PURE__ */ e("div", { className: "voile", role: "dialog", "aria-modal": "true", "aria-label": "Modifier ce site", children: /* @__PURE__ */ m("div", { className: "fenetre", children: [
159
+ }, x = d.nom === "envoi";
160
+ return /* @__PURE__ */ e("div", { className: "voile", role: "dialog", "aria-modal": "true", "aria-label": "Modifier ce site", children: /* @__PURE__ */ f("div", { className: "fenetre", children: [
167
161
  /* @__PURE__ */ e(
168
162
  "button",
169
163
  {
@@ -174,12 +168,12 @@ function xe({
174
168
  children: "✕"
175
169
  }
176
170
  ),
177
- /* @__PURE__ */ m("div", { className: "fenetre__tete", children: [
178
- /* @__PURE__ */ e(fe, {}),
171
+ /* @__PURE__ */ f("div", { className: "fenetre__tete", children: [
172
+ /* @__PURE__ */ e(ge, {}),
179
173
  /* @__PURE__ */ e("h2", { className: "fenetre__titre", children: "Modifier ce site" }),
180
174
  /* @__PURE__ */ e("p", { className: "fenetre__sous", children: "Vous vous connectez à Lystech. Cet accès ne sert qu'à modifier le contenu de ce site." })
181
175
  ] }),
182
- /* @__PURE__ */ m("div", { className: "fenetre__corps", children: [
176
+ /* @__PURE__ */ f("div", { className: "fenetre__corps", children: [
183
177
  d.nom === "erreur" && /* @__PURE__ */ e("p", { className: "message message--erreur", children: d.texte }),
184
178
  d.nom === "aucun-compte" && /* @__PURE__ */ e("p", { className: "message message--info", children: "Aucun compte Lystech ne correspond à cette adresse. Adressez-vous à la personne responsable du site." }),
185
179
  d.nom === "sans-acces" && /* @__PURE__ */ e("p", { className: "message message--info", children: "Vous êtes bien reconnu, mais vous n'avez pas encore le droit de modifier ce site. Vous pouvez le demander : la personne responsable recevra un courriel." }),
@@ -202,47 +196,46 @@ function xe({
202
196
  onClick: a,
203
197
  children: "Fermer"
204
198
  }
205
- ) : /* @__PURE__ */ m("div", { className: "fournisseurs", children: [
206
- i.includes("google") && /* @__PURE__ */ m(
199
+ ) : /* @__PURE__ */ f("div", { className: "fournisseurs", children: [
200
+ s.includes("google") && /* @__PURE__ */ f(
207
201
  "button",
208
202
  {
209
203
  type: "button",
210
204
  className: "fournisseur fournisseur--google",
211
- disabled: h,
205
+ disabled: x,
212
206
  onClick: () => {
213
- c("google");
207
+ i("google");
214
208
  },
215
209
  children: [
216
- /* @__PURE__ */ e(me, {}),
210
+ /* @__PURE__ */ e(xe, {}),
217
211
  /* @__PURE__ */ e("span", { children: d.nom === "envoi" && d.quoi === "google" ? "Connexion…" : "Continuer avec Google" })
218
212
  ]
219
213
  }
220
214
  ),
221
- i.includes("facebook") && /* @__PURE__ */ m(
215
+ s.includes("facebook") && /* @__PURE__ */ f(
222
216
  "button",
223
217
  {
224
218
  type: "button",
225
219
  className: "fournisseur fournisseur--facebook",
226
- disabled: h,
220
+ disabled: x,
227
221
  onClick: () => {
228
- c("facebook");
222
+ i("facebook");
229
223
  },
230
224
  children: [
231
- /* @__PURE__ */ e(be, {}),
225
+ /* @__PURE__ */ e(he, {}),
232
226
  /* @__PURE__ */ e("span", { children: d.nom === "envoi" && d.quoi === "facebook" ? "Connexion…" : "Continuer avec Facebook" })
233
227
  ]
234
228
  }
235
229
  )
236
230
  ] })
237
- ] }),
238
- /* @__PURE__ */ e("p", { className: "fenetre__pied", children: "Votre mot de passe reste chez votre fournisseur : ce site ne le voit jamais." })
231
+ ] })
239
232
  ] }) });
240
233
  }
241
- function he(n, t) {
242
- const i = n && typeof n == "object" && !Array.isArray(n) ? Object.keys(n).filter((a) => /^[a-z]{2}(-[A-Za-z]{2})?$/.test(a)) : [], r = t.slice(0, 2);
243
- return Array.from(/* @__PURE__ */ new Set([r, ...i]));
234
+ function ye(n, t) {
235
+ const s = n && typeof n == "object" && !Array.isArray(n) ? Object.keys(n).filter((a) => /^[a-z]{2}(-[A-Za-z]{2})?$/.test(a)) : [], r = t.slice(0, 2);
236
+ return Array.from(/* @__PURE__ */ new Set([r, ...s]));
244
237
  }
245
- function ge(n) {
238
+ function we(n) {
246
239
  switch (n.type) {
247
240
  case "number":
248
241
  return 0;
@@ -254,14 +247,14 @@ function ge(n) {
254
247
  return "";
255
248
  }
256
249
  }
257
- function Z({ champ: n, valeur: t, changer: i }) {
250
+ function ee({ champ: n, valeur: t, changer: s }) {
258
251
  switch (n.type) {
259
252
  case "richText":
260
253
  return /* @__PURE__ */ e(
261
254
  "textarea",
262
255
  {
263
256
  value: String(t ?? ""),
264
- onChange: (r) => i(r.target.value)
257
+ onChange: (r) => s(r.target.value)
265
258
  }
266
259
  );
267
260
  case "number":
@@ -270,17 +263,17 @@ function Z({ champ: n, valeur: t, changer: i }) {
270
263
  {
271
264
  type: "number",
272
265
  value: t === "" || t == null ? "" : String(t),
273
- onChange: (r) => i(r.target.value === "" ? "" : Number(r.target.value))
266
+ onChange: (r) => s(r.target.value === "" ? "" : Number(r.target.value))
274
267
  }
275
268
  );
276
269
  case "boolean":
277
- return /* @__PURE__ */ m("label", { className: "bascule", children: [
270
+ return /* @__PURE__ */ f("label", { className: "bascule", children: [
278
271
  /* @__PURE__ */ e(
279
272
  "input",
280
273
  {
281
274
  type: "checkbox",
282
275
  checked: t === !0,
283
- onChange: (r) => i(r.target.checked)
276
+ onChange: (r) => s(r.target.checked)
284
277
  }
285
278
  ),
286
279
  /* @__PURE__ */ e("span", { children: t === !0 ? "Oui" : "Non" })
@@ -291,15 +284,15 @@ function Z({ champ: n, valeur: t, changer: i }) {
291
284
  {
292
285
  type: "date",
293
286
  value: String(t ?? "").slice(0, 10),
294
- onChange: (r) => i(r.target.value)
287
+ onChange: (r) => s(r.target.value)
295
288
  }
296
289
  );
297
290
  case "choice":
298
- return /* @__PURE__ */ m(
291
+ return /* @__PURE__ */ f(
299
292
  "select",
300
293
  {
301
294
  value: String(t ?? ""),
302
- onChange: (r) => i(r.target.value),
295
+ onChange: (r) => s(r.target.value),
303
296
  children: [
304
297
  /* @__PURE__ */ e("option", { value: "", children: "—" }),
305
298
  (n.options ?? []).map((r) => /* @__PURE__ */ e("option", { value: r, children: r }, r))
@@ -312,18 +305,18 @@ function Z({ champ: n, valeur: t, changer: i }) {
312
305
  {
313
306
  type: "url",
314
307
  value: String(t ?? ""),
315
- onChange: (r) => i(r.target.value),
308
+ onChange: (r) => s(r.target.value),
316
309
  placeholder: "https://"
317
310
  }
318
311
  );
319
312
  case "image":
320
- return /* @__PURE__ */ m(te, { children: [
313
+ return /* @__PURE__ */ f(ne, { children: [
321
314
  /* @__PURE__ */ e(
322
315
  "input",
323
316
  {
324
317
  type: "url",
325
318
  value: String(t ?? ""),
326
- onChange: (r) => i(r.target.value),
319
+ onChange: (r) => s(r.target.value),
327
320
  placeholder: "https://…"
328
321
  }
329
322
  ),
@@ -335,24 +328,24 @@ function Z({ champ: n, valeur: t, changer: i }) {
335
328
  {
336
329
  type: "text",
337
330
  value: String(t ?? ""),
338
- onChange: (r) => i(r.target.value)
331
+ onChange: (r) => s(r.target.value)
339
332
  }
340
333
  );
341
334
  }
342
335
  }
343
- function oe({ champ: n, valeur: t, changer: i, langue: r }) {
336
+ function re({ champ: n, valeur: t, changer: s, langue: r }) {
344
337
  if (n.type === "list") {
345
- const a = Array.isArray(t) ? t : [], d = n.of ?? [], l = (b, o, c) => {
346
- const h = a.map((g, C) => C === b ? { ...g, [o]: c } : g);
347
- i(h);
338
+ const a = Array.isArray(t) ? t : [], d = n.of ?? [], l = (b, o, i) => {
339
+ const x = a.map((v, A) => A === b ? { ...v, [o]: i } : v);
340
+ s(x);
348
341
  };
349
- return /* @__PURE__ */ m("div", { className: "champ", children: [
342
+ return /* @__PURE__ */ f("div", { className: "champ", children: [
350
343
  /* @__PURE__ */ e("span", { className: "champ__etiquette", children: n.label }),
351
344
  n.help && /* @__PURE__ */ e("p", { className: "champ__aide", children: n.help }),
352
- a.map((b, o) => /* @__PURE__ */ m("div", { className: "liste__item", children: [
353
- /* @__PURE__ */ m("div", { className: "liste__tete", children: [
345
+ a.map((b, o) => /* @__PURE__ */ f("div", { className: "liste__item", children: [
346
+ /* @__PURE__ */ f("div", { className: "liste__tete", children: [
354
347
  /* @__PURE__ */ e("span", { className: "liste__rang", children: o + 1 }),
355
- /* @__PURE__ */ m("span", { style: { display: "flex", gap: 4 }, children: [
348
+ /* @__PURE__ */ f("span", { style: { display: "flex", gap: 4 }, children: [
356
349
  /* @__PURE__ */ e(
357
350
  "button",
358
351
  {
@@ -361,8 +354,8 @@ function oe({ champ: n, valeur: t, changer: i, langue: r }) {
361
354
  title: "Monter",
362
355
  disabled: o === 0,
363
356
  onClick: () => {
364
- const c = [...a];
365
- [c[o - 1], c[o]] = [c[o], c[o - 1]], i(c);
357
+ const i = [...a];
358
+ [i[o - 1], i[o]] = [i[o], i[o - 1]], s(i);
366
359
  },
367
360
  children: "↑"
368
361
  }
@@ -375,8 +368,8 @@ function oe({ champ: n, valeur: t, changer: i, langue: r }) {
375
368
  title: "Descendre",
376
369
  disabled: o === a.length - 1,
377
370
  onClick: () => {
378
- const c = [...a];
379
- [c[o], c[o + 1]] = [c[o + 1], c[o]], i(c);
371
+ const i = [...a];
372
+ [i[o], i[o + 1]] = [i[o + 1], i[o]], s(i);
380
373
  },
381
374
  children: "↓"
382
375
  }
@@ -387,21 +380,21 @@ function oe({ champ: n, valeur: t, changer: i, langue: r }) {
387
380
  type: "button",
388
381
  className: "bouton bouton--icone bouton--discret",
389
382
  title: "Retirer",
390
- onClick: () => i(a.filter((c, h) => h !== o)),
383
+ onClick: () => s(a.filter((i, x) => x !== o)),
391
384
  children: "✕"
392
385
  }
393
386
  )
394
387
  ] })
395
388
  ] }),
396
- d.map((c) => /* @__PURE__ */ e(
397
- oe,
389
+ d.map((i) => /* @__PURE__ */ e(
390
+ re,
398
391
  {
399
- champ: c,
392
+ champ: i,
400
393
  langue: r,
401
- valeur: b?.[c.key],
402
- changer: (h) => l(o, c.key, h)
394
+ valeur: b?.[i.key],
395
+ changer: (x) => l(o, i.key, x)
403
396
  },
404
- c.key
397
+ i.key
405
398
  ))
406
399
  ] }, o)),
407
400
  /* @__PURE__ */ e(
@@ -409,9 +402,9 @@ function oe({ champ: n, valeur: t, changer: i, langue: r }) {
409
402
  {
410
403
  type: "button",
411
404
  className: "bouton",
412
- onClick: () => i([
405
+ onClick: () => s([
413
406
  ...a,
414
- Object.fromEntries(d.map((b) => [b.key, ge(b)]))
407
+ Object.fromEntries(d.map((b) => [b.key, we(b)]))
415
408
  ]),
416
409
  children: "+ Ajouter"
417
410
  }
@@ -419,45 +412,45 @@ function oe({ champ: n, valeur: t, changer: i, langue: r }) {
419
412
  ] });
420
413
  }
421
414
  if (n.localized) {
422
- const a = he(t, r), d = t && typeof t == "object" && !Array.isArray(t) ? t : {};
423
- return /* @__PURE__ */ m("div", { className: "champ", children: [
415
+ const a = ye(t, r), d = t && typeof t == "object" && !Array.isArray(t) ? t : {};
416
+ return /* @__PURE__ */ f("div", { className: "champ", children: [
424
417
  /* @__PURE__ */ e("span", { className: "champ__etiquette", children: n.label }),
425
418
  n.help && /* @__PURE__ */ e("p", { className: "champ__aide", children: n.help }),
426
- a.map((l) => /* @__PURE__ */ m("div", { style: { marginBottom: 8 }, children: [
419
+ a.map((l) => /* @__PURE__ */ f("div", { style: { marginBottom: 8 }, children: [
427
420
  /* @__PURE__ */ e("span", { className: "champ__langue", children: l }),
428
421
  /* @__PURE__ */ e(
429
- Z,
422
+ ee,
430
423
  {
431
424
  champ: n,
432
425
  valeur: d[l],
433
- changer: (b) => i({ ...d, [l]: b })
426
+ changer: (b) => s({ ...d, [l]: b })
434
427
  }
435
428
  )
436
429
  ] }, l))
437
430
  ] });
438
431
  }
439
- return /* @__PURE__ */ m("div", { className: "champ", children: [
432
+ return /* @__PURE__ */ f("div", { className: "champ", children: [
440
433
  /* @__PURE__ */ e("label", { className: "champ__etiquette", children: n.label }),
441
- /* @__PURE__ */ e(Z, { champ: n, valeur: t, changer: i }),
434
+ /* @__PURE__ */ e(ee, { champ: n, valeur: t, changer: s }),
442
435
  n.help && /* @__PURE__ */ e("p", { className: "champ__aide", children: n.help })
443
436
  ] });
444
437
  }
445
- const ve = ["lystech-editeur-hote", "lystech-connexion-hote"];
446
- function ye(n) {
438
+ const Ne = ["lystech-editeur-hote", "lystech-connexion-hote"];
439
+ function ke(n) {
447
440
  const t = /* @__PURE__ */ new Map();
448
- for (const [i, r] of Object.entries(n))
441
+ for (const [s, r] of Object.entries(n))
449
442
  for (const [a, d] of Object.entries(r)) {
450
443
  const l = String(d ?? "").trim();
451
444
  if (l.length < 2 || l.includes("{{")) continue;
452
445
  const b = t.get(l);
453
- b ? b.push({ ns: i, chemin: a }) : t.set(l, [{ ns: i, chemin: a }]);
446
+ b ? b.push({ ns: s, chemin: a }) : t.set(l, [{ ns: s, chemin: a }]);
454
447
  }
455
448
  return t;
456
449
  }
457
- function _e(n) {
458
- const t = /* @__PURE__ */ new Map(), i = document.body.querySelectorAll("*");
459
- for (const r of i) {
460
- if (ve.some((l) => r.id === l || r.closest("#" + l)) || r.children.length > 0) continue;
450
+ function Ae(n) {
451
+ const t = /* @__PURE__ */ new Map(), s = document.body.querySelectorAll("*");
452
+ for (const r of s) {
453
+ if (Ne.some((l) => r.id === l || r.closest("#" + l)) || r.children.length > 0) continue;
461
454
  const a = (r.textContent ?? "").trim();
462
455
  if (a.length < 2) continue;
463
456
  const d = n.get(a);
@@ -465,100 +458,100 @@ function _e(n) {
465
458
  }
466
459
  return t;
467
460
  }
468
- function we({
461
+ function Ce({
469
462
  source: n,
470
463
  actif: t,
471
- surModification: i
464
+ surModification: s
472
465
  }) {
473
- const r = B(/* @__PURE__ */ new Map()), a = B(null), [d, l] = L(null), b = B(n);
466
+ const r = H(/* @__PURE__ */ new Map()), a = H(null), [d, l] = L(null), b = H(n);
474
467
  b.current = n;
475
- const o = B(i);
476
- return o.current = i, J(() => {
468
+ const o = H(s);
469
+ return o.current = s, _(() => {
477
470
  if (!t) return;
478
- const c = b.current.langueCourante(), h = ye(b.current.dictionnaire(c)), g = () => {
479
- r.current = _e(h);
471
+ const i = b.current.langueCourante(), x = ke(b.current.dictionnaire(i)), v = () => {
472
+ r.current = Ae(x);
480
473
  };
481
- g();
482
- let C;
483
- const E = new MutationObserver(() => {
484
- a.current || (clearTimeout(C), C = setTimeout(g, 250));
474
+ v();
475
+ let A;
476
+ const T = new MutationObserver(() => {
477
+ a.current || (clearTimeout(A), A = setTimeout(v, 250));
485
478
  });
486
- E.observe(document.body, { childList: !0, subtree: !0 });
487
- const v = "outline:2px dashed rgba(59,165,141,.85);outline-offset:3px;border-radius:3px;cursor:text;", R = (p) => {
488
- const s = p.target;
489
- !(s instanceof HTMLElement) || a.current || r.current.has(s) && (s.dataset.lysStyleAvant || (s.dataset.lysStyleAvant = s.getAttribute("style") ?? ""), s.setAttribute(
479
+ T.observe(document.body, { childList: !0, subtree: !0 });
480
+ const y = "outline:2px dashed rgba(59,165,141,.85);outline-offset:3px;border-radius:3px;cursor:text;", P = (p) => {
481
+ const c = p.target;
482
+ !(c instanceof HTMLElement) || a.current || r.current.has(c) && (c.dataset.lysStyleAvant || (c.dataset.lysStyleAvant = c.getAttribute("style") ?? ""), c.setAttribute(
490
483
  "style",
491
- (s.dataset.lysStyleAvant ?? "") + v
484
+ (c.dataset.lysStyleAvant ?? "") + y
492
485
  ));
493
- }, q = (p) => {
494
- const s = p.target;
495
- if (!(s instanceof HTMLElement) || a.current?.el === s || s.dataset.lysStyleAvant === void 0) return;
496
- const N = s.dataset.lysStyleAvant;
497
- delete s.dataset.lysStyleAvant, N ? s.setAttribute("style", N) : s.removeAttribute("style");
498
- }, I = (p, s) => {
499
- const N = p.getAttribute("style") ?? "";
486
+ }, Q = (p) => {
487
+ const c = p.target;
488
+ if (!(c instanceof HTMLElement) || a.current?.el === c || c.dataset.lysStyleAvant === void 0) return;
489
+ const h = c.dataset.lysStyleAvant;
490
+ delete c.dataset.lysStyleAvant, h ? c.setAttribute("style", h) : c.removeAttribute("style");
491
+ }, j = (p, c) => {
492
+ const h = p.getAttribute("style") ?? "";
500
493
  a.current = {
501
494
  el: p,
502
495
  avant: (p.textContent ?? "").trim(),
503
- ns: s.ns,
504
- chemin: s.chemin,
505
- styleAvant: p.dataset.lysStyleAvant ?? N
496
+ ns: c.ns,
497
+ chemin: c.chemin,
498
+ styleAvant: p.dataset.lysStyleAvant ?? h
506
499
  }, p.setAttribute("contenteditable", "plaintext-only"), p.setAttribute(
507
500
  "style",
508
501
  (p.dataset.lysStyleAvant ?? "") + "outline:2px solid #3ba58d;outline-offset:3px;border-radius:3px;"
509
502
  ), p.focus();
510
- const P = window.getSelection(), D = document.createRange();
511
- D.selectNodeContents(p), P?.removeAllRanges(), P?.addRange(D);
512
- }, w = async (p) => {
513
- const s = a.current;
514
- if (!s) return;
503
+ const O = window.getSelection(), D = document.createRange();
504
+ D.selectNodeContents(p), O?.removeAllRanges(), O?.addRange(D);
505
+ }, N = async (p) => {
506
+ const c = a.current;
507
+ if (!c) return;
515
508
  a.current = null;
516
- const N = (s.el.textContent ?? "").trim();
517
- s.el.removeAttribute("contenteditable");
518
- const P = s.el.dataset.lysStyleAvant;
519
- if (delete s.el.dataset.lysStyleAvant, P ? s.el.setAttribute("style", P) : s.el.removeAttribute("style"), p || N === s.avant) {
520
- p && (s.el.textContent = s.avant);
509
+ const h = (c.el.textContent ?? "").trim();
510
+ c.el.removeAttribute("contenteditable");
511
+ const O = c.el.dataset.lysStyleAvant;
512
+ if (delete c.el.dataset.lysStyleAvant, O ? c.el.setAttribute("style", O) : c.el.removeAttribute("style"), p || h === c.avant) {
513
+ p && (c.el.textContent = c.avant);
521
514
  return;
522
515
  }
523
516
  const D = b.current.langueCourante();
524
- b.current.poser(D, s.ns, s.chemin, N), await o.current(s.ns, s.chemin, D, N);
525
- }, _ = (p) => {
526
- const s = p.target;
527
- if (!(s instanceof HTMLElement)) return;
517
+ b.current.poser(D, c.ns, c.chemin, h), await o.current(c.ns, c.chemin, D, h);
518
+ }, U = (p) => {
519
+ const c = p.target;
520
+ if (!(c instanceof HTMLElement)) return;
528
521
  if (a.current) {
529
- if (a.current.el === s) return;
530
- w(!1);
522
+ if (a.current.el === c) return;
523
+ N(!1);
531
524
  }
532
- const N = r.current.get(s);
533
- if (N) {
534
- if (p.preventDefault(), p.stopPropagation(), N.candidats.length === 1) {
535
- I(s, N.candidats[0]);
525
+ const h = r.current.get(c);
526
+ if (h) {
527
+ if (p.preventDefault(), p.stopPropagation(), h.candidats.length === 1) {
528
+ j(c, h.candidats[0]);
536
529
  return;
537
530
  }
538
531
  l({
539
- el: s,
540
- candidats: N.candidats,
532
+ el: c,
533
+ candidats: h.candidats,
541
534
  x: p.clientX,
542
535
  y: p.clientY
543
536
  });
544
537
  }
545
- }, O = (p) => {
546
- a.current && (p.key === "Escape" ? (p.preventDefault(), w(!0)) : p.key === "Enter" && !p.shiftKey && (p.preventDefault(), w(!1)));
547
- }, H = () => {
548
- a.current && w(!1);
538
+ }, C = (p) => {
539
+ a.current && (p.key === "Escape" ? (p.preventDefault(), N(!0)) : p.key === "Enter" && !p.shiftKey && (p.preventDefault(), N(!1)));
540
+ }, M = () => {
541
+ a.current && N(!1);
549
542
  };
550
- document.addEventListener("mouseover", R, !0), document.addEventListener("mouseout", q, !0), document.addEventListener("click", _, !0);
551
- const U = (p) => {
543
+ document.addEventListener("mouseover", P, !0), document.addEventListener("mouseout", Q, !0), document.addEventListener("click", U, !0);
544
+ const K = (p) => {
552
545
  if (!a.current) return;
553
- const s = p.inputType;
554
- (s === "insertParagraph" || s === "insertLineBreak") && (p.preventDefault(), w(!1));
546
+ const c = p.inputType;
547
+ (c === "insertParagraph" || c === "insertLineBreak") && (p.preventDefault(), N(!1));
555
548
  };
556
- return document.addEventListener("beforeinput", U, !0), document.addEventListener("keydown", O, !0), document.addEventListener("focusout", H, !0), window.__lysChoisir = (p, s) => {
557
- l(null), I(s, p);
549
+ return document.addEventListener("beforeinput", K, !0), document.addEventListener("keydown", C, !0), document.addEventListener("focusout", M, !0), window.__lysChoisir = (p, c) => {
550
+ l(null), j(c, p);
558
551
  }, () => {
559
- clearTimeout(C), E.disconnect(), document.removeEventListener("mouseover", R, !0), document.removeEventListener("mouseout", q, !0), document.removeEventListener("click", _, !0), document.removeEventListener("beforeinput", U, !0), document.removeEventListener("keydown", O, !0), document.removeEventListener("focusout", H, !0), a.current && w(!0), delete window.__lysChoisir;
552
+ clearTimeout(A), T.disconnect(), document.removeEventListener("mouseover", P, !0), document.removeEventListener("mouseout", Q, !0), document.removeEventListener("click", U, !0), document.removeEventListener("beforeinput", K, !0), document.removeEventListener("keydown", C, !0), document.removeEventListener("focusout", M, !0), a.current && N(!0), delete window.__lysChoisir;
560
553
  };
561
- }, [t]), d ? /* @__PURE__ */ m(
554
+ }, [t]), d ? /* @__PURE__ */ f(
562
555
  "div",
563
556
  {
564
557
  className: "choix",
@@ -569,18 +562,18 @@ function we({
569
562
  children: [
570
563
  /* @__PURE__ */ e("p", { className: "choix__titre", children: "Ce texte apparaît à plusieurs endroits." }),
571
564
  /* @__PURE__ */ e("p", { className: "choix__aide", children: "Lequel corrigez-vous ?" }),
572
- d.candidats.map((c) => /* @__PURE__ */ m(
565
+ d.candidats.map((i) => /* @__PURE__ */ f(
573
566
  "button",
574
567
  {
575
568
  type: "button",
576
569
  className: "choix__option",
577
- onClick: () => window.__lysChoisir?.(c, d.el),
570
+ onClick: () => window.__lysChoisir?.(i, d.el),
578
571
  children: [
579
- /* @__PURE__ */ e("span", { className: "choix__chemin", children: c.chemin }),
580
- /* @__PURE__ */ e("span", { className: "choix__ns", children: c.ns })
572
+ /* @__PURE__ */ e("span", { className: "choix__chemin", children: i.chemin }),
573
+ /* @__PURE__ */ e("span", { className: "choix__ns", children: i.ns })
581
574
  ]
582
575
  },
583
- c.ns + ":" + c.chemin
576
+ i.ns + ":" + i.chemin
584
577
  )),
585
578
  /* @__PURE__ */ e(
586
579
  "button",
@@ -595,179 +588,192 @@ function we({
595
588
  }
596
589
  ) : null;
597
590
  }
598
- const $ = /^i18n:([^:]+):(.*)$/, G = "commun";
599
- function ee(n, t) {
591
+ const Y = /^i18n:([^:]+):(.*)$/, F = "commun", X = "lystech-edit-mode";
592
+ function te(n, t) {
600
593
  return JSON.stringify(n ?? {}) === JSON.stringify(t ?? {});
601
594
  }
602
- function Ne({ api: n, pont: t }) {
603
- const [i, r] = L([]), [a, d] = L([]), [l, b] = L(t.page), [o, c] = L(null), [h, g] = L({}), [C, E] = L(!1), [v, R] = L("modifier"), [q, I] = L(!1), [w, _] = L(
595
+ function Ee({ api: n, pont: t }) {
596
+ const [s, r] = L([]), [a, d] = L([]), [l, b] = L(t.page), [o, i] = L(null), [x, v] = L({}), [A, T] = L(!1), [y, P] = L(() => {
597
+ try {
598
+ return window.localStorage.getItem(X) === "circuler" ? "circuler" : "modifier";
599
+ } catch {
600
+ return "modifier";
601
+ }
602
+ }), Q = () => P((u) => {
603
+ const m = u === "modifier" ? "circuler" : "modifier";
604
+ try {
605
+ window.localStorage.setItem(X, m);
606
+ } catch {
607
+ }
608
+ return m;
609
+ }), [j, N] = L(!1), [U, C] = L(
604
610
  null
605
611
  );
606
- J(() => (t.surChangementDePage = (u) => {
607
- b(u), c(null), E(!1);
612
+ _(() => (t.surChangementDePage = (u) => {
613
+ b(u), i(null), T(!1);
608
614
  }, () => {
609
615
  t.surChangementDePage = void 0;
610
616
  }), [t]);
611
- const O = F(async () => {
617
+ const M = J(async () => {
612
618
  try {
613
- const [u, f] = await Promise.all([
619
+ const [u, m] = await Promise.all([
614
620
  n.pourPage(l),
615
- l === G ? Promise.resolve([]) : n.pourPage(G)
616
- ]), x = [...u, ...f];
617
- return d(x), x;
621
+ l === F ? Promise.resolve([]) : n.pourPage(F)
622
+ ]), g = [...u, ...m];
623
+ return d(g), g;
618
624
  } catch {
619
- return _({
625
+ return C({
620
626
  ton: "erreur",
621
627
  texte: "Impossible de lire le contenu du site."
622
628
  }), [];
623
629
  }
624
630
  }, [n, l]);
625
- J(() => {
631
+ _(() => {
626
632
  n.schemas().then(r).catch(() => r([]));
627
- }, [n]), J(() => {
628
- O();
629
- }, [O]);
630
- const H = F(
631
- (u, f) => {
632
- let x = null, A = -1;
633
- for (const T of i) {
634
- const y = $.exec(T.blockType);
635
- if (!y || y[1] !== u) continue;
636
- const k = y[2];
637
- (k === "" || f === k || f.startsWith(k + ".")) && k.length > A && (x = T, A = k.length);
633
+ }, [n]), _(() => {
634
+ M();
635
+ }, [M]);
636
+ const K = J(
637
+ (u, m) => {
638
+ let g = null, E = -1;
639
+ for (const z of s) {
640
+ const w = Y.exec(z.blockType);
641
+ if (!w || w[1] !== u) continue;
642
+ const k = w[2];
643
+ (k === "" || m === k || m.startsWith(k + ".")) && k.length > E && (g = z, E = k.length);
638
644
  }
639
- if (!x) return null;
640
- const S = $.exec(x.blockType)?.[2] ?? "", z = S ? f.slice(S.length + 1) : f;
641
- return { bloc: x, champ: z };
645
+ if (!g) return null;
646
+ const S = Y.exec(g.blockType)?.[2] ?? "", q = S ? m.slice(S.length + 1) : m;
647
+ return { bloc: g, champ: q };
642
648
  },
643
- [i]
644
- ), U = F(
645
- (u) => i.find((f) => f.blockType === u),
646
- [i]
647
- ), p = K(
648
- () => i.filter((u) => {
649
- const f = u.pages ?? [];
650
- return f.includes(l) || f.includes(G);
649
+ [s]
650
+ ), p = J(
651
+ (u) => s.find((m) => m.blockType === u),
652
+ [s]
653
+ ), c = $(
654
+ () => s.filter((u) => {
655
+ const m = u.pages ?? [];
656
+ return m.includes(l) || m.includes(F);
651
657
  }),
652
- [i, l]
653
- ), s = K(
654
- () => a.filter((u) => u.draft && !ee(u.draft, u.data)),
658
+ [s, l]
659
+ ), h = $(
660
+ () => a.filter((u) => u.draft && !te(u.draft, u.data)),
655
661
  [a]
656
- ), N = F(
657
- async (u, f, x, A) => {
658
- const S = H(u, f);
662
+ ), O = J(
663
+ async (u, m, g, E) => {
664
+ const S = K(u, m);
659
665
  if (!S) {
660
- _({
666
+ C({
661
667
  ton: "erreur",
662
- texte: `Ce texte (${u}:${f}) n'appartient à aucun bloc déclaré.`
668
+ texte: `Ce texte (${u}:${m}) n'appartient à aucun bloc déclaré.`
663
669
  });
664
670
  return;
665
671
  }
666
- const z = a.find((M) => M.blockType === S.bloc.blockType), T = z?.draft ?? z?.data ?? {}, y = T[S.champ], k = y && typeof y == "object" && !Array.isArray(y) ? { ...y, [x]: A } : { [x]: A }, j = { ...T, [S.champ]: k };
672
+ const q = a.find((I) => I.blockType === S.bloc.blockType), z = q?.draft ?? q?.data ?? {}, w = z[S.champ], k = w && typeof w == "object" && !Array.isArray(w) ? { ...w, [g]: E } : { [g]: E }, R = { ...z, [S.champ]: k };
667
673
  try {
668
- if (z?.UID)
669
- await n.enregistrerBrouillon(z.UID, j);
674
+ if (q?.UID)
675
+ await n.enregistrerBrouillon(q.UID, R);
670
676
  else {
671
- const M = S.bloc.pages?.[0] ?? l;
672
- await n.creer(M, S.bloc.blockType, j);
677
+ const I = S.bloc.pages?.[0] ?? l;
678
+ await n.creer(I, S.bloc.blockType, R);
673
679
  }
674
- await O(), _(null);
680
+ await M(), C(null);
675
681
  } catch {
676
- _({
682
+ C({
677
683
  ton: "erreur",
678
684
  texte: "Enregistrement impossible. Votre texte est toujours à l'écran."
679
685
  });
680
686
  }
681
687
  },
682
- [n, H, l, O, a]
683
- ), P = async () => {
684
- if (!s.length) return;
685
- I(!0), _(null);
686
- const u = s.length;
688
+ [n, K, l, M, a]
689
+ ), D = async () => {
690
+ if (!h.length) return;
691
+ N(!0), C(null);
692
+ const u = h.length;
687
693
  try {
688
- for (const f of s) await n.publier(f.UID);
689
- await O(), t.recharger(), _({
694
+ for (const m of h) await n.publier(m.UID);
695
+ await M(), t.recharger(), C({
690
696
  ton: "ok",
691
697
  texte: u === 1 ? "Publié. Vos visiteurs le voient maintenant." : `${u} modifications publiées.`
692
698
  });
693
699
  } catch {
694
- _({
700
+ C({
695
701
  ton: "erreur",
696
702
  texte: "La publication a échoué. Rien n'a été mis en ligne."
697
703
  });
698
704
  } finally {
699
- I(!1);
705
+ N(!1);
700
706
  }
701
- }, D = async () => {
702
- I(!0);
707
+ }, ie = async () => {
708
+ N(!0);
703
709
  try {
704
- for (const f of s) await n.annuler(f.UID);
705
- const u = await O();
710
+ for (const m of h) await n.annuler(m.UID);
711
+ const u = await M();
706
712
  if (t.sourceTexte) {
707
- const { appliquerAuxTextes: f } = await import("./morceaux/sourceTexte-BMPMpNg9.js");
708
- f(
709
- u.map((x) => ({ blockType: x.blockType, data: x.data })),
713
+ const { appliquerAuxTextes: m } = await import("./morceaux/sourceTexte-BMPMpNg9.js");
714
+ m(
715
+ u.map((g) => ({ blockType: g.blockType, data: g.data })),
710
716
  t.sourceTexte
711
717
  );
712
718
  }
713
- _({
719
+ C({
714
720
  ton: "info",
715
721
  texte: "Modifications abandonnées. On est revenu à ce qui est en ligne."
716
722
  });
717
723
  } finally {
718
- I(!1);
724
+ N(!1);
719
725
  }
720
- }, se = (u) => {
721
- const f = a.find((T) => T.blockType === u), x = f?.draft ?? f?.data ?? {}, A = U(u), S = $.exec(u), z = {};
722
- if (S && A && t.sourceTexte) {
723
- const T = S[1], y = S[2], k = t.sourceTexte.langues(), j = {};
724
- for (const M of k)
725
- j[M] = t.sourceTexte.dictionnaire(M)[T] ?? {};
726
- for (const M of A.fields) {
727
- const ue = y ? y + "." + M.key : M.key, X = {};
726
+ }, ce = (u) => {
727
+ const m = a.find((z) => z.blockType === u), g = m?.draft ?? m?.data ?? {}, E = p(u), S = Y.exec(u), q = {};
728
+ if (S && E && t.sourceTexte) {
729
+ const z = S[1], w = S[2], k = t.sourceTexte.langues(), R = {};
730
+ for (const I of k)
731
+ R[I] = t.sourceTexte.dictionnaire(I)[z] ?? {};
732
+ for (const I of E.fields) {
733
+ const pe = w ? w + "." + I.key : I.key, G = {};
728
734
  for (const W of k) {
729
- const Y = j[W]?.[ue];
730
- typeof Y == "string" && (X[W] = Y);
735
+ const Z = R[W]?.[pe];
736
+ typeof Z == "string" && (G[W] = Z);
731
737
  }
732
- Object.keys(X).length && (z[M.key] = X);
738
+ Object.keys(G).length && (q[I.key] = G);
733
739
  }
734
740
  }
735
- for (const [T, y] of Object.entries(x)) {
736
- const k = z[T], j = y && typeof y == "object" && !Array.isArray(y) && k && typeof k == "object" && !Array.isArray(k);
737
- z[T] = j ? { ...k, ...y } : y;
741
+ for (const [z, w] of Object.entries(g)) {
742
+ const k = q[z], R = w && typeof w == "object" && !Array.isArray(w) && k && typeof k == "object" && !Array.isArray(k);
743
+ q[z] = R ? { ...k, ...w } : w;
738
744
  }
739
- g(z), c(u), E(!1), _(null);
740
- }, ie = (u, f) => g((x) => ({ ...x, [u]: f })), ce = async () => {
745
+ v(q), i(u), T(!1), C(null);
746
+ }, le = (u, m) => v((g) => ({ ...g, [u]: m })), ue = async () => {
741
747
  if (o) {
742
- I(!0);
748
+ N(!0);
743
749
  try {
744
- const u = a.find((x) => x.blockType === o);
745
- if (u?.UID) await n.enregistrerBrouillon(u.UID, h);
750
+ const u = a.find((g) => g.blockType === o);
751
+ if (u?.UID) await n.enregistrerBrouillon(u.UID, x);
746
752
  else {
747
- const x = U(o)?.pages?.[0] ?? l;
748
- await n.creer(x, o, h);
753
+ const g = p(o)?.pages?.[0] ?? l;
754
+ await n.creer(g, o, x);
749
755
  }
750
- const f = await O();
756
+ const m = await M();
751
757
  if (t.sourceTexte) {
752
- const { appliquerAuxTextes: x } = await import("./morceaux/sourceTexte-BMPMpNg9.js");
753
- x(
754
- f.map((A) => ({ blockType: A.blockType, data: A.draft ?? A.data })),
758
+ const { appliquerAuxTextes: g } = await import("./morceaux/sourceTexte-BMPMpNg9.js");
759
+ g(
760
+ m.map((E) => ({ blockType: E.blockType, data: E.draft ?? E.data })),
755
761
  t.sourceTexte
756
762
  );
757
763
  }
758
- _({
764
+ C({
759
765
  ton: "ok",
760
766
  texte: "Enregistré. Rien n'a encore changé pour vos visiteurs."
761
767
  });
762
768
  } catch {
763
- _({ ton: "erreur", texte: "L'enregistrement a échoué." });
769
+ C({ ton: "erreur", texte: "L'enregistrement a échoué." });
764
770
  } finally {
765
- I(!1);
771
+ N(!1);
766
772
  }
767
773
  }
768
- }, le = () => {
774
+ }, de = () => {
769
775
  try {
770
- window.localStorage.setItem("lystech-edit-sortie", "1"), window.localStorage.removeItem("lystech-edit");
776
+ window.localStorage.setItem("lystech-edit-sortie", "1"), window.localStorage.removeItem("lystech-edit"), window.localStorage.removeItem(X);
771
777
  } catch {
772
778
  }
773
779
  try {
@@ -775,39 +781,45 @@ function Ne({ api: n, pont: t }) {
775
781
  } catch {
776
782
  }
777
783
  window.location.reload();
778
- }, V = o ? U(o) : void 0, Q = !o && !C;
779
- return /* @__PURE__ */ m("div", { className: "calque", children: [
780
- /* @__PURE__ */ e("div", { className: "cadre-global", "aria-hidden": "true" }),
784
+ }, V = o ? p(o) : void 0, B = !o && !A;
785
+ return /* @__PURE__ */ f("div", { className: "calque", children: [
786
+ /* @__PURE__ */ e(
787
+ "div",
788
+ {
789
+ className: "cadre-global" + (y === "circuler" ? " cadre-global--circuler" : ""),
790
+ "aria-hidden": "true"
791
+ }
792
+ ),
781
793
  t.sourceTexte && /* @__PURE__ */ e(
782
- we,
794
+ Ce,
783
795
  {
784
796
  source: t.sourceTexte,
785
- actif: Q && !q && v === "modifier",
786
- surModification: N
797
+ actif: B && !j && y === "modifier",
798
+ surModification: O
787
799
  }
788
800
  ),
789
- Q && /* @__PURE__ */ m("div", { className: "barre", children: [
801
+ B && /* @__PURE__ */ f("div", { className: "barre", children: [
790
802
  /* @__PURE__ */ e("span", { className: "barre__point" }),
791
- /* @__PURE__ */ e("span", { className: "barre__texte", children: v === "modifier" ? "Cliquez un texte pour le corriger" : "Navigation libre — les clics ouvrent les liens" }),
803
+ /* @__PURE__ */ e("span", { className: "barre__texte", children: y === "modifier" ? "Cliquez un texte pour le corriger" : "Navigation libre — les clics ouvrent les liens" }),
792
804
  /* @__PURE__ */ e(
793
805
  "button",
794
806
  {
795
807
  type: "button",
796
- className: "bouton " + (v === "circuler" ? "bouton--principal" : ""),
797
- onClick: () => R((u) => u === "modifier" ? "circuler" : "modifier"),
798
- title: v === "modifier" ? "Passer en navigation pour changer de page" : "Revenir a la modification des textes",
799
- children: v === "modifier" ? "Circuler" : "Modifier"
808
+ className: "bouton " + (y === "circuler" ? "bouton--principal" : ""),
809
+ onClick: Q,
810
+ title: y === "modifier" ? "Passer en navigation pour changer de page" : "Revenir a la modification des textes",
811
+ children: y === "modifier" ? "Circuler" : "Modifier"
800
812
  }
801
813
  ),
802
- s.length > 0 ? /* @__PURE__ */ m(te, { children: [
803
- /* @__PURE__ */ e("span", { className: "barre__compte", children: s.length === 1 ? "1 modification non publiée" : `${s.length} modifications non publiées` }),
814
+ h.length > 0 ? /* @__PURE__ */ f(ne, { children: [
815
+ /* @__PURE__ */ e("span", { className: "barre__compte", children: h.length === 1 ? "1 modification non publiée" : `${h.length} modifications non publiées` }),
804
816
  /* @__PURE__ */ e(
805
817
  "button",
806
818
  {
807
819
  type: "button",
808
820
  className: "bouton bouton--principal",
809
- onClick: P,
810
- disabled: q,
821
+ onClick: D,
822
+ disabled: j,
811
823
  children: "Publier"
812
824
  }
813
825
  ),
@@ -816,8 +828,8 @@ function Ne({ api: n, pont: t }) {
816
828
  {
817
829
  type: "button",
818
830
  className: "bouton bouton--discret",
819
- onClick: D,
820
- disabled: q,
831
+ onClick: ie,
832
+ disabled: j,
821
833
  children: "Abandonner"
822
834
  }
823
835
  )
@@ -827,7 +839,7 @@ function Ne({ api: n, pont: t }) {
827
839
  {
828
840
  type: "button",
829
841
  className: "bouton bouton--icone bouton--discret",
830
- onClick: () => E(!0),
842
+ onClick: () => T(!0),
831
843
  title: "Tous les contenus",
832
844
  "aria-label": "Tous les contenus",
833
845
  children: "⋮"
@@ -838,17 +850,17 @@ function Ne({ api: n, pont: t }) {
838
850
  {
839
851
  type: "button",
840
852
  className: "bouton bouton--icone bouton--sortie",
841
- onClick: le,
853
+ onClick: de,
842
854
  title: "Quitter le mode édition",
843
855
  "aria-label": "Quitter le mode édition",
844
856
  children: "✕"
845
857
  }
846
858
  )
847
859
  ] }),
848
- w && Q && /* @__PURE__ */ e("div", { className: "flottant", children: /* @__PURE__ */ e("p", { className: "message message--" + w.ton, children: w.texte }) }),
849
- C && /* @__PURE__ */ m("div", { className: "panneau", role: "dialog", "aria-label": "Tous les contenus", children: [
850
- /* @__PURE__ */ m("div", { className: "panneau__tete", children: [
851
- /* @__PURE__ */ m("div", { style: { flex: 1 }, children: [
860
+ U && B && /* @__PURE__ */ e("div", { className: "flottant", children: /* @__PURE__ */ e("p", { className: "message message--" + U.ton, children: U.texte }) }),
861
+ A && /* @__PURE__ */ f("div", { className: "panneau", role: "dialog", "aria-label": "Tous les contenus", children: [
862
+ /* @__PURE__ */ f("div", { className: "panneau__tete", children: [
863
+ /* @__PURE__ */ f("div", { style: { flex: 1 }, children: [
852
864
  /* @__PURE__ */ e("h2", { className: "panneau__titre", children: "Tous les contenus" }),
853
865
  /* @__PURE__ */ e("p", { className: "panneau__sous", children: "Y compris ce qui ne s'affiche pas dans la page : titre de l'onglet, description dans les moteurs de recherche, textes contenant une valeur calculée." })
854
866
  ] }),
@@ -857,25 +869,25 @@ function Ne({ api: n, pont: t }) {
857
869
  {
858
870
  type: "button",
859
871
  className: "bouton bouton--icone bouton--discret",
860
- onClick: () => E(!1),
872
+ onClick: () => T(!1),
861
873
  "aria-label": "Fermer",
862
874
  children: "✕"
863
875
  }
864
876
  )
865
877
  ] }),
866
- /* @__PURE__ */ m("div", { className: "panneau__corps", children: [
867
- p.length === 0 && /* @__PURE__ */ e("p", { className: "message message--info", children: "Aucun contenu déclaré pour cette page." }),
868
- p.map((u) => {
869
- const f = a.find((A) => A.blockType === u.blockType), x = f?.draft && !ee(f.draft, f.data);
870
- return /* @__PURE__ */ m(
878
+ /* @__PURE__ */ f("div", { className: "panneau__corps", children: [
879
+ c.length === 0 && /* @__PURE__ */ e("p", { className: "message message--info", children: "Aucun contenu déclaré pour cette page." }),
880
+ c.map((u) => {
881
+ const m = a.find((E) => E.blockType === u.blockType), g = m?.draft && !te(m.draft, m.data);
882
+ return /* @__PURE__ */ f(
871
883
  "button",
872
884
  {
873
885
  type: "button",
874
886
  className: "rangee",
875
- onClick: () => se(u.blockType),
887
+ onClick: () => ce(u.blockType),
876
888
  children: [
877
889
  /* @__PURE__ */ e("span", { className: "rangee__nom", children: u.label }),
878
- /* @__PURE__ */ e("span", { className: "rangee__info", children: x ? "non publié" : `${u.fields.length} textes` })
890
+ /* @__PURE__ */ e("span", { className: "rangee__info", children: g ? "non publié" : `${u.fields.length} textes` })
879
891
  ]
880
892
  },
881
893
  u.blockType
@@ -883,15 +895,15 @@ function Ne({ api: n, pont: t }) {
883
895
  })
884
896
  ] })
885
897
  ] }),
886
- o && V && /* @__PURE__ */ m(
898
+ o && V && /* @__PURE__ */ f(
887
899
  "div",
888
900
  {
889
901
  className: "panneau",
890
902
  role: "dialog",
891
903
  "aria-label": "Modifier " + V.label,
892
904
  children: [
893
- /* @__PURE__ */ m("div", { className: "panneau__tete", children: [
894
- /* @__PURE__ */ m("div", { style: { flex: 1 }, children: [
905
+ /* @__PURE__ */ f("div", { className: "panneau__tete", children: [
906
+ /* @__PURE__ */ f("div", { style: { flex: 1 }, children: [
895
907
  /* @__PURE__ */ e("h2", { className: "panneau__titre", children: V.label }),
896
908
  V.description && /* @__PURE__ */ e("p", { className: "panneau__sous", children: V.description })
897
909
  ] }),
@@ -900,33 +912,33 @@ function Ne({ api: n, pont: t }) {
900
912
  {
901
913
  type: "button",
902
914
  className: "bouton bouton--icone bouton--discret",
903
- onClick: () => c(null),
915
+ onClick: () => i(null),
904
916
  "aria-label": "Fermer",
905
917
  children: "✕"
906
918
  }
907
919
  )
908
920
  ] }),
909
- /* @__PURE__ */ m("div", { className: "panneau__corps", children: [
910
- w && /* @__PURE__ */ e("p", { className: "message message--" + w.ton, children: w.texte }),
921
+ /* @__PURE__ */ f("div", { className: "panneau__corps", children: [
922
+ U && /* @__PURE__ */ e("p", { className: "message message--" + U.ton, children: U.texte }),
911
923
  V.fields.map((u) => /* @__PURE__ */ e(
912
- oe,
924
+ re,
913
925
  {
914
926
  champ: u,
915
927
  langue: t.langue,
916
- valeur: h[u.key],
917
- changer: (f) => ie(u.key, f)
928
+ valeur: x[u.key],
929
+ changer: (m) => le(u.key, m)
918
930
  },
919
931
  u.key
920
932
  ))
921
933
  ] }),
922
- /* @__PURE__ */ m("div", { className: "panneau__pied", children: [
934
+ /* @__PURE__ */ f("div", { className: "panneau__pied", children: [
923
935
  /* @__PURE__ */ e(
924
936
  "button",
925
937
  {
926
938
  type: "button",
927
939
  className: "bouton bouton--discret",
928
- onClick: () => c(null),
929
- disabled: q,
940
+ onClick: () => i(null),
941
+ disabled: j,
930
942
  children: "Fermer"
931
943
  }
932
944
  ),
@@ -936,8 +948,8 @@ function Ne({ api: n, pont: t }) {
936
948
  {
937
949
  type: "button",
938
950
  className: "bouton bouton--principal",
939
- onClick: ce,
940
- disabled: q,
951
+ onClick: ue,
952
+ disabled: j,
941
953
  children: "Enregistrer"
942
954
  }
943
955
  )
@@ -947,7 +959,7 @@ function Ne({ api: n, pont: t }) {
947
959
  )
948
960
  ] });
949
961
  }
950
- const ke = `
962
+ const Se = `
951
963
  :host {
952
964
  all: initial;
953
965
  --fond: #16181d;
@@ -1113,15 +1125,14 @@ const ke = `
1113
1125
  /* ------------------------------------------------------------ MARQUE ---- */
1114
1126
 
1115
1127
  .marque {
1116
- display: inline-flex; align-items: center; gap: 7px;
1117
- margin-bottom: 16px;
1118
- color: var(--accent);
1128
+ display: inline-flex; align-items: center; gap: 8px;
1129
+ margin-bottom: 18px;
1119
1130
  }
1120
- .marque svg { width: 20px; height: 20px; display: block; }
1131
+ .marque img { width: 22px; height: 22px; display: block; }
1121
1132
  .marque__mot {
1122
1133
  font-size: 12px; font-weight: 600;
1123
- letter-spacing: 0.16em; text-transform: uppercase;
1124
- color: var(--texte-doux);
1134
+ letter-spacing: 0.18em; text-transform: uppercase;
1135
+ color: #6fd3bd;
1125
1136
  }
1126
1137
 
1127
1138
  .fenetre__titre {
@@ -1135,13 +1146,6 @@ const ke = `
1135
1146
  font-size: 13px; line-height: 1.5; color: var(--texte-doux);
1136
1147
  }
1137
1148
  .fenetre__corps { text-align: left; }
1138
- .fenetre__pied {
1139
- margin: 18px 0 0;
1140
- padding-top: 14px;
1141
- border-top: 1px solid var(--bord);
1142
- font-size: 11.5px; line-height: 1.5; color: var(--texte-doux);
1143
- text-align: center;
1144
- }
1145
1149
 
1146
1150
  /* ------------------------------------------------------ FOURNISSEURS ---- */
1147
1151
 
@@ -1257,7 +1261,7 @@ input:focus, select:focus, textarea:focus {
1257
1261
  @media (prefers-reduced-motion: reduce) {
1258
1262
  * { transition: none !important; animation: none !important; }
1259
1263
  }
1260
- `, Ce = `
1264
+ `, Te = `
1261
1265
  /* --------------------------------------------------------- CHOIX -------- */
1262
1266
 
1263
1267
  /* Quand un meme texte vient de plusieurs cles, on demande laquelle plutot que
@@ -1307,7 +1311,7 @@ input:focus, select:focus, textarea:focus {
1307
1311
  max-width: min(460px, calc(100vw - 24px));
1308
1312
  }
1309
1313
  .flottant .message { margin: 0; box-shadow: 0 8px 26px rgba(0,0,0,.4); }
1310
- `, Ae = `
1314
+ `, ze = `
1311
1315
  /* ON NE DOIT JAMAIS SE DEMANDER SI ON EST EN MODE EDITION. Une barre en bas
1312
1316
  se confond avec un bandeau de temoins ; un lisere qui borde tout l'ecran,
1313
1317
  present sur chaque page, ne se confond avec rien. Il ne prend aucun clic. */
@@ -1321,60 +1325,70 @@ input:focus, select:focus, textarea:focus {
1321
1325
  opacity: 0.85;
1322
1326
  }
1323
1327
 
1328
+ /* EN MODE CIRCULER, le cadre change d'allure. On est toujours connecte — le
1329
+ dire reste necessaire — mais les clics rendent la main aux liens, et rien
1330
+ ne serait plus desagreable que de croire qu'on edite alors qu'on navigue,
1331
+ ou l'inverse. Trait interrompu et plus efface : present, mais en retrait. */
1332
+ .cadre-global--circuler {
1333
+ border-style: dashed;
1334
+ border-color: var(--texte-doux);
1335
+ opacity: 0.5;
1336
+ }
1337
+
1324
1338
  /* La sortie est rouge au survol seulement : visible quand on la cherche,
1325
1339
  discrete le reste du temps — c'est le geste qu'on fait une fois. */
1326
1340
  .bouton--sortie { color: var(--texte-doux); background: transparent; border-color: transparent; }
1327
1341
  .bouton--sortie:hover { background: rgba(217, 119, 106, 0.16); color: var(--danger); }
1328
- `, Se = "lystech-editeur-hote", Ee = "lystech-connexion-hote";
1329
- function re(n) {
1342
+ `, Ue = "lystech-editeur-hote", qe = "lystech-connexion-hote";
1343
+ function ae(n) {
1330
1344
  document.getElementById(n)?.remove();
1331
1345
  const t = document.createElement("div");
1332
1346
  t.id = n, document.body.appendChild(t);
1333
- const i = t.attachShadow({ mode: "open" }), r = document.createElement("style");
1334
- r.textContent = ke + Ce + Ae, i.appendChild(r);
1347
+ const s = t.attachShadow({ mode: "open" }), r = document.createElement("style");
1348
+ r.textContent = Se + Te + ze, s.appendChild(r);
1335
1349
  const a = document.createElement("div");
1336
- return i.appendChild(a), { hote: t, point: a };
1350
+ return s.appendChild(a), { hote: t, point: a };
1337
1351
  }
1338
- function ae(n, t) {
1339
- let i = n;
1352
+ function se(n, t) {
1353
+ let s = n;
1340
1354
  return () => {
1341
- const r = i;
1342
- i = null, setTimeout(() => {
1355
+ const r = s;
1356
+ s = null, setTimeout(() => {
1343
1357
  r?.unmount(), t.remove();
1344
1358
  }, 0);
1345
1359
  };
1346
1360
  }
1347
- function qe({
1361
+ function je({
1348
1362
  site: n,
1349
1363
  apiBaseUrl: t,
1350
- methodes: i,
1364
+ methodes: s,
1351
1365
  surJeton: r
1352
1366
  }) {
1353
- const { hote: a, point: d } = re(Ee), l = ne(d), b = () => o();
1367
+ const { hote: a, point: d } = ae(qe), l = oe(d), b = () => o();
1354
1368
  l.render(
1355
1369
  /* @__PURE__ */ e(
1356
- xe,
1370
+ ve,
1357
1371
  {
1358
1372
  site: n,
1359
1373
  apiBaseUrl: t,
1360
- ...i ? { methodes: i } : {},
1361
- surJeton: (c) => {
1362
- o(), r(c);
1374
+ ...s ? { methodes: s } : {},
1375
+ surJeton: (i) => {
1376
+ o(), r(i);
1363
1377
  },
1364
1378
  surFermer: b
1365
1379
  }
1366
1380
  )
1367
1381
  );
1368
- const o = ae(l, a);
1382
+ const o = se(l, a);
1369
1383
  return o;
1370
1384
  }
1371
- function Ie({
1385
+ function Re({
1372
1386
  jeton: n,
1373
1387
  site: t,
1374
- apiBaseUrl: i,
1388
+ apiBaseUrl: s,
1375
1389
  pont: r
1376
1390
  }) {
1377
- const { hote: a, point: d } = re(Se), l = ne(d), b = () => {
1391
+ const { hote: a, point: d } = ae(Ue), l = oe(d), b = () => {
1378
1392
  try {
1379
1393
  window.localStorage.setItem("lystech-edit-sortie", "1"), window.localStorage.removeItem("lystech-edit");
1380
1394
  } catch {
@@ -1387,15 +1401,15 @@ function Ie({
1387
1401
  };
1388
1402
  return l.render(
1389
1403
  /* @__PURE__ */ e(
1390
- Ne,
1404
+ Ee,
1391
1405
  {
1392
- api: de({ jeton: n, site: t, apiBaseUrl: i, surJetonRefuse: b }),
1406
+ api: me({ jeton: n, site: t, apiBaseUrl: s, surJetonRefuse: b }),
1393
1407
  pont: r
1394
1408
  }
1395
1409
  )
1396
- ), ae(l, a);
1410
+ ), se(l, a);
1397
1411
  }
1398
1412
  export {
1399
- qe as monterConnexion,
1400
- Ie as monterEditeur
1413
+ je as monterConnexion,
1414
+ Re as monterEditeur
1401
1415
  };