1import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t,r as n}from"./framework-CEIHKgr7.js";import{PublicAccessLink as r}from"./public-access-link-BR_Xta2m.js";function i(e){return e===`m`?8:e===`p`?3:0}function a(e,t,n,r,i,a,o={}){return{id:e,parent:t,status:n,glyph:r,en:{label:i[0],desc:i[1]},ar:{label:a[0],desc:a[1]},...o}}var o=a(`alg`,null,`m`,`x²`,[`Algebra`,`Solving and rearranging equations. Every branch grows from here.`],[`Ø§ÙØ¬Ø¨Ø±`,`ØÙ اÙÙ
Ø¹Ø§Ø¯ÙØ§Øª ÙØ¥Ø¹Ø§Ø¯Ø© ØªØ±ØªÙØ¨Ùا. ÙÙ ÙØ±Ø¹ ÙØ¨Ø¯Ø£ Ù
Ù ÙÙØ§.`]),s=[{id:`robotics`,icon:`robot`,en:{label:`Robotics`,tagline:`Make a robot arm move exactly where you point it.`},ar:{label:`Ø§ÙØ±ÙØ¨ÙØªØ§Øª`,tagline:`ØØ±Ù٠ذراع Ø±ÙØ¨Ùت Ø¥Ù٠اÙÙ
ÙØ§Ù اÙÙÙ ØªØ´ÙØ± Ø¥ÙÙÙ Ø¨Ø§ÙØ¶Ø¨Ø·.`},branches:{trig:{en:`Geometry`,ar:`اÙÙÙØ¯Ø³Ø©`},der:{en:`Calculus`,ar:`Ø§ÙØªÙØ§Ø¶Ù ÙØ§ÙØªÙØ§Ù
Ù`},newt:{en:`Mechanics`,ar:`اÙÙ
ÙÙØ§ÙÙÙØ§`}},nodes:[o,a(`trig`,`alg`,`m`,`θ`,[`Trigonometry`,`Angles, sine and cosine. Every joint of an arm is an angle.`],[`ØØ³Ø§Ø¨ اÙÙ
Ø«ÙØ«Ø§Øª`,`Ø§ÙØ²ÙØ§ÙØ§ ÙØ§ÙØ¬ÙØ¨ ÙØ¬Ùب Ø§ÙØªÙ
اÙ
. ÙÙ Ù
ÙØµÙ ÙÙ Ø§ÙØ°Ø±Ø§Ø¹ زاÙÙØ©.`]),a(`vec`,`trig`,`m`,`vâ`,[`Vectors`,`Quantities with size and direction: positions, forces, velocities.`],[`اÙÙ
ØªØ¬ÙØ§Øª`,`ÙÙ
ÙØ§Øª ÙÙØ§ Ù
ÙØ¯Ø§Ø± ÙØ§ØªØ¬Ø§Ù: اÙÙ
ÙØ§Ùع ÙØ§ÙÙÙÙ ÙØ§Ùسرعات.`]),a(`mat`,`vec`,`p`,`[ ]`,[`Matrices`,`Grids of numbers that rotate, scale and move points in space.`],[`اÙÙ
صÙÙÙØ§Øª`,`جداÙÙ Ø£Ø±ÙØ§Ù
تدÙÙØ± اÙÙÙØ§Ø· ÙØªÙØ¨ÙØ±Ùا ÙØªÙÙÙÙØ§ Ù٠اÙÙØ¶Ø§Ø¡.`]),a(`xf`,`mat`,`s`,`â²`,[`Transformations`,`Chaining rotations and frames, one joint at a time.`],[`Ø§ÙØªØÙÙÙØ§Øª`,`ربط Ø§ÙØ¯ÙØ±Ø§ÙØ§Øª ÙØ§ÙØ¥Ø·Ø§Ø±Ø§ØªØ Ù
ÙØµÙÙØ§ بعد Ù
ÙØµÙ.`]),a(`fk`,`xf`,`s`,`FK`,[`Forward kinematics`,`Given every joint angle, where does the hand end up?`],[`Ø§ÙØØ±ÙÙØ§Øª Ø§ÙØ£Ù
اÙ
ÙØ©`,`إذا Ø¹Ø±ÙØª زاÙÙØ© ÙÙ Ù
ÙØµÙØ ÙÙÙ ØªÙØµÙ ÙØ¯ Ø§ÙØ±ÙØ¨ÙØªØ`]),a(`ik`,`fk`,`s`,`IK`,[`Inverse kinematics`,`The reverse question: which angles put the hand on the target?`],[`Ø§ÙØØ±ÙÙØ§Øª Ø§ÙØ¹ÙØ³ÙØ©`,`Ø§ÙØ³Ø¤Ø§Ù اÙÙ
Ø¹Ø§ÙØ³: Ø£Ù Ø²ÙØ§Ùا ØªÙØµÙ اÙÙØ¯ Ø¥Ù٠اÙÙØ¯ÙØ`],{cap:!0,also:[`chain`]}),a(`dot`,`vec`,`r`,`Ã`,[`Dot & cross products`,`Measuring angles between directions and finding what is perpendicular.`],[`Ø§ÙØ¶Ø±Ø¨ اÙÙÙØ·Ù ÙØ§ÙاتجاÙÙ`,`ÙÙØ§Ø³ Ø§ÙØ²ÙØ§ÙØ§ بÙÙ Ø§ÙØ§ØªØ¬Ø§Ùات ÙØ¥Ùجاد Ø§ÙØ§ØªØ¬Ø§Ù Ø§ÙØ¹Ù
ÙØ¯Ù.`]),a(`der`,`alg`,`m`,`fâ²`,[`Derivatives`,`How fast things change. Speed is the derivative of position.`],[`اÙÙ
Ø´ØªÙØ§Øª`,`Ù
د٠سرعة Ø§ÙØªØºÙÙØ±. Ø§ÙØ³Ø±Ø¹Ø© ÙÙ Ù
Ø´ØªÙØ© اÙÙ
ÙÙØ¹.`]),a(`chain`,`der`,`r`,`fâg`,[`Chain rule`,`Differentiating functions inside functions, like an angle that changes over time.`],[`ÙØ§Ø¹Ø¯Ø© Ø§ÙØ³ÙØ³ÙØ©`,`Ø§Ø´ØªÙØ§Ù Ø¯Ø§ÙØ© Ø¯Ø§Ø®Ù Ø¯Ø§ÙØ©Ø Ù
ث٠زاÙÙØ© تتغÙÙØ± Ù
ع Ø§ÙØ²Ù
Ù.`]),a(`ode`,`chain`,`s`,`yâ²`,[`Differential equations`,`Equations about change, used to predict how a system settles.`],[`اÙÙ
Ø¹Ø§Ø¯ÙØ§Øª Ø§ÙØªÙاضÙÙØ©`,`Ù
Ø¹Ø§Ø¯ÙØ§Øª ØªØµÙ Ø§ÙØªØºÙÙØ±Ø ÙØªØªÙبأ ÙÙÙ ÙØ³ØªÙر اÙÙØ¸Ø§Ù
.`]),a(`ctrl`,`ode`,`s`,`â»`,[`Feedback control`,`Measure the error, correct it, repeat.`],[`Ø§ÙØªØÙÙ
Ø¨Ø§ÙØªØºØ°ÙØ© Ø§ÙØ±Ø§Ø¬Ø¹Ø©`,`ÙÙØ³ Ø§ÙØ®Ø·Ø£Ø صØÙØÙØ ÙÙØ±Ùر.`]),a(`pid`,`ctrl`,`s`,`PID`,[`PID control`,`The controller inside almost every motor that holds a position.`],[`Ù
تØÙÙ
PID`,`اÙÙ
تØÙÙ
اÙÙ
ÙØ¬Ùد ÙÙ Ø£ØºÙØ¨ اÙÙ
ØØ±Ùات اÙÙÙ ØªØ«Ø¨ÙØª Ù
ÙØ¶Ø¹Ùا.`],{cap:!0,also:[`int`]}),a(`int`,`der`,`m`,`â«`,[`Integrals`,`Adding up change. From velocity back to position.`],[`Ø§ÙØªÙاÙ
ÙØ§Øª`,`جÙ
ع Ø§ÙØªØºÙÙØ±. Ù
Ù Ø§ÙØ³Ø±Ø¹Ø© Ø±Ø¬ÙØ¹Ùا Ø¥Ù٠اÙÙ
ÙÙØ¹.`]),a(`acc`,`int`,`p`,`Σ`,[`Accumulation`,`Building totals from rates, the idea behind every sensor reading over time.`],[`Ø§ÙØªØ±Ø§ÙÙ
`,`Ø¨ÙØ§Ø¡ اÙÙ
جاÙ
ÙØ¹ Ù
٠اÙÙ
Ø¹Ø¯ÙØ§ØªØ ÙÙÙ ÙÙØ±Ø© Ø£Ù ÙØ±Ø§Ø¡Ø© ØØ³Ùاس عبر Ø§ÙØ²Ù
Ù.`]),a(`newt`,`alg`,`m`,`F`,[`Newtonâs laws`,`Force equals mass times acceleration, and what that means for anything that moves.`],[`ÙÙØ§ÙÙÙ ÙÙÙØªÙ`,`اÙÙÙØ© تساÙ٠اÙÙØªÙØ© ÙÙ Ø§ÙØªØ³Ø§Ø±Ø¹Ø ÙÙ
عÙ٠ذÙÙ ÙÙÙ Ø´ÙØ¡ ÙØªØØ±Ù.`]),a(`torque`,`newt`,`r`,`Ï`,[`Torque`,`Forces that twist. Why a longer arm needs a stronger motor.`],[`Ø§ÙØ¹Ø²Ù
`,`ÙÙ٠تسبب Ø§ÙØ¯ÙØ±Ø§ÙØ ÙÙÙØ°Ø§ Ø§ÙØ°Ø±Ø§Ø¹ Ø§ÙØ£Ø·ÙÙ ØªØØªØ§Ø¬ Ù
ØØ±ÙÙØ§ Ø£ÙÙÙ.`]),a(`dyn`,`torque`,`s`,`Ï`,[`Rigid-body dynamics`,`How linked, solid parts accelerate when forces act on them.`],[`دÙÙØ§Ù
ÙÙØ§ Ø§ÙØ£Ø¬Ø³Ø§Ù
Ø§ÙØµÙبة`,`ÙÙ٠تتسارع Ø§ÙØ£Ø¬Ø²Ø§Ø¡ Ø§ÙØµÙبة اÙÙ
ترابطة ÙÙ
ا تؤثر عÙÙÙØ§ اÙÙÙÙ.`],{also:[`mat`]}),a(`act`,`dyn`,`s`,`M`,[`Actuators`,`Choosing motors that can actually move the arm you designed.`],[`اÙÙ
شغÙÙØ§Øª`,`Ø§Ø®ØªÙØ§Ø± Ù
ØØ±Ùات ØªÙØ¯Ø± ÙØ¹ÙÙØ§ ØªØØ±ÙÙ Ø§ÙØ°Ø±Ø§Ø¹ اÙÙ٠صÙ
Ù
ØªÙØ§.`],{cap:!0,also:[`energy`]}),a(`fric`,`newt`,`m`,`μ`,[`Friction`,`The force that resists sliding, and why grippers need it.`],[`Ø§ÙØ§ØØªÙاÙ`,`اÙÙÙØ© اÙÙÙ ØªÙØ§ÙÙ
Ø§ÙØ§ÙØ²ÙØ§ÙØ ÙÙÙØ°Ø§ ØªØØªØ§Ø¬Ùا اÙÙØ§Ø¨Ø¶Ø§Øª.`]),a(`energy`,`fric`,`r`,`W`,[`Work & energy`,`Where the effort goes, and how much power a joint needs.`],[`Ø§ÙØ´ØºÙ ÙØ§ÙØ·Ø§ÙØ©`,`ÙÙÙ ÙØ±ÙØ Ø§ÙØ¬ÙØ¯Ø ÙÙÙ
ÙØ¯Ø±Ø© ÙØØªØ§Ø¬ÙØ§ ÙÙ Ù
ÙØµÙ.`],{also:[`int`]})]},{id:`space`,icon:`rocket`,en:{label:`Spaceflight`,tagline:`Understand how a rocket reaches orbit, and how it gets home.`},ar:{label:`رØÙات اÙÙØ¶Ø§Ø¡`,tagline:`اÙÙÙ
ÙÙÙ ÙÙØµÙ Ø§ÙØµØ§Ø±ÙØ® Ø¥Ù٠اÙÙ
Ø¯Ø§Ø±Ø ÙÙÙÙ ÙØ±Ø¬Ø¹.`},branches:{trig:{en:`Motion`,ar:`Ø§ÙØØ±ÙØ©`},der:{en:`Calculus`,ar:`Ø§ÙØªÙØ§Ø¶Ù ÙØ§ÙØªÙØ§Ù
Ù`},newt:{en:`Mechanics`,ar:`اÙÙ
ÙÙØ§ÙÙÙØ§`}},nodes:[o,a(`trig`,`alg`,`m`,`θ`,[`Trigonometry`,`Angles and components. Every launch has a pitch angle.`],[`ØØ³Ø§Ø¨ اÙÙ
Ø«ÙØ«Ø§Øª`,`Ø§ÙØ²ÙØ§ÙØ§ ÙØ§ÙÙ
رÙÙØ¨Ø§Øª. ÙÙ Ø¥Ø·ÙØ§Ù Ù٠زاÙÙØ© Ù
ÙÙ.`]),a(`vec`,`trig`,`m`,`vâ`,[`Vectors`,`Splitting motion into directions you can handle one at a time.`],[`اÙÙ
ØªØ¬ÙØ§Øª`,`ØªÙØ³ÙÙ
Ø§ÙØØ±ÙØ© Ø¥ÙÙ Ø§ØªØ¬Ø§ÙØ§Øª تتعاÙ
Ù Ù
ع ÙÙ ÙØ§ØØ¯ Ù
ÙÙØ§ ÙØØ§ÙÙ.`]),a(`kin`,`vec`,`m`,`v`,[`Kinematics`,`Describing motion with position, velocity and time.`],[`عÙÙ
Ø§ÙØØ±ÙØ©`,`ÙØµÙ Ø§ÙØØ±ÙØ© باÙÙ
ÙÙØ¹ ÙØ§Ùسرعة ÙØ§ÙزÙ
Ù.`]),a(`proj`,`kin`,`r`,`â`,[`Projectile motion`,`The curved path of anything thrown, launched or falling.`],[`ØØ±ÙØ© اÙÙ
ÙØ°ÙÙØ§Øª`,`اÙÙ
سار اÙÙ
ÙØÙÙ ÙØ£Ù Ø´ÙØ¡ ÙÙØ±Ù
٠أ٠ÙÙØ
1·ÙÙ Ø£Ù ÙØ³ÙØ·.`]),a(`circ`,`kin`,`r`,`â¯`,[`Circular motion`,`Why moving in a circle needs a constant pull toward the center.`],[`Ø§ÙØØ±ÙØ© Ø§ÙØ¯Ø§Ø¦Ø±ÙØ©`,`ÙÙØ´ Ø§ÙØØ±ÙØ© Ù٠دائرة ØªØØªØ§Ø¬ شدÙÙØ§ Ù
ستÙ
Ø±ÙØ§ ÙØÙ Ø§ÙÙ
Ø±ÙØ².`]),a(`esc`,`circ`,`s`,`vâ`,[`Escape velocity`,`How fast you must go to never fall back.`],[`سرعة Ø§ÙØ¥ÙÙØ§Øª`,`ÙÙ
ÙØ§Ø²Ù
تÙÙ٠سرعت٠عشا٠Ù
ا ترجع ØªØ³ÙØ· Ø£Ø¨Ø¯ÙØ§.`],{cap:!0,also:[`energy`]}),a(`der`,`alg`,`m`,`fâ²`,[`Derivatives`,`Rates of change. Velocity, acceleration, burn rate.`],[`اÙÙ
Ø´ØªÙØ§Øª`,`Ù
Ø¹Ø¯ÙØ§Øª Ø§ÙØªØºÙÙØ±: Ø§ÙØ³Ø±Ø¹Ø© ÙØ§Ùتسارع ÙÙ
Ø¹Ø¯Ù Ø§ØØªØ±Ø§Ù اÙÙÙÙØ¯.`]),a(`int`,`der`,`p`,`â«`,[`Integrals`,`Adding up change. From acceleration back to velocity and distance.`],[`Ø§ÙØªÙاÙ
ÙØ§Øª`,`جÙ
ع Ø§ÙØªØºÙÙØ±. Ù
Ù Ø§ÙØªØ³Ø§Ø±Ø¹ Ø±Ø¬ÙØ¹Ùا Ø¥ÙÙ Ø§ÙØ³Ø±Ø¹Ø© ÙØ§ÙÙ
Ø³Ø§ÙØ©.`]),a(`ode`,`int`,`s`,`yâ²`,[`Differential equations`,`Motion where the forces keep changing as you go.`],[`اÙÙ
Ø¹Ø§Ø¯ÙØ§Øª Ø§ÙØªÙاضÙÙØ©`,`ØØ±ÙØ© تتغÙÙØ± ÙÙÙØ§ اÙÙÙ٠باستÙ
رار.`]),a(`traj`,`ode`,`s`,`⤴`,[`Trajectory design`,`Planning the path from launch pad to orbit.`],[`تصÙ
ÙÙ
اÙÙ
سار`,`ØªØ®Ø·ÙØ· Ø§ÙØ·Ø±ÙÙ Ù
Ù Ù
ÙØµØ© Ø§ÙØ¥Ø·Ùا٠إÙ٠اÙÙ
دار.`],{cap:!0,also:[`proj`]}),a(`rates`,`der`,`r`,`d/dt`,[`Related rates`,`How one changing quantity drives another.`],[`اÙÙ
Ø¹Ø¯ÙØ§Øª اÙÙ
رتبطة`,`ÙÙ٠تتØÙÙ
ÙÙ
ÙØ© Ù
تغÙÙØ±Ø© ÙÙ ÙÙ
ÙØ© ثاÙÙØ©.`]),a(`newt`,`alg`,`m`,`F`,[`Newtonâs laws`,`Thrust, weight and drag, and how they add up to motion.`],[`ÙÙØ§ÙÙÙ ÙÙÙØªÙ`,`Ø§ÙØ¯Ùع ÙØ§ÙÙØ²Ù ÙØ§ÙØ³ØØ¨Ø ÙÙÙ٠تجتÙ
ع ÙØªÙتج Ø§ÙØØ±ÙØ©.`]),a(`grav`,`newt`,`r`,`g`,[`Gravitation`,`The inverse-square pull that shapes every orbit.`],[`Ø§ÙØ¬Ø§Ø°Ø¨ÙØ©`,`Ø§ÙØ¬Ø°Ø¨ Ø§ÙØ¹ÙØ³Ù Ø§ÙØªØ±Ø¨Ùع٠اÙÙÙ ÙØ´ÙÙÙ ÙÙ Ù
دار.`]),a(`orbit`,`grav`,`s`,`â`,[`Orbits`,`Falling around a planet fast enough to keep missing it.`],[`اÙÙ
دارات`,`Ø§ÙØ³ÙÙØ· ØÙÙ ÙÙÙØ¨ بسرعة ÙØ§ÙÙØ© تخÙÙ٠تÙÙØªÙ دائÙ
ÙØ§.`],{also:[`circ`]}),a(`xfer`,`orbit`,`s`,`â`,[`Orbital transfers`,`Moving between orbits with the fewest, cleverest burns.`],[`Ø§ÙØ§ÙØªÙØ§Ùات اÙÙ
Ø¯Ø§Ø±ÙØ©`,`Ø§ÙØ§ÙØªÙØ§Ù بÙ٠اÙÙ
دارات بأÙ٠عدد Ù
Ù Ø§ÙØ¥Ø´Ø¹Ø§Ùات ÙØ£Ø°ÙØ§ÙØ§.`],{cap:!0}),a(`mom`,`newt`,`m`,`p`,[`Momentum`,`Push mass one way and you move the other. How rockets work at all.`],[`Ø§ÙØ²Ø®Ù
`,`Ø§Ø¯ÙØ¹ ÙØªÙØ© ÙÙ Ø§ØªØ¬Ø§ÙØ ÙØªØªØØ±Ù Ø£ÙØª ÙÙ Ø§ÙØ§ØªØ¬Ø§Ù اÙÙ
Ø¹Ø§ÙØ³. ÙÙØ°Ø§ ØªØ´ØªØºÙ Ø§ÙØµÙØ§Ø±ÙØ®.`]),a(`thrust`,`mom`,`r`,`â²`,[`Thrust`,`Turning exhaust speed into force.`],[`ÙÙØ© Ø§ÙØ¯Ùع`,`تØÙÙ٠سرعة Ø§ÙØ¹Ø§Ø¯Ù
Ø¥ÙÙ ÙÙØ©.`]),a(`energy`,`thrust`,`s`,`E`,[`Orbital energy`,`Why climbing higher costs speed, and speed costs fuel.`],[`Ø·Ø§ÙØ© اÙÙ
دار`,`ÙÙØ´ Ø§ÙØ§Ø±ØªÙاع ÙÙÙÙÙÙ Ø³Ø±Ø¹Ø©Ø ÙØ§Ùسرعة تÙÙÙÙÙ ÙÙÙØ¯Ùا.`]),a(`rkt`,`energy`,`s`,`Îv`,[`Rocket equation`,`How much fuel a change in speed really costs.`],[`Ù
Ø¹Ø§Ø¯ÙØ© Ø§ÙØµØ§Ø±ÙØ®`,`ÙÙ
ÙÙÙØ¯ ÙÙÙÙÙ٠تغÙÙØ± Ø§ÙØ³Ø±Ø¹Ø© ÙØ¹ÙÙØ§.`],{cap:!0,also:[`int`]})]},{id:`ml`,icon:`network`,en:{label:`Machine learning`,tagline:`See what actually happens when a model learns from data.`},ar:{label:`تعÙÙÙ
Ø§ÙØ¢ÙØ©`,tagline:`Ø´ÙÙ ÙØ´ ÙØµÙر ÙØ¹ÙÙØ§ ÙÙ
ا ÙØªØ¹ÙÙ
اÙÙÙ
ÙØ°Ø¬ Ù
Ù Ø§ÙØ¨ÙØ§ÙØ§Øª.`},branches:{func:{en:`Calculus`,ar:`Ø§ÙØªÙØ§Ø¶Ù ÙØ§ÙØªÙØ§Ù
Ù`},vec:{en:`Linear algebra`,ar:`Ø§ÙØ¬Ø¨Ø± Ø§ÙØ®Ø·Ù`},prob:{en:`Statistics`,ar:`Ø§ÙØ¥ØØµØ§Ø¡`}},nodes:[o,a(`func`,`alg`,`m`,`f(x)`,[`Functions`,`Inputs, outputs and their shapes. A model is a function.`],[`Ø§ÙØ¯ÙاÙ`,`Ù
Ø¯Ø®ÙØ§Øª ÙÙ
خرجات ÙØ£Ø´ÙاÙÙØ§. اÙÙÙ
ÙØ°Ø¬ ÙÙØ³Ù Ø¯Ø§ÙØ©.`]),a(`der`,`func`,`m`,`fâ²`,[`Derivatives`,`How much the output moves when you nudge the input.`],[`اÙÙ
Ø´ØªÙØ§Øª`,`ÙÙ
ÙØªØØ±Ù اÙÙØ§ØªØ¬ ÙÙ
ا ØªØØ±Ù٠اÙÙ
دخ٠ÙÙÙÙÙØ§.`]),a(`part`,`der`,`r`,`â`,[`Partial derivatives`,`Changing one input at a time while holding the rest still.`],[`اÙÙ
Ø´ØªÙØ§Øª Ø§ÙØ¬Ø²Ø¦ÙØ©`,`تغÙÙØ± Ù
Ø¯Ø®Ù ÙØ§ØØ¯ ÙØªØ«Ø¨Ùت Ø§ÙØ¨Ø§ÙÙ.`]),a(`grad`,`part`,`s`,`â`,[`Gradients`,`The direction in which a function rises fastest.`],[`Ø§ÙØªØ¯Ø±Ùج`,`Ø§ÙØ§ØªØ¬Ø§Ù اÙÙÙ ØªØ±ØªÙØ¹ ÙÙÙ Ø§ÙØ¯Ø§ÙØ© بأسرع Ø´ÙÙ.`]),a(`gd`,`grad`,`s`,`â`,[`Gradient descent`,`Walking downhill on the error, one small step at a time.`],[`Ø§ÙØ§ÙØØ¯Ø§Ø± Ø§ÙØªØ¯Ø±ÙجÙ`,`اÙÙØ²Ù٠عÙÙ Ù
ÙØÙÙ Ø§ÙØ®Ø·Ø£Ø Ø®Ø·ÙØ© ØµØºÙØ±Ø© ÙÙ Ù
رة.`],{also:[`opt`]}),a(`bp`,`gd`,`s`,`â `,[`Backpropagation`,`The chain rule, run backwards through a whole network.`],[`Ø§ÙØ§Ùتشار Ø§ÙØ¹ÙسÙ`,`ÙØ§Ø¹Ø¯Ø© Ø§ÙØ³ÙØ³ÙØ©Ø ØªÙØ·Ø¨ÙÙÙ Ø¨Ø§ÙØ¹Ùس عبر Ø§ÙØ´Ø¨ÙØ© ÙØ§Ù
ÙØ©.`],{cap:!0,also:[`mat`]}),a(`opt`,`der`,`r`,`min`,[`Optimization`,`Finding the lowest point of a function.`],[`Ø§ÙØªØØ³ÙÙ`,`Ø¥ÙØ¬Ø§Ø¯ أدÙÙ ÙÙØ·Ø© ÙÙ Ø¯Ø§ÙØ©.`]),a(`cvx`,`opt`,`s`,`âª`,[`Convexity`,`When a valley has exactly one bottom.`],[`Ø§ÙØªØØ¯Ùب`,`ÙÙ
ا ÙÙÙÙ ÙÙÙØ§Ø¯Ù ÙØ§Ø¹ ÙØ§ØØ¯ ÙÙØ·.`]),a(`vec`,`alg`,`m`,`vâ`,[`Vectors`,`Lists of numbers with direction. Every data point is one.`],[`اÙÙ
ØªØ¬ÙØ§Øª`,`ÙÙØ§Ø¦Ù
Ø£Ø±ÙØ§Ù
ÙÙØ§ اتجاÙ. ÙÙ ÙÙØ·Ø© Ø¨ÙØ§Ùات Ù
تجÙ.`]),a(`mat`,`vec`,`p`,`[ ]`,[`Matrices`,`How data and model weights are stored and multiplied.`],[`اÙÙ
صÙÙÙØ§Øª`,`طرÙÙØ© تخزÙÙ Ø§ÙØ¨ÙØ§ÙØ§Øª ÙØ£Ùزا٠اÙÙÙ
ÙØ°Ø¬ ÙØ¶Ø±Ø¨Ùا.`]),a(`xf`,`mat`,`s`,`â²`,[`Transformations`,`What a layer of a network does to its input.`],[`Ø§ÙØªØÙÙÙØ§Øª`,`ÙØ´ تسÙÙ Ø·Ø¨ÙØ© Ø§ÙØ´Ø¨ÙØ© بÙ
Ø¯Ø®ÙØ§ØªÙا.`]),a(`nn`,`xf`,`s`,`â`,[`Neural layers`,`Layers of simple functions that together learn complicated ones.`],[`Ø·Ø¨ÙØ§Øª Ø§ÙØ´Ø¨Ùات Ø§ÙØ¹ØµØ¨ÙØ©`,`Ø·Ø¨ÙØ§Øª Ù
Ù Ø¯ÙØ§Ù Ø¨Ø³ÙØ·Ø© تتعÙÙ
Ù
ع بعض Ø¯ÙØ§Ù Ù
Ø¹ÙØ¯Ø©.`],{cap:!0,also:[`part`]}),a(`dotp`,`vec`,`r`,`·`,[`Dot products`,`Measuring how alike two directions are.`],[`Ø§ÙØ¶Ø±Ø¨ اÙÙÙØ·Ù`,`ÙÙØ§Ø³ Ù
د٠تشاب٠اتجاÙÙÙ.`]),a(`prob`,`alg`,`s`,`P`,[`Probability`,`Chance and uncertainty. Arrives with Statistics.`],[`Ø§ÙØ§ØØªÙ
Ø§ÙØ§Øª`,`Ø§ÙØµØ¯ÙØ© ÙØ¹Ø¯Ù
اÙÙÙÙÙ. تج٠Ù
ع Ø§ÙØ¥ØØµØ§Ø¡.`]),a(`dist`,`prob`,`s`,`â¿`,[`Distributions`,`The shapes data comes in. Arrives with Statistics.`],[`Ø§ÙØªÙØ²ÙØ¹Ø§Øª`,`Ø§ÙØ£Ø´Ùا٠اÙÙ٠تج٠ÙÙÙØ§ Ø§ÙØ¨ÙØ§ÙØ§Øª. تج٠Ù
ع Ø§ÙØ¥ØØµØ§Ø¡.`]),a(`est`,`dist`,`s`,`xÌ`,[`Estimation`,`Guessing the truth from samples. Arrives with Statistics.`],[`Ø§ÙØªÙØ¯ÙØ±`,`تخÙ
ÙÙ Ø§ÙØÙÙÙØ© Ù
Ù Ø§ÙØ¹ÙÙÙØ§Øª. ÙØ¬Ù Ù
ع Ø§ÙØ¥ØØµØ§Ø¡.`]),a(`reg`,`est`,`s`,`â`,[`Regression`,`Fitting a line, then a curve, to noisy data.`],[`Ø§ÙØ§ÙØØ¯Ø§Ø±`,`Ù
ÙØ§Ø¡Ù
Ø© خط Ø«Ù
Ù
ÙØÙÙ ÙØ¨ÙØ§ÙØ§Øª ÙÙÙØ§ تشÙÙØ´.`],{cap:!0,also:[`mat`]}),a(`bayes`,`prob`,`s`,`|`,[`Bayesâ rule`,`Updating a belief when new evidence arrives.`],[`ÙØ§Ø¹Ø¯Ø© Ø¨Ø§ÙØ²`,`ØªØØ¯ÙØ« اÙÙÙØ§Ø¹Ø© ÙÙ
ا ÙÙØµÙ دÙÙÙ Ø¬Ø¯ÙØ¯.`])]}
1],c=Math.PI*2,l=.24,u=(e,t,n)=>e<t?t:e>n?n:e,d=e=>1-(1-u(e,0,1))**3,f=e=>{let t=u(e,0,1)-1;return 1+3.1*t*t*t+2.1*t*t},p={m:[`#C9DDC0`,`#5B7654`,`#B9CDB2`,`#10150E`],p:[`#3A3020`,`#17130C`,`#6A5A36`,`#F0D589`],r:[`#4A3B1E`,`#1A150C`,`#EBC870`,`#FBE7B0`],s:[`#1E1B15`,`#121009`,`rgba(238,232,220,.35)`,`#8C8478`]},m={m:`#DDE9D6`,r:`#F4DFA0`,p:`#E8C66E`,s:`#8C8478`};function h(e,t=!1){let n=document.createElement(`canvas`);n.width=n.height=96;let r=n.getContext(`2d`),i=r.createRadialGradient(48,48,0,48,48,48);return i.addColorStop(0,`rgba(${e},1)`),i.addColorStop(t?.2:.1,`rgba(${e},${t?.85:.5})`),i.addColorStop(.4,`rgba(${e},.18)`),i.addColorStop(1,`rgba(${e},0)`),r.fillStyle=i,r.fillRect(0,0,96,96),n}function g(e,t,n,r,i=!1){e.beginPath();for(let a=0;a<6;a++){let o=(i?Math.PI/6:-Math.PI/2)+a*Math.PI/3,s=t+Math.cos(o)*r,c=n+Math.sin(o)*r;a?e.lineTo(s,c):e.moveTo(s,c)}e.closePath()}function _(e,t,n,r){let i=(r%1+1)%1*6,a=Math.floor(i),o=i-a,s=-Math.PI/2+a*Math.PI/3,c=s+Math.PI/3;return{x:e+(Math.cos(s)*(1-o)+Math.cos(c)*o)*n,y:t+(Math.sin(s)*(1-o)+Math.sin(c)*o)*n}}function v(e){let t=0;return{pts:e.map((n,r)=>(r&&(t+=Math.hypot(n.x-e[r-1].x,n.y-e[r-1].y)),{x:n.x,y:n.y,d:t})),length:t}}function y(e,t,n){let r=t.length*n,i=t.pts;e.beginPath(),e.moveTo(i[0].x,i[0].y);for(let t=1;t<i.length;t++)if(i[t].d<=r)e.lineTo(i[t].x,i[t].y);else{let n=(r-i[t-1].d)/Math.max(.001,i[t].d-i[t-1].d);e.lineTo(i[t-1].x+(i[t].x-i[t-1].x)*n,i[t-1].y+(i[t].y-i[t-1].y)*n);break}}function b(e,t){let n=e.length*t,r=e.pts;for(let e=1;e<r.length;e++)if(r[e].d>=n){let t=(n-r[e-1].d)/Math.max(.001,r[e].d-r[e-1].d);return{x:r[e-1].x+(r[e].x-r[e-1].x)*t,y:r[e-1].y+(r[e].y-r[e-1].y)*t}}return r[r.length-1]}function x(e,t,n,r,i){let a={},o={},s=``;for(let n of e.nodes)a[n.id]={id:n.id,label:n[t].label,parent:n.parent,also:n.also??[],st:n.status,glyph:n.glyph,cap:!!n.cap,depth:0,branch:null,slot:0,x:0,y:0,r:0},o[n.id]=[];for(let t of e.nodes)t.parent?o[t.parent].push(t.id):s=t.id;let c=0,l=0,d=(e,t,n)=>{let r=a[e];if(r.depth=t,r.branch=n,l=Math.max(l,t),!o[e].length)return r.slot=c++;let i=o[e].map(e=>d(e,t+1,t===0?e:n));return r.slot=(i[0]+i[i.length-1])/2};d(s,0,null);let f=(n-60)/c,p=(r-84-58-10)/Math.max(1,l),m=u(Math.min(f*.2,p*.22),12,18),h=Object.values(a);for(let e of h){let t=30+f*(e.slot+.5);e.x=i?n-t:t,e.y=r-58-e.depth*p-(e.depth?10:0),e.r=e.depth===0?m*1.3:e.cap?m*1.16:m}return{byId:a,list:h,slot:f,cols:o[s].map(n=>{let r=1/0,i=-1/0;for(let e of h)(e.branch===n||e.id===n)&&(r=Math.min(r,e.x),i=Math.max(i,e.x));return{label:e.branches[n]?.[t]??a[n].label,x0:r,x1:i}})}}var S=class{constructor(e,t){this.canvas=e,this.opts=t,this.dpr=Math.min(2,window.devicePixelRatio||1),this.w=0,this.h=0,this.board=null,this.raf=0,this.visible=!1,this.revealed=!1,this.t0=performance.now(),this.last=performance.now(),this.buildStart=null,this.hover=null,this.hoverEase={},this.hits=[],this.embers=Array.from({length:30},()=>({x:Math.random(),y:Math.random(),v:.012+Math.random()*.03,s:2+Math.random()*4,ph:Math.random()*c,a:.25+Math.random()*.5})),this.spr={gold:h(`226,188,104`),sage:h(`150,190,138`),white:h(`255,246,226`,!0),ember:h(`232,150,70`,!0)},this.reduce=window.matchMedia(`(prefers-reduced-motion: reduce)`).matches,this.sans=`Inter, system-ui, sans-serif`,this.serif=`Fraunces, Georgia, serif`,this.onMove=e=>{let t=this.canvas.getBoundingClientRect(),n=this.hit(e.clientX-t.left,e.clientY-t.top);n!==this.hover&&(this.hover=n,this.opts.onHover(n)),this.canvas.style.cursor=n?`pointer`:`default`},this.onLeave=()=>{this.hover&&(this.hover=null,this.opts.onHover(null)),this.canvas.style.cursor=`default`},this.onClick=e=>{let t=this.canvas.getBoundingClientRect();this.opts.onSelect(this.hit(e.clientX-t.left,e.clientY-t.top))},this.frame=e=>{if(this.raf=0,!this.visible||!this.w||!this.board)return;this.raf=requestAnimationFrame(this.frame);let{ctx:t,w:n,h:r,spr:i,reduce:a}=this,o=(e-this.t0)/1e3,s=Math.min(.05,(e-this.last)/1e3);this.last=e;let c=this.buildStart===null?-1:(e-this.buildStart)/1e3,{goal:p,selected:h}=this.opts.view(),g=x(p,this.opts.locale,n,r,this.rtl);t.setTransform(this.dpr,0,0,this.dpr,0,0),t.globalCompositeOperation=`source-over`,t.globalAlpha=1,t.drawImage(this.board,0,0,n,r),t.globalCompositeOperation=`lighter`;for(let e of this.embers)a||(e.y-=e.v*s,e.y<-.05&&(e.y=1.05,e.x=Math.random())),t.globalAlpha=e.a*(.5+.5*Math.sin(o*2.3+e.ph))*u((1-e.y)*1.6,0,1),t.drawImage(i.ember,(e.x+Math.sin(o*.6+e.ph)*.012)*n-e.s,e.y*r-e.s,e.s*2,e.s*2);if(t.globalAlpha=1,t.globalCompositeOperation=`source-over`,c<0)return;let _=e=>.15+e.depth*l,v=1-5e-4**s;for(let e of g.list){let t=+(this.hover===e.id);this.hoverEase[e.id]=(this.hoverEase[e.id]??0)+(t-(this.hoverEase[e.id]??0))*v}let b=h??this.hover,S=null;if(b&&g.byId[b]){S={};let e=[b];for(;e.length;){let t=e.pop();if(S[t])continue;S[t]=!0;let n=g.byId[t];n.parent&&e.push(n.parent),e.push(...n.also)}}t.textAlign=`center`,this.rtl&&(t.direction=`rtl`),g.cols.forEac
1h((e,n)=>{let r=d((c-.1-n*.08)/.6),i=(e.x0+e.x1)/2,a=Math.max(40,(e.x1-e.x0)/2+30);t.globalAlpha=r;let o=g.slot<70;t.font=`600 ${(this.rtl?12.5:11)-(o?2:0)}px ${this.sans}`;let s=this.rtl?e.label:e.label.toUpperCase();`letterSpacing`in t&&!this.rtl&&(t.letterSpacing=o?`1px`:`2.5px`),t.fillStyle=`#C69A38`,t.fillText(s,i,58);let l=t.measureText(s).width/2+12;`letterSpacing`in t&&(t.letterSpacing=`0px`),a>l+8&&(t.strokeStyle=`rgba(198,154,56,.35)`,t.lineWidth=1,t.beginPath(),t.moveTo(i-a,54),t.lineTo(i-l,54),t.moveTo(i+l,54),t.lineTo(i+a,54),t.stroke())}),t.globalAlpha=1;let C=[];for(let e of g.list){if(!e.parent)continue;let t=g.byId[e.parent],n=t.st===`m`&&e.st===`m`?`mm`:t.st===`m`&&(e.st===`r`||e.st===`p`)?`lit`:`dark`,r=!!(S&&S[e.id]&&S[t.id]);C.push({path:this.elbow(t,e),grow:d((c-_(t)-.12)/.42),kind:n,on:r,dim:!!S&&!r})}t.lineCap=`round`,t.lineJoin=`round`;for(let e of C)e.grow<=0||(y(t,e.path,e.grow),t.strokeStyle=`#070605`,t.lineWidth=9,t.stroke(),t.strokeStyle=`#2B261C`,t.lineWidth=4.5,t.stroke());for(let e of C){if(e.grow<=0||e.kind===`dark`)continue;let n=e.kind===`mm`;t.globalAlpha=e.dim?.35:1,t.globalCompositeOperation=`lighter`,y(t,e.path,d((e.grow-.05)/.95)),t.strokeStyle=n?`rgba(138,163,130,.25)`:`rgba(214,170,80,.28)`,t.lineWidth=n?10:12,t.stroke(),t.strokeStyle=n?e.on?`#D8EBD0`:`#9DB894`:e.on?`#FFF0C4`:`#EBC870`,t.lineWidth=2.7,t.stroke(),e.grow>=1&&!a&&this.sparks(e.path,n?1:2,n?.28:.55,n?i.sage:i.gold,n?11:18,e.dim,o),t.globalAlpha=1,t.globalCompositeOperation=`source-over`}for(let e of g.list)for(let n of e.also){let r=g.byId[n];if(!r)continue;let i=d((c-Math.max(_(e),_(r))-.3)/.6);if(i<=0)continue;let s=this.arc(r,e),l=!!(S&&S[e.id]),u=r.st===`m`;if(t.globalAlpha=(S?l?1:.12:.42)*i,t.setLineDash([2,6]),t.lineDashOffset=a||!l?0:-o*16,y(t,s,i),t.strokeStyle=u?l?`#D8EBD0`:`#9DB894`:l?`#F0D589`:`#B49758`,t.lineWidth=l?2:1.5,t.stroke(),t.setLineDash([]),i>=1){let e=s.pts[s.pts.length-1],n=s.pts[s.pts.length-3],r=Math.atan2(e.y-n.y,e.x-n.x);t.fillStyle=t.strokeStyle,t.beginPath(),t.moveTo(e.x,e.y),t.lineTo(e.x-Math.cos(r-.5)*6,e.y-Math.sin(r-.5)*6),t.lineTo(e.x-Math.cos(r+.5)*6,e.y-Math.sin(r+.5)*6),t.closePath(),t.fill()}t.globalAlpha=1}let w=[],T=[];for(let e of g.list){w.push({id:e.id,x:e.x,y:e.y,r:e.r});let t=c-_(e),n=f(t/.5);if(n<=.01)continue;let r=this.hoverEase[e.id]??0,i=h===e.id,a=S&&!S[e.id]?.45:1,s=e.r*n*(1+.08*r),l=e.x,u=e.y-2*r;T.push({o:e,x:l,y:u,dim:a,hv:r,sel:i,age:t}),this.badge(e,l,u,s,t,a,r,i,o)}let E=g.slot<70,D=Math.max(60,g.slot*1.3),O=(g.slot<80?10:11)+ +!!this.rtl;for(let e of T){let n=e.o,r=E?n.depth===0||e.sel:n.st===`m`||n.st===`r`||n.st===`p`||n.cap||e.sel,i=Math.max(+!!r,e.hv);if(i<.02)continue;t.font=`${n.st===`r`||e.sel?600:500} ${O}px ${this.sans}`;let a=[],o=``;for(let e of n.label.split(` `)){let n=o?`${o} ${e}`:e;t.measureText(n).width>D&&o?(a.push(o),o=e):o=n}a.push(o);let s=O+(this.rtl?5:3),c=n.y+n.r+(n.cap||n.depth===0?14:8)+O,l=Math.max(...a.map(e=>t.measureText(e).width));t.globalAlpha=e.dim*u(e.age/.4,0,1)*i,t.fillStyle=`rgba(10,9,6,.82)`,t.beginPath(),t.roundRect(e.x-l/2-6,c-O-2,l+12,a.length*s+5,5),t.fill(),t.fillStyle=e.sel||e.hv>.5?`#FFFFFF`:m[n.st],t.textAlign=`center`,a.forEach((n,r)=>t.fillText(n,e.x,c+r*s))}t.globalAlpha=1,this.hits=w},this.ctx=e.getContext(`2d`),this.rtl=t.locale===`ar`;let n=getComputedStyle(e);this.sans=n.fontFamily||this.sans;let r=n.getPropertyValue(`--z-font-display`).trim();r&&(this.serif=`${r}, Georgia, serif`),e.addEventListener(`pointermove`,this.onMove),e.addEventListener(`pointerleave`,this.onLeave),e.addEventListener(`click`,this.onClick),this.ro=new ResizeObserver(()=>this.resize()),this.ro.observe(e),this.io=new IntersectionObserver(([e])=>{this.visible=e.isIntersecting,this.visible&&(this.revealed||(this.revealed=!0,this.buildStart=performance.now(),this.opts.onFirstReveal()),this.raf||=requestAnimationFrame(this.frame))},{threshold:.2}),this.io.observe(e),this.resize()}destroy(){cancelAnimationFrame(this.raf),this.raf=0,this.canvas.removeEventListener(`pointermove`,this.onMove),this.canvas.removeEventListener(`pointerleave`,this.onLeave),this.canvas.removeEventListener(`click`,this.onClick),this.ro.disconnect(),this.io.disconnect()}regrow(){this.buildStart=performance.now(),this.hover=null,this.hoverEase={}}hit(e,t){let n=null,r=1/0;for(let i of this.hits){let a=i.id===this.hover?14:8,o=(e-i.x)**2+(t-i.y)**2;o<(i.r+a)**2&&o<r&&(r=o,n=i.id)}return n}resize(){let e=this.canvas.clientWidth,t=this.canvas.clientHeight;if(!e||!t)return;this.w=e,this.h=t,this.canvas.width=Math.round(e*this.dpr),this.canvas.height=Math.round(t*this.dpr);let n=document.createElement(`canvas`);n.width=this.canvas.width,n.height=this.canvas.height;let r=n.getContext(`2d`);r.scale(this.dpr,this.dpr);let i=r.createLinearGradient(0,0,0,t);i.addColorStop(0,`#1C1811`),i.addColorStop(1,`#100E0A`),r.fillStyle=i,r.fillRect(0,0,e,t);let a=r.createRadialGradient(e/2,t*.38,0,e/2,t*.38,e*.7);a.addColorStop(0,`rgba(198,154,56,.10)`),a.addColorStop(1,`rgba(198,154,56,0)`),r.fillStyle=a,r.fillRect(0,0,e,t);for(let n=0;n<2600;n++)r.fillStyle=`rgba(${Math.random()<.5?`0,0,0`:`238,220,180`},${Math.random()*.035})`,r.fillRect(Math.random()*e,Math.random()*t,1+Math.random()*2,1);r.strokeStyle=`rgba(222,194,123,.035)`,r.lineWidth=1;for(let n=0,i=0;n<t+40;n+=30,i++)for(let t=i%2*26;t<e+40;t+=52)g(r,t,n,17,!0),r.stroke();let o=r.createRadialGradient(e/2,t/2,Math.min(e,t)*.35,e/2,t/2,Math.max(e,t)*.75);o.addColorStop(0,`rgba(0,0,0,0)`),o.addColorStop(1,`rgba(0,0,0,.55)`),r.fillStyle=o,r.fillRect(0,0,e,t),r.strokeStyle=`rgba(198,154,56,.5)`,r.strokeRect(10.5,10.5,e-21,t-21),r.strokeStyle=`rgba(198,154,56,.2)`,r.strokeRect(15.5,15.5,e-31,t-31);let s=(e,t,n,i)=>{r.strokeStyle=`rgba(222,194,123,.75)`,r.lineWidth=1.5,r.beginPath(),r.moveTo(e,t+i*26),r.lineTo(e,t),r.lineTo(e+n*26,t),r.stroke(),r.fillStyle=`#DEC27B`;let a=e+n*6,o=t+i*6;r.beginPath(),r.moveTo(a,o-4),r.lineTo(a+4,o),r.lineTo(a,o+4),r.lineTo(a-4,o),r.closePath(),r.fill()};s(10.5,10.5,1,1),s(e-10.5,10.5,-1,1),s(10.5,t-10.5,1,-1),s(e-10.5,t-10.5,-1,-1),this.board=n}elbow(e,t){let n=e.y-e.r-(e.cap||e.depth===0?8:0)-9,r=Math.min(10,Math.abs(t.x-e.x)/2),i=t.x>e.x?1:-1,a=[{x:e.x,y:e.y-e.r*.9}];if(Math.abs(t.x-e.x)>=1){a.push({x:e.x,y:n+r});for(let t=1;t<=6;t++){let o=t/6*Math.PI/2;a.push({x:e.x+i*(r-Math.cos(o)*r),y:n+r-Math.sin(o)*r})}a.push({x:t.x-i*r,y:n});for(let e=1;e<=6;
1e++){let o=e/6*Math.PI/2;a.push({x:t.x-i*r+i*Math.sin(o)*r,y:n-(r-Math.cos(o)*r)})}}return a.push({x:t.x,y:t.y+t.r*.9}),v(a)}arc(e,t){let n=t.x-e.x,r=t.y-e.y,i=Math.hypot(n,r)||1,a=e.x+n/i*(e.r+6),o=e.y+r/i*(e.r+6),s=t.x-n/i*(t.r+8),c=t.y-r/i*(t.r+8),l=Math.min(90,26+i*.18),u=(a+s)/2+-r/i*l*(n>0?1:-1)*.35,d=(o+c)/2-l,f=[];for(let e=0;e<=28;e++){let t=e/28;f.push({x:(1-t)**2*a+2*(1-t)*t*u+t*t*s,y:(1-t)**2*o+2*(1-t)*t*d+t*t*c})}return v(f)}sparks(e,t,n,r,i,a,o){let{ctx:s,spr:c}=this;for(let l=0;l<t;l++){let u=(o*n+l/t+e.pts[0].x*.0037)%1;for(let t=0;t<5;t++){let n=u-t*.025;if(n<0)continue;let o=b(e,n),l=i*(1-t/5);s.globalAlpha=(a?.3:1)*(i>12?.9:.5)*(1-t/5),s.drawImage(t?r:c.white,o.x-l/2,o.y-l/2,l,l)}}}badge(e,t,n,r,i,a,o,s,l){let{ctx:u,spr:f,reduce:m}=this,[h,v,y,b]=p[e.st];if(i>0&&i<.7&&e.st!==`s`){let a=i/.7;u.globalCompositeOperation=`lighter`,u.globalAlpha=(1-a)*.9,u.drawImage(e.st===`m`?f.sage:f.gold,t-r*3,n-r*3,r*6,r*6),u.globalAlpha=1-a,u.strokeStyle=e.st===`m`?`#9DB894`:`#EBC870`,u.lineWidth=1.5,g(u,t,n,r*(1.2+a*1.4)),u.stroke(),u.globalCompositeOperation=`source-over`}if(u.globalAlpha=a,u.save(),u.shadowColor=`rgba(0,0,0,.7)`,u.shadowBlur=12+6*o,u.shadowOffsetY=3+2*o,g(u,t,n,r+5),u.fillStyle=`#0B0A07`,u.fill(),u.restore(),u.globalCompositeOperation=`lighter`,e.st===`r`){u.globalAlpha=(.55+.3*Math.sin(l*2.4+e.x))*a,u.drawImage(f.gold,t-r*3.2,n-r*3.2,r*6.4,r*6.4);for(let e=0;e<2;e++){let i=m?.35:(l*.5+e*.5)%1;u.globalAlpha=(1-i)*.6*a,u.strokeStyle=`#EBC870`,u.lineWidth=1.3,g(u,t,n,r*(1.25+i*.9)),u.stroke()}}e.st===`m`&&(u.globalAlpha=.35*a,u.drawImage(f.sage,t-r*2.4,n-r*2.4,r*4.8,r*4.8)),o>.02&&(u.globalAlpha=.3*o,u.drawImage(f.white,t-r*2.2,n-r*2.2,r*4.4,r*4.4)),u.globalCompositeOperation=`source-over`,u.globalAlpha=a,g(u,t,n,r);let x=u.createLinearGradient(t,n-r,t,n+r);x.addColorStop(0,h),x.addColorStop(1,v),u.fillStyle=x,u.fill(),u.strokeStyle=y,u.lineWidth=e.st===`r`?2.2:1.5,e.st===`s`&&u.setLineDash([3,3]),u.stroke(),u.setLineDash([]),u.save(),g(u,t,n,r-2),u.clip();let S=u.createLinearGradient(t,n-r,t,n);if(S.addColorStop(0,`rgba(255,250,235,${e.st===`m`?.35:.1})`),S.addColorStop(1,`rgba(255,250,235,0)`),u.fillStyle=S,u.fillRect(t-r,n-r,r*2,r),u.restore(),e.cap||e.depth===0){let i=e.st===`s`;g(u,t,n,r+8),u.strokeStyle=i?`rgba(198,154,56,.35)`:`rgba(222,194,123,.85)`,u.lineWidth=1.2,u.stroke(),u.fillStyle=i?`rgba(198,154,56,.35)`:`#DEC27B`;for(let e of[-(r+8),r+8])u.beginPath(),u.moveTo(t,n+e-4),u.lineTo(t+4,n+e),u.lineTo(t,n+e+4),u.lineTo(t-4,n+e),u.closePath(),u.fill()}if(e.st===`p`){let e=.375*d(i/1.1);u.strokeStyle=`#F0D589`,u.lineWidth=3,u.lineCap=`round`,u.beginPath();for(let i=0;i<=40;i++){let a=_(t,n,r+.5,e*i/40);i?u.lineTo(a.x,a.y):u.moveTo(a.x,a.y)}u.stroke();let a=_(t,n,r+.5,e);u.globalCompositeOperation=`lighter`,u.drawImage(f.gold,a.x-9,a.y-9,18,18),u.globalCompositeOperation=`source-over`}if(this.glyph(e.glyph,t,n,r,b),e.st===`s`){let e=t+r*.78,i=n+r*.62,a=Math.max(6,r*.34);u.fillStyle=`#0B0A07`,u.beginPath(),u.arc(e,i,a,0,c),u.fill(),u.strokeStyle=`#4A443A`,u.lineWidth=1,u.stroke(),u.strokeStyle=`#8C8478`,u.lineWidth=1.2,u.beginPath(),u.moveTo(e,i-a*.5),u.lineTo(e,i),u.lineTo(e+a*.35,i+a*.2),u.stroke()}else if(e.st===`r`){let e=t+r*.78,i=n-r*.62,a=Math.max(6,r*.34);u.fillStyle=`#EBC870`,u.beginPath(),u.arc(e,i,a,0,c),u.fill(),u.strokeStyle=`#1A150C`,u.lineWidth=1.8,u.beginPath(),u.moveTo(e-a*.5,i),u.lineTo(e+a*.5,i),u.moveTo(e,i-a*.5),u.lineTo(e,i+a*.5),u.stroke()}s&&(u.globalAlpha=1,u.strokeStyle=`#FFF6DE`,u.lineWidth=1.5,u.setLineDash([5,4]),u.lineDashOffset=-l*14,g(u,t,n,r+12),u.stroke(),u.setLineDash([])),u.globalAlpha=1}glyph(e,t,n,r,i){let{ctx:a}=this,o=e.includes(`â`),s=e.replace(`â`,``),c=/^[A-Za-zα-ÏÎ-Ω]$|^[A-Za-z][â²Â²]$|^[â«Î£ââμÏÏθ]$/.test(s),l=c?r*.92:r*(s.length>3?.42:s.length>2?.5:s.length>1?.62:.78);if(a.font=c?`italic 500 ${l}px ${this.serif}`:`600 ${l}px ${this.sans}`,a.fillStyle=i,a.strokeStyle=i,a.textAlign=`center`,a.textBaseline=`middle`,a.direction=`ltr`,a.fillText(s,t,n+1),o){let e=n-l*.52,r=l*.34;a.lineWidth=Math.max(1.2,l*.07),a.lineCap=`round`,a.beginPath(),a.moveTo(t-r,e),a.lineTo(t+r,e),a.moveTo(t+r-l*.13,e-l*.1),a.lineTo(t+r,e),a.lineTo(t+r-l*.13,e+l*.1),a.stroke()}a.textBaseline=`alphabetic`,this.rtl&&(a.direction=`rtl`)}},C=e(t(),1),w=n(),T={en:{k:`Skill trees · coming soon`,title:`Pick a goal.`,accent:`See the math it takes.`,body:`Want to build a robot or a rocket? Zohal maps the math skills it needs, shows which ones you already have, and suggests what to practice next.`,goals:`Goal`,skills:e=>`${e} skills`,yours:e=>`${e} already yours`,growing:`Growing the treeâ¦`,status:{m:`Mastered`,p:`In progress`,r:`Ready to learn`,s:`Coming soon`},also:`Also needs`,idle:`Ready next:`,checked:(e,t)=>`${e} of ${t} problems checked`,buildsOn:e=>`Builds on ${e}.`,root:`The root of every branch.`,and:` and `,review:`Review`,keepGoing:`Keep practicing`,start:e=>`Start ${e}`,unavailable:`Practice for this topic is coming soon.`,list:`Skills in this tree`,note:`Example progress. Calculus comes first.`},ar:{k:`شجرات اÙÙ
ÙØ§Ø±Ø§Øª · ÙØ±ÙØ¨ÙØ§`,title:`اختر ÙØ¯ÙÙØ`,accent:`ÙØ´ÙÙ Ø§ÙØ±ÙØ§Ø¶ÙØ§Øª اÙÙÙ ÙØØªØ§Ø¬ÙØ§.`,body:`تب٠تبÙÙ Ø±ÙØ¨Ùت Ø£Ù ØµØ§Ø±ÙØ®Ø زØÙ ÙØ±Ø³Ù
ÙÙ Ù
ÙØ§Ø±Ø§Øª Ø§ÙØ±ÙØ§Ø¶ÙØ§Øª اÙÙÙ ÙØØªØ§Ø¬ÙØ§Ø ÙÙÙØ±Ù٠أÙÙØ§ Ø¹ÙØ¯Ù Ù
Ù ÙØ¨ÙØ ÙÙÙØªØ±Ø ÙØ´ تتدرب عÙÙÙ Ø¨Ø¹Ø¯ÙØ§.`,goals:`اÙÙØ¯Ù`,skills:e=>`${e} Ù
ÙØ§Ø±Ø©`,yours:e=>`${e} Ù
ÙÙØ§ ÙÙ`,growing:`Ø§ÙØ´Ø¬Ø±Ø© تÙÙ
Ùâ¦`,status:{m:`Ù
تÙÙØ©`,p:`ÙÙØ¯ Ø§ÙØªÙدÙ
`,r:`Ø¬Ø§ÙØ²Ø© ÙÙØªØ¹ÙÙ
`,s:`ÙØ±ÙØ¨ÙØ§`},also:`ØªØØªØ§Ø¬ Ø£ÙØ¶Ùا`,idle:`Ø§ÙØ¬Ø§Ùزة ÙÙ Ø§ÙØÙÙ:`,checked:(e,t)=>`${e} Ù
Ù ${t} Ù
سائ٠Ù
تØÙÙØ©`,buildsOn:e=>`تبÙ٠عÙÙ ${e}.`,root:`جذر Ù٠اÙÙØ±Ùع.`,and:` Ù`,review:`Ø±Ø§Ø¬Ø¹ÙØ§`,keepGoing:`ÙØ§ØµÙ Ø§ÙØªØ¯Ø±Ùب`,start:e=>`ابدأ ${e}`,unavailable:`Ø§ÙØªØ¯Ø±Ùب عÙÙ ÙØ°Ø§ اÙÙ
ÙØ¶Ùع ÙØ±ÙØ¨ÙØ§.`,list:`Ù
ÙØ§Ø±Ø§Øª ÙØ°Ù Ø§ÙØ´Ø¬Ø±Ø©`,note:`ØªÙØ¯ÙÙ
Ø§ÙØªØ±Ø§Ø¶Ù ÙÙØªÙØ¶ÙØ. ÙØ¨Ø¯Ø£ Ø¨Ø§ÙØªÙØ§Ø¶Ù ÙØ§ÙØªÙØ§Ù
Ù.`}};function E(){return(0,w.jsxs)(`svg`,{"aria-hidden":`true`,width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,children:[(0,w.jsx)(`circle`,{cx:`12`,cy:`12`,r:`9`}),(0,w.jsx)(`path`,{d:`M12 7v5l3 2`})]})}function D({icon:e}){let t=Array.from({length:12},(e,t)=>{let n=Math.PI*2*t/12;return`M${(24+Math.cos(n)*9).toFixed(1)} ${(24+Math.sin(n)*9).toFixed(1)} L${(24+Math.cos(n)*21).toFixed(1)} ${(24+Math.sin(n)*21).toFixed(1)}`}).join(` `);return(0,w.jsxs)(`svg`,{"aria-hidden":`true`,className:`z-home-medallion`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`,viewBox:`0 0 48 48`,children:[(0,w.jsx)(`circle`,{className:`plate`,cx:`24`,cy:`24`,r:`23`}),(0,w.jsx)(`circle`,{className:`rim`,cx:`24`,cy:`24`,r:`20.5`}),(0,w.jsx)(`path`,{className:`rays`,d:t}),e===`robot`?(0,w.jsxs)(`g`,{className:`ink`,children:[(0,w.jsx)(`path`,{className:`gold`,d:`M12 38h14v-3.5H12z`}),(0,w.jsx)(`path`,{d:`M12 38h14v-3.5H12zM19 34.5v-4`}),(0,w.jsx)(`circle`,{className:`gold`,cx:`19`,cy:`28.5`,r:`2.6`}),(0,w.jsx)(`path`,{d:`M20.6 26.6 28 16.5`,strokeWidth:`3.2`}),(0,w.jsx)(`circle`,{cx:`29`,cy:`15.5`,r:`2.3`,fill:`currentColor`}),(0,w.jsx)(`path`,{d:`M30.8 16.6 35.5 21.5M35.5 21.5l3-1.6M35.5 21.5l.8 3.2`})]}):e===`rocket`?(0,w.jsxs)(`g`,{className:`ink`,children:[(0,w.jsx)(`path`,{className:`gold`,d:`M21 33.5c0 3 1.4 5 3 6 1.6-1 3-3 3-6z`}),(0,w.jsx)(`path`,{d:`M24 9c4.5 3.8 6.5 9 6.5 14v8.5h-13V23c0-5 2-10.2 6.5-14z`,fill:`var(--medallion-
1plate)`}),(0,w.jsx)(`circle`,{cx:`24`,cy:`20.5`,r:`2.6`}),(0,w.jsx)(`path`,{d:`M17.5 26 13.5 30v4h4M30.5 26l4 4v4h-4`})]}):(0,w.jsxs)(`g`,{className:`ink`,children:[(0,w.jsx)(`path`,{d:`M13 16.5 23 12.5M13 17l10 7M13 31l10-7M13 31.5l10 4M25 12.5l9.5 11M25 24h8.5M25 35.5l9.5-11`,strokeWidth:`1.2`}),(0,w.jsx)(`circle`,{cx:`12`,cy:`16.5`,fill:`var(--medallion-plate)`,r:`2.6`}),(0,w.jsx)(`circle`,{cx:`12`,cy:`31.5`,fill:`var(--medallion-plate)`,r:`2.6`}),(0,w.jsx)(`circle`,{cx:`24`,cy:`12.5`,fill:`var(--medallion-plate)`,r:`2.6`}),(0,w.jsx)(`circle`,{cx:`24`,cy:`24`,fill:`var(--medallion-plate)`,r:`2.6`}),(0,w.jsx)(`circle`,{cx:`24`,cy:`35.5`,fill:`var(--medallion-plate)`,r:`2.6`}),(0,w.jsx)(`circle`,{className:`gold`,cx:`36`,cy:`24`,r:`3.4`})]})]})}function O(e){let t=0,n=0;for(let r of e.nodes)r.status===`m`&&t++,r.status===`p`&&n++;let r=(t+n*3/8)/e.nodes.length;return{mastered:t,share:r}}function k({locale:e}){let t=T[e],n=e===`ar`,[a,o]=(0,C.useState)(s[0].id),[c,l]=(0,C.useState)(null),[u,d]=(0,C.useState)(null),[f,p]=(0,C.useState)(!0),m=(0,C.useRef)(null),h=(0,C.useRef)(null),g=(0,C.useRef)({goal:s[0],selected:null}),_=(0,C.useRef)(void 0),v=s.find(e=>e.id===a)??s[0];(0,C.useEffect)(()=>{g.current={goal:v,selected:c}},[v,c]);let y=e=>new Intl.NumberFormat(n?`ar-SA`:`en-US`).format(e),b=e=>new Intl.NumberFormat(n?`ar-SA`:`en-US`,{style:`percent`}).format(e);(0,C.useEffect)(()=>{let t=m.current;if(!t)return;let n=new S(t,{locale:e,view:()=>g.current,onHover:d,onSelect:l,onFirstReveal:()=>{p(!0),window.clearTimeout(_.current),_.current=window.setTimeout(()=>p(!1),2200)}});return h.current=n,()=>{n.destroy(),h.current=null,window.clearTimeout(_.current)}},[e]);let x=e=>{e!==a&&(o(e),l(null),d(null),h.current?.regrow(),p(!0),window.clearTimeout(_.current),_.current=window.setTimeout(()=>p(!1),2200))},k=new Map(v.nodes.map(e=>[e.id,e])),A=t=>t[e].label,j=O(v),M=c??u,N=M?k.get(M):void 0,P=v.nodes.filter(e=>e.status===`r`||e.status===`p`).slice(0,2),F=null;if(N){let e=N.parent?k.get(N.parent):void 0,n=(N.also??[]).map(e=>k.get(e)).filter(e=>!!e);F={cta:N.status===`m`?t.review:N.status===`p`?t.keepGoing:N.status===`r`?t.start(A(N)):t.unavailable,open:N.status===`m`||N.status===`p`||N.status===`r`,needs:e?t.buildsOn(A(e)):t.root,also:n.length?`${t.also}: ${n.map(A).join(t.and)}.`:``}}return(0,w.jsx)(`section`,{className:`z-home-section z-home-skills`,id:`mastery`,children:(0,w.jsxs)(`div`,{className:`z-home-wrap z-home-skills-grid`,children:[(0,w.jsxs)(`div`,{className:`z-home-skills-copy`,children:[(0,w.jsx)(`span`,{className:`z-home-k`,children:t.k}),(0,w.jsxs)(`h2`,{children:[t.title,` `,(0,w.jsx)(`em`,{children:t.accent})]}),(0,w.jsx)(`p`,{children:t.body})]}),(0,w.jsxs)(`div`,{className:`z-home-skill-board`,children:[(0,w.jsx)(`div`,{"aria-label":t.goals,className:`z-home-skill-goals`,role:`radiogroup`,children:s.map((t,r)=>{let i=t.id===v.id;return(0,w.jsxs)(`button`,{"aria-checked":i,className:i?`on`:``,onClick:()=>x(t.id),onKeyDown:e=>{if(![`ArrowLeft`,`ArrowRight`,`Home`,`End`].includes(e.key))return;e.preventDefault();let t=(e.key===`ArrowRight`?1:-1)*(n?-1:1),i=e.key===`Home`?0:e.key===`End`?s.length-1:(r+t+s.length)%s.length;x(s[i].id),e.currentTarget.parentElement?.querySelectorAll(`button`)[i]?.focus()},role:`radio`,tabIndex:i?0:-1,type:`button`,children:[(0,w.jsx)(`span`,{className:`z-home-skill-goal-icon`,children:(0,w.jsx)(D,{icon:t.icon})}),(0,w.jsx)(`span`,{className:`z-home-skill-goal-text`,children:(0,w.jsx)(`strong`,{children:t[e].label})})]},t.id)})}),(0,w.jsxs)(`div`,{className:`z-home-skill-stage`,children:[(0,w.jsx)(`canvas`,{"aria-hidden":`true`,ref:m}),(0,w.jsxs)(`div`,{className:`z-home-skill-head`,children:[(0,w.jsx)(`span`,{children:f?t.growing:`${t.skills(y(v.nodes.length))} · ${t.yours(y(j.mastered))}`}),(0,w.jsxs)(`em`,{children:[b(j.share),(0,w.jsx)(`i`,{"aria-hidden":`true`,children:(0,w.jsx)(`b`,{style:{width:`${j.share*100}%`}})})]})]}),(0,w.jsx)(`ul`,{"aria-label":t.list,className:`z-home-sr`,children:v.nodes.map(e=>(0,w.jsx)(`li`,{children:(0,w.jsxs)(`button`,{onClick:()=>l(e.id),type:`button`,children:[A(e),`, `,t.status[e.status]]})},e.id))})]})]}),(0,w.jsx)(`div`,{"aria-live":`polite`,className:`z-home-skill-card`,children:N&&F?(0,w.jsxs)(w.Fragment,{children:[(0,w.jsxs)(`div`,{className:`z-home-skill-card-text`,children:[(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`strong`,{children:A(N)}),N.status===`s`?(0,w.jsx)(`span`,{className:`z-home-skill-coming`,role:`img`,"aria-label":t.status.s,title:t.status.s,children:(0,w.jsx)(E,{})}):(0,w.jsx)(`span`,{className:`z-home-skill-pill ${N.status}`,children:t.status[N.status]}),i(N.status)?(0,w.jsx)(`small`,{children:t.checked(y(i(N.status)),y(8))}):null]}),(0,w.jsxs)(`p`,{children:[N[e].desc,` `,(0,w.jsxs)(`span`,{children:[F.needs,` `,F.also]})]})]}),F.open?(0,w.jsxs)(r,{className:`z-home-btn z-home-btn-primary`,locale:e,location:`public_skill_tree`,children:[F.cta,(0,w.jsx)(`span`,{"aria-hidden":`true`,className:`z-home-btn-arrow`,children:`â`})]}):(0,w.jsx)(`span`,{className:`z-home-skill-unavailable`,children:F.cta})]}):(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(`p`,{className:`z-home-skill-idle`,children:t.idle}),P.map(e=>(0,w.jsxs)(`button`,{className:`z-home-skill-next`,onClick:()=>l(e.id),type:`button`,children:[A(e),` `,(0,w.jsx)(`span`,{"aria-hidden":`true`,className:`z-home-btn-arrow`,children:`â`})]},e.id))]})}),(0,w.jsxs)(`div`,{className:`z-home-skill-aside`,children:[(0,w.jsxs)(`ul`,{"aria-hidden":`true`,className:`z-home-skill-legend`,children:[(0,w.jsx)(`li`,{className:`m`,children:t.status.m}),(0,w.jsx)(`li`,{className:`r`,children:t.status.r}),(0,w.jsxs)(`li`,{className:`s`,children:[(0,w.jsx)(E,{}),t.status.s]})]}),(0,w.jsx)(`p`,{className:`z-home-skill-note`,children:t.note})]})]})})}export{k as HomeSkillTree};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.