Files
ai-course/node_modules/.cache/babel-loader/b207b38f99dbe023d1a21dde8c63d30c6740e365804c1205616aefc240843eb6.json
KQL ce6aa207e9 fix: 修复图片路径以适配GitHub Pages base path
- 将所有图片路径从绝对路径改为使用 process.env.PUBLIC_URL
- 修复 HomePage.tsx 中所有图片引用
- 修复 CoursePage.tsx 中所有图片引用
- 确保图片在 GitHub Pages 上正确加载

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-04 09:24:45 +08:00

1 line
16 KiB
JSON

{"ast":null,"code":"import { fillWildcards } from './utils/fill-wildcards.mjs';\nimport { removeNonTranslationalTransform } from './utils/unit-conversion.mjs';\nimport { frame } from '../../frameloop/frame.mjs';\nconst toResolve = new Set();\nlet isScheduled = false;\nlet anyNeedsMeasurement = false;\nlet isForced = false;\nfunction measureAllKeyframes() {\n if (anyNeedsMeasurement) {\n const resolversToMeasure = Array.from(toResolve).filter(resolver => resolver.needsMeasurement);\n const elementsToMeasure = new Set(resolversToMeasure.map(resolver => resolver.element));\n const transformsToRestore = new Map();\n /**\n * Write pass\n * If we're measuring elements we want to remove bounding box-changing transforms.\n */\n elementsToMeasure.forEach(element => {\n const removedTransforms = removeNonTranslationalTransform(element);\n if (!removedTransforms.length) return;\n transformsToRestore.set(element, removedTransforms);\n element.render();\n });\n // Read\n resolversToMeasure.forEach(resolver => resolver.measureInitialState());\n // Write\n elementsToMeasure.forEach(element => {\n element.render();\n const restore = transformsToRestore.get(element);\n if (restore) {\n restore.forEach(_ref => {\n var _element$getValue;\n let [key, value] = _ref;\n (_element$getValue = element.getValue(key)) === null || _element$getValue === void 0 || _element$getValue.set(value);\n });\n }\n });\n // Read\n resolversToMeasure.forEach(resolver => resolver.measureEndState());\n // Write\n resolversToMeasure.forEach(resolver => {\n if (resolver.suspendedScrollY !== undefined) {\n window.scrollTo(0, resolver.suspendedScrollY);\n }\n });\n }\n anyNeedsMeasurement = false;\n isScheduled = false;\n toResolve.forEach(resolver => resolver.complete(isForced));\n toResolve.clear();\n}\nfunction readAllKeyframes() {\n toResolve.forEach(resolver => {\n resolver.readKeyframes();\n if (resolver.needsMeasurement) {\n anyNeedsMeasurement = true;\n }\n });\n}\nfunction flushKeyframeResolvers() {\n isForced = true;\n readAllKeyframes();\n measureAllKeyframes();\n isForced = false;\n}\nclass KeyframeResolver {\n constructor(unresolvedKeyframes, onComplete, name, motionValue, element) {\n let isAsync = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : false;\n this.state = \"pending\";\n /**\n * Track whether this resolver is async. If it is, it'll be added to the\n * resolver queue and flushed in the next frame. Resolvers that aren't going\n * to trigger read/write thrashing don't need to be async.\n */\n this.isAsync = false;\n /**\n * Track whether this resolver needs to perform a measurement\n * to resolve its keyframes.\n */\n this.needsMeasurement = false;\n this.unresolvedKeyframes = [...unresolvedKeyframes];\n this.onComplete = onComplete;\n this.name = name;\n this.motionValue = motionValue;\n this.element = element;\n this.isAsync = isAsync;\n }\n scheduleResolve() {\n this.state = \"scheduled\";\n if (this.isAsync) {\n toResolve.add(this);\n if (!isScheduled) {\n isScheduled = true;\n frame.read(readAllKeyframes);\n frame.resolveKeyframes(measureAllKeyframes);\n }\n } else {\n this.readKeyframes();\n this.complete();\n }\n }\n readKeyframes() {\n const {\n unresolvedKeyframes,\n name,\n element,\n motionValue\n } = this;\n // If initial keyframe is null we need to read it from the DOM\n if (unresolvedKeyframes[0] === null) {\n const currentValue = motionValue === null || motionValue === void 0 ? void 0 : motionValue.get();\n // TODO: This doesn't work if the final keyframe is a wildcard\n const finalKeyframe = unresolvedKeyframes[unresolvedKeyframes.length - 1];\n if (currentValue !== undefined) {\n unresolvedKeyframes[0] = currentValue;\n } else if (element && name) {\n const valueAsRead = element.readValue(name, finalKeyframe);\n if (valueAsRead !== undefined && valueAsRead !== null) {\n unresolvedKeyframes[0] = valueAsRead;\n }\n }\n if (unresolvedKeyframes[0] === undefined) {\n unresolvedKeyframes[0] = finalKeyframe;\n }\n if (motionValue && currentValue === undefined) {\n motionValue.set(unresolvedKeyframes[0]);\n }\n }\n fillWildcards(unresolvedKeyframes);\n }\n setFinalKeyframe() {}\n measureInitialState() {}\n renderEndStyles() {}\n measureEndState() {}\n complete() {\n let isForcedComplete = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n this.state = \"complete\";\n this.onComplete(this.unresolvedKeyframes, this.finalKeyframe, isForcedComplete);\n toResolve.delete(this);\n }\n cancel() {\n if (this.state === \"scheduled\") {\n toResolve.delete(this);\n this.state = \"pending\";\n }\n }\n resume() {\n if (this.state === \"pending\") this.scheduleResolve();\n }\n}\nexport { KeyframeResolver, flushKeyframeResolvers };","map":{"version":3,"names":["fillWildcards","removeNonTranslationalTransform","frame","toResolve","Set","isScheduled","anyNeedsMeasurement","isForced","measureAllKeyframes","resolversToMeasure","Array","from","filter","resolver","needsMeasurement","elementsToMeasure","map","element","transformsToRestore","Map","forEach","removedTransforms","length","set","render","measureInitialState","restore","get","_ref","_element$getValue","key","value","getValue","measureEndState","suspendedScrollY","undefined","window","scrollTo","complete","clear","readAllKeyframes","readKeyframes","flushKeyframeResolvers","KeyframeResolver","constructor","unresolvedKeyframes","onComplete","name","motionValue","isAsync","arguments","state","scheduleResolve","add","read","resolveKeyframes","currentValue","finalKeyframe","valueAsRead","readValue","setFinalKeyframe","renderEndStyles","isForcedComplete","delete","cancel","resume"],"sources":["/Users/apple/Documents/cursor/Web课件/AI课/education_web_多Agent协作系统/node_modules/motion-dom/dist/es/animation/keyframes/KeyframesResolver.mjs"],"sourcesContent":["import { fillWildcards } from './utils/fill-wildcards.mjs';\nimport { removeNonTranslationalTransform } from './utils/unit-conversion.mjs';\nimport { frame } from '../../frameloop/frame.mjs';\n\nconst toResolve = new Set();\nlet isScheduled = false;\nlet anyNeedsMeasurement = false;\nlet isForced = false;\nfunction measureAllKeyframes() {\n if (anyNeedsMeasurement) {\n const resolversToMeasure = Array.from(toResolve).filter((resolver) => resolver.needsMeasurement);\n const elementsToMeasure = new Set(resolversToMeasure.map((resolver) => resolver.element));\n const transformsToRestore = new Map();\n /**\n * Write pass\n * If we're measuring elements we want to remove bounding box-changing transforms.\n */\n elementsToMeasure.forEach((element) => {\n const removedTransforms = removeNonTranslationalTransform(element);\n if (!removedTransforms.length)\n return;\n transformsToRestore.set(element, removedTransforms);\n element.render();\n });\n // Read\n resolversToMeasure.forEach((resolver) => resolver.measureInitialState());\n // Write\n elementsToMeasure.forEach((element) => {\n element.render();\n const restore = transformsToRestore.get(element);\n if (restore) {\n restore.forEach(([key, value]) => {\n element.getValue(key)?.set(value);\n });\n }\n });\n // Read\n resolversToMeasure.forEach((resolver) => resolver.measureEndState());\n // Write\n resolversToMeasure.forEach((resolver) => {\n if (resolver.suspendedScrollY !== undefined) {\n window.scrollTo(0, resolver.suspendedScrollY);\n }\n });\n }\n anyNeedsMeasurement = false;\n isScheduled = false;\n toResolve.forEach((resolver) => resolver.complete(isForced));\n toResolve.clear();\n}\nfunction readAllKeyframes() {\n toResolve.forEach((resolver) => {\n resolver.readKeyframes();\n if (resolver.needsMeasurement) {\n anyNeedsMeasurement = true;\n }\n });\n}\nfunction flushKeyframeResolvers() {\n isForced = true;\n readAllKeyframes();\n measureAllKeyframes();\n isForced = false;\n}\nclass KeyframeResolver {\n constructor(unresolvedKeyframes, onComplete, name, motionValue, element, isAsync = false) {\n this.state = \"pending\";\n /**\n * Track whether this resolver is async. If it is, it'll be added to the\n * resolver queue and flushed in the next frame. Resolvers that aren't going\n * to trigger read/write thrashing don't need to be async.\n */\n this.isAsync = false;\n /**\n * Track whether this resolver needs to perform a measurement\n * to resolve its keyframes.\n */\n this.needsMeasurement = false;\n this.unresolvedKeyframes = [...unresolvedKeyframes];\n this.onComplete = onComplete;\n this.name = name;\n this.motionValue = motionValue;\n this.element = element;\n this.isAsync = isAsync;\n }\n scheduleResolve() {\n this.state = \"scheduled\";\n if (this.isAsync) {\n toResolve.add(this);\n if (!isScheduled) {\n isScheduled = true;\n frame.read(readAllKeyframes);\n frame.resolveKeyframes(measureAllKeyframes);\n }\n }\n else {\n this.readKeyframes();\n this.complete();\n }\n }\n readKeyframes() {\n const { unresolvedKeyframes, name, element, motionValue } = this;\n // If initial keyframe is null we need to read it from the DOM\n if (unresolvedKeyframes[0] === null) {\n const currentValue = motionValue?.get();\n // TODO: This doesn't work if the final keyframe is a wildcard\n const finalKeyframe = unresolvedKeyframes[unresolvedKeyframes.length - 1];\n if (currentValue !== undefined) {\n unresolvedKeyframes[0] = currentValue;\n }\n else if (element && name) {\n const valueAsRead = element.readValue(name, finalKeyframe);\n if (valueAsRead !== undefined && valueAsRead !== null) {\n unresolvedKeyframes[0] = valueAsRead;\n }\n }\n if (unresolvedKeyframes[0] === undefined) {\n unresolvedKeyframes[0] = finalKeyframe;\n }\n if (motionValue && currentValue === undefined) {\n motionValue.set(unresolvedKeyframes[0]);\n }\n }\n fillWildcards(unresolvedKeyframes);\n }\n setFinalKeyframe() { }\n measureInitialState() { }\n renderEndStyles() { }\n measureEndState() { }\n complete(isForcedComplete = false) {\n this.state = \"complete\";\n this.onComplete(this.unresolvedKeyframes, this.finalKeyframe, isForcedComplete);\n toResolve.delete(this);\n }\n cancel() {\n if (this.state === \"scheduled\") {\n toResolve.delete(this);\n this.state = \"pending\";\n }\n }\n resume() {\n if (this.state === \"pending\")\n this.scheduleResolve();\n }\n}\n\nexport { KeyframeResolver, flushKeyframeResolvers };\n"],"mappings":"AAAA,SAASA,aAAa,QAAQ,4BAA4B;AAC1D,SAASC,+BAA+B,QAAQ,6BAA6B;AAC7E,SAASC,KAAK,QAAQ,2BAA2B;AAEjD,MAAMC,SAAS,GAAG,IAAIC,GAAG,CAAC,CAAC;AAC3B,IAAIC,WAAW,GAAG,KAAK;AACvB,IAAIC,mBAAmB,GAAG,KAAK;AAC/B,IAAIC,QAAQ,GAAG,KAAK;AACpB,SAASC,mBAAmBA,CAAA,EAAG;EAC3B,IAAIF,mBAAmB,EAAE;IACrB,MAAMG,kBAAkB,GAAGC,K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