Files
ai-course/node_modules/.cache/babel-loader/f1652df610abf1392e59fdfdc1e4930dcacec92f386f1b1eadb7d4038578d940.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
10 KiB
JSON

{"ast":null,"code":"import { warning, secondsToMilliseconds, clamp, millisecondsToSeconds } from 'motion-utils';\nimport { springDefaults } from './defaults.mjs';\nconst safeMin = 0.001;\nfunction findSpring(_ref) {\n let {\n duration = springDefaults.duration,\n bounce = springDefaults.bounce,\n velocity = springDefaults.velocity,\n mass = springDefaults.mass\n } = _ref;\n let envelope;\n let derivative;\n warning(duration <= secondsToMilliseconds(springDefaults.maxDuration), \"Spring duration must be 10 seconds or less\");\n let dampingRatio = 1 - bounce;\n /**\n * Restrict dampingRatio and duration to within acceptable ranges.\n */\n dampingRatio = clamp(springDefaults.minDamping, springDefaults.maxDamping, dampingRatio);\n duration = clamp(springDefaults.minDuration, springDefaults.maxDuration, millisecondsToSeconds(duration));\n if (dampingRatio < 1) {\n /**\n * Underdamped spring\n */\n envelope = undampedFreq => {\n const exponentialDecay = undampedFreq * dampingRatio;\n const delta = exponentialDecay * duration;\n const a = exponentialDecay - velocity;\n const b = calcAngularFreq(undampedFreq, dampingRatio);\n const c = Math.exp(-delta);\n return safeMin - a / b * c;\n };\n derivative = undampedFreq => {\n const exponentialDecay = undampedFreq * dampingRatio;\n const delta = exponentialDecay * duration;\n const d = delta * velocity + velocity;\n const e = Math.pow(dampingRatio, 2) * Math.pow(undampedFreq, 2) * duration;\n const f = Math.exp(-delta);\n const g = calcAngularFreq(Math.pow(undampedFreq, 2), dampingRatio);\n const factor = -envelope(undampedFreq) + safeMin > 0 ? -1 : 1;\n return factor * ((d - e) * f) / g;\n };\n } else {\n /**\n * Critically-damped spring\n */\n envelope = undampedFreq => {\n const a = Math.exp(-undampedFreq * duration);\n const b = (undampedFreq - velocity) * duration + 1;\n return -safeMin + a * b;\n };\n derivative = undampedFreq => {\n const a = Math.exp(-undampedFreq * duration);\n const b = (velocity - undampedFreq) * (duration * duration);\n return a * b;\n };\n }\n const initialGuess = 5 / duration;\n const undampedFreq = approximateRoot(envelope, derivative, initialGuess);\n duration = secondsToMilliseconds(duration);\n if (isNaN(undampedFreq)) {\n return {\n stiffness: springDefaults.stiffness,\n damping: springDefaults.damping,\n duration\n };\n } else {\n const stiffness = Math.pow(undampedFreq, 2) * mass;\n return {\n stiffness,\n damping: dampingRatio * 2 * Math.sqrt(mass * stiffness),\n duration\n };\n }\n}\nconst rootIterations = 12;\nfunction approximateRoot(envelope, derivative, initialGuess) {\n let result = initialGuess;\n for (let i = 1; i < rootIterations; i++) {\n result = result - envelope(result) / derivative(result);\n }\n return result;\n}\nfunction calcAngularFreq(undampedFreq, dampingRatio) {\n return undampedFreq * Math.sqrt(1 - dampingRatio * dampingRatio);\n}\nexport { calcAngularFreq, findSpring };","map":{"version":3,"names":["warning","secondsToMilliseconds","clamp","millisecondsToSeconds","springDefaults","safeMin","findSpring","_ref","duration","bounce","velocity","mass","envelope","derivative","maxDuration","dampingRatio","minDamping","maxDamping","minDuration","undampedFreq","exponentialDecay","delta","a","b","calcAngularFreq","c","Math","exp","d","e","pow","f","g","factor","initialGuess","approximateRoot","isNaN","stiffness","damping","sqrt","rootIterations","result","i"],"sources":["/Users/apple/Documents/cursor/Web课件/AI课/education_web_多Agent协作系统/node_modules/motion-dom/dist/es/animation/generators/spring/find.mjs"],"sourcesContent":["import { warning, secondsToMilliseconds, clamp, millisecondsToSeconds } from 'motion-utils';\nimport { springDefaults } from './defaults.mjs';\n\nconst safeMin = 0.001;\nfunction findSpring({ duration = springDefaults.duration, bounce = springDefaults.bounce, velocity = springDefaults.velocity, mass = springDefaults.mass, }) {\n let envelope;\n let derivative;\n warning(duration <= secondsToMilliseconds(springDefaults.maxDuration), \"Spring duration must be 10 seconds or less\");\n let dampingRatio = 1 - bounce;\n /**\n * Restrict dampingRatio and duration to within acceptable ranges.\n */\n dampingRatio = clamp(springDefaults.minDamping, springDefaults.maxDamping, dampingRatio);\n duration = clamp(springDefaults.minDuration, springDefaults.maxDuration, millisecondsToSeconds(duration));\n if (dampingRatio < 1) {\n /**\n * Underdamped spring\n */\n envelope = (undampedFreq) => {\n const exponentialDecay = undampedFreq * dampingRatio;\n const delta = exponentialDecay * duration;\n const a = exponentialDecay - velocity;\n const b = calcAngularFreq(undampedFreq, dampingRatio);\n const c = Math.exp(-delta);\n return safeMin - (a / b) * c;\n };\n derivative = (undampedFreq) => {\n const exponentialDecay = undampedFreq * dampingRatio;\n const delta = exponentialDecay * duration;\n const d = delta * velocity + velocity;\n const e = Math.pow(dampingRatio, 2) * Math.pow(undampedFreq, 2) * duration;\n const f = Math.exp(-delta);\n const g = calcAngularFreq(Math.pow(undampedFreq, 2), dampingRatio);\n const factor = -envelope(undampedFreq) + safeMin > 0 ? -1 : 1;\n return (factor * ((d - e) * f)) / g;\n };\n }\n else {\n /**\n * Critically-damped spring\n */\n envelope = (undampedFreq) => {\n const a = Math.exp(-undampedFreq * duration);\n const b = (undampedFreq - velocity) * duration + 1;\n return -safeMin + a * b;\n };\n derivative = (undampedFreq) => {\n const a = Math.exp(-undampedFreq * duration);\n const b = (velocity - undampedFreq) * (duration * duration);\n return a * b;\n };\n }\n const initialGuess = 5 / duration;\n const undampedFreq = approximateRoot(envelope, derivative, initialGuess);\n duration = secondsToMilliseconds(duration);\n if (isNaN(undampedFreq)) {\n return {\n stiffness: springDefaults.stiffness,\n damping: springDefaults.damping,\n duration,\n };\n }\n else {\n const stiffness = Math.pow(undampedFreq, 2) * mass;\n return {\n stiffness,\n damping: dampingRatio * 2 * Math.sqrt(mass * stiffness),\n duration,\n };\n }\n}\nconst rootIterations = 12;\nfunction approximateRoot(envelope, derivative, initialGuess) {\n let result = initialGuess;\n for (let i = 1; i < rootIterations; i++) {\n result = result - envelope(result) / derivative(result);\n }\n return result;\n}\nfunction calcAngularFreq(undampedFreq, dampingRatio) {\n return undampedFreq * Math.sqrt(1 - dampingRatio * dampingRatio);\n}\n\nexport { calcAngularFreq, findSpring };\n"],"mappings":"AAAA,SAASA,OAAO,EAAEC,qBAAqB,EAAEC,KAAK,EAAEC,qBAAqB,QAAQ,cAAc;AAC3F,SAASC,cAAc,QAAQ,gBAAgB;AAE/C,MAAMC,OAAO,GAAG,KAAK;AACrB,SAASC,UAAUA,CAAAC,IAAA,EAA0I;EAAA,IAAzI;IAAEC,QAAQ,GAAGJ,cAAc,CAACI,QAAQ;IAAEC,MAAM,GAAGL,cAAc,CAACK,MAAM;IAAEC,QAAQ,GAAGN,cAAc,CAACM,QAAQ;IAAEC,IAAI,GAAGP,cAAc,CAACO;EAAM,CAAC,GAAAJ,IAAA;EACvJ,IAAIK,QAAQ;EACZ,IAAIC,UAAU;EACdb,OAAO,CAACQ,QAAQ,IAAIP,qBAAqB,CAACG,cAAc,CAACU,WAAW,CAAC,EAAE,4CAA4C,CAAC;EACpH,IAAIC,YAAY,GAAG,CAAC,GAAGN,MAAM;EAC7B;AACJ;AACA;EACIM,YAAY,GAAGb,KAAK,CAACE,cAAc,CAACY,UAAU,EAAEZ,cAAc,CAACa,UAAU,EAAEF,YAAY,CAAC;EACxFP,QAAQ,GAAGN,KAAK,CAACE,cAAc,CAACc,WAAW,EAAEd,cAAc,CAACU,WAAW,EAAEX,qBAAqB,CAACK,QAAQ,CAAC,CAAC;EACzG,IAAIO,YAAY,GAAG,CAAC,EAAE;IAClB;AACR;AACA;IACQH,QAAQ,GAAIO,YAAY,IAAK;MACzB,MAAMC,gBAAgB,GAAGD,YAAY,GAAGJ,YAAY;MACpD,MAAMM,KAAK,GAAGD,gBAAgB,GAAGZ,QAAQ;MACzC,MAAMc,CAAC,GAAGF,g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