@vue-skuilder/standalone-ui 0.2.31 → 0.2.33
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/assets/{AdminLearnerView-7qdAJswS.css → AdminLearnerView-Cfzt4Vei.css} +1 -1
- package/dist/assets/AdminLearnerView-rSdiJgn8.js +4 -0
- package/dist/assets/AdminLearnerView-rSdiJgn8.js.map +1 -0
- package/dist/assets/{TagViewer-C7Cwu3y7.js → TagViewer-6WgLTo03.js} +2 -2
- package/dist/assets/{TagViewer-C7Cwu3y7.js.map → TagViewer-6WgLTo03.js.map} +1 -1
- package/dist/assets/{common-ui.es-XvxNZ71O.js → common-ui.es-B8GYwQeK.js} +1 -1
- package/dist/assets/{common-ui.es-BbkwCD4p.js → common-ui.es-CyBDaXIR.js} +4 -4
- package/dist/assets/{common-ui.es-BbkwCD4p.js.map → common-ui.es-CyBDaXIR.js.map} +1 -1
- package/dist/assets/{dist-CC88Ib2e.js → dist-CatThNga.js} +15 -14
- package/dist/assets/{dist-CC88Ib2e.js.map → dist-CatThNga.js.map} +1 -1
- package/dist/assets/{index-BV35yZa3.js → index-Nr4XkKtU.js} +5 -5
- package/dist/assets/{index-BV35yZa3.js.map → index-Nr4XkKtU.js.map} +1 -1
- package/dist/index.html +3 -3
- package/dist-lib/questions.cjs.js +17 -16
- package/dist-lib/questions.cjs.js.map +1 -1
- package/dist-lib/questions.mjs +100 -61
- package/dist-lib/questions.mjs.map +1 -1
- package/package.json +6 -6
- package/dist/assets/AdminLearnerView-Dv2t7MNh.js +0 -4
- package/dist/assets/AdminLearnerView-Dv2t7MNh.js.map +0 -1
package/dist-lib/questions.mjs
CHANGED
|
@@ -25796,6 +25796,27 @@ function logCardProvenance(t, c = 3) {
|
|
|
25796
25796
|
}
|
|
25797
25797
|
}
|
|
25798
25798
|
}
|
|
25799
|
+
function setAppVersion(t) {
|
|
25800
|
+
hostAppVersion = t;
|
|
25801
|
+
}
|
|
25802
|
+
function sessionVersions() {
|
|
25803
|
+
return {
|
|
25804
|
+
framework: FRAMEWORK_VERSION,
|
|
25805
|
+
...hostAppVersion ? { app: hostAppVersion } : {}
|
|
25806
|
+
};
|
|
25807
|
+
}
|
|
25808
|
+
function stableStringify(t) {
|
|
25809
|
+
return Array.isArray(t) ? `[${t.map(stableStringify).join(",")}]` : t && typeof t == "object" ? `{${Object.entries(t).filter(([, t]) => t !== void 0).sort(([t], [c]) => t < c ? -1 : t > c ? 1 : 0).map(([t, c]) => `${JSON.stringify(t)}:${stableStringify(c)}`).join(",")}}` : JSON.stringify(t);
|
|
25810
|
+
}
|
|
25811
|
+
function strategyHash(t) {
|
|
25812
|
+
if (t.length === 0) return DEFAULT_STRATEGY_HASH;
|
|
25813
|
+
let c = t.map((t) => {
|
|
25814
|
+
let { _rev: c, ...u } = t;
|
|
25815
|
+
return stableStringify(u);
|
|
25816
|
+
}).sort().join("\n"), u = 2166136261;
|
|
25817
|
+
for (let t = 0; t < c.length; t++) u ^= c.charCodeAt(t), u = Math.imul(u, 16777619);
|
|
25818
|
+
return (u >>> 0).toString(16).padStart(8, "0");
|
|
25819
|
+
}
|
|
25799
25820
|
function createDefaultEloStrategy(t) {
|
|
25800
25821
|
return {
|
|
25801
25822
|
_id: "NAVIGATION_STRATEGY-ELO-default",
|
|
@@ -25830,8 +25851,8 @@ function createDefaultEloDistanceStrategy(t) {
|
|
|
25830
25851
|
};
|
|
25831
25852
|
}
|
|
25832
25853
|
function createDefaultPipeline(t, c) {
|
|
25833
|
-
let u = c.getCourseID(), d = new ELONavigator(t, c, createDefaultEloStrategy(u)), m = new SRSNavigator(t, c, createDefaultSrsStrategy(u)), g = new CompositeGenerator([d, m]), b = new EloDistanceFilter(t, c, createDefaultEloDistanceStrategy(u));
|
|
25834
|
-
return
|
|
25854
|
+
let u = c.getCourseID(), d = new ELONavigator(t, c, createDefaultEloStrategy(u)), m = new SRSNavigator(t, c, createDefaultSrsStrategy(u)), g = new CompositeGenerator([d, m]), b = new EloDistanceFilter(t, c, createDefaultEloDistanceStrategy(u)), S = new Pipeline(g, [b], t, c);
|
|
25855
|
+
return S.strategyHash = DEFAULT_STRATEGY_HASH, S;
|
|
25835
25856
|
}
|
|
25836
25857
|
function planned(t, c, u) {
|
|
25837
25858
|
let d = c === "filter" ? getRegisteredFilterKind(t.implementingClass) : void 0;
|
|
@@ -26964,7 +26985,7 @@ async function getUserClassrooms(t) {
|
|
|
26964
26985
|
}
|
|
26965
26986
|
async function initializeDataLayer(t) {
|
|
26966
26987
|
if (dataLayerInstance) return logger.warn("Data layer already initialized. Returning existing instance."), dataLayerInstance;
|
|
26967
|
-
if (await initializeNavigatorRegistry(), t.options.localStoragePrefix && (ENV.LOCAL_STORAGE_PREFIX = t.options.localStoragePrefix), t.type === "couch") {
|
|
26988
|
+
if (await initializeNavigatorRegistry(), t.options.localStoragePrefix && (ENV.LOCAL_STORAGE_PREFIX = t.options.localStoragePrefix), t.options.appVersion && setAppVersion(t.options.appVersion), t.type === "couch") {
|
|
26968
26989
|
if (!t.options.COUCHDB_SERVER_URL || !t.options.COUCHDB_SERVER_PROTOCOL) throw Error("Missing CouchDB server URL or protocol");
|
|
26969
26990
|
if (ENV.COUCHDB_SERVER_PROTOCOL = t.options.COUCHDB_SERVER_PROTOCOL, ENV.COUCHDB_SERVER_URL = t.options.COUCHDB_SERVER_URL, ENV.COUCHDB_USERNAME = t.options.COUCHDB_USERNAME, ENV.COUCHDB_PASSWORD = t.options.COUCHDB_PASSWORD, t.options.courseSync) {
|
|
26970
26991
|
let { CourseSyncService: c } = await Promise.resolve().then(() => (init_CourseSyncService(), CourseSyncService_exports));
|
|
@@ -27285,7 +27306,7 @@ async function registerCustomQuestionTypes(t, c, u, d) {
|
|
|
27285
27306
|
};
|
|
27286
27307
|
}
|
|
27287
27308
|
}
|
|
27288
|
-
var import_browser_ponyfill, import_browser_ponyfill$1, import_browser, import___vite_browser_external, import___vite_browser_external$1, import___vite_browser_external$2, __defProp, __getOwnPropNames, __glob, __esm, __export, init_adminDB, init_classroomDB, init_SyncStrategy, isDevelopment, logger, init_logger, GuestUsername, log, DocType, DocTypePrefixes, init_types_legacy, init_util, pouchdb_setup_default, init_pouchdb_setup, Loggable, init_Loggable, UpdateQueue, init_updateQueue, CLIENT_CACHE, init_clientCache, AlreadyTaggedErr, init_courseAPI, courseLookupDBTitle, CourseLookup, init_courseLookupDB, diversityRerank_exports, DIVERSITY_STRENGTH, DIVERSITY_FLOOR, STRATEGY, STRATEGY_ID, STRATEGY_NAME, init_diversityRerank, PipelineDebugger_exports, _activePipeline, MAX_RUNS, runHistory, _currentSessionId, _pendingRuns, DISCARDED_KEEP_TOP, _uiContainer, _selectedRunIndex, _cardSearchQuery, pipelineDebugAPI, init_PipelineDebugger, SrsDebugger_exports, snapshots, init_SrsDebugger, StrategyPressureDebugger_exports, snapshots2, init_StrategyPressureDebugger, CompositeGenerator_exports, AggregationMode, DEFAULT_AGGREGATION_MODE, FREQUENCY_BOOST_FACTOR, CompositeGenerator, init_CompositeGenerator, elo_exports, ELONavigator, init_elo, generators_exports, init_generators, prescribed_exports, 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, init_prescribed, regulators_exports, DEFAULT_REGULATOR_CONFIG, INTAKE_CLOCK_KEY, REGULATOR_LABEL, init_regulators, srs_exports, SRSNavigator, init_srs, types_exports, init_types, globImport_generators, init_, DEFAULT_LEARNABLE_WEIGHT, init_contentNavigationStrategy, WeightedFilter_exports, WeightedFilter, init_WeightedFilter, eloDistance_exports, DEFAULT_ELO_DISTANCE_CONFIG, TAG_CONFIDENCE_HALF, DEFAULT_CARD_ELO, MULTI_DIM_ELO_KEY, multiDimElo, EloDistanceFilter, init_eloDistance, hierarchyDefinition_exports, DEFAULT_MIN_COUNT2, HierarchyDefinitionNavigator, init_hierarchyDefinition, userTagPreference_exports, UserTagPreferenceFilter, init_userTagPreference, filters_exports, init_filters, inferredPreferenceStub_exports, INFERRED_PREFERENCE_NAVIGATOR_STUB, init_inferredPreferenceStub, interferenceMitigator_exports, DEFAULT_MIN_COUNT3, DEFAULT_MIN_ELAPSED_DAYS, DEFAULT_INTERFERENCE_DECAY, InterferenceMitigatorNavigator, init_interferenceMitigator, relativePriority_exports, DEFAULT_PRIORITY, DEFAULT_PRIORITY_INFLUENCE, DEFAULT_COMBINE_MODE, RelativePriorityNavigator, init_relativePriority, types_exports2, init_types2, userGoalStub_exports, USER_GOAL_NAVIGATOR_STUB, init_userGoalStub, globImport_filters, init_2, init_gradient, MIN_OBSERVATIONS_FOR_UPDATE, LEARNING_RATE, MAX_WEIGHT_DELTA, MIN_R_SQUARED_FOR_GRADIENT, FLAT_GRADIENT_THRESHOLD, MAX_HISTORY_LENGTH, init_learning, init_signal, init_recording, MIN_SPREAD, MAX_SPREAD, MIN_WEIGHT, MAX_WEIGHT, init_orchestration, Pipeline_exports, VERBOSE_RESULTS, Pipeline, init_Pipeline, defaults_exports, init_defaults, pipelinePlan_exports, PIPELINE_STAGES, init_pipelinePlan, PipelineAssembler_exports, PipelineAssembler, init_PipelineAssembler, globImport, init_3, navigators_exports, navigatorRegistry, Navigators, NavigatorRole, NavigatorRoles, ContentNavigator, init_navigators, CoursesDB, CourseDB, init_courseDB, classroomLookupDBTitle, CLASSROOM_CONFIG, ClassroomDBBase, StudentClassroomDB, TeacherClassroomDB, ClassroomLookupDB, init_classroomDB2, AdminDB, init_adminDB2, CourseSyncService_exports, DEFAULT_REPLICATION, CourseSyncService, init_CourseSyncService, init_auth, CouchDBSyncStrategy_exports, log2, CouchDBSyncStrategy, init_CouchDBSyncStrategy, isBrowser, GUEST_LOCAL_DB, localUserDB, pouchDBincludeCredentialsConfig, REVIEW_TIME_FORMAT, init_couch, duration, init_SpacedRepetition, SrsService, init_SrsService, init_tagRecent, EloService, init_EloService, ResponseProcessor, init_ResponseProcessor, CardHydrationService, init_CardHydrationService, ItemQueue, init_ItemQueue, init_studySession, init_types3, CouchDBToStaticPacker, init_CouchDBToStaticPacker, init_packer, DEFAULT_MIGRATION_OPTIONS, init_types4, FileSystemError, init_FileSystemAdapter, nodeFS, init_validation, nodeFS2, nodePath, StaticToCouchDBMigrator, init_StaticToCouchDBMigrator, init_migrator, init_dataDirectory, init_util2, QuotaRoundRobinMixer, init_SourceMixer, MAX_RUNS2, runHistory2, mixerDebugAPI, init_MixerDebugger, activeController, OVERLAY_ID, POLL_MS, INLINE_THRESHOLD, SPINNER_FRAMES, spinnerFrame, overlayEl, pollHandle, lastSnapshot, copyFlashUntil, minified, expanded, init_SessionOverlay, activeSession, sessionHistory, MAX_HISTORY, sessionDebugAPI, init_SessionDebugger, PERSISTED_RUNNERS_UP, SessionController, init_SessionController, TagFilteredContentSource, init_TagFilteredContentSource, init_study, REVIEW_TIME_FORMAT2, log3, init_userDBHelpers, UsrCrsData, init_user_course_relDB, log4, HYDRATION_TIMEOUT_MS, BaseUser, userCoursesDoc, userClassroomsDoc, init_BaseUserDB, init_common, PouchDataLayerProvider_exports, CouchDataLayerProvider, init_PouchDataLayerProvider, pathUtils, nodeFS3, StaticDataUnpacker, init_StaticDataUnpacker, StaticCourseDB, init_courseDB2, StaticCoursesDB, init_coursesDB, NoOpSyncStrategy, init_NoOpSyncStrategy, StaticDataLayerProvider_exports, StaticDataLayerProvider, init_StaticDataLayerProvider, NOT_SET, ENV, dataLayerInstance, init_factory, init_contentSource, init_courseDB3, init_dataLayerProvider, init_userDB, init_interfaces, init_user, init_strategyState, init_userOutcome, HYDRATION_MARKER_ID, init_hydration, init_cardProcessor, init_types5, init_bulkImport, userDBDebugAPI, init_UserDBDebugger, init_core, init_dist = __esmMin((() => {
|
|
27309
|
+
var import_browser_ponyfill, import_browser_ponyfill$1, import_browser, import___vite_browser_external, import___vite_browser_external$1, import___vite_browser_external$2, __defProp, __getOwnPropNames, __glob, __esm, __export, init_adminDB, init_classroomDB, init_SyncStrategy, isDevelopment, logger, init_logger, GuestUsername, log, DocType, DocTypePrefixes, init_types_legacy, init_util, pouchdb_setup_default, init_pouchdb_setup, Loggable, init_Loggable, UpdateQueue, init_updateQueue, CLIENT_CACHE, init_clientCache, AlreadyTaggedErr, init_courseAPI, courseLookupDBTitle, CourseLookup, init_courseLookupDB, diversityRerank_exports, DIVERSITY_STRENGTH, DIVERSITY_FLOOR, STRATEGY, STRATEGY_ID, STRATEGY_NAME, init_diversityRerank, PipelineDebugger_exports, _activePipeline, MAX_RUNS, runHistory, _currentSessionId, _pendingRuns, DISCARDED_KEEP_TOP, _uiContainer, _selectedRunIndex, _cardSearchQuery, pipelineDebugAPI, init_PipelineDebugger, SrsDebugger_exports, snapshots, init_SrsDebugger, StrategyPressureDebugger_exports, snapshots2, init_StrategyPressureDebugger, CompositeGenerator_exports, AggregationMode, DEFAULT_AGGREGATION_MODE, FREQUENCY_BOOST_FACTOR, CompositeGenerator, init_CompositeGenerator, elo_exports, ELONavigator, init_elo, generators_exports, init_generators, prescribed_exports, 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, init_prescribed, regulators_exports, DEFAULT_REGULATOR_CONFIG, INTAKE_CLOCK_KEY, REGULATOR_LABEL, init_regulators, srs_exports, SRSNavigator, init_srs, types_exports, init_types, globImport_generators, init_, DEFAULT_LEARNABLE_WEIGHT, init_contentNavigationStrategy, WeightedFilter_exports, WeightedFilter, init_WeightedFilter, eloDistance_exports, DEFAULT_ELO_DISTANCE_CONFIG, TAG_CONFIDENCE_HALF, DEFAULT_CARD_ELO, MULTI_DIM_ELO_KEY, multiDimElo, EloDistanceFilter, init_eloDistance, hierarchyDefinition_exports, DEFAULT_MIN_COUNT2, HierarchyDefinitionNavigator, init_hierarchyDefinition, userTagPreference_exports, UserTagPreferenceFilter, init_userTagPreference, filters_exports, init_filters, inferredPreferenceStub_exports, INFERRED_PREFERENCE_NAVIGATOR_STUB, init_inferredPreferenceStub, interferenceMitigator_exports, DEFAULT_MIN_COUNT3, DEFAULT_MIN_ELAPSED_DAYS, DEFAULT_INTERFERENCE_DECAY, InterferenceMitigatorNavigator, init_interferenceMitigator, relativePriority_exports, DEFAULT_PRIORITY, DEFAULT_PRIORITY_INFLUENCE, DEFAULT_COMBINE_MODE, RelativePriorityNavigator, init_relativePriority, types_exports2, init_types2, userGoalStub_exports, USER_GOAL_NAVIGATOR_STUB, init_userGoalStub, globImport_filters, init_2, init_gradient, MIN_OBSERVATIONS_FOR_UPDATE, LEARNING_RATE, MAX_WEIGHT_DELTA, MIN_R_SQUARED_FOR_GRADIENT, FLAT_GRADIENT_THRESHOLD, MAX_HISTORY_LENGTH, init_learning, init_signal, init_recording, MIN_SPREAD, MAX_SPREAD, MIN_WEIGHT, MAX_WEIGHT, init_orchestration, Pipeline_exports, VERBOSE_RESULTS, Pipeline, init_Pipeline, FRAMEWORK_VERSION, hostAppVersion, DEFAULT_STRATEGY_HASH, init_versionStamps, defaults_exports, init_defaults, pipelinePlan_exports, PIPELINE_STAGES, init_pipelinePlan, PipelineAssembler_exports, PipelineAssembler, init_PipelineAssembler, globImport, init_3, navigators_exports, navigatorRegistry, Navigators, NavigatorRole, NavigatorRoles, ContentNavigator, init_navigators, CoursesDB, CourseDB, init_courseDB, classroomLookupDBTitle, CLASSROOM_CONFIG, ClassroomDBBase, StudentClassroomDB, TeacherClassroomDB, ClassroomLookupDB, init_classroomDB2, AdminDB, init_adminDB2, CourseSyncService_exports, DEFAULT_REPLICATION, CourseSyncService, init_CourseSyncService, init_auth, CouchDBSyncStrategy_exports, log2, CouchDBSyncStrategy, init_CouchDBSyncStrategy, isBrowser, GUEST_LOCAL_DB, localUserDB, pouchDBincludeCredentialsConfig, REVIEW_TIME_FORMAT, init_couch, duration, init_SpacedRepetition, SrsService, init_SrsService, init_tagRecent, EloService, init_EloService, ResponseProcessor, init_ResponseProcessor, CardHydrationService, init_CardHydrationService, ItemQueue, init_ItemQueue, init_studySession, init_types3, CouchDBToStaticPacker, init_CouchDBToStaticPacker, init_packer, DEFAULT_MIGRATION_OPTIONS, init_types4, FileSystemError, init_FileSystemAdapter, nodeFS, init_validation, nodeFS2, nodePath, StaticToCouchDBMigrator, init_StaticToCouchDBMigrator, init_migrator, init_dataDirectory, init_util2, QuotaRoundRobinMixer, init_SourceMixer, MAX_RUNS2, runHistory2, mixerDebugAPI, init_MixerDebugger, activeController, OVERLAY_ID, POLL_MS, INLINE_THRESHOLD, SPINNER_FRAMES, spinnerFrame, overlayEl, pollHandle, lastSnapshot, copyFlashUntil, minified, expanded, init_SessionOverlay, activeSession, sessionHistory, MAX_HISTORY, sessionDebugAPI, init_SessionDebugger, PERSISTED_RUNNERS_UP, SessionController, init_SessionController, TagFilteredContentSource, init_TagFilteredContentSource, init_study, REVIEW_TIME_FORMAT2, log3, init_userDBHelpers, UsrCrsData, init_user_course_relDB, log4, HYDRATION_TIMEOUT_MS, BaseUser, userCoursesDoc, userClassroomsDoc, init_BaseUserDB, init_common, PouchDataLayerProvider_exports, CouchDataLayerProvider, init_PouchDataLayerProvider, pathUtils, nodeFS3, StaticDataUnpacker, init_StaticDataUnpacker, StaticCourseDB, init_courseDB2, StaticCoursesDB, init_coursesDB, NoOpSyncStrategy, init_NoOpSyncStrategy, StaticDataLayerProvider_exports, StaticDataLayerProvider, init_StaticDataLayerProvider, NOT_SET, ENV, dataLayerInstance, init_factory, init_contentSource, init_courseDB3, init_dataLayerProvider, init_userDB, init_interfaces, init_user, init_strategyState, init_userOutcome, HYDRATION_MARKER_ID, init_hydration, init_cardProcessor, init_types5, init_bulkImport, userDBDebugAPI, init_UserDBDebugger, init_core, init_dist = __esmMin((() => {
|
|
27289
27310
|
init_defineProperty(), init_index_browser_es$5(), init_index_browser_es(), init_index_es(), init_dist$1(), init_esm_browser(), init_moment(), import_browser_ponyfill = /* @__PURE__ */ __toESM$2(require_browser_ponyfill(), 1), import_browser_ponyfill$1 = /* @__PURE__ */ __toESM$2(require_browser_ponyfill(), 1), import_browser = /* @__PURE__ */ __toESM$2(require_browser(), 1), import___vite_browser_external = /* @__PURE__ */ __toESM$2(require___vite_browser_external(), 1), import___vite_browser_external$1 = /* @__PURE__ */ __toESM$2(require___vite_browser_external(), 1), import___vite_browser_external$2 = /* @__PURE__ */ __toESM$2(require___vite_browser_external(), 1), __defProp = Object.defineProperty, __getOwnPropNames = Object.getOwnPropertyNames, __glob = (t) => (c) => {
|
|
27290
27311
|
var u = t[c];
|
|
27291
27312
|
if (u) return u();
|
|
@@ -28817,7 +28838,7 @@ var import_browser_ponyfill, import_browser_ponyfill$1, import_browser, import__
|
|
|
28817
28838
|
}), init_Pipeline = __esm({ "src/core/navigators/Pipeline.ts"() {
|
|
28818
28839
|
init_navigators(), init_logger(), init_orchestration(), init_PipelineDebugger(), init_diversityRerank(), init_regulators(), init_SrsDebugger(), VERBOSE_RESULTS = !0, Pipeline = class extends ContentNavigator {
|
|
28819
28840
|
constructor(t, c, u, d) {
|
|
28820
|
-
super(), _defineProperty$2(this, "generator", void 0), _defineProperty$2(this, "filters", void 0), _defineProperty$2(this, "_cachedOrchestration", null), _defineProperty$2(this, "_tagCache", /* @__PURE__ */ new Map()), _defineProperty$2(this, "_ephemeralHints", null), _defineProperty$2(this, "_intakeClock", null), _defineProperty$2(this, "_intakeClockWrite", Promise.resolve()), this.generator = t, this.filters = c, this.user = u, this.course = d, d.getCourseConfig().then((t) => {
|
|
28841
|
+
super(), _defineProperty$2(this, "generator", void 0), _defineProperty$2(this, "filters", void 0), _defineProperty$2(this, "_cachedOrchestration", null), _defineProperty$2(this, "strategyHash", void 0), _defineProperty$2(this, "_tagCache", /* @__PURE__ */ new Map()), _defineProperty$2(this, "_ephemeralHints", null), _defineProperty$2(this, "_intakeClock", null), _defineProperty$2(this, "_intakeClockWrite", Promise.resolve()), this.generator = t, this.filters = c, this.user = u, this.course = d, d.getCourseConfig().then((t) => {
|
|
28821
28842
|
logger.debug(`[pipeline] Crated pipeline for ${t.name}`);
|
|
28822
28843
|
}).catch((t) => {
|
|
28823
28844
|
logger.error(`[pipeline] Failed to lookup courseCfg: ${t}`);
|
|
@@ -28899,8 +28920,14 @@ var import_browser_ponyfill, import_browser_ponyfill$1, import_browser, import__
|
|
|
28899
28920
|
let kr = Or.slice(0, 3).map((t) => t.score);
|
|
28900
28921
|
logExecutionSummary(this.generator.name, C, this.filters.length, Or.length, kr, xr), logResultCards(Or), logCardProvenance(Or, 3);
|
|
28901
28922
|
try {
|
|
28902
|
-
let t = await this.course?.getCourseConfig().
|
|
28903
|
-
|
|
28923
|
+
let t = await this.course?.getCourseConfig().catch(() => void 0), c = t?.name, d = buildRunReport(this.course?.getCourseID() || "unknown", c, this.generator.name, w, C, xr, b, Or, u.userElo, Er ?? void 0, wr, Tr), m = {
|
|
28924
|
+
...this.strategyHash ? { strategies: this.strategyHash } : {},
|
|
28925
|
+
...t?.contentVersion ? { content: t.contentVersion } : {}
|
|
28926
|
+
};
|
|
28927
|
+
captureRun({
|
|
28928
|
+
...d,
|
|
28929
|
+
...Object.keys(m).length ? { versions: m } : {}
|
|
28930
|
+
});
|
|
28904
28931
|
} catch (t) {
|
|
28905
28932
|
logger.debug(`[Pipeline] Failed to capture debug run: ${t}`);
|
|
28906
28933
|
}
|
|
@@ -29136,13 +29163,15 @@ var import_browser_ponyfill, import_browser_ponyfill$1, import_browser, import__
|
|
|
29136
29163
|
return O;
|
|
29137
29164
|
}
|
|
29138
29165
|
};
|
|
29166
|
+
} }), init_versionStamps = __esm({ "src/core/versionStamps.ts"() {
|
|
29167
|
+
FRAMEWORK_VERSION = "0.2.33", DEFAULT_STRATEGY_HASH = "default";
|
|
29139
29168
|
} }), defaults_exports = {}, __export(defaults_exports, {
|
|
29140
29169
|
createDefaultEloDistanceStrategy: () => createDefaultEloDistanceStrategy,
|
|
29141
29170
|
createDefaultEloStrategy: () => createDefaultEloStrategy,
|
|
29142
29171
|
createDefaultPipeline: () => createDefaultPipeline,
|
|
29143
29172
|
createDefaultSrsStrategy: () => createDefaultSrsStrategy
|
|
29144
29173
|
}), init_defaults = __esm({ "src/core/navigators/defaults.ts"() {
|
|
29145
|
-
init_navigators(), init_Pipeline(), init_CompositeGenerator(), init_elo(), init_srs(), init_eloDistance(), init_types_legacy();
|
|
29174
|
+
init_navigators(), init_Pipeline(), init_CompositeGenerator(), init_elo(), init_srs(), init_eloDistance(), init_types_legacy(), init_versionStamps();
|
|
29146
29175
|
} }), pipelinePlan_exports = {}, __export(pipelinePlan_exports, {
|
|
29147
29176
|
PIPELINE_STAGES: () => PIPELINE_STAGES,
|
|
29148
29177
|
planPipeline: () => planPipeline
|
|
@@ -29185,7 +29214,7 @@ var import_browser_ponyfill, import_browser_ponyfill$1, import_browser, import__
|
|
|
29185
29214
|
}
|
|
29186
29215
|
];
|
|
29187
29216
|
} }), PipelineAssembler_exports = {}, __export(PipelineAssembler_exports, { PipelineAssembler: () => PipelineAssembler }), init_PipelineAssembler = __esm({ "src/core/navigators/PipelineAssembler.ts"() {
|
|
29188
|
-
init_navigators(), init_WeightedFilter(), init_Pipeline(), init_logger(), init_CompositeGenerator(), init_pipelinePlan(), PipelineAssembler = class {
|
|
29217
|
+
init_navigators(), init_WeightedFilter(), init_Pipeline(), init_logger(), init_CompositeGenerator(), init_pipelinePlan(), init_versionStamps(), PipelineAssembler = class {
|
|
29189
29218
|
async assemble(t) {
|
|
29190
29219
|
let { strategies: c, user: u, course: d } = t, m = [];
|
|
29191
29220
|
if (c.length === 0) return {
|
|
@@ -29217,7 +29246,7 @@ var import_browser_ponyfill, import_browser_ponyfill$1, import_browser, import__
|
|
|
29217
29246
|
m.push(`Failed to instantiate filter '${t.name}': ${c}`);
|
|
29218
29247
|
}
|
|
29219
29248
|
let T = new Pipeline(C, w, u, d);
|
|
29220
|
-
return logger.debug(`[PipelineAssembler] Assembled pipeline with ${b.length} generator(s) and ${w.length} filter(s)`), {
|
|
29249
|
+
return T.strategyHash = strategyHash(c), logger.debug(`[PipelineAssembler] Assembled pipeline with ${b.length} generator(s) and ${w.length} filter(s)`), {
|
|
29221
29250
|
pipeline: T,
|
|
29222
29251
|
generatorStrategies: b,
|
|
29223
29252
|
filterStrategies: S,
|
|
@@ -30323,7 +30352,11 @@ ${t.stack}` : JSON.stringify(t);
|
|
|
30323
30352
|
} }), init_tagRecent = __esm({ "src/study/services/tagRecent.ts"() {} }), init_EloService = __esm({ "src/study/services/EloService.ts"() {
|
|
30324
30353
|
init_logger(), init_tagRecent(), EloService = class {
|
|
30325
30354
|
constructor(t, c) {
|
|
30326
|
-
_defineProperty$2(this, "dataLayer", void 0), _defineProperty$2(this, "user", void 0), this.dataLayer = t, this.user = c;
|
|
30355
|
+
_defineProperty$2(this, "dataLayer", void 0), _defineProperty$2(this, "user", void 0), _defineProperty$2(this, "qaPatterns", /* @__PURE__ */ new Map()), this.dataLayer = t, this.user = c;
|
|
30356
|
+
}
|
|
30357
|
+
async isQaUser(t) {
|
|
30358
|
+
let c = t.getCourseID(), u = this.qaPatterns.get(c);
|
|
30359
|
+
return u || (u = t.getCourseConfig().then((t) => t.qaUsernamePattern ? new RegExp(t.qaUsernamePattern, "i") : null).catch((t) => (logger.warn(`[EloService] No QA username pattern for ${c}: ${t}`), null)), this.qaPatterns.set(c, u)), (await u)?.test(this.user.getUsername()) ?? !1;
|
|
30327
30360
|
}
|
|
30328
30361
|
async updateUserAndCardElo(t, c, u, d, m, g) {
|
|
30329
30362
|
g && logger.warn("k value interpretation not currently implemented");
|
|
@@ -30331,43 +30364,45 @@ ${t.stack}` : JSON.stringify(t);
|
|
|
30331
30364
|
if (!S) return logger.error(`[EloService] No registration for course ${c} on user's registration doc \u2014 skipping ELO update for card ${u}. (Is the user registered for this course?)`), null;
|
|
30332
30365
|
let C = toCourseElo(S.elo), w = (await b.getCardEloData([m.card.card_id]))[0];
|
|
30333
30366
|
if (w && C) {
|
|
30334
|
-
let d = C.global.score,
|
|
30335
|
-
for (let t of
|
|
30336
|
-
let
|
|
30337
|
-
S.elo =
|
|
30338
|
-
let
|
|
30339
|
-
for (let c of
|
|
30367
|
+
let d = !await this.isQaUser(b), m = C.global.score, g = w.global.score, T = Object.keys(w.tags), E = {};
|
|
30368
|
+
for (let t of T) E[t] = C.tags[t]?.score ?? C.global.score;
|
|
30369
|
+
let D = adjustCourseScores(C, w, t);
|
|
30370
|
+
S.elo = D.userElo;
|
|
30371
|
+
let O = {};
|
|
30372
|
+
for (let c of T) {
|
|
30340
30373
|
let u = isCountOnlyTag(c);
|
|
30341
|
-
|
|
30342
|
-
before:
|
|
30343
|
-
after: u ?
|
|
30374
|
+
O[c] = {
|
|
30375
|
+
before: E[c],
|
|
30376
|
+
after: u ? E[c] : D.userElo.tags[c].score,
|
|
30344
30377
|
score: u ? null : t
|
|
30345
30378
|
};
|
|
30346
30379
|
}
|
|
30347
|
-
let
|
|
30380
|
+
let xr = {
|
|
30348
30381
|
cardId: u,
|
|
30349
30382
|
at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
30350
30383
|
userScore: t,
|
|
30351
30384
|
global: {
|
|
30352
|
-
before:
|
|
30353
|
-
after:
|
|
30385
|
+
before: m,
|
|
30386
|
+
after: D.userElo.global.score
|
|
30354
30387
|
},
|
|
30355
30388
|
card: {
|
|
30356
|
-
before:
|
|
30357
|
-
after:
|
|
30389
|
+
before: g,
|
|
30390
|
+
after: d ? D.cardElo.global.score : g
|
|
30358
30391
|
},
|
|
30359
|
-
...
|
|
30360
|
-
}
|
|
30361
|
-
|
|
30362
|
-
|
|
30392
|
+
...T.length ? { tags: O } : {}
|
|
30393
|
+
};
|
|
30394
|
+
d || logger.info(`[EloService] QA account: card ELO for ${u} not written`);
|
|
30395
|
+
let Sr = await Promise.allSettled([this.user.updateUserElo(c, D.userElo), d ? b.updateCardElo(u, D.cardElo) : Promise.resolve(null)]), Cr = Sr[0].status === "fulfilled", wr = Sr[1].status === "fulfilled";
|
|
30396
|
+
if (Cr && wr) {
|
|
30397
|
+
let t = Sr[0].value, c = Sr[1].value;
|
|
30363
30398
|
t.ok && c && c.ok && logger.info(`[EloService] Updated ELOS:
|
|
30364
|
-
User: ${JSON.stringify(
|
|
30365
|
-
Card: ${JSON.stringify(
|
|
30399
|
+
User: ${JSON.stringify(D.userElo)})
|
|
30400
|
+
Card: ${JSON.stringify(D.cardElo)})
|
|
30366
30401
|
`);
|
|
30367
30402
|
} else logger.warn(`[EloService] Partial ELO update:
|
|
30368
|
-
User ELO update: ${
|
|
30369
|
-
Card ELO update: ${
|
|
30370
|
-
return
|
|
30403
|
+
User ELO update: ${Cr ? "SUCCESS" : "FAILED"}
|
|
30404
|
+
Card ELO update: ${wr ? "SUCCESS" : "FAILED"}`), !Cr && Sr[0].status === "rejected" && logger.error("[EloService] User ELO update error:", Sr[0].reason), !wr && Sr[1].status === "rejected" && logger.error("[EloService] Card ELO update error:", Sr[1].reason);
|
|
30405
|
+
return xr;
|
|
30371
30406
|
}
|
|
30372
30407
|
return null;
|
|
30373
30408
|
}
|
|
@@ -30377,46 +30412,48 @@ ${t.stack}` : JSON.stringify(t);
|
|
|
30377
30412
|
let S = toCourseElo(b.elo), [C, w] = await Promise.all([g.getCardEloData([m.card.card_id]), g.getAppliedTagsBatch([u])]), T = C[0], E = w.get(u) ?? [], D = withCountOnlyRoles(t, u), O = { ...D }, xr = t._global;
|
|
30378
30413
|
for (let t of E) t in O || (O[t] = isCountOnlyTag(t) ? null : xr);
|
|
30379
30414
|
if (T && S) {
|
|
30380
|
-
let t = S.global.score,
|
|
30381
|
-
for (let t of
|
|
30382
|
-
let
|
|
30383
|
-
|
|
30384
|
-
let
|
|
30385
|
-
for (let t of
|
|
30386
|
-
let c = O[t], u = c === null ?
|
|
30387
|
-
|
|
30388
|
-
before:
|
|
30415
|
+
let t = !await this.isQaUser(g), d = S.global.score, C = T.global.score, w = Object.keys(O).filter((t) => t !== "_global"), E = {};
|
|
30416
|
+
for (let t of w) E[t] = S.tags[t]?.score ?? S.global.score;
|
|
30417
|
+
let Sr = adjustCourseScoresPerTag(S, T, O), Cr = (/* @__PURE__ */ new Date()).toISOString(), wr = recordTagPresentations(Sr.userElo, D, m.records, u, Cr);
|
|
30418
|
+
wr.length && logger.info(`[EloService] recent-presentation entries for ${u}: [${wr.join(", ")}]`), b.elo = Sr.userElo;
|
|
30419
|
+
let Tr = {};
|
|
30420
|
+
for (let t of w) {
|
|
30421
|
+
let c = O[t], u = c === null ? E[t] : Sr.userElo.tags[t]?.score ?? E[t];
|
|
30422
|
+
Tr[t] = {
|
|
30423
|
+
before: E[t],
|
|
30389
30424
|
after: u,
|
|
30390
30425
|
score: c
|
|
30391
30426
|
};
|
|
30392
30427
|
}
|
|
30393
|
-
let
|
|
30428
|
+
let Er = {
|
|
30394
30429
|
cardId: u,
|
|
30395
|
-
at:
|
|
30430
|
+
at: Cr,
|
|
30396
30431
|
userScore: xr,
|
|
30397
30432
|
global: {
|
|
30398
|
-
before:
|
|
30399
|
-
after:
|
|
30433
|
+
before: d,
|
|
30434
|
+
after: Sr.userElo.global.score
|
|
30400
30435
|
},
|
|
30401
30436
|
card: {
|
|
30402
|
-
before:
|
|
30403
|
-
after:
|
|
30437
|
+
before: C,
|
|
30438
|
+
after: t ? Sr.cardElo.global.score : C
|
|
30404
30439
|
},
|
|
30405
|
-
...
|
|
30406
|
-
}
|
|
30407
|
-
|
|
30408
|
-
|
|
30440
|
+
...w.length ? { tags: Tr } : {}
|
|
30441
|
+
};
|
|
30442
|
+
t || logger.info(`[EloService] QA account: card ELO for ${u} not written`);
|
|
30443
|
+
let Dr = await Promise.allSettled([this.user.updateUserElo(c, Sr.userElo), t ? g.updateCardElo(u, Sr.cardElo) : Promise.resolve(null)]), Or = Dr[0].status === "fulfilled", kr = Dr[1].status === "fulfilled";
|
|
30444
|
+
if (Or && kr) {
|
|
30445
|
+
let t = Dr[0].value, c = Dr[1].value;
|
|
30409
30446
|
if (t.ok && c && c.ok) {
|
|
30410
30447
|
let t = Object.keys(O).length - 1;
|
|
30411
30448
|
logger.info(`[EloService] Updated ELOS (per-tag, ${t} tags):
|
|
30412
|
-
User: ${JSON.stringify(
|
|
30413
|
-
Card: ${JSON.stringify(
|
|
30449
|
+
User: ${JSON.stringify(Sr.userElo)})
|
|
30450
|
+
Card: ${JSON.stringify(Sr.cardElo)})
|
|
30414
30451
|
`);
|
|
30415
30452
|
}
|
|
30416
30453
|
} else logger.warn(`[EloService] Partial ELO update (per-tag):
|
|
30417
|
-
User ELO update: ${
|
|
30418
|
-
Card ELO update: ${
|
|
30419
|
-
return
|
|
30454
|
+
User ELO update: ${Or ? "SUCCESS" : "FAILED"}
|
|
30455
|
+
Card ELO update: ${kr ? "SUCCESS" : "FAILED"}`), !Or && Dr[0].status === "rejected" && logger.error("[EloService] User ELO update error:", Dr[0].reason), !kr && Dr[1].status === "rejected" && logger.error("[EloService] Card ELO update error:", Dr[1].reason);
|
|
30456
|
+
return Er;
|
|
30420
30457
|
}
|
|
30421
30458
|
return null;
|
|
30422
30459
|
}
|
|
@@ -31462,7 +31499,7 @@ ${t.stack}` : JSON.stringify(t);
|
|
|
31462
31499
|
}, mountSessionDebugger();
|
|
31463
31500
|
} }), init_SessionController = __esm({ "src/study/SessionController.ts"() {
|
|
31464
31501
|
var t;
|
|
31465
|
-
init_SrsService(), init_EloService(), init_ResponseProcessor(), init_CardHydrationService(), init_ItemQueue(), init_couch(), init_core(), init_types_legacy(), init_studySession(), init_recording(), init_util2(), init_navigators(), init_Pipeline(), init_SourceMixer(), init_MixerDebugger(), init_SessionDebugger(), init_SessionOverlay(), init_logger(), PERSISTED_RUNNERS_UP = 5, SessionController = (t = class _SessionController extends Loggable {
|
|
31502
|
+
init_SrsService(), init_EloService(), init_ResponseProcessor(), init_CardHydrationService(), init_ItemQueue(), init_couch(), init_core(), init_types_legacy(), init_studySession(), init_recording(), init_util2(), init_navigators(), init_Pipeline(), init_versionStamps(), init_SourceMixer(), init_MixerDebugger(), init_SessionDebugger(), init_SessionOverlay(), init_logger(), PERSISTED_RUNNERS_UP = 5, SessionController = (t = class _SessionController extends Loggable {
|
|
31466
31503
|
set sessionRecord(t) {
|
|
31467
31504
|
this._sessionRecord = t;
|
|
31468
31505
|
}
|
|
@@ -31528,7 +31565,8 @@ ${t.stack}` : JSON.stringify(t);
|
|
|
31528
31565
|
...u.discardedTail ? { discardedTail: u.discardedTail } : {},
|
|
31529
31566
|
cards: persistedRunCards(u),
|
|
31530
31567
|
...u.unselectedNew ? { unselectedNew: persistedUnselectedNew(u.unselectedNew) } : {},
|
|
31531
|
-
...u.regulators ? { regulators: u.regulators.map(persistedReading) } : {}
|
|
31568
|
+
...u.regulators ? { regulators: u.regulators.map(persistedReading) } : {},
|
|
31569
|
+
...u.versions ? { versions: u.versions } : {}
|
|
31532
31570
|
});
|
|
31533
31571
|
}
|
|
31534
31572
|
}
|
|
@@ -31558,6 +31596,7 @@ ${t.stack}` : JSON.stringify(t);
|
|
|
31558
31596
|
sourceCount: this.sources.length,
|
|
31559
31597
|
initHints: this._sessionHints
|
|
31560
31598
|
},
|
|
31599
|
+
versions: sessionVersions(),
|
|
31561
31600
|
initialQueues: {
|
|
31562
31601
|
supplyQ: this.supplyQ.length,
|
|
31563
31602
|
failedQ: this.failedQ.length
|
|
@@ -33361,7 +33400,7 @@ Currently logged-in as ${this._username}.`);
|
|
|
33361
33400
|
}
|
|
33362
33401
|
};
|
|
33363
33402
|
} }), init_factory = __esm({ "src/factory.ts"() {
|
|
33364
|
-
init_common(), init_logger(), init_navigators(), NOT_SET = "NOT_SET", ENV = {
|
|
33403
|
+
init_common(), init_logger(), init_navigators(), init_versionStamps(), NOT_SET = "NOT_SET", ENV = {
|
|
33365
33404
|
COUCHDB_SERVER_PROTOCOL: NOT_SET,
|
|
33366
33405
|
COUCHDB_SERVER_URL: NOT_SET,
|
|
33367
33406
|
LOCAL_STORAGE_PREFIX: ""
|