quiz-mcp 0.0.3 → 0.0.5

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 (111) hide show
  1. package/bin/quiz-mcp +0 -0
  2. package/dist/cli.js +8 -8
  3. package/package.json +5 -5
  4. package/dist/client/_app/immutable/assets/0.BdUfdP7M.css +0 -1
  5. package/dist/client/_app/immutable/assets/0.BdUfdP7M.css.br +0 -0
  6. package/dist/client/_app/immutable/assets/0.BdUfdP7M.css.gz +0 -0
  7. package/dist/client/_app/immutable/chunks/BBbVH-DX.js +0 -2
  8. package/dist/client/_app/immutable/chunks/BBbVH-DX.js.br +0 -0
  9. package/dist/client/_app/immutable/chunks/BBbVH-DX.js.gz +0 -0
  10. package/dist/client/_app/immutable/chunks/BYAtt_Gu.js +0 -1
  11. package/dist/client/_app/immutable/chunks/BYAtt_Gu.js.br +0 -0
  12. package/dist/client/_app/immutable/chunks/BYAtt_Gu.js.gz +0 -0
  13. package/dist/client/_app/immutable/chunks/C9b1VZtB.js +0 -1
  14. package/dist/client/_app/immutable/chunks/C9b1VZtB.js.br +0 -0
  15. package/dist/client/_app/immutable/chunks/C9b1VZtB.js.gz +0 -0
  16. package/dist/client/_app/immutable/chunks/D1YF7ZTp.js +0 -3
  17. package/dist/client/_app/immutable/chunks/D1YF7ZTp.js.br +0 -0
  18. package/dist/client/_app/immutable/chunks/D1YF7ZTp.js.gz +0 -0
  19. package/dist/client/_app/immutable/chunks/DnSqigra.js +0 -1
  20. package/dist/client/_app/immutable/chunks/DnSqigra.js.br +0 -0
  21. package/dist/client/_app/immutable/chunks/DnSqigra.js.gz +0 -0
  22. package/dist/client/_app/immutable/chunks/DqK2eosW.js +0 -1
  23. package/dist/client/_app/immutable/chunks/DqK2eosW.js.br +0 -0
  24. package/dist/client/_app/immutable/chunks/DqK2eosW.js.gz +0 -0
  25. package/dist/client/_app/immutable/chunks/hqRb622q.js +0 -1
  26. package/dist/client/_app/immutable/chunks/hqRb622q.js.br +0 -0
  27. package/dist/client/_app/immutable/chunks/hqRb622q.js.gz +0 -0
  28. package/dist/client/_app/immutable/chunks/qgn7L4n5.js +0 -1
  29. package/dist/client/_app/immutable/chunks/qgn7L4n5.js.br +0 -0
  30. package/dist/client/_app/immutable/chunks/qgn7L4n5.js.gz +0 -0
  31. package/dist/client/_app/immutable/entry/app.C-XiElKe.js +0 -2
  32. package/dist/client/_app/immutable/entry/app.C-XiElKe.js.br +0 -0
  33. package/dist/client/_app/immutable/entry/app.C-XiElKe.js.gz +0 -0
  34. package/dist/client/_app/immutable/entry/start.g4Tza1tk.js +0 -1
  35. package/dist/client/_app/immutable/entry/start.g4Tza1tk.js.br +0 -2
  36. package/dist/client/_app/immutable/entry/start.g4Tza1tk.js.gz +0 -0
  37. package/dist/client/_app/immutable/nodes/0.-40b_uWW.js +0 -9
  38. package/dist/client/_app/immutable/nodes/0.-40b_uWW.js.br +0 -0
  39. package/dist/client/_app/immutable/nodes/0.-40b_uWW.js.gz +0 -0
  40. package/dist/client/_app/immutable/nodes/1.BYMGPEw4.js +0 -1
  41. package/dist/client/_app/immutable/nodes/1.BYMGPEw4.js.br +0 -0
  42. package/dist/client/_app/immutable/nodes/1.BYMGPEw4.js.gz +0 -0
  43. package/dist/client/_app/immutable/nodes/2.B9MLTE_H.js +0 -2
  44. package/dist/client/_app/immutable/nodes/2.B9MLTE_H.js.br +0 -0
  45. package/dist/client/_app/immutable/nodes/2.B9MLTE_H.js.gz +0 -0
  46. package/dist/client/_app/immutable/nodes/3.w4AbulQF.js +0 -1
  47. package/dist/client/_app/immutable/nodes/3.w4AbulQF.js.br +0 -0
  48. package/dist/client/_app/immutable/nodes/3.w4AbulQF.js.gz +0 -0
  49. package/dist/client/_app/immutable/nodes/4.CtJbmsnG.js +0 -4
  50. package/dist/client/_app/immutable/nodes/4.CtJbmsnG.js.br +0 -0
  51. package/dist/client/_app/immutable/nodes/4.CtJbmsnG.js.gz +0 -0
  52. package/dist/client/_app/version.json +0 -1
  53. package/dist/client/_app/version.json.br +0 -0
  54. package/dist/client/_app/version.json.gz +0 -0
  55. package/dist/client/robots.txt +0 -3
  56. package/dist/env.js +0 -94
  57. package/dist/handler.js +0 -1435
  58. package/dist/index.js +0 -345
  59. package/dist/server/chunks/0-BeZliozY.js +0 -44
  60. package/dist/server/chunks/0-BeZliozY.js.map +0 -1
  61. package/dist/server/chunks/1-CHg5uXQv.js +0 -9
  62. package/dist/server/chunks/1-CHg5uXQv.js.map +0 -1
  63. package/dist/server/chunks/2-NzZFDUaQ.js +0 -60
  64. package/dist/server/chunks/2-NzZFDUaQ.js.map +0 -1
  65. package/dist/server/chunks/3-DJAG62O1.js +0 -37
  66. package/dist/server/chunks/3-DJAG62O1.js.map +0 -1
  67. package/dist/server/chunks/4-Bba3MPnb.js +0 -37
  68. package/dist/server/chunks/4-Bba3MPnb.js.map +0 -1
  69. package/dist/server/chunks/_error.svelte-BHNrphys.js +0 -80
  70. package/dist/server/chunks/_error.svelte-BHNrphys.js.map +0 -1
  71. package/dist/server/chunks/_layout.svelte-BUJDEr5D.js +0 -104
  72. package/dist/server/chunks/_layout.svelte-BUJDEr5D.js.map +0 -1
  73. package/dist/server/chunks/_page.svelte-CRU5jaGZ.js +0 -653
  74. package/dist/server/chunks/_page.svelte-CRU5jaGZ.js.map +0 -1
  75. package/dist/server/chunks/_page.svelte-Cm8ocLsi.js +0 -572
  76. package/dist/server/chunks/_page.svelte-Cm8ocLsi.js.map +0 -1
  77. package/dist/server/chunks/_page.svelte-Dvh1k6R9.js +0 -71
  78. package/dist/server/chunks/_page.svelte-Dvh1k6R9.js.map +0 -1
  79. package/dist/server/chunks/_server.ts-BZp77VsF.js +0 -101
  80. package/dist/server/chunks/_server.ts-BZp77VsF.js.map +0 -1
  81. package/dist/server/chunks/_server.ts-C2NKc-VD.js +0 -219
  82. package/dist/server/chunks/_server.ts-C2NKc-VD.js.map +0 -1
  83. package/dist/server/chunks/_server.ts-CHyNcOmK.js +0 -39
  84. package/dist/server/chunks/_server.ts-CHyNcOmK.js.map +0 -1
  85. package/dist/server/chunks/_server.ts-CakPvrry.js +0 -51
  86. package/dist/server/chunks/_server.ts-CakPvrry.js.map +0 -1
  87. package/dist/server/chunks/_server.ts-uSNr19lE.js +0 -35
  88. package/dist/server/chunks/_server.ts-uSNr19lE.js.map +0 -1
  89. package/dist/server/chunks/client-Dw0t4rDL.js +0 -25
  90. package/dist/server/chunks/client-Dw0t4rDL.js.map +0 -1
  91. package/dist/server/chunks/exports-BNC8dbq3.js +0 -326
  92. package/dist/server/chunks/exports-BNC8dbq3.js.map +0 -1
  93. package/dist/server/chunks/hooks.server-B6FrjICA.js +0 -66
  94. package/dist/server/chunks/hooks.server-B6FrjICA.js.map +0 -1
  95. package/dist/server/chunks/hooks.universal-B3lncnqn.js +0 -6
  96. package/dist/server/chunks/hooks.universal-B3lncnqn.js.map +0 -1
  97. package/dist/server/chunks/html-FW6Ia4bL.js +0 -8
  98. package/dist/server/chunks/html-FW6Ia4bL.js.map +0 -1
  99. package/dist/server/chunks/index-Ch5Bqlgz.js +0 -1411
  100. package/dist/server/chunks/index-Ch5Bqlgz.js.map +0 -1
  101. package/dist/server/chunks/index-wpIsICWW.js +0 -219
  102. package/dist/server/chunks/index-wpIsICWW.js.map +0 -1
  103. package/dist/server/chunks/runtime-Bf5HkYyl.js +0 -318
  104. package/dist/server/chunks/runtime-Bf5HkYyl.js.map +0 -1
  105. package/dist/server/chunks/sessions-CEbRx2vt.js +0 -169
  106. package/dist/server/chunks/sessions-CEbRx2vt.js.map +0 -1
  107. package/dist/server/index.js +0 -7609
  108. package/dist/server/index.js.map +0 -1
  109. package/dist/server/manifest.js +0 -97
  110. package/dist/server/manifest.js.map +0 -1
  111. package/dist/shims.js +0 -32
@@ -1,653 +0,0 @@
1
- import { O as head, P as attr, Q as escape_html, Y as ensure_array_like, T as attr_class, V as stringify } from './index-Ch5Bqlgz.js';
2
- import { g as getLocale, t as trackMessageCall } from './runtime-Bf5HkYyl.js';
3
- import { h as html } from './html-FW6Ia4bL.js';
4
-
5
- const en_nav_previous = (
6
- /** @type {(inputs: {}) => LocalizedString} */
7
- () => {
8
- return (
9
- /** @type {LocalizedString} */
10
- `Previous`
11
- );
12
- }
13
- );
14
- const es_nav_previous = (
15
- /** @type {(inputs: {}) => LocalizedString} */
16
- () => {
17
- return (
18
- /** @type {LocalizedString} */
19
- `Anterior`
20
- );
21
- }
22
- );
23
- const ru_nav_previous = (
24
- /** @type {(inputs: {}) => LocalizedString} */
25
- () => {
26
- return (
27
- /** @type {LocalizedString} */
28
- `Назад`
29
- );
30
- }
31
- );
32
- const ua_nav_previous = (
33
- /** @type {(inputs: {}) => LocalizedString} */
34
- () => {
35
- return (
36
- /** @type {LocalizedString} */
37
- `Назад`
38
- );
39
- }
40
- );
41
- const nav_previous = /* @__NO_SIDE_EFFECTS__ */ (inputs = {}, options = {}) => {
42
- const locale = options.locale ?? getLocale();
43
- trackMessageCall("nav_previous", locale);
44
- if (locale === "en") return en_nav_previous();
45
- if (locale === "es") return es_nav_previous();
46
- if (locale === "ru") return ru_nav_previous();
47
- return ua_nav_previous();
48
- };
49
- const en_nav_next = (
50
- /** @type {(inputs: {}) => LocalizedString} */
51
- () => {
52
- return (
53
- /** @type {LocalizedString} */
54
- `Next`
55
- );
56
- }
57
- );
58
- const es_nav_next = (
59
- /** @type {(inputs: {}) => LocalizedString} */
60
- () => {
61
- return (
62
- /** @type {LocalizedString} */
63
- `Siguiente`
64
- );
65
- }
66
- );
67
- const ru_nav_next = (
68
- /** @type {(inputs: {}) => LocalizedString} */
69
- () => {
70
- return (
71
- /** @type {LocalizedString} */
72
- `Далее`
73
- );
74
- }
75
- );
76
- const ua_nav_next = (
77
- /** @type {(inputs: {}) => LocalizedString} */
78
- () => {
79
- return (
80
- /** @type {LocalizedString} */
81
- `Далі`
82
- );
83
- }
84
- );
85
- const nav_next = /* @__NO_SIDE_EFFECTS__ */ (inputs = {}, options = {}) => {
86
- const locale = options.locale ?? getLocale();
87
- trackMessageCall("nav_next", locale);
88
- if (locale === "en") return en_nav_next();
89
- if (locale === "es") return es_nav_next();
90
- if (locale === "ru") return ru_nav_next();
91
- return ua_nav_next();
92
- };
93
- const en_nav_submit_quiz = (
94
- /** @type {(inputs: {}) => LocalizedString} */
95
- () => {
96
- return (
97
- /** @type {LocalizedString} */
98
- `Submit Quiz`
99
- );
100
- }
101
- );
102
- const es_nav_submit_quiz = (
103
- /** @type {(inputs: {}) => LocalizedString} */
104
- () => {
105
- return (
106
- /** @type {LocalizedString} */
107
- `Enviar Cuestionario`
108
- );
109
- }
110
- );
111
- const ru_nav_submit_quiz = (
112
- /** @type {(inputs: {}) => LocalizedString} */
113
- () => {
114
- return (
115
- /** @type {LocalizedString} */
116
- `Отправить Тест`
117
- );
118
- }
119
- );
120
- const ua_nav_submit_quiz = (
121
- /** @type {(inputs: {}) => LocalizedString} */
122
- () => {
123
- return (
124
- /** @type {LocalizedString} */
125
- `Надіслати Тест`
126
- );
127
- }
128
- );
129
- const nav_submit_quiz = /* @__NO_SIDE_EFFECTS__ */ (inputs = {}, options = {}) => {
130
- const locale = options.locale ?? getLocale();
131
- trackMessageCall("nav_submit_quiz", locale);
132
- if (locale === "en") return en_nav_submit_quiz();
133
- if (locale === "es") return es_nav_submit_quiz();
134
- if (locale === "ru") return ru_nav_submit_quiz();
135
- return ua_nav_submit_quiz();
136
- };
137
- const en_question_progress = (
138
- /** @type {(inputs: { current: NonNullable<unknown>, total: NonNullable<unknown> }) => LocalizedString} */
139
- (i) => {
140
- return (
141
- /** @type {LocalizedString} */
142
- `Question ${i?.current} of ${i?.total}`
143
- );
144
- }
145
- );
146
- const es_question_progress = (
147
- /** @type {(inputs: { current: NonNullable<unknown>, total: NonNullable<unknown> }) => LocalizedString} */
148
- (i) => {
149
- return (
150
- /** @type {LocalizedString} */
151
- `Pregunta ${i?.current} de ${i?.total}`
152
- );
153
- }
154
- );
155
- const ru_question_progress = (
156
- /** @type {(inputs: { current: NonNullable<unknown>, total: NonNullable<unknown> }) => LocalizedString} */
157
- (i) => {
158
- return (
159
- /** @type {LocalizedString} */
160
- `Вопрос ${i?.current} из ${i?.total}`
161
- );
162
- }
163
- );
164
- const ua_question_progress = (
165
- /** @type {(inputs: { current: NonNullable<unknown>, total: NonNullable<unknown> }) => LocalizedString} */
166
- (i) => {
167
- return (
168
- /** @type {LocalizedString} */
169
- `Запитання ${i?.current} з ${i?.total}`
170
- );
171
- }
172
- );
173
- const question_progress = /* @__NO_SIDE_EFFECTS__ */ (inputs, options = {}) => {
174
- const locale = options.locale ?? getLocale();
175
- trackMessageCall("question_progress", locale);
176
- if (locale === "en") return en_question_progress(inputs);
177
- if (locale === "es") return es_question_progress(inputs);
178
- if (locale === "ru") return ru_question_progress(inputs);
179
- return ua_question_progress(inputs);
180
- };
181
- const en_question_answered = (
182
- /** @type {(inputs: { count: NonNullable<unknown> }) => LocalizedString} */
183
- (i) => {
184
- return (
185
- /** @type {LocalizedString} */
186
- `${i?.count} answered`
187
- );
188
- }
189
- );
190
- const es_question_answered = (
191
- /** @type {(inputs: { count: NonNullable<unknown> }) => LocalizedString} */
192
- (i) => {
193
- return (
194
- /** @type {LocalizedString} */
195
- `${i?.count} respondidas`
196
- );
197
- }
198
- );
199
- const ru_question_answered = (
200
- /** @type {(inputs: { count: NonNullable<unknown> }) => LocalizedString} */
201
- (i) => {
202
- return (
203
- /** @type {LocalizedString} */
204
- `${i?.count} отвечено`
205
- );
206
- }
207
- );
208
- const ua_question_answered = (
209
- /** @type {(inputs: { count: NonNullable<unknown> }) => LocalizedString} */
210
- (i) => {
211
- return (
212
- /** @type {LocalizedString} */
213
- `${i?.count} відповіли`
214
- );
215
- }
216
- );
217
- const question_answered = /* @__NO_SIDE_EFFECTS__ */ (inputs, options = {}) => {
218
- const locale = options.locale ?? getLocale();
219
- trackMessageCall("question_answered", locale);
220
- if (locale === "en") return en_question_answered(inputs);
221
- if (locale === "es") return es_question_answered(inputs);
222
- if (locale === "ru") return ru_question_answered(inputs);
223
- return ua_question_answered(inputs);
224
- };
225
- const en_question_type_answer_placeholder = (
226
- /** @type {(inputs: {}) => LocalizedString} */
227
- () => {
228
- return (
229
- /** @type {LocalizedString} */
230
- `Type your answer here...`
231
- );
232
- }
233
- );
234
- const es_question_type_answer_placeholder = (
235
- /** @type {(inputs: {}) => LocalizedString} */
236
- () => {
237
- return (
238
- /** @type {LocalizedString} */
239
- `Escribe tu respuesta aquí...`
240
- );
241
- }
242
- );
243
- const ru_question_type_answer_placeholder = (
244
- /** @type {(inputs: {}) => LocalizedString} */
245
- () => {
246
- return (
247
- /** @type {LocalizedString} */
248
- `Введите ваш ответ здесь...`
249
- );
250
- }
251
- );
252
- const ua_question_type_answer_placeholder = (
253
- /** @type {(inputs: {}) => LocalizedString} */
254
- () => {
255
- return (
256
- /** @type {LocalizedString} */
257
- `Введіть вашу відповідь тут...`
258
- );
259
- }
260
- );
261
- const question_type_answer_placeholder = /* @__NO_SIDE_EFFECTS__ */ (inputs = {}, options = {}) => {
262
- const locale = options.locale ?? getLocale();
263
- trackMessageCall("question_type_answer_placeholder", locale);
264
- if (locale === "en") return en_question_type_answer_placeholder();
265
- if (locale === "es") return es_question_type_answer_placeholder();
266
- if (locale === "ru") return ru_question_type_answer_placeholder();
267
- return ua_question_type_answer_placeholder();
268
- };
269
- const en_question_remove_extra_hint = (
270
- /** @type {(inputs: {}) => LocalizedString} */
271
- () => {
272
- return (
273
- /** @type {LocalizedString} */
274
- `Select items to REMOVE (incorrect answers)`
275
- );
276
- }
277
- );
278
- const es_question_remove_extra_hint = (
279
- /** @type {(inputs: {}) => LocalizedString} */
280
- () => {
281
- return (
282
- /** @type {LocalizedString} */
283
- `Selecciona los elementos a ELIMINAR (respuestas incorrectas)`
284
- );
285
- }
286
- );
287
- const ru_question_remove_extra_hint = (
288
- /** @type {(inputs: {}) => LocalizedString} */
289
- () => {
290
- return (
291
- /** @type {LocalizedString} */
292
- `Выберите элементы для УДАЛЕНИЯ (неправильные ответы)`
293
- );
294
- }
295
- );
296
- const ua_question_remove_extra_hint = (
297
- /** @type {(inputs: {}) => LocalizedString} */
298
- () => {
299
- return (
300
- /** @type {LocalizedString} */
301
- `Виберіть елементи для ВИДАЛЕННЯ (неправильні відповіді)`
302
- );
303
- }
304
- );
305
- const question_remove_extra_hint = /* @__NO_SIDE_EFFECTS__ */ (inputs = {}, options = {}) => {
306
- const locale = options.locale ?? getLocale();
307
- trackMessageCall("question_remove_extra_hint", locale);
308
- if (locale === "en") return en_question_remove_extra_hint();
309
- if (locale === "es") return es_question_remove_extra_hint();
310
- if (locale === "ru") return ru_question_remove_extra_hint();
311
- return ua_question_remove_extra_hint();
312
- };
313
- const en_question_match_hint = (
314
- /** @type {(inputs: {}) => LocalizedString} */
315
- () => {
316
- return (
317
- /** @type {LocalizedString} */
318
- `Click items on the right to match with left items`
319
- );
320
- }
321
- );
322
- const es_question_match_hint = (
323
- /** @type {(inputs: {}) => LocalizedString} */
324
- () => {
325
- return (
326
- /** @type {LocalizedString} */
327
- `Haz clic en los elementos de la derecha para emparejar con los de la izquierda`
328
- );
329
- }
330
- );
331
- const ru_question_match_hint = (
332
- /** @type {(inputs: {}) => LocalizedString} */
333
- () => {
334
- return (
335
- /** @type {LocalizedString} */
336
- `Нажмите на элементы справа, чтобы сопоставить с элементами слева`
337
- );
338
- }
339
- );
340
- const ua_question_match_hint = (
341
- /** @type {(inputs: {}) => LocalizedString} */
342
- () => {
343
- return (
344
- /** @type {LocalizedString} */
345
- `Натисніть на елементи справа, щоб зіставити з елементами зліва`
346
- );
347
- }
348
- );
349
- const question_match_hint = /* @__NO_SIDE_EFFECTS__ */ (inputs = {}, options = {}) => {
350
- const locale = options.locale ?? getLocale();
351
- trackMessageCall("question_match_hint", locale);
352
- if (locale === "en") return en_question_match_hint();
353
- if (locale === "es") return es_question_match_hint();
354
- if (locale === "ru") return ru_question_match_hint();
355
- return ua_question_match_hint();
356
- };
357
- function _page($$renderer, $$props) {
358
- $$renderer.component(($$renderer2) => {
359
- let { data } = $$props;
360
- const quiz = data.quiz;
361
- const config = data.config;
362
- let questions = [];
363
- let currentIndex = 0;
364
- let answers = {};
365
- let isSubmitting = false;
366
- let matches = {};
367
- const totalQuestions = questions.length;
368
- const currentQuestion = questions[currentIndex] ?? null;
369
- const answeredCount = Object.values(answers).filter((a) => a.value !== "" && (Array.isArray(a.value) ? a.value.length > 0 : true)).length;
370
- const progress = totalQuestions > 0 ? Math.round(answeredCount / totalQuestions * 100) : 0;
371
- const canSubmit = questions.filter((q) => q.required === true).every((q) => {
372
- const a = answers[q.id];
373
- return a && a.value !== "" && (Array.isArray(a.value) ? a.value.length > 0 : true);
374
- });
375
- const currentOptions = currentQuestion && Array.isArray(currentQuestion.options) ? currentQuestion.options : [];
376
- const currentMatchOptions = currentQuestion && typeof currentQuestion.options === "object" && "left" in currentQuestion.options ? currentQuestion.options : null;
377
- function getMatchSelection(left) {
378
- return matches[left] !== void 0;
379
- }
380
- function isSelected(right) {
381
- return Object.values(matches).includes(right);
382
- }
383
- function getAnsweredArray() {
384
- return questions.map((q) => {
385
- const a = answers[q.id];
386
- return a !== void 0 && a.value !== "" && (Array.isArray(a.value) ? a.value.length > 0 : true);
387
- });
388
- }
389
- function getAnswer(questionId, questionType) {
390
- const value = answers[questionId]?.value;
391
- if (value !== void 0) return value;
392
- return getEmptyAnswer(questionType ?? "text");
393
- }
394
- function getEmptyAnswer(type) {
395
- switch (type) {
396
- case "match":
397
- return [];
398
- case "text":
399
- case "single":
400
- return "";
401
- case "multiple":
402
- case "remove-extra":
403
- case "order":
404
- return [];
405
- default:
406
- return "";
407
- }
408
- }
409
- head("7xxyz3", $$renderer2, ($$renderer3) => {
410
- $$renderer3.title(($$renderer4) => {
411
- $$renderer4.push(`<title>${escape_html(quiz.title ?? "Quiz")}</title>`);
412
- });
413
- if (config.favicon) {
414
- $$renderer3.push("<!--[-->");
415
- $$renderer3.push(`<link rel="icon"${attr("href", config.favicon)}/>`);
416
- } else {
417
- $$renderer3.push("<!--[!-->");
418
- }
419
- $$renderer3.push(`<!--]--> `);
420
- if (config.css) {
421
- $$renderer3.push("<!--[-->");
422
- $$renderer3.push(`<link rel="stylesheet"${attr("href", config.css)}/>`);
423
- } else {
424
- $$renderer3.push("<!--[!-->");
425
- }
426
- $$renderer3.push(`<!--]-->`);
427
- });
428
- $$renderer2.push(`<div class="min-h-screen bg-base-200">`);
429
- if (totalQuestions === 0) {
430
- $$renderer2.push("<!--[-->");
431
- $$renderer2.push(`<div class="flex justify-center p-8"><span class="loading loading-lg loading-spinner"></span></div>`);
432
- } else {
433
- $$renderer2.push("<!--[!-->");
434
- $$renderer2.push(`<div class="mx-auto max-w-4xl space-y-6 p-4">`);
435
- if (config.logo) {
436
- $$renderer2.push("<!--[-->");
437
- $$renderer2.push(`<div class="flex justify-center"><img${attr("src", config.logo)} alt="Logo" class="h-16 object-contain"/></div>`);
438
- } else {
439
- $$renderer2.push("<!--[!-->");
440
- }
441
- $$renderer2.push(`<!--]--> `);
442
- if (quiz.title || quiz.description) {
443
- $$renderer2.push("<!--[-->");
444
- $$renderer2.push(`<div class="space-y-2 text-center">`);
445
- if (quiz.title) {
446
- $$renderer2.push("<!--[-->");
447
- $$renderer2.push(`<h1 class="text-3xl font-bold">${escape_html(quiz.title)}</h1>`);
448
- } else {
449
- $$renderer2.push("<!--[!-->");
450
- }
451
- $$renderer2.push(`<!--]--> `);
452
- if (quiz.description) {
453
- $$renderer2.push("<!--[-->");
454
- $$renderer2.push(`<p class="mx-auto max-w-2xl text-base-content/70">${escape_html(quiz.description)}</p>`);
455
- } else {
456
- $$renderer2.push("<!--[!-->");
457
- }
458
- $$renderer2.push(`<!--]--> `);
459
- if (quiz.metadata) {
460
- $$renderer2.push("<!--[-->");
461
- $$renderer2.push(`<div class="mt-2 flex flex-wrap justify-center gap-2">`);
462
- if (quiz.metadata.difficulty) {
463
- $$renderer2.push("<!--[-->");
464
- $$renderer2.push(`<span class="badge badge-outline">${escape_html(quiz.metadata.difficulty)}</span>`);
465
- } else {
466
- $$renderer2.push("<!--[!-->");
467
- }
468
- $$renderer2.push(`<!--]--> `);
469
- if (quiz.metadata.estimatedTime) {
470
- $$renderer2.push("<!--[-->");
471
- $$renderer2.push(`<span class="badge badge-outline">~${escape_html(quiz.metadata.estimatedTime)} min</span>`);
472
- } else {
473
- $$renderer2.push("<!--[!-->");
474
- }
475
- $$renderer2.push(`<!--]--> `);
476
- if (quiz.metadata.tags) {
477
- $$renderer2.push("<!--[-->");
478
- $$renderer2.push(`<!--[-->`);
479
- const each_array = ensure_array_like(quiz.metadata.tags);
480
- for (let $$index = 0, $$length = each_array.length; $$index < $$length; $$index++) {
481
- let tag = each_array[$$index];
482
- $$renderer2.push(`<span class="badge badge-ghost">${escape_html(tag)}</span>`);
483
- }
484
- $$renderer2.push(`<!--]-->`);
485
- } else {
486
- $$renderer2.push("<!--[!-->");
487
- }
488
- $$renderer2.push(`<!--]--></div>`);
489
- } else {
490
- $$renderer2.push("<!--[!-->");
491
- }
492
- $$renderer2.push(`<!--]--></div>`);
493
- } else {
494
- $$renderer2.push("<!--[!-->");
495
- }
496
- $$renderer2.push(`<!--]--> `);
497
- if (config.showProgress !== false) {
498
- $$renderer2.push("<!--[-->");
499
- $$renderer2.push(`<div class="card bg-base-100 shadow-sm"><div class="card-body py-3"><div class="flex items-center justify-between text-sm"><span>${escape_html(/* @__PURE__ */ question_progress({ current: currentIndex + 1, total: totalQuestions }))}</span> <span>${escape_html(/* @__PURE__ */ question_answered({ count: answeredCount }))}</span></div> <progress class="progress w-full progress-primary"${attr("value", progress)} max="100"></progress></div></div>`);
500
- } else {
501
- $$renderer2.push("<!--[!-->");
502
- }
503
- $$renderer2.push(`<!--]--> `);
504
- {
505
- $$renderer2.push("<!--[!-->");
506
- }
507
- $$renderer2.push(`<!--]--> `);
508
- if (totalQuestions > 5) {
509
- $$renderer2.push("<!--[-->");
510
- $$renderer2.push(`<div class="flex flex-wrap justify-center gap-1"><!--[-->`);
511
- const each_array_1 = ensure_array_like(questions);
512
- for (let i = 0, $$length = each_array_1.length; i < $$length; i++) {
513
- each_array_1[i];
514
- $$renderer2.push(`<button type="button"${attr_class(`btn btn-xs ${stringify(i === currentIndex ? "btn-primary" : getAnsweredArray()[i] ? "btn-success" : "btn-ghost")}`)}>${escape_html(i + 1)}</button>`);
515
- }
516
- $$renderer2.push(`<!--]--></div>`);
517
- } else {
518
- $$renderer2.push("<!--[!-->");
519
- }
520
- $$renderer2.push(`<!--]--> `);
521
- if (currentQuestion && true) {
522
- $$renderer2.push("<!--[-->");
523
- $$renderer2.push(`<div class="card bg-base-100 shadow-lg"><div class="card-body space-y-6"><div class="flex items-start justify-between gap-4"><h2 class="text-xl font-semibold">`);
524
- if (config.showQuestionNumbers !== false) {
525
- $$renderer2.push("<!--[-->");
526
- $$renderer2.push(`<span class="text-base-content/50">${escape_html(currentIndex + 1)}.</span>`);
527
- } else {
528
- $$renderer2.push("<!--[!-->");
529
- }
530
- $$renderer2.push(`<!--]--> ${html(currentQuestion.question)}</h2> `);
531
- if (currentQuestion.points) {
532
- $$renderer2.push("<!--[-->");
533
- $$renderer2.push(`<span class="badge badge-outline">${escape_html(currentQuestion.points)} pts</span>`);
534
- } else {
535
- $$renderer2.push("<!--[!-->");
536
- }
537
- $$renderer2.push(`<!--]--></div> `);
538
- if (currentQuestion.type === "single") {
539
- $$renderer2.push("<!--[-->");
540
- $$renderer2.push(`<div class="space-y-2"><!--[-->`);
541
- const each_array_2 = ensure_array_like(currentOptions);
542
- for (let $$index_2 = 0, $$length = each_array_2.length; $$index_2 < $$length; $$index_2++) {
543
- let option = each_array_2[$$index_2];
544
- $$renderer2.push(`<label class="flex cursor-pointer items-center gap-3 rounded-lg border border-base-300 p-4 hover:bg-base-200 has-[:checked]:border-primary has-[:checked]:bg-primary/10"><input type="radio"${attr("name", `question-${stringify(currentQuestion.id)}`)} class="radio radio-primary"${attr("checked", getAnswer(currentQuestion.id, "single") === option, true)}/> <span class="flex-1">${escape_html(option)}</span></label>`);
545
- }
546
- $$renderer2.push(`<!--]--></div>`);
547
- } else {
548
- $$renderer2.push("<!--[!-->");
549
- if (currentQuestion.type === "multiple") {
550
- $$renderer2.push("<!--[-->");
551
- $$renderer2.push(`<div class="space-y-2"><!--[-->`);
552
- const each_array_3 = ensure_array_like(currentOptions);
553
- for (let $$index_3 = 0, $$length = each_array_3.length; $$index_3 < $$length; $$index_3++) {
554
- let option = each_array_3[$$index_3];
555
- $$renderer2.push(`<label class="flex cursor-pointer items-center gap-3 rounded-lg border border-base-300 p-4 hover:bg-base-200 has-[:checked]:border-primary has-[:checked]:bg-primary/10"><input type="checkbox" class="checkbox checkbox-primary"${attr("checked", Array.isArray(getAnswer(currentQuestion.id, "multiple")) && getAnswer(currentQuestion.id, "multiple").includes(option), true)}/> <span class="flex-1">${escape_html(option)}</span></label>`);
556
- }
557
- $$renderer2.push(`<!--]--></div>`);
558
- } else {
559
- $$renderer2.push("<!--[!-->");
560
- if (currentQuestion.type === "text") {
561
- $$renderer2.push("<!--[-->");
562
- $$renderer2.push(`<textarea class="textarea-bordered textarea min-h-[120px] w-full"${attr("placeholder", /* @__PURE__ */ question_type_answer_placeholder())}>`);
563
- const $$body = escape_html(getAnswer(currentQuestion.id, "text"));
564
- if ($$body) {
565
- $$renderer2.push(`${$$body}`);
566
- }
567
- $$renderer2.push(`</textarea>`);
568
- } else {
569
- $$renderer2.push("<!--[!-->");
570
- if (currentQuestion.type === "remove-extra") {
571
- $$renderer2.push("<!--[-->");
572
- $$renderer2.push(`<div class="space-y-2"><p class="text-sm text-base-content/70">${escape_html(/* @__PURE__ */ question_remove_extra_hint())}</p> <!--[-->`);
573
- const each_array_4 = ensure_array_like(currentOptions);
574
- for (let $$index_4 = 0, $$length = each_array_4.length; $$index_4 < $$length; $$index_4++) {
575
- let option = each_array_4[$$index_4];
576
- $$renderer2.push(`<label class="flex cursor-pointer items-center gap-3 rounded-lg border border-error/30 p-4 hover:bg-error/10 has-[:checked]:border-error has-[:checked]:bg-error/20"><input type="checkbox" class="checkbox checkbox-error"${attr("checked", Array.isArray(getAnswer(currentQuestion.id, "remove-extra")) && getAnswer(currentQuestion.id, "remove-extra").includes(option), true)}/> <span class="flex-1">${escape_html(option)}</span></label>`);
577
- }
578
- $$renderer2.push(`<!--]--></div>`);
579
- } else {
580
- $$renderer2.push("<!--[!-->");
581
- if (currentQuestion.type === "order") {
582
- $$renderer2.push("<!--[-->");
583
- const orderOptions = currentOptions.length > 0 ? currentOptions : [];
584
- $$renderer2.push(`<div class="space-y-2"><!--[-->`);
585
- const each_array_5 = ensure_array_like(orderOptions);
586
- for (let i = 0, $$length = each_array_5.length; i < $$length; i++) {
587
- let option = each_array_5[i];
588
- $$renderer2.push(`<div class="flex items-center gap-3"><span class="w-6 text-sm text-base-content/50">${escape_html(i + 1)}.</span> <div class="flex-1 rounded-lg border border-base-300 bg-base-200 p-3">${escape_html(option)}</div> <button type="button" class="btn btn-circle btn-sm"${attr("disabled", i === 0, true)}>↑</button> <button type="button" class="btn btn-circle btn-sm"${attr("disabled", i === orderOptions.length - 1, true)}>↓</button></div>`);
589
- }
590
- $$renderer2.push(`<!--]--></div>`);
591
- } else {
592
- $$renderer2.push("<!--[!-->");
593
- if (currentMatchOptions) {
594
- $$renderer2.push("<!--[-->");
595
- $$renderer2.push(`<div class="grid grid-cols-2 gap-4"><div class="space-y-2"><!--[-->`);
596
- const each_array_6 = ensure_array_like(currentMatchOptions.left);
597
- for (let $$index_6 = 0, $$length = each_array_6.length; $$index_6 < $$length; $$index_6++) {
598
- let left = each_array_6[$$index_6];
599
- $$renderer2.push(`<div${attr_class(`rounded-lg border border-base-300 bg-base-200 p-3 ${stringify(getMatchSelection(left) ? "border-primary bg-primary/10" : "")}`)}>${escape_html(left)}</div>`);
600
- }
601
- $$renderer2.push(`<!--]--></div> <div class="space-y-2"><!--[-->`);
602
- const each_array_7 = ensure_array_like(currentMatchOptions.right);
603
- for (let $$index_7 = 0, $$length = each_array_7.length; $$index_7 < $$length; $$index_7++) {
604
- let right = each_array_7[$$index_7];
605
- $$renderer2.push(`<button type="button"${attr_class(`w-full rounded-lg border border-base-300 p-3 text-left hover:bg-base-200 ${stringify(isSelected(right) ? "border-primary bg-primary/10" : "")}`)}>${escape_html(right)}</button>`);
606
- }
607
- $$renderer2.push(`<!--]--></div></div> <p class="text-sm text-base-content/70">${escape_html(/* @__PURE__ */ question_match_hint())}</p>`);
608
- } else {
609
- $$renderer2.push("<!--[!-->");
610
- }
611
- $$renderer2.push(`<!--]-->`);
612
- }
613
- $$renderer2.push(`<!--]-->`);
614
- }
615
- $$renderer2.push(`<!--]-->`);
616
- }
617
- $$renderer2.push(`<!--]-->`);
618
- }
619
- $$renderer2.push(`<!--]-->`);
620
- }
621
- $$renderer2.push(`<!--]--> <div class="flex items-center justify-between pt-4"><button type="button" class="btn btn-ghost"${attr("disabled", currentIndex === 0, true)}>${escape_html(/* @__PURE__ */ nav_previous())}</button> <div class="flex gap-2">`);
622
- if (currentIndex < totalQuestions - 1) {
623
- $$renderer2.push("<!--[-->");
624
- $$renderer2.push(`<button type="button" class="btn btn-primary">${escape_html(/* @__PURE__ */ nav_next())}</button>`);
625
- } else {
626
- $$renderer2.push("<!--[!-->");
627
- $$renderer2.push(`<button type="button" class="btn btn-success"${attr("disabled", !canSubmit || isSubmitting, true)}>`);
628
- {
629
- $$renderer2.push("<!--[!-->");
630
- $$renderer2.push(`${escape_html(/* @__PURE__ */ nav_submit_quiz())}`);
631
- }
632
- $$renderer2.push(`<!--]--></button>`);
633
- }
634
- $$renderer2.push(`<!--]--></div></div></div></div>`);
635
- } else {
636
- $$renderer2.push("<!--[!-->");
637
- }
638
- $$renderer2.push(`<!--]--> `);
639
- {
640
- $$renderer2.push("<!--[!-->");
641
- }
642
- $$renderer2.push(`<!--]--> `);
643
- {
644
- $$renderer2.push("<!--[!-->");
645
- }
646
- $$renderer2.push(`<!--]--></div>`);
647
- }
648
- $$renderer2.push(`<!--]--></div>`);
649
- });
650
- }
651
-
652
- export { _page as default };
653
- //# sourceMappingURL=_page.svelte-CRU5jaGZ.js.map