<div class="vt" data-vt-cat="study-visas" data-vt-code="OPT"> <div class="vt-crumbs"><nav class="vt-wrap" aria-label="Breadcrumb"><a href="/">Home</a><span>›</span><a href="/study-visas">Study & exchange</a><span>›</span><span>OPT</span></nav></div> <section class="vt-dhead"><div class="vt-wrap"> <div class="vt-badges"><span>Work authorization</span><span>F-1 students</span><span>Form I-765</span><span>EAD</span><span>STEM extension</span><span>Not a visa</span></div> <h1><span>OPT</span> Optional Practical Training (incl. STEM OPT)</h1> <p class="vt-lede">Temporary employment authorization for F-1 students in a job related to their field of study — up to 12 months per degree level, plus 24 months for eligible STEM graduates.</p> <div class="vt-dmeta"><span>Last reviewed <strong>Oct 1, 2026</strong></span><span>Sources: USCIS · eCFR</span><a href="/corrections?page=/visa/opt">Report an error</a></div> </div></section> <section class="vt-dbody"> <nav class="vt-jump" aria-label="On this page"><a href="#overview">Overview</a><a href="#qualify">Who qualifies</a><a href="#duration">Duration</a><a href="#fees">Fees</a><a href="#processing">Processing</a><a href="#steps">Steps</a><a href="#documents">Documents</a><a href="#dependents">Dependents</a><a href="#greencard">Green card</a><a href="#related">Related</a><a href="#faq">FAQ</a><a href="#sources">Sources</a><a href="#changes">Changes</a></nav> <nav class="vt-toc" aria-label="On this page"><div class="h">On this page</div><ul><li><a href="#overview">Overview</a></li><li><a href="#qualify">Who qualifies</a></li><li><a href="#duration">Duration & extensions</a></li><li><a href="#fees">Fees</a></li><li><a href="#processing">Processing time</a></li><li><a href="#steps">Application steps</a></li><li><a href="#documents">Required documents</a></li><li><a href="#dependents">Dependents & family</a></li><li><a href="#greencard">Path to a green card</a></li><li><a href="#related">Related visas</a></li><li><a href="#faq">Common questions</a></li><li><a href="#sources">Official sources</a></li><li><a href="#changes">Recent changes</a></li></ul></nav> <article class="vt-art"> <div class="vt-glance"><h2>At a glance</h2><dl><div><dt>What it is</dt><dd>Work authorization within F-1 status — not a separate visa</dd></div><div><dt>Length</dt><dd><a href="https://www.uscis.gov/working-in-the-united-states/students-and-exchange-visitors/optional-practical-training-opt-for-f-1-students" target="_blank" rel="noopener">Up to 12 months</a> per degree level</dd></div><div><dt>STEM extension</dt><dd><a href="https://www.uscis.gov/working-in-the-united-states/students-and-exchange-visitors/optional-practical-training-extension-for-stem-students-stem-opt" target="_blank" rel="noopener">24 months</a> with an E-Verify employer</dd></div><div><dt>Form I-765 fee</dt><dd><a href="https://www.uscis.gov/g-1055" target="_blank" rel="noopener">$470 online / $520 paper</a></dd></div><div><dt>Unemployment limit</dt><dd><a href="https://www.ecfr.gov/on/2026-09-14/title-8/section-214.2" target="_blank" rel="noopener">90 days</a> (150 days total with STEM)</dd></div><div><dt>Premium processing</dt><dd><a href="https://www.uscis.gov/g-1055" target="_blank" rel="noopener">$1,780</a> — 30 business days</dd></div></dl></div> <div class="vt-callout"><strong>OPT is not a visa.</strong> OPT is employment authorization for students already in F-1 status, granted by USCIS on Form I-765 after a DSO recommendation. The student remains an F-1 nonimmigrant throughout. Note: a <a href="https://www.federalregister.gov/documents/2026/07/17/2026-14439/establishing-a-fixed-time-period-of-admission-and-an-extension-of-stay-procedure-for-nonimmigrant" target="_blank" rel="noopener">July 17, 2026 DHS final rule</a> would have shortened the post-completion filing window and departure period, but a federal court <a href="https://www.govinfo.gov/app/details/USCOURTS-mad-1_26-cv-13799" target="_blank" rel="noopener">postponed it on Sept. 14, 2026</a>; current rules below reflect the regulations still in force (the eCFR’s “current” text already shows the postponed rule, so links here point to the <a href="https://www.ecfr.gov/on/2026-09-14/title-8/section-214.2" target="_blank" rel="noopener">Sept. 14, 2026 version</a>).</div> <h2 id="overview" class="s">Overview</h2> <p class="b">Optional Practical Training lets an F-1 student work in a job directly related to their major. It can be used during studies (pre-completion) or after finishing a degree (post-completion), for a combined maximum of 12 months at each higher degree level. All <a href="https://www.uscis.gov/working-in-the-united-states/students-and-exchange-visitors/optional-practical-training-opt-for-f-1-students" target="_blank" rel="noopener">pre-completion OPT is deducted</a> from the post-completion allowance (part-time OPT at half the rate of full-time).</p> <p class="b">Students with a qualifying degree in science, technology, engineering or mathematics can apply for a <a href="https://www.uscis.gov/working-in-the-united-states/students-and-exchange-visitors/optional-practical-training-extension-for-stem-students-stem-opt" target="_blank" rel="noopener">24-month STEM OPT extension</a> if they work for an employer enrolled in E-Verify under a Form I-983 training plan. A student may receive no more than two STEM extensions in a lifetime; the second must be based on a degree at a higher level than the first.</p> <p class="b">OPT is different from Curricular Practical Training (CPT), which is authorized by the school for training that is an integral, required part of the curriculum. OPT is optional, requires USCIS approval and an Employment Authorization Document (EAD), and work cannot start before the EAD start date.</p> <h2 id="qualify" class="s">Who qualifies</h2> <h3 class="s">Post-completion OPT</h3> <ul class="b"><li>Be in valid F-1 status and have been enrolled full time for at least one full academic year</li><li>Obtain a DSO recommendation entered in SEVIS and an updated Form I-20</li><li>File Form I-765 within 30 days of the DSO recommendation and within the window from 90 days before to 60 days after the program end date</li><li>Work in a job directly related to the major field of study (at least 20 hours per week counts as employment)</li></ul> <h3 class="s">24-month STEM OPT extension</h3> <ul class="b"><li>Be on post-completion OPT based on a bachelor’s, master’s or doctoral degree on the DHS STEM Designated Degree Program List</li><li>Degree from a school accredited by a Department of Education-recognized agency and certified by SEVP (a prior STEM degree may qualify)</li><li>Employer enrolled and in good standing in E-Verify; student and employer complete Form I-983 training plan</li><li>File Form I-765 up to 90 days before the current OPT expires and within 60 days of the DSO recommendation</li></ul> <h2 id="duration" class="s">Duration & extensions</h2> <table class="vt-kv"><tbody><tr><th scope="row">Pre-completion OPT</th><td>Part time (up to 20 hrs/week) while school is in session; full time during breaks — deducted from the 12 months (part-time at half rate)</td></tr><tr><th scope="row">Post-completion OPT</th><td><a href="https://www.uscis.gov/working-in-the-united-states/students-and-exchange-visitors/optional-practical-training-opt-for-f-1-students" target="_blank" rel="noopener">Up to 12 months</a> per higher degree level, minus pre-completion time used</td></tr><tr><th scope="row">STEM OPT extension</th><td><a href="https://www.uscis.gov/working-in-the-united-states/students-and-exchange-visitors/optional-practical-training-extension-for-stem-students-stem-opt" target="_blank" rel="noopener">24 months</a>; at most two in a lifetime, the second for a higher-level degree</td></tr><tr><th scope="row">Unemployment allowed</th><td><a href="https://www.ecfr.gov/on/2026-09-14/title-8/section-214.2" target="_blank" rel="noopener">90 days</a> during post-completion OPT; <a href="https://www.ecfr.gov/on/2026-09-14/title-8/section-214.2" target="_blank" rel="noopener">150 days</a> in total if a STEM extension is granted</td></tr><tr><th scope="row">STEM auto-extension</th><td><a href="https://www.uscis.gov/working-in-the-united-states/students-and-exchange-visitors/optional-practical-training-extension-for-stem-students-stem-opt" target="_blank" rel="noopener">180 days</a> of work authorization if a timely STEM extension is pending when OPT expires</td></tr><tr><th scope="row">Completion deadline</th><td>Post-completion OPT must be completed within <a href="https://www.ecfr.gov/on/2026-09-14/title-8/section-214.2" target="_blank" rel="noopener">14 months</a> after completion of study (the STEM extension is exempt)</td></tr><tr><th scope="row">Cap-gap</th><td>Status and OPT extended to <a href="https://www.ecfr.gov/on/2026-09-14/title-8/section-214.2" target="_blank" rel="noopener">April 1</a> (or the H-1B start date, if earlier) for timely cap-subject H-1B change-of-status petitions</td></tr></tbody></table> <h2 id="fees" class="s">Fees</h2> <p class="vt-feesintro">OPT is requested from USCIS on Form I-765. There is no employer petition or visa fee.</p> <div class="vt-scroll"><table class="vt-fees"><thead><tr><th>Fee</th><th class="amt">Amount</th><th>Who pays</th><th>Notes</th></tr></thead><tbody> <tr><td>Form I-765 (c)(3)(A), (B) or (C)</td><td class="amt"><a href="https://www.uscis.gov/g-1055" target="_blank" rel="noopener">$470 online / $520 paper</a></td><td>Student</td><td>These OPT categories can be <a href="https://www.uscis.gov/file-online/forms-available-to-file-online" target="_blank" rel="noopener">filed online</a></td></tr> <tr><td>Premium processing (Form I-907)</td><td class="amt"><a href="https://www.uscis.gov/g-1055" target="_blank" rel="noopener">$1,780</a></td><td>Student</td><td>Optional; 30 business days; EAD card typically produced within two weeks of approval</td></tr> <tr><td>SEVIS I-901 fee</td><td class="amt">$0</td><td>—</td><td>Already paid for F-1 status; no separate OPT fee</td></tr> </tbody></table></div> <p class="vt-foot">Amounts from USCIS Form G-1055 (edition 10/01/26). Premium processing fees were last adjusted effective March 1, 2026.</p> <h2 id="processing" class="s">Processing time</h2> <dl class="vt-cards"><div><dt>Premium processing</dt><dd>30 business days</dd><dd class="n">For OPT and STEM OPT Form I-765 requests</dd></div><div><dt>Post-completion filing window</dt><dd>90 days before – 60 days after</dd><dd class="n">Program end date; and within 30 days of DSO recommendation</dd></div><div><dt>STEM filing window</dt><dd>Up to 90 days before</dd><dd class="n">Current OPT expiration; within 60 days of DSO recommendation</dd></div></dl> <p class="b">Regular processing times vary; check <a href="https://egov.uscis.gov/processing-times/" target="_blank" rel="noopener">USCIS processing times</a>. Work may begin only on or after the start date printed on the EAD (or during a STEM or cap-gap automatic extension).</p> <h2 id="steps" class="s">Application steps</h2> <ol class="vt-steps"><li><span class="num">1</span><div><div class="tt">Request a DSO recommendation</div><div class="tx">The designated school official reviews eligibility, enters the OPT recommendation in SEVIS and issues an updated Form I-20.</div></div></li><li><span class="num">2</span><div><div class="tt">File Form I-765</div><div class="tx">File online or by mail within 30 days of the recommendation, choosing the requested start date (post-completion) and category (c)(3)(A), (B) or (C).</div></div></li><li><span class="num">3</span><div><div class="tt">Receive the EAD</div><div class="tx">After approval, USCIS mails an Employment Authorization Document. Employment cannot start before the EAD start date.</div></div></li><li><span class="num">4</span><div><div class="tt">Report changes</div><div class="tx">Report any change of name, address or interruption of employment to the DSO while on OPT. STEM OPT students have additional reporting duties, including reporting changes within 10 days. Track unemployment days.</div></div></li><li><span class="num">5</span><div><div class="tt">Apply for the STEM extension (if eligible)</div><div class="tx">With an E-Verify employer, complete Form I-983, get a new DSO recommendation and file a new I-765 before the current OPT expires.</div></div></li><li><span class="num">6</span><div><div class="tt">Plan the next step</div><div class="tx">Before OPT ends, depart, enroll in a new program, or change status — for example through an H-1B petition, which may trigger cap-gap protection.</div></div></li></ol> <h2 id="documents" class="s">Required documents</h2> <div class="vt-docs"><div><h3>For Form I-765</h3><ul><li><span>Form I-20 endorsed with the DSO’s OPT recommendation</span></li><li><span>Copy of passport, visa and Form I-94</span></li><li><span>Two passport-style photos (paper filing)</span></li><li><span>Prior EADs, if any</span></li><li><span>For STEM: degree copy (or official transcript) and the employer’s E-Verify company ID</span></li></ul></div></div> <h2 id="dependents" class="s">Dependents & family</h2> <p class="b">F-2 dependents remain in F-2 status while the F-1 student is on OPT. OPT does not grant F-2 dependents permission to work.</p> <h2 id="greencard" class="s">Path to a green card</h2> <p class="b">OPT is temporary and does not itself lead to permanent residence, but it is often the bridge to a longer-term work status.</p> <div class="vt-gsteps"><div><div class="k">Step 1</div><div class="tt">H-1B petition</div><div class="tx">An employer can register and file a cap-subject H-1B petition; cap-gap extends F-1 status and OPT to April 1 if the change-of-status petition is timely filed.</div></div><div><div class="k">Step 2</div><div class="tt">Other work classifications</div><div class="tx">O-1, TN, E-3 or H-1B1 may fit depending on the person’s achievements and nationality.</div></div><div><div class="k">Step 3</div><div class="tt">Employment-based green card</div><div class="tx">An employer may sponsor permanent residence (PERM labor certification and Form I-140), or the student may self-petition in some categories.</div></div></div> <h2 id="related" class="s">Related visas</h2> <div class="vt-rel"><a href="/visa/f-1"><div class="c">F-1</div><div class="n">Academic Student</div><div class="tx">The underlying status OPT depends on.</div></a><a href="/visa/h-1b"><div class="c">H-1B</div><div class="n">Specialty Occupation Worker</div><div class="tx">Most common next step after OPT; cap-gap bridges the timing.</div></a><a href="/visa/o-1a"><div class="c">O-1A</div><div class="n">Extraordinary Ability</div><div class="tx">An option for top performers that avoids the H-1B lottery.</div></a><a href="/visa/tn"><div class="c">TN</div><div class="n">USMCA Professional</div><div class="tx">For Canadian and Mexican graduates in listed professions.</div></a><a href="/visa/j-1"><div class="c">J-1</div><div class="n">Exchange Visitor</div><div class="tx">Exchange students use “academic training” instead of OPT.</div></a></div> <h2 id="faq" class="s">Common questions</h2> <div class="vt-faq"><details><summary>Is OPT a visa?</summary><p>No. OPT is employment authorization for students already in F-1 status. The student stays in F-1 status and needs a valid F-1 visa only to re-enter after travel abroad.</p></details><details><summary>How many days can I be unemployed on OPT?</summary><p>Up to <a href="https://www.ecfr.gov/on/2026-09-14/title-8/section-214.2" target="_blank" rel="noopener">90 days in aggregate</a> during post-completion OPT. With a STEM extension, the total for the whole OPT period is 150 days.</p></details><details><summary>When must I file for post-completion OPT?</summary><p>Between 90 days before and 60 days after the program end date, and within 30 days of the DSO’s SEVIS recommendation (per <a href="https://www.ecfr.gov/on/2026-09-14/title-8/section-214.2" target="_blank" rel="noopener">8 CFR 214.2(f)(11)</a>). The postponed July 2026 rule would have shortened the after-completion window to 30 days; it is not in effect.</p></details><details><summary>What is cap-gap?</summary><p>If an employer timely files a cap-subject H-1B petition requesting a change of status, the student’s F-1 status and OPT authorization are automatically extended until <a href="https://www.ecfr.gov/on/2026-09-14/title-8/section-214.2" target="_blank" rel="noopener">April 1</a> of the H-1B fiscal year, or the petition’s start date if earlier.</p></details><details><summary>Can I start working once I file?</summary><p>Not for initial post-completion OPT — work may begin only on or after the EAD start date. A timely filed STEM extension gives an automatic 180-day extension if current OPT expires while it is pending.</p></details></div> <h2 id="sources" class="s">Official sources</h2> <ul class="vt-src"><li><a href="https://www.uscis.gov/working-in-the-united-states/students-and-exchange-visitors/optional-practical-training-opt-for-f-1-students" target="_blank" rel="noopener"><span><strong>USCIS</strong> · Optional Practical Training (OPT) for F-1 Students</span><span>uscis.gov ↗</span></a></li><li><a href="https://www.uscis.gov/working-in-the-united-states/students-and-exchange-visitors/optional-practical-training-extension-for-stem-students-stem-opt" target="_blank" rel="noopener"><span><strong>USCIS</strong> · OPT Extension for STEM Students (STEM OPT)</span><span>uscis.gov ↗</span></a></li><li><a href="https://www.ecfr.gov/on/2026-09-14/title-8/section-214.2" target="_blank" rel="noopener"><span><strong>eCFR</strong> · 8 CFR 214.2(f) — F-1 practical training and cap-gap (text in force on Sept. 14, 2026)</span><span>ecfr.gov ↗</span></a></li><li><a href="https://www.uscis.gov/g-1055" target="_blank" rel="noopener"><span><strong>USCIS</strong> · Form G-1055, Fee Schedule</span><span>uscis.gov ↗</span></a></li><li><a href="https://www.uscis.gov/forms/all-forms/how-do-i-request-premium-processing" target="_blank" rel="noopener"><span><strong>USCIS</strong> · How Do I Request Premium Processing?</span><span>uscis.gov ↗</span></a></li><li><a href="https://www.uscis.gov/file-online/forms-available-to-file-online" target="_blank" rel="noopener"><span><strong>USCIS</strong> · Forms Available to File Online</span><span>uscis.gov ↗</span></a></li><li><a href="https://www.govinfo.gov/app/details/USCOURTS-mad-1_26-cv-13799" target="_blank" rel="noopener"><span><strong>GovInfo / U.S. District Court</strong> · Presidents’ Alliance v. DHS, No. 1:26-cv-13799 (D. Mass.)</span><span>govinfo.gov ↗</span></a></li></ul> <h2 id="changes" class="s">Recent changes</h2> <ul class="vt-chg"><li><span class="d">Sep 14, 2026</span><div class="x"><strong>Fixed-admission rule postponed nationwide.</strong> In Presidents’ Alliance on Higher Education and Immigration v. DHS (No. 1:26-cv-13799), the court granted relief under 5 U.S.C. § 705 postponing the effective date of DHS’s final rule ending duration of status for F, J and I nonimmigrants, one day before it was due to take effect. Duration of status remains in place while the case continues. <a href="https://www.govinfo.gov/app/details/USCOURTS-mad-1_26-cv-13799" target="_blank" rel="noopener">Source ↗</a></div></li><li><span class="d">Aug 24, 2026</span><div class="x"><strong>Court orders USCIS to process held benefit requests.</strong> In Red Eagle Law v. Edlow (N.D. Cal.), the court ordered USCIS to adjudicate applications from nationals of 39 countries covered by hold memos PM-602-0192 and PM-602-0194 in the normal course. USCIS said it will comply pending possible further review. <a href="https://www.uscis.gov/newsroom/alerts/recent-court-order-on-hold-policies" target="_blank" rel="noopener">Source ↗</a></div></li><li><span class="d">Aug 24, 2026</span><div class="x"><strong>SEVP guidance tightens CPT.</strong> Broadcast Message 2608-02 (following 2608-01 of Aug. 12, 2026) states that Curricular Practical Training may be authorized only where training is an integral, required part of an established curriculum for all students in that program, not an optional elective. <a href="https://www.ice.gov/doclib/sevis/pdf/bcm_260802.pdf" target="_blank" rel="noopener">Source ↗</a></div></li><li><span class="d">Jul 17, 2026</span><div class="x"><strong>Final rule replaces duration of status with fixed admission periods.</strong> Published final rule (RIN 1653-AA95) admitting F and J nonimmigrants for their program length up to 4 years, shortening the F-1 post-completion departure period from 60 to 30 days, and requiring extensions of stay through USCIS. Announced effective date: Sept. 15, 2026 (since postponed by court order). <a href="https://www.federalregister.gov/documents/2026/07/17/2026-14439/establishing-a-fixed-time-period-of-admission-and-an-extension-of-stay-procedure-for-nonimmigrant" target="_blank" rel="noopener">Source ↗</a></div></li><li><span class="d">Mar 1, 2026</span><div class="x"><strong>Premium processing fees adjusted for inflation.</strong> DHS final rule (published Jan. 12, 2026) raised premium processing fees effective March 1, 2026, including $1,780 for OPT/STEM OPT Form I-765 requests and $2,075 for Form I-539 requests to change to F, J or M status. <a href="https://www.federalregister.gov/documents/2026/01/12/2026-00321/adjustment-to-premium-processing-fees" target="_blank" rel="noopener">Source ↗</a></div></li><li><span class="d">Aug 28, 2025</span><div class="x"><strong>Proposed rule to end duration of status.</strong> DHS proposed replacing duration-of-status admission for F, J and I nonimmigrants with fixed admission periods. <a href="https://www.federalregister.gov/documents/2025/08/28/2025-16554/establishing-a-fixed-time-period-of-admission-and-an-extension-of-stay-procedure-for-nonimmigrant" target="_blank" rel="noopener">Source ↗</a></div></li><li><span class="d">Jan 17, 2025</span><div class="x"><strong>Cap-gap extended to April 1.</strong> The H-1B modernization final rule (published Dec. 18, 2024) extends cap-gap status and work authorization for eligible F-1 students to April 1 of the H-1B fiscal year, or the petition start date if earlier. <a href="https://www.federalregister.gov/documents/2024/12/18/2024-29354/modernizing-h-1b-requirements-providing-flexibility-in-the-f-1-program-and-program-improvements" target="_blank" rel="noopener">Source ↗</a></div></li></ul> <div class="vt-disc">This page is general reference material compiled from the official sources above and is not legal advice. Eligibility depends on individual facts; rules and fees change, so confirm with the agency before you file. VisaTypes.com is not affiliated with USCIS, the Department of State or any government agency. Spotted an error? <a href="/corrections?page=/visa/opt">Tell us</a>.</div> </article></section></div> <script type="application/ld+json">[{"\u0040context": "https://schema.org", "\u0040type": "BreadcrumbList", "itemListElement": [{"\u0040type": "ListItem", "position": 1, "name": "Home", "item": "https://visatypes.com/"}, {"\u0040type": "ListItem", "position": 2, "name": "Study & exchange", "item": "https://visatypes.com/study-visas"}, {"\u0040type": "ListItem", "position": 3, "name": "OPT", "item": "https://visatypes.com/visa/opt"}]}, {"\u0040context": "https://schema.org", "\u0040type": "FAQPage", "mainEntity": [{"\u0040type": "Question", "name": "Is OPT a visa?", "acceptedAnswer": {"\u0040type": "Answer", "text": "No. OPT is employment authorization for students already in F-1 status. The student stays in F-1 status and needs a valid F-1 visa only to re-enter after travel abroad."}}, {"\u0040type": "Question", "name": "How many days can I be unemployed on OPT?", "acceptedAnswer": {"\u0040type": "Answer", "text": "Up to 90 days in aggregate during post-completion OPT. With a STEM extension, the total for the whole OPT period is 150 days."}}, {"\u0040type": "Question", "name": "When must I file for post-completion OPT?", "acceptedAnswer": {"\u0040type": "Answer", "text": "Between 90 days before and 60 days after the program end date, and within 30 days of the DSO’s SEVIS recommendation (per 8 CFR 214.2(f)(11)). The postponed July 2026 rule would have shortened the after-completion window to 30 days; it is not in effect."}}, {"\u0040type": "Question", "name": "What is cap-gap?", "acceptedAnswer": {"\u0040type": "Answer", "text": "If an employer timely files a cap-subject H-1B petition requesting a change of status, the student’s F-1 status and OPT authorization are automatically extended until April 1 of the H-1B fiscal year, or the petition’s start date if earlier."}}, {"\u0040type": "Question", "name": "Can I start working once I file?", "acceptedAnswer": {"\u0040type": "Answer", "text": "Not for initial post-completion OPT — work may begin only on or after the EAD start date. A timely filed STEM extension gives an automatic 180-day extension if current OPT expires while it is pending."}}]}]</script> <script>(function(){var l=[].slice.call(document.querySelectorAll('.vt-toc a'));if(!l.length||!window.IntersectionObserver)return;var m={};l.forEach(function(a){m[a.getAttribute('href').slice(1)]=a});var cur=null;function on(id){if(cur)cur.classList.remove('on');cur=m[id];if(cur)cur.classList.add('on')}on(l[0].getAttribute('href').slice(1));var io=new IntersectionObserver(function(es){es.forEach(function(x){if(x.isIntersecting)on(x.target.id)})},{rootMargin:'0px 0px -70% 0px'});Object.keys(m).forEach(function(id){var el=document.getElementById(id);el&&io.observe(el)})})();</script>