@1024pix/epreuves-components 1.4.5 → 1.5.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.
- package/dist/LLMMessage.ce-CcaSmq0J.js +96 -0
- package/dist/Loading.ce-kO02LfAR.js +14 -0
- package/dist/NavigationButton.ce-BUeEdL4x.js +98 -0
- package/dist/{_plugin-vue_export-helper-CwwQJ1m6.js → _plugin-vue_export-helper-BGEtPlxS.js} +1373 -1355
- package/dist/components/calcul-impact.ce.js.js +91 -85
- package/dist/components/capacity-calculation.ce.js.js +117 -111
- package/dist/components/clickable-image.ce.js.js +83 -59
- package/dist/components/complete-phrase.ce.js.js +57 -51
- package/dist/components/flip-cards.ce.js.js +43 -46
- package/dist/components/image-quiz.ce.js.js +6 -4
- package/dist/components/image-quizzes.ce.js.js +18 -14
- package/dist/components/llm-compare-messages.ce.js.js +17 -17
- package/dist/components/llm-messages.ce.js.js +17 -17
- package/dist/components/llm-prompt-select.ce.js.js +37 -32
- package/dist/components/message-conversation.ce.js.js +61 -52
- package/dist/components/pix-article.ce.js.js +26 -20
- package/dist/components/pix-carousel.ce.js.js +133 -121
- package/dist/components/pix-cursor.ce.js.js +62 -62
- package/dist/components/qcm-deepfake.ce.js.js +97 -91
- package/dist/{i18n-gncqQJ0G.js → i18n-D3E2CT0o.js} +44 -40
- package/dist/image-quiz.ce-Qe3SbGDF.js +141 -0
- package/dist/index.js +1 -1
- package/dist/normalize-props-AlmAfi_u.js +13 -0
- package/dist/schema.js +8 -8
- package/dist/{shadow-dom-MxYtPVXS.js → shadow-dom-Bqt3ZRMI.js} +1 -1
- package/package.json +1 -1
- package/dist/ImageQuiz.ce-BLOWdEiw.js +0 -123
- package/dist/LLMMessage.ce-DnZ8kE2i.js +0 -89
- package/dist/Loading.ce-FI776zdC.js +0 -14
- package/dist/NavigationButton.ce-gp04deGY.js +0 -98
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as H, i as
|
|
3
|
-
|
|
1
|
+
import { d as j, z as T, c as p, o as d, F as U, y as v, M as r, E as C, f as e, t as a, A as _, T as D, _ as z, r as l, l as N, b as G, G as E, N as x, e as K } from "../_plugin-vue_export-helper-BGEtPlxS.js";
|
|
2
|
+
import { a as H, i as V, b as Q } from "../i18n-D3E2CT0o.js";
|
|
3
|
+
import { u as J } from "../normalize-props-AlmAfi_u.js";
|
|
4
|
+
const X = {}, Z = {}, ee = {}, te = {
|
|
4
5
|
"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 la consommation en électricité de {{homes}} foyers français", collectiveDuration: "Équivalent à {{number}} minutes de micro-ondes", planeKilometers: "Et {{kilometers}} km parcourus en avion", yourCollectiveImpact: "Impact collectif simulé" }
|
|
5
|
-
},
|
|
6
|
+
}, ae = {}, le = {}, oe = {
|
|
6
7
|
key: 0,
|
|
7
8
|
class: "result-calculation"
|
|
8
|
-
},
|
|
9
|
+
}, ne = ["aria-level"], ie = { class: "consumption" }, se = { style: { "font-weight": "bold" } }, re = { style: { "font-weight": "bold" } }, ce = {
|
|
9
10
|
key: 0,
|
|
10
11
|
class: "result-calculation"
|
|
11
|
-
},
|
|
12
|
+
}, ue = ["titleLevel"], ve = { class: "consumption" }, de = { style: { "font-weight": "bold" } }, me = { style: { "font-weight": "bold" } }, pe = { style: { "font-weight": "bold" } }, be = { style: { "font-weight": "bold" } }, fe = /* @__PURE__ */ j({
|
|
12
13
|
__name: "ImpactsResults.ce",
|
|
13
14
|
props: {
|
|
14
15
|
titleLevel: { type: Number },
|
|
@@ -17,37 +18,37 @@ const x = {}, J = {}, X = {
|
|
|
17
18
|
isPersonal: { type: Boolean },
|
|
18
19
|
isCollective: { type: Boolean }
|
|
19
20
|
},
|
|
20
|
-
setup(
|
|
21
|
-
return (
|
|
22
|
-
const
|
|
23
|
-
return
|
|
24
|
-
|
|
25
|
-
default:
|
|
26
|
-
t.isPersonal ? (
|
|
21
|
+
setup(t) {
|
|
22
|
+
return (o, n) => {
|
|
23
|
+
const i = T("i18next");
|
|
24
|
+
return d(), p(U, null, [
|
|
25
|
+
v(D, { name: "fade-perso" }, {
|
|
26
|
+
default: r(() => [
|
|
27
|
+
t.isPersonal ? (d(), p("div", oe, [
|
|
27
28
|
e("div", {
|
|
28
29
|
class: "header",
|
|
29
30
|
role: "heading",
|
|
30
31
|
"aria-level": t.titleLevel + 1
|
|
31
|
-
}, "📌 " + a(
|
|
32
|
-
e("p",
|
|
32
|
+
}, "📌 " + a(o.$t("calcul-impact.yourPersonalImpact")), 9, ne),
|
|
33
|
+
e("p", ie, a(o.$t("calcul-impact.consumptionForAWeek")), 1),
|
|
33
34
|
e("p", null, [
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
translation:
|
|
35
|
+
n[0] || (n[0] = _(" ⚡ ", -1)),
|
|
36
|
+
v(i, {
|
|
37
|
+
translation: o.$t("calcul-impact.personalConsumption")
|
|
37
38
|
}, {
|
|
38
|
-
energy:
|
|
39
|
-
e("span",
|
|
39
|
+
energy: r(() => [
|
|
40
|
+
e("span", se, a(t.byWeekForOne.energyByWeek), 1)
|
|
40
41
|
]),
|
|
41
42
|
_: 1
|
|
42
43
|
}, 8, ["translation"])
|
|
43
44
|
]),
|
|
44
45
|
e("p", null, [
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
translation:
|
|
46
|
+
n[1] || (n[1] = _(" 🍽️ ", -1)),
|
|
47
|
+
v(i, {
|
|
48
|
+
translation: o.$t("calcul-impact.personalDuration")
|
|
48
49
|
}, {
|
|
49
|
-
number:
|
|
50
|
-
e("span",
|
|
50
|
+
number: r(() => [
|
|
51
|
+
e("span", re, a(t.byWeekForOne.personalMicrowavesDuration), 1)
|
|
51
52
|
]),
|
|
52
53
|
_: 1
|
|
53
54
|
}, 8, ["translation"])
|
|
@@ -56,47 +57,47 @@ const x = {}, J = {}, X = {
|
|
|
56
57
|
]),
|
|
57
58
|
_: 1
|
|
58
59
|
}),
|
|
59
|
-
|
|
60
|
-
default:
|
|
61
|
-
t.isCollective ? (
|
|
60
|
+
v(D, { name: "fade-collectif" }, {
|
|
61
|
+
default: r(() => [
|
|
62
|
+
t.isCollective ? (d(), p("div", ce, [
|
|
62
63
|
e("div", {
|
|
63
64
|
class: "header",
|
|
64
65
|
role: "heading",
|
|
65
66
|
titleLevel: t.titleLevel + 1
|
|
66
|
-
}, "🌍 " + a(
|
|
67
|
-
e("p",
|
|
67
|
+
}, "🌍 " + a(o.$t("calcul-impact.yourCollectiveImpact")), 9, ue),
|
|
68
|
+
e("p", ve, a(o.$t("calcul-impact.consumptionForAYear")), 1),
|
|
68
69
|
e("p", null, [
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
translation:
|
|
70
|
+
n[2] || (n[2] = _(" ⚡ ", -1)),
|
|
71
|
+
v(i, {
|
|
72
|
+
translation: o.$t("calcul-impact.collectiveConsumption")
|
|
72
73
|
}, {
|
|
73
|
-
energy:
|
|
74
|
-
e("span",
|
|
74
|
+
energy: r(() => [
|
|
75
|
+
e("span", de, a(t.byYearForAMillion.collectiveAnnualEnergy), 1)
|
|
75
76
|
]),
|
|
76
|
-
homes:
|
|
77
|
-
e("span",
|
|
77
|
+
homes: r(() => [
|
|
78
|
+
e("span", me, a(t.byYearForAMillion.equivalentPopulationByCity), 1)
|
|
78
79
|
]),
|
|
79
80
|
_: 1
|
|
80
81
|
}, 8, ["translation"])
|
|
81
82
|
]),
|
|
82
83
|
e("p", null, [
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
translation:
|
|
84
|
+
n[3] || (n[3] = _(" 🍽️ ", -1)),
|
|
85
|
+
v(i, {
|
|
86
|
+
translation: o.$t("calcul-impact.collectiveDuration")
|
|
86
87
|
}, {
|
|
87
|
-
number:
|
|
88
|
-
e("span",
|
|
88
|
+
number: r(() => [
|
|
89
|
+
e("span", pe, a(t.byYearForAMillion.collectiveMicrowavesDuration), 1)
|
|
89
90
|
]),
|
|
90
91
|
_: 1
|
|
91
92
|
}, 8, ["translation"])
|
|
92
93
|
]),
|
|
93
94
|
e("p", null, [
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
translation:
|
|
95
|
+
n[4] || (n[4] = _(" ✈️ ", -1)),
|
|
96
|
+
v(i, {
|
|
97
|
+
translation: o.$t("calcul-impact.planeKilometers")
|
|
97
98
|
}, {
|
|
98
|
-
kilometers:
|
|
99
|
-
e("span",
|
|
99
|
+
kilometers: r(() => [
|
|
100
|
+
e("span", be, a(t.byYearForAMillion.kilometerByPlane), 1)
|
|
100
101
|
]),
|
|
101
102
|
_: 1
|
|
102
103
|
}, 8, ["translation"])
|
|
@@ -108,89 +109,94 @@ const x = {}, J = {}, X = {
|
|
|
108
109
|
], 64);
|
|
109
110
|
};
|
|
110
111
|
}
|
|
111
|
-
}),
|
|
112
|
+
}), ye = ".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}", ge = /* @__PURE__ */ z(fe, [["styles", [ye]], ["__scopeId", "data-v-b69dd4ff"]]), _e = { class: "container" }, Ce = ["arial-level"], he = { for: "numberOfConversation" }, ke = { for: "numberOfImage" }, Ie = { class: "legals" }, we = /* @__PURE__ */ j({
|
|
112
113
|
__name: "CalculImpact.ce",
|
|
113
114
|
props: {
|
|
114
115
|
titleLevel: { type: Number }
|
|
115
116
|
},
|
|
116
|
-
setup(
|
|
117
|
-
const
|
|
117
|
+
setup(t, { expose: o }) {
|
|
118
|
+
const i = t.titleLevel ?? 2, b = l(10), f = l(2), w = l(0), $ = l(0), B = l(0), c = l(!1), y = l(!1);
|
|
118
119
|
function q() {
|
|
119
|
-
b.value = 10, f.value = 2,
|
|
120
|
+
b.value = 10, f.value = 2, u.value = {}, m.value = {}, w.value = 0, $.value = 0, B.value = 0, c.value = !1, y.value = !1, k.value = 0, F.value = 0, g.value = 0, A.value = 0, L.value = 0;
|
|
120
121
|
}
|
|
121
122
|
const h = {
|
|
122
123
|
text: { energy: 2.9, co2: 1.5 },
|
|
123
124
|
image: { energy: 32, co2: 20 }
|
|
124
|
-
},
|
|
125
|
+
}, u = l({}), m = l({}), k = l(0), F = l(0), g = l(0), A = l(0), L = l(0);
|
|
125
126
|
function P() {
|
|
126
|
-
k.value = b.value * h.text.energy + f.value * h.image.energy, F.value = b.value * h.text.co2 + f.value * h.image.co2, w.value = Number((k.value / 0.8).toFixed(1)),
|
|
127
|
+
k.value = b.value * h.text.energy + f.value * h.image.energy, F.value = b.value * h.text.co2 + f.value * h.image.co2, w.value = Number((k.value / 0.8).toFixed(1)), u.value.energyByWeek = k.value.toFixed(1), u.value.personalMicrowavesDuration = w.value, u.value.co2ByWeek = F.value.toFixed(1);
|
|
127
128
|
}
|
|
128
129
|
function M() {
|
|
129
|
-
g.value =
|
|
130
|
+
g.value = u.value.energyByWeek * 52 * 1e6 / 1e3, A.value = u.value.co2ByWeek * 52 * 1e6 / 1e6, L.value = Math.round(g.value / 2300), $.value = g.value / 0.8, B.value = A.value * 2410, m.value.collectiveMicrowavesDuration = $.value.toLocaleString(), m.value.kilometerByPlane = B.value.toLocaleString(), m.value.equivalentPopulationByCity = L.value.toLocaleString(), m.value.collectiveAnnualEnergy = g.value.toLocaleString();
|
|
130
131
|
}
|
|
131
132
|
function S() {
|
|
132
|
-
P(),
|
|
133
|
+
P(), c.value = !0;
|
|
133
134
|
}
|
|
134
135
|
function R() {
|
|
135
136
|
M(), y.value = !0;
|
|
136
137
|
}
|
|
137
138
|
function W() {
|
|
138
|
-
|
|
139
|
+
c.value && y.value && (P(), M());
|
|
139
140
|
}
|
|
140
|
-
return
|
|
141
|
+
return o({
|
|
141
142
|
reset: q
|
|
142
|
-
}), (
|
|
143
|
+
}), (s, I) => (d(), p("div", _e, [
|
|
143
144
|
e("div", {
|
|
144
145
|
class: "title",
|
|
145
146
|
role: "heading",
|
|
146
|
-
"arial-level":
|
|
147
|
-
}, "📊 " + a(
|
|
148
|
-
e("p", null, a(
|
|
149
|
-
e("label",
|
|
150
|
-
|
|
147
|
+
"arial-level": E(i)
|
|
148
|
+
}, "📊 " + a(s.$t("calcul-impact.title")), 9, Ce),
|
|
149
|
+
e("p", null, a(s.$t("calcul-impact.subtitle")), 1),
|
|
150
|
+
e("label", he, "🤖 " + a(s.$t("calcul-impact.numberOfConversationLabel")), 1),
|
|
151
|
+
N(e("input", {
|
|
151
152
|
onChange: W,
|
|
152
153
|
type: "number",
|
|
153
154
|
id: "numberOfConversation",
|
|
154
|
-
"onUpdate:modelValue": I[0] || (I[0] = (
|
|
155
|
+
"onUpdate:modelValue": I[0] || (I[0] = (O) => b.value = O)
|
|
155
156
|
}, null, 544), [
|
|
156
|
-
[
|
|
157
|
+
[x, b.value]
|
|
157
158
|
]),
|
|
158
|
-
e("label",
|
|
159
|
-
|
|
159
|
+
e("label", ke, "🖼️ " + a(s.$t("calcul-impact.numberOfImagesLabel")), 1),
|
|
160
|
+
N(e("input", {
|
|
160
161
|
onChange: W,
|
|
161
162
|
type: "number",
|
|
162
163
|
id: "numberOfImage",
|
|
163
|
-
"onUpdate:modelValue": I[1] || (I[1] = (
|
|
164
|
+
"onUpdate:modelValue": I[1] || (I[1] = (O) => f.value = O)
|
|
164
165
|
}, null, 544), [
|
|
165
|
-
[
|
|
166
|
+
[x, f.value]
|
|
166
167
|
]),
|
|
167
|
-
|
|
168
|
+
c.value ? (d(), G(ge, {
|
|
168
169
|
key: 0,
|
|
169
170
|
"is-collective": y.value,
|
|
170
|
-
"is-personal":
|
|
171
|
-
"title-level":
|
|
172
|
-
"by-week-for-one":
|
|
171
|
+
"is-personal": c.value,
|
|
172
|
+
"title-level": E(i),
|
|
173
|
+
"by-week-for-one": u.value,
|
|
173
174
|
"by-year-for-a-million": m.value
|
|
174
175
|
}, null, 8, ["is-collective", "is-personal", "title-level", "by-week-for-one", "by-year-for-a-million"])) : C("", !0),
|
|
175
|
-
|
|
176
|
+
c.value ? C("", !0) : (d(), p("button", {
|
|
176
177
|
key: 1,
|
|
177
178
|
onClick: S
|
|
178
|
-
}, "📌 " + a(
|
|
179
|
-
|
|
179
|
+
}, "📌 " + a(s.$t("calcul-impact.seePersonalImpact")), 1)),
|
|
180
|
+
c.value && !y.value ? (d(), p("button", {
|
|
180
181
|
key: 2,
|
|
181
182
|
onClick: R
|
|
182
|
-
}, "🌍 " + a(
|
|
183
|
-
e("p",
|
|
183
|
+
}, "🌍 " + a(s.$t("calcul-impact.seeCollectiveImpact")), 1)) : C("", !0),
|
|
184
|
+
e("p", Ie, "📝 " + a(s.$t("calcul-impact.legals")), 1)
|
|
184
185
|
]));
|
|
185
186
|
}
|
|
186
|
-
}),
|
|
187
|
-
H(/* @__PURE__ */ Object.assign({ "./locales/en.json":
|
|
188
|
-
|
|
189
|
-
configureApp(
|
|
190
|
-
|
|
191
|
-
i18next:
|
|
187
|
+
}), $e = "[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%}}", Be = /* @__PURE__ */ z(we, [["styles", [$e]], ["__scopeId", "data-v-7fbb31b5"]]);
|
|
188
|
+
H(/* @__PURE__ */ Object.assign({ "./locales/en.json": X, "./locales/es-419.json": Z, "./locales/es.json": ee, "./locales/fr.json": te, "./locales/it.json": ae, "./locales/nl.json": le })).catch((t) => console.error(t));
|
|
189
|
+
const Y = K(Be, {
|
|
190
|
+
configureApp(t) {
|
|
191
|
+
V.changeLanguage(document?.documentElement?.lang || navigator.language), t.use(Q, {
|
|
192
|
+
i18next: V,
|
|
192
193
|
slotStart: "{{",
|
|
193
194
|
slotEnd: "}}"
|
|
194
195
|
});
|
|
195
196
|
}
|
|
196
|
-
})
|
|
197
|
+
});
|
|
198
|
+
Y.prototype.normalizeProps = (t) => ({
|
|
199
|
+
...t,
|
|
200
|
+
titleLevel: J(t.titleLevel)
|
|
201
|
+
});
|
|
202
|
+
window.customElements.define("calcul-impact", Y);
|