@vue-skuilder/db 0.2.30 → 0.2.31
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/{contentSource-CqJmbOZN.d.ts → contentSource-DMduBjDC.d.ts} +19 -4
- package/dist/{contentSource-B6FrSihy.d.cts → contentSource-Doh1aVBJ.d.cts} +19 -4
- package/dist/core/index.d.cts +3 -3
- package/dist/core/index.d.ts +3 -3
- package/dist/core/index.js +88 -76
- package/dist/core/index.js.map +1 -1
- package/dist/core/index.mjs +40 -27
- package/dist/core/index.mjs.map +1 -1
- package/dist/{dataLayerProvider-DUxDqMtZ.d.cts → dataLayerProvider-BW1CBAbb.d.cts} +1 -1
- package/dist/{dataLayerProvider-B9_UCvkR.d.ts → dataLayerProvider-Cxfe4nSK.d.ts} +1 -1
- package/dist/diagnostics/index.d.cts +18 -3
- package/dist/diagnostics/index.d.ts +18 -3
- package/dist/diagnostics/index.js +159 -135
- package/dist/diagnostics/index.js.map +1 -1
- package/dist/diagnostics/index.mjs +156 -135
- package/dist/diagnostics/index.mjs.map +1 -1
- package/dist/impl/couch/index.d.cts +2 -2
- package/dist/impl/couch/index.d.ts +2 -2
- package/dist/impl/couch/index.js +92 -80
- package/dist/impl/couch/index.js.map +1 -1
- package/dist/impl/couch/index.mjs +40 -27
- package/dist/impl/couch/index.mjs.map +1 -1
- package/dist/impl/static/index.d.cts +2 -2
- package/dist/impl/static/index.d.ts +2 -2
- package/dist/impl/static/index.js +79 -67
- package/dist/impl/static/index.js.map +1 -1
- package/dist/impl/static/index.mjs +40 -27
- package/dist/impl/static/index.mjs.map +1 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +141 -110
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +65 -33
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
- package/src/core/navigators/PipelineDebugger.ts +42 -23
- package/src/core/navigators/filters/eloDistance.ts +7 -8
- package/src/core/navigators/generators/elo.ts +8 -2
- package/src/core/navigators/generators/prescribed.ts +7 -5
- package/src/core/types/studySession.ts +12 -1
- package/src/diagnostics/derive.ts +5 -2
- package/src/diagnostics/pipeline.ts +28 -0
- package/src/diagnostics/text.ts +11 -4
- package/src/study/SessionController.ts +3 -1
- package/src/study/services/EloService.ts +33 -6
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { C as ClassroomDBInterface, A as AdminDBInterface } from '../../classroomDB-DLTtLZct.cjs';
|
|
2
|
-
import { U as UserDBInterface, C as CourseDBInterface, a as CoursesDBInterface, k as CourseInfo, l as StudySessionItem, D as DataLayerResult, b as ContentNavigationStrategyData, m as ContentNavigator, n as ReplanHints, G as GeneratorResult } from '../../contentSource-
|
|
3
|
-
import { D as DataLayerProvider } from '../../dataLayerProvider-
|
|
2
|
+
import { U as UserDBInterface, C as CourseDBInterface, a as CoursesDBInterface, k as CourseInfo, l as StudySessionItem, D as DataLayerResult, b as ContentNavigationStrategyData, m as ContentNavigator, n as ReplanHints, G as GeneratorResult } from '../../contentSource-Doh1aVBJ.cjs';
|
|
3
|
+
import { D as DataLayerProvider } from '../../dataLayerProvider-BW1CBAbb.cjs';
|
|
4
4
|
import { S as StaticCourseManifest } from '../../types-D0oQeJAi.cjs';
|
|
5
5
|
import { CourseConfig, CourseElo, DataShape } from '@vue-skuilder/common';
|
|
6
6
|
import { S as SkuilderCourseData, d as QualifiedCardID, e as TagStub, T as Tag } from '../../types-legacy-BkOYOR6U.cjs';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { C as ClassroomDBInterface, A as AdminDBInterface } from '../../classroomDB-DLTtLZct.js';
|
|
2
|
-
import { U as UserDBInterface, C as CourseDBInterface, a as CoursesDBInterface, k as CourseInfo, l as StudySessionItem, D as DataLayerResult, b as ContentNavigationStrategyData, m as ContentNavigator, n as ReplanHints, G as GeneratorResult } from '../../contentSource-
|
|
3
|
-
import { D as DataLayerProvider } from '../../dataLayerProvider-
|
|
2
|
+
import { U as UserDBInterface, C as CourseDBInterface, a as CoursesDBInterface, k as CourseInfo, l as StudySessionItem, D as DataLayerResult, b as ContentNavigationStrategyData, m as ContentNavigator, n as ReplanHints, G as GeneratorResult } from '../../contentSource-DMduBjDC.js';
|
|
3
|
+
import { D as DataLayerProvider } from '../../dataLayerProvider-Cxfe4nSK.js';
|
|
4
4
|
import { S as StaticCourseManifest } from '../../types-dXWfyz9B.js';
|
|
5
5
|
import { CourseConfig, CourseElo, DataShape } from '@vue-skuilder/common';
|
|
6
6
|
import { S as SkuilderCourseData, d as QualifiedCardID, e as TagStub, T as Tag } from '../../types-legacy-BkOYOR6U.js';
|
|
@@ -504,13 +504,12 @@ function clearRunHistory() {
|
|
|
504
504
|
_pendingRuns = [];
|
|
505
505
|
}
|
|
506
506
|
function getOrigin(card) {
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
return "unknown";
|
|
507
|
+
return card.reviewID ? "review" : "new";
|
|
508
|
+
}
|
|
509
|
+
function requiredBy(card) {
|
|
510
|
+
return card.provenance.find(
|
|
511
|
+
(p) => p.strategy === "ephemeralHint" && p.score === Number.POSITIVE_INFINITY
|
|
512
|
+
)?.strategyName;
|
|
514
513
|
}
|
|
515
514
|
function captureRun(report) {
|
|
516
515
|
const fullReport = {
|
|
@@ -534,17 +533,23 @@ function parseCardElo(provenance) {
|
|
|
534
533
|
}
|
|
535
534
|
function buildRunReport(courseId, courseName, generatorName, generators, generatedCount, filters, allCards, selectedCards, userElo, hints, scoredCards, regulators) {
|
|
536
535
|
const selectedIds = new Set(selectedCards.map((c) => c.cardId));
|
|
537
|
-
const toReport = (card) =>
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
536
|
+
const toReport = (card) => {
|
|
537
|
+
const required = requiredBy(card);
|
|
538
|
+
const first = card.provenance[0];
|
|
539
|
+
const generator = first && first.strategy !== "ephemeralHint" ? first.strategyName || first.strategy : void 0;
|
|
540
|
+
return {
|
|
541
|
+
cardId: card.cardId,
|
|
542
|
+
courseId: card.courseId,
|
|
543
|
+
origin: getOrigin(card),
|
|
544
|
+
...generator ? { generator } : {},
|
|
545
|
+
...required ? { required } : {},
|
|
546
|
+
finalScore: card.score,
|
|
547
|
+
cardElo: card.cardElo ?? parseCardElo(card.provenance),
|
|
548
|
+
provenance: card.provenance,
|
|
549
|
+
tags: card.tags,
|
|
550
|
+
selected: selectedIds.has(card.cardId)
|
|
551
|
+
};
|
|
552
|
+
};
|
|
548
553
|
const selectedReported = [];
|
|
549
554
|
const nearMissReported = [];
|
|
550
555
|
const discardedTailCards = [];
|
|
@@ -1673,10 +1678,14 @@ var init_elo = __esm({
|
|
|
1673
1678
|
const userElo = (0, import_common5.toCourseElo)(courseReg.elo);
|
|
1674
1679
|
userGlobalElo = userElo.global.score;
|
|
1675
1680
|
}
|
|
1676
|
-
const activeCards = await
|
|
1681
|
+
const [activeCards, seenCards] = await Promise.all([
|
|
1682
|
+
this.user.getActiveCards(),
|
|
1683
|
+
this.user.getSeenCards(this.course.getCourseID()).catch(() => [])
|
|
1684
|
+
]);
|
|
1685
|
+
const notNew = /* @__PURE__ */ new Set([...activeCards.map((ac) => ac.cardID), ...seenCards]);
|
|
1677
1686
|
const newCards = (await this.course.getCardsCenteredAtELO(
|
|
1678
1687
|
{ limit, elo: "user" },
|
|
1679
|
-
(c) => !
|
|
1688
|
+
(c) => !notNew.has(c.cardID)
|
|
1680
1689
|
)).map((c) => ({ ...c, status: "new" }));
|
|
1681
1690
|
const scored = newCards.map((c) => {
|
|
1682
1691
|
const cardElo = c.elo ?? 1e3;
|
|
@@ -1769,11 +1778,11 @@ function formatAge(ms) {
|
|
|
1769
1778
|
}
|
|
1770
1779
|
function unmetIntroExposeTags(tags, userTagElo, minCount) {
|
|
1771
1780
|
if (minCount <= 0) return [];
|
|
1772
|
-
const exposeTags = new Set(tags.filter((tag) =>
|
|
1781
|
+
const exposeTags = new Set(tags.filter((tag) => (0, import_common6.tagRole)(tag) === "expose"));
|
|
1773
1782
|
for (const tag of tags) {
|
|
1774
|
-
if (
|
|
1775
|
-
const
|
|
1776
|
-
if (
|
|
1783
|
+
if ((0, import_common6.tagRole)(tag) !== "intro") continue;
|
|
1784
|
+
const expose = (0, import_common6.withTagRole)(tag, "expose");
|
|
1785
|
+
if (expose) exposeTags.add(expose);
|
|
1777
1786
|
}
|
|
1778
1787
|
return [...exposeTags].filter((tag) => {
|
|
1779
1788
|
const tagElo = userTagElo[tag];
|
|
@@ -1783,10 +1792,11 @@ function unmetIntroExposeTags(tags, userTagElo, minCount) {
|
|
|
1783
1792
|
function pickTopByScore(cards, limit) {
|
|
1784
1793
|
return [...cards].sort((a, b) => b.score - a.score || a.cardId.localeCompare(b.cardId)).slice(0, limit);
|
|
1785
1794
|
}
|
|
1786
|
-
var DEFAULT_FRESHNESS_WINDOW, DEFAULT_MAX_DIRECT_PER_RUN, DEFAULT_MAX_SUPPORT_PER_RUN, DEFAULT_HIERARCHY_DEPTH, DEFAULT_MIN_COUNT, DEFAULT_PRACTICE_MIN_COUNT, DEFAULT_MAX_PRACTICE_PER_RUN, BASE_TARGET_SCORE, BASE_SUPPORT_SCORE, DISCOVERED_SUPPORT_SCORE, BASE_PRACTICE_SCORE, PRACTICE_BASE_MULT, MAX_PRACTICE_MULTIPLIER, PRACTICE_STALENESS_BUMP_PER_DAY, MAX_TARGET_MULTIPLIER, MAX_SUPPORT_MULTIPLIER, PRESCRIBED_DEBUG_VERSION, PrescribedCardsGenerator;
|
|
1795
|
+
var import_common6, DEFAULT_FRESHNESS_WINDOW, DEFAULT_MAX_DIRECT_PER_RUN, DEFAULT_MAX_SUPPORT_PER_RUN, DEFAULT_HIERARCHY_DEPTH, DEFAULT_MIN_COUNT, DEFAULT_PRACTICE_MIN_COUNT, DEFAULT_MAX_PRACTICE_PER_RUN, BASE_TARGET_SCORE, BASE_SUPPORT_SCORE, DISCOVERED_SUPPORT_SCORE, BASE_PRACTICE_SCORE, PRACTICE_BASE_MULT, MAX_PRACTICE_MULTIPLIER, PRACTICE_STALENESS_BUMP_PER_DAY, MAX_TARGET_MULTIPLIER, MAX_SUPPORT_MULTIPLIER, PRESCRIBED_DEBUG_VERSION, PrescribedCardsGenerator;
|
|
1787
1796
|
var init_prescribed = __esm({
|
|
1788
1797
|
"src/core/navigators/generators/prescribed.ts"() {
|
|
1789
1798
|
"use strict";
|
|
1799
|
+
import_common6 = require("@vue-skuilder/common");
|
|
1790
1800
|
init_navigators();
|
|
1791
1801
|
init_StrategyPressureDebugger();
|
|
1792
1802
|
init_logger();
|
|
@@ -3017,7 +3027,9 @@ function tagAwareGap(cardTags, cardElo, userElo, minTagCount) {
|
|
|
3017
3027
|
const tags = [];
|
|
3018
3028
|
for (const tag of cardTags) {
|
|
3019
3029
|
const user = userElo.tags[tag];
|
|
3020
|
-
if (!user || user.score ===
|
|
3030
|
+
if ((0, import_common7.isCountOnlyTag)(tag) || !user || user.score === import_common7.COUNT_ONLY_SCORE || user.count < minTagCount) {
|
|
3031
|
+
continue;
|
|
3032
|
+
}
|
|
3021
3033
|
const card = cardElo.tags[tag]?.score ?? cardElo.global.score;
|
|
3022
3034
|
tags.push({
|
|
3023
3035
|
tag,
|
|
@@ -3089,11 +3101,12 @@ function createEloDistanceFilter(config) {
|
|
|
3089
3101
|
transform: (cards, context) => applyEloDistance(cards, context, resolved, source)
|
|
3090
3102
|
};
|
|
3091
3103
|
}
|
|
3092
|
-
var DEFAULT_ELO_DISTANCE_CONFIG, TAG_CONFIDENCE_HALF,
|
|
3104
|
+
var import_common7, DEFAULT_ELO_DISTANCE_CONFIG, TAG_CONFIDENCE_HALF, DEFAULT_CARD_ELO, MULTI_DIM_ELO_KEY, multiDimElo, EloDistanceFilter;
|
|
3093
3105
|
var init_eloDistance = __esm({
|
|
3094
3106
|
"src/core/navigators/filters/eloDistance.ts"() {
|
|
3095
3107
|
"use strict";
|
|
3096
3108
|
init_navigators();
|
|
3109
|
+
import_common7 = require("@vue-skuilder/common");
|
|
3097
3110
|
init_logger();
|
|
3098
3111
|
DEFAULT_ELO_DISTANCE_CONFIG = {
|
|
3099
3112
|
halfLife: 300,
|
|
@@ -3103,7 +3116,6 @@ var init_eloDistance = __esm({
|
|
|
3103
3116
|
minTagCount: 3
|
|
3104
3117
|
};
|
|
3105
3118
|
TAG_CONFIDENCE_HALF = 10;
|
|
3106
|
-
COUNT_ONLY_SENTINEL = -1;
|
|
3107
3119
|
DEFAULT_CARD_ELO = 1e3;
|
|
3108
3120
|
MULTI_DIM_ELO_KEY = "skuilder:multiDimElo";
|
|
3109
3121
|
multiDimElo = readMultiDimElo();
|
|
@@ -3146,12 +3158,12 @@ var hierarchyDefinition_exports = {};
|
|
|
3146
3158
|
__export(hierarchyDefinition_exports, {
|
|
3147
3159
|
default: () => HierarchyDefinitionNavigator
|
|
3148
3160
|
});
|
|
3149
|
-
var
|
|
3161
|
+
var import_common8, DEFAULT_MIN_COUNT2, HierarchyDefinitionNavigator;
|
|
3150
3162
|
var init_hierarchyDefinition = __esm({
|
|
3151
3163
|
"src/core/navigators/filters/hierarchyDefinition.ts"() {
|
|
3152
3164
|
"use strict";
|
|
3153
3165
|
init_navigators();
|
|
3154
|
-
|
|
3166
|
+
import_common8 = require("@vue-skuilder/common");
|
|
3155
3167
|
init_logger();
|
|
3156
3168
|
DEFAULT_MIN_COUNT2 = 3;
|
|
3157
3169
|
HierarchyDefinitionNavigator = class _HierarchyDefinitionNavigator extends ContentNavigator {
|
|
@@ -3201,7 +3213,7 @@ var init_hierarchyDefinition = __esm({
|
|
|
3201
3213
|
const mastered = /* @__PURE__ */ new Set();
|
|
3202
3214
|
try {
|
|
3203
3215
|
const courseReg = await context.user.getCourseRegDoc(context.course.getCourseID());
|
|
3204
|
-
const userElo = (0,
|
|
3216
|
+
const userElo = (0, import_common8.toCourseElo)(courseReg.elo);
|
|
3205
3217
|
for (const prereqs of Object.values(this.config.prerequisites)) {
|
|
3206
3218
|
for (const prereq of prereqs) {
|
|
3207
3219
|
const tagElo = userElo.tags[prereq.tag];
|
|
@@ -3573,12 +3585,12 @@ var interferenceMitigator_exports = {};
|
|
|
3573
3585
|
__export(interferenceMitigator_exports, {
|
|
3574
3586
|
default: () => InterferenceMitigatorNavigator
|
|
3575
3587
|
});
|
|
3576
|
-
var
|
|
3588
|
+
var import_common9, DEFAULT_MIN_COUNT3, DEFAULT_MIN_ELAPSED_DAYS, DEFAULT_INTERFERENCE_DECAY, InterferenceMitigatorNavigator;
|
|
3577
3589
|
var init_interferenceMitigator = __esm({
|
|
3578
3590
|
"src/core/navigators/filters/interferenceMitigator.ts"() {
|
|
3579
3591
|
"use strict";
|
|
3580
3592
|
init_navigators();
|
|
3581
|
-
|
|
3593
|
+
import_common9 = require("@vue-skuilder/common");
|
|
3582
3594
|
DEFAULT_MIN_COUNT3 = 10;
|
|
3583
3595
|
DEFAULT_MIN_ELAPSED_DAYS = 3;
|
|
3584
3596
|
DEFAULT_INTERFERENCE_DECAY = 0.8;
|
|
@@ -3663,7 +3675,7 @@ var init_interferenceMitigator = __esm({
|
|
|
3663
3675
|
const immature = /* @__PURE__ */ new Set();
|
|
3664
3676
|
try {
|
|
3665
3677
|
const courseReg = await context.user.getCourseRegDoc(context.course.getCourseID());
|
|
3666
|
-
const userElo = (0,
|
|
3678
|
+
const userElo = (0, import_common9.toCourseElo)(courseReg.elo);
|
|
3667
3679
|
const minCount = this.config.maturityThreshold?.minCount ?? DEFAULT_MIN_COUNT3;
|
|
3668
3680
|
const minElo = this.config.maturityThreshold?.minElo;
|
|
3669
3681
|
const minElapsedDays = this.config.maturityThreshold?.minElapsedDays ?? DEFAULT_MIN_ELAPSED_DAYS;
|
|
@@ -4208,11 +4220,11 @@ function logCardProvenance(cards, maxCards = 3) {
|
|
|
4208
4220
|
}
|
|
4209
4221
|
}
|
|
4210
4222
|
}
|
|
4211
|
-
var
|
|
4223
|
+
var import_common10, VERBOSE_RESULTS, Pipeline;
|
|
4212
4224
|
var init_Pipeline = __esm({
|
|
4213
4225
|
"src/core/navigators/Pipeline.ts"() {
|
|
4214
4226
|
"use strict";
|
|
4215
|
-
|
|
4227
|
+
import_common10 = require("@vue-skuilder/common");
|
|
4216
4228
|
init_navigators();
|
|
4217
4229
|
init_logger();
|
|
4218
4230
|
init_orchestration();
|
|
@@ -4701,7 +4713,7 @@ var init_Pipeline = __esm({
|
|
|
4701
4713
|
let userCourseElo;
|
|
4702
4714
|
try {
|
|
4703
4715
|
const courseReg = await this.user.getCourseRegDoc(this.course.getCourseID());
|
|
4704
|
-
userCourseElo = (0,
|
|
4716
|
+
userCourseElo = (0, import_common10.toCourseElo)(courseReg.elo);
|
|
4705
4717
|
userElo = userCourseElo.global.score;
|
|
4706
4718
|
} catch (e) {
|
|
4707
4719
|
logger.debug(`[Pipeline] Could not get user ELO, using default: ${e}`);
|
|
@@ -4763,7 +4775,7 @@ var init_Pipeline = __esm({
|
|
|
4763
4775
|
*/
|
|
4764
4776
|
async getTagEloStatus(tagFilter) {
|
|
4765
4777
|
const courseReg = await this.user.getCourseRegDoc(this.course.getCourseID());
|
|
4766
|
-
const courseElo = (0,
|
|
4778
|
+
const courseElo = (0, import_common10.toCourseElo)(courseReg.elo);
|
|
4767
4779
|
const result = {};
|
|
4768
4780
|
if (!tagFilter) {
|
|
4769
4781
|
for (const [tag, data] of Object.entries(courseElo.tags)) {
|
|
@@ -5589,11 +5601,11 @@ var init_navigators = __esm({
|
|
|
5589
5601
|
});
|
|
5590
5602
|
|
|
5591
5603
|
// src/impl/couch/courseDB.ts
|
|
5592
|
-
var
|
|
5604
|
+
var import_common11;
|
|
5593
5605
|
var init_courseDB = __esm({
|
|
5594
5606
|
"src/impl/couch/courseDB.ts"() {
|
|
5595
5607
|
"use strict";
|
|
5596
|
-
|
|
5608
|
+
import_common11 = require("@vue-skuilder/common");
|
|
5597
5609
|
init_couch();
|
|
5598
5610
|
init_updateQueue();
|
|
5599
5611
|
init_types_legacy();
|
|
@@ -5656,14 +5668,14 @@ var init_auth = __esm({
|
|
|
5656
5668
|
});
|
|
5657
5669
|
|
|
5658
5670
|
// src/impl/couch/CouchDBSyncStrategy.ts
|
|
5659
|
-
var
|
|
5671
|
+
var import_common12;
|
|
5660
5672
|
var init_CouchDBSyncStrategy = __esm({
|
|
5661
5673
|
"src/impl/couch/CouchDBSyncStrategy.ts"() {
|
|
5662
5674
|
"use strict";
|
|
5663
5675
|
init_factory();
|
|
5664
5676
|
init_types_legacy();
|
|
5665
5677
|
init_logger();
|
|
5666
|
-
|
|
5678
|
+
import_common12 = require("@vue-skuilder/common");
|
|
5667
5679
|
init_common();
|
|
5668
5680
|
init_pouchdb_setup();
|
|
5669
5681
|
init_couch();
|
|
@@ -5737,13 +5749,13 @@ function getStreak(records) {
|
|
|
5737
5749
|
function getLapses(records) {
|
|
5738
5750
|
return records.filter((r) => r.isCorrect === false).length;
|
|
5739
5751
|
}
|
|
5740
|
-
var import_moment4,
|
|
5752
|
+
var import_moment4, import_common14, duration;
|
|
5741
5753
|
var init_SpacedRepetition = __esm({
|
|
5742
5754
|
"src/study/SpacedRepetition.ts"() {
|
|
5743
5755
|
"use strict";
|
|
5744
5756
|
init_util();
|
|
5745
5757
|
import_moment4 = __toESM(require("moment"), 1);
|
|
5746
|
-
|
|
5758
|
+
import_common14 = require("@vue-skuilder/common");
|
|
5747
5759
|
init_logger();
|
|
5748
5760
|
duration = import_moment4.default.duration;
|
|
5749
5761
|
}
|
|
@@ -5762,42 +5774,42 @@ var init_SrsService = __esm({
|
|
|
5762
5774
|
});
|
|
5763
5775
|
|
|
5764
5776
|
// src/study/services/tagRecent.ts
|
|
5765
|
-
var
|
|
5777
|
+
var import_common15;
|
|
5766
5778
|
var init_tagRecent = __esm({
|
|
5767
5779
|
"src/study/services/tagRecent.ts"() {
|
|
5768
5780
|
"use strict";
|
|
5769
|
-
|
|
5781
|
+
import_common15 = require("@vue-skuilder/common");
|
|
5770
5782
|
}
|
|
5771
5783
|
});
|
|
5772
5784
|
|
|
5773
5785
|
// src/study/services/EloService.ts
|
|
5774
|
-
var
|
|
5786
|
+
var import_common16;
|
|
5775
5787
|
var init_EloService = __esm({
|
|
5776
5788
|
"src/study/services/EloService.ts"() {
|
|
5777
5789
|
"use strict";
|
|
5778
|
-
|
|
5790
|
+
import_common16 = require("@vue-skuilder/common");
|
|
5779
5791
|
init_logger();
|
|
5780
5792
|
init_tagRecent();
|
|
5781
5793
|
}
|
|
5782
5794
|
});
|
|
5783
5795
|
|
|
5784
5796
|
// src/study/services/ResponseProcessor.ts
|
|
5785
|
-
var
|
|
5797
|
+
var import_common17;
|
|
5786
5798
|
var init_ResponseProcessor = __esm({
|
|
5787
5799
|
"src/study/services/ResponseProcessor.ts"() {
|
|
5788
5800
|
"use strict";
|
|
5789
5801
|
init_core();
|
|
5790
5802
|
init_logger();
|
|
5791
|
-
|
|
5803
|
+
import_common17 = require("@vue-skuilder/common");
|
|
5792
5804
|
}
|
|
5793
5805
|
});
|
|
5794
5806
|
|
|
5795
5807
|
// src/study/services/CardHydrationService.ts
|
|
5796
|
-
var
|
|
5808
|
+
var import_common18;
|
|
5797
5809
|
var init_CardHydrationService = __esm({
|
|
5798
5810
|
"src/study/services/CardHydrationService.ts"() {
|
|
5799
5811
|
"use strict";
|
|
5800
|
-
|
|
5812
|
+
import_common18 = require("@vue-skuilder/common");
|
|
5801
5813
|
init_logger();
|
|
5802
5814
|
}
|
|
5803
5815
|
});
|
|
@@ -7730,11 +7742,11 @@ var init_SessionController = __esm({
|
|
|
7730
7742
|
});
|
|
7731
7743
|
|
|
7732
7744
|
// src/study/TagFilteredContentSource.ts
|
|
7733
|
-
var
|
|
7745
|
+
var import_common19;
|
|
7734
7746
|
var init_TagFilteredContentSource = __esm({
|
|
7735
7747
|
"src/study/TagFilteredContentSource.ts"() {
|
|
7736
7748
|
"use strict";
|
|
7737
|
-
|
|
7749
|
+
import_common19 = require("@vue-skuilder/common");
|
|
7738
7750
|
init_courseDB();
|
|
7739
7751
|
init_logger();
|
|
7740
7752
|
}
|
|
@@ -8073,13 +8085,13 @@ async function dropUserFromClassroom(user, classID) {
|
|
|
8073
8085
|
async function getUserClassrooms(user) {
|
|
8074
8086
|
return getOrCreateClassroomRegistrationsDoc(user);
|
|
8075
8087
|
}
|
|
8076
|
-
var
|
|
8088
|
+
var import_common20, import_moment8, log3, HYDRATION_TIMEOUT_MS, BaseUser, userCoursesDoc, userClassroomsDoc;
|
|
8077
8089
|
var init_BaseUserDB = __esm({
|
|
8078
8090
|
"src/impl/common/BaseUserDB.ts"() {
|
|
8079
8091
|
"use strict";
|
|
8080
8092
|
init_core();
|
|
8081
8093
|
init_util();
|
|
8082
|
-
|
|
8094
|
+
import_common20 = require("@vue-skuilder/common");
|
|
8083
8095
|
import_moment8 = __toESM(require("moment"), 1);
|
|
8084
8096
|
init_types_legacy();
|
|
8085
8097
|
init_logger();
|
|
@@ -8182,7 +8194,7 @@ Currently logged-in as ${this._username}.`
|
|
|
8182
8194
|
);
|
|
8183
8195
|
}
|
|
8184
8196
|
const result = await this.syncStrategy.createAccount(username, password);
|
|
8185
|
-
if (result.status ===
|
|
8197
|
+
if (result.status === import_common20.Status.ok) {
|
|
8186
8198
|
log3(`Account created successfully, updating username to ${username}`);
|
|
8187
8199
|
this._username = username;
|
|
8188
8200
|
try {
|
|
@@ -8258,7 +8270,7 @@ Currently logged-in as ${this._username}.`
|
|
|
8258
8270
|
async resetUserData() {
|
|
8259
8271
|
if (this.syncStrategy.canAuthenticate()) {
|
|
8260
8272
|
return {
|
|
8261
|
-
status:
|
|
8273
|
+
status: import_common20.Status.error,
|
|
8262
8274
|
error: "Reset user data is only available for local-only mode. Use logout instead for remote sync."
|
|
8263
8275
|
};
|
|
8264
8276
|
}
|
|
@@ -8280,11 +8292,11 @@ Currently logged-in as ${this._username}.`
|
|
|
8280
8292
|
await localDB.bulkDocs(docsToDelete);
|
|
8281
8293
|
}
|
|
8282
8294
|
await this.init();
|
|
8283
|
-
return { status:
|
|
8295
|
+
return { status: import_common20.Status.ok };
|
|
8284
8296
|
} catch (error) {
|
|
8285
8297
|
logger.error("Failed to reset user data:", error);
|
|
8286
8298
|
return {
|
|
8287
|
-
status:
|
|
8299
|
+
status: import_common20.Status.error,
|
|
8288
8300
|
error: error instanceof Error ? error.message : "Unknown error during reset"
|
|
8289
8301
|
};
|
|
8290
8302
|
}
|
|
@@ -9214,13 +9226,13 @@ var init_factory = __esm({
|
|
|
9214
9226
|
});
|
|
9215
9227
|
|
|
9216
9228
|
// src/core/interfaces/contentSource.ts
|
|
9217
|
-
var
|
|
9229
|
+
var import_common22;
|
|
9218
9230
|
var init_contentSource = __esm({
|
|
9219
9231
|
"src/core/interfaces/contentSource.ts"() {
|
|
9220
9232
|
"use strict";
|
|
9221
9233
|
init_factory();
|
|
9222
9234
|
init_classroomDB2();
|
|
9223
|
-
|
|
9235
|
+
import_common22 = require("@vue-skuilder/common");
|
|
9224
9236
|
init_TagFilteredContentSource();
|
|
9225
9237
|
}
|
|
9226
9238
|
});
|
|
@@ -9293,11 +9305,11 @@ var init_hydration = __esm({
|
|
|
9293
9305
|
});
|
|
9294
9306
|
|
|
9295
9307
|
// src/core/bulkImport/cardProcessor.ts
|
|
9296
|
-
var
|
|
9308
|
+
var import_common23;
|
|
9297
9309
|
var init_cardProcessor = __esm({
|
|
9298
9310
|
"src/core/bulkImport/cardProcessor.ts"() {
|
|
9299
9311
|
"use strict";
|
|
9300
|
-
|
|
9312
|
+
import_common23 = require("@vue-skuilder/common");
|
|
9301
9313
|
init_logger();
|
|
9302
9314
|
}
|
|
9303
9315
|
});
|
|
@@ -10089,11 +10101,11 @@ var init_StaticDataUnpacker = __esm({
|
|
|
10089
10101
|
});
|
|
10090
10102
|
|
|
10091
10103
|
// src/impl/static/courseDB.ts
|
|
10092
|
-
var
|
|
10104
|
+
var import_common24, StaticCourseDB;
|
|
10093
10105
|
var init_courseDB3 = __esm({
|
|
10094
10106
|
"src/impl/static/courseDB.ts"() {
|
|
10095
10107
|
"use strict";
|
|
10096
|
-
|
|
10108
|
+
import_common24 = require("@vue-skuilder/common");
|
|
10097
10109
|
init_types_legacy();
|
|
10098
10110
|
init_logger();
|
|
10099
10111
|
init_defaults();
|
|
@@ -10354,7 +10366,7 @@ var init_courseDB3 = __esm({
|
|
|
10354
10366
|
}
|
|
10355
10367
|
async addNote(_codeCourse, _shape, _data, _author, _tags, _uploads, _elo) {
|
|
10356
10368
|
return {
|
|
10357
|
-
status:
|
|
10369
|
+
status: import_common24.Status.error,
|
|
10358
10370
|
message: "Cannot add notes in static mode"
|
|
10359
10371
|
};
|
|
10360
10372
|
}
|