@1024pix/epreuves-components 2.7.0 → 2.8.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 (37) hide show
  1. package/dist/{ButtonTooltip.ce-DEM9f3-P.js → ButtonTooltip.ce-B-f0Ebfa.js} +1 -1
  2. package/dist/{LLMMessage.ce-DwOPdJ8T.js → LLMMessage.ce-DAA_BQYY.js} +2 -2
  3. package/dist/{Loading.ce-izx3gVg1.js → Loading.ce-BPbyGkTl.js} +1 -1
  4. package/dist/{NavigationButton.ce-D6OhsRmN.js → NavigationButton.ce-D7sjcUuO.js} +2 -2
  5. package/dist/{Retry-ByvFpG1J.js → Retry-CTdYYKx5.js} +1 -1
  6. package/dist/{_plugin-vue_export-helper-BcRm04ZH.js → _plugin-vue_export-helper-CGJjSxi7.js} +4 -4
  7. package/dist/components/calcul-impact.ce.js.js +2 -2
  8. package/dist/components/capacity-calculation.ce.js.js +3 -3
  9. package/dist/components/clickable-image.ce.js.js +4 -4
  10. package/dist/components/complete-phrase.ce.js.js +5 -5
  11. package/dist/components/flip-cards.ce.js.js +1 -1
  12. package/dist/components/image-quiz.ce.js.js +4 -3
  13. package/dist/components/image-quizzes.ce.js.js +8 -7
  14. package/dist/components/llm-compare-messages.ce.js.js +3 -3
  15. package/dist/components/llm-messages.ce.js.js +3 -3
  16. package/dist/components/llm-prompt-select.ce.js.js +1 -1
  17. package/dist/components/message-conversation.ce.js.js +2 -2
  18. package/dist/components/mobile-shell.ce.js.js +1 -1
  19. package/dist/components/phishing-message.ce.js.js +2 -2
  20. package/dist/components/phishing-notification.ce.js.js +3 -3
  21. package/dist/components/pix-anonymisation.ce.js.js +2 -2
  22. package/dist/components/pix-article.ce.js.js +2 -2
  23. package/dist/components/pix-carousel.ce.js.js +4 -4
  24. package/dist/components/pix-cursor.ce.js.js +3 -3
  25. package/dist/components/qcm-deepfake.ce.js.js +3 -3
  26. package/dist/components/quiz-stepper.ce.js.js +56 -56
  27. package/dist/components/select-conversation.ce.js.js +2 -2
  28. package/dist/components/template-mail.ce.js.js +165 -0
  29. package/dist/components/test-top-mdp.ce.js.js +146 -0
  30. package/dist/{i18n-DTnP_5xC.js → i18n-BkraEFZL.js} +1 -1
  31. package/dist/i18n-lite-J-aj5pZd.js +86 -0
  32. package/dist/{image-quiz.ce-DWyp9j81.js → image-quiz.ce-BFISPs8m.js} +102 -153
  33. package/dist/index.js +4 -2
  34. package/dist/metadata.js +21 -13
  35. package/dist/schema.js +38 -14
  36. package/dist/{shadow-dom-C8cgdiLH.js → shadow-dom-DN_6ctXp.js} +1 -1
  37. package/package.json +1 -1
@@ -0,0 +1,165 @@
1
+ import { b as v, a as b, u as x } from "../normalize-props-DtfVI0Xg.js";
2
+ import { c as p, o as m, a as e, d as C, q as w, v as _, h as i, t as o, B as y, E as k, H as M, F as L, _ as H, f as T } from "../_plugin-vue_export-helper-CGJjSxi7.js";
3
+ import { u as j, i as l } from "../i18n-lite-J-aj5pZd.js";
4
+ import { r as D, t as S } from "../temporal.utils-CotrC6ao.js";
5
+ const z = {
6
+ "template-mail": { send: "Répondre", forward: "Transférer", menu: "menu", toMe: "À moi", details: "Afficher les détails", previousHeader: "Le {{ date }} à {{time}}, {{ name }}" }
7
+ }, B = "data:image/svg+xml,%3csvg%20width='17'%20height='17'%20viewBox='0%200%2017%2017'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M2.125%204.25H14.875M2.125%208.5H14.875M2.125%2012.75H14.875'%20stroke='black'%20stroke-width='1.77083'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e", V = "data:image/svg+xml,%3csvg%20width='18'%20height='16'%20viewBox='0%200%2018%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M0.75%206.28086H11.95C18.35%206.28086%2018.35%2014.9722%2011.95%2014.9722M0.75%206.28086L6.35%200.75M0.75%206.28086L6.35%2011.8117'%20stroke='%23122647'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e", E = "data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_2744_7877)'%3e%3cpath%20d='M8.57141%202.85714L5.14284%206.28571L8.57141%209.71429'%20stroke='%23122647'%20stroke-width='1.14286'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M15.4286%2013.1429V10.8571C15.4286%209.64472%2014.9469%208.48196%2014.0896%207.62465C13.2323%206.76735%2012.0696%206.28571%2010.8571%206.28571H5.14285M4%202.85714L0.571426%206.28571L4%209.71429'%20stroke='%23122647'%20stroke-width='1.14286'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_2744_7877'%3e%3crect%20width='16'%20height='16'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e", N = "data:image/svg+xml,%3csvg%20width='8'%20height='4'%20viewBox='0%200%208%204'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M0%200L3.53%203.38803L7.06%200H0Z'%20fill='black'/%3e%3c/svg%3e", q = {
8
+ width: "41",
9
+ height: "41",
10
+ viewBox: "0 0 41 41",
11
+ xmlns: "http://www.w3.org/2000/svg"
12
+ }, Z = ["fill"], A = {
13
+ __name: "UserSVG.ce",
14
+ props: {
15
+ color: {
16
+ type: String,
17
+ default: "#2F80ED"
18
+ }
19
+ },
20
+ setup(t) {
21
+ return (a, r) => (m(), p("svg", q, [
22
+ r[0] || (r[0] = e("path", {
23
+ d: "M9 33.5484C9.02496 31.6445 9.79268 29.8271 11.1371 28.4893C12.4815 27.1515 14.2944 26.4009 16.1837 26.3999H24.8163C26.7056 26.4009 28.5185 27.1515 29.8629 28.4893C31.2073 29.8271 31.975 31.6445 32 33.5484C28.8446 36.4141 24.7476 38 20.5 38C16.2524 38 12.1554 36.4141 9 33.5484ZM26.9744 15.525C26.9744 16.8155 26.5947 18.077 25.8833 19.1501C25.1719 20.2231 24.1607 21.0594 22.9776 21.5533C21.7946 22.0471 20.4928 22.1763 19.2369 21.9246C17.981 21.6728 16.8274 21.0514 15.9219 20.1388C15.0164 19.2263 14.3998 18.0637 14.15 16.7979C13.9002 15.5322 14.0284 14.2203 14.5184 13.028C15.0085 11.8357 15.8383 10.8166 16.903 10.0997C17.9677 9.38268 19.2195 9 20.5 9C22.2171 9 23.8639 9.68745 25.0781 10.9111C26.2923 12.1348 26.9744 13.7944 26.9744 15.525Z",
24
+ fill: "white"
25
+ }, null, -1)),
26
+ e("path", {
27
+ d: "M36.2655 33.5758C38.3699 31.0459 39.8335 28.0469 40.5326 24.8323C41.2316 21.6177 41.1455 18.2822 40.2815 15.1079C39.4175 11.9336 37.8011 9.0139 35.569 6.59581C33.3368 4.17772 30.5547 2.33238 27.4578 1.21587C24.3609 0.0993725 21.0405 -0.255438 17.7774 0.181459C14.5142 0.618355 11.4044 1.83411 8.71099 3.72586C6.01756 5.61762 3.81975 8.12973 2.30349 11.0497C0.787232 13.9696 -0.00287585 17.2115 7.86538e-06 20.5011C0.00111445 25.2832 1.6877 29.9122 4.7638 33.5758L4.7345 33.6007C4.83707 33.7237 4.9543 33.8291 5.0598 33.9506C5.19168 34.1014 5.33382 34.2435 5.47009 34.3899C5.88039 34.835 6.3024 35.2625 6.74493 35.6637C6.87974 35.7866 7.01895 35.9008 7.15522 36.018C7.62413 36.4221 8.10623 36.8057 8.6059 37.1629C8.67038 37.2068 8.72899 37.264 8.79347 37.3093V37.2918C12.2254 39.7049 16.3196 41 20.5161 41C24.7127 41 28.8068 39.7049 32.2388 37.2918V37.3093C32.3033 37.264 32.3604 37.2068 32.4263 37.1629C32.9246 36.8042 33.4081 36.4221 33.877 36.018C34.0133 35.9008 34.1525 35.7852 34.2873 35.6637C34.7298 35.261 35.1519 34.835 35.5622 34.3899C35.6984 34.2435 35.8391 34.1014 35.9725 33.9506C36.0765 33.8291 36.1952 33.7237 36.2978 33.5992L36.2655 33.5758ZM20.5147 8.78808C21.8188 8.78808 23.0937 9.1745 24.1781 9.89846C25.2625 10.6224 26.1076 11.6514 26.6067 12.8553C27.1058 14.0592 27.2364 15.384 26.982 16.662C26.7275 17.9401 26.0995 19.1141 25.1773 20.0355C24.2551 20.9569 23.0802 21.5844 21.8011 21.8387C20.522 22.0929 19.1961 21.9624 17.9912 21.4637C16.7864 20.9651 15.7565 20.1206 15.032 19.0371C14.3074 17.9536 13.9207 16.6798 13.9207 15.3767C13.9207 13.6293 14.6154 11.9534 15.852 10.7178C17.0886 9.48224 18.7658 8.78808 20.5147 8.78808ZM8.80226 33.5758C8.82768 31.6534 9.60958 29.8182 10.9788 28.4674C12.348 27.1165 14.1945 26.3586 16.1187 26.3576H24.9107C26.8349 26.3586 28.6813 27.1165 30.0505 28.4674C31.4197 29.8182 32.2016 31.6534 32.2271 33.5758C29.0134 36.4694 24.8407 38.0708 20.5147 38.0708C16.1886 38.0708 12.016 36.4694 8.80226 33.5758Z",
28
+ fill: t.color
29
+ }, null, 8, Z)
30
+ ]));
31
+ }
32
+ }, F = { class: "nav" }, O = { "aria-disabled": "true" }, P = ["src"], R = { class: "sr-only-mobile" }, $ = { "aria-disabled": "true" }, G = ["src"], I = { class: "sr-only-mobile" }, U = { "aria-disabled": "true" }, X = ["src"], J = { class: "sr-only" }, K = { class: "main" }, Q = { class: "header" }, W = ["aria-level"], Y = { class: "date" }, ee = { class: "expeditor" }, te = ["aria-level"], ie = { class: "expeditor-mail" }, oe = { class: "recipient" }, ae = ["aria-label"], se = ["src"], ne = ["innerHTML"], re = {
33
+ key: 0,
34
+ class: "previous-message"
35
+ }, le = { class: "previous-message__header" }, de = ["innerHTML"], ce = /* @__PURE__ */ C({
36
+ __name: "TemplateMail.ce",
37
+ props: {
38
+ titleLevel: { default: 2, type: Number },
39
+ subject: { type: String },
40
+ mailAddress: { type: String },
41
+ avatarColor: { type: String },
42
+ expeditor: { type: String },
43
+ time: { type: Object },
44
+ content: { type: String },
45
+ previousMail: { type: Object }
46
+ },
47
+ setup(t) {
48
+ const { t: a } = j(), r = w("content");
49
+ _(() => {
50
+ r.value.querySelectorAll("a").forEach((s) => {
51
+ s.addEventListener("click", (c) => {
52
+ c.preventDefault();
53
+ });
54
+ });
55
+ });
56
+ function d(n, s) {
57
+ const c = D(n), f = S(c);
58
+ return new Intl.DateTimeFormat(l.language, s).format(f);
59
+ }
60
+ const g = d(t.time, {
61
+ weekday: "short",
62
+ day: "numeric",
63
+ month: "numeric",
64
+ year: "2-digit",
65
+ hour: "2-digit",
66
+ minute: "2-digit"
67
+ });
68
+ function h() {
69
+ const n = d(t.previousMail.time, {
70
+ weekday: "short",
71
+ day: "numeric",
72
+ month: "numeric",
73
+ year: "2-digit"
74
+ }), s = d(t.previousMail.time, {
75
+ hour: "2-digit",
76
+ minute: "2-digit"
77
+ });
78
+ return a("template-mail.previousHeader", { name: t.previousMail.name, time: s, date: n, interpolation: { escapeValue: !1 } });
79
+ }
80
+ return (n, s) => (m(), p(L, null, [
81
+ e("div", F, [
82
+ e("button", O, [
83
+ e("img", {
84
+ src: i(V),
85
+ alt: ""
86
+ }, null, 8, P),
87
+ e("span", R, o(i(a)("template-mail.send")), 1)
88
+ ]),
89
+ e("button", $, [
90
+ e("img", {
91
+ class: "forward",
92
+ src: i(E),
93
+ alt: ""
94
+ }, null, 8, G),
95
+ e("span", I, o(i(a)("template-mail.forward")), 1)
96
+ ]),
97
+ e("button", U, [
98
+ e("img", {
99
+ src: i(B),
100
+ alt: ""
101
+ }, null, 8, X),
102
+ e("span", J, o(i(a)("template-mail.menu")), 1)
103
+ ])
104
+ ]),
105
+ e("div", K, [
106
+ e("div", Q, [
107
+ e("div", {
108
+ role: "heading",
109
+ "aria-level": t.titleLevel
110
+ }, o(t.subject), 9, W),
111
+ e("p", Y, o(i(g)), 1)
112
+ ]),
113
+ e("div", ee, [
114
+ k(A, {
115
+ class: "avatar",
116
+ color: t.avatarColor
117
+ }, null, 8, ["color"]),
118
+ e("div", {
119
+ role: "heading",
120
+ "aria-level": t.titleLevel + 1
121
+ }, [
122
+ M(o(t.expeditor) + " ", 1),
123
+ e("span", ie, " <" + o(t.mailAddress) + ">", 1)
124
+ ], 8, te),
125
+ e("div", oe, [
126
+ e("p", null, o(i(a)("template-mail.toMe")), 1),
127
+ e("button", {
128
+ "aria-disabled": "true",
129
+ "aria-label": i(a)("template-mail.details")
130
+ }, [
131
+ e("img", {
132
+ src: i(N),
133
+ alt: ""
134
+ }, null, 8, se)
135
+ ], 8, ae)
136
+ ])
137
+ ]),
138
+ e("p", {
139
+ ref: "content",
140
+ class: "content",
141
+ innerHTML: t.content
142
+ }, null, 8, ne),
143
+ t.previousMail ? (m(), p("div", re, [
144
+ e("p", le, o(h()), 1),
145
+ e("blockquote", {
146
+ innerHTML: t.previousMail.content
147
+ }, null, 8, de)
148
+ ])) : y("", !0)
149
+ ])
150
+ ], 64));
151
+ }
152
+ }), pe = "html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}table{border-collapse:collapse;border-spacing:0}button,p,div[role=heading]{font-family:Roboto,sans-serif;color:#253858}.nav{border-radius:8px 8px 0 0;padding:12px 16px;display:flex;gap:8px;background:#fff;border-right:1px solid #cdd1d9;border-top:1px solid #cdd1d9;border-left:1px solid #cdd1d9}.nav button{display:flex;gap:8px;align-items:center;cursor:not-allowed;padding:4px 16px;border:1px solid #cdd1d9;background:#fff;border-radius:8px;color:#122647;font-size:.875rem;font-weight:700}.nav button:last-child{margin-left:auto}.nav .forward{transform:scaleX(-1)}.main{border-radius:0 0 8px 8px;border-right:1px solid #cdd1d9;border-bottom:1px solid #cdd1d9;border-left:1px solid #cdd1d9;background:#f4f5f7;padding:24px 16px}.header{display:flex;justify-content:space-between}.header div[role]{font-family:open-sans,sans-serif;font-size:1.125rem}.header .date{color:#5e6c84;font-size:.75rem}.expeditor{display:grid;column-gap:4px;width:fit-content;margin:12px 0;grid-template-columns:repeat(2,auto);grid-template-rows:repeat(2,auto)}.expeditor div[role]{font-weight:700}.expeditor-mail,.expeditor .recipient p{align-self:end;font-size:.75rem;color:#5e6c84;font-weight:400;word-break:break-word}.expeditor .recipient{display:flex}.expeditor .recipient button{border:none;background:transparent;display:flex;align-items:center;cursor:not-allowed}.expeditor .avatar{grid-row:1/span 2;margin-right:12px}.content{color:#122647;font-size:.875rem}.previous-message{font-size:.875rem;margin-top:24px}.previous-message__header{font-style:italic;font-size:.875rem;color:#5e6c84;margin-bottom:8px}.previous-message blockquote{border-left:1px solid #cdd1d9;margin-left:8px;padding-left:8px}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);border:0}@media screen and (max-width:576px){.sr-only-mobile{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);border:0}.date{display:none}}", me = /* @__PURE__ */ H(ce, [["styles", [pe]]]);
153
+ l.addTranslationsFromGlobResults(/* @__PURE__ */ Object.assign({ "./locales/fr.json": z }));
154
+ const u = T(me, {
155
+ configureApp(t) {
156
+ l.changeLanguage(document?.documentElement?.lang || navigator.language), t.use(l);
157
+ }
158
+ });
159
+ u.prototype.normalizeProps = (t) => ({
160
+ ...t,
161
+ titleLevel: x(t.titleLevel),
162
+ avatarColor: b(t.avatarColor),
163
+ previousMail: v(t.previousMail)
164
+ });
165
+ window.customElements.define("template-mail", u);
@@ -0,0 +1,146 @@
1
+ import { d as I, y as a, r as z, G as N, c as l, o as i, a as e, B as b, t as s, A as P, F as m, b as F, n as V, H as _, h as w, E, K as A, _ as H, f as R } from "../_plugin-vue_export-helper-CGJjSxi7.js";
2
+ import { u as S, i as k } from "../i18n-lite-J-aj5pZd.js";
3
+ const U = {
4
+ "test-top-mdp": { passwords: { title: "Top {{count}} des mots de passe en France", cta: "Cliquez sur un mot de passe pour le tester" }, loginForm: { title: "Connexion", login: "Identifiant", loginValue: "Ulysse", password: "Mot de passe", passwordPlaceholder: "Séléctionnez un mot de passe...", submit: "Tester", attemptsCount: "Nombre d’essais : {{count}}" }, feedback: { negative: { title: "Eh non !", content: "Mot de passe incorrect. Réessayez avec un autre mot de passe." }, positive: { title_one: "Vous avez trouvé le mot de passe d’Ulysse en un essai.", title_other: "Vous avez trouvé le mot de passe d’Ulysse en {{count}} essais.", content: `Les pirates ont des listes contenant les mots de passe les plus fréquents, tous les mots du dictionnaire, des prénoms.
5
+ Ils utilisent des programmes informatiques qui permettent de tester des millions de mots en quelques secondes : on appelle ça une attaque par dictionnaire.` } } }
6
+ }, G = "data:image/svg+xml,%3csvg%20width='18'%20height='18'%20viewBox='0%200%2018%2018'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M9%2011.25V12.75M4.5%2015.75H13.5C13.8978%2015.75%2014.2794%2015.592%2014.5607%2015.3107C14.842%2015.0294%2015%2014.6478%2015%2014.25V9.75C15%209.35218%2014.842%208.97064%2014.5607%208.68934C14.2794%208.40804%2013.8978%208.25%2013.5%208.25H4.5C4.10218%208.25%203.72064%208.40804%203.43934%208.68934C3.15804%208.97064%203%209.35218%203%209.75V14.25C3%2014.6478%203.15804%2015.0294%203.43934%2015.3107C3.72064%2015.592%204.10218%2015.75%204.5%2015.75ZM12%208.25V5.25C12%204.45435%2011.6839%203.69129%2011.1213%203.12868C10.5587%202.56607%209.79565%202.25%209%202.25C8.20435%202.25%207.44129%202.56607%206.87868%203.12868C6.31607%203.69129%206%204.45435%206%205.25V8.25H12Z'%20stroke='white'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e", Z = "data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M19.5%207L9.5%2017L4.5%2012'%20stroke='%23007740'%20stroke-width='1.6'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e", D = "data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M16.875%207.125L7.125%2016.875M7.125%207.125L16.875%2016.875'%20stroke='%23A94B0C'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e", K = { class: "container" }, O = { class: "card" }, J = ["arial-level"], Q = ["onClick", "aria-disabled", "aria-selected"], W = { class: "password" }, X = { class: "card" }, Y = ["arial-level"], ee = { class: "lock-icon" }, te = ["src"], oe = { class: "form" }, se = { class: "form__field" }, ne = { for: "login" }, ae = ["value"], le = { class: "form__field" }, ie = { for: "password" }, re = ["value", "placeholder"], de = ["src"], ce = ["aria-disabled"], pe = { class: "attempts-count" }, ue = { class: "attempts-count__count" }, fe = {
7
+ key: 0,
8
+ class: "feedback",
9
+ "aria-live": "polite"
10
+ }, me = ["arial-level"], ge = { class: "feedback__content" }, ve = { key: 0 }, xe = /* @__PURE__ */ I({
11
+ __name: "TestTopMdp.ce",
12
+ props: {
13
+ titleLevel: { type: Number },
14
+ passwords: { type: Array },
15
+ expectedPassword: { type: String }
16
+ },
17
+ setup(g, { expose: M }) {
18
+ const c = g, { t: p } = S(), v = a(() => c.titleLevel ?? 2), n = z(), d = z([]), x = a(() => d.value.at(-1)), h = a(() => c.passwords.map((t) => ({
19
+ password: t,
20
+ selected: t === n.value,
21
+ attempted: d.value.includes(t),
22
+ expected: t === c.expectedPassword
23
+ }))), y = a(() => d.value.length), u = a(() => x.value !== void 0 && n.value === void 0), r = a(() => x.value === c.expectedPassword), L = a(() => r.value ? p("test-top-mdp.feedback.positive.title", { count: y.value }) : p("test-top-mdp.feedback.negative.title")), T = a(() => r.value ? p("test-top-mdp.feedback.positive.content") : p("test-top-mdp.feedback.negative.content"));
24
+ function $(t) {
25
+ r.value || t.attempted || (n.value = t.password);
26
+ }
27
+ function B() {
28
+ n.value && (d.value.push(n.value), n.value = void 0);
29
+ }
30
+ function j() {
31
+ n.value = void 0, d.value = [];
32
+ }
33
+ return M({
34
+ reset: j
35
+ }), (t, C) => {
36
+ const q = N("i18next");
37
+ return i(), l(m, null, [
38
+ e("div", K, [
39
+ e("div", O, [
40
+ e("div", {
41
+ class: "title",
42
+ role: "heading",
43
+ "arial-level": v.value
44
+ }, s(t.$t("test-top-mdp.passwords.title", { count: h.value.length })), 9, J),
45
+ e("p", null, s(t.$t("test-top-mdp.passwords.cta")), 1),
46
+ e("div", {
47
+ class: "passwords",
48
+ style: P({ "--count-per-column": Math.round(h.value.length / 2) })
49
+ }, [
50
+ (i(!0), l(m, null, F(h.value, (o, f) => (i(), l("button", {
51
+ key: o.password,
52
+ onClick: (_e) => $(o),
53
+ class: V({
54
+ selected: o.selected || o.attempted && o.expected,
55
+ disabled: o.attempted && !o.expected
56
+ }),
57
+ "aria-disabled": r.value || o.attempted,
58
+ "aria-selected": o.selected
59
+ }, [
60
+ _(" #" + s(f + 1) + " ", 1),
61
+ e("span", W, s(o.password), 1)
62
+ ], 10, Q))), 128))
63
+ ], 4)
64
+ ]),
65
+ e("div", X, [
66
+ e("div", {
67
+ class: "title",
68
+ role: "heading",
69
+ "arial-level": v.value
70
+ }, [
71
+ e("div", ee, [
72
+ e("img", {
73
+ src: w(G),
74
+ alt: ""
75
+ }, null, 8, te)
76
+ ]),
77
+ _(" " + s(t.$t("test-top-mdp.loginForm.title")), 1)
78
+ ], 8, Y),
79
+ e("div", oe, [
80
+ e("div", se, [
81
+ e("label", ne, s(t.$t("test-top-mdp.loginForm.login")), 1),
82
+ e("input", {
83
+ id: "login",
84
+ type: "text",
85
+ value: t.$t("test-top-mdp.loginForm.loginValue"),
86
+ readonly: "",
87
+ tabIndex: "-1"
88
+ }, null, 8, ae)
89
+ ]),
90
+ e("div", le, [
91
+ e("label", ie, s(t.$t("test-top-mdp.loginForm.password")), 1),
92
+ e("input", {
93
+ id: "password",
94
+ type: "text",
95
+ value: n.value ?? x.value,
96
+ readonly: "",
97
+ placeholder: t.$t("test-top-mdp.loginForm.passwordPlaceholder"),
98
+ tabIndex: "-1",
99
+ class: V({ right: u.value && r.value, wrong: u.value && !r.value })
100
+ }, null, 10, re),
101
+ u.value ? (i(), l("img", {
102
+ key: 0,
103
+ src: r.value ? w(Z) : w(D),
104
+ alt: "",
105
+ class: "form__field-icon"
106
+ }, null, 8, de)) : b("", !0)
107
+ ]),
108
+ e("button", {
109
+ "aria-disabled": !n.value,
110
+ onClick: C[0] || (C[0] = (o) => B())
111
+ }, s(t.$t("test-top-mdp.loginForm.submit")), 9, ce),
112
+ e("p", pe, [
113
+ E(q, { name: "test-top-mdp.loginForm.attemptsCount" }, {
114
+ count: A(() => [
115
+ e("span", ue, s(y.value), 1)
116
+ ]),
117
+ _: 1
118
+ })
119
+ ])
120
+ ])
121
+ ])
122
+ ]),
123
+ u.value ? (i(), l("div", fe, [
124
+ e("div", {
125
+ class: "feedback__title",
126
+ role: "heading",
127
+ "arial-level": v.value + 1
128
+ }, s(L.value), 9, me),
129
+ e("div", ge, [
130
+ (i(!0), l(m, null, F(T.value.split(`
131
+ `), (o, f) => (i(), l(m, { key: f }, [
132
+ f !== 0 ? (i(), l("br", ve)) : b("", !0),
133
+ _(" " + s(o), 1)
134
+ ], 64))), 128))
135
+ ])
136
+ ])) : b("", !0)
137
+ ], 64);
138
+ };
139
+ }
140
+ }), he = "*{font-family:Roboto,sans-serif;color:#5e6c84;box-sizing:border-box;font-size:14px}p{margin:0}.container{display:flex;flex-direction:row;gap:16px}.card{background:#fff;border-radius:16px;box-shadow:0 2px 5px #4a3aff40,0 -2px 5px #4a3aff26 inset,0 1px 1px #ffffff1a inset,0 3px 4px #dfeeff1a inset;padding:24px;width:50%}.title{color:#122647;font-family:Nunito,Roboto,sans-serif;font-size:20px;font-weight:700;display:flex;align-items:center;gap:8px}.passwords{margin-top:16px;display:grid;grid-template-rows:repeat(var(--count-per-column, 5),1fr);grid-auto-flow:column;gap:8px}.passwords>button{display:flex;padding:8px 16px;gap:4px;border-radius:8px;background-color:#eaf1ff;border-style:none;cursor:pointer;height:44px;align-items:center;color:#122647}.passwords>button.selected{background-color:#3b82f6;color:#fff}.passwords>button.disabled{background-color:#f4f5f7;color:#5e6c84}.passwords>button[aria-disabled=true]{cursor:not-allowed}.lock-icon{border-radius:50%;background-color:#2c75ff;aspect-ratio:1;width:34px;display:flex;align-items:center;justify-content:center}.password{font-weight:700;line-height:20px;color:inherit}.form{margin-top:24px;display:flex;gap:16px;flex-direction:column}.form__field{display:flex;gap:8px;flex-direction:column;position:relative}.form__field-icon{aspect-ratio:1;width:24px;position:absolute;left:12px;bottom:12px}.form input{display:flex;height:50px;padding:12px 16px;align-items:center;border-radius:10px;border:1px solid #cdd1d9;background-color:#f4f5f7;font-size:16px;pointer-events:none;color:#122647}.form input.right{padding-left:40px;border-color:#00a85a;background-color:#e6f6ef;color:#007740}.form input.wrong{padding-left:40px;border-color:#d73328;background-color:#fbebea;color:#99241c}.form label{pointer-events:none}.form button{display:flex;height:50px;padding:12px 16px;align-items:center;border-radius:10px;background-color:#122647;font-size:16px;font-weight:700;color:#fff;justify-content:center;cursor:pointer;border-style:none}.form button[aria-disabled=true]{background-color:#cdd1d9;color:#5e6c84;cursor:not-allowed}.attempts-count{text-align:center}.attempts-count__count{color:#122647;font-weight:700}.feedback{margin-top:24px;display:flex;flex-direction:column}.feedback__title{color:#fff;padding:4px 8px;border-radius:8px 8px 0 0;background-color:#1f53b5;font-weight:700;align-self:start;font-size:12px}.feedback__content{border-radius:0 8px 8px;background-color:#eaf1ff;color:#122647;padding:8px}@media only screen and (max-width:680px){.container{flex-direction:column}.card{width:100%}}", be = /* @__PURE__ */ H(xe, [["styles", [he]]]);
141
+ k.addTranslationsFromGlobResults(/* @__PURE__ */ Object.assign({ "./locales/fr.json": U }));
142
+ window.customElements.define("test-top-mdp", R(be, {
143
+ configureApp(g) {
144
+ k.changeLanguage(document?.documentElement?.lang || navigator.language), g.use(k);
145
+ }
146
+ }));
@@ -1,4 +1,4 @@
1
- import { s as ve, k as Re, d as Ce, l as Pe } from "./_plugin-vue_export-helper-BcRm04ZH.js";
1
+ import { s as ve, l as Re, d as Ce, i as Pe } from "./_plugin-vue_export-helper-CGJjSxi7.js";
2
2
  const d = (o) => typeof o == "string", V = () => {
3
3
  let o, e;
4
4
  const t = new Promise((i, s) => {
@@ -0,0 +1,86 @@
1
+ import { d as f, i as g } from "./_plugin-vue_export-helper-CGJjSxi7.js";
2
+ const c = /* @__PURE__ */ Symbol("i18n-lite"), o = /* @__PURE__ */ Symbol("isPluralized"), a = /\{\{\s*(\w+)\s*}}/g;
3
+ class l {
4
+ static #i = "fr";
5
+ #e = l.#i;
6
+ /**
7
+ * @type {Record<string, Record<string, object>>}
8
+ */
9
+ #t = {};
10
+ /**
11
+ * @param {Record<string, object>} globResults
12
+ */
13
+ addTranslationsFromGlobResults(e) {
14
+ for (const [t, n] of Object.entries(e)) {
15
+ const r = t.match(/\/([^/]+)\.json$/)[1];
16
+ r in this.#t || (this.#t[r] = {}), Object.assign(this.#t[r], this.#n(n));
17
+ }
18
+ }
19
+ #n(e) {
20
+ return typeof e != "object" || e === null ? e : Array.isArray(e) ? e.map(this.#n, this) : Object.entries(e).reduce((t, [n, r]) => {
21
+ const { key: i, pluralTag: s } = /^(?<key>.*?)(_(?<pluralTag>zero|one|two|few|many|other))?$/.exec(n).groups, u = this.#n(r);
22
+ return s === void 0 ? { ...t, [i]: u } : i in t ? (t[i][s] = u, t) : { ...t, [i]: { [o]: !0, [s]: u } };
23
+ }, {});
24
+ }
25
+ /**
26
+ * @param {string} locale
27
+ */
28
+ changeLanguage(e) {
29
+ const t = Object.keys(this.#t), n = t.find((i) => new Intl.Locale(i).baseName === e);
30
+ if (n) {
31
+ this.#e = n;
32
+ return;
33
+ }
34
+ const r = t.find((i) => new Intl.Locale(i).language === e);
35
+ if (r) {
36
+ this.#e = r;
37
+ return;
38
+ }
39
+ }
40
+ get language() {
41
+ return this.#e;
42
+ }
43
+ /**
44
+ * @param {string} key
45
+ * @param {object=} options
46
+ */
47
+ t(e, t) {
48
+ return this.#r(e, t).split(a).reduce((r, i, s) => s % 2 === 0 ? r + i : r + t?.[i]);
49
+ }
50
+ #r(e, t) {
51
+ const n = this.#s(e);
52
+ return n[o] ? this.#u(n, t) : n;
53
+ }
54
+ #s(e) {
55
+ return e.split(".").reduce((t, n) => t?.[n], this.#t[this.#e]) ?? e;
56
+ }
57
+ #u(e, t) {
58
+ return t?.count == null ? e.other : e[this.#l.select(t.count)] ?? e.other;
59
+ }
60
+ get #l() {
61
+ return new Intl.PluralRules(this.#e);
62
+ }
63
+ /**
64
+ * @param {import('vue').App} app
65
+ */
66
+ install(e) {
67
+ const t = (n, r) => this.t(n, r);
68
+ e.config.globalProperties.$i18next = this, e.config.globalProperties.$t = t, e.provide(c, { i18next: this, t }), e.component("i18next", f({
69
+ props: {
70
+ name: {
71
+ type: String,
72
+ required: !0
73
+ }
74
+ },
75
+ setup: (n, { slots: r }) => () => this.#r(n.name).split(a).reduce((s, u, h) => h % 2 === 0 ? [...s, u] : [...s, ...r[u]?.() ?? [`{{${u}}}`]], [])
76
+ }));
77
+ }
78
+ }
79
+ const m = new l();
80
+ function b() {
81
+ return g(c);
82
+ }
83
+ export {
84
+ m as i,
85
+ b as u
86
+ };