@1024pix/epreuves-components 1.3.0 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (27) hide show
  1. package/dist/{ImageQuiz.ce-DtarwFF1.js → ImageQuiz.ce-BU1wvQqO.js} +56 -66
  2. package/dist/{LLMMessage.ce-CnMf3mGa.js → LLMMessage.ce-55YTC7a9.js} +7 -7
  3. package/dist/{Loading.ce-BLJllV22.js → Loading.ce-BQOiwGj0.js} +1 -1
  4. package/dist/{NavigationButton.ce-Cz9511sV.js → NavigationButton.ce-CgyZHLpi.js} +8 -8
  5. package/dist/{_plugin-vue_export-helper-DK91u00G.js → _plugin-vue_export-helper-BaT1QC5Q.js} +150 -136
  6. package/dist/components/calcul-impact.ce.js.js +49 -49
  7. package/dist/components/capacity-calculation.ce.js.js +279 -0
  8. package/dist/components/clickable-image.ce.js.js +1 -1
  9. package/dist/components/complete-phrase.ce.js.js +8 -8
  10. package/dist/components/flip-cards.ce.js.js +108 -0
  11. package/dist/components/image-quiz.ce.js.js +2 -2
  12. package/dist/components/image-quizzes.ce.js.js +2 -2
  13. package/dist/components/llm-compare-messages.ce.js.js +3 -3
  14. package/dist/components/llm-messages.ce.js.js +3 -3
  15. package/dist/components/llm-prompt-select.ce.js.js +1 -1
  16. package/dist/components/message-conversation.ce.js.js +11 -11
  17. package/dist/components/pix-article.ce.js.js +2 -2
  18. package/dist/components/pix-carousel.ce.js.js +7 -7
  19. package/dist/components/pix-cursor.ce.js.js +12 -12
  20. package/dist/components/qcm-deepfake.ce.js.js +10 -10
  21. package/dist/{i18n-Gv3Ze5vF.js → i18n-BOk_ejZ-.js} +1 -1
  22. package/dist/index.js +2 -0
  23. package/dist/metadata.js +46 -38
  24. package/dist/schema.js +61 -24
  25. package/dist/{shadow-dom-DTRtrvgC.js → shadow-dom-CLVtaG5r.js} +1 -1
  26. package/dist/shuffled-CzcgAL34.js +14 -0
  27. package/package.json +1 -1
@@ -1,11 +1,11 @@
1
- import { a as z, z as T, c as p, o as v, F as U, y as u, M as s, E as C, f as e, t, A as _, T as D, _ as Y, r as l, l as E, e as K, I as N, N as V, d as G } from "../_plugin-vue_export-helper-DK91u00G.js";
2
- import { a as H, i as j, b as Q } from "../i18n-Gv3Ze5vF.js";
3
- const x = {}, J = {}, X = {
1
+ import { a as z, z as T, c as p, o as v, F as U, y as u, M as s, J as C, f as e, t as a, A as _, T as D, _ as Y, r as l, l as N, e as G, G as E, N as V, d as K } from "../_plugin-vue_export-helper-BaT1QC5Q.js";
2
+ import { a as H, i as j, b as J } from "../i18n-BOk_ejZ-.js";
3
+ const Q = {}, x = {}, X = {
4
4
  "calcul-impact": { title: "Calculez votre impact IA", subtitle: "Quels ont été vos usages de l'IA la semaine dernière ?", numberOfConversationLabel: "Nombre de conversations courtes :", numberOfImagesLabel: "Nombre de créations d’images :", seePersonalImpact: "Voir votre impact personnel sur une semaine", seeCollectiveImpact: "Si 1 million de personnes faisaient comme vous toutes les semaines pendant un an", legals: "Estimations basées sur l'étude Hugging Face, Carnegie Mellon University, Allen Institute for AI, Oct 2024", yourPersonalImpact: "Votre impact personnel", consumptionForAWeek: "Votre consommation sur une semaine", consumptionForAYear: "1 million de personnes toutes les semaines pendant un an", personalConsumption: "Vous avez consommé environ {{energy}} Wh", personalDuration: "Cela équivaut à {{number}} minutes de micro-ondes", collectiveConsumption: "Cela représenterait {{energy}} kWh, soit l'équivalent de {{homes}} foyers français", collectiveDuration: "Équivalent à {{number}} minutes de micro-ondes", planeKilometers: "Et {{kilometers}} km parcourus en avion", yourCollectiveImpact: "Impact collectif simulé" }
5
- }, Z = {}, ee = {}, ae = {
5
+ }, Z = {}, ee = {}, te = {
6
6
  key: 0,
7
7
  class: "result-calculation"
8
- }, te = ["aria-level"], le = { class: "consumption" }, oe = { style: { "font-weight": "bold" } }, ne = { style: { "font-weight": "bold" } }, ie = {
8
+ }, ae = ["aria-level"], le = { class: "consumption" }, oe = { style: { "font-weight": "bold" } }, ne = { style: { "font-weight": "bold" } }, ie = {
9
9
  key: 0,
10
10
  class: "result-calculation"
11
11
  }, se = ["titleLevel"], re = { class: "consumption" }, ce = { style: { "font-weight": "bold" } }, ue = { style: { "font-weight": "bold" } }, ve = { style: { "font-weight": "bold" } }, de = { style: { "font-weight": "bold" } }, me = /* @__PURE__ */ z({
@@ -18,36 +18,36 @@ const x = {}, J = {}, X = {
18
18
  isCollective: { type: Boolean }
19
19
  },
20
20
  setup(d) {
21
- return (a, o) => {
21
+ return (t, o) => {
22
22
  const n = T("i18next");
23
23
  return v(), p(U, null, [
24
24
  u(D, { name: "fade-perso" }, {
25
25
  default: s(() => [
26
- a.isPersonal ? (v(), p("div", ae, [
26
+ t.isPersonal ? (v(), p("div", te, [
27
27
  e("div", {
28
28
  class: "header",
29
29
  role: "heading",
30
- "aria-level": a.titleLevel + 1
31
- }, "📌 " + t(a.$t("calcul-impact.yourPersonalImpact")), 9, te),
32
- e("p", le, t(a.$t("calcul-impact.consumptionForAWeek")), 1),
30
+ "aria-level": t.titleLevel + 1
31
+ }, "📌 " + a(t.$t("calcul-impact.yourPersonalImpact")), 9, ae),
32
+ e("p", le, a(t.$t("calcul-impact.consumptionForAWeek")), 1),
33
33
  e("p", null, [
34
- o[0] || (o[0] = _("⚡ ", -1)),
34
+ o[0] || (o[0] = _(" ⚡ ", -1)),
35
35
  u(n, {
36
- translation: a.$t("calcul-impact.personalConsumption")
36
+ translation: t.$t("calcul-impact.personalConsumption")
37
37
  }, {
38
38
  energy: s(() => [
39
- e("span", oe, t(a.byWeekForOne.energyByWeek), 1)
39
+ e("span", oe, a(t.byWeekForOne.energyByWeek), 1)
40
40
  ]),
41
41
  _: 1
42
42
  }, 8, ["translation"])
43
43
  ]),
44
44
  e("p", null, [
45
- o[1] || (o[1] = _("🍽️ ", -1)),
45
+ o[1] || (o[1] = _(" 🍽️ ", -1)),
46
46
  u(n, {
47
- translation: a.$t("calcul-impact.personalDuration")
47
+ translation: t.$t("calcul-impact.personalDuration")
48
48
  }, {
49
49
  number: s(() => [
50
- e("span", ne, t(a.byWeekForOne.personalMicrowavesDuration), 1)
50
+ e("span", ne, a(t.byWeekForOne.personalMicrowavesDuration), 1)
51
51
  ]),
52
52
  _: 1
53
53
  }, 8, ["translation"])
@@ -58,45 +58,45 @@ const x = {}, J = {}, X = {
58
58
  }),
59
59
  u(D, { name: "fade-collectif" }, {
60
60
  default: s(() => [
61
- a.isCollective ? (v(), p("div", ie, [
61
+ t.isCollective ? (v(), p("div", ie, [
62
62
  e("div", {
63
63
  class: "header",
64
64
  role: "heading",
65
- titleLevel: a.titleLevel + 1
66
- }, "🌍 " + t(a.$t("calcul-impact.yourCollectiveImpact")), 9, se),
67
- e("p", re, t(a.$t("calcul-impact.consumptionForAYear")), 1),
65
+ titleLevel: t.titleLevel + 1
66
+ }, "🌍 " + a(t.$t("calcul-impact.yourCollectiveImpact")), 9, se),
67
+ e("p", re, a(t.$t("calcul-impact.consumptionForAYear")), 1),
68
68
  e("p", null, [
69
- o[2] || (o[2] = _("⚡ ", -1)),
69
+ o[2] || (o[2] = _(" ⚡ ", -1)),
70
70
  u(n, {
71
- translation: a.$t("calcul-impact.collectiveConsumption")
71
+ translation: t.$t("calcul-impact.collectiveConsumption")
72
72
  }, {
73
73
  energy: s(() => [
74
- e("span", ce, t(a.byYearForAMillion.collectiveAnnualEnergy), 1)
74
+ e("span", ce, a(t.byYearForAMillion.collectiveAnnualEnergy), 1)
75
75
  ]),
76
76
  homes: s(() => [
77
- e("span", ue, t(a.byYearForAMillion.equivalentPopulationByCity), 1)
77
+ e("span", ue, a(t.byYearForAMillion.equivalentPopulationByCity), 1)
78
78
  ]),
79
79
  _: 1
80
80
  }, 8, ["translation"])
81
81
  ]),
82
82
  e("p", null, [
83
- o[3] || (o[3] = _("🍽️ ", -1)),
83
+ o[3] || (o[3] = _(" 🍽️ ", -1)),
84
84
  u(n, {
85
- translation: a.$t("calcul-impact.collectiveDuration")
85
+ translation: t.$t("calcul-impact.collectiveDuration")
86
86
  }, {
87
87
  number: s(() => [
88
- e("span", ve, t(a.byYearForAMillion.collectiveMicrowavesDuration), 1)
88
+ e("span", ve, a(t.byYearForAMillion.collectiveMicrowavesDuration), 1)
89
89
  ]),
90
90
  _: 1
91
91
  }, 8, ["translation"])
92
92
  ]),
93
93
  e("p", null, [
94
- o[4] || (o[4] = _("✈️ ", -1)),
94
+ o[4] || (o[4] = _(" ✈️ ", -1)),
95
95
  u(n, {
96
- translation: a.$t("calcul-impact.planeKilometers")
96
+ translation: t.$t("calcul-impact.planeKilometers")
97
97
  }, {
98
98
  kilometers: s(() => [
99
- e("span", de, t(a.byYearForAMillion.kilometerByPlane), 1)
99
+ e("span", de, a(t.byYearForAMillion.kilometerByPlane), 1)
100
100
  ]),
101
101
  _: 1
102
102
  }, 8, ["translation"])
@@ -108,12 +108,12 @@ const x = {}, J = {}, X = {
108
108
  ], 64);
109
109
  };
110
110
  }
111
- }), pe = ".result-calculation[data-v-350a9de7]{background:#e0f7fa;border-left:solid 3px #00796b;padding:1rem;border-radius:10px}.header[data-v-350a9de7]{font-size:1.125rem;font-weight:700}.consumption[data-v-350a9de7]{font-style:italic}.fade-perso-enter-active[data-v-350a9de7],.fade-collectif-enter-active[data-v-350a9de7]{transition:all .3s ease-out}.fade-perso-leave-active[data-v-350a9de7],.fade-collectif-leave-active[data-v-350a9de7]{transition:all .8s cubic-bezier(1,.5,.8,1)}.fade-perso-enter-from[data-v-350a9de7],.fade-collectif-enter-from[data-v-350a9de7],.fade-perso-leave-to[data-v-350a9de7],.fade-collectif-leave-to[data-v-350a9de7]{transform:translate(20px);opacity:0}", be = /* @__PURE__ */ Y(me, [["styles", [pe]], ["__scopeId", "data-v-350a9de7"]]), fe = { class: "container" }, ye = ["arial-level"], ge = { for: "numberOfConversation" }, _e = { for: "numberOfImage" }, Ce = { class: "legals" }, he = /* @__PURE__ */ z({
111
+ }), pe = ".result-calculation[data-v-b69dd4ff]{background:#e0f7fa;border-left:solid 3px #00796b;padding:1rem;border-radius:10px}.header[data-v-b69dd4ff]{font-size:1.125rem;font-weight:700}.consumption[data-v-b69dd4ff]{font-style:italic}.fade-perso-enter-active[data-v-b69dd4ff],.fade-collectif-enter-active[data-v-b69dd4ff]{transition:all .3s ease-out}.fade-perso-leave-active[data-v-b69dd4ff],.fade-collectif-leave-active[data-v-b69dd4ff]{transition:all .8s cubic-bezier(1,.5,.8,1)}.fade-perso-enter-from[data-v-b69dd4ff],.fade-collectif-enter-from[data-v-b69dd4ff],.fade-perso-leave-to[data-v-b69dd4ff],.fade-collectif-leave-to[data-v-b69dd4ff]{transform:translate(20px);opacity:0}", be = /* @__PURE__ */ Y(me, [["styles", [pe]], ["__scopeId", "data-v-b69dd4ff"]]), fe = { class: "container" }, ye = ["arial-level"], ge = { for: "numberOfConversation" }, _e = { for: "numberOfImage" }, Ce = { class: "legals" }, he = /* @__PURE__ */ z({
112
112
  __name: "CalculImpact.ce",
113
113
  props: {
114
114
  titleLevel: { type: Number }
115
115
  },
116
- setup(d, { expose: a }) {
116
+ setup(d, { expose: t }) {
117
117
  const n = d.titleLevel ?? 2, b = l(10), f = l(2), w = l(0), $ = l(0), B = l(0), r = l(!1), y = l(!1);
118
118
  function q() {
119
119
  b.value = 10, f.value = 2, c.value = {}, m.value = {}, w.value = 0, $.value = 0, B.value = 0, r.value = !1, y.value = !1, k.value = 0, F.value = 0, g.value = 0, A.value = 0, O.value = 0;
@@ -137,17 +137,17 @@ const x = {}, J = {}, X = {
137
137
  function W() {
138
138
  r.value && y.value && (P(), M());
139
139
  }
140
- return a({
140
+ return t({
141
141
  reset: q
142
142
  }), (i, I) => (v(), p("div", fe, [
143
143
  e("div", {
144
144
  class: "title",
145
145
  role: "heading",
146
- "arial-level": N(n)
147
- }, "📊 " + t(i.$t("calcul-impact.title")), 9, ye),
148
- e("p", null, t(i.$t("calcul-impact.subtitle")), 1),
149
- e("label", ge, "🤖 " + t(i.$t("calcul-impact.numberOfConversationLabel")), 1),
150
- E(e("input", {
146
+ "arial-level": E(n)
147
+ }, "📊 " + a(i.$t("calcul-impact.title")), 9, ye),
148
+ e("p", null, a(i.$t("calcul-impact.subtitle")), 1),
149
+ e("label", ge, "🤖 " + a(i.$t("calcul-impact.numberOfConversationLabel")), 1),
150
+ N(e("input", {
151
151
  onChange: W,
152
152
  type: "number",
153
153
  id: "numberOfConversation",
@@ -155,8 +155,8 @@ const x = {}, J = {}, X = {
155
155
  }, null, 544), [
156
156
  [V, b.value]
157
157
  ]),
158
- e("label", _e, "🖼️ " + t(i.$t("calcul-impact.numberOfImagesLabel")), 1),
159
- E(e("input", {
158
+ e("label", _e, "🖼️ " + a(i.$t("calcul-impact.numberOfImagesLabel")), 1),
159
+ N(e("input", {
160
160
  onChange: W,
161
161
  type: "number",
162
162
  id: "numberOfImage",
@@ -164,30 +164,30 @@ const x = {}, J = {}, X = {
164
164
  }, null, 544), [
165
165
  [V, f.value]
166
166
  ]),
167
- r.value ? (v(), K(be, {
167
+ r.value ? (v(), G(be, {
168
168
  key: 0,
169
169
  "is-collective": y.value,
170
170
  "is-personal": r.value,
171
- "title-level": N(n),
171
+ "title-level": E(n),
172
172
  "by-week-for-one": c.value,
173
173
  "by-year-for-a-million": m.value
174
174
  }, null, 8, ["is-collective", "is-personal", "title-level", "by-week-for-one", "by-year-for-a-million"])) : C("", !0),
175
175
  r.value ? C("", !0) : (v(), p("button", {
176
176
  key: 1,
177
177
  onClick: S
178
- }, "📌 " + t(i.$t("calcul-impact.seePersonalImpact")), 1)),
178
+ }, "📌 " + a(i.$t("calcul-impact.seePersonalImpact")), 1)),
179
179
  r.value && !y.value ? (v(), p("button", {
180
180
  key: 2,
181
181
  onClick: R
182
- }, "🌍 " + t(i.$t("calcul-impact.seeCollectiveImpact")), 1)) : C("", !0),
183
- e("p", Ce, "📝 " + t(i.$t("calcul-impact.legals")), 1)
182
+ }, "🌍 " + a(i.$t("calcul-impact.seeCollectiveImpact")), 1)) : C("", !0),
183
+ e("p", Ce, "📝 " + a(i.$t("calcul-impact.legals")), 1)
184
184
  ]));
185
185
  }
186
- }), ke = "[data-v-9b2dbaaa]{font-family:Nunito,Roboto,sans-serif;color:#253858}p[data-v-9b2dbaaa]{padding:0}.container[data-v-9b2dbaaa]{display:flex;flex-direction:column;gap:1rem}.container button[data-v-9b2dbaaa]{border:0;border-radius:5px;font-size:.9rem;background:#357abd;color:#fff;width:50%;padding:.4rem .8rem;margin:auto;cursor:pointer}.container button[data-v-9b2dbaaa]:hover{background:#225d93}.container input[data-v-9b2dbaaa]{border:solid 1px lightgrey;border-radius:5px;padding-block:.2rem;width:40%}.container label[data-v-9b2dbaaa]{font-weight:700}.container .legals[data-v-9b2dbaaa]{font-size:.9rem;font-style:italic}.container .title[data-v-9b2dbaaa]{font-size:1.3rem;font-weight:700}@media only screen and (max-width: 768px){.container button[data-v-9b2dbaaa]{width:100%}.container input[data-v-9b2dbaaa]{width:80%}}", Ie = /* @__PURE__ */ Y(he, [["styles", [ke]], ["__scopeId", "data-v-9b2dbaaa"]]);
187
- H(/* @__PURE__ */ Object.assign({ "./locales/en.json": x, "./locales/es.json": J, "./locales/fr.json": X, "./locales/it.json": Z, "./locales/nl.json": ee })).catch((d) => console.error(d));
188
- window.customElements.define("calcul-impact", G(Ie, {
186
+ }), ke = "[data-v-7fbb31b5]{font-family:Nunito,Roboto,sans-serif;color:#253858}p[data-v-7fbb31b5]{padding:0}.container[data-v-7fbb31b5]{display:flex;flex-direction:column;gap:1rem}.container button[data-v-7fbb31b5]{border:0;border-radius:5px;font-size:.9rem;background:#357abd;color:#fff;width:50%;padding:.4rem .8rem;margin:auto;cursor:pointer}.container button[data-v-7fbb31b5]:hover{background:#225d93}.container input[data-v-7fbb31b5]{border:solid 1px lightgrey;border-radius:5px;padding-block:.2rem;width:40%}.container label[data-v-7fbb31b5]{font-weight:700}.container .legals[data-v-7fbb31b5]{font-size:.9rem;font-style:italic}.container .title[data-v-7fbb31b5]{font-size:1.3rem;font-weight:700}@media only screen and (max-width: 768px){.container button[data-v-7fbb31b5]{width:100%}.container input[data-v-7fbb31b5]{width:80%}}", Ie = /* @__PURE__ */ Y(he, [["styles", [ke]], ["__scopeId", "data-v-7fbb31b5"]]);
187
+ H(/* @__PURE__ */ Object.assign({ "./locales/en.json": Q, "./locales/es.json": x, "./locales/fr.json": X, "./locales/it.json": Z, "./locales/nl.json": ee })).catch((d) => console.error(d));
188
+ window.customElements.define("calcul-impact", K(Ie, {
189
189
  configureApp(d) {
190
- j.changeLanguage(document?.documentElement?.lang || navigator.language), d.use(Q, {
190
+ j.changeLanguage(document?.documentElement?.lang || navigator.language), d.use(J, {
191
191
  i18next: j,
192
192
  slotStart: "{{",
193
193
  slotEnd: "}}"
@@ -0,0 +1,279 @@
1
+ import { a as x, c as u, o as s, H as k, L as M, A as L, t as n, _ as m, f as e, O, P as w, r as b, k as g, J as f, e as B, F as E, b as V, G as z, Q as D, M as F, y as C, q as P, d as R } from "../_plugin-vue_export-helper-BaT1QC5Q.js";
2
+ import { i as $, a as T, b as H } from "../i18n-BOk_ejZ-.js";
3
+ const G = {
4
+ "capacity-calculation": { title: "Observer l'impact des demandes", in: { title: "Demandes à l'IA", aiQuestion: "Quelle est la demande à l'IA ?", aiOptions: ["Fais une vidéo d’une minute d’un chat qui fait du ski.", "Écris un poème de 10 vers à la manière de Victor Hugo.", "Fais le dessin d’une salle de concert à la manière d’un manga."], userQuestion: "Combien d’utilisateurs font la demande en même temps ?", buttonLabel: { primary: "Observer l'effet", warning: "Recommencer", information: "Essayer une nouvelle demande" } }, out: { title: "Impact des demandes", tryAgain: "Essayez avec une autre demande", consumption: { label: "Consommation d’électricité :", normal_weak: "Faible", normal_medium: "Moyenne", warning: "Très forte", error: "Très forte", initial: "À l'arrêt" }, capacity: { label: "État du supercalculateur :", normal_weak: "Normal", normal_medium: "Normal", warning: "Sollicitation maximale", error: "Ne peut pas répondre à la demande", initial: "À l'arrêt" } } }
5
+ }, J = ["aria-disabled"], K = /* @__PURE__ */ x({
6
+ __name: "PixButton.ce",
7
+ props: {
8
+ disabled: { type: Boolean },
9
+ label: { type: String },
10
+ state: { type: String }
11
+ },
12
+ setup(o) {
13
+ return (i, d) => (s(), u("button", {
14
+ class: k(["pix-button", i.state]),
15
+ "aria-disabled": i.disabled
16
+ }, [
17
+ M(i.$slots, "icon"),
18
+ L(" " + n(i.label), 1)
19
+ ], 10, J));
20
+ }
21
+ }), Z = ".pix-button{--pix-neutral-0: #fff;--pix-primary-500: #613fdd;--pix-primary-700: #452d9d;--pix-primary-900: #291a5d;--pix-secondary-500: #ffcb33;--pix-secondary-700: #a16206;--pix-secondary-900: #5b3808;align-items:center;border:2px solid transparent;border-radius:100px;background-color:var(--pix-primary-500);color:var(--pix-neutral-0);cursor:pointer;display:flex;font-weight:700;gap:8px;justify-content:center;line-height:24px;margin:0 auto;outline:none;padding:8px 24px;text-decoration:none;width:fit-content;white-space:nowrap}.pix-button.primary[aria-disabled=true]{cursor:not-allowed;opacity:.5}.pix-button.primary:not([aria-disabled=true]):hover{background-color:var(--pix-primary-700)}.pix-button.primary:not([aria-disabled=true]):focus,.pix-button.primary:not([aria-disabled=true]):focus-visible{background-color:var(--pix-primary-700);outline:1px solid var(--pix-neutral-0);outline-offset:-5px}.pix-button.primary:not([aria-disabled=true]):active{background-color:var(--pix-primary-900);outline:none}.pix-button.warning{color:#122647;background-color:var(--pix-secondary-500)}.pix-button.warning:not([aria-disabled=true]):hover{color:var(--pix-neutral-0);background-color:var(--pix-secondary-700)}.pix-button.warning:not([aria-disabled=true]):focus,.pix-button.warning:not([aria-disabled=true]):focus-visible{color:var(--pix-neutral-0);background-color:var(--pix-secondary-700);outline:1px solid var(--pix-neutral-0);outline-offset:-4px}.pix-button.warning:not([aria-disabled=true]):active{color:var(--pix-neutral-0);background-color:var(--pix-secondary-900);outline:none}", W = /* @__PURE__ */ m(K, [["styles", [Z]]]), X = {}, Y = {
22
+ width: "20",
23
+ height: "20",
24
+ viewBox: "0 0 20 20",
25
+ fill: "currentColor",
26
+ xmlns: "http://www.w3.org/2000/svg"
27
+ };
28
+ function aa(o, i) {
29
+ return s(), u("svg", Y, [...i[0] || (i[0] = [
30
+ e("path", { d: "M9.98008 16.836C8.07578 16.836 6.46036 16.1728 5.13383 14.8462C3.80731 13.5197 3.14404 11.9043 3.14404 9.99998C3.14404 8.09568 3.80731 6.48026 5.13383 5.15373C6.46036 3.8272 8.07578 3.16394 9.98008 3.16394C10.9684 3.16394 11.9108 3.36686 12.8074 3.77269C13.7039 4.17839 14.4713 4.76095 15.1097 5.5204V4.03707C15.1097 3.7897 15.1933 3.58234 15.3607 3.41498C15.5281 3.24762 15.7354 3.16394 15.9828 3.16394C16.2303 3.16394 16.4377 3.24762 16.6051 3.41498C16.7724 3.58234 16.8561 3.7897 16.8561 4.03707V8.29352C16.8561 8.5595 16.7646 8.78394 16.5815 8.96686C16.3986 9.14991 16.1742 9.24144 15.9082 9.24144H11.6418C11.3958 9.24144 11.1896 9.15776 11.0232 8.9904C10.8568 8.82304 10.7736 8.61561 10.7736 8.36811C10.7736 8.12213 10.8573 7.91595 11.0247 7.74956C11.192 7.58318 11.3994 7.49998 11.6468 7.49998H14.2438C13.7994 6.74207 13.199 6.14589 12.4428 5.71144C11.6867 5.277 10.8658 5.05977 9.98008 5.05977C8.60786 5.05977 7.44147 5.54005 6.48092 6.50061C5.52022 7.4613 5.03988 8.62776 5.03988 9.99998C5.03988 11.3722 5.52022 12.5387 6.48092 13.4994C7.44147 14.4599 8.60786 14.9402 9.98008 14.9402C10.888 14.9402 11.7219 14.713 12.4818 14.2587C13.2416 13.8046 13.8385 13.1963 14.2724 12.4339C14.4021 12.2189 14.5846 12.0692 14.8199 11.9848C15.055 11.9005 15.2896 11.8996 15.5236 11.9823C15.7733 12.0651 15.9535 12.2275 16.064 12.4696C16.1745 12.7118 16.1675 12.9401 16.0432 13.1544C15.4538 14.2688 14.6222 15.161 13.5484 15.831C12.4745 16.501 11.2851 16.836 9.98008 16.836Z" }, null, -1)
31
+ ])]);
32
+ }
33
+ const ea = /* @__PURE__ */ m(X, [["render", aa]]), ta = { class: "capacity-calculation__column capacity-calculation__column--questions" }, ia = { class: "capacity-calculation__fieldset capacity-calculation__fieldset--ai" }, ca = { class: "capacity-calculation__legend" }, la = ["aria-disabled", "value", "checked"], na = {
34
+ key: 0,
35
+ class: "capacity-calculation__fieldset capacity-calculation__fieldset--range"
36
+ }, oa = { class: "capacity-calculation__legend--user-question" }, ra = { class: "capacity-calculation__range-wrap" }, sa = ["max", "value", "aria-disabled"], ua = {
37
+ for: "nbUser",
38
+ class: "capacity-calculation__range-label"
39
+ }, da = {
40
+ key: 2,
41
+ class: "capacity-calculation__information"
42
+ }, pa = /* @__PURE__ */ x({
43
+ __name: "Questions.ce",
44
+ props: /* @__PURE__ */ O({
45
+ titleLevel: { type: Number }
46
+ }, {
47
+ selectedAiQuestion: {
48
+ type: Number,
49
+ default: void 0
50
+ },
51
+ selectedAiQuestionModifiers: {},
52
+ selectedNbUser: {
53
+ type: Number,
54
+ default: 10
55
+ },
56
+ selectedNbUserModifiers: {},
57
+ currentLevel: {
58
+ type: String,
59
+ default: "initial"
60
+ },
61
+ currentLevelModifiers: {}
62
+ }),
63
+ emits: ["update:selectedAiQuestion", "update:selectedNbUser", "update:currentLevel"],
64
+ setup(o) {
65
+ const d = o.titleLevel + 1, c = w(o, "selectedAiQuestion"), a = w(o, "selectedNbUser"), t = w(o, "currentLevel"), r = b(!1), p = g(() => ({
66
+ state: t.value === "initial" ? "primary" : "warning",
67
+ label: $.t(`capacity-calculation.in.buttonLabel.${t.value === "initial" ? "primary" : "warning"}`)
68
+ })), _ = [800, 15e3, 25e3, 9e4, 15e4], N = /* @__PURE__ */ new Set([
69
+ // Valeurs de base
70
+ 10,
71
+ 20,
72
+ 30,
73
+ 40,
74
+ 50,
75
+ 60,
76
+ 70,
77
+ 80,
78
+ 90,
79
+ 100,
80
+ 200,
81
+ 300,
82
+ 400,
83
+ 500,
84
+ 600,
85
+ 700,
86
+ 800,
87
+ 1e3,
88
+ 2e3,
89
+ 3e3,
90
+ 4e3,
91
+ 5e3,
92
+ 7500,
93
+ 1e4,
94
+ ..._,
95
+ 2e4,
96
+ 3e4,
97
+ 4e4,
98
+ 5e4,
99
+ 75e3,
100
+ 1e5,
101
+ 125e3
102
+ ]), h = Array.from(N).sort((l, v) => l - v), q = g(() => {
103
+ const l = h.indexOf(a.value);
104
+ return Math.max(0, l);
105
+ }), A = (l) => {
106
+ const v = l.target;
107
+ a.value = h[Number(v.value)];
108
+ }, Q = (l) => {
109
+ if (r.value) {
110
+ l.preventDefault();
111
+ return;
112
+ }
113
+ }, S = () => {
114
+ if (t.value !== "initial") {
115
+ I();
116
+ return;
117
+ }
118
+ c.value === 0 ? a.value >= 10 && a.value < 400 ? t.value = "normal_weak" : a.value > 401 && a.value < 700 ? t.value = "normal_medium" : a.value > 701 && a.value < 1e3 ? t.value = "warning" : t.value = "error" : c.value === 1 ? a.value >= 10 && a.value <= 4e4 ? t.value = "normal_weak" : a.value > 40001 && a.value <= 7e4 ? t.value = "normal_medium" : a.value > 70001 && a.value <= 1e5 ? t.value = "warning" : t.value = "error" : c.value === 2 && (a.value >= 10 && a.value < 8e3 ? t.value = "normal_weak" : a.value > 8001 && a.value < 14e3 ? t.value = "normal_medium" : a.value > 14001 && a.value < 2e4 ? t.value = "warning" : t.value = "error"), r.value = !0;
119
+ };
120
+ function U(l) {
121
+ if (r.value) {
122
+ l.preventDefault();
123
+ return;
124
+ }
125
+ c.value = Number(l.target.value);
126
+ }
127
+ function I() {
128
+ c.value = void 0, a.value = 10, t.value = "initial", r.value = !1;
129
+ }
130
+ return (l, v) => (s(), u("div", ta, [
131
+ e("div", {
132
+ role: "heading",
133
+ "aria-level": d,
134
+ class: "capacity-calculation__subtitle"
135
+ }, n(l.$t("capacity-calculation.in.title")), 1),
136
+ e("fieldset", ia, [
137
+ e("legend", ca, n(l.$t("capacity-calculation.in.aiQuestion")), 1),
138
+ (s(!0), u(E, null, V(l.$t("capacity-calculation.in.aiOptions", { returnObjects: !0 }), (j, y) => (s(), u("div", { key: y }, [
139
+ e("label", {
140
+ class: k(["capacity-calculation__ai-option", { "capacity-calculation__ai-option--active": c.value === y, disabled: r.value }])
141
+ }, [
142
+ e("input", {
143
+ type: "radio",
144
+ "aria-disabled": r.value,
145
+ name: "ai-answer",
146
+ value: y,
147
+ onClick: U,
148
+ checked: c.value === y
149
+ }, null, 8, la),
150
+ L(" " + n(j), 1)
151
+ ], 2)
152
+ ]))), 128))
153
+ ]),
154
+ Number.isInteger(c.value) ? (s(), u("fieldset", na, [
155
+ e("legend", oa, n(l.$t("capacity-calculation.in.userQuestion")), 1),
156
+ e("div", ra, [
157
+ e("input", {
158
+ type: "range",
159
+ id: "nbUser",
160
+ name: "nbUser",
161
+ min: 0,
162
+ max: z(h).length - 1,
163
+ value: q.value,
164
+ onChange: A,
165
+ onKeydown: Q,
166
+ "aria-disabled": r.value,
167
+ class: "capacity-calculation__range"
168
+ }, null, 40, sa),
169
+ e("label", ua, n(a.value.toLocaleString()), 1)
170
+ ])
171
+ ])) : f("", !0),
172
+ Number.isInteger(c.value) ? (s(), B(W, {
173
+ key: 1,
174
+ onClick: P(S, ["prevent"]),
175
+ label: p.value.label,
176
+ state: p.value.state
177
+ }, D({ _: 2 }, [
178
+ t.value !== "initial" ? {
179
+ name: "icon",
180
+ fn: F(() => [
181
+ C(ea)
182
+ ]),
183
+ key: "0"
184
+ } : void 0
185
+ ]), 1032, ["label", "state"])) : f("", !0),
186
+ t.value !== "initial" ? (s(), u("p", da, n(l.$t("capacity-calculation.in.buttonLabel.information")), 1)) : f("", !0)
187
+ ]));
188
+ }
189
+ }), _a = ".capacity-calculation__column--questions .capacity-calculation__fieldset[data-v-ec3b49a3]{border:none;display:flex;flex-direction:column;gap:12px;padding:0}.capacity-calculation__column--questions .capacity-calculation__legend[data-v-ec3b49a3]{font-weight:500;margin-bottom:16px}.capacity-calculation__column--questions .capacity-calculation__legend--user-question[data-v-ec3b49a3]{font-weight:500;margin:16px 0}.capacity-calculation__column--questions .capacity-calculation__ai-option[data-v-ec3b49a3]{border:1px solid #5e6c84;border-radius:8px;display:block;cursor:pointer;padding:12px;transition:all .2s ease}.capacity-calculation__column--questions .capacity-calculation__ai-option[data-v-ec3b49a3]:hover,.capacity-calculation__column--questions .capacity-calculation__ai-option[data-v-ec3b49a3]:focus{background-color:#f7f5ff;border-color:#613fdd;color:#291a5d}.capacity-calculation__column--questions .capacity-calculation__ai-option--active[data-v-ec3b49a3]{background-color:#f7f5ff;border-color:#613fdd;color:#291a5d}.capacity-calculation__column--questions .capacity-calculation__ai-option.disabled[data-v-ec3b49a3]{cursor:not-allowed;background:#f1f1f1;border-color:#5b5b5b}.capacity-calculation__column--questions .capacity-calculation__range-wrap[data-v-ec3b49a3]{display:flex;flex-direction:column;gap:8px}.capacity-calculation__column--questions .capacity-calculation__range[data-v-ec3b49a3]{width:100%;accent-color:#613fdd}.capacity-calculation__column--questions .capacity-calculation__range[aria-disabled=true][data-v-ec3b49a3]{opacity:.3;pointer-events:none}.capacity-calculation__column--questions .capacity-calculation__range-label[data-v-ec3b49a3]{display:flex;justify-content:center;font-weight:700;margin-block:-5px 10px}.capacity-calculation__column--questions .capacity-calculation__information[data-v-ec3b49a3]{color:#5e6c84;text-align:center;margin-block:.4rem 0;font-size:.9rem}", ma = /* @__PURE__ */ m(pa, [["styles", [_a]], ["__scopeId", "data-v-ec3b49a3"]]), va = { class: "capacity-calculation__column capacity-calculation__column--answers" }, ya = ["aria-level"], ba = { class: "capacity-calculation__card" }, fa = { class: "capacity-calculation__text capacity-calculation__text--strong" }, ga = ["src"], xa = { class: "capacity-calculation__text" }, ha = { class: "capacity-calculation__answers" }, wa = { class: "capacity-calculation__card" }, Ca = { class: "capacity-calculation__text capacity-calculation__text--strong" }, $a = ["src"], ka = { class: "capacity-calculation__text" }, La = {
190
+ key: 0,
191
+ class: "capacity-calculation__card capacity-calculation__card--retry"
192
+ }, Na = /* @__PURE__ */ x({
193
+ __name: "Answers.ce",
194
+ props: {
195
+ currentLevel: { type: String },
196
+ selectedNbUser: { type: Number },
197
+ titleLevel: { type: Number },
198
+ images: { type: Object }
199
+ },
200
+ setup(o) {
201
+ const i = o, d = g(() => ({
202
+ imageSrc: i.images[i.currentLevel].consumptionImg,
203
+ label: `capacity-calculation.out.consumption.${i.currentLevel}`
204
+ })), c = g(() => ({
205
+ imageSrc: i.images[i.currentLevel].capacityImg,
206
+ label: `capacity-calculation.out.capacity.${i.currentLevel}`
207
+ }));
208
+ return (a, t) => (s(), u("div", va, [
209
+ e("div", {
210
+ role: "heading",
211
+ "aria-level": a.titleLevel + 1,
212
+ class: "capacity-calculation__subtitle"
213
+ }, n(a.$t("capacity-calculation.out.title")), 9, ya),
214
+ e("div", ba, [
215
+ e("p", fa, n(a.$t("capacity-calculation.out.capacity.label")), 1),
216
+ e("img", {
217
+ src: c.value.imageSrc,
218
+ alt: "",
219
+ class: "capacity-calculation__img--capacity"
220
+ }, null, 8, ga),
221
+ e("p", xa, n(a.$t(c.value.label)), 1)
222
+ ]),
223
+ e("div", ha, [
224
+ e("div", wa, [
225
+ e("p", Ca, n(a.$t("capacity-calculation.out.consumption.label")), 1),
226
+ e("img", {
227
+ src: d.value.imageSrc,
228
+ alt: "",
229
+ class: "capacity-calculation__img"
230
+ }, null, 8, $a),
231
+ e("p", ka, n(a.$t(d.value.label)), 1)
232
+ ]),
233
+ a.currentLevel !== "initial" ? (s(), u("div", La, " 🧐 " + n(a.$t("capacity-calculation.out.tryAgain")), 1)) : f("", !0)
234
+ ])
235
+ ]));
236
+ }
237
+ }), qa = ".capacity-calculation__column--answers[data-v-db0665df]{display:flex;gap:.3rem}.capacity-calculation__column--answers .capacity-calculation__answers[data-v-db0665df]{display:flex;flex-direction:column;align-items:stretch;gap:8px;justify-content:center;margin-bottom:1rem}.capacity-calculation__column--answers .capacity-calculation__card[data-v-db0665df]{background:#ffefc0;border-radius:4px;display:flex;flex-direction:column;align-items:center;gap:16px;padding:8px}.capacity-calculation__column--answers .capacity-calculation__card--retry[data-v-db0665df]{background:#e8f3ef;border-radius:16px;font-size:1rem;font-weight:700;line-height:1.5rem;text-align:center}.capacity-calculation__column--answers .capacity-calculation__text[data-v-db0665df]{font-size:.875rem;font-weight:400;line-height:1.5rem;text-align:center;margin:0}.capacity-calculation__column--answers .capacity-calculation__text--strong[data-v-db0665df]{font-weight:700;margin:0}.capacity-calculation__column--answers img[data-v-db0665df]{max-width:100%}.capacity-calculation__column--answers .capacity-calculation__img--capacity[data-v-db0665df]{max-width:120px}@media (max-width: 720px){.capacity-calculation__column--answers .capacity-calculation__answers[data-v-db0665df]{flex-direction:row;justify-content:center;gap:16px}.capacity-calculation__column--answers .capacity-calculation__answers .capacity-calculation__card--retry[data-v-db0665df]{display:flex;justify-content:center}}", Aa = /* @__PURE__ */ m(Na, [["styles", [qa]], ["__scopeId", "data-v-db0665df"]]), Qa = { class: "capacity-calculation" }, Sa = ["aria-level"], Ua = { class: "capacity-calculation__grid" }, Ia = /* @__PURE__ */ x({
238
+ __name: "CapacityCalculation.ce",
239
+ props: {
240
+ titleLevel: { default: 2, type: Number },
241
+ images: { type: Object }
242
+ },
243
+ setup(o, { expose: i }) {
244
+ const d = b(void 0), c = b(10), a = b("initial");
245
+ function t() {
246
+ d.value = void 0, c.value = 10, a.value = "initial";
247
+ }
248
+ return i({ reset: t }), (r, p) => (s(), u("div", Qa, [
249
+ e("div", {
250
+ role: "heading",
251
+ "aria-level": r.titleLevel,
252
+ class: "capacity-calculation__title"
253
+ }, n(r.$t("capacity-calculation.title")), 9, Sa),
254
+ e("div", Ua, [
255
+ C(ma, {
256
+ "title-level": r.titleLevel,
257
+ "selected-ai-question": d.value,
258
+ "onUpdate:selectedAiQuestion": p[0] || (p[0] = (_) => d.value = _),
259
+ "selected-nb-user": c.value,
260
+ "onUpdate:selectedNbUser": p[1] || (p[1] = (_) => c.value = _),
261
+ "current-level": a.value,
262
+ "onUpdate:currentLevel": p[2] || (p[2] = (_) => a.value = _)
263
+ }, null, 8, ["title-level", "selected-ai-question", "selected-nb-user", "current-level"]),
264
+ C(Aa, {
265
+ "title-level": r.titleLevel,
266
+ "selected-nb-user": c.value,
267
+ "current-level": a.value,
268
+ images: r.images
269
+ }, null, 8, ["title-level", "selected-nb-user", "current-level", "images"])
270
+ ])
271
+ ]));
272
+ }
273
+ }), ja = ".capacity-calculation__title,.capacity-calculation__subtitle{color:#122647;font-family:Nunito,serif;font-weight:700;text-align:center}.capacity-calculation__title{font-size:1.75rem;line-height:2.25rem;margin-bottom:1rem}.capacity-calculation__subtitle{font-size:1.25rem;line-height:1.75rem;margin-bottom:1rem}.capacity-calculation__grid{display:grid;gap:1rem;grid-template-columns:5fr 2.6fr}.capacity-calculation__grid>.capacity-calculation__column{display:flex;background:#fff;border-radius:8px;border:1px solid #b0d3f4;flex-direction:column;padding:16px}@media screen and (max-width: 720px){.capacity-calculation__grid{display:flex;flex-direction:column}}", Ma = /* @__PURE__ */ m(Ia, [["styles", [ja]]]);
274
+ T(/* @__PURE__ */ Object.assign({ "./locales/fr.json": G })).catch((o) => console.error(o));
275
+ window.customElements.define("capacity-calculation", R(Ma, {
276
+ configureApp(o) {
277
+ $.changeLanguage(document?.documentElement?.lang || navigator.language), o.use(H, { i18next: $ });
278
+ }
279
+ }));
@@ -1,4 +1,4 @@
1
- import { a as I, g as M, r as u, h as S, j as R, k as c, c as d, o as v, f as p, l as B, m as E, F as O, b as W, q as g, v as j, t as D, x as F, _ as L, d as N } from "../_plugin-vue_export-helper-DK91u00G.js";
1
+ import { a as I, g as M, r as u, h as S, j as R, k as c, c as d, o as v, f as p, l as B, m as E, F as O, b as W, q as g, v as j, t as D, x as F, _ as L, d as N } from "../_plugin-vue_export-helper-BaT1QC5Q.js";
2
2
  const P = { name: "image-map" }, q = ["shape", "coords", "onMouseenter", "onClick"], T = /* @__PURE__ */ I({
3
3
  __name: "ClickableImage.ce",
4
4
  props: {
@@ -1,17 +1,17 @@
1
- import { a as w, c as n, o as t, f as e, t as r, x as C, _ as x, r as p, y as g, F as v, b as h, D as P, e as B, d as A } from "../_plugin-vue_export-helper-DK91u00G.js";
2
- import { a as M, i as f, b as j } from "../i18n-Gv3Ze5vF.js";
3
- import { L as y } from "../LLMMessage.ce-CnMf3mGa.js";
1
+ import { a as w, c as n, o as t, f as e, t as r, x as C, _ as x, r as p, y as g, F as v, b as h, H as P, e as B, d as A } from "../_plugin-vue_export-helper-BaT1QC5Q.js";
2
+ import { a as M, i as f, b as j } from "../i18n-BOk_ejZ-.js";
3
+ import { L as y } from "../LLMMessage.ce-55YTC7a9.js";
4
4
  const z = {}, N = {}, I = {
5
5
  "complete-phrase": { iaSuggestions: "🧠 Suggestions de l'IA", explanation: "La barre indique la probabilité de chaque mot. Plus elle est longue, plus le mot est probable dans ce contexte.", ariaLabelDescription: "Le mot {{name}} a une probabilité de {{percent}}%", clickHereButton: "Cliquez ici pour voir ce que l'IA va compléter", successfullyCompletedSentence: "🎉 Phrase complétée avec succès !" }
6
- }, T = {}, q = {}, D = { class: "probability-bar" }, E = { "aria-hidden": "true" }, F = { class: "sr-only" }, O = /* @__PURE__ */ w({
6
+ }, T = {}, q = {}, E = { class: "probability-bar" }, D = { "aria-hidden": "true" }, F = { class: "sr-only" }, H = /* @__PURE__ */ w({
7
7
  __name: "ProbabilityBar.ce",
8
8
  props: {
9
9
  name: { type: String },
10
10
  percent: { type: Number }
11
11
  },
12
12
  setup(i) {
13
- return (o, s) => (t(), n("div", D, [
14
- e("p", E, r(o.name), 1),
13
+ return (o, s) => (t(), n("div", E, [
14
+ e("p", D, r(o.name), 1),
15
15
  e("p", F, r(o.$t("complete-phrase.ariaLabelDescription", { name: o.name, percent: o.percent })), 1),
16
16
  e("div", {
17
17
  style: C(`width: ${o.percent}%`),
@@ -24,7 +24,7 @@ const z = {}, N = {}, I = {
24
24
  }, null, -1))
25
25
  ]));
26
26
  }
27
- }), R = ".probability-bar[data-v-d89fc563]{position:relative;padding-bottom:10px;border-bottom:1px solid #cbcbcb}.probability-bar__percent[data-v-d89fc563]{position:absolute;left:0;z-index:2;height:5px;border-radius:5px;background-color:#235386}.probability-bar__background[data-v-d89fc563]{position:absolute;left:0;z-index:1;width:100%;height:5px;border-radius:5px;background-color:#92a1b2}.probability-bar p[data-v-d89fc563]{margin-bottom:0}.sr-only[data-v-d89fc563]{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}", H = /* @__PURE__ */ x(O, [["styles", [R]], ["__scopeId", "data-v-d89fc563"]]), V = { class: "container" }, W = { class: "container__left-side" }, G = { class: "container__conversation" }, J = ["aria-describedby"], K = {
27
+ }), O = ".probability-bar[data-v-d89fc563]{position:relative;padding-bottom:10px;border-bottom:1px solid #cbcbcb}.probability-bar__percent[data-v-d89fc563]{position:absolute;left:0;z-index:2;height:5px;border-radius:5px;background-color:#235386}.probability-bar__background[data-v-d89fc563]{position:absolute;left:0;z-index:1;width:100%;height:5px;border-radius:5px;background-color:#92a1b2}.probability-bar p[data-v-d89fc563]{margin-bottom:0}.sr-only[data-v-d89fc563]{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}", R = /* @__PURE__ */ x(H, [["styles", [O]], ["__scopeId", "data-v-d89fc563"]]), V = { class: "container" }, W = { class: "container__left-side" }, G = { class: "container__conversation" }, J = ["aria-describedby"], K = {
28
28
  key: 1,
29
29
  class: "container__successSentence"
30
30
  }, Q = { class: "container__right-side" }, U = ["aria-level"], X = { "aria-hidden": "true" }, Y = { class: "probabilities" }, Z = ["id", "aria-hidden"], ee = /* @__PURE__ */ w({
@@ -81,7 +81,7 @@ const z = {}, N = {}, I = {
81
81
  id: `currentProbability${d}`,
82
82
  "aria-hidden": d !== l.value
83
83
  }, [
84
- (t(!0), n(v, null, h($, (m, L) => (t(), B(H, {
84
+ (t(!0), n(v, null, h($, (m, L) => (t(), B(R, {
85
85
  name: m.name,
86
86
  percent: m.percent,
87
87
  key: L