Release site-v1.0.4 (part 8)
Browse files- lecture-07/assets/slidev/NoteDisplay-DomX2gaR.js +1 -0
- lecture-07/assets/slidev/NoteEditable-EWNsHjuy.js +1 -0
- lecture-07/assets/slidev/TimerBar-M2O-qcUf.js +1 -0
- lecture-07/assets/slidev/VClicks-DhU7uhQr.js +1 -0
- lecture-07/assets/slidev/VerticalDivider-Bvc1MZzH.js +1 -0
- lecture-07/assets/slidev/client-Ct4Bq5Nz.js +1 -0
- lecture-07/assets/slidev/context-DB-9afGB.js +1 -0
- lecture-07/assets/slidev/entry-C7SFAt6v.js +1 -0
- lecture-07/assets/slidev/notes-0YYK7eZS.js +1 -0
- lecture-07/assets/slidev/notes-edit-CNXbnFBO.js +2 -0
- lecture-07/assets/slidev/overview-onWweOVU.js +1 -0
- lecture-07/assets/slidev/play-CuAAHxP2.js +2 -0
- lecture-07/assets/slidev/presenter-DY5YySOI.js +1 -0
- lecture-07/assets/slidev/shortcuts-CecQChrI.js +4 -0
- lecture-07/assets/syncState-3Tc2ZArb.js +1 -0
- lecture-07/assets/useDrawings-vNWRit9P.js +1 -0
- lecture-07/assets/useGenerative-DhxjRRg5.js +1 -0
- lecture-07/assets/useNav-BmBHxIEh.js +194 -0
- lecture-07/index.html +7 -7
- lecture-07/slides.pdf +2 -2
lecture-07/assets/slidev/NoteDisplay-DomX2gaR.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
import{B as e,Ct as t,H as n,P as r,Q as i,R as a,St as o,T as s,Z as c,_ as l,b as u,bt as d,dt as f,g as p,m,ot as h,y as g,yt as _}from"../modules/shiki-CJZsCeMT.js";import{nt as v,rt as y}from"../useNav-BmBHxIEh.js";import{l as b}from"./context-DB-9afGB.js";var x=[`title`],S={key:0,"flex-auto":``},C={"text-primary":``},w={op50:``,"text-sm":``},T={key:0,absolute:``,"inset-y-0":``,"right-0":``,"w-0.5":``,"bg-primary":``,"z-1":``},E=s({__name:`ClicksSlider`,props:{clicksContext:{},readonly:{type:Boolean},active:{type:Boolean,default:!0},resettable:{type:Boolean},compact:{type:Boolean},attached:{type:Boolean}},emits:[`activate`,`reset`],setup(r,{emit:i}){let a=r,s=i,c=p(()=>a.clicksContext.total),E=p(()=>v(0,a.clicksContext.clicksStart,c.value)),D=p(()=>c.value-E.value+1),O=p({get(){return a.resettable&&!a.active||a.clicksContext.current>c.value?-1:a.clicksContext.current},set(e){if(a.resettable&&e<0){s(`reset`),a.clicksContext.current=b;return}s(`activate`),a.clicksContext.current=e}}),k=p(()=>a.resettable&&O.value<0),A=p(()=>y(E.value,c.value+1)),j=f(),M;function N(e){let t=j.value.getBoundingClientRect();return(e.clientX-t.left)/Math.max(1,t.width)}function P(e,t){if(a.readonly||!j.value||!t&&!(e.buttons&1))return;let n=N(e);if(a.resettable&&n<0){O.value=-1;return}let r=v(0,n,t?.999999:1)*D.value,i=v(0,O.value-E.value,D.value-1),o=t?E.value+Math.floor(r):O.value;!t&&r>=i+1.5?o=E.value+Math.floor(r-.5):!t&&r<i-.5&&(o=E.value+Math.ceil(r-.5)),O.value=v(E.value,o,c.value)}function F(e){a.readonly||(j.value?.setPointerCapture(e.pointerId),M={id:e.pointerId,x:e.clientX,y:e.clientY},P(e,!0))}function I(e){if(M?.id===e.pointerId){if(Math.abs(e.clientX-M.x)<=3&&Math.abs(e.clientY-M.y)<=3)return;M=void 0}P(e,!1)}return(i,s)=>(e(),u(`div`,{class:d([`flex gap-1 select-none`,[r.attached?`items-end`:`items-center`,D.value&&a.clicksContext.isMounted?``:`op50`]]),title:`Clicks in this slide: ${D.value}`},[l(`div`,{class:d([`flex items-center font-mono`,[r.compact?`gap-1 min-w-0 mr0`:`gap-0.2 min-w-16 mr1`,r.attached?`h-[22px]`:``]])},[l(`div`,{class:d([`i-carbon:cursor-1 text-sm op50`,r.compact?`ml-1`:``])},null,2),O.value>=0&&O.value!==_(999999)&&r.active?(e(),u(m,{key:0},[r.compact?g(`v-if`,!0):(e(),u(`div`,S)),l(`span`,null,[l(`span`,C,t(O.value),1),s[2]||=l(`span`,{op25:``,"text-sm":``},`/`,-1),l(`span`,w,t(c.value),1)])],64)):(e(),u(`div`,{key:1,op50:``,class:d(r.compact?``:`flex-auto pl1`)},[l(`span`,{class:d(r.compact?`inline-block text-center`:``),style:o(r.compact?{width:`${String(c.value).length*2+1}ch`,marginLeft:`-0.25ch`}:void 0)},t(c.value),7)],2))],2),l(`div`,{ref_key:`sliderEl`,ref:j,relative:``,"flex-auto":``,"font-mono":``,flex:`~`,"touch-none":``,class:d([r.attached?`h-[22px]`:`h5`,k.value?`op80`:``]),onPointerdownCapture:F,onPointermove:I,onPointerup:s[0]||=e=>h(M)?M.value=void 0:M=void 0,onPointercancel:s[1]||=e=>h(M)?M.value=void 0:M=void 0},[(e(!0),u(m,null,n(A.value,n=>(e(),u(`div`,{key:n,border:`y main`,"of-hidden":``,relative:``,class:d([n===0?`border-l`:``,n===0?r.attached?`rounded-tl`:`rounded-l`:``,n===c.value?`border-r`:``,n===c.value&&+n!=+O.value?r.attached?`rounded-tr`:`rounded-r`:``,r.attached?`border-b-0`:``]),style:o({width:D.value>0?`${1/D.value*100}%`:`100%`})},[l(`div`,{absolute:``,"inset-0":``,class:d(n<=O.value&&r.active?`bg-primary op15`:``)},null,2),+n==+O.value&&r.active?(e(),u(`div`,T)):g(`v-if`,!0),l(`div`,{class:d([+n==+O.value&&r.active?`text-primary font-bold op100`:`op30`,n===c.value?``:`border-r-2 border-main`]),"w-full":``,"h-full":``,"text-xs":``,flex:``,"items-center":``,"justify-center":``,"z-1":``},t(n),3)],6))),128))],34)],10,x))}}),D=[`innerHTML`],O=[`textContent`],k=[`textContent`],A=`slidev-note-fade`,j=`slidev-note-click-mark`,M=s({__name:`NoteDisplay`,props:{class:{},noteHtml:{},note:{},highlight:{type:Boolean,default:!0},placeholder:{},clicksContext:{},autoScroll:{type:Boolean}},emits:[`markerDblclick`,`markerClick`],setup(n,{emit:o}){let s=n,m=o,h=p(()=>s.clicksContext!=null&&s.noteHtml?.includes(j)),g=f(null);function _(){if(!g.value||!h.value)return;let e=Array.from(g.value.querySelectorAll(`.${j}`)),t=new Map,n=new Map,r=0;for(let i of e){let e=Number(i.dataset.clicks);t.set(i,e);let a=i,o=i.parentElement;for(;o&&a!==g.value;)n.has(o)||n.set(o,[[null,r]]),n.get(o).push([a,e]),a=o,o=o.parentElement;r=e}let i=new Map;for(let[e,t]of n){let n=!1,r=0;for(let a of Array.from(e.childNodes)){let o=!1;for(;a===t[r+1]?.[0];)o=!0,r++;if(o)continue;let s=a;if(a.nodeType===3){if(!a.textContent?.trim())continue;s=document.createElement(`span`),s.textContent=a.textContent,e.insertBefore(s,a),a.remove()}n||=r===0,i.set(s,t[r][1])}n||(t[0][1]=-1)}return e=>{let r=s.highlight;for(let[t,i]of n)t.classList.toggle(A,r&&!i.some(([t,n])=>n===e));for(let[t,n]of i)t.classList.toggle(A,r&&n!==e);for(let[n,i]of t)n.classList.remove(A),n.classList.toggle(`${j}-past`,r&&i<e),n.classList.toggle(`${j}-active`,r&&i===e),n.classList.toggle(`${j}-next`,r&&i===e+1),n.classList.toggle(`${j}-future`,r&&i>e+1),n.ondblclick=e=>{r&&(m(`markerDblclick`,e,i),!e.defaultPrevented&&(s.clicksContext.current=i,e.stopPropagation(),e.stopImmediatePropagation()))},n.onclick=e=>{r&&m(`markerClick`,e,i)},r&&s.autoScroll&&i===e&&n.scrollIntoView({block:`center`,behavior:`smooth`})}}let v=f();return c(()=>[s.noteHtml,s.highlight],()=>{r(()=>{v.value=_()})},{immediate:!0}),a(()=>{_()}),i(()=>{let e=s.clicksContext?.current??999999;v.value?.(e)}),(r,i)=>n.noteHtml?(e(),u(`div`,{key:0,ref_key:`noteDisplay`,ref:g,class:d([`prose dark:prose-invert overflow-auto outline-none slidev-note`,[s.class,h.value?`slidev-note-with-clicks`:``]]),innerHTML:n.noteHtml},null,10,D)):n.note?(e(),u(`div`,{key:1,class:d([`prose dark:prose-invert overflow-auto outline-none slidev-note`,s.class])},[l(`p`,{textContent:t(n.note)},null,8,O)],2)):(e(),u(`div`,{key:2,class:d([`prose dark:prose-invert overflow-auto outline-none opacity-50 italic select-none slidev-note`,s.class])},[l(`p`,{textContent:t(s.placeholder||`No notes.`)},null,8,k)],2))}});export{E as n,M as t};
|
lecture-07/assets/slidev/NoteEditable-EWNsHjuy.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
import{B as e,P as t,Q as n,St as r,T as i,Z as a,b as o,bt as s,d as c,dt as l,gt as u,l as d,tt as f,v as p,yt as m}from"../modules/shiki-CJZsCeMT.js";import{C as h,k as g,o as _}from"../modules/vue-Dnfgf7Ad.js";import{t as v}from"../index-DxDNFTAW.js";import{t as y}from"./NoteDisplay-DomX2gaR.js";var b=[`placeholder`],x=i({__name:`NoteEditable`,props:{no:{type:Number,required:!0},class:{default:``},editing:{default:!1},style:{default:()=>({})},placeholder:{default:`No notes for this slide`},clicksContext:{type:Object},highlight:{default:!0},autoHeight:{default:!1}},emits:[`update:editing`,`markerDblclick`,`markerClick`],setup(i,{emit:x}){let S=i,C=x,w=h(S,`editing`,C,{passive:!0}),{info:T,update:E}=v(u(S,`no`)),D=l(``),O,{ignoreUpdates:k}=g(D,e=>{if(!w.value)return;let t=S.no;clearTimeout(O),O=setTimeout(()=>{E({note:e},t)},500)});a(()=>T.value?.note,(e=``)=>{w.value||(clearTimeout(O),k(()=>{D.value=e}))},{immediate:!0,flush:`sync`});let A=l(),j=l();n(()=>{w.value&&A.value?.focus()}),_(A,()=>{w.value=!1});function M(){!S.autoHeight||!A.value||!w.value||A.value.scrollHeight>A.value.clientHeight&&(A.value.style.height=`${A.value.scrollHeight}px`)}function N(e){w.value&&e.metaKey&&e.key===`s`&&(e.preventDefault(),E({note:D.value},S.no))}return a([D,w],()=>{t(()=>{M()})},{flush:`post`,immediate:!0}),(t,n)=>m(w)?f((e(),o(`textarea`,{key:1,ref_key:`inputEl`,ref:A,"onUpdate:modelValue":n[2]||=e=>D.value=e,class:s([`prose dark:prose-invert resize-none overflow-auto outline-none bg-transparent block border-primary border-2 slidev-note placeholder:op25`,[S.class,D.value?``:`italic`]]),style:r([S.style,j.value==null?{}:{height:`${j.value}px`}]),placeholder:i.placeholder,onKeydown:[n[3]||=c(e=>w.value=!1,[`esc`]),N]},null,46,b)),[[d,D.value]]):(e(),p(y,{key:0,class:s([`border-transparent border-2`,[S.class,D.value?``:`opacity-25 italic select-none`]]),style:r(S.style),note:D.value||i.placeholder,"note-html":m(T)?.noteHTML,"clicks-context":i.clicksContext,"auto-scroll":!i.autoHeight,highlight:S.highlight,onMarkerClick:n[0]||=(e,t)=>C(`markerClick`,e,t),onMarkerDblclick:n[1]||=(e,t)=>C(`markerDblclick`,e,t)},null,8,[`class`,`style`,`note`,`note-html`,`clicks-context`,`auto-scroll`,`highlight`]))}});export{x as t};
|
lecture-07/assets/slidev/TimerBar-M2O-qcUf.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
import{B as e,C as t,H as n,St as r,T as i,a,b as o,bt as s,et as c,g as l,gt as u,lt as d,m as f,y as p,yt as m}from"../modules/shiki-CJZsCeMT.js";import{U as h,t as g,tt as _}from"../useNav-BmBHxIEh.js";import{F as v}from"../modules/vue-Dnfgf7Ad.js";import{o as y}from"../index-DxDNFTAW.js";var b={class:`relative flex gap-px`},x=i({__name:`CurrentProgressBar`,props:{clicksContext:{},current:{}},setup(i){let u=i,d=g(),h=l(()=>u.clicksContext??d.clicksContext.value),_=l(()=>u.current??d.currentSlideNo.value),{total:v}=d;return(i,l)=>(e(),o(`div`,b,[(e(!0),o(f,null,n(m(v)-1,n=>(e(),o(`div`,{key:n,class:s([`border-x border-b border-main h-4px transition-all`,n<_.value?`bg-primary border-primary`:``]),style:r({width:`${1/(m(v)-1)*100}%`})},[t(a,{name:`fade`},{default:c(()=>[n===_.value?(e(),o(`div`,{key:0,class:`h-full bg-primary op75 transition-all`,style:r({width:`${h.value.total===0?0:h.value.current/(h.value.total+1)*100}%`})},null,4)):p(`v-if`,!0)]),_:2},1024)],6))),128))]))}});function S(){let e=l(()=>_.timer||`stopwatch`),t=l(()=>h(_.duration).seconds),n=v(100,{controls:!0}),r=u(y,`timer`),i=l(()=>r.value?.status),a=l(()=>(n.counter.value,r.value.status===`stopped`||!r.value.startedAt?0:r.value.status===`paused`?r.value.pausedAt-r.value.startedAt:Date.now()-r.value.startedAt)),o=l(()=>a.value/1e3),s=l(()=>o.value/t.value*100),c=l(()=>{if(e.value===`stopwatch`&&(r.value.status===`stopped`||!r.value.startedAt))return{h:``,m:`-`,s:`--`,ms:`-`};let n=e.value===`countdown`?t.value*1e3-a.value:a.value,i=Math.floor(n/1e3/60/60).toString();i===`0`&&(i=``);let o=Math.floor(n/1e3/60%60).toString();i&&(o=o.padStart(2,`0`));let s=Math.floor(n/1e3%60).toString().padStart(2,`0`),c=Math.floor(n%1e3/100).toString();return{h:i,m:o,s,ms:c}});function d(){n.pause(),r.value={status:`stopped`,slides:{},startedAt:0,pausedAt:0}}function f(){r.value&&(r.value?.status===`stopped`?(r.value.status=`running`,r.value.startedAt=Date.now()):r.value.status===`paused`&&(r.value.status=`running`,r.value.startedAt=Date.now()-(r.value.pausedAt-r.value.startedAt)),n.resume())}function p(){r.value.status=`paused`,r.value.pausedAt=Date.now(),n.pause()}function m(){r.value.status===`running`?p():f()}return{state:r,status:i,timer:c,reset:d,toggle:m,resume:f,pause:p,passed:o,percentage:s,duration:t,mode:e}}var C={class:`border-b mt-px border-main relative flex h-4px`},w=i({__name:`TimerBar`,setup(t){let n=d(S()),i=l(()=>n.status===`stopped`?`op50`:n.status===`paused`?`bg-blue`:n.percentage>100?`bg-red`:n.percentage>80?`bg-yellow`:`bg-green`);return(t,a)=>(e(),o(`div`,C,[n.status===`stopped`?p(`v-if`,!0):(e(),o(`div`,{key:0,class:s([`h-4px`,i.value]),style:r({width:`${n.percentage}%`})},null,6)),p(` {{ timesplits }} `)]))}});export{S as n,x as r,w as t};
|
lecture-07/assets/slidev/VClicks-DhU7uhQr.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
import{B as e,C as t,G as n,O as r,R as i,T as a,j as o,m as s,p as c,tt as l,v as u,z as d}from"../modules/shiki-CJZsCeMT.js";import{K as f,it as p}from"../useNav-BmBHxIEh.js";import{n as m}from"./context-DB-9afGB.js";import{u as h}from"../index-DxDNFTAW.js";var g=a({__name:`VClickGap`,props:{size:{type:[String,Number],default:1}},setup(t){let n=t,{$clicksContext:r}=m(),a=h(),o=+n.size;return Number.isNaN(o)&&(console.warn(`[slidev] Invalid size for VClickGap: ${n.size}`),o=1),i(()=>{let e=r.currentOffset+o-1;r.register(a,{max:e,delta:o})}),d(()=>{r.unregister(a)}),(t,n)=>(e(),u(s))}}),_=[`ul`,`ol`],v=/[\s,]+/,y=a({props:{depth:{type:[Number,String],default:1},every:{type:[Number,String],default:1},at:{type:[Number,String],default:`+1`},hide:{type:Boolean,default:!1},fade:{type:Boolean,default:!1},animation:{type:[String,Array],default:void 0},handleSpecialElements:{type:Boolean,default:!0}},render(){let e=+this.every,i=f(this.at),a=typeof i==`string`,s=this.$slots.default?.();if(i==null||!s)return s;let u=n(`click`),d=(e,t)=>{let n={hide:this.hide};return typeof this.animation==`string`?this.animation.split(v).forEach(e=>{e&&(n[e]=!0)}):Array.isArray(this.animation)&&this.animation.forEach(e=>n[e]=!0),this.fade&&(n.fade=!0),l(e,[[u,t,``,n]])},m=e=>e.flatMap(e=>o(e)&&typeof e.type==`symbol`&&Array.isArray(e.children)?m(e.children):[e]);s=m(p(s));let h=(e,t=1)=>m(e).map(e=>{if(!o(e))return e;if(_.includes(e.type)&&Array.isArray(e.children)){let n=x(e.children,t+1);return r(e,{},n)}return r(e)}),y=1,b=0,x=(t,n=1)=>m(t).map(t=>{if(!o(t)||t.type===c)return t;let s=+i+Math.ceil(y++/e)-1,l;l=n<+this.depth&&Array.isArray(t.children)?r(t,{},h(t.children,n)):r(t);let u=s-b;return b=s,d(l,a?u>=0?`+${u}`:`${u}`:s)}),S=()=>t(g,{size:+i+Math.ceil((y-1)/e)-1-b});if(this.handleSpecialElements){if(s.length===1&&_.includes(s[0].type)&&Array.isArray(s[0].children))return r(s[0],{},[...x(s[0].children),S()]);if(s.length===1&&s[0].type===`table`){let e=s[0];if(Array.isArray(e.children))return r(e,{},e.children.map(e=>o(e)?e.type===`tbody`&&Array.isArray(e.children)?r(e,{},[...x(e.children),S()]):r(e):e))}}return[...x(s),S()]}});export{y as t};
|
lecture-07/assets/slidev/VerticalDivider-Bvc1MZzH.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
import{B as e,b as t}from"../modules/shiki-CJZsCeMT.js";import{t as n}from"../_plugin-vue_export-helper-BDNMzG2s.js";var r={},i={class:`w-1px opacity-10 bg-current m-1 lg:m-2`};function a(n,r){return e(),t(`div`,i)}var o=n(r,[[`render`,a]]);export{o as t};
|
lecture-07/assets/slidev/client-Ct4Bq5Nz.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
import"../useNav-BmBHxIEh.js";import"./context-DB-9afGB.js";import"../syncState-3Tc2ZArb.js";import"../index-DxDNFTAW.js";import"../useDrawings-vNWRit9P.js";
|
lecture-07/assets/slidev/context-DB-9afGB.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
import{dt as e,g as t,gt as n}from"../modules/shiki-CJZsCeMT.js";import{A as r,M as i}from"../modules/vue-Dnfgf7Ad.js";var a=`$$slidev-clicks-context`,o=`$$slidev-page`,s=`$$slidev-slide-element`,c=`$$slidev-slide-scale`,l=`$$slidev-context`,u=`$$slidev-route`,d=`$$slidev-render-context`,f=`$$slidev-fontmatter`,p=`$$slidev-slide-zoom`,m=`slidev-vclick-target`,h=`slidev-vclick-hidden`,g=`slidev-vclick-hidden-explicitly`,_=`slidev-vclick-current`,v=`slidev-vclick-prior`,y=`slidev-vclick-anim-`,b=999999,x=[`localhost`,`127.0.0.1`],S=[`clicks`,`clicksStart`,`disabled`,`hide`,`hideInToc`,`layout`,`level`,`preload`,`routeAlias`,`src`,`title`,`transition`,`zoom`,`dragPos`,`lang`,`clickAnimation`],C=[...S,`theme`,`titleTemplate`,`info`,`author`,`keywords`,`presenter`,`browserExporter`,`download`,`exportFilename`,`export`,`highlighter`,`lineNumbers`,`monaco`,`monacoTypesSource`,`monacoTypesAdditionalPackages`,`monacoRunAdditionalDeps`,`monacoRunUseStrict`,`remoteAssets`,`selectable`,`record`,`colorSchema`,`routerMode`,`aspectRatio`,`canvasWidth`,`themeConfig`,`favicon`,`plantUmlServer`,`fonts`,`defaults`,`drawings`,`htmlAttrs`,`mdc`,`comark`,`contextMenu`,`wakeLock`,`pwa`,`seoMeta`,`notesAutoRuby`,`magicMoveDuration`,`preloadImages`];function w(){let i=r(l),s=n(i,`nav`),m=r(a).value,h=n(m,`current`),g=r(o),_=r(d),v=r(f,{});return{$slidev:i,$nav:s,$clicksContext:m,$clicks:h,$page:g,$route:r(u,void 0),$renderContext:_,$frontmatter:v,$scale:r(c,e(1)),$zoom:r(p,t(()=>1))}}function T(e,t){return{...i(e,t===0?C:S),frontmatter:e}}export{c as _,h as a,m as c,a as d,o as f,s as g,u as h,_ as i,b as l,d as m,w as n,g as o,f as p,y as r,v as s,T as t,x as u,p as v,l as y};
|
lecture-07/assets/slidev/entry-C7SFAt6v.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
import{B as e,C as t,S as n,W as r,_ as i,b as a,et as o}from"../modules/shiki-CJZsCeMT.js";import{t as s}from"../_plugin-vue_export-helper-BDNMzG2s.js";var c={},l={class:`h-full w-full flex items-center justify-center gap-5 lt-md:flex-col`};function u(s,c){let u=r(`RouterLink`);return e(),a(`div`,l,[t(u,{to:`/`,class:`page-link`},{default:o(()=>[...c[0]||=[i(`div`,{class:`i-carbon:presentation-file`},null,-1),n(` Slides `,-1)]]),_:1}),t(u,{to:`/presenter`,class:`page-link`},{default:o(()=>[...c[1]||=[i(`div`,{class:`i-carbon:user-speaker`},null,-1),n(` Presenter `,-1)]]),_:1}),t(u,{to:`/notes`,class:`page-link`},{default:o(()=>[...c[2]||=[i(`div`,{class:`i-carbon:catalog`},null,-1),n(` Notes `,-1)]]),_:1}),t(u,{to:`/overview`,class:`page-link`},{default:o(()=>[...c[3]||=[i(`div`,{class:`i-carbon:list-boxes`},null,-1),n(` Overview `,-1)]]),_:1})])}var d=s(c,[[`render`,u],[`__scopeId`,`data-v-966650ef`]]);export{d as default};
|
lecture-07/assets/slidev/notes-0YYK7eZS.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
import{B as e,C as t,Ct as n,S as r,St as i,T as a,Z as o,_ as s,b as c,dt as l,et as u,g as d,m as f,yt as p}from"../modules/shiki-CJZsCeMT.js";import{$ as m,W as h,t as g,u as _}from"../useNav-BmBHxIEh.js";import{g as v}from"../modules/vue-Dnfgf7Ad.js";import{h as y,o as b}from"../index-DxDNFTAW.js";import{t as x}from"./IconButton-BwA4p7Ax.js";import{t as S}from"./Modal-PBdP8Aqp.js";import{n as C,t as w}from"./NoteDisplay-DomX2gaR.js";import{r as T,t as E}from"./TimerBar-M2O-qcUf.js";var D={class:`flex my-1`},O={class:`h-full flex flex-col`},k={class:`flex-none border-t border-main`,px3:``,py2:``},A={class:`flex-none border-t border-main`},j={class:`flex gap-1 items-center px-6 py-3`},M={key:0,class:`i-carbon:minimize`},N={key:1,class:`i-carbon:maximize`},P={class:`px2 my-auto`},F={class:`text-lg`},I={class:`opacity-50 text-sm`},L=a({__name:`notes`,setup(a){y({title:`Notes - ${m}`});let{slides:L,total:R}=g(),{isFullscreen:z,toggle:B}=_,V=l(),H=v(`slidev-notes-font-size`,18),U=d(()=>b.page),W=l(!1),G=d(()=>L.value.find(e=>e.no===U.value));o(U,()=>{V.value?.scrollTo({left:0,top:0,behavior:`smooth`}),window.scrollTo({left:0,top:0,behavior:`smooth`})});function K(){H.value+=1}function q(){--H.value}let J=d(()=>{let e=b.clicks,t=b.clicksTotal;return h(l(e),void 0,t)});return(a,o)=>(e(),c(f,null,[t(S,{modelValue:W.value,"onUpdate:modelValue":o[1]||=e=>W.value=e,class:`px-6 py-4 flex flex-col gap-2`},{default:u(()=>[o[3]||=s(`div`,{class:`flex gap-2 text-xl`},[s(`div`,{class:`i-carbon:information my-auto`}),r(` Help `)],-1),o[4]||=s(`div`,{class:`prose dark:prose-invert`},[s(`p`,null,`This is the hands-free live notes viewer.`),s(`p`,null,`It's designed to be used in a separate view or device. The progress is controlled by and auto synced with the main presenter or slide.`)],-1),s(`div`,D,[s(`button`,{class:`slidev-form-button`,onClick:o[0]||=e=>W.value=!1},` Close `)])]),_:1},8,[`modelValue`]),s(`div`,O,[t(T,{"clicks-context":J.value,current:U.value},null,8,[`clicks-context`,`current`]),t(E),s(`div`,{ref_key:`scroller`,ref:V,class:`px-5 py-3 flex-auto h-full overflow-auto`,style:i({fontSize:`${p(H)}px`})},[t(w,{note:G.value?.meta.slide.note,"note-html":G.value?.meta.slide.noteHTML,placeholder:`No notes for Slide ${U.value}.`,"clicks-context":J.value,"auto-scroll":!0},null,8,[`note`,`note-html`,`placeholder`,`clicks-context`])],4),s(`div`,k,[t(C,{"clicks-context":J.value,readonly:``},null,8,[`clicks-context`])]),s(`div`,A,[s(`div`,j,[t(x,{title:p(z)?`Close fullscreen`:`Enter fullscreen`,onClick:p(B)},{default:u(()=>[p(z)?(e(),c(`div`,M)):(e(),c(`div`,N))]),_:1},8,[`title`,`onClick`]),t(x,{title:`Increase font size`,onClick:K},{default:u(()=>[...o[5]||=[s(`div`,{class:`i-carbon:zoom-in`},null,-1)]]),_:1}),t(x,{title:`Decrease font size`,onClick:q},{default:u(()=>[...o[6]||=[s(`div`,{class:`i-carbon:zoom-out`},null,-1)]]),_:1}),t(x,{title:`Edit notes`,to:`/notes-edit`,target:`_blank`},{default:u(()=>[...o[7]||=[s(`div`,{class:`i-carbon:edit`},null,-1)]]),_:1}),t(x,{title:`Help`,class:`rounded-full`,onClick:o[2]||=e=>W.value=!0},{default:u(()=>[...o[8]||=[s(`div`,{class:`i-carbon:help`},null,-1)]]),_:1}),o[9]||=s(`div`,{class:`flex-auto`},null,-1),s(`div`,P,[s(`span`,F,n(U.value),1),s(`span`,I,` / `+n(p(R)),1)])])])])],64))}});export{L as default};
|
lecture-07/assets/slidev/notes-edit-CNXbnFBO.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import{B as e,C as t,S as n,T as r,_ as i,b as a,dt as o,et as s,l as c,m as l,tt as u}from"../modules/shiki-CJZsCeMT.js";import{$ as d,t as f}from"../useNav-BmBHxIEh.js";import{O as p}from"../modules/vue-Dnfgf7Ad.js";import{h as m,t as h}from"../index-DxDNFTAW.js";import{t as g}from"./IconButton-BwA4p7Ax.js";import{t as _}from"./Modal-PBdP8Aqp.js";var v={class:`flex my-1`},y={class:`h-full`},b={class:`slidev-glass-effect fixed bottom-5 right-5 rounded-full border border-main`},x=r({__name:`notes-edit`,setup(r){let x=/^---\s*#(\d+)\s*$/;m({title:`Notes Edit - ${d}`});let{slides:S}=f(),C=o(!1),w=o(T(S.value));function T(e){let t=[];for(let n of e)n.meta.slide.note?.trim()&&(t.push(`--- #${n.no}`),t.push(``),t.push(n.meta.slide.note),t.push(``));return t.join(`
|
| 2 |
+
`)}function E(e,t){let n=e.split(/^(---\s*#\d+\s*)$/gm);n.forEach((e,r)=>{let i=e.match(x);if(i){let e=Number.parseInt(i[1]),a=n[r+1].trim(),o=t.find(t=>t.no===e);o&&(o.meta.slide.note=a,h(e).update({note:a}))}})}return p(w,e=>{E(e,S.value)},{debounce:300}),(r,o)=>(e(),a(l,null,[t(_,{modelValue:C.value,"onUpdate:modelValue":o[1]||=e=>C.value=e,class:`px-6 py-4 flex flex-col gap-2`},{default:s(()=>[o[4]||=i(`div`,{class:`flex gap-2 text-xl`},[i(`div`,{class:`i-carbon:information my-auto`}),n(` Help `)],-1),o[5]||=i(`div`,{class:`prose dark:prose-invert`},[i(`p`,null,`This is the batch notes editor. You can edit the notes for all the slides at once here.`),i(`p`,null,[n(`The note for each slide are separated by `),i(`code`,null,`--- #[no]`),n(` lines, you might want to keep them while editing.`)])],-1),i(`div`,v,[i(`button`,{class:`slidev-form-button`,onClick:o[0]||=e=>C.value=!1},` Close `)])]),_:1},8,[`modelValue`]),i(`div`,y,[i(`div`,b,[t(g,{title:`Help`,class:`rounded-full`,onClick:o[2]||=e=>C.value=!0},{default:s(()=>[...o[6]||=[i(`div`,{class:`i-carbon:help text-2xl`},null,-1)]]),_:1})]),u(i(`textarea`,{"onUpdate:modelValue":o[3]||=e=>w.value=e,class:`prose dark:prose-invert resize-none p5 outline-none bg-transparent block h-full w-full! max-w-full! max-h-full! min-h-full! min-w-full!`},null,512),[[c,w.value]])])],64))}});export{x as default};
|
lecture-07/assets/slidev/overview-onWweOVU.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
import{B as e,C as t,Ct as n,H as r,P as i,R as a,St as o,T as s,_ as c,b as l,bt as u,dt as d,et as f,g as p,lt as m,m as h,mt as ee,v as g,y as _,yt as v,z as te}from"../modules/shiki-CJZsCeMT.js";import{$ as ne,B as y,G as re,R as b,X as ie,Y as x,t as ae}from"../useNav-BmBHxIEh.js";import{t as S}from"../_plugin-vue_export-helper-BDNMzG2s.js";import{B as oe,V as se}from"../modules/vue-Dnfgf7Ad.js";import{l as C}from"./context-DB-9afGB.js";import{f as ce,h as le,m as ue,p as w}from"../index-DxDNFTAW.js";import{n as de,r as fe}from"../modules/unplugin-icons-CStvVwzQ.js";import{t as T}from"./IconButton-BwA4p7Ax.js";import{n as E}from"./NoteDisplay-DomX2gaR.js";import{i as pe,o as me,t as he}from"../SlideWrapper-B_VDtSxZ.js";import{t as ge}from"./NoteEditable-EWNsHjuy.js";var _e={class:`h-screen w-screen of-hidden flex`},ve={key:0,class:`grid grid-rows-[auto_max-content] border-r border-main select-none max-h-full h-full`},ye={class:`relative`},be={class:`absolute left-0 top-0 bottom-0 w-200 flex flex-col flex-auto items-end group p-6px md:p-10px gap-1 max-h-full of-x-visible of-y-auto`,style:{direction:`rtl`}},xe=[`onClick`],Se={p2:``,border:`t main`},Ce={class:`flex flex-col gap-1 mx-1 items-end`},we={key:0,class:`flex items-end gap-2`},Te=[`onClick`],Ee=[`onDblclick`],De={key:2,class:`select-none absolute bottom-0 right-0 bg-main rounded-tl p2 op35 text-xs`},Oe={key:1,class:`absolute z-2 top-0 right-0 px3 py1.5 border-b border-l rounded-lb bg-main/80 backdrop-blur border-main select-none`},ke={class:`text-xs op50`},D=450,O=S(s({__name:`overview`,setup(s){le({title:`Overview - ${ne}`});let S=oe(),O=se(),{openInEditor:Ae,slides:k,isEmbedded:A}=ae(),j=p(()=>S.query.mode===`preview`),M=p(()=>j.value&&A.value),N=p(()=>j.value?M.value?Math.max(0,b.width.value-16):Math.min(900,Math.max(320,b.width.value-160)):D),je=p(()=>N.value/ie.value),P=m(new Map),F=m(new Map),I=d([]),L=d(),R=d(null),z=0,B,V,H=p(()=>k.value.map(e=>Fe(e.meta?.slide?.note||``))),Me=p(()=>H.value.reduce((e,t)=>e+t,0)),Ne=p(()=>k.value.map(e=>K(e)).reduce((e,t)=>e+t,0)),Pe=p(()=>String(Math.max(1,k.value.length)).length),U=ee(),W=new WeakMap;function G(e){return W.has(e)||W.set(e,re(e,C)),W.get(e)}function K(e){return e.meta?.clicks||G(e)?.total}function q(e){U.value===e?U.value=void 0:U.value=e}function Fe(e){let t=e.match(/[\w`'\-\u0392-\u03C9\u00C0-\u00FF\u0600-\u06FF\u0400-\u04FF]+|[\u4E00-\u9FFF\u3400-\u4DBF\uF900-\uFAFF\u3040-\u309F\uAC00-\uD7AF]+/g),n=0;if(!t)return 0;for(let e=0;e<t.length;e++)t[e].charCodeAt(0)>=19968?n+=t[e].length:n+=1;return n}function J(){let e=window.innerHeight||document.documentElement.clientHeight,t,n=[];for(let[r,i]of P.entries()){let a=i.getBoundingClientRect(),o=Math.max(0,Math.min(a.bottom,e)-Math.max(a.top,0));o!==0&&(o>=a.height&&n.push(r),(!t||o>t.visibleHeight)&&(t={idx:r,visibleHeight:o}))}I.value=n.length?n:t?[t.idx]:[]}function Y(e){let t=document.createElement(`a`);t.target=`_blank`,t.href=x+e.slice(1),t.click()}function Ie(e){let t=new URL(x+e.slice(1),location.href).href;if(A.value){window.parent.postMessage({target:`slidev`,sender:`slidev`,type:`open-external`,url:t},`*`);return}Y(e)}function Le(e){let t=P.get(e);t&&t.scrollIntoView({behavior:`smooth`,block:`start`})}function X(e){let t=F.get(e)||P.get(e);if(!t||!L.value)return null;let n=L.value.getBoundingClientRect();return t.getBoundingClientRect().top-n.top+L.value.scrollTop}function Z(e){if(!L.value||k.value.length===0)return;let t=Math.min(Math.max(e,1),k.value.length),n=Math.floor(t)-1,r=t-(n+1),i=X(n),a=X(n+1);if(i==null)return;let o=i+(a==null?0:(a-i)*r)-L.value.clientHeight*.5;Math.abs(L.value.scrollTop-o)<1||L.value.scrollTo({top:o})}function Re(){let e=S.query.slideNo,t=Number(Array.isArray(e)?e[0]:e);return Number.isFinite(t)&&t>0?t:void 0}function Q(e){if(!M.value)return;let t=Number(e.toFixed(3)).toString();S.query.slideNo!==t&&O.replace({query:{...S.query,slideNo:t}})}function ze(){if(!L.value||k.value.length===0)return null;let e=L.value.scrollTop+L.value.clientHeight*.5,t=k.value.map((e,t)=>X(t)).filter(e=>e!=null);if(t.length===0)return null;if(t.length===1||e<=t[0])return 1;for(let n=1;n<t.length;n++)if(e<=t[n]){let r=Math.max(1,t[n]-t[n-1]);return n+(e-t[n-1])/r}return k.value.length}function Be(e){B=e,!V&&(V=setTimeout(()=>{V=void 0;let e=B;B=void 0,e!=null&&(Q(e),!(Date.now()<z)&&window.parent.postMessage({target:`slidev`,sender:`slidev`,type:`overview-scroll`,no:e},`*`))},50))}function Ve(){if(J(),!M.value||Date.now()<z)return;let e=ze();e!=null&&Be(e)}function $({data:e}){if(!M.value||e?.target!==`slidev`||e.sender!==`vscode`||e.type!==`overview-scroll`)return;let t=Number(e.no);t>0&&(z=Date.now()+300,B=void 0,Q(t),Z(t))}function He(e,t,n){let r=G(n);r.current=r.current===t?C:t,e.preventDefault()}function Ue(e,t){if(e.ctrlKey||e.metaKey){e.preventDefault(),Ie(y(t,!1));return}let n=t.meta?.slide;n&&window.parent.postMessage({target:`slidev`,type:`command`,command:`goto`,args:[n.filepath,n.sourceIndex]},`*`)}return a(()=>{window.addEventListener(`message`,$);let e=M.value?Re():void 0;e!=null&&(z=Date.now()+300,Z(e)),i(()=>{e!=null&&Z(e),J()})}),te(()=>{window.removeEventListener(`message`,$),V&&clearTimeout(V)}),(i,a)=>{let s=de,d=fe;return e(),l(`div`,_e,[v(A)?_(`v-if`,!0):(e(),l(`nav`,ve,[c(`div`,ye,[c(`div`,be,[(e(!0),l(h,null,r(v(k),(t,r)=>(e(),l(`div`,{key:t.no,class:`relative`,style:{direction:`ltr`}},[c(`button`,{class:u([`relative transition duration-300 w-8 h-8 rounded hover:bg-active hover:op100`,I.value.includes(r)?`op100 text-primary bg-gray:5`:`op20`]),onClick:e=>Le(r)},[c(`div`,null,n(r+1),1)],10,xe),t.meta?.slide?.title?(e(),l(`div`,{key:0,class:u([`pointer-events-none select-none absolute left-110% top-50% translate-y--50% ws-nowrap z-label px2 slidev-glass-effect transition duration-400 op0 group-hover:op100`,I.value.includes(r)?`text-primary`:`text-main important-text-op-50`])},n(t.meta?.slide?.title),3)):_(`v-if`,!0)]))),128))])]),c(`div`,Se,[v(ce)?(e(),g(T,{key:1,title:v(w)?`Dark mode`:`Light mode`,"pointer-events-none":``,op50:``},{default:f(()=>[v(w)?(e(),g(s,{key:0})):(e(),g(d,{key:1}))]),_:1},8,[`title`])):(e(),g(T,{key:0,title:v(w)?`Switch to light mode theme`:`Switch to dark mode theme`,onClick:a[0]||=e=>v(ue)()},{default:f(()=>[v(w)?(e(),g(s,{key:0})):(e(),g(d,{key:1}))]),_:1},8,[`title`]))])])),c(`main`,{ref_key:`scroller`,ref:L,class:`flex-1 h-full of-auto`,style:o(`grid-template-columns: repeat(auto-fit,minmax(${D}px,1fr))`),onScroll:Ve},[(e(!0),l(h,null,r(v(k),(r,i)=>(e(),l(`div`,{key:r.no,ref_for:!0,ref:e=>P.set(i,e),class:u([`overview-slide-block relative of-hidden flex gap-4 min-h-50`,[i===0&&!M.value?`pt2`:``,M.value?`justify-center`:`border-t border-main`]])},[M.value?_(`v-if`,!0):(e(),l(`div`,{key:0,class:u([`select-none text-right my5 flex flex-col justify-between items-end`,j.value?`w-9`:`w-13`]),style:o({height:`${je.value}px`})},[c(`div`,{class:`self-center text-3xl op20 mb2 text-center mr--14px tabular-nums`,style:o({width:`${Pe.value}ch`})},n(i+1),5),c(`div`,Ce,[t(T,{class:u([`overview-slide-action mr--4 op0`,j.value?`text-lg`:``]),title:`Play in new tab`,onClick:e=>Y(v(y)(r,!1))},{default:f(()=>[...a[4]||=[c(`div`,{class:`i-carbon:presentation-file`},null,-1)]]),_:1},8,[`class`,`onClick`]),_(`v-if`,!0)])],6)),c(`div`,{class:u([`flex flex-col`,M.value?`my1 gap-0`:`my5 gap-2`]),style:o({width:`${N.value}px`})},[M.value?(e(),l(`div`,we,[c(`button`,{type:`button`,class:`select-none pl-1 text-lg leading-tight op60 tabular-nums hover:op90 hover:underline underline-offset-2`,onClick:e=>Ue(e,r)},n(i+1),9,Te),K(r)?(e(),g(E,{key:0,active:U.value===r,"clicks-context":G(r),resettable:``,compact:``,attached:``,class:`ml-auto w-88 min-w-[70%] max-w-[calc(100%-3rem)]`,onDblclick:e=>q(r),onActivate:e=>U.value=r,onReset:a[1]||=e=>U.value=void 0},null,8,[`active`,`clicks-context`,`onDblclick`,`onActivate`])):_(`v-if`,!0)])):_(`v-if`,!0),c(`div`,{ref_for:!0,ref:e=>F.set(i,e),class:u([`border rounded border-main overflow-hidden bg-main h-max`,[M.value&&K(r)?`rounded-tr-0`:``,M.value?``:`select-none`]]),onDblclick:e=>!M.value&&Y(v(y)(r,!1))},[(e(),g(pe,{key:r.no,width:N.value,class:u(M.value?``:`pointer-events-none important:[&_*]:select-none`)},{default:f(()=>[t(he,{"clicks-context":G(r),route:r,"render-context":`overview`},null,8,[`clicks-context`,`route`]),t(me,{page:r.no},null,8,[`page`])]),_:2},1032,[`width`,`class`]))],42,Ee),K(r)&&!M.value?(e(),g(E,{key:1,active:U.value===r,"clicks-context":G(r),resettable:``,class:u([`ml-1 w-[calc(100%-0.25rem)]`,j.value?``:`mt-2`]),onDblclick:e=>q(r),onActivate:e=>U.value=r,onReset:a[2]||=e=>U.value=void 0},null,8,[`active`,`clicks-context`,`class`,`onDblclick`,`onActivate`])):_(`v-if`,!0)],6),j.value?_(`v-if`,!0):(e(),g(ge,{key:1,no:r.no,class:`relative z-1 max-w-250 w-250 text-lg rounded p3`,"auto-height":!0,highlight:U.value===r,editing:R.value===r.no,"clicks-context":G(r),onDblclick:e=>R.value===r.no?null:R.value=r.no,"onUpdate:editing":a[3]||=e=>R.value=null,onMarkerClick:(e,t)=>He(e,t,r)},null,8,[`no`,`highlight`,`editing`,`clicks-context`,`onDblclick`,`onMarkerClick`])),!j.value&&H.value[i]>0?(e(),l(`div`,De,n(H.value[i])+` words `,1)):_(`v-if`,!0)],2))),128))],36),v(A)?_(`v-if`,!0):(e(),l(`div`,Oe,[c(`div`,ke,n(v(k).length)+` slides · `+n(Ne.value+v(k).length-1)+` clicks · `+n(Me.value)+` words `,1)]))])}}}),[[`__scopeId`,`data-v-47f32601`]]);export{O as default};
|
lecture-07/assets/slidev/play-CuAAHxP2.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./DrawingControls-CovJrial.js","../rolldown-runtime-hePW80VL.js","../modules/shiki-CJZsCeMT.js","../modules/shiki-BrmBd2_v.css","../modules/vue-Dnfgf7Ad.js","../useDrawings-vNWRit9P.js","../useNav-BmBHxIEh.js","../_plugin-vue_export-helper-BDNMzG2s.js","./context-DB-9afGB.js","../index-DxDNFTAW.js","../syncState-3Tc2ZArb.js","../index-BzbW-jWD.css","./IconButton-BwA4p7Ax.js","./VerticalDivider-Bvc1MZzH.js","../DrawingControls-Dhbx0szf.css"])))=>i.map(i=>d[i]);
|
| 2 |
+
import{B as e,C as t,S as n,St as r,T as i,Z as a,_ as o,b as s,bt as c,ct as l,dt as u,et as d,g as f,m as p,mt as m,ot as h,v as g,y as _,yt as v}from"../modules/shiki-CJZsCeMT.js";import{E as y,F as b,I as x,f as S,h as C,k as w,q as T,t as E,tt as D,v as O,w as k}from"../useNav-BmBHxIEh.js";import{C as A,m as j}from"../modules/vue-Dnfgf7Ad.js";import{o as M}from"../index-DxDNFTAW.js";import{t as N}from"../useDrawings-vNWRit9P.js";import{t as P}from"../modules/unplugin-icons-CStvVwzQ.js";import{t as F}from"./Modal-PBdP8Aqp.js";import{i as I}from"../SlideWrapper-B_VDtSxZ.js";import{a as L,c as R,d as z,f as B,l as V,n as H,r as U,s as W,t as G,u as K}from"./shortcuts-CecQChrI.js";var q=2e3;function J(e){let t=f(()=>e.value&&S.value);function n(){document.body.style.cursor=`none`}function r(){document.body.style.cursor=``}let i=null;a(t,e=>{e||(r(),i&&clearTimeout(i),i=null)}),l(()=>{r(),i&&clearTimeout(i),i=null}),j(document.body,[`pointermove`,`pointerdown`],()=>{r(),i&&clearTimeout(i),i=t.value?setTimeout(n,q):null},{passive:!0})}``+new URL(`../logo-BYkHSa_O.png`,import.meta.url).href;var Y={class:`slidev-info-dialog slidev-layout flex flex-col gap-4 text-base`},X=[`innerHTML`],Z=i({__name:`InfoDialog`,props:{modelValue:{default:!1}},emits:[`update:modelValue`],setup(t,{emit:r}){let i=A(t,`modelValue`,r),a=f(()=>typeof D.info==`string`);return(t,r)=>(e(),g(F,{modelValue:v(i),"onUpdate:modelValue":r[0]||=e=>h(i)?i.value=e:null,class:`px-6 py-4`},{default:d(()=>[o(`div`,Y,[a.value?(e(),s(`div`,{key:0,class:`mb-4`,innerHTML:v(D).info},null,8,X)):_(`v-if`,!0),r[1]||=o(`a`,{href:`https://github.com/slidevjs/slidev`,target:`_blank`,class:`!opacity-100 !border-none !text-current`},[o(`div`,{class:`flex gap-1 children:my-auto`},[o(`div`,{class:`opacity-50 text-sm mr-2`},`Powered by`),o(`img`,{class:`w-5 h-5`,src:``+new URL(`../logo-BYkHSa_O.png`,import.meta.url).href,alt:`Slidev logo`}),o(`div`,{style:{color:`#2082A6`}},[o(`b`,null,`Sli`),n(`dev `)])])],-1)])]),_:1},8,[`modelValue`]))}}),Q=i({__name:`Controls`,setup(n){let{isEmbedded:r}=E(),i=!D.drawings.presenterOnly&&!r.value,a=m();i&&T(()=>import(`./DrawingControls-CovJrial.js`).then(e=>e.n).then(e=>a.value=e.default),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]),import.meta.url);let o=m(),c=m();return(n,r)=>(e(),s(p,null,[a.value?(e(),g(v(a),{key:0})):_(`v-if`,!0),t(W),t(R),o.value?(e(),g(v(o),{key:1})):_(`v-if`,!0),c.value?(e(),g(v(c),{key:2,modelValue:v(w),"onUpdate:modelValue":r[0]||=e=>h(w)?w.value=e:null},null,8,[`modelValue`])):_(`v-if`,!0),v(D).info?(e(),g(Z,{key:3,modelValue:v(y),"onUpdate:modelValue":r[1]||=e=>h(y)?y.value=e:null},null,8,[`modelValue`])):_(`v-if`,!0),t(V)],64))}}),$={key:0,class:`absolute top-0 left-0 right-0 bottom-0 pointer-events-none text-xl`},ee=i({__name:`PresenterMouse`,setup(n){return(n,i)=>{let a=P;return v(M).cursor?.style===`cursor`?(e(),s(`div`,$,[t(a,{class:`absolute stroke-white dark:stroke-black`,style:r({left:`${v(M).cursor.x}%`,top:`${v(M).cursor.y}%`,strokeWidth:16})},null,8,[`style`])])):_(`v-if`,!0)}}}),te=i({__name:`play`,setup(n){let{next:r,prev:i,isPrintMode:a,isPlaying:l,isEmbedded:h}=E(),{isDrawing:y}=N(),S=u();function w(e){k.value||e.button===0&&e.target?.id===`slide-container`&&(e.pageX/window.innerWidth>.5?r():i())}B(S),G(),z(),J(f(()=>l.value&&!h.value&&!k.value));let T=f(()=>O.value||k.value),D=m(),A=f(()=>{let e=``;return b.value.brightness!==x.brightness&&(e+=`brightness(${b.value.brightness}) `),b.value.contrast!==x.contrast&&(e+=`contrast(${b.value.contrast}) `),b.value.sepia!==x.sepia&&(e+=`sepia(${b.value.sepia}) `),b.value.hueRotate!==x.hueRotate&&(e+=`hue-rotate(${b.value.hueRotate}deg) `),b.value.invert&&(e+=`invert(1) `),{filter:e}});return(n,r)=>(e(),s(p,null,[o(`div`,{id:`page-root`,ref_key:`root`,ref:S,class:c([`grid`,v(C)?`grid-rows-[1fr_max-content]`:`grid-cols-[1fr_max-content]`])},[t(I,{style:{background:`var(--slidev-slide-container-background, black)`},"is-main":``,"content-style":A.value,onPointerdown:w,onContextmenu:v(K)},{default:d(()=>[t(H,{"render-context":`slide`}),t(ee),t(L)]),controls:d(()=>[v(a)?_(`v-if`,!0):(e(),s(`div`,{key:0,class:c([`absolute bottom-0 left-0 transition duration-300 opacity-0 hover:opacity-100 focus-within:opacity-100 focus-visible:opacity-100`,[T.value?`!opacity-100 right-0`:`opacity-0 p-2`,v(y)?`pointer-events-none`:``]])},[t(U,{persist:T.value},null,8,[`persist`])],2))]),_:1},8,[`content-style`,`onContextmenu`]),D.value&&v(k)?(e(),g(v(D),{key:0,resize:!0})):_(`v-if`,!0)],2),v(a)?_(`v-if`,!0):(e(),g(Q,{key:0})),r[0]||=o(`div`,{id:`twoslash-container`},null,-1)],64))}});export{te as default};
|
lecture-07/assets/slidev/presenter-DY5YySOI.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
import{B as e,C as t,Ct as n,Q as r,R as i,S as a,St as o,T as s,X as c,Z as l,_ as u,b as d,bt as f,dt as p,et as m,g as h,m as ee,mt as g,ot as te,tt as _,u as v,v as y,y as b,yt as x}from"../modules/shiki-CJZsCeMT.js";import{$ as ne,O as re,W as ie,a as ae,b as S,m as oe,o as se,t as ce,w as le,x as ue}from"../useNav-BmBHxIEh.js";import{t as C}from"../_plugin-vue_export-helper-BDNMzG2s.js";import{T as w,g as T,m as E,v as D}from"../modules/vue-Dnfgf7Ad.js";import{h as de,n as O,o as k}from"../index-DxDNFTAW.js";import{t as fe}from"../useDrawings-vNWRit9P.js";import{t as pe}from"./DrawingControls-CovJrial.js";import{t as A}from"./IconButton-BwA4p7Ax.js";import{n as me,t as j}from"./NoteDisplay-DomX2gaR.js";import{n as M,r as he,t as ge}from"./TimerBar-M2O-qcUf.js";import{i as N,t as _e}from"../SlideWrapper-B_VDtSxZ.js";import"./NoteEditable-EWNsHjuy.js";import{a as ve,c as ye,d as be,f as xe,i as Se,l as Ce,n as we,o as Te,r as Ee,s as De,t as Oe,u as ke}from"./shortcuts-CecQChrI.js";var Ae=s({__name:`NoteStatic`,props:{no:{},class:{},clicksContext:{}},setup(t){let n=t,{info:r}=O(n.no);return(i,a)=>(e(),y(j,{class:f(n.class),note:x(r)?.note,"note-html":x(r)?.noteHTML,"clicks-context":t.clicksContext},null,8,[`class`,`note`,`note-html`,`clicks-context`]))}}),P={"h-full":``,"w-full":``},je={key:0,"w-full":``,"h-full":``,flex:`~ col gap-4 items-center justify-center`},Me=s({__name:`ScreenCaptureMirror`,setup(t){let n=c(`video`),r=g(null),i=g(!1);async function o(){r.value=await navigator.mediaDevices.getDisplayMedia({video:{cursor:`always`},audio:!1,selfBrowserSurface:`include`,preferCurrentTab:!1}),n.value.srcObject=r.value,n.value.play(),i.value=!0,r.value.addEventListener(`inactive`,()=>{n.value.srcObject=null,i.value=!1}),r.value.addEventListener(`ended`,()=>{n.value.srcObject=null,i.value=!1})}return(t,r)=>(e(),d(`div`,P,[_(u(`video`,{ref_key:`video`,ref:n,class:`w-full h-full object-contain`},null,512),[[v,i.value]]),i.value?b(`v-if`,!0):(e(),d(`div`,je,[r[0]||=u(`div`,{op50:``},[a(` Use screen capturing to mirror your main screen back to presenter view.`),u(`br`),a(` Click the button below and `),u(`b`,null,`select your other monitor or window`),a(`. `)],-1),u(`button`,{class:`slidev-form-button`,onClick:o},` Start Screen Mirroring `)]))]))}}),Ne={class:`w-22px cursor-pointer`},Pe={class:`group-not-hover:hidden flex flex-col items-center`},Fe={key:0,class:`i-carbon:pause text-lg`},Ie={key:1,class:`i-carbon:play`},Le={class:`text-3xl px-3 my-auto font-mono`},Re=s({__name:`TimerInlined`,setup(t){let{status:r,percentage:i,mode:a,timer:o,reset:s,toggle:c}=M(),l=h(()=>r.value===`stopped`?`op50`:r.value===`paused`?`text-blue6 dark:text-blue3`:i.value>100?`text-red6 dark:text-red3`:i.value>80?`text-yellow6 dark:text-yellow3`:`text-green6 dark:text-green3`);return(t,i)=>(e(),d(`div`,{class:f([`group flex items-center justify-center pl-4 select-none`,l.value])},[u(`div`,Ne,[u(`div`,{class:f([`group-hover:hidden text-2xl`,x(a)===`countdown`?`i-carbon:timer`:`i-carbon:time`])},null,2),u(`div`,Pe,[u(`div`,{class:`relative op-80 hover:op-100`,onClick:i[0]||=(...e)=>x(c)&&x(c)(...e)},[x(r)===`running`?(e(),d(`div`,Fe)):(e(),d(`div`,Ie))]),u(`div`,{class:`op-80 hover:op-100`,onClick:i[1]||=(...e)=>x(s)&&x(s)(...e)},[...i[2]||=[u(`div`,{class:`i-carbon:renew`},null,-1)]])])]),u(`div`,Le,[x(o).h?(e(),d(ee,{key:0},[u(`span`,null,n(x(o).h),1),i[3]||=u(`span`,{op50:``},`:`,-1)],64)):b(`v-if`,!0),u(`span`,null,n(x(o).m),1),i[4]||=u(`span`,{op50:``},`:`,-1),u(`span`,null,n(x(o).s),1)])],2))}}),ze={class:`bg-main h-full slidev-presenter grid grid-rows-[max-content_1fr] of-hidden`},Be={flex:`~ gap-4 items-center`,border:`b main`,p1:``},Ve={class:`relative grid-section next flex flex-col p-2 lg:p-4`},He={key:2,class:`h-full flex justify-center items-center`},Ue={key:3,class:`h-full grid grid-rows-[1fr_min-content]`},F=C(s({__name:`presenter`,setup(n){let a=w(),s=p(),c=p(),C=p(),O=p();Oe(),xe(s),be();let{clicksContext:j,currentSlideNo:M,currentSlideRoute:P,hasNext:je,nextRoute:Ne,slides:Pe,getPrimaryClicks:Fe}=ce(),{isDrawing:Ie}=fe();de({title:`Presenter - ${ne}`}),p(!1);let Le=h(()=>Pe.value.map(e=>{let t=p(0);return{context:ie(t,e?.meta.slide?.frontmatter.clicksStart??0,e?.meta.clicks),clicks:t}})),F=h(()=>j.value.current<j.value.total?[P.value,j.value.current+1]:je.value?[Ne.value,0]:null),I=h(()=>F.value&&Le.value[F.value[0].no-1]);l(F,()=>{I.value&&F.value&&(I.value.clicks.value=F.value[1])},{immediate:!0});let L=T(`slidev-presenter-main-slide-mode`,`slides`),R=T(`slidev-presenter-notes-width`,360),z=T(`slidev-presenter-notes-row-size`,280),B=p(0),V=p(!1),H=p(!1),U=p(0),W=p(360),We=p(0),G=p(280),K={minNotesWidth:240,maxNotesWidth:720,minNotesRowSize:160,maxNotesWidthRatio:.7,maxNotesRowHeightRatio:.75},Ge=D(`(min-aspect-ratio: 1/1)`),q=D(`(max-aspect-ratio: 3/5)`),J=h(()=>S.value===1&&Ge.value),Y=h(()=>!(S.value===1&&q.value)),X=h(()=>S.value===1&&!q.value||S.value===2||S.value===3),Z=h(()=>S.value===1&&!q.value);function Ke(e){return Number.isFinite(e)?Math.max(K.minNotesWidth,Math.min(K.maxNotesWidth,Math.round(e))):K.minNotesWidth}function qe(e){let t=c.value;if(!t)return;let n=t.getBoundingClientRect(),r=e-U.value,i=Ke(J.value?W.value-r:W.value+r),a=Math.round(n.width*K.maxNotesWidthRatio);R.value=Math.min(i,Math.max(K.minNotesWidth,a))}function Q(e){Y.value&&e.button===0&&(e.preventDefault(),U.value=e.clientX,W.value=R.value,V.value=!0)}function $(e){return Number.isFinite(e)?Math.max(K.minNotesRowSize,Math.round(e)):K.minNotesRowSize}function Je(e){let t=c.value;if(!t)return;let n=t.getBoundingClientRect(),r=e-We.value,i=Z.value?G.value-r:G.value+r,a=Math.round(n.height*K.maxNotesRowHeightRatio);z.value=Math.min($(i),Math.max(K.minNotesRowSize,a))}function Ye(e){if(!X.value||e.button!==0)return;e.preventDefault();let t=S.value===2?s.value?.getBoundingClientRect().height:C.value?.getBoundingClientRect().height;We.value=e.clientY,G.value=$(t??z.value),H.value=!0}function Xe(){let e=O.value;e&&(B.value=Math.round(e.getBoundingClientRect().height))}function Ze(){V.value=!1,H.value=!1}function Qe(){Xe(),$e()}E(window,`pointermove`,e=>{V.value&&qe(e.clientX),H.value&&Je(e.clientY)}),E(window,`pointerup`,Ze),E(window,`pointercancel`,Ze),i(()=>{Qe()}),E(window,`resize`,()=>{Qe()});function $e(){R.value=Ke(R.value),z.value=$(z.value);let e=c.value;if(!e)return;let t=e.getBoundingClientRect(),n=Math.round(t.width*K.maxNotesWidthRatio),r=Math.round(t.height*K.maxNotesRowHeightRatio);R.value=Math.min(R.value,Math.max(K.minNotesWidth,n)),z.value=Math.min(z.value,Math.max(K.minNotesRowSize,r))}let et=g();return i(()=>{let e=Te(),t=w();r(()=>{!e.value||!t.value||Ie.value||!re.value?k.cursor=void 0:k.cursor={...e.value,style:ae.value}})}),(n,r)=>(e(),d(ee,null,[u(`div`,ze,[u(`div`,null,[t(he),t(ge)]),u(`div`,{ref_key:`gridContainer`,ref:c,class:f([`grid-container`,`layout${x(S)}`]),style:o({"--slidev-presenter-notes-width":`${x(R)}px`,"--slidev-presenter-notes-row-size":`${x(z)}px`,"--slidev-presenter-bottom-height":`${B.value}px`})},[b(` Unified vertical resizer for wide layout `),Y.value&&J.value?(e(),d(`div`,{key:0,class:`notes-vertical-resizer`,role:`separator`,"aria-orientation":`vertical`,title:`Resize notes panel`,onPointerdown:Q},null,32)):b(`v-if`,!0),b(` Unified vertical resizer for layout 3 `),Y.value&&x(S)===3?(e(),d(`div`,{key:1,class:`notes-vertical-resizer-left`,role:`separator`,"aria-orientation":`vertical`,title:`Resize notes panel`,onPointerdown:Q},null,32)):b(`v-if`,!0),u(`div`,{ref_key:`main`,ref:s,class:`relative grid-section main flex flex-col`},[u(`div`,Be,[r[3]||=u(`span`,{op50:``,px2:``},`Current`,-1),r[4]||=u(`div`,{"flex-auto":``},null,-1),t(Se,{modelValue:x(L),"onUpdate:modelValue":r[0]||=e=>te(L)?L.value=e:null,options:[{label:`Slides`,value:`slides`},{label:`Screen Mirror`,value:`mirror`}]},null,8,[`modelValue`])]),x(L)===`mirror`?(e(),y(Me,{key:0})):b(`v-if`,!0),b(` We use v-show here to still infer the clicks context `),_(t(N,{key:`main`,class:`p-2 lg:p-4 flex-auto`,"is-main":``,onContextmenu:x(ke)},{default:m(()=>[t(we,{"render-context":`presenter`}),t(ve)]),_:1},8,[`onContextmenu`]),[[v,x(L)===`slides`]]),(e(),y(me,{key:x(P)?.no,"clicks-context":x(Fe)(x(P)),class:`w-full pb2 px4 flex-none`},null,8,[`clicks-context`]))],512),u(`div`,Ve,[X.value&&x(S)===2?(e(),d(`div`,{key:0,class:`notes-row-resizer top-[-6px]`,role:`separator`,"aria-orientation":`horizontal`,title:`Resize notes panel height`,onPointerdown:Ye},null,32)):b(`v-if`,!0),F.value&&I.value?(e(),y(N,{key:`next`},{default:m(()=>[(e(),y(_e,{key:F.value[0].no,"clicks-context":I.value.context,route:F.value[0],"render-context":`previewNext`},null,8,[`clicks-context`,`route`]))]),_:1})):(e(),d(`div`,He,[...r[5]||=[u(`div`,{class:`text-gray-500`},` End of the presentation `,-1)]])),r[6]||=u(`div`,{class:`absolute left-0 top-0 bg-main border-b border-r border-main px2 py1 op50 text-sm`},` Next `,-1)]),u(`div`,{ref_key:`noteSection`,ref:C,class:`relative grid-section note overflow-hidden`},[Y.value&&!J.value&&x(S)!==3?(e(),d(`div`,{key:0,class:`notes-resizer right-[-6px]`,role:`separator`,"aria-orientation":`vertical`,title:`Resize notes panel`,onPointerdown:Q},null,32)):b(`v-if`,!0),X.value&&x(S)!==2?(e(),d(`div`,{key:1,class:f([`notes-row-resizer`,Z.value?`top-[-6px]`:`bottom-[-6px]`]),role:`separator`,"aria-orientation":`horizontal`,title:`Resize notes panel height`,onPointerdown:Ye},null,34)):b(`v-if`,!0),et.value&&x(le)?(e(),y(x(et),{key:2,class:`h-full`})):(e(),d(`div`,Ue,[(e(),y(Ae,{key:`static-${x(M)}`,no:x(M),class:`w-full max-w-full h-full overflow-auto p-2 lg:p-4`,style:o({fontSize:`${x(ue)}em`}),"clicks-context":x(j)},null,8,[`no`,`style`,`clicks-context`])),r[10]||=u(`div`,{"border-t":``,"border-main":``},null,-1),u(`div`,{class:f([`py-1 px-2 text-sm transition`,x(a)?``:`op25`])},[t(A,{title:`Increase font size`,onClick:x(oe)},{default:m(()=>[...r[7]||=[u(`div`,{class:`i-carbon:zoom-in`},null,-1)]]),_:1},8,[`onClick`]),t(A,{title:`Decrease font size`,onClick:x(se)},{default:m(()=>[...r[8]||=[u(`div`,{class:`i-carbon:zoom-out`},null,-1)]]),_:1},8,[`onClick`]),b(`v-if`,!0)],2)]))],512),u(`div`,{ref_key:`bottomSection`,ref:O,class:`grid-section bottom flex`},[t(Ee,{persist:!0,class:f([`transition`,x(a)?``:`op25`])},null,8,[`class`]),r[11]||=u(`div`,{"flex-auto":``},null,-1),t(Re)],512),(e(),y(pe,{key:2}))],6)]),t(ye),t(De),t(Ce)],64))}}),[[`__scopeId`,`data-v-e7a794bf`]]);export{F as default};
|
lecture-07/assets/slidev/shortcuts-CecQChrI.js
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./DrawingLayer-BxwezCRF.js","../modules/shiki-CJZsCeMT.js","../rolldown-runtime-hePW80VL.js","../modules/shiki-BrmBd2_v.css","./context-DB-9afGB.js","../modules/vue-Dnfgf7Ad.js","../useDrawings-vNWRit9P.js","../useNav-BmBHxIEh.js","../_plugin-vue_export-helper-BDNMzG2s.js","../index-DxDNFTAW.js","../syncState-3Tc2ZArb.js","../index-BzbW-jWD.css"])))=>i.map(i=>d[i]);
|
| 2 |
+
import{A as e,B as t,C as n,Ct as r,D as i,H as a,J as o,K as s,M as c,N as l,Q as u,R as d,S as f,St as p,T as m,U as h,Z as g,_,a as v,b as y,bt as b,c as x,d as S,dt as C,et as w,f as T,g as E,h as D,i as ee,l as O,m as k,mt as te,n as ne,o as re,ot as ie,tt as ae,u as oe,v as A,xt as j,y as M,yt as N}from"../modules/shiki-CJZsCeMT.js";import{A as P,C as se,D as F,E as ce,F as I,G as le,I as L,L as ue,M as de,N as fe,O as pe,P as me,Q as he,R as ge,S as _e,T as R,V as ve,Y as ye,Z as be,_ as xe,a as Se,b as Ce,d as we,f as Te,g as Ee,i as De,j as z,n as Oe,nt as ke,p as Ae,q as je,r as Me,s as Ne,t as B,tt as V,u as Pe,w as Fe,y as Ie,z as Le}from"../useNav-BmBHxIEh.js";import{t as Re}from"../_plugin-vue_export-helper-BDNMzG2s.js";import{C as ze,I as Be,P as Ve,T as He,V as Ue,b as We,f as Ge,m as Ke,n as H,o as qe,r as Je,s as Ye,t as U,w as Xe,y as Ze}from"../modules/vue-Dnfgf7Ad.js";import{_ as Qe,l as $e,n as et}from"./context-DB-9afGB.js";import{f as tt,i as nt,m as rt,o as it,p as at,r as ot,t as st}from"../index-DxDNFTAW.js";import{t as ct}from"../useDrawings-vNWRit9P.js";import{t as W}from"./IconButton-BwA4p7Ax.js";import{t as lt}from"./VerticalDivider-Bvc1MZzH.js";import{a as ut,i as dt,n as ft,o as pt,r as mt,t as ht}from"../SlideWrapper-B_VDtSxZ.js";function gt(e){let{next:t,nextSlide:n,prev:r,prevSlide:i}=B(),{isDrawing:a}=ct(),o=C(0),{direction:s,distanceX:c,distanceY:l}=We(e,{pointerTypes:[`touch`],onSwipeStart(){a.value||(o.value=Ve())},onSwipeEnd(){if(!o.value||a.value)return;let e=Math.abs(c.value),u=Math.abs(l.value);e/window.innerWidth>.3||e>75?s.value===`left`?t():r():(u/window.innerHeight>.4||u>200)&&(s.value===`down`?i():n())}})}function _t(){let{request:e,release:t}=Xe();g(ue,n=>{n?e(`screen`):t()},{immediate:!0})}var vt=Object.assign({}),yt=Object.assign({}),bt=Object.assign({}),xt=[Object.values(vt)[0],Object.values(yt)[0],Object.values(bt)[0]].filter(Boolean),St,Ct=()=>{if(St)return St;let{next:e,nextSlide:t,prev:n,prevSlide:r,hasNext:i,hasPrev:a,currentPage:o,total:s,isPresenter:c,enterPresenter:l,exitPresenter:u,isEmbedded:d,isPresenterAvailable:f}=B(),{drawingEnabled:p}=ct(),{isFullscreen:m,toggle:h}=Pe;return St=xt.reduce((e,t)=>t(e),E(()=>[{small:!0,icon:`i-carbon:arrow-left`,label:`Previous Click`,action:n,disabled:!a.value},{small:!0,icon:`i-carbon:arrow-right`,label:`Next Click`,action:e,disabled:!i.value},{small:!0,icon:`i-carbon:arrow-up`,label:`Previous Slide`,action:r,disabled:o.value<=1},{small:!0,icon:`i-carbon:arrow-down`,label:`Next Slide`,action:t,disabled:o.value>=s.value},`separator`,{icon:`i-carbon:text-annotation-toggle`,label:Fe.value?`Hide editor`:`Show editor`,action:()=>Fe.value=!Fe.value,show:!1},{icon:`i-carbon:pen`,label:p.value?`Hide drawing toolbar`:`Show drawing toolbar`,action:()=>p.value=!p.value},{icon:`i-carbon:apps`,label:`Show slide overview`,action:de},c.value&&{icon:`i-carbon:presentation-file`,label:`Exit Presenter Mode`,action:u},f.value&&{icon:`i-carbon:user-speaker`,label:`Enter Presenter Mode`,action:l},!d.value&&{icon:m.value?`i-carbon:minimize`:`i-carbon:maximize`,label:m.value?`Close fullscreen`:`Enter fullscreen`,action:h}].filter(Boolean)))},wt=te(null);function Tt(e,t){wt.value={x:e,y:t,items:Ct()}}function Et(){wt.value=null}function Dt(e){if(V.contextMenu!==!0&&V.contextMenu!=null&&V.contextMenu!==`build`||e.shiftKey||e.defaultPrevented)return;let{isEmbedded:t}=B();t.value||(Tt(e.pageX,e.pageY),e.preventDefault(),e.stopPropagation())}var Ot=[`title`,`onClick`],kt=[`onClick`],At={class:`mx-auto flex`},jt={key:0},Mt={class:`w-full text-xs p2`},Nt={class:`text-main text-opacity-50!`},Pt=m({__name:`ContextMenu`,setup(e){let n=C();qe(n,Et),Ke(document,`mousedown`,e=>{e.buttons&2&&Et()},{passive:!0,capture:!0});let i=E(()=>V.contextMenu!=null),o=He();g(o,e=>{e||Et()}),st(1);let{width:c,height:l}=Ge(n),u=E(()=>{let e=wt.value?.x;return e?e+c.value>ge.width.value?ge.width.value-c.value:e:0}),d=E(()=>{let e=wt.value?.y;return e?e+l.value>ge.height.value?ge.height.value-l.value:e:0});return(e,o)=>N(wt)?(t(),y(`div`,{key:0,ref_key:`container`,ref:n,style:p(`left:${u.value}px;top:${d.value}px`),class:`slidev-glass-effect fixed z-context-menu w-60 flex flex-wrap justify-items-start p-1 animate-fade-in animate-duration-100 rounded-md shadow overflow-hidden select-none`,onContextmenu:o[1]||=T(()=>{},[`prevent`]),onClick:o[2]||=(...e)=>N(Et)&&N(Et)(...e)},[(t(!0),y(k,null,a(N(wt).items.value,(e,n)=>(t(),y(k,{key:n},[e===`separator`?(t(),y(`div`,{key:n,class:`w-full my1 border-t border-main`})):e.show??!0?(t(),y(k,{key:1},[e.small?(t(),y(`div`,{key:0,class:b([`p-2 w-[40px] h-[40px] inline-block text-center cursor-pointer rounded flex`,e.disabled?`op40`:`hover:bg-active`]),title:e.label,onClick:e.action},[typeof e.icon==`string`?(t(),y(`div`,{key:0,class:b([e.icon,`text-1.2em ma`])},null,2)):(t(),A(s(e.icon),{key:1}))],10,Ot)):(t(),y(`div`,{key:1,class:b([`w-full grid grid-cols-[35px_1fr] p-2 pl-0 cursor-pointer rounded`,e.disabled?`op40`:`hover:bg-active`]),onClick:e.action},[_(`div`,At,[typeof e.icon==`string`?(t(),y(`div`,{key:0,class:b([e.icon,`text-1.2em ma`])},null,2)):(t(),A(s(e.icon),{key:1}))]),typeof e.label==`string`?(t(),y(`div`,jt,r(e.label),1)):(t(),A(s(e.label),{key:1}))],10,kt))],64)):M(`v-if`,!0)],64))),128)),i.value?M(`v-if`,!0):(t(),y(k,{key:0},[o[6]||=_(`div`,{class:`w-full my1 border-t border-main`},null,-1),_(`div`,Mt,[_(`div`,Nt,[o[3]||=f(` Hold `,-1),o[4]||=_(`kbd`,{class:`border px1 py0.5 border-main rounded text-primary`},`Shift`,-1),o[5]||=f(` and right click to open the native context menu `,-1),M(`v-if`,!0)])])],64))],36)):M(`v-if`,!0)}});function G(e){return Array.isArray?Array.isArray(e):Ht(e)===`[object Array]`}function Ft(e){if(typeof e==`string`)return e;if(typeof e==`bigint`)return e.toString();let t=e+``;return t==`0`&&1/e==-1/0?`-0`:t}function It(e){return e==null?``:Ft(e)}function K(e){return typeof e==`string`}function Lt(e){return typeof e==`number`}function Rt(e){return e===!0||e===!1||Bt(e)&&Ht(e)==`[object Boolean]`}function zt(e){return typeof e==`object`}function Bt(e){return zt(e)&&e!==null}function q(e){return e!=null}function Vt(e){return!e.trim().length}function Ht(e){return e==null?e===void 0?`[object Undefined]`:`[object Null]`:Object.prototype.toString.call(e)}var Ut=`Incorrect 'index' type`,Wt=`Invalid doc index: must be a non-negative integer within the bounds of the docs array`,Gt=e=>`Invalid value for key ${e}`,Kt=e=>`Pattern length exceeds max of ${e}.`,qt=e=>`Missing ${e} property in key`,Jt=e=>`Property 'weight' in key '${e}' must be a positive integer`,Yt=`Fuse.match does not support useTokenSearch: token search requires corpus-level statistics (df, fieldCount) that a one-off string comparison does not have. Use new Fuse(...).search(...) instead.`,Xt=Object.prototype.hasOwnProperty,Zt=class{constructor(e){this._keys=[],this._keyMap={};let t=0;e.forEach(e=>{let n=Qt(e);this._keys.push(n),this._keyMap[n.id]=n,t+=n.weight}),this._keys.forEach(e=>{e.weight/=t})}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}};function Qt(e){let t=null,n=null,r=null,i=1,a=null;if(K(e)||G(e))r=e,t=$t(e),n=en(e);else{if(!Xt.call(e,`name`))throw Error(qt(`name`));let o=e.name;if(r=o,Xt.call(e,`weight`)&&e.weight!==void 0&&(i=e.weight,i<=0))throw Error(Jt(en(o)));t=$t(o),n=en(o),a=e.getFn??null}return{path:t,id:n,weight:i,src:r,getFn:a}}function $t(e){return G(e)?e:e.split(`.`)}function en(e){return G(e)?e.join(`.`):e}function tn(e,t){let n=[],r=!1,i=(e,t,a,o)=>{if(q(e)){if(!t[a])n.push(o===void 0?e:{v:e,i:o});else{let s=e[t[a]];if(!q(s))return;if(a===t.length-1&&(K(s)||Lt(s)||Rt(s)||typeof s==`bigint`))n.push(o===void 0?It(s):{v:It(s),i:o});else if(G(s)){r=!0;for(let e=0,n=s.length;e<n;e+=1)i(s[e],t,a+1,e)}else t.length&&i(s,t,a+1,o)}}};return i(e,K(t)?t.split(`.`):t,0),r?n:n[0]}var nn={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},rn={isCaseSensitive:!1,ignoreDiacritics:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(e,t)=>e.score===t.score?e.idx<t.idx?-1:1:e.score<t.score?-1:1},an={location:0,threshold:.6,distance:100},on={useExtendedSearch:!1,useTokenSearch:!1,tokenize:void 0,tokenMatch:`any`,getFn:tn,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1},J=Object.freeze({...rn,...nn,...an,...on});function sn(e){return e>=9&&e<=13||e===32||e===160}function cn(e=1,t=3){let n=new Map,r=10**t;return{get(t){let i=0,a=!1;for(let e=0;e<t.length;e++)sn(t.charCodeAt(e))?a=!1:a||=(i++,!0);if(i===0&&(i=1),n.has(i))return n.get(i);let o=Math.round(r/i**(.5*e))/r;return n.set(i,o),o},clear(){n.clear()}}}var ln=class{constructor({getFn:e=J.getFn,fieldNormWeight:t=J.fieldNormWeight}={}){this.norm=cn(t,3),this.getFn=e,this.isCreated=!1,this.docs=[],this.keys=[],this._keysMap={},this.setIndexRecords()}setSources(e=[]){this.docs=e}setIndexRecords(e=[]){this.records=e}setKeys(e=[]){this.keys=e,this._keysMap={},e.forEach((e,t)=>{this._keysMap[e.id]=t})}create(){if(this.isCreated||!this.docs.length)return;this.isCreated=!0;let e=this.docs.length;this.records=Array(e);let t=0;if(K(this.docs[0]))for(let n=0;n<e;n++){let e=this._createStringRecord(this.docs[n],n);e&&(this.records[t++]=e)}else for(let n=0;n<e;n++)this.records[t++]=this._createObjectRecord(this.docs[n],n);this.records.length=t,this.norm.clear()}add(e,t){if(!Number.isInteger(t)||t<0)throw Error(Wt);if(K(e)){let n=this._createStringRecord(e,t);return n&&this.records.push(n),n}let n=this._createObjectRecord(e,t);return this.records.push(n),n}removeAt(e){if(!Number.isInteger(e)||e<0)throw Error(Wt);for(let t=0,n=this.records.length;t<n;t+=1)if(this.records[t].i===e){this.records.splice(t,1);break}for(let t=0,n=this.records.length;t<n;t+=1)this.records[t].i>e&&--this.records[t].i}removeAll(e){let t=new Set;for(let n of e)Number.isInteger(n)&&n>=0&&t.add(n);if(t.size===0)return;this.records=this.records.filter(e=>!t.has(e.i));let n=Array.from(t).sort((e,t)=>e-t);for(let e of this.records){let t=0,r=n.length;for(;t<r;){let i=t+r>>>1;n[i]<e.i?t=i+1:r=i}e.i-=t}}getValueForItemAtKeyId(e,t){return e[this._keysMap[t]]}size(){return this.records.length}_createStringRecord(e,t){return!q(e)||Vt(e)?null:{v:e,i:t,n:this.norm.get(e)}}_createObjectRecord(e,t){let n={i:t,$:{}};for(let t=0,r=this.keys.length;t<r;t++){let r=this.keys[t],i=r.getFn?r.getFn(e):this.getFn(e,r.path);if(q(i)){if(G(i)){let e=[];for(let t=0,n=i.length;t<n;t+=1){let n=i[t];if(q(n)){if(K(n)){if(!Vt(n)){let r={v:n,i:t,n:this.norm.get(n)};e.push(r)}}else if(q(n.v)){let t=K(n.v)?n.v:It(n.v);if(!Vt(t)){let r={v:t,i:n.i,n:this.norm.get(t)};e.push(r)}}}}n.$[t]=e}else if(K(i)&&!Vt(i)){let e={v:i,n:this.norm.get(i)};n.$[t]=e}}}return n}toJSON(){return{keys:this.keys.map(({getFn:e,...t})=>t),records:this.records}}};function un(e,t,{getFn:n=J.getFn,fieldNormWeight:r=J.fieldNormWeight}={}){let i=new ln({getFn:n,fieldNormWeight:r});return i.setKeys(e.map(Qt)),i.setSources(t),i.create(),i}function dn(e,{getFn:t=J.getFn,fieldNormWeight:n=J.fieldNormWeight}={}){let{keys:r,records:i}=e,a=new ln({getFn:t,fieldNormWeight:n});return a.setKeys(r),a.setIndexRecords(i),a}function fn(e=[],t=J.minMatchCharLength){let n=[],r=-1,i=-1,a=0;for(let o=e.length;a<o;a+=1){let o=e[a];o&&r===-1?r=a:!o&&r!==-1&&(i=a-1,i-r+1>=t&&n.push([r,i]),r=-1)}return e[a-1]&&a-r>=t&&n.push([r,a-1]),n}function pn(e,t,n,{location:r=J.location,distance:i=J.distance,threshold:a=J.threshold,findAllMatches:o=J.findAllMatches,minMatchCharLength:s=J.minMatchCharLength,includeMatches:c=J.includeMatches,ignoreLocation:l=J.ignoreLocation}={}){if(t.length>32)throw Error(Kt(32));let u=t.length,d=e.length,f=Math.max(0,Math.min(r,d)),p=a,m=f,h=(e,t)=>{let n=e/u;if(l)return n;let r=Math.abs(f-t);return i?n+r/i:r?1:n},g=s>1||c,_=g?Array(d):[],v;for(;(v=e.indexOf(t,m))>-1;){let e=h(0,v);if(p=Math.min(e,p),m=v+u,g){let e=0;for(;e<u;)_[v+e]=1,e+=1}}m=-1;let y=[],b=1,x=0,S=u+d,C=1<<u-1;for(let t=0;t<u;t+=1){let r=0,i=S;for(;r<i;)h(t,f+i)<=p?r=i:S=i,i=Math.floor((S-r)/2+r);S=i;let a=Math.max(1,f-i+1),s=o?d:Math.min(f+i,d)+u,c=Array(s+2);c[s+1]=(1<<t)-1;for(let r=s;r>=a;--r){let i=r-1,o=n[e[i]];if(c[r]=(c[r+1]<<1|1)&o,t&&(c[r]|=(y[r+1]|y[r])<<1|1|y[r+1]),c[r]&C&&(b=h(t,i),b<=p)){if(p=b,m=i,x=t,m<=f)break;a=Math.max(1,2*f-m)}}if(h(t+1,f)>p)break;y=c}if(g&&m>=0){let t=Math.min(d-1,m+u-1+x);for(let r=m;r<=t;r+=1)n[e[r]]&&(_[r]=1)}let w={isMatch:m>=0,score:Math.max(.001,b)};if(g){let e=fn(_,s);e.length?c&&(w.indices=e):w.isMatch=!1}return w}function mn(e){let t={};for(let n=0,r=e.length;n<r;n+=1){let i=e.charAt(n);t[i]=(t[i]||0)|1<<r-n-1}return t}function hn(e){if(e.length<=1)return e;e.sort((e,t)=>e[0]-t[0]||e[1]-t[1]);let t=[e[0]];for(let n=1,r=e.length;n<r;n+=1){let r=t[t.length-1],i=e[n];i[0]<=r[1]+1?r[1]=Math.max(r[1],i[1]):t.push(i)}return t}var gn={ł:`l`,Ł:`L`,đ:`d`,Đ:`D`,ø:`o`,Ø:`O`,ħ:`h`,Ħ:`H`,ŧ:`t`,Ŧ:`T`,ı:`i`,ß:`ss`},_n=RegExp(`[`+Object.keys(gn).join(``)+`]`,`g`),vn=typeof String.prototype.normalize==`function`?e=>e.normalize(`NFD`).replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g,``).replace(_n,e=>gn[e]):e=>e,yn=class{constructor(e,{location:t=J.location,threshold:n=J.threshold,distance:r=J.distance,includeMatches:i=J.includeMatches,findAllMatches:a=J.findAllMatches,minMatchCharLength:o=J.minMatchCharLength,isCaseSensitive:s=J.isCaseSensitive,ignoreDiacritics:c=J.ignoreDiacritics,ignoreLocation:l=J.ignoreLocation}={}){if(this.options={location:t,threshold:n,distance:r,includeMatches:i,findAllMatches:a,minMatchCharLength:o,isCaseSensitive:s,ignoreDiacritics:c,ignoreLocation:l},e=s?e:e.toLowerCase(),e=c?vn(e):e,this.pattern=e,this.chunks=[],!this.pattern.length)return;let u=(e,t)=>{this.chunks.push({pattern:e,alphabet:mn(e),startIndex:t})},d=this.pattern.length;if(d>32){let e=0,t=d%32,n=d-t;for(;e<n;)u(this.pattern.substr(e,32),e),e+=32;if(t){let e=d-32;u(this.pattern.substr(e),e)}}else u(this.pattern,0)}searchIn(e){let{isCaseSensitive:t,ignoreDiacritics:n,includeMatches:r}=this.options;if(e=t?e:e.toLowerCase(),e=n?vn(e):e,this.pattern===e){if(e.length<this.options.minMatchCharLength)return{isMatch:!1,score:1};let t={isMatch:!0,score:0};return r&&(t.indices=[[0,e.length-1]]),t}let{location:i,distance:a,threshold:o,findAllMatches:s,minMatchCharLength:c,ignoreLocation:l}=this.options,u=[],d=0,f=!1;this.chunks.forEach(({pattern:t,alphabet:n,startIndex:p})=>{let{isMatch:m,score:h,indices:g}=pn(e,t,n,{location:i+p,distance:a,threshold:o,findAllMatches:s,minMatchCharLength:c,includeMatches:r,ignoreLocation:l});m&&(f=!0),d+=h,m&&g&&u.push(...g)});let p={isMatch:f,score:f?d/this.chunks.length:1};return f&&r&&(p.indices=hn(u)),p}},bn=new Set([`fuzzy`,`include`]);function xn(e){return e.startsWith(`inverse`)}var Sn=[{type:`exact`,multiRegex:/^="(.*)"$/,singleRegex:/^=(.*)$/,create:e=>({type:`exact`,search(t){let n=t===e;return{isMatch:n,score:+!n,indices:[0,e.length-1]}}})},{type:`include`,multiRegex:/^'"(.*)"$/,singleRegex:/^'(.*)$/,create:e=>({type:`include`,search(t){let n=0,r,i=[],a=e.length;for(;(r=t.indexOf(e,n))>-1;)n=r+a,i.push([r,n-1]);let o=!!i.length;return{isMatch:o,score:+!o,indices:i}}})},{type:`prefix-exact`,multiRegex:/^\^"(.*)"$/,singleRegex:/^\^(.*)$/,create:e=>({type:`prefix-exact`,search(t){let n=t.startsWith(e);return{isMatch:n,score:+!n,indices:[0,e.length-1]}}})},{type:`inverse-prefix-exact`,multiRegex:/^!\^"(.*)"$/,singleRegex:/^!\^(.*)$/,create:e=>({type:`inverse-prefix-exact`,search(t){let n=!t.startsWith(e);return{isMatch:n,score:+!n,indices:[0,t.length-1]}}})},{type:`inverse-suffix-exact`,multiRegex:/^!"(.*)"\$$/,singleRegex:/^!(.*)\$$/,create:e=>({type:`inverse-suffix-exact`,search(t){let n=!t.endsWith(e);return{isMatch:n,score:+!n,indices:[0,t.length-1]}}})},{type:`suffix-exact`,multiRegex:/^"(.*)"\$$/,singleRegex:/^(.*)\$$/,create:e=>({type:`suffix-exact`,search(t){let n=t.endsWith(e);return{isMatch:n,score:+!n,indices:[t.length-e.length,t.length-1]}}})},{type:`inverse-exact`,multiRegex:/^!"(.*)"$/,singleRegex:/^!(.*)$/,create:e=>({type:`inverse-exact`,search(t){let n=t.indexOf(e)===-1;return{isMatch:n,score:+!n,indices:[0,t.length-1]}}})},{type:`fuzzy`,multiRegex:/^"(.*)"$/,singleRegex:/^(.*)$/,create:(e,t={})=>{let n=new yn(e,{location:t.location??J.location,threshold:t.threshold??J.threshold,distance:t.distance??J.distance,includeMatches:t.includeMatches??J.includeMatches,findAllMatches:t.findAllMatches??J.findAllMatches,minMatchCharLength:t.minMatchCharLength??J.minMatchCharLength,isCaseSensitive:t.isCaseSensitive??J.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics??J.ignoreDiacritics,ignoreLocation:t.ignoreLocation??J.ignoreLocation});return{type:`fuzzy`,search(e){return n.searchIn(e)}}}}],Cn=Sn.length,wn=`\0`,Tn=`|`;function En(e){let t=[],n=e.length,r=0;for(;r<n;){for(;r<n&&e[r]===` `;)r++;if(r>=n)break;let i=r;for(;i<n&&e[i]!==` `&&e[i]!==`"`;)i++;if(i<n&&e[i]===`"`){for(i++;i<n;){if(e[i]===`"`){let t=i+1;if(t>=n||e[t]===` `){i++;break}if(e[t]===`$`&&(t+1>=n||e[t+1]===` `)){i+=2;break}}i++}t.push(e.substring(r,i)),r=i}else{for(;i<n&&e[i]!==` `;)i++;t.push(e.substring(r,i)),r=i}}return t}function Dn(e,t){let n=e.match(t);return n?n[1]:null}function On(e,t={}){return e.replace(/\\\|/g,wn).split(Tn).map(e=>{let n=En(e.replace(/\u0000/g,`|`).trim()).filter(e=>e&&!!e.trim()),r=[];for(let e=0,i=n.length;e<i;e+=1){let i=n[e],a=!1,o=-1;for(;!a&&++o<Cn;){let e=Sn[o],n=Dn(i,e.multiRegex);n&&(r.push(e.create(n,t)),a=!0)}if(!a)for(o=-1;++o<Cn;){let e=Sn[o],n=Dn(i,e.singleRegex);if(n){r.push(e.create(n,t));break}}}return r})}var kn=class{constructor(e,{isCaseSensitive:t=J.isCaseSensitive,ignoreDiacritics:n=J.ignoreDiacritics,includeMatches:r=J.includeMatches,minMatchCharLength:i=J.minMatchCharLength,ignoreLocation:a=J.ignoreLocation,findAllMatches:o=J.findAllMatches,location:s=J.location,threshold:c=J.threshold,distance:l=J.distance}={}){this.query=null,this.options={isCaseSensitive:t,ignoreDiacritics:n,includeMatches:r,minMatchCharLength:i,findAllMatches:o,ignoreLocation:a,location:s,threshold:c,distance:l},e=t?e:e.toLowerCase(),e=n?vn(e):e,this.pattern=e,this.query=On(this.pattern,this.options)}static condition(e,t){return t.useExtendedSearch}searchIn(e){let t=this.query;if(!t)return{isMatch:!1,score:1};let{includeMatches:n,isCaseSensitive:r,ignoreDiacritics:i}=this.options;e=r?e:e.toLowerCase(),e=i?vn(e):e;let a=0,o=[],s=0,c=!1;for(let r=0,i=t.length;r<i;r+=1){let i=t[r];o.length=0,a=0,c=!1;for(let t=0,r=i.length;t<r;t+=1){let r=i[t],{isMatch:l,indices:u,score:d}=r.search(e);if(l)a+=1,s+=d,xn(r.type)&&(c=!0),n&&(bn.has(r.type)?o.push(...u):o.push(u));else{s=0,a=0,o.length=0,c=!1;break}}if(a){let e={isMatch:!0,score:s/a};return c&&(e.hasInverse=!0),n&&(e.indices=hn(o)),e}}return{isMatch:!1,score:1}}},An=[];function jn(...e){An.push(...e)}function Mn(e,t){for(let n=0,r=An.length;n<r;n+=1){let r=An[n];if(r.condition(e,t))return new r(e,t)}return new yn(e,t)}var Nn={AND:`$and`,OR:`$or`},Pn={PATH:`$path`,PATTERN:`$val`},Fn=e=>!!(e[Nn.AND]||e[Nn.OR]),In=e=>!!e[Pn.PATH],Ln=e=>!G(e)&&zt(e)&&!Fn(e),Rn=e=>({[Nn.AND]:Object.keys(e).map(t=>({[t]:e[t]}))});function zn(e,t,{auto:n=!0}={}){let r=e=>{if(K(e)){let r={keyId:null,pattern:e};return n&&(r.searcher=Mn(e,t)),r}let i=Object.keys(e),a=In(e);if(!a&&i.length>1&&!Fn(e))return r(Rn(e));if(Ln(e)){let r=a?e[Pn.PATH]:i[0],o=a?e[Pn.PATTERN]:e[r];if(!K(o))throw Error(Gt(r));let s={keyId:en(r),pattern:o};return n&&(s.searcher=Mn(o,t)),s}let o={children:[],operator:i[0]};return i.forEach(t=>{let n=e[t];G(n)&&n.forEach(e=>{o.children.push(r(e))})}),o};return Fn(e)||(e=Rn(e)),r(e)}function Bn(e,{ignoreFieldNorm:t=J.ignoreFieldNorm}){let n=1;return e.forEach(({key:e,norm:r,score:i})=>{let a=e?e.weight:null;n*=(i===0&&a?2**-52:i)**+((a||1)*(t?1:r))}),n}function Vn(e,{ignoreFieldNorm:t=J.ignoreFieldNorm}){e.forEach(e=>{e.score=Bn(e.matches,{ignoreFieldNorm:t})})}var Hn=class{constructor(e,t){this.limit=e,this.heap=[],this.comparator=t}get size(){return this.heap.length}insert(e){this.size<this.limit?(this.heap.push(e),this._bubbleUp(this.size-1)):this.comparator(e,this.heap[0])<0&&(this.heap[0]=e,this._sinkDown(0))}extractSorted(){return this.heap.sort(this.comparator)}_bubbleUp(e){let t=this.heap;for(;e>0;){let n=e-1>>1;if(this.comparator(t[e],t[n])<=0)break;let r=t[e];t[e]=t[n],t[n]=r,e=n}}_sinkDown(e){let t=this.heap,n=t.length,r=e;do{e=r;let i=2*e+1,a=2*e+2;if(i<n&&this.comparator(t[i],t[r])>0&&(r=i),a<n&&this.comparator(t[a],t[r])>0&&(r=a),r!==e){let n=t[e];t[e]=t[r],t[r]=n}}while(r!==e)}};function Un(e){let t=[];return e.matches.forEach(e=>{if(!q(e.indices)||!e.indices.length)return;let n={indices:e.indices,value:e.value};e.key&&(n.key=e.key.id),e.idx>-1&&(n.refIndex=e.idx),t.push(n)}),t}function Wn(e,t,{includeMatches:n=J.includeMatches,includeScore:r=J.includeScore}={}){return e.map(e=>{let{idx:i}=e,a={item:t[i],refIndex:i};return n&&(a.matches=Un(e)),r&&(a.score=e.score),a})}var Gn=/[\p{L}\p{M}\p{N}_]+/gu,Kn=new WeakSet;function qn(e){Kn.has(e)||(Kn.add(e),console.warn(`[Fuse] tokenize regex ${e} lacks the global flag; only the first match per text will be returned. Add the 'g' flag.`))}function Jn(e){if(typeof e==`function`){let t=!1;return n=>{let r=e(n);if(!t&&(t=!0,!Array.isArray(r)||r.some(e=>typeof e!=`string`)))throw Error(`[Fuse] tokenize function must return string[]; received ${Array.isArray(r)?`array containing non-strings`:typeof r}.`);return r}}return e instanceof RegExp?(e.global||qn(e),t=>t.match(e)||[]):e=>e.match(Gn)||[]}function Yn({isCaseSensitive:e=!1,ignoreDiacritics:t=!1,tokenize:n}={}){let r=Jn(n);return{tokenize(n){return e||(n=n.toLowerCase()),t&&(n=vn(n)),r(n)}}}var Xn=class{static condition(e,t){return t.useTokenSearch}constructor(e,t){this.options=t,this.analyzer=Yn({isCaseSensitive:t.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics,tokenize:t.tokenize});let n=this.analyzer.tokenize(e),{df:r,fieldCount:i}=t._invertedIndex;this.termSearchers=[],this.idfWeights=[];for(let e of n){this.termSearchers.push(new yn(e,{location:t.location,threshold:t.threshold,distance:t.distance,includeMatches:t.includeMatches,findAllMatches:t.findAllMatches,minMatchCharLength:t.minMatchCharLength,isCaseSensitive:t.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics,ignoreLocation:!0}));let n=r.get(e)||0,a=Math.log(1+(i-n+.5)/(n+.5));this.idfWeights.push(a)}this.combineAll=t.tokenMatch===`all`,this.numTerms=this.termSearchers.length,this.useMask=this.numTerms<=31}searchIn(e){if(!this.termSearchers.length)return{isMatch:!1,score:1};let t=[],n=0,r=0,i=0,a=0,o=this.combineAll&&!this.useMask?new Set:null;for(let s=0;s<this.termSearchers.length;s++){let c=this.termSearchers[s].searchIn(e),l=this.idfWeights[s];r+=l,c.isMatch&&(i++,n+=l*(1-c.score),c.indices&&t.push(...c.indices),this.combineAll&&(this.useMask?a|=1<<s:o.add(s)))}if(i===0)return{isMatch:!1,score:1};let s=r>0?1-n/r:0,c={isMatch:!0,score:Math.max(.001,s)};return this.options.includeMatches&&t.length&&(c.indices=hn(t)),this.combineAll&&(this.useMask?c.matchedMask=a:c.matchedTerms=o,c.termCount=this.numTerms),c}};function Zn(e,t,n,r){let i=r.tokenize(t);if(!i.length)return;e.fieldCount++,e.docFieldCount.set(n,(e.docFieldCount.get(n)||0)+1);let a=new Set(i),o=e.docTermFieldHits.get(n);o||(o=new Map,e.docTermFieldHits.set(n,o));for(let t of a)o.set(t,(o.get(t)||0)+1),e.df.set(t,(e.df.get(t)||0)+1)}function Qn(e,t,n,r){let{i,v:a,$:o}=t;if(a!==void 0){Zn(e,a,i,r);return}if(o)for(let t=0;t<n;t++){let n=o[t];if(n){if(Array.isArray(n))for(let t of n)Zn(e,t.v,i,r);else Zn(e,n.v,i,r)}}}function $n(e,t,n){let r={fieldCount:0,df:new Map,docFieldCount:new Map,docTermFieldHits:new Map};for(let i of e)Qn(r,i,t,n);return r}function er(e,t,n,r){Qn(e,t,n,r)}function tr(e,t){let n=e.docFieldCount.get(t);if(n===void 0)return;e.fieldCount-=n,e.docFieldCount.delete(t);let r=e.docTermFieldHits.get(t);if(r){for(let[t,n]of r){let r=(e.df.get(t)||0)-n;r<=0?e.df.delete(t):e.df.set(t,r)}e.docTermFieldHits.delete(t)}}function nr(e,t){if(t.length===0)return;let n=Array.from(new Set(t)).sort((e,t)=>e-t);for(let t of n)tr(e,t);let r=e=>{let t=0,r=n.length;for(;t<r;){let i=t+r>>>1;n[i]<e?t=i+1:r=i}return e-t},i=n[0],a=new Map;for(let[t,n]of e.docFieldCount)a.set(t>i?r(t):t,n);e.docFieldCount=a;let o=new Map;for(let[t,n]of e.docTermFieldHits)o.set(t>i?r(t):t,n);e.docTermFieldHits=o}var Y=class{constructor(e,t,n){this.options={...J,...t},this.options.useExtendedSearch,this.options.useTokenSearch,this._keyStore=new Zt(this.options.keys),this._docs=e,this._myIndex=null,this._invertedIndex=null,this.setCollection(e,n),this._lastQuery=null,this._lastSearcher=null}_getSearcher(e){if(this._lastQuery===e)return this._lastSearcher;let t=Mn(e,this._invertedIndex?{...this.options,_invertedIndex:this._invertedIndex}:this.options);return this._lastQuery=e,this._lastSearcher=t,t}setCollection(e,t){if(this._docs=e,t&&!(t instanceof ln))throw Error(Ut);if(this._myIndex=t||un(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight}),this.options.useTokenSearch){let e=Yn({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics,tokenize:this.options.tokenize});this._invertedIndex=$n(this._myIndex.records,this._myIndex.keys.length,e)}this._invalidateSearcherCache()}add(e){if(!q(e))return;this._docs.push(e);let t=this._myIndex.add(e,this._docs.length-1);if(this._invertedIndex&&t){let e=Yn({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics,tokenize:this.options.tokenize});er(this._invertedIndex,t,this._myIndex.keys.length,e)}this._invalidateSearcherCache()}remove(e=()=>!1){let t=[],n=[];for(let r=0,i=this._docs.length;r<i;r+=1)e(this._docs[r],r)&&(t.push(this._docs[r]),n.push(r));if(n.length){this._invertedIndex&&nr(this._invertedIndex,n);let e=new Set(n);this._docs=this._docs.filter((t,n)=>!e.has(n)),this._myIndex.removeAll(n),this._invalidateSearcherCache()}return t}removeAt(e){if(!Number.isInteger(e)||e<0||e>=this._docs.length)throw Error(Wt);this._invertedIndex&&nr(this._invertedIndex,[e]);let t=this._docs.splice(e,1)[0];return this._myIndex.removeAt(e),this._invalidateSearcherCache(),t}_invalidateSearcherCache(){this._lastQuery=null,this._lastSearcher=null}getIndex(){return this._myIndex}_normalizedKeys(){return this._myIndex.keys.map(e=>this._keyStore.get(e.id)||e)}search(e,t){let{limit:n=-1}=t||{},{includeMatches:r,includeScore:i,shouldSort:a,sortFn:o,ignoreFieldNorm:s}=this.options;if(K(e)&&!e.trim()){let e=this._docs.map((e,t)=>({item:e,refIndex:t}));return Lt(n)&&n>-1&&(e=e.slice(0,n)),e}let c=a&&Lt(n)&&n>0&&K(e),l=o,u=(e,t)=>l(e,t)||e.idx-t.idx,d;if(c){let t=new Hn(n,u);K(this._docs[0])?this._searchStringList(e,{heap:t,ignoreFieldNorm:s}):this._searchObjectList(e,{heap:t,ignoreFieldNorm:s}),d=t.extractSorted()}else d=K(e)?K(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e),Vn(d,{ignoreFieldNorm:s}),a&&d.sort(K(e)?u:l),Lt(n)&&n>-1&&(d=d.slice(0,n));return Wn(d,this._docs,{includeMatches:r,includeScore:i})}_searchStringList(e,{heap:t,ignoreFieldNorm:n}={}){let r=this._getSearcher(e),i=this.options.useTokenSearch&&this.options.tokenMatch===`all`,{records:a}=this._myIndex,o=t?null:[];return a.forEach(({v:e,i:a,n:s})=>{if(!q(e))return;let c=r.searchIn(e);if(c.isMatch){let r={score:c.score,value:e,norm:s,indices:c.indices};i&&(r.matchedMask=c.matchedMask,r.matchedTerms=c.matchedTerms,r.termCount=c.termCount);let l=[r];if(!i||this._coversAllTokens(l)){let r={item:e,idx:a,matches:l};t?(r.score=Bn(r.matches,{ignoreFieldNorm:n}),t.insert(r)):o.push(r)}}}),o}_searchLogical(e){let t=zn(e,this.options),n=this._normalizedKeys(),r=(e,t,i)=>{if(!(`children`in e)){let{keyId:r,searcher:a}=e,o;return r===null?(o=[],n.forEach((e,n)=>{o.push(...this._findMatches({key:e,value:t[n],searcher:a}))})):o=this._findMatches({key:this._keyStore.get(r),value:this._myIndex.getValueForItemAtKeyId(t,r),searcher:a}),o&&o.length?[{idx:i,item:t,matches:o}]:[]}let{children:a,operator:o}=e,s=[];for(let e=0,n=a.length;e<n;e+=1){let n=a[e],c=r(n,t,i);if(c.length)s.push(...c);else if(o===Nn.AND)return[]}return s},i=this._myIndex.records,a=new Map,o=[];return i.forEach(({$:e,i:n})=>{if(q(e)){let i=r(t,e,n);i.length&&(a.has(n)||(a.set(n,{idx:n,item:e,matches:[]}),o.push(a.get(n))),i.forEach(({matches:e})=>{a.get(n).matches.push(...e)}))}}),o}_searchObjectList(e,{heap:t,ignoreFieldNorm:n}={}){let r=this._getSearcher(e),i=this.options.useTokenSearch&&this.options.tokenMatch===`all`,{records:a}=this._myIndex,o=this._normalizedKeys(),s=t?null:[];return a.forEach(({$:e,i:a})=>{if(!q(e))return;let c=[],l=!1,u=!1;if(o.forEach((t,n)=>{let i=this._findMatches({key:t,value:e[n],searcher:r});i.length?(c.push(...i),i[0].hasInverse&&(u=!0)):l=!0}),!(u&&l)&&c.length&&(!i||this._coversAllTokens(c))){let r={idx:a,item:e,matches:c};t?(r.score=Bn(r.matches,{ignoreFieldNorm:n}),t.insert(r)):s.push(r)}}),s}_findMatches({key:e,value:t,searcher:n}){if(!q(t))return[];let r=[];if(G(t))t.forEach(({v:t,i,n:a})=>{if(!q(t))return;let o=n.searchIn(t);if(o.isMatch){let n={score:o.score,key:e,value:t,idx:i,norm:a,indices:o.indices,hasInverse:o.hasInverse};o.termCount!==void 0&&(n.matchedMask=o.matchedMask,n.matchedTerms=o.matchedTerms,n.termCount=o.termCount),r.push(n)}});else{let{v:i,n:a}=t,o=n.searchIn(i);if(o.isMatch){let t={score:o.score,key:e,value:i,norm:a,indices:o.indices,hasInverse:o.hasInverse};o.termCount!==void 0&&(t.matchedMask=o.matchedMask,t.matchedTerms=o.matchedTerms,t.termCount=o.termCount),r.push(t)}}return r}_coversAllTokens(e){let t=e.length?e[0].termCount:void 0;if(t===void 0)return!0;if(t<=31){let n=0;for(let t=0;t<e.length;t++)n|=e[t].matchedMask||0;return n===2**t-1}let n=new Set;for(let t=0;t<e.length;t++){let r=e[t].matchedTerms;if(r)for(let e of r)n.add(e)}return n.size===t}};Y.version=`7.5.0`,Y.createIndex=un,Y.parseIndex=dn,Y.config=J,Y.match=function(e,t,n){if(n&&n.useTokenSearch)throw Error(Yt);return Mn(e,{...J,...n}).searchIn(t)},Y.parseQuery=zn,jn(kn),jn(Xn),Y.use=function(...e){e.forEach(e=>jn(e))};var rr=Y,ir={key:0},ar={key:1},or={key:2},sr={key:3},cr={key:4},lr={key:5},ur={key:6},dr={key:7},fr={key:8},pr={key:9},mr={key:10},hr={key:11},gr={key:12},_r={key:13},vr={key:14},yr={key:15},br={key:16},xr={key:17},Sr={key:18},Cr={key:19},wr={key:20},Tr={key:21},Er={key:22},Dr={key:23},Or={key:24},kr={key:25},Ar={key:26},jr={key:27},Mr={key:28},Nr={key:29},Pr={key:30},Fr={key:31},Ir={key:32},Lr={key:33},Rr={key:34},zr={key:35},Br={key:36},Vr={key:37},Hr={key:38},Ur={key:39},Wr={key:40},Gr={key:41},Kr={key:42},qr={key:43},Jr={key:44},Yr={key:45},Xr={key:46},Zr={key:47},Qr={key:48},$r={key:49},ei={key:50},ti={key:51},ni={key:52},ri={key:53},ii={key:54},ai={key:55},oi={key:56},si={key:57},ci={key:58},li={key:59},ui={key:60},di={key:61},fi={key:62},pi={key:63},mi={key:64},hi={key:65},gi={key:66},_i={key:67},vi={key:68},yi={key:69},bi={key:70},xi={key:71},Si={key:72},Ci={key:73},wi={key:74},Ti={key:75},Ei={key:76},Di={key:77},Oi={key:78},ki=m({__name:`title-renderer`,props:{no:{}},setup(e){let n=e,{$page:r}=et(),i=E(()=>+(n.no??r.value));return(e,n)=>(t(),y(`div`,null,[i.value===1?(t(),y(`p`,ir,`Generative Models and GANs`)):i.value===2?(t(),y(`p`,ar,`Where we are`)):i.value===3?(t(),y(`p`,or,`From recognising to creating`)):i.value===4?(t(),y(`p`,sr,`What a CNN already does`)):i.value===5?(t(),y(`p`,cr,`Now make a real picture`)):i.value===6?(t(),y(`p`,lr,`Two kinds of model`)):i.value===7?(t(),y(`p`,ur,`The deal every model today makes`)):i.value===8?(t(),y(`p`,dr,`Which loss can you even compute?`)):i.value===9?(t(),y(`p`,fr,`undefined`)):i.value===10?(t(),y(`p`,pr,`Compress first: autoencoders`)):i.value===11?(t(),y(`p`,mr,`The autoencoder`)):i.value===12?(t(),y(`p`,hr,`How wide is the middle?`)):i.value===13?(t(),y(`p`,gr,`The bottleneck, and what it costs`)):i.value===14?(t(),y(`p`,_r,`What autoencoders are actually for`)):i.value===15?(t(),y(`p`,vr,`Now sample from it`)):i.value===16?(t(),y(`p`,yr,`An autoencoder in PyTorch`)):i.value===17?(t(),y(`p`,br,`undefined`)):i.value===18?(t(),y(`p`,xr,`Make the code behave: VAEs`)):i.value===19?(t(),y(`p`,Sr,`Two changes, and only two`)):i.value===20?(t(),y(`p`,Cr,`The objective, in two terms`)):i.value===21?(t(),y(`p`,wr,`Reading the equation: the VAE loss`)):i.value===22?(t(),y(`p`,Tr,`You cannot backpropagate through a sample`)):i.value===23?(t(),y(`p`,Er,`What β buys, and what it costs`)):i.value===24?(t(),y(`p`,Dr,`Why VAE samples are soft`)):i.value===25?(t(),y(`p`,Or,`A VAE in PyTorch`)):i.value===26?(t(),y(`p`,kr,`The adversarial game`)):i.value===27?(t(),y(`p`,Ar,`Stop specifying the loss`)):i.value===28?(t(),y(`p`,jr,`Two networks, opposite jobs`)):i.value===29?(t(),y(`p`,Mr,`The value function`)):i.value===30?(t(),y(`p`,Nr,`Reading the equation: the value function`)):i.value===31?(t(),y(`p`,Pr,`Freeze one, look at the other`)):i.value===32?(t(),y(`p`,Fr,`The best discriminator that could exist`)):i.value===33?(t(),y(`p`,Ir,`Reading the equation: the best discriminator`)):i.value===34?(t(),y(`p`,Lr,`D*, on three modes`)):i.value===35?(t(),y(`p`,Rr,`Put D* back in`)):i.value===36?(t(),y(`p`,zr,`Reading the equation: V at the best discriminator`)):i.value===37?(t(),y(`p`,Br,`The theorem, as a number`)):i.value===38?(t(),y(`p`,Vr,`The four steps`)):i.value===39?(t(),y(`p`,Hr,`The trick that makes it train`)):i.value===40?(t(),y(`p`,Ur,`The training loop`)):i.value===41?(t(),y(`p`,Wr,`undefined`)):i.value===42?(t(),y(`p`,Gr,`Watch it happen`)):i.value===43?(t(),y(`p`,Kr,`Why GANs are hard`)):i.value===44?(t(),y(`p`,qr,`DCGAN — a CNN, run backwards`)):i.value===45?(t(),y(`p`,Jr,`Transposed convolution`)):i.value===46?(t(),y(`p`,Yr,`The checkerboard, and what to do instead`)):i.value===47?(t(),y(`p`,Xr,`One more piece from week 4`)):i.value===48?(t(),y(`p`,Zr,`The failure that defines GANs`)):i.value===49?(t(),y(`p`,Qr,`Four ways to say two distributions differ`)):i.value===50?(t(),y(`p`,$r,`The measure decides what "worse" means`)):i.value===51?(t(),y(`p`,ei,`Wasserstein, and what came after`)):i.value===52?(t(),y(`p`,ti,`The zoo, and the six that mattered`)):i.value===53?(t(),y(`p`,ni,`What this is actually used for`)):i.value===54?(t(),y(`p`,ri,`undefined`)):i.value===55?(t(),y(`p`,ii,`What replaced them: diffusion`)):i.value===56?(t(),y(`p`,ai,`Destroying an image is easy`)):i.value===57?(t(),y(`p`,oi,`The forward process, in one step`)):i.value===58?(t(),y(`p`,si,`Reading the equation: one-step noising`)):i.value===59?(t(),y(`p`,ci,`Forward — no network involved`)):i.value===60?(t(),y(`p`,li,`What the network is asked to do`)):i.value===61?(t(),y(`p`,ui,`Reading the equation: the denoising loss`)):i.value===62?(t(),y(`p`,di,`Reverse — what the sampler follows`)):i.value===63?(t(),y(`p`,fi,`Three lines, and no adversary`)):i.value===64?(t(),y(`p`,pi,`The cost is at the other end`)):i.value===65?(t(),y(`p`,mi,`How the prompt gets in`)):i.value===66?(t(),y(`p`,hi,`Pushing past the prompt`)):i.value===67?(t(),y(`p`,gi,`Reading the equation: guidance`)):i.value===68?(t(),y(`p`,_i,`The guidance slider`)):i.value===69?(t(),y(`p`,vi,`Do it somewhere cheaper`)):i.value===70?(t(),y(`p`,yi,`What the denoiser is made of`)):i.value===71?(t(),y(`p`,bi,`What actually gets trained in 2026`)):i.value===72?(t(),y(`p`,xi,`undefined`)):i.value===73?(t(),y(`p`,Si,`Choosing one`)):i.value===74?(t(),y(`p`,Ci,`Five families, side by side`)):i.value===75?(t(),y(`p`,wi,`How do you know it is any good?`)):i.value===76?(t(),y(`p`,Ti,`Where that leaves us`)):i.value===77?(t(),y(`p`,Ei,`What comes with the capability`)):i.value===78?(t(),y(`p`,Di,`Reading, and the lab`)):i.value===79?(t(),y(`p`,Oi,`To be continued…`)):M(`v-if`,!0)]))}}),Ai={class:`bg-main transform`,shadow:`~`,p:`x-4 y-2`,border:`~ transparent rounded dark:main`},ji=[`value`,`disabled`],Mi={table:``,"w-full":``,"border-collapse":``},Ni=[`border`,`onClick`],Pi={"text-right":``,op50:``,"text-sm":``,"table-cell":``,"py-2":``,"pl-4":``,"pr-3":``,"vertical-middle":``},Fi=Re(m({__name:`Goto`,setup(e){let i=C(),o=C(),s=C(),c=C(),l=C(``),u=C(0),{go:d,slides:f}=B();function p(e){return e!=null}let m=E(()=>new rr(f.value.map(e=>e.meta?.slide).filter(p),{keys:[`no`,`title`],threshold:.3,shouldSort:!0,minMatchCharLength:1})),h=E(()=>l.value.startsWith(`/`)?l.value.substring(1):l.value),v=E(()=>h.value?m.value.search(h.value).map(e=>e.item):[]),x=E(()=>!!v.value.length);function w(){if(x.value){let e=v.value.at(u.value||0);e&&d(e.no)}D()}function D(){l.value=``,R.value=!1}function ee(e){e.preventDefault(),u.value++,u.value>=v.value.length&&(u.value=0),te()}function O(e){e.preventDefault(),u.value--,u.value<=-2&&(u.value=v.value.length-1),te()}function te(){let e=c.value?.[u.value];e&&s.value&&(e.offsetTop+e.offsetHeight>s.value.offsetHeight+s.value.scrollTop?s.value.scrollTo({behavior:`smooth`,top:e.offsetTop+e.offsetHeight-s.value.offsetHeight+1}):e.offsetTop<s.value.scrollTop&&s.value.scrollTo({behavior:`smooth`,top:e.offsetTop}))}function ne(e){u.value=0,l.value=e.target.value}function re(e){d(e),D()}return g(R,async e=>{e?(l.value=``,u.value=0,setTimeout(()=>o.value?.focus(),0)):o.value?.blur()}),g(Me,()=>{i.value?.contains(Me.value)||D()}),(e,d)=>(t(),y(`div`,{id:`slidev-goto-dialog`,ref_key:`container`,ref:i,class:b([`fixed right-5 transition-all`,N(R)?`top-5`:`-top-20 op0 pointer-events-none`]),"w-90":``,"max-w-90":``,"min-w-90":``},[_(`div`,Ai,[_(`input`,{id:`slidev-goto-input`,ref_key:`input`,ref:o,value:l.value,type:`text`,disabled:!N(R),class:b([`outline-none bg-transparent`,{"text-red-400":!x.value&&l.value}]),placeholder:`Goto...`,onKeydown:[S(w,[`enter`]),S(D,[`escape`]),S(ee,[`down`]),S(O,[`up`])],onInput:ne},null,42,ji)]),N(R)&&v.value.length>0?(t(),y(`div`,{key:0,ref_key:`list`,ref:s,class:`autocomplete-list`,shadow:`~`,border:`~ transparent rounded dark:main`},[_(`ul`,Mi,[(t(!0),y(k,null,a(v.value,(e,i)=>(t(),y(`li`,{ref_for:!0,ref_key:`items`,ref:c,key:e.id,role:`button`,tabindex:`0`,"cursor-pointer":``,hover:`op100`,"table-row":``,"items-center":``,border:i===0?void 0:`t main`,class:b(u.value===i?`bg-active op100`:`op80`),onClick:T(t=>re(e.no),[`stop`,`prevent`])},[_(`div`,Pi,r(e.no),1),n(N(ki),{"table-cell":``,"py-2":``,"pr-4":``,"w-full":``,no:e.no},null,8,[`no`])],10,Ni))),128))])],512)):M(`v-if`,!0)],2))}}),[[`__scopeId`,`data-v-61e41ebd`]]),Ii=C(1),Li=E(()=>ve.value.length),X=C(0),Ri=C(0);function zi(){X.value>Ii.value&&--X.value}function Bi(){X.value<Li.value&&(X.value+=1)}function Vi(){if(X.value>Ii.value){let e=X.value-Ri.value;e<Ii.value&&(e=Ii.value),X.value=e}}function Hi(){if(X.value<Li.value){let e=X.value+Ri.value;e>Li.value&&(e=Li.value),X.value=e}}var Ui=[`onClick`],Wi={class:`text-green font-bold`},Gi={class:`opacity-50`},Ki={key:1,class:`opacity-50`},qi={class:`fixed top-4 right-4 z-modal text-gray-400 flex flex-col items-center gap-2`},Ji=128,Yi=32,Xi=m({__name:`QuickOverview`,setup(e){let{currentSlideNo:i,go:o,slides:s}=B();function c(){F.value=!1}function l(e){o(e),c()}function d(e){return e===X.value}let f=De.smaller(`xs`),m=De.smaller(`sm`),h=E(()=>f.value?ge.width.value-Ji:m.value?(ge.width.value-Ji-Yi)/2:300),g=E(()=>Math.floor((ge.width.value-Ji)/(h.value+Yi))),x=C(``);return Ke(`keypress`,e=>{if(!F.value){x.value=``;return}if(e.key===`Enter`){e.preventDefault(),x.value?(l(+x.value),x.value=``):l(X.value);return}let t=Number.parseInt(e.key.replace(/\D/g,``));if(Number.isNaN(t)){x.value=``;return}if(!x.value&&t===0)return;if(x.value+=String(t),+x.value>s.value.length){x.value=``;return}let n=s.value.findIndex(e=>`/${e.no}`===x.value);n!==-1&&(X.value=n+1),x.value*10>s.value.length&&(l(+x.value),x.value=``)}),u(()=>{X.value=i.value,Ri.value=g.value}),(e,i)=>(t(),y(k,null,[n(v,{"enter-active-class":`duration-150 ease-out`,"enter-from-class":`opacity-0 scale-102 !backdrop-blur-0px`,"leave-active-class":`duration-200 ease-in`,"leave-to-class":`opacity-0 scale-102 !backdrop-blur-0px`},{default:w(()=>[N(F)?(t(),y(`div`,{key:0,class:`fixed left-0 right-0 top-0 h-[calc(var(--vh,1vh)*100)] z-modal bg-main !bg-opacity-75 p-16 py-20 overflow-y-auto backdrop-blur-5px select-none`,onClick:c},[_(`div`,{class:`grid gap-y-4 gap-x-8 w-full`,style:p(`grid-template-columns: repeat(auto-fit,minmax(${h.value}px,1fr))`)},[(t(!0),y(k,null,a(N(s),(e,i)=>(t(),y(`div`,{key:e.no,class:`relative`},[_(`div`,{class:b([`inline-block border rounded overflow-hidden bg-main hover:border-primary transition`,d(i+1)||N(X)===i+1?`border-primary`:`border-main`]),onClick:t=>l(e.no)},[(t(),A(dt,{key:e.no,no:e.no,"use-snapshot":!0,width:h.value,class:`pointer-events-none`},{default:w(()=>[n(ht,{"clicks-context":N(le)(e,N($e)),route:e,"render-context":`overview`},null,8,[`clicks-context`,`route`]),n(pt,{page:e.no},null,8,[`page`])]),_:2},1032,[`no`,`width`]))],10,Ui),_(`div`,{class:`absolute top-0`,style:p(`left: ${h.value+5}px`)},[x.value&&String(i+1).startsWith(x.value)?(t(),y(k,{key:0},[_(`span`,Wi,r(x.value),1),_(`span`,Gi,r(String(i+1).slice(x.value.length)),1)],64)):(t(),y(`span`,Ki,r(i+1),1))],4)]))),128))],4)])):M(`v-if`,!0)]),_:1}),ae(_(`div`,qi,[n(W,{title:`Close`,class:`text-2xl`,onClick:c},{default:w(()=>[...i[0]||=[_(`div`,{class:`i-carbon:close`},null,-1)]]),_:1}),(t(),A(W,{key:0,as:`a`,title:`Slides Overview`,target:`_blank`,href:`${N(ye)}overview`,"tab-index":`-1`,class:`text-2xl`},{default:w(()=>[...i[1]||=[_(`div`,{class:`i-carbon:list-boxes`},null,-1)]]),_:1},8,[`href`])),M(`v-if`,!0)],512),[[oe,N(F)]])],64))}});function Zi(){let e=Ze();return E(()=>{let t=ut.value?.getBoundingClientRect();if(!t)return;let n=(e.x.value-t.left)/t.width*100,r=(e.y.value-t.top)/t.height*100;if(!(n<0||n>100||r<0||r>100))return{x:n,y:r}})}var Qi={key:0,class:`absolute top-0 left-0 right-0 bottom-0 pointer-events-none text-xl`},$i=Re(m({__name:`LaserPointer`,setup(e){let n=Zi(),{isPresenter:r}=B(),i=E(()=>!r.value&&it.cursor?.style===`laser`?it.cursor:Se.value===`laser`?n.value:null);return d(()=>{u(()=>{document.body.classList.toggle(`slidev-self-laser-active`,Se.value===`laser`&&!!i.value)})}),(e,n)=>i.value?(t(),y(`div`,Qi,[_(`div`,{class:`laser-pointer`,style:p({left:`${i.value.x}%`,top:`${i.value.y}%`})},null,4)])):M(`v-if`,!0)}}),[[`__scopeId`,`data-v-1d1438ab`]]),ea={render:()=>[]},ta={key:0,class:`bg-main text-main shadow-xl absolute bottom-10 left-0 z-menu py2`,border:`~ main rounded-md`},na=m({__name:`MenuButton`,props:{modelValue:{default:!1},disabled:{default:!1}},setup(e,{emit:n}){let r=ze(e,`modelValue`,n,{passive:!0}),i=C();return qe(i,()=>{r.value=!1}),(n,a)=>(t(),y(`div`,{ref_key:`el`,ref:i,class:`flex relative`},[_(`button`,{class:b({disabled:e.disabled}),onClick:a[0]||=e=>r.value=!N(r)},[h(n.$slots,`button`,{value:N(r),class:b({disabled:e.disabled})})],2),(t(),A(D,null,[N(r)?(t(),y(`div`,ta,[h(n.$slots,`menu`)])):M(`v-if`,!0)],1024))],512))}}),ra={border:`~ main rounded`,flex:`~ gap-2 items-center`,relative:``,"h-5":``,"w-5":``,"p0.5":``,"hover:bg-active":``,p1:``},ia=[`disabled`],aa=m({__name:`FormCheckbox`,props:c({disabled:{type:Boolean}},{modelValue:{type:Boolean,type:Boolean},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let n=o(e,`modelValue`);return(r,i)=>(t(),y(`div`,ra,[_(`div`,{"i-ri-check-line":``,class:b(n.value?``:`op0`)},null,2),ae(_(`input`,{"onUpdate:modelValue":i[0]||=e=>n.value=e,type:`checkbox`,absolute:``,"inset-0":``,"opacity-10":``,disabled:e.disabled},null,8,ia),[[x,n.value]])]))}}),oa={"w-30":``,"h-8":``,flex:`~ gap-1 items-center`},sa={key:0,"w-1.5":``,"h-1.5":``,"bg-primary":``,rounded:``,absolute:``,"top-0":``,"right--2":``},ca={key:0,"w-1.5":``,"h-1.5":``,"bg-primary":``,rounded:``,absolute:``,"top-0":``,"right--2":``},la=[`innerHTML`],Z=m({__name:`FormItem`,props:{title:{},nested:{type:[Boolean,Number]},div:{type:Boolean},description:{},dot:{type:Boolean}},emits:[`reset`],setup(e,{emit:n}){let i=n;function a(){i(`reset`)}return(n,i)=>(t(),A(s(e.div?`div`:`label`),{flex:`~ row gap-2 items-center`,"select-none":``},{default:w(()=>[_(`div`,oa,[e.nested?(t(),y(`div`,{key:0,"i-ri-corner-down-right-line":``,op40:``,style:p(typeof e.nested==`number`?{marginLeft:`${e.nested*.5+.5}rem`}:{marginLeft:`0.25rem`})},null,4)):M(`v-if`,!0),e.description?(t(),A(N(ne),{key:2,distance:`10`},{popper:w(()=>[_(`div`,{"text-sm":``,"min-w-90":``,innerHTML:e.description},null,8,la)]),default:w(()=>[_(`div`,{op75:``,"text-right":``,relative:``,onDblclick:a},[f(r(e.title)+` `,1),e.dot?(t(),y(`div`,ca)):M(`v-if`,!0)],32)]),_:1})):(t(),y(`div`,{key:1,op75:``,relative:``,onDblclick:a},[f(r(e.title)+` `,1),e.dot?(t(),y(`div`,sa)):M(`v-if`,!0)],32))]),h(n.$slots,`default`)]),_:3}))}}),ua={relative:``,"h-22px":``},da={key:0,"pointer-events-none":``,absolute:``,"right-1":``,"top-0.5":``,"text-xs":``,op25:``},fa=m({__name:`FormSlider`,props:c({max:{},min:{},step:{},unit:{},default:{}},{modelValue:{type:Number},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let n=e,i=o(e,`modelValue`);return(a,o)=>(t(),y(k,null,[_(`div`,{relative:``,"h-22px":``,"w-60":``,"flex-auto":``,onDblclick:o[1]||=e=>n.default===void 0?null:i.value=n.default},[ae(_(`input`,l({"onUpdate:modelValue":o[0]||=e=>i.value=e,type:`range`,class:`slider`},n,{absolute:``,"bottom-0":``,"left-0":``,"right-0":``,"top-0":``,"z-10":``,"w-full":``,"align-top":``}),null,16),[[O,i.value,void 0,{number:!0}]]),n.default==null?M(`v-if`,!0):(t(),y(`span`,{key:0,border:`r main`,absolute:``,"bottom-0":``,"top-0":``,"h-full":``,"w-1px":``,op75:``,style:p({left:`${(n.default-e.min)/(e.max-e.min)*100}%`})},null,4))],32),_(`div`,ua,[ae(_(`input`,l({"onUpdate:modelValue":o[2]||=e=>i.value=e,type:`number`},n,{border:`~ main rounded`,m0:``,"w-20":``,"bg-gray:5":``,pl2:``,"align-top":``,"text-sm":``}),null,16),[[O,i.value,void 0,{number:!0}]]),n.unit?(t(),y(`span`,da,r(n.unit),1)):M(`v-if`,!0)])],64))}}),pa={error:0,client:60,Light:60,Dark:240};function ma(e,t=1){if(pa[e])return ha(pa[e],t);let n=0;for(let t=0;t<e.length;t++)n=e.charCodeAt(t)+((n<<5)-n);return ha(n%360,t)}function ha(e,t=1){return`hsla(${e}, ${e===-1?0:at.value?50:100}%, ${at.value?60:20}%, ${t})`}var ga=[`textContent`],_a=m({__name:`Badge`,props:{text:{},color:{type:[Boolean,Number],default:!0},as:{},size:{}},setup(e){let n=e,i=E(()=>!n.text||n.color===!1?{}:{color:typeof n.color==`number`?ha(n.color):ma(n.text),background:typeof n.color==`number`?ha(n.color,.1):ma(n.text,.1)}),a=E(()=>(n.size||`sm`)===`sm`?`px-1.5 text-11px leading-1.6em`:``);return(o,c)=>(t(),A(s(e.as||`span`),{"ws-nowrap":``,rounded:``,class:b(a.value),style:p(i.value)},{default:w(()=>[h(o.$slots,`default`,{},()=>[_(`span`,{textContent:r(n.text)},null,8,ga)])]),_:3},8,[`class`,`style`]))}}),va={flex:`~ gap-1 items-center`,rounded:``,"bg-gray:4":``,p1:``,"m--1":``},ya=m({__name:`SegmentControl`,props:{options:{},modelValue:{}},emits:[`update:modelValue`],setup(e){return(n,r)=>(t(),y(`div`,va,[(t(!0),y(k,null,a(e.options,r=>(t(),A(_a,{key:r.value,class:b([`px-2 py-1 text-xs font-mono`,r.value===e.modelValue?``:`op50`]),color:r.value===e.modelValue,"aria-pressed":r.value===e.modelValue,size:`none`,text:r.label,as:`button`,onClick:e=>n.$emit(`update:modelValue`,r.value)},null,8,[`class`,`color`,`aria-pressed`,`text`,`onClick`]))),128))]))}}),ba={"text-sm":``,"select-none":``,flex:`~ col gap-1`,"min-w-30":``,px4:``},xa=m({__name:`Settings`,setup(e){let{isPresenter:r}=B(),{isSupported:i}=Xe();return(e,a)=>(t(),y(`div`,ba,[n(Z,{title:`Invert`,dot:N(I).invert!==N(L).invert,onReset:a[1]||=e=>N(I).invert=N(L).invert},{default:w(()=>[n(aa,{modelValue:N(I).invert,"onUpdate:modelValue":a[0]||=e=>N(I).invert=e},null,8,[`modelValue`])]),_:1},8,[`dot`]),n(Z,{title:`Brightness`,dot:N(I).brightness!==N(L).brightness,onReset:a[3]||=e=>N(I).brightness=N(L).brightness},{default:w(()=>[n(fa,{modelValue:N(I).brightness,"onUpdate:modelValue":a[2]||=e=>N(I).brightness=e,max:1.5,min:.5,step:.02,default:N(L).brightness},null,8,[`modelValue`,`default`])]),_:1},8,[`dot`]),n(Z,{title:`Contrast`,dot:N(I).contrast!==N(L).contrast,onReset:a[5]||=e=>N(I).contrast=N(L).contrast},{default:w(()=>[n(fa,{modelValue:N(I).contrast,"onUpdate:modelValue":a[4]||=e=>N(I).contrast=e,max:1.5,min:.5,step:.02,default:N(L).contrast},null,8,[`modelValue`,`default`])]),_:1},8,[`dot`]),n(Z,{title:`Saturation`,dot:N(I).saturate!==N(L).saturate,onReset:a[7]||=e=>N(I).saturate=N(L).saturate},{default:w(()=>[n(fa,{modelValue:N(I).saturate,"onUpdate:modelValue":a[6]||=e=>N(I).saturate=e,max:1.5,min:.5,step:.02,default:N(L).saturate},null,8,[`modelValue`,`default`])]),_:1},8,[`dot`]),n(Z,{title:`Sepia`,dot:N(I).sepia!==N(L).sepia,onReset:a[9]||=e=>N(I).sepia=N(L).sepia},{default:w(()=>[n(fa,{modelValue:N(I).sepia,"onUpdate:modelValue":a[8]||=e=>N(I).sepia=e,max:2,min:-2,step:.02,default:N(L).sepia},null,8,[`modelValue`,`default`])]),_:1},8,[`dot`]),n(Z,{title:`Hue Rotate`,dot:N(I).hueRotate!==N(L).hueRotate,onReset:a[11]||=e=>N(I).hueRotate=N(L).hueRotate},{default:w(()=>[n(fa,{modelValue:N(I).hueRotate,"onUpdate:modelValue":a[10]||=e=>N(I).hueRotate=e,max:180,min:-180,step:.1,default:N(L).hueRotate},null,8,[`modelValue`,`default`])]),_:1},8,[`dot`]),a[16]||=_(`div`,{class:`h-1px opacity-5 bg-current w-full my2`},null,-1),n(Z,{title:`Cursor Style`},{default:w(()=>[n(ya,{modelValue:N(Se),"onUpdate:modelValue":a[12]||=e=>ie(Se)?Se.value=e:null,options:[{label:`Cursor`,value:`cursor`},{label:`Laser`,value:`laser`}]},null,8,[`modelValue`])]),_:1}),N(r)?M(`v-if`,!0):(t(),A(Z,{key:0,title:`Slide Scale`},{default:w(()=>[n(ya,{modelValue:N(P),"onUpdate:modelValue":a[13]||=e=>ie(P)?P.value=e:null,options:[{label:`Fit`,value:0},{label:`1:1`,value:1}]},null,8,[`modelValue`])]),_:1})),N(i)?(t(),A(Z,{key:1,title:`Wake Lock`},{default:w(()=>[n(aa,{modelValue:N(ue),"onUpdate:modelValue":a[14]||=e=>ie(ue)?ue.value=e:null},null,8,[`modelValue`])]),_:1})):M(`v-if`,!0),N(r)?M(`v-if`,!0):(t(),A(Z,{key:2,title:`Hide Idle Cursor`},{default:w(()=>[n(aa,{modelValue:N(Te),"onUpdate:modelValue":a[15]||=e=>ie(Te)?Te.value=e:null},null,8,[`modelValue`])]),_:1}))]))}}),Sa={class:`select-list`},Ca={class:`title`},wa={class:`items`},Ta=[`onClick`],Ea=Re(m({__name:`SelectList`,props:{modelValue:{type:[Object,String,Number,Boolean]},title:{type:String},items:{type:Array}},setup(e,{emit:n}){let i=ze(e,`modelValue`,n,{passive:!0});return(n,o)=>(t(),y(`div`,Sa,[_(`div`,Ca,r(e.title),1),_(`div`,wa,[(t(!0),y(k,null,a(e.items,e=>(t(),y(`div`,{key:e.value,class:b([`item`,{active:N(i)===e.value}]),onClick:()=>{i.value=e.value,e.onClick?.()}},[_(`div`,{class:b([`i-carbon:checkmark text-green-500 mya`,{"opacity-0":N(i)!==e.value}])},null,2),_(`div`,{class:b({"opacity-50":N(i)!==e.value})},r(e.display||e.value),3)],10,Ta))),128))])]))}}),[[`__scopeId`,`data-v-aa3b28a6`]]),Da={"text-sm":``,flex:`~ col gap-2`},Oa={px3:``,"ws-nowrap":``},ka={"font-bold":``,"text-primary":``},Aa=m({__name:`SyncControls`,setup(e){let{isPresenter:i}=B(),a=E({get:()=>i.value?z.value.presenterReceive:z.value.viewerReceive,set(e){i.value?z.value.presenterReceive=e:z.value.viewerReceive=e}}),o=E({get:()=>i.value?z.value.presenterSend:z.value.viewerSend,set(e){i.value?z.value.presenterSend=e:z.value.viewerSend=e}}),s=E({get:()=>a.value&&o.value?`bidirectional`:a.value&&!o.value?`receive-only`:!a.value&&o.value?`send-only`:`off`,set(e){switch(e){case`bidirectional`:a.value=!0,o.value=!0;break;case`receive-only`:a.value=!0,o.value=!1;break;case`send-only`:a.value=!1,o.value=!0;break;case`off`:a.value=!1,o.value=!1}}});return(e,c)=>(t(),A(na,null,{button:w(()=>[n(W,{title:`Change sync settings`},{default:w(()=>[_(`div`,{class:b([`i-ph:arrow-up-bold mx--1.2 scale-x-80`,o.value?`text-green6 dark:text-green`:`op30`])},null,2),_(`div`,{class:b([`i-ph:arrow-down-bold mx--1.2 scale-x-80`,a.value?`text-green6 dark:text-green`:`op30`])},null,2)]),_:1})]),menu:w(()=>[_(`div`,Da,[_(`div`,Oa,[c[1]||=_(`span`,{op75:``},`Slides navigation syncing for `,-1),_(`span`,ka,r(N(i)?`presenter`:`viewer`),1)]),c[2]||=_(`div`,{class:`h-1px opacity-10 bg-current w-full`},null,-1),n(Ea,{modelValue:s.value,"onUpdate:modelValue":c[0]||=e=>s.value=e,title:`Sync Mode`,items:[{value:`bidirectional`,display:`Bidirectional Sync`},{value:`receive-only`,display:`Receive Only`},{value:`send-only`,display:`Send Only`},{value:`off`,display:`Disable`}]},null,8,[`modelValue`])])]),_:1}))}}),ja={key:0,class:`i-carbon:minimize`},Ma={key:1,class:`i-carbon:maximize`},Na={key:0,class:`i-carbon-moon`},Pa={key:1,class:`i-carbon-sun`},Fa={key:0,class:`i-carbon-magic-wand-filled color-red-600 dark:color-red-400`},Ia={key:1,class:`i-carbon-magic-wand`},La={key:0,class:`i-ph-cursor-fill`},Ra={key:1,class:`i-ph-cursor-duotone`},za={key:0,"w-2":``,"h-2":``,"bg-primary":``,"rounded-full":``,absolute:``,"top-0.5":``,"right-0.5":``},Ba={class:`px2 my-auto`},Va={class:`text-lg`},Ha={class:`opacity-50 text-sm`},Ua=m({__name:`NavControls`,props:{persist:{default:!1}},setup(e){let i=e,{currentSlideNo:a,hasNext:o,hasPrev:s,isEmbedded:c,isPresenter:l,isPresenterAvailable:u,next:d,prev:m,total:h,enterPresenter:g,exitPresenter:v}=B(),{brush:x,drawingEnabled:S}=ct(),T=De.smaller(`md`),{isFullscreen:D,toggle:ee}=Pe,O=C();function ne(){O.value&&Me.value&&O.value.contains(Me.value)&&Me.value.blur()}let re=E(()=>i.persist?`text-$slidev-controls-foreground bg-transparent`:`rounded-md bg-main shadow-xl border border-main`),ie=te();return(e,i)=>(t(),y(`nav`,{ref_key:`root`,ref:O,class:`flex flex-col`},[_(`div`,{class:b([`flex flex-wrap-reverse text-xl gap-0.5 p-1 lg:p-2`,re.value]),onMouseleave:ne},[N(c)?M(`v-if`,!0):(t(),A(W,{key:0,title:N(D)?`Close fullscreen`:`Enter fullscreen`,onClick:N(ee)},{default:w(()=>[N(D)?(t(),y(`div`,ja)):(t(),y(`div`,Ma))]),_:1},8,[`title`,`onClick`])),n(W,{disabled:!N(s),title:`Go to previous slide`,onClick:N(m)},{default:w(()=>[...i[6]||=[_(`div`,{class:`i-carbon:arrow-left`},null,-1)]]),_:1},8,[`disabled`,`onClick`]),n(W,{disabled:!N(o),title:`Go to next slide`,onClick:N(d)},{default:w(()=>[...i[7]||=[_(`div`,{class:`i-carbon:arrow-right`},null,-1)]]),_:1},8,[`disabled`,`onClick`]),N(c)?M(`v-if`,!0):(t(),A(W,{key:1,title:`Show slide overview`,onClick:i[0]||=e=>N(de)()},{default:w(()=>[...i[8]||=[_(`div`,{class:`i-carbon:apps`},null,-1)]]),_:1})),N(tt)?M(`v-if`,!0):(t(),A(W,{key:2,title:N(at)?`Switch to light mode theme`:`Switch to dark mode theme`,onClick:i[1]||=e=>N(rt)()},{default:w(()=>[N(at)?(t(),y(`div`,Na)):(t(),y(`div`,Pa))]),_:1},8,[`title`])),n(lt),N(c)?M(`v-if`,!0):(t(),y(k,{key:3},[!N(l)&&!N(T)&&ie.value?(t(),y(k,{key:0},[n(N(ie)),n(lt)],64)):M(`v-if`,!0),N(l)?(t(),A(W,{key:1,title:N(Se)===`laser`?N(pe)?`Disable laser pointer`:`Enable laser pointer`:N(pe)?`Hide presenter cursor`:`Show presenter cursor`,active:N(pe),onClick:i[2]||=e=>N(fe)()},{default:w(()=>[N(Se)===`laser`?(t(),y(k,{key:0},[N(pe)?(t(),y(`div`,Fa)):(t(),y(`div`,Ia))],64)):(t(),y(k,{key:1},[N(pe)?(t(),y(`div`,La)):(t(),y(`div`,Ra))],64))]),_:1},8,[`title`,`active`])):M(`v-if`,!0),!N(V).drawings.presenterOnly||N(l)?(t(),A(W,{key:2,class:`relative`,title:N(S)?`Hide drawing toolbar`:`Show drawing toolbar`,active:N(S),onClick:i[3]||=e=>S.value=!N(S)},{default:w(()=>[i[9]||=_(`div`,{class:`i-carbon:pen`},null,-1),N(S)?(t(),y(`div`,{key:0,class:`absolute left-1 right-1 bottom-0 h-0.7 rounded-full`,style:p({background:N(x).color})},null,4)):M(`v-if`,!0)]),_:1},8,[`title`,`active`])):M(`v-if`,!0),n(lt),N(l)?(t(),A(W,{key:3,title:`Play Mode`,onClick:N(v)},{default:w(()=>[...i[10]||=[_(`div`,{class:`i-carbon:presentation-file`},null,-1)]]),_:1},8,[`onClick`])):M(`v-if`,!0),N(u)?(t(),A(W,{key:4,title:`Presenter Mode`,onClick:N(g)},{default:w(()=>[...i[11]||=[_(`div`,{class:`i-carbon:user-speaker`},null,-1)]]),_:1},8,[`onClick`])):M(`v-if`,!0),M(`v-if`,!0)],64)),(t(),y(k,{key:4},[N(V).download?(t(),A(W,{key:0,title:`Download as PDF`,onClick:N(nt)},{default:w(()=>[...i[13]||=[_(`div`,{class:`i-carbon:download`},null,-1)]]),_:1},8,[`onClick`])):M(`v-if`,!0)],64)),M(`v-if`,!0),!N(l)&&N(V).info&&!N(c)?(t(),A(W,{key:6,title:`Show info`,onClick:i[5]||=e=>ce.value=!N(ce)},{default:w(()=>[...i[15]||=[_(`div`,{class:`i-carbon:information`},null,-1)]]),_:1})):M(`v-if`,!0),N(c)?M(`v-if`,!0):(t(),y(k,{key:7},[n(lt),N(l)?(t(),A(W,{key:0,title:`Toggle Presenter Layout`,class:`aspect-ratio-initial flex items-center`,onClick:N(me)},{default:w(()=>[i[16]||=_(`div`,{class:`i-carbon:template`},null,-1),f(` `+r(N(Ce)),1)]),_:1},8,[`onClick`])):M(`v-if`,!0),(t(),A(Aa,{key:1})),n(na,null,{button:w(({value:e})=>[n(W,{title:`More Options`,active:e},{default:w(()=>[i[17]||=_(`div`,{class:`i-carbon:settings-adjust`},null,-1),N(we)?(t(),y(`div`,za)):M(`v-if`,!0)]),_:1},8,[`active`])]),menu:w(()=>[n(xa)]),_:1})],64)),N(c)?M(`v-if`,!0):(t(),A(lt,{key:8})),_(`div`,Ba,[_(`span`,Va,r(N(a)),1),_(`span`,Ha,` / `+r(N(h)),1)]),n(N(ea))],34)],512))}}),Wa=new Set,Ga=new Set,Ka=/\/$/;function qa(e){return e.startsWith(`http`)||e.startsWith(`//`)?e:`${`./`.replace(Ka,``)}${e.startsWith(`/`)?e:`/${e}`}`}var Ja=2,Ya=new Map,Xa=C(0),Za=C(0),Qa=E(()=>Za.value===0?1:Xa.value/Za.value);E(()=>Qa.value>=1);function $a(e){let t=qa(e);if(Wa.has(t)||Ga.has(t))return;Ga.add(t);let n=new Image;n.onload=()=>{Ga.delete(t),Wa.add(t),Ya.delete(t),Xa.value=Wa.size},n.onerror=()=>{Ga.delete(t);let n=Ya.get(t)??0;n<Ja&&(Ya.set(t,n+1),setTimeout($a,1e3*(n+1),e))},n.src=t}function eo(e){let t=e.meta?.slide?.images;if(t?.length)for(let e of t)$a(e)}function to(e,t,n,r){let i=V.preloadImages;if(i===!1)return;let a=typeof i==`object`&&i?.ahead||3;u(()=>{let e=r.value;if(!e?.length)return;let t=new Set;for(let n of e)for(let e of n.meta?.slide?.images??[])t.add(qa(e));Za.value=t.size}),u(()=>{let i=e.value,o=r.value;if(!i||!o?.length)return;eo(i),eo(t.value),eo(n.value);let s=i.no-1;for(let e=1;e<=a;e++){let t=s+e;t<o.length&&eo(o[t])}}),u(e=>{let t=r.value,n=setTimeout(()=>{if(t?.length)for(let e of t)eo(e)},3e3);e(()=>clearTimeout(n))})}function no(){let e=Ue(),t=C(!1),n,r,i=typeof document<`u`&&`startViewTransition`in document;return e.beforeResolve((e,a)=>{let o=Le(a.params.no)?.meta,s=Le(e.params.no)?.meta,c=o?.slide?.no,l=s?.slide?.no;if((c!=null&&l!=null&&c!==l&&((c<l?o?.transition:s?.transition)??V.transition))!==`view-transition`){t.value=!1;return}if(!i){t.value=!1,console.warn(`View transition is not supported in your browser, fallback to normal transition.`);return}t.value=!0;let u=new Promise((e,t)=>{n=e,r=t}),d,f=new Promise(e=>d=e);return setTimeout(()=>{document.startViewTransition(()=>(d(),u))},50),f}),i&&e.afterEach(()=>{n?.(),r?.()}),t}var ro=[`data-drag-id`],Q=10,$=10,io=`absolute border border-gray bg-gray dark:border-gray-500 dark:bg-gray-800 bg-opacity-30 `,ao=20,oo=m({__name:`DragControl`,props:{data:{}},setup(n){let{dragId:r,zoom:a,autoHeight:o,x0:s,y0:c,width:l,height:d,rotate:f,isArrow:m}=n.data,h=e(Qe,C(1)),g=E(()=>h.value*a.value),{left:v,top:x}=ot(),S=m?-1/0:40,w=E(()=>f.value*Math.PI/180),T=E(()=>Math.sin(w.value)),D=E(()=>Math.cos(w.value)),ee=E(()=>l.value*D.value+d.value*T.value),O=E(()=>l.value*T.value+d.value*D.value),te=E(()=>s.value-ee.value/2),ne=E(()=>c.value-O.value/2),re=E(()=>s.value+ee.value/2),ie=E(()=>c.value+O.value/2),ae=E(()=>m&&l.value<0),oe=E(()=>m&&d.value<0),A=null;function P(e){if(e.buttons!==1)return;e.preventDefault(),e.stopPropagation();let t=e.target.getBoundingClientRect(),n=l.value*D.value-d.value*T.value,r=l.value*T.value+d.value*D.value,i=l.value*D.value+d.value*T.value,a=-l.value*T.value+d.value*D.value;A={x0:s.value,y0:c.value,width:l.value,height:d.value,rotate:f.value,dx0:e.clientX-(t.left+t.right)/2,dy0:e.clientY-(t.top+t.bottom)/2,ltx:s.value-n/2,lty:c.value-r/2,rtx:s.value+i/2,rty:c.value-a/2,lbx:s.value-i/2,lby:c.value+a/2,rbx:s.value+n/2,rby:c.value+r/2},e.currentTarget.setPointerCapture(e.pointerId)}function se(e){if(!A||e.buttons!==1)return;e.preventDefault(),e.stopPropagation();let t=(e.clientX-v.value-A.dx0)/g.value,n=(e.clientY-x.value-A.dy0)/g.value;s.value=ke(t,-ee.value/2+$,he.value+ee.value/2-$),c.value=ke(n,-O.value/2+$,be.value+O.value/2-$)}function F(e){A&&=(e.preventDefault(),e.stopPropagation(),null)}function ce(e,t){return{onPointerdown:P,onPointermove:n=>{if(!A||n.buttons!==1)return;n.preventDefault(),n.stopPropagation();let r=(n.clientX-v.value)/g.value,i=(n.clientY-x.value)/g.value,{ltx:a,lty:o,rtx:u,rty:f,lbx:p,lby:m,rbx:h,rby:_}=A,y=A.width/A.height,b=Math.max(S,S*y);function C(e,t){if(n.shiftKey){let n=Math.max(e,t*y,b);return{w:n,h:n/y}}return{w:Math.max(e,S),h:Math.max(t,S)}}if(e){if(t){let{w:e,h:t}=C((h-r)*D.value+(_-i)*T.value,-(h-r)*T.value+(_-i)*D.value);r=h-e*D.value+t*T.value,i=_-e*T.value-t*D.value}else{let{w:e,h:t}=C((u-r)*D.value-(i-f)*T.value,(u-r)*T.value+(i-f)*D.value);r=u-e*D.value-t*T.value,i=f-e*T.value+t*D.value}}else if(t){let{w:e,h:t}=C((r-p)*D.value-(m-i)*T.value,(r-p)*T.value+(m-i)*D.value);r=p+e*D.value+t*T.value,i=m+e*T.value-t*D.value}else{let{w:e,h:t}=C((r-a)*D.value+(i-o)*T.value,-(r-a)*T.value+(i-o)*D.value);r=a+e*D.value-t*T.value,i=o+e*T.value+t*D.value}e?t?(s.value=(r+h)/2,c.value=(i+_)/2,l.value=(h-r)*D.value+(_-i)*T.value,d.value=-(h-r)*T.value+(_-i)*D.value):(s.value=(r+u)/2,c.value=(i+f)/2,l.value=(u-r)*D.value-(i-f)*T.value,d.value=(u-r)*T.value+(i-f)*D.value):t?(s.value=(r+p)/2,c.value=(i+m)/2,l.value=(r-p)*D.value-(m-i)*T.value,d.value=(r-p)*T.value+(m-i)*D.value):(s.value=(r+a)/2,c.value=(i+o)/2,l.value=(r-a)*D.value+(i-o)*T.value,d.value=-(r-a)*T.value+(i-o)*D.value)},onPointerup:F,style:{width:`${Q}px`,height:`${Q}px`,margin:`-${Q/2}px`,left:e===ae.value?void 0:`0`,right:e===ae.value?`0`:void 0,top:t===oe.value?void 0:`0`,bottom:t===oe.value?`0`:void 0,cursor:m?`move`:+e+ +t==1?`nesw-resize`:`nwse-resize`,borderRadius:m?`50%`:void 0},class:io}}function I(e){return{onPointerdown:P,onPointermove:t=>{if(!A||t.buttons!==1)return;t.preventDefault(),t.stopPropagation();let n=(t.clientX-v.value)/g.value,r=(t.clientY-x.value)/g.value,{ltx:i,lty:a,rtx:o,rty:u,lbx:f,lby:p,rbx:m,rby:h}=A;if(e===`l`){let e=(o+m)/2,t=(u+h)/2;l.value=Math.max((e-n)*D.value+(t-r)*T.value,S),s.value=e-l.value*D.value/2,c.value=t-l.value*T.value/2}else if(e===`r`){let e=(i+f)/2,t=(a+p)/2;l.value=Math.max((n-e)*D.value+(r-t)*T.value,S),s.value=e+l.value*D.value/2,c.value=t+l.value*T.value/2}else if(e===`t`){let e=(f+m)/2,t=(p+h)/2;d.value=Math.max((t-r)*D.value-(e-n)*T.value,S),s.value=e+d.value*T.value/2,c.value=t-d.value*D.value/2}else if(e===`b`){let e=(i+o)/2,t=(a+u)/2;d.value=Math.max((r-t)*D.value-(n-e)*T.value,S),s.value=e-d.value*T.value/2,c.value=t+d.value*D.value/2}},onPointerup:F,style:{width:`${Q}px`,height:`${Q}px`,margin:`-${Q/2}px`,left:e===`l`?`0`:e===`r`?`100%`:`50%`,top:e===`t`?`0`:e===`b`?`100%`:`50%`,cursor:`lr`.includes(e)?`ew-resize`:`ns-resize`,borderRadius:`50%`},class:io}}function le(){return{onPointerdown:P,onPointermove:e=>{if(!A||e.buttons!==1)return;e.preventDefault(),e.stopPropagation();let t=(e.clientX-v.value-A.dx0)/g.value-Q/4,n=(e.clientY-x.value-A.dy0)/g.value-Q/4,r=Math.atan2(n-c.value,t-s.value)*180/Math.PI+90;for(let e of[0,90,180,270,360])if(Math.abs(r-e)<5){r=e%360;break}f.value=r},onPointerup:F,style:{width:`${Q}px`,height:`${Q}px`,margin:`-${Q/2}px`,left:`50%`,top:`-20px`,cursor:`grab`,borderRadius:`50%`},class:io}}let L={immediate:!1,immediateCallback:!1},ue=Be(()=>{re.value<=$||s.value--},ao,L),de=Be(()=>{te.value>=he.value-$||s.value++},ao,L),fe=Be(()=>{ie.value<=$||c.value--},ao,L),pe=Be(()=>{ne.value>=be.value-$||c.value++},ao,L);return u(()=>{function e(e,t){Ie[e].value?t.resume():t.pause()}e(`left`,ue),e(`right`,de),e(`up`,fe),e(`down`,pe)}),(e,n)=>Number.isFinite(N(s))?(t(),y(`div`,{key:0,id:`drag-control-container`,"data-drag-id":N(r),style:p({position:`absolute`,zIndex:100,left:`${N(a)*(N(s)-Math.abs(N(l))/2)}px`,top:`${N(a)*(N(c)-Math.abs(N(d))/2)}px`,width:`${N(a)*Math.abs(N(l))}px`,height:`${N(a)*Math.abs(N(d))}px`,transformOrigin:`center center`,transform:`rotate(${N(f)}deg)`}),onPointerdown:P,onPointermove:se,onPointerup:F},[_(`div`,{class:b([`absolute inset-0 z-nav dark:b-gray-400`,N(m)?``:`b b-dark`])},[N(o)?M(`v-if`,!0):(t(),y(k,{key:0},[_(`div`,j(i(ce(!0,!0))),null,16),_(`div`,j(i(ce(!1,!1))),null,16),N(m)?M(`v-if`,!0):(t(),y(k,{key:0},[_(`div`,j(i(ce(!0,!1))),null,16),_(`div`,j(i(ce(!1,!0))),null,16)],64))],64)),N(m)?M(`v-if`,!0):(t(),y(k,{key:1},[_(`div`,j(i(I(`l`))),null,16),_(`div`,j(i(I(`r`))),null,16),N(o)?M(`v-if`,!0):(t(),y(k,{key:0},[_(`div`,j(i(I(`t`))),null,16),_(`div`,j(i(I(`b`))),null,16)],64)),_(`div`,j(i(le())),null,16),_(`div`,{class:`absolute -top-15px w-0 b b-dashed b-dark dark:b-gray-400`,style:p({left:`calc(50% - 1px)`,height:N(o)?`14px`:`10px`})},null,4)],64))],2)],44,ro)):M(`v-if`,!0)}}),so=Re(m({__name:`SlidesShow`,props:{renderContext:{}},setup(e){let{currentSlideRoute:r,currentTransition:i,getPrimaryClicks:o,prevRoute:c,nextRoute:d,slides:f,isPrintMode:p,isPrintWithClicks:m,clicksDirection:h,printRange:g}=B();function _(e){e.meta.preload!==!1&&(e.meta.__preloaded=!0,e.load())}u(()=>{_(r.value),_(c.value),_(d.value)}),u(e=>{let t=f.value,n=setTimeout(()=>{t.forEach(_)},3e3);e(()=>clearTimeout(n))}),to(r,c,d,f);let v=no(),b=te();je(()=>import(`./DrawingLayer-BxwezCRF.js`).then(e=>b.value=e.default),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11]),import.meta.url);let x=E(()=>p.value?g.value.map(e=>f.value[e-1]):f.value.filter(e=>e.meta?.__preloaded||e===r.value));function S(){Ae.value=!0,ee()}return(c,u)=>(t(),y(k,null,[M(` Global Bottom `),n(N(ft)),M(` Slides `),(t(),A(s(N(v)&&!N(p)&&!N(Ae)&&!N(Ne)?`div`:re),l(N(Ae)||N(Ne)||N(p)?{}:N(i),{id:`slideshow`,tag:`div`,class:{"slidev-nav-go-forward":N(h)>0,"slidev-nav-go-backward":N(h)<0},onAfterLeave:S}),{default:w(()=>[(t(!0),y(k,null,a(x.value,n=>ae((t(),A(ht,{key:n.no,"clicks-context":N(p)&&!N(m)?N(le)(n,N($e)):N(o)(n),route:n,"render-context":e.renderContext},null,8,[`clicks-context`,`route`,`render-context`])),[[oe,n===N(r)]])),128))]),_:1},16,[`class`])),N(Oe)?(t(),A(oo,{key:0,data:N(Oe)},null,8,[`data`])):M(`v-if`,!0),M(` Global Top `),n(N(mt)),b.value?(t(),A(N(b),{key:1})):M(`v-if`,!0)],64))}}),[[`__scopeId`,`data-v-835d2635`]]),co=Object.assign({}),lo=Object.assign({}),uo=Object.assign({}),fo=[Object.values(co)[0],Object.values(lo)[0],Object.values(uo)[0]].filter(Boolean);function po(){let{go:e,goFirst:t,goLast:n,next:r,nextSlide:i,prev:a,prevSlide:o}=B(),{drawingEnabled:s}=ct(),{escape:c,space:l,shift:u,left:d,right:f,up:p,down:m,enter:h,d:g,g:_,o:v,"`":y}=Ie,b={next:r,prev:a,nextSlide:i,prevSlide:o,go:e,goFirst:t,goLast:n,downloadPDF:nt,toggleDark:rt,toggleOverview:de,toggleDrawing:()=>s.value=!s.value,escapeOverview:()=>F.value=!1,showGotoDialog:()=>R.value=!R.value},x=U(H(F),H(Oe)),S=[{name:`next_space`,key:U(l,H(u)),fn:r,autoRepeat:!0},{name:`prev_space`,key:U(l,u),fn:a,autoRepeat:!0},{name:`next_right`,key:U(f,H(u),x),fn:r,autoRepeat:!0},{name:`prev_left`,key:U(d,H(u),x),fn:a,autoRepeat:!0},{name:`next_page_key`,key:`pageDown`,fn:r,autoRepeat:!0},{name:`prev_page_key`,key:`pageUp`,fn:a,autoRepeat:!0},{name:`next_down`,key:U(m,x),fn:i,autoRepeat:!0},{name:`prev_up`,key:U(p,x),fn:o,autoRepeat:!0},{name:`next_shift`,key:U(f,u),fn:i,autoRepeat:!0},{name:`prev_shift`,key:U(d,u),fn:o,autoRepeat:!0},{name:`toggle_dark`,key:U(g,H(s)),fn:rt},{name:`toggle_overview`,key:U(Je(v,y),H(s)),fn:de},{name:`hide_overview`,key:U(c,H(s)),fn:()=>F.value=!1},{name:`goto`,key:U(_,H(s)),fn:()=>R.value=!R.value},{name:`next_overview`,key:U(f,F),fn:Bi},{name:`prev_overview`,key:U(d,F),fn:zi},{name:`up_overview`,key:U(p,F),fn:Vi},{name:`down_overview`,key:U(m,F),fn:Hi},{name:`goto_from_overview`,key:U(h,F),fn:()=>{e(X.value),F.value=!1}}],C=new Set(S.map(e=>e.name));for(let e of fo)S=e(b,S);if(S.filter(e=>e.name&&C.has(e.name)).length===0){let e=[`========== WARNING ==========`,`defineShortcutsSetup did not return any of the base shortcuts.`,`See https://sli.dev/custom/config-shortcuts.html for migration.`,`If it is intentional, return at least one shortcut with one of the base names (e.g. name:"goto").`].join(`
|
| 3 |
+
|
| 4 |
+
`);alert(e),console.warn(e)}return S}function mo(){let{isPrintMode:e}=B(),t=U(H(Ee),H(xe),H(e),_e,H(se)),n=po();new Map(n.map(e=>[e.key,e])).forEach(e=>{e.fn&&r(e.key,e.fn,e.autoRepeat)}),i(`f`,()=>Pe.toggle());function r(e,n,r=!1){typeof e==`string`&&(e=Ie[e]);let i=U(e,t),a=0,o,s=()=>{if(clearTimeout(o),!i.value){a=0;return}r&&(o=setTimeout(s,Math.max(1e3-a*250,150)),a++),n()};return g(i,s,{flush:`sync`})}function i(e,n){return Ye(e,e=>{t.value&&(e.repeat||n())})}}export{$i as a,Fi as c,_t as d,gt as f,ya as i,Pt as l,so as n,Zi as o,Ua as r,Xi as s,mo as t,Dt as u};
|
lecture-07/assets/syncState-3Tc2ZArb.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
import{Z as e,dt as t,ht as n,lt as r}from"./modules/shiki-CJZsCeMT.js";function i(){return Math.random().toString(36).replace(/[^a-z]+/g,``).substr(2,10)}function a(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!1})}var o=r([{channels:[],enabled:!0,init(e,t,r,i=!1){let a;if(!i)a=new BroadcastChannel(e),a.addEventListener(`message`,e=>t(e.data)),this.channels.push(a);else if(i){this.listener=function(n){n&&n.key===e&&n.newValue&&t(JSON.parse(n.newValue))},window.addEventListener(`storage`,this.listener);let n=window.localStorage.getItem(e);n&&t(JSON.parse(n))}return(t,r=!1)=>{this.enabled&&(!i&&a&&!r&&a.postMessage(n(t)),i&&!r&&window.localStorage.setItem(e,JSON.stringify(t)))}},disable(){this.enabled=!1,this.channels.forEach(e=>e.close()),this.listener&&window.removeEventListener(`storage`,this.listener)}}]),s=new Map,c=t({});function l(t,i,a=!1){let l=[],u=!1,d=!1,f,p,m=r(i);function h(e){l.push(e)}function g(e,t){m[e]!==t&&(clearTimeout(f),u=!0,m[e]=t,f=setTimeout(()=>u=!1,0))}function _(e){u||(clearTimeout(p),d=!0,Object.entries(e).forEach(([e,t])=>{m[e]=t}),p=setTimeout(()=>d=!1,0))}function v(t){s.set(t,{onUpdate:_,persist:a,state:m}),c.value[t]=o.map(e=>e.init(t,_,m,a)).filter(e=>!!e);function r(){c.value[t].forEach(e=>e?.(n(m),d)),u||l.forEach(e=>e(m))}e(m,r,{deep:!0})}return{init:v,onPatch:h,onUpdate:_,patch:g,state:m}}export{a as n,i as r,l as t};
|
lecture-07/assets/useDrawings-vNWRit9P.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
import{P as e,Z as t,dt as n,g as r,lt as i,st as a}from"./modules/shiki-CJZsCeMT.js";import{g as o,t as s,tt as c}from"./useNav-BmBHxIEh.js";import{D as l,g as u}from"./modules/vue-Dnfgf7Ad.js";import{c as d,l as f,s as p}from"./index-DxDNFTAW.js";var m=()=>({emit(e,...t){for(let n=this.events[e]||[],r=0,i=n.length;r<i;r++)n[r](...t)},events:{},on(e,t){return(this.events[e]||=[]).push(t),()=>{this.events[e]=this.events[e]?.filter(e=>t!==e)}}});function h(e,t){return e-t}function g(e){return e<0?-1:1}function _(e){return[Math.abs(e),g(e)]}function v(){let e=()=>((1+Math.random())*65536|0).toString(16).substring(1);return`${e()+e()}-${e()}-${e()}-${e()}-${e()}${e()}${e()}`}var y=2;function b(e,t){let n=document.createElementNS(`http://www.w3.org/2000/svg`,`defs`),r=document.createElementNS(`http://www.w3.org/2000/svg`,`marker`),i=document.createElementNS(`http://www.w3.org/2000/svg`,`path`);return i.setAttribute(`fill`,t),r.setAttribute(`id`,e),r.setAttribute(`viewBox`,`0 -5 10 10`),r.setAttribute(`refX`,`5`),r.setAttribute(`refY`,`0`),r.setAttribute(`markerWidth`,`4`),r.setAttribute(`markerHeight`,`4`),r.setAttribute(`orient`,`auto`),i.setAttribute(`d`,`M0,-5L10,0L0,5`),r.appendChild(i),n.appendChild(r),n}function x(e,t){let n=e.x-t.x,r=e.y-t.y;return n*n+r*r}function S(e,t,n){let r=t.x,i=t.y,a=n.x-r,o=n.y-i;if(a!==0||o!==0){let t=((e.x-r)*a+(e.y-i)*o)/(a*a+o*o);t>1?(r=n.x,i=n.y):t>0&&(r+=a*t,i+=o*t)}return a=e.x-r,o=e.y-i,a*a+o*o}function C(e,t){let n=e[0],r=[n],i;for(let a=1,o=e.length;a<o;a++)i=e[a],x(i,n)>t&&(r.push(i),n=i);return n!==i&&i&&r.push(i),r}function w(e,t,n,r,i){let a=r,o=0;for(let r=t+1;r<n;r++){let i=S(e[r],e[t],e[n]);i>a&&(o=r,a=i)}a>r&&(o-t>1&&w(e,t,o,r,i),i.push(e[o]),n-o>1&&w(e,o,n,r,i))}function T(e,t){let n=e.length-1,r=[e[0]];return w(e,0,n,t,r),r.push(e[n]),r}function E(e,t,n=!1){if(e.length<=2)return e;let r=t===void 0?1:t*t;return e=n?e:C(e,r),e=T(e,r),e}var D=class{constructor(e){this.drauu=e,this.event=void 0,this.point=void 0,this.start=void 0,this.el=null}onSelected(e){}onUnselected(){}onStart(e){}onMove(e){return!1}onEnd(e){}get brush(){return this.drauu.brush}get shiftPressed(){return this.drauu.shiftPressed}get altPressed(){return this.drauu.altPressed}get svgElement(){return this.drauu.el}getMousePosition(e){let t=this.drauu.el,n=this.drauu.options.cssZoom??1,r=this.drauu.options.coordinateScale??1,i=this.drauu.options.offset??{x:0,y:0};if(this.drauu.options.coordinateTransform===!1){let t=this.drauu.el.getBoundingClientRect();return{x:(e.pageX/n-t.left+i.x)*r,y:(e.pageY/n-t.top+i.y)*r,pressure:e.pressure}}{let a=this.drauu.svgPoint;a.x=e.clientX/n+i.x,a.y=e.clientY/n+i.y;let o=a.matrixTransform(t.getScreenCTM()?.inverse());return{x:o.x*r,y:o.y*r,pressure:e.pressure}}}createElement(e,t){let n=document.createElementNS(`http://www.w3.org/2000/svg`,e),r=t?{...this.brush,...t}:this.brush;return n.setAttribute(`fill`,r.fill??`transparent`),n.setAttribute(`stroke`,r.color),n.setAttribute(`stroke-width`,r.size.toString()),n.setAttribute(`stroke-linecap`,`round`),r.dasharray&&n.setAttribute(`stroke-dasharray`,r.dasharray),n}attr(e,t){this.el.setAttribute(e,typeof t==`string`?t:t.toFixed(y))}_setEvent(e){this.event=e,this.point=this.getMousePosition(e)}_eventDown(e){return this._setEvent(e),this.start=this.point,this.onStart(this.point)}_eventMove(e){return this._setEvent(e),this.onMove(this.point)}_eventUp(e){return this._setEvent(e),this.onEnd(this.point)}},O=class e extends D{constructor(...e){super(...e),this.points=[],this.count=0}onStart(e){if(this.el=this.createElement(`path`,{fill:`transparent`}),this.points=[e],this.brush.arrowEnd){this.arrowId=v();let e=b(this.arrowId,this.brush.color);this.el.appendChild(e)}return this.el}onMove(t){return this.el||this.onStart(t),this.points[this.points.length-1]!==t&&(this.points.push(t),this.count+=1),this.count>5&&(this.points=E(this.points,1,!0),this.count=0),this.attr(`d`,e.toSvgData(this.points)),!0}onEnd(){let t=this.el;if(this.el=null,!t)return!1;if(t.setAttribute(`d`,e.toSvgData(E(this.points,1,!0))),!t.getTotalLength()){let{x:e,y:n}=this.points[0],r=this.brush.size/2;t.setAttribute(`d`,`M ${e-r} ${n} a ${r},${r} 0 1,0 ${r*2},0 a ${r},${r} 0 1,0 ${-r*2},0`),t.setAttribute(`fill`,this.brush.color),t.setAttribute(`stroke-width`,`0`)}return!0}static line(e,t){let n=t.x-e.x,r=t.y-e.y;return{length:Math.sqrt(n**2+r**2),angle:Math.atan2(r,n)}}static controlPoint(t,n,r,i){let a=n||t,o=r||t,s=e.line(a,o),c=s.angle+(i?Math.PI:0),l=s.length*.2;return{x:t.x+Math.cos(c)*l,y:t.y+Math.sin(c)*l}}static bezierCommand(t,n,r){let i=e.controlPoint(r[n-1],r[n-2],t),a=e.controlPoint(t,r[n-1],r[n+1],!0);return`C ${i.x.toFixed(y)},${i.y.toFixed(y)} ${a.x.toFixed(y)},${a.y.toFixed(y)} ${t.x.toFixed(y)},${t.y.toFixed(y)}`}static toSvgData(t){return t.reduce((t,n,r,i)=>r===0?`M ${n.x.toFixed(y)},${n.y.toFixed(y)}`:`${t} ${e.bezierCommand(n,r,i)}`,``)}},k=class extends D{onStart(e){return this.el=this.createElement(`ellipse`),this.attr(`cx`,e.x),this.attr(`cy`,e.y),this.el}onMove(e){if(!this.el||!this.start)return!1;let[t,n]=_(e.x-this.start.x),[r,i]=_(e.y-this.start.y);if(this.shiftPressed){let e=Math.min(t,r);t=e,r=e}if(this.altPressed)this.attr(`cx`,this.start.x),this.attr(`cy`,this.start.y),this.attr(`rx`,t),this.attr(`ry`,r);else{let[e,a]=[this.start.x,this.start.x+t*n].sort(h),[o,s]=[this.start.y,this.start.y+r*i].sort(h);this.attr(`cx`,(e+a)/2),this.attr(`cy`,(o+s)/2),this.attr(`rx`,(a-e)/2),this.attr(`ry`,(s-o)/2)}return!0}onEnd(){let e=this.el;if(this.el=null,!e)return!1;try{if(!e.getTotalLength())return!1}catch{return!1}return!0}},A=class extends D{constructor(...e){super(...e),this.pathSubFactor=20,this.pathFragments=[],this._erased=[]}onSelected(e){let t=(e,n)=>{if(e&&e.length)for(let r=0;r<e.length;r++){let i=e[r];if(i.getTotalLength){let e=i.getTotalLength();for(let t=0;t<this.pathSubFactor;t++){let r=i.getPointAtLength(e*t/this.pathSubFactor),a=i.getPointAtLength(e*(t+1)/this.pathSubFactor);this.pathFragments.push({x1:r.x,x2:a.x,y1:r.y,y2:a.y,segment:t,element:n||i})}}else i.children&&t(i.children,i)}};e&&t(e.children)}onUnselected(){this.pathFragments=[]}onStart(e){this.svgPointPrevious=this.svgElement.createSVGPoint(),this.svgPointPrevious.x=e.x,this.svgPointPrevious.y=e.y}onMove(e){this.svgPointCurrent=this.svgElement.createSVGPoint(),this.svgPointCurrent.x=e.x,this.svgPointCurrent.y=e.y;let t=this.checkAndEraseElement();return this.svgPointPrevious=this.svgPointCurrent,t}onEnd(){this.svgPointPrevious=void 0,this.svgPointCurrent=void 0;let e=this._erased;return this._erased=[],{undo:()=>e.forEach(e=>this.drauu._restoreNode(e)),redo:()=>e.forEach(e=>this.drauu._removeNode(e))}}checkAndEraseElement(){if(this.pathFragments.length)for(let e=0;e<this.pathFragments.length;e++){let t=this.pathFragments[e];if(this.svgPointPrevious&&this.svgPointCurrent){let e={x1:this.svgPointPrevious.x,x2:this.svgPointCurrent.x,y1:this.svgPointPrevious.y,y2:this.svgPointCurrent.y};this.lineLineIntersect(t,e)&&(this.drauu._removeNode(t.element),this._erased.push(t.element))}}return this._erased.length&&(this.pathFragments=this.pathFragments.filter(e=>!this._erased.includes(e.element))),this._erased.length>0}lineLineIntersect(e,t){let n=e.x1,r=e.x2,i=t.x1,a=t.x2,o=e.y1,s=e.y2,c=t.y1,l=t.y2,u=(n-r)*(c-l)-(o-s)*(i-a),d=(n*s-o*r)*(i-a)-(n-r)*(i*l-c*a),f=(n*s-o*r)*(c-l)-(o-s)*(i*l-c*a),p=(e,t,n)=>e>=t&&e<=n||e>=n&&e<=t;if(u===0)return!1;{let e={x:d/u,y:f/u};return p(e.x,n,r)&&p(e.y,o,s)&&p(e.x,i,a)&&p(e.y,c,l)}}},j=class extends D{onStart(e){if(this.el=this.createElement(`line`,{fill:`transparent`}),this.attr(`x1`,e.x),this.attr(`y1`,e.y),this.attr(`x2`,e.x),this.attr(`y2`,e.y),this.brush.arrowEnd){let e=v(),t=document.createElementNS(`http://www.w3.org/2000/svg`,`g`);return t.append(b(e,this.brush.color)),t.append(this.el),this.attr(`marker-end`,`url(#${e})`),t}return this.el}onMove(e){if(!this.el)return!1;let{x:t,y:n}=e;if(this.shiftPressed){let r=e.x-this.start.x,i=e.y-this.start.y;if(i!==0){let e=r/i;e=Math.round(e),Math.abs(e)<=1?(t=this.start.x+i*e,n=this.start.y+i):(t=this.start.x+r,n=this.start.y)}}return this.altPressed?(this.attr(`x1`,this.start.x*2-t),this.attr(`y1`,this.start.y*2-n),this.attr(`x2`,t),this.attr(`y2`,n)):(this.attr(`x1`,this.start.x),this.attr(`y1`,this.start.y),this.attr(`x2`,t),this.attr(`y2`,n)),!0}onEnd(){let e=this.el;if(this.el=null,!e)return!1;try{if(e.getTotalLength()<5)return!1}catch{return!1}return!0}},M=class extends D{onStart(e){return this.el=this.createElement(`rect`),this.brush.cornerRadius&&(this.attr(`rx`,this.brush.cornerRadius),this.attr(`ry`,this.brush.cornerRadius)),this.attr(`x`,e.x),this.attr(`y`,e.y),this.el}onMove(e){if(!this.el||!this.start)return!1;let[t,n]=_(e.x-this.start.x),[r,i]=_(e.y-this.start.y);if(this.shiftPressed){let e=Math.min(t,r);t=e,r=e}if(this.altPressed)this.attr(`x`,this.start.x-t),this.attr(`y`,this.start.y-r),this.attr(`width`,t*2),this.attr(`height`,r*2);else{let[e,a]=[this.start.x,this.start.x+t*n].sort(h),[o,s]=[this.start.y,this.start.y+r*i].sort(h);this.attr(`x`,e),this.attr(`y`,o),this.attr(`width`,a-e),this.attr(`height`,s-o)}return!0}onEnd(){let e=this.el;if(this.el=null,!e)return!1;try{if(!e.getTotalLength())return!1}catch{return!1}return!0}};function N(e,t,n,r=e=>e){return e*r(.5-t*(.5-n))}function P(e){return[-e[0],-e[1]]}function F(e,t){return[e[0]+t[0],e[1]+t[1]]}function I(e,t){return[e[0]-t[0],e[1]-t[1]]}function L(e,t){return[e[0]*t,e[1]*t]}function R(e,t){return[e[0]/t,e[1]/t]}function z(e){return[e[1],-e[0]]}function B(e,t){return e[0]*t[0]+e[1]*t[1]}function V(e,t){return e[0]===t[0]&&e[1]===t[1]}function H(e){return Math.hypot(e[0],e[1])}function U(e){return e[0]*e[0]+e[1]*e[1]}function W(e,t){return U(I(e,t))}function G(e){return R(e,H(e))}function K(e,t){return Math.hypot(e[1]-t[1],e[0]-t[0])}function q(e,t,n){let r=Math.sin(n),i=Math.cos(n),a=e[0]-t[0],o=e[1]-t[1],s=a*i-o*r,c=a*r+o*i;return[s+t[0],c+t[1]]}function J(e,t,n){return F(e,L(I(t,e),n))}function Y(e,t,n){return F(e,L(t,n))}var{min:X,PI:Z}=Math,Q=.275,$=Z+1e-4;function ee(e,t={}){let{size:n=16,smoothing:r=.5,thinning:i=.5,simulatePressure:a=!0,easing:o=e=>e,start:s={},end:c={},last:l=!1}=t,{cap:u=!0,easing:d=e=>e*(2-e)}=s,{cap:f=!0,easing:p=e=>--e*e*e+1}=c;if(e.length===0||n<=0)return[];let m=e[e.length-1].runningLength,h=s.taper===!1?0:s.taper===!0?Math.max(n,m):s.taper,g=c.taper===!1?0:c.taper===!0?Math.max(n,m):c.taper,_=(n*r)**2,v=[],y=[],b=e.slice(0,10).reduce((e,t)=>{let r=t.pressure;if(a){let i=X(1,t.distance/n);r=X(1,e+(X(1,1-i)-e)*(i*Q))}return(e+r)/2},e[0].pressure),x=N(n,i,e[e.length-1].pressure,o),S,C=e[0].vector,w=e[0].point,T=w,E=w,D=T,O=!1;for(let t=0;t<e.length;t++){let{pressure:r}=e[t],{point:s,vector:c,distance:l,runningLength:u}=e[t];if(t<e.length-1&&m-u<3)continue;if(i){if(a){let e=X(1,l/n),t=X(1,1-e);r=X(1,b+(t-b)*(e*Q))}x=N(n,i,r,o)}else x=n/2;S===void 0&&(S=x);let f=u<h?d(u/h):1,k=m-u<g?p((m-u)/g):1;x=Math.max(.01,x*Math.min(f,k));let A=(t<e.length-1?e[t+1]:e[t]).vector,j=t<e.length-1?B(c,A):1,M=B(c,C)<0&&!O,P=j!==null&&j<0;if(M||P){let e=L(z(C),x);for(let t=0;t<=1;t+=.07692307692307693)E=q(I(s,e),s,$*t),v.push(E),D=q(F(s,e),s,$*-t),y.push(D);w=E,T=D,P&&(O=!0);continue}if(O=!1,t===e.length-1){let e=L(z(c),x);v.push(I(s,e)),y.push(F(s,e));continue}let R=L(z(J(A,c,j)),x);E=I(s,R),(t<=1||W(w,E)>_)&&(v.push(E),w=E),D=F(s,R),(t<=1||W(T,D)>_)&&(y.push(D),T=D),b=r,C=c}let k=e[0].point.slice(0,2),A=e.length>1?e[e.length-1].point.slice(0,2):F(e[0].point,[1,1]),j=[],M=[];if(e.length===1){if(!(h||g)||l){let e=Y(k,G(z(I(k,A))),-(S||x)),t=[];for(let n=1/13,r=n;r<=1;r+=n)t.push(q(e,k,$*2*r));return t}}else{if(!(h||g&&e.length===1)){if(u)for(let e=1/13,t=e;t<=1;t+=e){let e=q(y[0],k,$*t);j.push(e)}else{let e=I(v[0],y[0]),t=L(e,.5),n=L(e,.51);j.push(I(k,t),I(k,n),F(k,n),F(k,t))}}let t=z(P(e[e.length-1].vector));if(g||h&&e.length===1)M.push(A);else if(f){let e=Y(A,t,x);for(let t=1/29,n=t;n<1;n+=t)M.push(q(e,A,$*3*n))}else M.push(F(A,L(t,x)),F(A,L(t,x*.99)),I(A,L(t,x*.99)),I(A,L(t,x)))}return v.concat(M,y.reverse(),j)}function te(e,t={}){let{streamline:n=.5,size:r=16,last:i=!1}=t;if(e.length===0)return[];let a=.15+(1-n)*.85,o=Array.isArray(e[0])?e:e.map(({x:e,y:t,pressure:n=.5})=>[e,t,n]);if(o.length===2){let e=o[1];o=o.slice(0,-1);for(let t=1;t<5;t++)o.push(J(o[0],e,t/4))}o.length===1&&(o=[...o,[...F(o[0],[1,1]),...o[0].slice(2)]]);let s=[{point:[o[0][0],o[0][1]],pressure:o[0][2]>=0?o[0][2]:.25,vector:[1,1],distance:0,runningLength:0}],c=!1,l=0,u=s[0],d=o.length-1;for(let e=1;e<o.length;e++){let t=i&&e===d?o[e].slice(0,2):J(u.point,o[e],a);if(V(u.point,t))continue;let n=K(t,u.point);if(l+=n,e<d&&!c){if(l<r)continue;c=!0}u={point:t,pressure:o[e][2]>=0?o[e][2]:.5,vector:G(I(u.point,t)),distance:n,runningLength:l},s.push(u)}return s[0].vector=s[1]?.vector||[0,0],s}function ne(e,t={}){return ee(te(e,t),t)}var re=class e extends D{constructor(...e){super(...e),this.points=[]}onStart(e){return this.el=document.createElementNS(`http://www.w3.org/2000/svg`,`path`),this.points=[e],this.attr(`fill`,this.brush.color),this.attr(`d`,this.getSvgData(this.points)),this.el}onMove(e){return this.el||this.onStart(e),this.points[this.points.length-1]!==e&&this.points.push(e),this.attr(`d`,this.getSvgData(this.points)),!0}onEnd(){let e=this.el;return this.el=null,!!e}getSvgData(t){return e.getSvgData(t,this.brush)}static getSvgData(e,t){let n=ne(e,{size:t.size,thinning:.9,simulatePressure:!1,start:{taper:5},end:{taper:5},...t.stylusOptions});if(!n.length)return``;let r=n.reduce((e,[t,n],r,i)=>{let[a,o]=i[(r+1)%i.length];return e.push(t,n,(t+a)/2,(n+o)/2),e},[`M`,...n[0],`Q`]);return r.push(`Z`),r.map(e=>typeof e==`number`?e.toFixed(2):e).join(` `)}};function ie(e){return{draw:new O(e),stylus:new re(e),line:new j(e),rectangle:new M(e),ellipse:new k(e),eraseLine:new A(e)}}var ae=class{constructor(e={}){this.options=e,this.el=null,this.svgPoint=null,this.eventEl=null,this.shiftPressed=!1,this.altPressed=!1,this.drawing=!1,this._emitter=m(),this._originalPointerId=null,this._models=ie(this),this._opStack=[],this._opIndex=0,this._disposables=[],this._elements=[],this.options.brush||(this.options.brush={color:`black`,size:3,mode:`stylus`}),e.el&&this.mount(e.el,e.eventTarget,e.window)}get model(){return this._models[this.mode]}get mounted(){return!!this.el}get mode(){return this.options.brush.mode||`stylus`}set mode(e){this._models[this.mode].onUnselected(),this.options.brush.mode=e,this.model.onSelected(this.el)}get brush(){return this.options.brush}set brush(e){this.options.brush=e}resolveSelector(e){return typeof e==`string`?document.querySelector(e):e||null}mount(e,t,n=window){if(this.el)throw Error(`[drauu] already mounted, unmount previous target first`);if(this.el=this.resolveSelector(e),!this.el)throw Error(`[drauu] target element not found`);if(this.el.tagName.toLocaleLowerCase()!==`svg`)throw Error(`[drauu] can only mount to a SVG element`);if(!this.el.createSVGPoint)throw Error(`[drauu] SVG element must be create by document.createElementNS('http://www.w3.org/2000/svg', 'svg')`);this.svgPoint=this.el.createSVGPoint();let r=this.resolveSelector(t)||this.el,i=this.eventStart.bind(this),a=this.eventMove.bind(this),o=this.eventEnd.bind(this),s=this.eventKeyboard.bind(this),c=this.touchMove.bind(this);r.addEventListener(`pointerdown`,i,{passive:!1}),n.addEventListener(`pointermove`,a,{passive:!1}),n.addEventListener(`pointerup`,o,{passive:!1}),n.addEventListener(`pointercancel`,o,{passive:!1}),n.addEventListener(`keydown`,s,!1),n.addEventListener(`keyup`,s,!1),n.addEventListener(`touchmove`,c,{passive:!1}),this._disposables.push(()=>{r.removeEventListener(`pointerdown`,i),n.removeEventListener(`pointermove`,a),n.removeEventListener(`pointerup`,o),n.removeEventListener(`pointercancel`,o),n.removeEventListener(`keydown`,s,!1),n.removeEventListener(`keyup`,s,!1),n.removeEventListener(`touchmove`,c)}),this._emitter.emit(`mounted`)}unmount(){this._disposables.forEach(e=>e()),this._disposables.length=0,this._elements.length=0,this.el=null,this._emitter.emit(`unmounted`)}on(e,t){return this._emitter.on(e,t)}undo(){return!this.canUndo()||this.drawing?!1:(this._opStack[--this._opIndex].undo(),this._emitter.emit(`changed`),!0)}redo(){return!this.canRedo()||this.drawing?!1:(this._opStack[this._opIndex++].redo(),this._emitter.emit(`changed`),!0)}canRedo(){return this._opIndex<this._opStack.length}canUndo(){return this._opIndex>0}eventMove(e){!this.acceptsInput(e)||!this.drawing||this.model._eventMove(e)&&(e.stopPropagation(),e.preventDefault(),this._emitter.emit(`changed`))}eventStart(e){this.acceptsInput(e)&&(e.stopPropagation(),e.preventDefault(),this._currentNode&&this.cancel(),this.drawing=!0,this._originalPointerId=e.pointerId,this._emitter.emit(`start`),this._currentNode=this.model._eventDown(e),this._currentNode&&this.mode!==`eraseLine`&&this.el.appendChild(this._currentNode),this._emitter.emit(`changed`))}eventEnd(e){if(!this.acceptsInput(e)||!this.drawing)return;let t=this.model._eventUp(e);if(!t)this.cancel();else if(t===!0){let e=this._currentNode;e&&(this._appendNode(e),this.commit({undo:()=>this._removeNode(e),redo:()=>this._restoreNode(e)}))}else this.commit(t);this.drawing=!1,this._emitter.emit(`end`),this._emitter.emit(`changed`),this._originalPointerId=null}touchMove(e){Array.from(e.touches).some(e=>e.touchType===`stylus`&&e.identifier===this._originalPointerId)&&e.preventDefault()}acceptsInput(e){return(!this.options.acceptsInputTypes||this.options.acceptsInputTypes.includes(e.pointerType))&&!(this._originalPointerId&&this._originalPointerId!==e.pointerId)}eventKeyboard(e){(this.shiftPressed!==e.shiftKey||this.altPressed!==e.altKey)&&(this.shiftPressed=e.shiftKey,this.altPressed=e.altKey,this.model.point&&this.model.onMove(this.model.point)&&this._emitter.emit(`changed`))}commit(e){this._opStack.length=this._opIndex,this._opStack.push(e),this._opIndex++;let t=this._currentNode;this._currentNode=void 0,this._emitter.emit(`committed`,t)}clear(){this._opStack.length=0,this._opIndex=0,this._elements=[],this.cancel(),this.el.innerHTML=``,this._emitter.emit(`changed`)}cancel(){this._currentNode&&(this.el.removeChild(this._currentNode),this._currentNode=void 0,this._emitter.emit(`canceled`))}dump(){return this.el.innerHTML}load(e){this.clear(),this.el.innerHTML=e}_appendNode(e){let t=this._elements.at(-1);t?t.after(e):this.el.append(e);let n=this._elements.push(e)-1;e.dataset.drauu_index=n.toString()}_removeNode(e){e.remove(),this._elements[+e.dataset.drauu_index]=null}_restoreNode(e){let t=+e.dataset.drauu_index;this._elements[t]=e;for(let n=t-1;n>=0;n--){let t=this._elements[n];if(t){t.after(e);return}}this.el.prepend(e)}};function oe(e){return new ae(e)}var se=l(()=>{let{currentSlideNo:l,isPresenter:m}=s(),h=[`#ff595e`,`#ffca3a`,`#8ac926`,`#1982c4`,`#6a4c93`,`#ffffff`,`#000000`],g=u(`slidev-drawing-enabled`,!1),_=u(`slidev-drawing-pinned`,!1),v=u(`slidev-drawing-brush`,{color:h[0],size:4,mode:`stylus`}),y=n(!1),b=n(!1),x=n(!1),S=n(!1),C=n(`stylus`),w=r(()=>c.drawings.syncAll||m.value),T=!1,E=r({get(){return C.value},set(e){C.value=e,e===`arrow`?(O.mode=`line`,v.value.arrowEnd=!0):(O.mode=e,v.value.arrowEnd=!1)}}),D=i({brush:v,acceptsInputTypes:r(()=>g.value&&(!c.drawings.presenterOnly||m.value)?void 0:[`pen`]),coordinateTransform:!1}),O=a(oe(D));function k(){O.clear(),w.value&&f(l.value,``)}function A(){x.value=O.canRedo(),b.value=O.canUndo(),S.value=!!O.el?.children.length}function j(e){T=!0;let t=p[e||l.value];t==null?O.clear():O.load(t),A(),T=!1}return O.on(`changed`,()=>{if(A(),!T){let e=O.dump(),t=l.value;(p[t]||``)!==e&&w.value&&f(t,O.dump())}}),d(e=>{T=!0,e[l.value]!=null&&O.load(e[l.value]||``),T=!1,A()}),e(()=>{t(l,()=>{O.mounted&&j()},{immediate:!0})}),O.on(`start`,()=>y.value=!0),O.on(`end`,()=>y.value=!1),window.addEventListener(`keydown`,e=>{if(!g.value||o.value)return;let t=!e.ctrlKey&&!e.altKey&&!e.shiftKey&&!e.metaKey,n=!0;e.code===`KeyZ`&&(e.ctrlKey||e.metaKey)?e.shiftKey?O.redo():O.undo():e.code===`Escape`?g.value=!1:e.code===`KeyL`&&t?E.value=`line`:e.code===`KeyA`&&t?E.value=`arrow`:e.code===`KeyS`&&t?E.value=`stylus`:e.code===`KeyR`&&t?E.value=`rectangle`:e.code===`KeyE`&&t?E.value=`ellipse`:e.code===`KeyC`&&t?k():e.code.startsWith(`Digit`)&&t&&+e.code[5]<=h.length?v.value.color=h[e.code[5]-1]:n=!1,n&&(e.preventDefault(),e.stopPropagation())},!1),{brush:v,brushColors:h,canClear:S,canRedo:x,canUndo:b,clear:k,drauu:O,drauuOptions:D,drawingEnabled:g,drawingMode:E,drawingPinned:_,drawingState:p,isDrawing:y,loadCanvas:j}});export{se as t};
|
lecture-07/assets/useGenerative-DhxjRRg5.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
function e(e){let t=e>>>0||1;return()=>(t=Math.imul(t,1664525)+1013904223>>>0,t/2**32)}function t(t){let n=e(t),r=null;return()=>{if(r!==null){let e=r;return r=null,e}let e=0,t=0,i=0;do e=n()*2-1,t=n()*2-1,i=e*e+t*t;while(i===0||i>=1);let a=Math.sqrt(-2*Math.log(i)/i);return r=t*a,e*a}}var n=[1/3,1/3,1/3],r=[.2,.5,.3],i=[0,1,0],a=[0,0,1];function o(e){let t=e.reduce((e,t)=>e+t,0);return t>0?e.map(e=>e/t):e.map(()=>1/e.length)}function s(e,t){return e.map((e,n)=>e+t[n]>0?e/(e+t[n]):.5)}function c(e,t,n){let r=0;for(let i=0;i<e.length;i++)e[i]>0&&(r+=e[i]*Math.log(Math.max(n[i],1e-12))),t[i]>0&&(r+=t[i]*Math.log(Math.max(1-n[i],1e-12)));return r}function l(e,t){let n=0;for(let r=0;r<e.length;r++)if(!(e[r]<=0)){if(t[r]<=0)return 1/0;n+=e[r]*Math.log(e[r]/t[r])}return n}function u(e,t){let n=e.map((e,n)=>(e+t[n])/2);return(l(e,n)+l(t,n))/2}function d(e,t){return e.reduce((e,n,r)=>e+Math.abs(n-t[r]),0)/2}function f(e,t){let n=0,r=0,i=0;for(let a=0;a<e.length-1;a++)n+=e[a],r+=t[a],i+=Math.abs(n-r);return i}function p(e,t){let n=s(e,t),r=u(e,t);return{d:n,v:c(e,t,n),vTheory:-Math.log(4)+2*r,tv:d(e,t),klPQ:l(e,t),klQP:l(t,e),js:r,em:f(e,t)}}var m=[{x:-2.3,y:.75},{x:0,y:-1.05},{x:2.3,y:.75}],h=.3;function g(e=26,n=20260301){let r=t(n),i=[];for(let t of m)for(let n=0;n<e;n++)i.push({x:t.x+r()*h,y:t.y+r()*h});return i}function _(e){return{x:e*m[2].x,y:(m[2].y-m[1].y)*e*e+m[1].y}}function v(e){return e.x/m[2].x}function y(e){return _(v(e))}function b(e){return e.map(v)}function x(e,t=2){let n=[...e].sort((e,t)=>e-t);return n.slice(1).map((e,t)=>({mid:(e+n[t])/2,width:e-n[t]})).sort((e,t)=>t.width-e.width).slice(0,t).map(e=>e.mid)}function S(e,t){let n=e.map((e,t)=>({z:e,i:t})).sort((e,t)=>e.z-t.z),r=Array(e.length);for(let e=0;e<n.length;e++)r[n[e].i]=O((e+.5)/n.length);let i=Math.min(Math.max(t,0),1);return e.map((e,t)=>e*(1-i)+r[t]*i)}function C(e){return .4*Math.min(Math.max(e,0),1)}function w(e,t,n){let r=Math.min(Math.max(n,0),1);if(r<=0)return t;let i=k(t),a=Math.min(Math.max(Math.round(i*e.length-.5),0),e.length-1);return t*(1-r)+e[a]*r}function T(e,t,n){return _(w(e,t,n))}function E(e,t,n){let r=Math.max(t,.035);return n.map(t=>{let n=0;for(let i of e)n+=Math.exp(-((t-i)**2)/(2*r*r))/(r*Math.sqrt(2*Math.PI));return n/e.length})}function D(e,t,n=3.4,r=140){let i=Array.from({length:r},(e,t)=>-n+2*n*(t+.5)/r),a=2*n/r,o=E(e,t,i),s=o.reduce((e,t)=>e+t,0)*a,c=0;for(let e=0;e<r;e++){let t=o[e]*a/Math.max(s,1e-12);if(t<=0)continue;let n=Math.exp(-i[e]*i[e]/2)/Math.sqrt(2*Math.PI)*a;c+=t*Math.log(t/Math.max(n,1e-12))}return c}function O(e){let t=[-39.69683028665376,220.9460984245205,-275.9285104469687,138.357751867269,-30.66479806614716,2.506628277459239],n=[-54.47609879822406,161.5858368580409,-155.6989798598866,66.80131188771972,-13.28068155288572],r=[-.007784894002430293,-.3223964580411365,-2.400758277161838,-2.549732539343734,4.374664141464968,2.938163982698783],i=[.007784695709041462,.3224671290700398,2.445134137142996,3.754408661907416];if(e<.02425){let t=Math.sqrt(-2*Math.log(e));return(((((r[0]*t+r[1])*t+r[2])*t+r[3])*t+r[4])*t+r[5])/((((i[0]*t+i[1])*t+i[2])*t+i[3])*t+1)}if(e>.97575){let t=Math.sqrt(-2*Math.log(1-e));return-(((((r[0]*t+r[1])*t+r[2])*t+r[3])*t+r[4])*t+r[5])/((((i[0]*t+i[1])*t+i[2])*t+i[3])*t+1)}let a=e-.5,o=a*a;return(((((t[0]*o+t[1])*o+t[2])*o+t[3])*o+t[4])*o+t[5])*a/(((((n[0]*o+n[1])*o+n[2])*o+n[3])*o+n[4])*o+1)}function k(e){let t=1/(1+.2316419*Math.abs(e)),n=.3989422804014327*Math.exp(-e*e/2)*t*(.31938153+t*(-.356563782+t*(1.781477937+t*(-1.821255978+t*1.330274429))));return e>=0?1-n:n}function A(e=48,t=1e-4,n=.28){let r=[],i=[],a=1;for(let o=0;o<e;o++){let s=t+(n-t)*o/Math.max(e-1,1);r.push(s),a*=1-s,i.push(a)}return{beta:r,alphaBar:i,steps:e}}function j(e,t,n){let r=Math.sqrt(t),i=Math.sqrt(1-t);return{x:r*e.x+i*n.x,y:r*e.y+i*n.y}}function M(e,t,r=n){let i=Math.sqrt(t),a=t*h*h+(1-t),o=m.map((t,n)=>{let o=e.x-i*t.x,s=e.y-i*t.y;return Math.log(Math.max(r[n],1e-12))-(o*o+s*s)/(2*a)}),s=Math.max(...o),c=o.map(e=>Math.exp(e-s)),l=c.reduce((e,t)=>e+t,0),u=0,d=0;for(let t=0;t<m.length;t++){let n=c[t]/l;u+=n*(i*m[t].x-e.x)/a,d+=n*(i*m[t].y-e.y)/a}return{x:u,y:d}}function N(e,t,r,i){let a=M(e,t,n),o=M(e,t,n.map((e,t)=>+(t===r)));return{x:a.x+i*(o.x-a.x),y:a.y+i*(o.y-a.y)}}function P(e,t,n,r=M(e,t)){let i=Math.sqrt(1-t),a={x:-i*r.x,y:-i*r.y},o=Math.sqrt(t),s={x:(e.x-i*a.x)/o,y:(e.y-i*a.y)/o},c=Math.sqrt(n),l=Math.sqrt(1-n);return{x:c*s.x+l*a.x,y:c*s.y+l*a.y}}function F(e=48,n=5150){let r=t(n);return Array.from({length:e},()=>({x:r(),y:r()}))}function I(e,t,n){let r=(e-1)*n+t,i=Array.from({length:r},()=>Array(r).fill(0));for(let r=0;r<e;r++)for(let a=0;a<e;a++)for(let e=0;e<t;e++)for(let o=0;o<t;o++)i[r*n+e][a*n+o]+=1;let a=t-1,o=[];for(let e=a;e<r-a;e++)for(let t=a;t<r-a;t++)o.push(i[e][t]);let s=o.length?o:i.flat();return{outSize:r,counts:i,min:Math.min(...s),max:Math.max(...s),even:Math.min(...s)===Math.max(...s)}}export{F as C,t as E,p as S,S as T,C as _,r as a,P as b,T as c,b as d,x as f,D as g,o as h,i,j as l,A as m,n,E as o,M as p,a as r,_ as s,m as t,N as u,O as v,I as w,g as x,y};
|
lecture-07/assets/useNav-BmBHxIEh.js
ADDED
|
@@ -0,0 +1,194 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./md-BHmYh5BN.js","./modules/shiki-CJZsCeMT.js","./rolldown-runtime-hePW80VL.js","./modules/shiki-BrmBd2_v.css","./_plugin-vue_export-helper-BDNMzG2s.js","./slidev/context-DB-9afGB.js","./modules/vue-Dnfgf7Ad.js","./PixelImage-C1NqQXMF.js","./useGenerative-DhxjRRg5.js","./PixelImage-B6_BGQ53.css","./md-CYXxUBJM.css","./md-B-rbKkNj2.js","./FamilyGlyph-DyfZ67F0.js","./FamilyGlyph-BISpe5aU.css","./interactive-Co6Mxz4S.js","./DeckFooter-CA42hL2e.js","./slidev/client-Ct4Bq5Nz.js","./syncState-3Tc2ZArb.js","./index-DxDNFTAW.js","./index-BzbW-jWD.css","./useDrawings-vNWRit9P.js","./DeckFooter-B6vKMo6W.css","./interactive-D_LX0oud.css","./md-BV7tqBmU.css","./md-Bor3iz9q.js","./section-CqA-0pFf.js","./section-BZ9Dfv_4.css","./md-BuYGAREy.js","./default-CbJk4Idc.js","./default-DFJXHcku.css","./md-D05IaTUE.js","./slidev/VClicks-DhU7uhQr.js","./md-BTxAhWcd.js","./md-CjNK_7MS2.js","./md-CLhp5cP82.js","./md-B8Xf_xxY2.js","./PollSlide-BQgjKhm1.js","./PollSlide-C7CHIzYm.css","./md-DnHkYZkD.js","./md-ClXDOunI.js","./md-BSYdaJJ8.js","./md-C6-DPXKX.js","./AutoencoderLab-BLIx_rsl.js","./StepButton-BHTS1uiY.js","./StepButton-CHz-zeSD.css","./Plot2D-ifvwvNLG.js","./Plot2D-PnRWAKXa.css","./PlotLabel-BuFT7VP9.js","./PlotPoints-Cxs9FmbK.js","./PlotPoints-CnDINubi.css","./PlotCurve-BoqzCl1G.js","./AutoencoderLab-BPSflqHA.css","./md-NS-Q1t2f.js","./md-DYRgAUoh.js","./md-BMweE8ZU.js","./slidev/CodeBlockWrapper-CsMaG0t-.js","./modules/unplugin-icons-CStvVwzQ.js","./md-yOY-3n-w.js","./md-DOJgLGSO2.js","./md-CRPNBTPB.js","./Citation-CcKhBxpe.js","./Citation-rca7ok54.css","./md-Bkrwkt9n.js","./slidev/KaTexBlockWrapper-CffXlnxL.js","./md-DigAyt_G.js","./md-rssEntkL.js","./md-DOjqr7N9.js","./Slider-C2M0Z0oG.js","./Slider-BO0rW71G.css","./md-BqtlsPCt.css","./md-QIfMwpQ62.js","./md-D8MvwLj1.js","./md-CnDSOeCk.js","./md-Cvup-kiH.js","./md-BU9JcPc5.js","./md-ljxhKUuv.js","./md-DaOoBfG8.js","./md-CEGWPTw22.js","./md-kuKQbJzP2.js","./PlotLine-CUED7wZE.js","./md-BluvuKqb.js","./md-Bvn5xDZG2.js","./AdversarialGame-BqfAXE8Q.js","./AdversarialGame-CPtN5Ta6.css","./md-D1c0lDjX.js","./md-Cp8ONKRJ2.js","./md-CvzS0tH4.js","./md-DJLb3Q-T.js","./md-DRdwQ_MV.js","./md-zUivEl6R.js","./md-B9fZM9oI.js","./md-C6_XDzCW.js","./LinkCard-CuSkRmQ7.js","./LinkCard-DhZ23yU-.css","./md-BGlvn1lF.js","./md-DOzCcqi_.js","./md-B5LYSGvh.js","./md-DQlueVD9.css","./md-ByqZDNWS.js","./md-DqNt9ZMJ.js","./md-BpNKb0SE.js","./md-BIGss7Fk.js","./md-Dm9X0aOV.js","./md-DtWSzo2Z.css","./md-BKtPMZiA.js","./md-B7uy6-re.js","./md-BZDcmxkD.js","./md-Bh0cjVcV.js","./md-SdaKzabB.js","./md-DeHSIZPu.js","./md-CneeG9Dm.js","./md-BN7T8SWZ.js","./md-x8semzhy.js","./DiffusionLab-DwmASr7s.js","./DiffusionLab-CpbESuYa.css","./md-DZM4fHOc.js","./md-BuDboH9w.js","./md-B8u39oeg.js","./md-DvPvPHWd.js","./md-InVh52qX.js","./md-CIwCpV_y.js","./md-DV6J0ewt.js","./md-CDCWft8y.js","./md-CDeVVdp4.js","./md-Fb6ry1ve.css","./md-DQXi3jQd.js","./md-CS3xRmO_2.js","./md-bhIcPOOg2.js","./md-pOt_vjrb2.js","./md-P5G_dX8r2.js","./md-ZM8jUVcE2.js","./md-BDGHsd3U2.js","./md-CSRyO5NG2.js","./md-DWNNyx9R2.js","./md-CpQbu7lk2.js","./md-OwWkr7782.js","./md-DE2QGCpb.css"])))=>i.map(i=>d[i]);
|
| 2 |
+
import{B as e,Ct as t,P as n,R as r,T as i,Z as a,_ as o,at as s,b as c,dt as l,ft as u,g as d,ht as ee,k as f,lt as p,m as te,mt as m,vt as ne,w as re,y as ie,yt as ae,z as oe}from"./modules/shiki-CJZsCeMT.js";import{t as se}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{A as ce,B as le,D as ue,E as de,L as fe,V as pe,_ as me,a as he,c as ge,g as h,h as _e,j as ve,l as ye}from"./modules/vue-Dnfgf7Ad.js";import{l as be,y as xe}from"./slidev/context-DB-9afGB.js";function Se(e,t,n){return Math.min(n,Math.max(t,e))}function Ce(...e){return Te(e).reduce((e,t)=>e+t,0)}function we(e){return e??=[],Array.isArray(e)?e:[e]}function Te(e){return we(e).flat(1)}function Ee(e){return Array.from(new Set(e))}function De(...e){let t,n,r;e.length===1?(t=0,r=1,[n]=e):[t,n,r=1]=e;let i=[],a=t;for(;a<n;)i.push(a),a+=r||1;return i}function Oe(e){return e!=null}function ke(e,t){return Object.fromEntries(Object.entries(e).map(([e,n])=>t(e,n)).filter(Oe))}var g={theme:`dl2026`,title:`Generative Models and GANs`,titleTemplate:`%s - Slidev`,addons:[`dl2026`],remoteAssets:!1,monaco:!0,monacoTypesSource:`local`,monacoTypesAdditionalPackages:[],monacoTypesIgnorePackages:[],monacoRunAdditionalDeps:[],monacoRunUseStrict:!0,download:`./slides.pdf`,export:{},info:`<p>PGR207 Deep Learning 2026 — Lecture 07</p>
|
| 3 |
+
`,highlighter:`shiki`,twoslash:!0,lineNumbers:!1,colorSchema:`auto`,routerMode:`hash`,aspectRatio:1.7777777777777777,canvasWidth:980,exportFilename:``,selectable:!1,themeConfig:{courseCode:`PGR207`,lecture:`07`,lectureTitle:`Generative Models and GANs`},fonts:{sans:[`"Inter"`,`ui-sans-serif`,`system-ui`,`-apple-system`,`BlinkMacSystemFont`,`"Segoe UI"`,`Roboto`,`"Helvetica Neue"`,`Arial`,`"Noto Sans"`,`sans-serif`,`"Apple Color Emoji"`,`"Segoe UI Emoji"`,`"Segoe UI Symbol"`,`"Noto Color Emoji"`],serif:[`"Source Serif 4"`,`ui-serif`,`Georgia`,`Cambria`,`"Times New Roman"`,`Times`,`serif`],mono:[`"JetBrains Mono"`,`ui-monospace`,`SFMono-Regular`,`Menlo`,`Monaco`,`Consolas`,`"Liberation Mono"`,`"Courier New"`,`monospace`],webfonts:[`Inter`,`Source Serif 4`,`JetBrains Mono`],provider:`google`,local:[],italic:!1,weights:[`200`,`400`,`600`]},favicon:`https://cdn.jsdelivr.net/gh/slidevjs/slidev/assets/favicon.png`,drawings:{enabled:!0,persist:!1,presenterOnly:!1,syncAll:!0},plantUmlServer:`https://www.plantuml.com/plantuml`,codeCopy:!0,magicMoveCopy:!0,author:`Vajira Thambawita`,record:`dev`,css:`unocss`,presenter:!0,browserExporter:`dev`,htmlAttrs:{},transition:`slide-left`,editor:!0,mcp:!0,contextMenu:null,wakeLock:!0,pwa:!1,mdc:!0,comark:!1,seoMeta:{},notesAutoRuby:{},duration:`30min`,timer:`stopwatch`,magicMoveDuration:800,preloadImages:!0,clickAnimation:``,layout:`title`,courseCode:`PGR207`,lecture:`07`,email:`vajira@simula.no`,slidesTitle:`Generative Models and GANs - Slidev`},Ae=`build`,je=d(()=>g.aspectRatio),Me=d(()=>g.canvasWidth),Ne=d(()=>Math.ceil(Me.value/je.value)),Pe=d(()=>ke(g.themeConfig||{},(e,t)=>[`--slidev-theme-${e}`,t])),Fe=g.slidesTitle,Ie=`./#/`,Le=`modulepreload`,Re=function(e,t){return new URL(e,t).href},ze={},_=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=Re(t,n),t=s(t),t in ze)return;ze[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:Le,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})};function Be(e){if(e===!1||e===`false`)return null;if(e==null||e===!0||e===`true`)return`+1`;if(typeof e==`string`&&`+-`.includes(e[0]))return e;let t=+e;return Number.isNaN(t)?(console.error(`Invalid "at" prop value: ${e}`),null):t<=0?(console.warn(`[Slidev] "at" prop value must be greater than 0, but got ${e}, has been set to 1`),1):t}function Ve(e){return Array.isArray(e)?[Be(e[0]),Be(e[1])]:null}function He(e,t=0,n){let i=l(!1),a=new Map,o=new Map,c={get current(){return Se(+e.value,t,c.total)},set current(n){e.value=i.value?Se(n,t,c.total):n},clicksStart:t,get relativeSizeMap(){return a},get maxMap(){return o},get isMounted(){return i.value},setup(){r(()=>{i.value=!0,o=u(o),s(e)||(c.current=e.value)}),oe(()=>{i.value=!1,a=new Map,o=new Map})},calculateSince(e,t=1){let n=Be(e);if(n==null)return null;let r,i,a;if(typeof n==`string`){let e=c.currentOffset,o=+n;r=e+o,i=e+o+t-1,a=o+t-1}else r=n,i=n+t-1,a=0;return{start:r,end:1/0,max:i,delta:a,currentOffset:d(()=>c.current-r),isCurrent:d(()=>c.current===r),isActive:d(()=>c.current>=r)}},calculateRange(e){let t=Ve(e);if(t==null)return null;let[n,r]=t,i,a,o;return typeof n==`string`?(i=c.currentOffset+ +n,o=+n):(i=n,o=0),typeof r==`string`?(a=i+ +r,o+=+r):a=r,{start:i,end:a,max:a,delta:o,currentOffset:d(()=>c.current-i),isCurrent:d(()=>c.current===i),isActive:d(()=>i<=c.current&&c.current<a)}},calculate(e){return Array.isArray(e)?c.calculateRange(e):c.calculateSince(e)},register(e,t){if(!t)return;let{delta:n,max:r}=t;a.set(e,n),o.set(e,r)},unregister(e){a.delete(e),o.delete(e)},get currentOffset(){return Ce(...a.values())},get total(){return n??(i.value?Math.max(0,...o.values()):0)}};return c}function Ue(e,t=0){let n=e?.meta.slide?.frontmatter.clicksStart??0,r=l(Math.max(ne(t),n));return a(()=>ne(t),e=>{r.value=Math.max(e,n)}),He(r,n,e?.meta?.clicks)}var We=/[a-z]/i;function Ge(e){if(typeof e==`number`)return{seconds:e,relative:!1};let t=e.startsWith(`+`);t&&(e=e.slice(1));let n=0;if(e.includes(`:`)){let t=e.split(`:`).map(Number),r=0,i=0,a=0;if(t.length===3)r=t[0],i=t[1],a=t[2];else if(t.length===2)i=t[0],a=t[1];else if(t.length===1)a=t[0];else throw TypeError(`Invalid timestamp format`);if(Number.isNaN(r)||Number.isNaN(i)||Number.isNaN(a))throw TypeError(`Invalid timestamp format`);n=(r||0)*3600+(i||0)*60+(a||0)}else if(!We.test(e))n=Number(e);else{let t={s:1,sec:1,secs:1,m:60,min:60,mins:60,h:3600,hr:3600,hrs:3600,hour:3600,hours:3600,day:86400,days:86400,week:604800,weeks:604800,month:2629746,months:2629746,year:31556952,years:31556952},r=/([\d.]+)([a-z]+)/gi,i=e.matchAll(r);if(i)for(let e of i){let r=Number(e[1]);if(Number.isNaN(r))throw TypeError(`Invalid timestamp value: ${e[1]}`);let i=e[2].toLowerCase();if(!(i in t))throw TypeError(`Invalid timestamp unit: ${i}`);n+=r*t[i]}let a=e.replace(r,``).trim();if(a)throw TypeError(`Unknown timestamp remaining: ${a}`)}return{seconds:n,relative:t}}function Ke(e,t){if(!t||t===`all`||t===`*`)return De(1,e+1);if(t===`none`)return[];let n=[];for(let r of t.split(/[,;]/g))if(!r.includes(`-`))n.push(+r);else{let[t,i]=r.split(`-`,2);n.push(...De(+t,i?+i+1:e+1))}return Ee(n).filter(t=>t<=e).sort((e,t)=>e-t)}var qe={},Je={class:`px-4 py-10 text-center text-red-700 dark:text-red-500 font-bold font-mono`};function Ye(n,r){return e(),c(`div`,Je,t(`Failed to fetch this slide. Please check your network connection.`))}var v=se(qe,[[`render`,Ye]]),Xe={class:`h-full w-full flex items-center justify-center gap-2 slidev-slide-loading`},Ze=i({__name:`SlideLoading`,setup(t){let n=l(!1);return r(()=>{setTimeout(()=>{n.value=!0},200)}),(t,r)=>(e(),c(`div`,Xe,[n.value?(e(),c(te,{key:0},[r[0]||=o(`div`,{class:`i-svg-spinners-90-ring-with-bg text-xl`},null,-1),r[1]||=o(`div`,null,`Loading slide...`,-1)],64)):ie(`v-if`,!0)]))}}),y=p({theme:`dl2026`,addons:[`dl2026`],title:`Generative Models and GANs`,info:`PGR207 Deep Learning 2026 — Lecture 07`,author:`Vajira Thambawita`,routerMode:`hash`,transition:`slide-left`,mdc:!0,themeConfig:{courseCode:`PGR207`,lecture:`07`,lectureTitle:`Generative Models and GANs`},layout:`title`,courseCode:`PGR207`,lecture:`07`,email:`vajira@simula.no`}),Qe=u({get layout(){return y.layout},get transition(){return y.transition},get class(){return y.class},get clicks(){return y.clicks},get name(){return y.name},get preload(){return y.preload},slide:{content:``,revision:`ht1bj2`,frontmatterRaw:`theme: dl2026
|
| 4 |
+
addons:
|
| 5 |
+
- dl2026
|
| 6 |
+
title: Generative Models and GANs
|
| 7 |
+
info: PGR207 Deep Learning 2026 — Lecture 07
|
| 8 |
+
author: Vajira Thambawita
|
| 9 |
+
routerMode: hash
|
| 10 |
+
transition: slide-left
|
| 11 |
+
mdc: true
|
| 12 |
+
themeConfig:
|
| 13 |
+
courseCode: PGR207
|
| 14 |
+
lecture: "07"
|
| 15 |
+
lectureTitle: Generative Models and GANs
|
| 16 |
+
layout: title
|
| 17 |
+
courseCode: PGR207
|
| 18 |
+
lecture: "07"
|
| 19 |
+
email: vajira@simula.no
|
| 20 |
+
`,note:``,title:`Generative Models and GANs`,index:0,noteHTML:``,images:[],raw:``,frontmatter:y,filepath:``,start:0,sourceIndex:0,id:0,no:1},__clicksContext:null,__preloaded:!1}),b=p({layout:`interactive`,heading:`Where we are`,title:`Where we are`,"aside-width":`15rem`}),$e=u({get layout(){return b.layout},get transition(){return b.transition},get class(){return b.class},get clicks(){return b.clicks},get name(){return b.name},get preload(){return b.preload},slide:{content:``,revision:`-vd7vf4`,frontmatterRaw:`layout: interactive
|
| 21 |
+
heading: Where we are
|
| 22 |
+
title: Where we are
|
| 23 |
+
aside-width: 15rem
|
| 24 |
+
`,note:``,title:`Where we are`,index:1,noteHTML:``,images:[],raw:``,frontmatter:b,filepath:``,start:58,sourceIndex:1,id:1,no:2},__clicksContext:null,__preloaded:!1}),x=p({layout:`section`,index:`00`}),et=u({get layout(){return x.layout},get transition(){return x.transition},get class(){return x.class},get clicks(){return x.clicks},get name(){return x.name},get preload(){return x.preload},slide:{content:``,revision:`-3ujkua`,frontmatterRaw:`layout: section
|
| 25 |
+
index: "00"
|
| 26 |
+
`,note:``,title:`From recognising to creating`,level:1,index:2,noteHTML:``,images:[],raw:``,frontmatter:x,filepath:``,start:90,sourceIndex:2,id:2,no:3},__clicksContext:null,__preloaded:!1}),S=p({layout:`default`,title:`What a CNN already does`}),tt=u({get layout(){return S.layout},get transition(){return S.transition},get class(){return S.class},get clicks(){return S.clicks},get name(){return S.name},get preload(){return S.preload},slide:{content:``,revision:`-x7eyca`,frontmatterRaw:`layout: default
|
| 27 |
+
title: What a CNN already does
|
| 28 |
+
`,note:``,title:`What a CNN already does`,index:3,noteHTML:``,images:[],raw:``,frontmatter:S,filepath:``,start:114,sourceIndex:3,id:3,no:4},__clicksContext:null,__preloaded:!1}),C=p({layout:`default`,title:`Now make a real picture`}),nt=u({get layout(){return C.layout},get transition(){return C.transition},get class(){return C.class},get clicks(){return C.clicks},get name(){return C.name},get preload(){return C.preload},slide:{content:``,revision:`g9nji1`,frontmatterRaw:`layout: default
|
| 29 |
+
title: Now make a real picture
|
| 30 |
+
`,note:``,title:`Now make a real picture`,index:4,noteHTML:``,images:[],raw:``,frontmatter:C,filepath:``,start:181,sourceIndex:4,id:4,no:5},__clicksContext:null,__preloaded:!1}),w=p({layout:`default`,title:`Two kinds of model`}),rt=u({get layout(){return w.layout},get transition(){return w.transition},get class(){return w.class},get clicks(){return w.clicks},get name(){return w.name},get preload(){return w.preload},slide:{content:``,revision:`337q9`,frontmatterRaw:`layout: default
|
| 31 |
+
title: Two kinds of model
|
| 32 |
+
`,note:``,title:`Two kinds of model`,index:5,noteHTML:``,images:[],raw:``,frontmatter:w,filepath:``,start:253,sourceIndex:5,id:5,no:6},__clicksContext:null,__preloaded:!1}),T=p({layout:`default`,title:`The deal every model today makes`}),it=u({get layout(){return T.layout},get transition(){return T.transition},get class(){return T.class},get clicks(){return T.clicks},get name(){return T.name},get preload(){return T.preload},slide:{content:``,revision:`vxuc6a`,frontmatterRaw:`layout: default
|
| 33 |
+
title: The deal every model today makes
|
| 34 |
+
`,note:``,title:`The deal every model today makes`,index:6,noteHTML:``,images:[],raw:``,frontmatter:T,filepath:``,start:310,sourceIndex:6,id:6,no:7},__clicksContext:null,__preloaded:!1}),E=p({layout:`default`,title:`Which loss can you even compute?`}),at=u({get layout(){return E.layout},get transition(){return E.transition},get class(){return E.class},get clicks(){return E.clicks},get name(){return E.name},get preload(){return E.preload},slide:{content:``,revision:`hz3sfa`,frontmatterRaw:`layout: default
|
| 35 |
+
title: Which loss can you even compute?
|
| 36 |
+
`,note:``,title:`Which loss can you even compute?`,index:7,noteHTML:``,images:[],raw:``,frontmatter:E,filepath:``,start:389,sourceIndex:7,id:7,no:8},__clicksContext:null,__preloaded:!1}),D=p({layout:`default`}),ot=u({get layout(){return D.layout},get transition(){return D.transition},get class(){return D.class},get clicks(){return D.clicks},get name(){return D.name},get preload(){return D.preload},slide:{content:``,revision:`utesbm`,frontmatterRaw:`layout: default
|
| 37 |
+
`,note:``,index:8,noteHTML:``,images:[],raw:``,frontmatter:D,filepath:``,start:447,sourceIndex:8,id:8,no:9},__clicksContext:null,__preloaded:!1}),O=p({layout:`section`,index:`01`}),st=u({get layout(){return O.layout},get transition(){return O.transition},get class(){return O.class},get clicks(){return O.clicks},get name(){return O.name},get preload(){return O.preload},slide:{content:``,revision:`-7875ad`,frontmatterRaw:`layout: section
|
| 38 |
+
index: "01"
|
| 39 |
+
`,note:``,title:`Compress first: autoencoders`,level:1,index:9,noteHTML:``,images:[],raw:``,frontmatter:O,filepath:``,start:506,sourceIndex:9,id:9,no:10},__clicksContext:null,__preloaded:!1}),k=p({layout:`default`,title:`The autoencoder`}),ct=u({get layout(){return k.layout},get transition(){return k.transition},get class(){return k.class},get clicks(){return k.clicks},get name(){return k.name},get preload(){return k.preload},slide:{content:``,revision:`-xbj3u7`,frontmatterRaw:`layout: default
|
| 40 |
+
title: The autoencoder
|
| 41 |
+
`,note:``,title:`The autoencoder`,index:10,noteHTML:``,images:[],raw:``,frontmatter:k,filepath:``,start:530,sourceIndex:10,id:10,no:11},__clicksContext:null,__preloaded:!1}),A=p({layout:`default`,title:`How wide is the middle?`}),lt=u({get layout(){return A.layout},get transition(){return A.transition},get class(){return A.class},get clicks(){return A.clicks},get name(){return A.name},get preload(){return A.preload},slide:{content:``,revision:`-xnahs7`,frontmatterRaw:`layout: default
|
| 42 |
+
title: How wide is the middle?
|
| 43 |
+
`,note:``,title:`How wide is the middle?`,index:11,noteHTML:``,images:[],raw:``,frontmatter:A,filepath:``,start:588,sourceIndex:11,id:11,no:12},__clicksContext:null,__preloaded:!1}),j=p({layout:`interactive`,heading:`The bottleneck, and what it costs`,title:`The bottleneck, and what it costs`,"aside-width":`18rem`}),ut=u({get layout(){return j.layout},get transition(){return j.transition},get class(){return j.class},get clicks(){return j.clicks},get name(){return j.name},get preload(){return j.preload},slide:{content:``,revision:`lwikmy`,frontmatterRaw:`layout: interactive
|
| 44 |
+
heading: The bottleneck, and what it costs
|
| 45 |
+
title: The bottleneck, and what it costs
|
| 46 |
+
aside-width: 18rem
|
| 47 |
+
`,note:``,title:`The bottleneck, and what it costs`,index:12,noteHTML:``,images:[],raw:``,frontmatter:j,filepath:``,start:659,sourceIndex:12,id:12,no:13},__clicksContext:null,__preloaded:!1}),M=p({layout:`default`,title:`What autoencoders are actually for`}),dt=u({get layout(){return M.layout},get transition(){return M.transition},get class(){return M.class},get clicks(){return M.clicks},get name(){return M.name},get preload(){return M.preload},slide:{content:``,revision:`-sh9r4l`,frontmatterRaw:`layout: default
|
| 48 |
+
title: What autoencoders are actually for
|
| 49 |
+
`,note:``,title:`What autoencoders are actually for`,index:13,noteHTML:``,images:[],raw:``,frontmatter:M,filepath:``,start:697,sourceIndex:13,id:13,no:14},__clicksContext:null,__preloaded:!1}),N=p({layout:`interactive`,heading:`Now sample from it`,title:`Now sample from it`,"aside-width":`18rem`}),ft=u({get layout(){return N.layout},get transition(){return N.transition},get class(){return N.class},get clicks(){return N.clicks},get name(){return N.name},get preload(){return N.preload},slide:{content:``,revision:`tte643`,frontmatterRaw:`layout: interactive
|
| 50 |
+
heading: Now sample from it
|
| 51 |
+
title: Now sample from it
|
| 52 |
+
aside-width: 18rem
|
| 53 |
+
`,note:``,title:`Now sample from it`,index:14,noteHTML:``,images:[],raw:``,frontmatter:N,filepath:``,start:770,sourceIndex:14,id:14,no:15},__clicksContext:null,__preloaded:!1}),P=p({layout:`default`,title:`An autoencoder in PyTorch`}),pt=u({get layout(){return P.layout},get transition(){return P.transition},get class(){return P.class},get clicks(){return P.clicks},get name(){return P.name},get preload(){return P.preload},slide:{content:``,revision:`-7ppv85`,frontmatterRaw:`layout: default
|
| 54 |
+
title: An autoencoder in PyTorch
|
| 55 |
+
`,note:``,title:`An autoencoder in PyTorch`,index:15,noteHTML:``,images:[],raw:``,frontmatter:P,filepath:``,start:809,sourceIndex:15,id:15,no:16},__clicksContext:null,__preloaded:!1}),F=p({layout:`default`}),mt=u({get layout(){return F.layout},get transition(){return F.transition},get class(){return F.class},get clicks(){return F.clicks},get name(){return F.name},get preload(){return F.preload},slide:{content:``,revision:`lnxxm0`,frontmatterRaw:`layout: default
|
| 56 |
+
`,note:``,index:16,noteHTML:``,images:[],raw:``,frontmatter:F,filepath:``,start:871,sourceIndex:16,id:16,no:17},__clicksContext:null,__preloaded:!1}),I=p({layout:`section`,index:`02`}),ht=u({get layout(){return I.layout},get transition(){return I.transition},get class(){return I.class},get clicks(){return I.clicks},get name(){return I.name},get preload(){return I.preload},slide:{content:``,revision:`djb2r4`,frontmatterRaw:`layout: section
|
| 57 |
+
index: "02"
|
| 58 |
+
`,note:``,title:`Make the code behave: VAEs`,level:1,index:17,noteHTML:``,images:[],raw:``,frontmatter:I,filepath:``,start:931,sourceIndex:17,id:17,no:18},__clicksContext:null,__preloaded:!1}),L=p({layout:`default`,title:`Two changes, and only two`}),gt=u({get layout(){return L.layout},get transition(){return L.transition},get class(){return L.class},get clicks(){return L.clicks},get name(){return L.name},get preload(){return L.preload},slide:{content:``,revision:`z0twvw`,frontmatterRaw:`layout: default
|
| 59 |
+
title: Two changes, and only two
|
| 60 |
+
`,note:``,title:`Two changes, and only two`,index:18,noteHTML:``,images:[],raw:``,frontmatter:L,filepath:``,start:956,sourceIndex:18,id:18,no:19},__clicksContext:null,__preloaded:!1}),R=p({layout:`default`,title:`The objective, in two terms`}),_t=u({get layout(){return R.layout},get transition(){return R.transition},get class(){return R.class},get clicks(){return R.clicks},get name(){return R.name},get preload(){return R.preload},slide:{content:``,revision:`lm84ad`,frontmatterRaw:`layout: default
|
| 61 |
+
title: The objective, in two terms
|
| 62 |
+
`,note:``,title:`The objective, in two terms`,index:19,noteHTML:``,images:[],raw:``,frontmatter:R,filepath:``,start:1017,sourceIndex:19,id:19,no:20},__clicksContext:null,__preloaded:!1}),z=p({layout:`default`,title:`Reading the equation: the VAE loss`}),vt=u({get layout(){return z.layout},get transition(){return z.transition},get class(){return z.class},get clicks(){return z.clicks},get name(){return z.name},get preload(){return z.preload},slide:{content:``,revision:`jkhblc`,frontmatterRaw:`layout: default
|
| 63 |
+
title: "Reading the equation: the VAE loss"
|
| 64 |
+
`,note:``,title:`Reading the equation: the VAE loss`,index:20,noteHTML:``,images:[],raw:``,frontmatter:z,filepath:``,start:1092,sourceIndex:20,id:20,no:21},__clicksContext:null,__preloaded:!1}),B=p({layout:`default`,title:`You cannot backpropagate through a sample`}),yt=u({get layout(){return B.layout},get transition(){return B.transition},get class(){return B.class},get clicks(){return B.clicks},get name(){return B.name},get preload(){return B.preload},slide:{content:``,revision:`4v6l58`,frontmatterRaw:`layout: default
|
| 65 |
+
title: You cannot backpropagate through a sample
|
| 66 |
+
`,note:``,title:`You cannot backpropagate through a sample`,index:21,noteHTML:``,images:[],raw:``,frontmatter:B,filepath:``,start:1171,sourceIndex:21,id:21,no:22},__clicksContext:null,__preloaded:!1}),V=p({layout:`interactive`,heading:`What β buys, and what it costs`,title:`What β buys, and what it costs`,"aside-width":`19rem`}),bt=u({get layout(){return V.layout},get transition(){return V.transition},get class(){return V.class},get clicks(){return V.clicks},get name(){return V.name},get preload(){return V.preload},slide:{content:``,revision:`-os1gpw`,frontmatterRaw:`layout: interactive
|
| 67 |
+
heading: What β buys, and what it costs
|
| 68 |
+
title: What β buys, and what it costs
|
| 69 |
+
aside-width: 19rem
|
| 70 |
+
`,note:``,title:`What β buys, and what it costs`,index:22,noteHTML:``,images:[],raw:``,frontmatter:V,filepath:``,start:1239,sourceIndex:22,id:22,no:23},__clicksContext:null,__preloaded:!1}),H=p({layout:`default`,title:`Why VAE samples are soft`}),xt=u({get layout(){return H.layout},get transition(){return H.transition},get class(){return H.class},get clicks(){return H.clicks},get name(){return H.name},get preload(){return H.preload},slide:{content:``,revision:`gtpla9`,frontmatterRaw:`layout: default
|
| 71 |
+
title: Why VAE samples are soft
|
| 72 |
+
`,note:``,title:`Why VAE samples are soft`,index:23,noteHTML:``,images:[],raw:``,frontmatter:H,filepath:``,start:1275,sourceIndex:23,id:23,no:24},__clicksContext:null,__preloaded:!1}),U=p({layout:`default`,title:`A VAE in PyTorch`}),St=u({get layout(){return U.layout},get transition(){return U.transition},get class(){return U.class},get clicks(){return U.clicks},get name(){return U.name},get preload(){return U.preload},slide:{content:``,revision:`lmwk8k`,frontmatterRaw:`layout: default
|
| 73 |
+
title: A VAE in PyTorch
|
| 74 |
+
`,note:``,title:`A VAE in PyTorch`,index:24,noteHTML:``,images:[],raw:``,frontmatter:U,filepath:``,start:1319,sourceIndex:24,id:24,no:25},__clicksContext:null,__preloaded:!1}),W=p({layout:`section`,index:`03`}),Ct=u({get layout(){return W.layout},get transition(){return W.transition},get class(){return W.class},get clicks(){return W.clicks},get name(){return W.name},get preload(){return W.preload},slide:{content:``,revision:`cwqtrb`,frontmatterRaw:`layout: section
|
| 75 |
+
index: "03"
|
| 76 |
+
`,note:``,title:`The adversarial game`,level:1,index:25,noteHTML:``,images:[],raw:``,frontmatter:W,filepath:``,start:1371,sourceIndex:25,id:25,no:26},__clicksContext:null,__preloaded:!1}),G=p({layout:`default`,title:`Stop specifying the loss`}),wt=u({get layout(){return G.layout},get transition(){return G.transition},get class(){return G.class},get clicks(){return G.clicks},get name(){return G.name},get preload(){return G.preload},slide:{content:``,revision:`-od41i9`,frontmatterRaw:`layout: default
|
| 77 |
+
title: Stop specifying the loss
|
| 78 |
+
`,note:``,title:`Stop specifying the loss`,index:26,noteHTML:``,images:[],raw:``,frontmatter:G,filepath:``,start:1398,sourceIndex:26,id:26,no:27},__clicksContext:null,__preloaded:!1}),K=p({layout:`default`,title:`Two networks, opposite jobs`}),Tt=u({get layout(){return K.layout},get transition(){return K.transition},get class(){return K.class},get clicks(){return K.clicks},get name(){return K.name},get preload(){return K.preload},slide:{content:``,revision:`ifafr5`,frontmatterRaw:`layout: default
|
| 79 |
+
title: Two networks, opposite jobs
|
| 80 |
+
`,note:``,title:`Two networks, opposite jobs`,index:27,noteHTML:``,images:[],raw:``,frontmatter:K,filepath:``,start:1463,sourceIndex:27,id:27,no:28},__clicksContext:null,__preloaded:!1}),q=p({layout:`default`,title:`The value function`}),Et=u({get layout(){return q.layout},get transition(){return q.transition},get class(){return q.class},get clicks(){return q.clicks},get name(){return q.name},get preload(){return q.preload},slide:{content:``,revision:`-pm0e58`,frontmatterRaw:`layout: default
|
| 81 |
+
title: The value function
|
| 82 |
+
`,note:``,title:`The value function`,index:28,noteHTML:``,images:[],raw:``,frontmatter:q,filepath:``,start:1525,sourceIndex:28,id:28,no:29},__clicksContext:null,__preloaded:!1}),J=p({layout:`default`,title:`Reading the equation: the value function`}),Dt=u({get layout(){return J.layout},get transition(){return J.transition},get class(){return J.class},get clicks(){return J.clicks},get name(){return J.name},get preload(){return J.preload},slide:{content:``,revision:`-ndf5q4`,frontmatterRaw:`layout: default
|
| 83 |
+
title: "Reading the equation: the value function"
|
| 84 |
+
`,note:``,title:`Reading the equation: the value function`,index:29,noteHTML:``,images:[],raw:``,frontmatter:J,filepath:``,start:1588,sourceIndex:29,id:29,no:30},__clicksContext:null,__preloaded:!1}),Y=p({layout:`default`,title:`Freeze one, look at the other`}),Ot=u({get layout(){return Y.layout},get transition(){return Y.transition},get class(){return Y.class},get clicks(){return Y.clicks},get name(){return Y.name},get preload(){return Y.preload},slide:{content:``,revision:`ho3p02`,frontmatterRaw:`layout: default
|
| 85 |
+
title: Freeze one, look at the other
|
| 86 |
+
`,note:``,title:`Freeze one, look at the other`,index:30,noteHTML:``,images:[],raw:``,frontmatter:Y,filepath:``,start:1656,sourceIndex:30,id:30,no:31},__clicksContext:null,__preloaded:!1}),kt=p({layout:`default`,title:`The best discriminator that could exist`}),At=u({get layout(){return kt.layout},get transition(){return kt.transition},get class(){return kt.class},get clicks(){return kt.clicks},get name(){return kt.name},get preload(){return kt.preload},slide:{content:``,revision:`-uj9v8k`,frontmatterRaw:`layout: default
|
| 87 |
+
title: The best discriminator that could exist
|
| 88 |
+
`,note:``,title:`The best discriminator that could exist`,index:31,noteHTML:``,images:[],raw:``,frontmatter:kt,filepath:``,start:1717,sourceIndex:31,id:31,no:32},__clicksContext:null,__preloaded:!1}),jt=p({layout:`default`,title:`Reading the equation: the best discriminator`}),Mt=u({get layout(){return jt.layout},get transition(){return jt.transition},get class(){return jt.class},get clicks(){return jt.clicks},get name(){return jt.name},get preload(){return jt.preload},slide:{content:``,revision:`x2ac9x`,frontmatterRaw:`layout: default
|
| 89 |
+
title: "Reading the equation: the best discriminator"
|
| 90 |
+
`,note:``,title:`Reading the equation: the best discriminator`,index:32,noteHTML:``,images:[],raw:``,frontmatter:jt,filepath:``,start:1797,sourceIndex:32,id:32,no:33},__clicksContext:null,__preloaded:!1}),Nt=p({layout:`interactive`,heading:`D*, on three modes`,title:`D*, on three modes`,"aside-width":`18rem`}),Pt=u({get layout(){return Nt.layout},get transition(){return Nt.transition},get class(){return Nt.class},get clicks(){return Nt.clicks},get name(){return Nt.name},get preload(){return Nt.preload},slide:{content:``,revision:`-to2le`,frontmatterRaw:`layout: interactive
|
| 91 |
+
heading: D*, on three modes
|
| 92 |
+
title: D*, on three modes
|
| 93 |
+
aside-width: 18rem
|
| 94 |
+
`,note:``,title:`D*, on three modes`,index:33,noteHTML:``,images:[],raw:``,frontmatter:Nt,filepath:``,start:1853,sourceIndex:33,id:33,no:34},__clicksContext:null,__preloaded:!1}),Ft=p({layout:`default`,title:`Put D* back in`}),It=u({get layout(){return Ft.layout},get transition(){return Ft.transition},get class(){return Ft.class},get clicks(){return Ft.clicks},get name(){return Ft.name},get preload(){return Ft.preload},slide:{content:``,revision:`-6o40vz`,frontmatterRaw:`layout: default
|
| 95 |
+
title: Put D* back in
|
| 96 |
+
`,note:``,title:`Put D* back in`,index:34,noteHTML:``,images:[],raw:``,frontmatter:Ft,filepath:``,start:1893,sourceIndex:34,id:34,no:35},__clicksContext:null,__preloaded:!1}),Lt=p({layout:`default`,title:`Reading the equation: V at the best discriminator`}),Rt=u({get layout(){return Lt.layout},get transition(){return Lt.transition},get class(){return Lt.class},get clicks(){return Lt.clicks},get name(){return Lt.name},get preload(){return Lt.preload},slide:{content:``,revision:`-sq0i8g`,frontmatterRaw:`layout: default
|
| 97 |
+
title: "Reading the equation: V at the best discriminator"
|
| 98 |
+
`,note:``,title:`Reading the equation: V at the best discriminator`,index:35,noteHTML:``,images:[],raw:``,frontmatter:Lt,filepath:``,start:1971,sourceIndex:35,id:35,no:36},__clicksContext:null,__preloaded:!1}),zt=p({layout:`interactive`,heading:`The theorem, as a number`,title:`The theorem, as a number`,"aside-width":`18rem`}),Bt=u({get layout(){return zt.layout},get transition(){return zt.transition},get class(){return zt.class},get clicks(){return zt.clicks},get name(){return zt.name},get preload(){return zt.preload},slide:{content:``,revision:`i6ysec`,frontmatterRaw:`layout: interactive
|
| 99 |
+
heading: The theorem, as a number
|
| 100 |
+
title: The theorem, as a number
|
| 101 |
+
aside-width: 18rem
|
| 102 |
+
`,note:``,title:`The theorem, as a number`,index:36,noteHTML:``,images:[],raw:``,frontmatter:zt,filepath:``,start:2034,sourceIndex:36,id:36,no:37},__clicksContext:null,__preloaded:!1}),Vt=p({layout:`default`,title:`The four steps`}),Ht=u({get layout(){return Vt.layout},get transition(){return Vt.transition},get class(){return Vt.class},get clicks(){return Vt.clicks},get name(){return Vt.name},get preload(){return Vt.preload},slide:{content:``,revision:`-m7pvp6`,frontmatterRaw:`layout: default
|
| 103 |
+
title: The four steps
|
| 104 |
+
`,note:``,title:`The four steps`,index:37,noteHTML:``,images:[],raw:``,frontmatter:Vt,filepath:``,start:2076,sourceIndex:37,id:37,no:38},__clicksContext:null,__preloaded:!1}),Ut=p({layout:`default`,title:`The trick that makes it train`}),Wt=u({get layout(){return Ut.layout},get transition(){return Ut.transition},get class(){return Ut.class},get clicks(){return Ut.clicks},get name(){return Ut.name},get preload(){return Ut.preload},slide:{content:``,revision:`lzdcrb`,frontmatterRaw:`layout: default
|
| 105 |
+
title: The trick that makes it train
|
| 106 |
+
`,note:``,title:`The trick that makes it train`,index:38,noteHTML:``,images:[],raw:``,frontmatter:Ut,filepath:``,start:2129,sourceIndex:38,id:38,no:39},__clicksContext:null,__preloaded:!1}),Gt=p({layout:`default`,title:`The training loop`}),Kt=u({get layout(){return Gt.layout},get transition(){return Gt.transition},get class(){return Gt.class},get clicks(){return Gt.clicks},get name(){return Gt.name},get preload(){return Gt.preload},slide:{content:``,revision:`-jy3drx`,frontmatterRaw:`layout: default
|
| 107 |
+
title: The training loop
|
| 108 |
+
`,note:``,title:`The training loop`,index:39,noteHTML:``,images:[],raw:``,frontmatter:Gt,filepath:``,start:2195,sourceIndex:39,id:39,no:40},__clicksContext:null,__preloaded:!1}),qt=p({layout:`default`}),Jt=u({get layout(){return qt.layout},get transition(){return qt.transition},get class(){return qt.class},get clicks(){return qt.clicks},get name(){return qt.name},get preload(){return qt.preload},slide:{content:``,revision:`-xfsvoh`,frontmatterRaw:`layout: default
|
| 109 |
+
`,note:``,index:40,noteHTML:``,images:[],raw:``,frontmatter:qt,filepath:``,start:2263,sourceIndex:40,id:40,no:41},__clicksContext:null,__preloaded:!1}),Yt=p({layout:`default`,title:`Watch it happen`}),Xt=u({get layout(){return Yt.layout},get transition(){return Yt.transition},get class(){return Yt.class},get clicks(){return Yt.clicks},get name(){return Yt.name},get preload(){return Yt.preload},slide:{content:``,revision:`9shbwy`,frontmatterRaw:`layout: default
|
| 110 |
+
title: Watch it happen
|
| 111 |
+
`,note:``,title:`Watch it happen`,index:41,noteHTML:``,images:[],raw:``,frontmatter:Yt,filepath:``,start:2334,sourceIndex:41,id:41,no:42},__clicksContext:null,__preloaded:!1}),Zt=p({layout:`section`,index:`04`}),Qt=u({get layout(){return Zt.layout},get transition(){return Zt.transition},get class(){return Zt.class},get clicks(){return Zt.clicks},get name(){return Zt.name},get preload(){return Zt.preload},slide:{content:``,revision:`-9xh7uk`,frontmatterRaw:`layout: section
|
| 112 |
+
index: "04"
|
| 113 |
+
`,note:``,title:`Why GANs are hard`,level:1,index:42,noteHTML:``,images:[],raw:``,frontmatter:Zt,filepath:``,start:2394,sourceIndex:42,id:42,no:43},__clicksContext:null,__preloaded:!1}),$t=p({layout:`default`,title:`DCGAN — a CNN, run backwards`}),en=u({get layout(){return $t.layout},get transition(){return $t.transition},get class(){return $t.class},get clicks(){return $t.clicks},get name(){return $t.name},get preload(){return $t.preload},slide:{content:``,revision:`-vljpc`,frontmatterRaw:`layout: default
|
| 114 |
+
title: DCGAN — a CNN, run backwards
|
| 115 |
+
`,note:``,title:`DCGAN — a CNN, run backwards`,index:43,noteHTML:``,images:[],raw:``,frontmatter:$t,filepath:``,start:2421,sourceIndex:43,id:43,no:44},__clicksContext:null,__preloaded:!1}),tn=p({layout:`interactive`,heading:`Transposed convolution`,title:`Transposed convolution`,"aside-width":`18rem`}),nn=u({get layout(){return tn.layout},get transition(){return tn.transition},get class(){return tn.class},get clicks(){return tn.clicks},get name(){return tn.name},get preload(){return tn.preload},slide:{content:``,revision:`gedpsy`,frontmatterRaw:`layout: interactive
|
| 116 |
+
heading: Transposed convolution
|
| 117 |
+
title: Transposed convolution
|
| 118 |
+
aside-width: 18rem
|
| 119 |
+
`,note:``,title:`Transposed convolution`,index:44,noteHTML:``,images:[],raw:``,frontmatter:tn,filepath:``,start:2494,sourceIndex:44,id:44,no:45},__clicksContext:null,__preloaded:!1}),rn=p({layout:`default`,title:`The checkerboard, and what to do instead`}),an=u({get layout(){return rn.layout},get transition(){return rn.transition},get class(){return rn.class},get clicks(){return rn.clicks},get name(){return rn.name},get preload(){return rn.preload},slide:{content:``,revision:`76ma2c`,frontmatterRaw:`layout: default
|
| 120 |
+
title: The checkerboard, and what to do instead
|
| 121 |
+
`,note:``,title:`The checkerboard, and what to do instead`,index:45,noteHTML:``,images:[],raw:``,frontmatter:rn,filepath:``,start:2537,sourceIndex:45,id:45,no:46},__clicksContext:null,__preloaded:!1}),on=p({layout:`default`,title:`One more piece from week 4`}),sn=u({get layout(){return on.layout},get transition(){return on.transition},get class(){return on.class},get clicks(){return on.clicks},get name(){return on.name},get preload(){return on.preload},slide:{content:``,revision:`-ax93k4`,frontmatterRaw:`layout: default
|
| 122 |
+
title: One more piece from week 4
|
| 123 |
+
`,note:``,title:`One more piece from week 4`,index:46,noteHTML:``,images:[],raw:``,frontmatter:on,filepath:``,start:2582,sourceIndex:46,id:46,no:47},__clicksContext:null,__preloaded:!1}),cn=p({layout:`default`,title:`The failure that defines GANs`}),ln=u({get layout(){return cn.layout},get transition(){return cn.transition},get class(){return cn.class},get clicks(){return cn.clicks},get name(){return cn.name},get preload(){return cn.preload},slide:{content:``,revision:`-j1rjis`,frontmatterRaw:`layout: default
|
| 124 |
+
title: The failure that defines GANs
|
| 125 |
+
`,note:``,title:`The failure that defines GANs`,index:47,noteHTML:``,images:[],raw:``,frontmatter:cn,filepath:``,start:2644,sourceIndex:47,id:47,no:48},__clicksContext:null,__preloaded:!1}),un=p({layout:`default`,title:`Four ways to say two distributions differ`}),dn=u({get layout(){return un.layout},get transition(){return un.transition},get class(){return un.class},get clicks(){return un.clicks},get name(){return un.name},get preload(){return un.preload},slide:{content:``,revision:`1pgqhu`,frontmatterRaw:`layout: default
|
| 126 |
+
title: Four ways to say two distributions differ
|
| 127 |
+
`,note:``,title:`Four ways to say two distributions differ`,index:48,noteHTML:``,images:[],raw:``,frontmatter:un,filepath:``,start:2701,sourceIndex:48,id:48,no:49},__clicksContext:null,__preloaded:!1}),fn=p({layout:`interactive`,heading:`The measure decides what "worse" means`,title:`The measure decides what "worse" means`,"aside-width":`18rem`}),pn=u({get layout(){return fn.layout},get transition(){return fn.transition},get class(){return fn.class},get clicks(){return fn.clicks},get name(){return fn.name},get preload(){return fn.preload},slide:{content:``,revision:`cs60br`,frontmatterRaw:`layout: interactive
|
| 128 |
+
heading: The measure decides what "worse" means
|
| 129 |
+
title: The measure decides what "worse" means
|
| 130 |
+
aside-width: 18rem
|
| 131 |
+
`,note:``,title:`The measure decides what "worse" means`,index:49,noteHTML:``,images:[],raw:``,frontmatter:fn,filepath:``,start:2764,sourceIndex:49,id:49,no:50},__clicksContext:null,__preloaded:!1}),mn=p({layout:`default`,title:`Wasserstein, and what came after`}),hn=u({get layout(){return mn.layout},get transition(){return mn.transition},get class(){return mn.class},get clicks(){return mn.clicks},get name(){return mn.name},get preload(){return mn.preload},slide:{content:``,revision:`ogg35f`,frontmatterRaw:`layout: default
|
| 132 |
+
title: Wasserstein, and what came after
|
| 133 |
+
`,note:``,title:`Wasserstein, and what came after`,index:50,noteHTML:``,images:[],raw:``,frontmatter:mn,filepath:``,start:2805,sourceIndex:50,id:50,no:51},__clicksContext:null,__preloaded:!1}),gn=p({layout:`default`,title:`The zoo, and the six that mattered`}),_n=u({get layout(){return gn.layout},get transition(){return gn.transition},get class(){return gn.class},get clicks(){return gn.clicks},get name(){return gn.name},get preload(){return gn.preload},slide:{content:``,revision:`l4dyof`,frontmatterRaw:`layout: default
|
| 134 |
+
title: The zoo, and the six that mattered
|
| 135 |
+
`,note:``,title:`The zoo, and the six that mattered`,index:51,noteHTML:``,images:[],raw:``,frontmatter:gn,filepath:``,start:2873,sourceIndex:51,id:51,no:52},__clicksContext:null,__preloaded:!1}),vn=p({layout:`default`,title:`What this is actually used for`}),yn=u({get layout(){return vn.layout},get transition(){return vn.transition},get class(){return vn.class},get clicks(){return vn.clicks},get name(){return vn.name},get preload(){return vn.preload},slide:{content:``,revision:`zf2die`,frontmatterRaw:`layout: default
|
| 136 |
+
title: What this is actually used for
|
| 137 |
+
`,note:``,title:`What this is actually used for`,index:52,noteHTML:``,images:[],raw:``,frontmatter:vn,filepath:``,start:2927,sourceIndex:52,id:52,no:53},__clicksContext:null,__preloaded:!1}),bn=p({layout:`default`}),xn=u({get layout(){return bn.layout},get transition(){return bn.transition},get class(){return bn.class},get clicks(){return bn.clicks},get name(){return bn.name},get preload(){return bn.preload},slide:{content:``,revision:`-si2ezg`,frontmatterRaw:`layout: default
|
| 138 |
+
`,note:``,index:53,noteHTML:``,images:[],raw:``,frontmatter:bn,filepath:``,start:3003,sourceIndex:53,id:53,no:54},__clicksContext:null,__preloaded:!1}),Sn=p({layout:`section`,index:`05`}),Cn=u({get layout(){return Sn.layout},get transition(){return Sn.transition},get class(){return Sn.class},get clicks(){return Sn.clicks},get name(){return Sn.name},get preload(){return Sn.preload},slide:{content:``,revision:`ovue1t`,frontmatterRaw:`layout: section
|
| 139 |
+
index: "05"
|
| 140 |
+
`,note:``,title:`What replaced them: diffusion`,level:1,index:54,noteHTML:``,images:[],raw:``,frontmatter:Sn,filepath:``,start:3061,sourceIndex:54,id:54,no:55},__clicksContext:null,__preloaded:!1}),wn=p({layout:`default`,title:`Destroying an image is easy`}),Tn=u({get layout(){return wn.layout},get transition(){return wn.transition},get class(){return wn.class},get clicks(){return wn.clicks},get name(){return wn.name},get preload(){return wn.preload},slide:{content:``,revision:`-9wn2hp`,frontmatterRaw:`layout: default
|
| 141 |
+
title: Destroying an image is easy
|
| 142 |
+
`,note:``,title:`Destroying an image is easy`,index:55,noteHTML:``,images:[],raw:``,frontmatter:wn,filepath:``,start:3091,sourceIndex:55,id:55,no:56},__clicksContext:null,__preloaded:!1}),En=p({layout:`default`,title:`The forward process, in one step`}),Dn=u({get layout(){return En.layout},get transition(){return En.transition},get class(){return En.class},get clicks(){return En.clicks},get name(){return En.name},get preload(){return En.preload},slide:{content:``,revision:`-zrbop`,frontmatterRaw:`layout: default
|
| 143 |
+
title: The forward process, in one step
|
| 144 |
+
`,note:``,title:`The forward process, in one step`,index:56,noteHTML:``,images:[],raw:``,frontmatter:En,filepath:``,start:3152,sourceIndex:56,id:56,no:57},__clicksContext:null,__preloaded:!1}),On=p({layout:`default`,title:`Reading the equation: one-step noising`}),kn=u({get layout(){return On.layout},get transition(){return On.transition},get class(){return On.class},get clicks(){return On.clicks},get name(){return On.name},get preload(){return On.preload},slide:{content:``,revision:`-y638vd`,frontmatterRaw:`layout: default
|
| 145 |
+
title: "Reading the equation: one-step noising"
|
| 146 |
+
`,note:``,title:`Reading the equation: one-step noising`,index:57,noteHTML:``,images:[],raw:``,frontmatter:On,filepath:``,start:3212,sourceIndex:57,id:57,no:58},__clicksContext:null,__preloaded:!1}),An=p({layout:`interactive`,heading:`Forward — no network involved`,title:`Forward — no network involved`,"aside-width":`20rem`}),jn=u({get layout(){return An.layout},get transition(){return An.transition},get class(){return An.class},get clicks(){return An.clicks},get name(){return An.name},get preload(){return An.preload},slide:{content:``,revision:`-7llvoi`,frontmatterRaw:`layout: interactive
|
| 147 |
+
heading: Forward — no network involved
|
| 148 |
+
title: Forward — no network involved
|
| 149 |
+
aside-width: 20rem
|
| 150 |
+
`,note:``,title:`Forward — no network involved`,index:58,noteHTML:``,images:[],raw:``,frontmatter:An,filepath:``,start:3280,sourceIndex:58,id:58,no:59},__clicksContext:null,__preloaded:!1}),Mn=p({layout:`default`,title:`What the network is asked to do`}),Nn=u({get layout(){return Mn.layout},get transition(){return Mn.transition},get class(){return Mn.class},get clicks(){return Mn.clicks},get name(){return Mn.name},get preload(){return Mn.preload},slide:{content:``,revision:`y75990`,frontmatterRaw:`layout: default
|
| 151 |
+
title: What the network is asked to do
|
| 152 |
+
`,note:``,title:`What the network is asked to do`,index:59,noteHTML:``,images:[],raw:``,frontmatter:Mn,filepath:``,start:3321,sourceIndex:59,id:59,no:60},__clicksContext:null,__preloaded:!1}),Pn=p({layout:`default`,title:`Reading the equation: the denoising loss`}),Fn=u({get layout(){return Pn.layout},get transition(){return Pn.transition},get class(){return Pn.class},get clicks(){return Pn.clicks},get name(){return Pn.name},get preload(){return Pn.preload},slide:{content:``,revision:`p7mpnn`,frontmatterRaw:`layout: default
|
| 153 |
+
title: "Reading the equation: the denoising loss"
|
| 154 |
+
`,note:``,title:`Reading the equation: the denoising loss`,index:60,noteHTML:``,images:[],raw:``,frontmatter:Pn,filepath:``,start:3381,sourceIndex:60,id:60,no:61},__clicksContext:null,__preloaded:!1}),In=p({layout:`interactive`,heading:`Reverse — what the sampler follows`,title:`Reverse — what the sampler follows`,"aside-width":`20rem`}),Ln=u({get layout(){return In.layout},get transition(){return In.transition},get class(){return In.class},get clicks(){return In.clicks},get name(){return In.name},get preload(){return In.preload},slide:{content:``,revision:`-56uvw6`,frontmatterRaw:`layout: interactive
|
| 155 |
+
heading: Reverse — what the sampler follows
|
| 156 |
+
title: Reverse — what the sampler follows
|
| 157 |
+
aside-width: 20rem
|
| 158 |
+
`,note:``,title:`Reverse — what the sampler follows`,index:61,noteHTML:``,images:[],raw:``,frontmatter:In,filepath:``,start:3444,sourceIndex:61,id:61,no:62},__clicksContext:null,__preloaded:!1}),Rn=p({layout:`default`,title:`Three lines, and no adversary`}),zn=u({get layout(){return Rn.layout},get transition(){return Rn.transition},get class(){return Rn.class},get clicks(){return Rn.clicks},get name(){return Rn.name},get preload(){return Rn.preload},slide:{content:``,revision:`awrrla`,frontmatterRaw:`layout: default
|
| 159 |
+
title: Three lines, and no adversary
|
| 160 |
+
`,note:``,title:`Three lines, and no adversary`,index:62,noteHTML:``,images:[],raw:``,frontmatter:Rn,filepath:``,start:3484,sourceIndex:62,id:62,no:63},__clicksContext:null,__preloaded:!1}),Bn=p({layout:`default`,title:`The cost is at the other end`}),Vn=u({get layout(){return Bn.layout},get transition(){return Bn.transition},get class(){return Bn.class},get clicks(){return Bn.clicks},get name(){return Bn.name},get preload(){return Bn.preload},slide:{content:``,revision:`xl1hn0`,frontmatterRaw:`layout: default
|
| 161 |
+
title: The cost is at the other end
|
| 162 |
+
`,note:``,title:`The cost is at the other end`,index:63,noteHTML:``,images:[],raw:``,frontmatter:Bn,filepath:``,start:3540,sourceIndex:63,id:63,no:64},__clicksContext:null,__preloaded:!1}),Hn=p({layout:`default`,title:`How the prompt gets in`}),Un=u({get layout(){return Hn.layout},get transition(){return Hn.transition},get class(){return Hn.class},get clicks(){return Hn.clicks},get name(){return Hn.name},get preload(){return Hn.preload},slide:{content:``,revision:`-72kgvm`,frontmatterRaw:`layout: default
|
| 163 |
+
title: How the prompt gets in
|
| 164 |
+
`,note:``,title:`How the prompt gets in`,index:64,noteHTML:``,images:[],raw:``,frontmatter:Hn,filepath:``,start:3599,sourceIndex:64,id:64,no:65},__clicksContext:null,__preloaded:!1}),Wn=p({layout:`default`,title:`Pushing past the prompt`}),Gn=u({get layout(){return Wn.layout},get transition(){return Wn.transition},get class(){return Wn.class},get clicks(){return Wn.clicks},get name(){return Wn.name},get preload(){return Wn.preload},slide:{content:``,revision:`c5xie1`,frontmatterRaw:`layout: default
|
| 165 |
+
title: Pushing past the prompt
|
| 166 |
+
`,note:``,title:`Pushing past the prompt`,index:65,noteHTML:``,images:[],raw:``,frontmatter:Wn,filepath:``,start:3664,sourceIndex:65,id:65,no:66},__clicksContext:null,__preloaded:!1}),Kn=p({layout:`default`,title:`Reading the equation: guidance`}),qn=u({get layout(){return Kn.layout},get transition(){return Kn.transition},get class(){return Kn.class},get clicks(){return Kn.clicks},get name(){return Kn.name},get preload(){return Kn.preload},slide:{content:``,revision:`-sj9o`,frontmatterRaw:`layout: default
|
| 167 |
+
title: "Reading the equation: guidance"
|
| 168 |
+
`,note:``,title:`Reading the equation: guidance`,index:66,noteHTML:``,images:[],raw:``,frontmatter:Kn,filepath:``,start:3741,sourceIndex:66,id:66,no:67},__clicksContext:null,__preloaded:!1}),Jn=p({layout:`interactive`,heading:`The guidance slider`,title:`The guidance slider`,"aside-width":`19rem`}),Yn=u({get layout(){return Jn.layout},get transition(){return Jn.transition},get class(){return Jn.class},get clicks(){return Jn.clicks},get name(){return Jn.name},get preload(){return Jn.preload},slide:{content:``,revision:`-ofl7nq`,frontmatterRaw:`layout: interactive
|
| 169 |
+
heading: The guidance slider
|
| 170 |
+
title: The guidance slider
|
| 171 |
+
aside-width: 19rem
|
| 172 |
+
`,note:``,title:`The guidance slider`,index:67,noteHTML:``,images:[],raw:``,frontmatter:Jn,filepath:``,start:3806,sourceIndex:67,id:67,no:68},__clicksContext:null,__preloaded:!1}),Xn=p({layout:`default`,title:`Do it somewhere cheaper`}),Zn=u({get layout(){return Xn.layout},get transition(){return Xn.transition},get class(){return Xn.class},get clicks(){return Xn.clicks},get name(){return Xn.name},get preload(){return Xn.preload},slide:{content:``,revision:`-yprchn`,frontmatterRaw:`layout: default
|
| 173 |
+
title: Do it somewhere cheaper
|
| 174 |
+
`,note:``,title:`Do it somewhere cheaper`,index:68,noteHTML:``,images:[],raw:``,frontmatter:Xn,filepath:``,start:3852,sourceIndex:68,id:68,no:69},__clicksContext:null,__preloaded:!1}),Qn=p({layout:`default`,title:`What the denoiser is made of`}),$n=u({get layout(){return Qn.layout},get transition(){return Qn.transition},get class(){return Qn.class},get clicks(){return Qn.clicks},get name(){return Qn.name},get preload(){return Qn.preload},slide:{content:``,revision:`1cpel6`,frontmatterRaw:`layout: default
|
| 175 |
+
title: What the denoiser is made of
|
| 176 |
+
`,note:``,title:`What the denoiser is made of`,index:69,noteHTML:``,images:[],raw:``,frontmatter:Qn,filepath:``,start:3918,sourceIndex:69,id:69,no:70},__clicksContext:null,__preloaded:!1}),er=p({layout:`default`,title:`What actually gets trained in 2026`}),tr=u({get layout(){return er.layout},get transition(){return er.transition},get class(){return er.class},get clicks(){return er.clicks},get name(){return er.name},get preload(){return er.preload},slide:{content:``,revision:`bs9rjm`,frontmatterRaw:`layout: default
|
| 177 |
+
title: What actually gets trained in 2026
|
| 178 |
+
`,note:``,title:`What actually gets trained in 2026`,index:70,noteHTML:``,images:[],raw:``,frontmatter:er,filepath:``,start:3989,sourceIndex:70,id:70,no:71},__clicksContext:null,__preloaded:!1}),nr=p({layout:`default`}),rr=u({get layout(){return nr.layout},get transition(){return nr.transition},get class(){return nr.class},get clicks(){return nr.clicks},get name(){return nr.name},get preload(){return nr.preload},slide:{content:``,revision:`-1xmeqg`,frontmatterRaw:`layout: default
|
| 179 |
+
`,note:``,index:71,noteHTML:``,images:[],raw:``,frontmatter:nr,filepath:``,start:4058,sourceIndex:71,id:71,no:72},__clicksContext:null,__preloaded:!1}),ir=p({layout:`section`,index:`06`}),ar=u({get layout(){return ir.layout},get transition(){return ir.transition},get class(){return ir.class},get clicks(){return ir.clicks},get name(){return ir.name},get preload(){return ir.preload},slide:{content:``,revision:`-ukt8p4`,frontmatterRaw:`layout: section
|
| 180 |
+
index: "06"
|
| 181 |
+
`,note:``,title:`Choosing one`,level:1,index:72,noteHTML:``,images:[],raw:``,frontmatter:ir,filepath:``,start:4131,sourceIndex:72,id:72,no:73},__clicksContext:null,__preloaded:!1}),or=p({layout:`default`,title:`Five families, side by side`}),sr=u({get layout(){return or.layout},get transition(){return or.transition},get class(){return or.class},get clicks(){return or.clicks},get name(){return or.name},get preload(){return or.preload},slide:{content:``,revision:`tn5744`,frontmatterRaw:`layout: default
|
| 182 |
+
title: Five families, side by side
|
| 183 |
+
`,note:``,title:`Five families, side by side`,index:73,noteHTML:``,images:[],raw:``,frontmatter:or,filepath:``,start:4153,sourceIndex:73,id:73,no:74},__clicksContext:null,__preloaded:!1}),cr=p({layout:`default`,title:`How do you know it is any good?`}),lr=u({get layout(){return cr.layout},get transition(){return cr.transition},get class(){return cr.class},get clicks(){return cr.clicks},get name(){return cr.name},get preload(){return cr.preload},slide:{content:``,revision:`-65ku3n`,frontmatterRaw:`layout: default
|
| 184 |
+
title: How do you know it is any good?
|
| 185 |
+
`,note:``,title:`How do you know it is any good?`,index:74,noteHTML:``,images:[],raw:``,frontmatter:cr,filepath:``,start:4194,sourceIndex:74,id:74,no:75},__clicksContext:null,__preloaded:!1}),X=p({layout:`default`,title:`Where that leaves us`}),ur=u({get layout(){return X.layout},get transition(){return X.transition},get class(){return X.class},get clicks(){return X.clicks},get name(){return X.name},get preload(){return X.preload},slide:{content:``,revision:`-fus1el`,frontmatterRaw:`layout: default
|
| 186 |
+
title: Where that leaves us
|
| 187 |
+
`,note:``,title:`Where that leaves us`,index:75,noteHTML:``,images:[],raw:``,frontmatter:X,filepath:``,start:4275,sourceIndex:75,id:75,no:76},__clicksContext:null,__preloaded:!1}),dr=p({layout:`default`,title:`What comes with the capability`}),fr=u({get layout(){return dr.layout},get transition(){return dr.transition},get class(){return dr.class},get clicks(){return dr.clicks},get name(){return dr.name},get preload(){return dr.preload},slide:{content:``,revision:`-ca03vf`,frontmatterRaw:`layout: default
|
| 188 |
+
title: What comes with the capability
|
| 189 |
+
`,note:``,title:`What comes with the capability`,index:76,noteHTML:``,images:[],raw:``,frontmatter:dr,filepath:``,start:4343,sourceIndex:76,id:76,no:77},__clicksContext:null,__preloaded:!1}),pr=p({layout:`default`,title:`Reading, and the lab`}),mr=u({get layout(){return pr.layout},get transition(){return pr.transition},get class(){return pr.class},get clicks(){return pr.clicks},get name(){return pr.name},get preload(){return pr.preload},slide:{content:``,revision:`8xlda4`,frontmatterRaw:`layout: default
|
| 190 |
+
title: Reading, and the lab
|
| 191 |
+
`,note:``,title:`Reading, and the lab`,index:77,noteHTML:``,images:[],raw:``,frontmatter:pr,filepath:``,start:4412,sourceIndex:77,id:77,no:78},__clicksContext:null,__preloaded:!1}),hr=p({layout:`end`,email:`vajira@simula.no`,next:`GAN variants and applications`}),gr=u({get layout(){return hr.layout},get transition(){return hr.transition},get class(){return hr.class},get clicks(){return hr.clicks},get name(){return hr.name},get preload(){return hr.preload},slide:{content:``,revision:`1v0fs0`,frontmatterRaw:`layout: end
|
| 192 |
+
email: vajira@simula.no
|
| 193 |
+
next: GAN variants and applications
|
| 194 |
+
`,note:``,title:`To be continued…`,level:1,index:78,noteHTML:``,images:[],raw:``,frontmatter:hr,filepath:``,start:4480,sourceIndex:78,id:78,no:79},__clicksContext:null,__preloaded:!1}),Z=Array(79),Q=(e,t)=>re({loader:t,delay:300,loadingComponent:Ze,errorComponent:v,onError:t=>console.error(`Failed to load slide `+(e+1),t)}),_r=async()=>{try{return Z[0]??=await _(()=>import(`./md-BHmYh5BN.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},vr=async()=>{try{return Z[1]??=await _(()=>import(`./md-B-rbKkNj2.js`),__vite__mapDeps([11,1,2,3,4,5,6,12,13,14,15,16,17,18,19,20,21,22,23]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},yr=async()=>{try{return Z[2]??=await _(()=>import(`./md-Bor3iz9q.js`),__vite__mapDeps([24,1,2,3,5,6,12,4,13,25,26]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},br=async()=>{try{return Z[3]??=await _(()=>import(`./md-BuYGAREy.js`),__vite__mapDeps([27,1,2,3,5,6,7,4,8,9,28,15,16,17,18,19,20,21,29]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},xr=async()=>{try{return Z[4]??=await _(()=>import(`./md-D05IaTUE.js`),__vite__mapDeps([30,1,2,3,5,6,28,4,15,16,17,18,19,20,21,29,31]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Sr=async()=>{try{return Z[5]??=await _(()=>import(`./md-BTxAhWcd.js`),__vite__mapDeps([32,1,2,3,5,6,28,4,15,16,17,18,19,20,21,29]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Cr=async()=>{try{return Z[6]??=await _(()=>import(`./md-CjNK_7MS2.js`),__vite__mapDeps([33,1,2,3,5,6,7,4,8,9,28,15,16,17,18,19,20,21,29]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},wr=async()=>{try{return Z[7]??=await _(()=>import(`./md-CLhp5cP82.js`),__vite__mapDeps([34,1,2,3,5,6,12,4,13,28,15,16,17,18,19,20,21,29]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Tr=async()=>{try{return Z[8]??=await _(()=>import(`./md-B8Xf_xxY2.js`),__vite__mapDeps([35,1,2,3,5,6,7,4,8,9,28,15,16,17,18,19,20,21,29,36,31,37]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Er=async()=>{try{return Z[9]??=await _(()=>import(`./md-DnHkYZkD.js`),__vite__mapDeps([38,1,2,3,5,6,12,4,13,25,26]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Dr=async()=>{try{return Z[10]??=await _(()=>import(`./md-ClXDOunI.js`),__vite__mapDeps([39,1,2,3,5,6,7,4,8,9,28,15,16,17,18,19,20,21,29]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Or=async()=>{try{return Z[11]??=await _(()=>import(`./md-BSYdaJJ8.js`),__vite__mapDeps([40,1,2,3,5,6,28,4,15,16,17,18,19,20,21,29,31]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},kr=async()=>{try{return Z[12]??=await _(()=>import(`./md-C6-DPXKX.js`),__vite__mapDeps([41,1,2,3,5,6,31,18,17,19,42,4,8,43,44,45,46,47,48,49,50,51,14,15,16,20,21,22]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Ar=async()=>{try{return Z[13]??=await _(()=>import(`./md-NS-Q1t2f.js`),__vite__mapDeps([52,1,2,3,5,6,7,4,8,9,28,15,16,17,18,19,20,21,29,31]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},jr=async()=>{try{return Z[14]??=await _(()=>import(`./md-DYRgAUoh.js`),__vite__mapDeps([53,1,2,3,5,6,31,18,17,19,42,4,8,43,44,45,46,47,48,49,50,51,14,15,16,20,21,22]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Mr=async()=>{try{return Z[15]??=await _(()=>import(`./md-BMweE8ZU.js`),__vite__mapDeps([54,1,2,3,5,6,28,4,15,16,17,18,19,20,21,29,55,56]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Nr=async()=>{try{return Z[16]??=await _(()=>import(`./md-yOY-3n-w.js`),__vite__mapDeps([57,1,2,3,5,6,7,4,8,9,28,15,16,17,18,19,20,21,29,36,31,37]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Pr=async()=>{try{return Z[17]??=await _(()=>import(`./md-DOJgLGSO2.js`),__vite__mapDeps([58,1,2,3,5,6,12,4,13,25,26]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Fr=async()=>{try{return Z[18]??=await _(()=>import(`./md-CRPNBTPB.js`),__vite__mapDeps([59,1,2,3,5,6,28,4,15,16,17,18,19,20,21,29,60,61]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Ir=async()=>{try{return Z[19]??=await _(()=>import(`./md-Bkrwkt9n.js`),__vite__mapDeps([62,1,2,3,5,6,7,4,8,9,28,15,16,17,18,19,20,21,29,31,63]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Lr=async()=>{try{return Z[20]??=await _(()=>import(`./md-DigAyt_G.js`),__vite__mapDeps([64,1,2,3,5,6,28,4,15,16,17,18,19,20,21,29,31]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Rr=async()=>{try{return Z[21]??=await _(()=>import(`./md-rssEntkL.js`),__vite__mapDeps([65,1,2,3,5,6,28,4,15,16,17,18,19,20,21,29]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},zr=async()=>{try{return Z[22]??=await _(()=>import(`./md-DOjqr7N9.js`),__vite__mapDeps([66,1,2,3,4,5,6,8,31,18,17,19,43,44,45,46,48,49,14,15,16,20,21,22,67,68,69]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Br=async()=>{try{return Z[23]??=await _(()=>import(`./md-QIfMwpQ62.js`),__vite__mapDeps([70,1,2,3,5,6,7,4,8,9,28,15,16,17,18,19,20,21,29]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Vr=async()=>{try{return Z[24]??=await _(()=>import(`./md-D8MvwLj1.js`),__vite__mapDeps([71,1,2,3,5,6,7,4,8,9,28,15,16,17,18,19,20,21,29,55,56]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Hr=async()=>{try{return Z[25]??=await _(()=>import(`./md-CnDSOeCk.js`),__vite__mapDeps([72,1,2,3,5,6,12,4,13,25,26]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Ur=async()=>{try{return Z[26]??=await _(()=>import(`./md-Cvup-kiH.js`),__vite__mapDeps([73,1,2,3,5,6,7,4,8,9,28,15,16,17,18,19,20,21,29,31,60,61]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Wr=async()=>{try{return Z[27]??=await _(()=>import(`./md-BU9JcPc5.js`),__vite__mapDeps([74,1,2,3,5,6,7,4,8,9,28,15,16,17,18,19,20,21,29]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Gr=async()=>{try{return Z[28]??=await _(()=>import(`./md-ljxhKUuv.js`),__vite__mapDeps([75,1,2,3,5,6,7,4,8,9,28,15,16,17,18,19,20,21,29,63]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Kr=async()=>{try{return Z[29]??=await _(()=>import(`./md-DaOoBfG8.js`),__vite__mapDeps([76,1,2,3,5,6,28,4,15,16,17,18,19,20,21,29,31]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},qr=async()=>{try{return Z[30]??=await _(()=>import(`./md-CEGWPTw22.js`),__vite__mapDeps([77,1,2,3,5,6,28,4,15,16,17,18,19,20,21,29]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Jr=async()=>{try{return Z[31]??=await _(()=>import(`./md-kuKQbJzP2.js`),__vite__mapDeps([78,1,2,3,5,6,28,4,15,16,17,18,19,20,21,29,31,45,46,47,50,63,79]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Yr=async()=>{try{return Z[32]??=await _(()=>import(`./md-BluvuKqb.js`),__vite__mapDeps([80,1,2,3,5,6,28,4,15,16,17,18,19,20,21,29,31]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Xr=async()=>{try{return Z[33]??=await _(()=>import(`./md-Bvn5xDZG2.js`),__vite__mapDeps([81,1,2,3,5,6,31,18,17,19,14,4,15,16,20,21,22,82,8,43,44,67,68,83]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Zr=async()=>{try{return Z[34]??=await _(()=>import(`./md-D1c0lDjX.js`),__vite__mapDeps([84,1,2,3,5,6,28,4,15,16,17,18,19,20,21,29,31,63]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Qr=async()=>{try{return Z[35]??=await _(()=>import(`./md-Cp8ONKRJ2.js`),__vite__mapDeps([85,1,2,3,5,6,28,4,15,16,17,18,19,20,21,29,31]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},$r=async()=>{try{return Z[36]??=await _(()=>import(`./md-CvzS0tH4.js`),__vite__mapDeps([86,1,2,3,5,6,31,18,17,19,14,4,15,16,20,21,22,82,8,43,44,67,68,83]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},ei=async()=>{try{return Z[37]??=await _(()=>import(`./md-DJLb3Q-T.js`),__vite__mapDeps([87,1,2,3,5,6,7,4,8,9,28,15,16,17,18,19,20,21,29]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},ti=async()=>{try{return Z[38]??=await _(()=>import(`./md-DRdwQ_MV.js`),__vite__mapDeps([88,1,2,3,5,6,28,4,15,16,17,18,19,20,21,29,31,45,46,47,50,79]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},ni=async()=>{try{return Z[39]??=await _(()=>import(`./md-zUivEl6R.js`),__vite__mapDeps([89,1,2,3,5,6,28,4,15,16,17,18,19,20,21,29,55,56]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},ri=async()=>{try{return Z[40]??=await _(()=>import(`./md-B9fZM9oI.js`),__vite__mapDeps([90,1,2,3,5,6,28,4,15,16,17,18,19,20,21,29,36,31,37]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},ii=async()=>{try{return Z[41]??=await _(()=>import(`./md-C6_XDzCW.js`),__vite__mapDeps([91,1,2,3,5,6,28,4,15,16,17,18,19,20,21,29,92,93]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},ai=async()=>{try{return Z[42]??=await _(()=>import(`./md-BGlvn1lF.js`),__vite__mapDeps([94,1,2,3,5,6,12,4,13,25,26]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},oi=async()=>{try{return Z[43]??=await _(()=>import(`./md-DOzCcqi_.js`),__vite__mapDeps([95,1,2,3,5,6,7,4,8,9,28,15,16,17,18,19,20,21,29,60,61]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},si=async()=>{try{return Z[44]??=await _(()=>import(`./md-B5LYSGvh.js`),__vite__mapDeps([96,1,2,3,4,5,6,8,31,18,17,19,43,44,14,15,16,20,21,22,67,68,97]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},ci=async()=>{try{return Z[45]??=await _(()=>import(`./md-ByqZDNWS.js`),__vite__mapDeps([98,1,2,3,5,6,7,4,8,9,28,15,16,17,18,19,20,21,29,31,60,61]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},li=async()=>{try{return Z[46]??=await _(()=>import(`./md-DqNt9ZMJ.js`),__vite__mapDeps([99,1,2,3,5,6,28,4,15,16,17,18,19,20,21,29,31,45,46,47,50]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},ui=async()=>{try{return Z[47]??=await _(()=>import(`./md-BpNKb0SE.js`),__vite__mapDeps([100,1,2,3,5,6,7,4,8,9,28,15,16,17,18,19,20,21,29,31]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},di=async()=>{try{return Z[48]??=await _(()=>import(`./md-BIGss7Fk.js`),__vite__mapDeps([101,1,2,3,5,6,28,4,15,16,17,18,19,20,21,29]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},fi=async()=>{try{return Z[49]??=await _(()=>import(`./md-Dm9X0aOV.js`),__vite__mapDeps([102,1,2,3,4,5,6,8,31,18,17,19,43,44,14,15,16,20,21,22,103]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},pi=async()=>{try{return Z[50]??=await _(()=>import(`./md-BKtPMZiA.js`),__vite__mapDeps([104,1,2,3,5,6,28,4,15,16,17,18,19,20,21,29,31,45,46,47,48,49,50,60,61]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},mi=async()=>{try{return Z[51]??=await _(()=>import(`./md-B7uy6-re.js`),__vite__mapDeps([105,1,2,3,5,6,7,4,8,9,28,15,16,17,18,19,20,21,29,60,61]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},hi=async()=>{try{return Z[52]??=await _(()=>import(`./md-BZDcmxkD.js`),__vite__mapDeps([106,1,2,3,5,6,7,4,8,9,28,15,16,17,18,19,20,21,29,31]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},gi=async()=>{try{return Z[53]??=await _(()=>import(`./md-Bh0cjVcV.js`),__vite__mapDeps([107,1,2,3,5,6,7,4,8,9,28,15,16,17,18,19,20,21,29,36,31,37]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},_i=async()=>{try{return Z[54]??=await _(()=>import(`./md-SdaKzabB.js`),__vite__mapDeps([108,1,2,3,5,6,12,4,13,25,26]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},vi=async()=>{try{return Z[55]??=await _(()=>import(`./md-DeHSIZPu.js`),__vite__mapDeps([109,1,2,3,5,6,7,4,8,9,28,15,16,17,18,19,20,21,29,31,60,61]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},yi=async()=>{try{return Z[56]??=await _(()=>import(`./md-CneeG9Dm.js`),__vite__mapDeps([110,1,2,3,5,6,7,4,8,9,28,15,16,17,18,19,20,21,29,31,63]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},bi=async()=>{try{return Z[57]??=await _(()=>import(`./md-BN7T8SWZ.js`),__vite__mapDeps([111,1,2,3,5,6,28,4,15,16,17,18,19,20,21,29,31]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},xi=async()=>{try{return Z[58]??=await _(()=>import(`./md-x8semzhy.js`),__vite__mapDeps([112,1,2,3,5,6,31,18,17,19,14,4,15,16,20,21,22,113,8,43,44,45,46,48,49,67,68,79,114]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Si=async()=>{try{return Z[59]??=await _(()=>import(`./md-DZM4fHOc.js`),__vite__mapDeps([115,1,2,3,5,6,7,4,8,9,28,15,16,17,18,19,20,21,29,63]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Ci=async()=>{try{return Z[60]??=await _(()=>import(`./md-BuDboH9w.js`),__vite__mapDeps([116,1,2,3,5,6,28,4,15,16,17,18,19,20,21,29,31]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},wi=async()=>{try{return Z[61]??=await _(()=>import(`./md-B8u39oeg.js`),__vite__mapDeps([117,1,2,3,5,6,31,18,17,19,14,4,15,16,20,21,22,113,8,43,44,45,46,48,49,67,68,79,114]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Ti=async()=>{try{return Z[62]??=await _(()=>import(`./md-DvPvPHWd.js`),__vite__mapDeps([118,1,2,3,5,6,28,4,15,16,17,18,19,20,21,29,55,56]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Ei=async()=>{try{return Z[63]??=await _(()=>import(`./md-InVh52qX.js`),__vite__mapDeps([119,1,2,3,5,6,28,4,15,16,17,18,19,20,21,29,31]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Di=async()=>{try{return Z[64]??=await _(()=>import(`./md-CIwCpV_y.js`),__vite__mapDeps([120,1,2,3,5,6,7,4,8,9,28,15,16,17,18,19,20,21,29,31]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Oi=async()=>{try{return Z[65]??=await _(()=>import(`./md-DV6J0ewt.js`),__vite__mapDeps([121,1,2,3,5,6,28,4,15,16,17,18,19,20,21,29,31,60,61,63]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},ki=async()=>{try{return Z[66]??=await _(()=>import(`./md-CDCWft8y.js`),__vite__mapDeps([122,1,2,3,5,6,28,4,15,16,17,18,19,20,21,29,31]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Ai=async()=>{try{return Z[67]??=await _(()=>import(`./md-CDeVVdp4.js`),__vite__mapDeps([123,1,2,3,4,5,6,8,31,18,17,19,43,44,45,46,47,48,49,14,15,16,20,21,22,67,68,124]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},ji=async()=>{try{return Z[68]??=await _(()=>import(`./md-DQXi3jQd.js`),__vite__mapDeps([125,1,2,3,5,6,7,4,8,9,28,15,16,17,18,19,20,21,29,60,61]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Mi=async()=>{try{return Z[69]??=await _(()=>import(`./md-CS3xRmO_2.js`),__vite__mapDeps([126,1,2,3,5,6,28,4,15,16,17,18,19,20,21,29,31]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Ni=async()=>{try{return Z[70]??=await _(()=>import(`./md-bhIcPOOg2.js`),__vite__mapDeps([127,1,2,3,5,6,28,4,15,16,17,18,19,20,21,29]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Pi=async()=>{try{return Z[71]??=await _(()=>import(`./md-pOt_vjrb2.js`),__vite__mapDeps([128,1,2,3,5,6,28,4,15,16,17,18,19,20,21,29,36,31,37]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Fi=async()=>{try{return Z[72]??=await _(()=>import(`./md-P5G_dX8r2.js`),__vite__mapDeps([129,1,2,3,5,6,12,4,13,25,26]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Ii=async()=>{try{return Z[73]??=await _(()=>import(`./md-ZM8jUVcE2.js`),__vite__mapDeps([130,1,2,3,5,6,7,4,8,9,12,13,28,15,16,17,18,19,20,21,29]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Li=async()=>{try{return Z[74]??=await _(()=>import(`./md-BDGHsd3U2.js`),__vite__mapDeps([131,1,2,3,5,6,28,4,15,16,17,18,19,20,21,29,31,60,61]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Ri=async()=>{try{return Z[75]??=await _(()=>import(`./md-CSRyO5NG2.js`),__vite__mapDeps([132,1,2,3,5,6,12,4,13,28,15,16,17,18,19,20,21,29]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},zi=async()=>{try{return Z[76]??=await _(()=>import(`./md-DWNNyx9R2.js`),__vite__mapDeps([133,1,2,3,5,6,7,4,8,9,28,15,16,17,18,19,20,21,29,31]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Bi=async()=>{try{return Z[77]??=await _(()=>import(`./md-CpQbu7lk2.js`),__vite__mapDeps([134,1,2,3,5,6,7,4,8,9,28,15,16,17,18,19,20,21,29,92,93]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Vi=async()=>{try{return Z[78]??=await _(()=>import(`./md-OwWkr7782.js`),__vite__mapDeps([135,1,2,3,4,5,6,12,13,136]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Hi=[{no:1,meta:Qe,load:_r,component:Q(0,_r)},{no:2,meta:$e,load:vr,component:Q(1,vr)},{no:3,meta:et,load:yr,component:Q(2,yr)},{no:4,meta:tt,load:br,component:Q(3,br)},{no:5,meta:nt,load:xr,component:Q(4,xr)},{no:6,meta:rt,load:Sr,component:Q(5,Sr)},{no:7,meta:it,load:Cr,component:Q(6,Cr)},{no:8,meta:at,load:wr,component:Q(7,wr)},{no:9,meta:ot,load:Tr,component:Q(8,Tr)},{no:10,meta:st,load:Er,component:Q(9,Er)},{no:11,meta:ct,load:Dr,component:Q(10,Dr)},{no:12,meta:lt,load:Or,component:Q(11,Or)},{no:13,meta:ut,load:kr,component:Q(12,kr)},{no:14,meta:dt,load:Ar,component:Q(13,Ar)},{no:15,meta:ft,load:jr,component:Q(14,jr)},{no:16,meta:pt,load:Mr,component:Q(15,Mr)},{no:17,meta:mt,load:Nr,component:Q(16,Nr)},{no:18,meta:ht,load:Pr,component:Q(17,Pr)},{no:19,meta:gt,load:Fr,component:Q(18,Fr)},{no:20,meta:_t,load:Ir,component:Q(19,Ir)},{no:21,meta:vt,load:Lr,component:Q(20,Lr)},{no:22,meta:yt,load:Rr,component:Q(21,Rr)},{no:23,meta:bt,load:zr,component:Q(22,zr)},{no:24,meta:xt,load:Br,component:Q(23,Br)},{no:25,meta:St,load:Vr,component:Q(24,Vr)},{no:26,meta:Ct,load:Hr,component:Q(25,Hr)},{no:27,meta:wt,load:Ur,component:Q(26,Ur)},{no:28,meta:Tt,load:Wr,component:Q(27,Wr)},{no:29,meta:Et,load:Gr,component:Q(28,Gr)},{no:30,meta:Dt,load:Kr,component:Q(29,Kr)},{no:31,meta:Ot,load:qr,component:Q(30,qr)},{no:32,meta:At,load:Jr,component:Q(31,Jr)},{no:33,meta:Mt,load:Yr,component:Q(32,Yr)},{no:34,meta:Pt,load:Xr,component:Q(33,Xr)},{no:35,meta:It,load:Zr,component:Q(34,Zr)},{no:36,meta:Rt,load:Qr,component:Q(35,Qr)},{no:37,meta:Bt,load:$r,component:Q(36,$r)},{no:38,meta:Ht,load:ei,component:Q(37,ei)},{no:39,meta:Wt,load:ti,component:Q(38,ti)},{no:40,meta:Kt,load:ni,component:Q(39,ni)},{no:41,meta:Jt,load:ri,component:Q(40,ri)},{no:42,meta:Xt,load:ii,component:Q(41,ii)},{no:43,meta:Qt,load:ai,component:Q(42,ai)},{no:44,meta:en,load:oi,component:Q(43,oi)},{no:45,meta:nn,load:si,component:Q(44,si)},{no:46,meta:an,load:ci,component:Q(45,ci)},{no:47,meta:sn,load:li,component:Q(46,li)},{no:48,meta:ln,load:ui,component:Q(47,ui)},{no:49,meta:dn,load:di,component:Q(48,di)},{no:50,meta:pn,load:fi,component:Q(49,fi)},{no:51,meta:hn,load:pi,component:Q(50,pi)},{no:52,meta:_n,load:mi,component:Q(51,mi)},{no:53,meta:yn,load:hi,component:Q(52,hi)},{no:54,meta:xn,load:gi,component:Q(53,gi)},{no:55,meta:Cn,load:_i,component:Q(54,_i)},{no:56,meta:Tn,load:vi,component:Q(55,vi)},{no:57,meta:Dn,load:yi,component:Q(56,yi)},{no:58,meta:kn,load:bi,component:Q(57,bi)},{no:59,meta:jn,load:xi,component:Q(58,xi)},{no:60,meta:Nn,load:Si,component:Q(59,Si)},{no:61,meta:Fn,load:Ci,component:Q(60,Ci)},{no:62,meta:Ln,load:wi,component:Q(61,wi)},{no:63,meta:zn,load:Ti,component:Q(62,Ti)},{no:64,meta:Vn,load:Ei,component:Q(63,Ei)},{no:65,meta:Un,load:Di,component:Q(64,Di)},{no:66,meta:Gn,load:Oi,component:Q(65,Oi)},{no:67,meta:qn,load:ki,component:Q(66,ki)},{no:68,meta:Yn,load:Ai,component:Q(67,Ai)},{no:69,meta:Zn,load:ji,component:Q(68,ji)},{no:70,meta:$n,load:Mi,component:Q(69,Mi)},{no:71,meta:tr,load:Ni,component:Q(70,Ni)},{no:72,meta:rr,load:Pi,component:Q(71,Pi)},{no:73,meta:ar,load:Fi,component:Q(72,Fi)},{no:74,meta:sr,load:Ii,component:Q(73,Ii)},{no:75,meta:lr,load:Li,component:Q(74,Li)},{no:76,meta:ur,load:Ri,component:Q(75,Ri)},{no:77,meta:fr,load:zi,component:Q(76,zi)},{no:78,meta:mr,load:Bi,component:Q(77,Bi)},{no:79,meta:gr,load:Vi,component:Q(78,Vi)}],$=m(Hi);function Ui(e,t,{mode:r=`replace`}={}){let i=pe();return d({get(){let n=i.currentRoute.value.query[e];return n==null?t??null:Array.isArray(n)?n.filter(Boolean):n},set(a){n(()=>{(i.currentRoute.value.query[e]??t?.toString())!==a.toString()&&i[ae(r)]({query:{...i.currentRoute.value.query,[e]:`${a}`===t?void 0:a}})})}})}function Wi(e,t,n=!1){let r=e.meta.slide?.frontmatter.routeAlias??e.no;return n?`/export/${r}`:t?`/presenter/${r}`:`/${r}`}function Gi(e){return $.value.find(t=>t.no===+e||t.meta.slide?.frontmatter.routeAlias===e)}function Ki(e,t,n=!1){return(typeof e==`number`||typeof e==`string`)&&(e=Gi(e)),Wi(e,t,n)}var qi={"slide-left":`slide-left | slide-right`,"slide-right":`slide-right | slide-left`,"slide-up":`slide-up | slide-down`,"slide-down":`slide-down | slide-up`};function Ji(e,t=!1){if(!e||(typeof e==`string`&&(e={name:e}),!e.name))return;let n=e.name.includes(`|`)?e.name:qi[e.name]||e.name;if(n.includes(`|`)){let[e,r]=n.split(`|`).map(e=>e.trim());n=t?r:e}if(n)return{...e,name:n}}function Yi(e,t,n){let r=e>0?n?.meta?.transition:t?.meta?.transition;return r||=g.transition||void 0,Ji(r,e<0)}var Xi=l(!1),Zi=l(!1),Qi=l(!1),$i=l(!1),ea=l(!1),ta=l(!1),na=l(!0),ra=p(new Set),ia=d(()=>ra.size>0),aa=ye({xs:460,...he}),oa=de(),sa=me(),ca=d(()=>oa.height.value-oa.width.value/je.value>120),la=_e(ve?document.body:null),ua=ge(),da=d(()=>[`INPUT`,`TEXTAREA`].includes(ua.value?.tagName||``)),fa=d(()=>[`BUTTON`,`A`].includes(ua.value?.tagName||``));h(`slidev-camera`,`default`,{listenToStorageChanges:!1}),h(`slidev-mic`,`default`,{listenToStorageChanges:!1});var pa=h(`slidev-scale`,0),ma=h(`slidev-wake-lock`,!0),ha=h(`slidev-hide-cursor-idle`,!0);h(`slidev-skip-export-pdf-tip`,!1),h(`slidev-export-capture-delay`,400,{listenToStorageChanges:!1});var ga=h(`slidev-presenter-cursor`,!0,{listenToStorageChanges:!1}),_a=h(`slidev-cursor-style`,`cursor`,{listenToStorageChanges:!1});function va(){ga.value=!ga.value}var ya=h(`slidev-show-editor`,!1,{listenToStorageChanges:!1}),ba=h(`slidev-editor-vertical`,!1,{listenToStorageChanges:!1}),xa=h(`slidev-editor-width`,ve?window.innerWidth*.4:318,{listenToStorageChanges:!1}),Sa=h(`slidev-editor-height`,ve?window.innerHeight*.4:300,{listenToStorageChanges:!1}),Ca=m(null),wa=h(`slidev-presenter-font-size`,1,{listenToStorageChanges:!1}),Ta=h(`slidev-presenter-layout`,1,{listenToStorageChanges:!1}),Ea={invert:!1,contrast:1,brightness:1,hueRotate:0,saturate:1,sepia:0},Da=h(`slidev-viewer-css-filter`,Ea,{listenToStorageChanges:!1,mergeDefaults:!0,deep:!0}),Oa=d(()=>Object.keys(Ea).some(e=>Da.value[e]!==Ea[e]));function ka(){Ta.value+=1,Ta.value>3&&(Ta.value=1)}function Aa(){wa.value=Math.min(2,wa.value+.1)}function ja(){wa.value=Math.max(.5,wa.value-.1)}var Ma=fe($i),Na=h(`slidev-sync-directions`,{viewerSend:!0,viewerReceive:!0,presenterSend:!0,presenterReceive:!0},{listenToStorageChanges:!1,mergeDefaults:!0});function Pa(e,t,n=1){let r=t.meta.slide.level??n;r&&r>n&&e.length>0?Pa(e[e.length-1].children,t,n+1):e.push({no:t.no,children:[],level:n,titleLevel:r,path:Ki(t.meta.slide?.frontmatter?.routeAlias??t.no,!1),hideInToc:!!t.meta?.slide?.frontmatter?.hideInToc,title:t.meta?.slide?.title})}function Fa(e,t,n=!1,r,i){return e.map(e=>{let a={...e,active:e.no===i?.value,hasActiveParent:n};return a.children.length>0&&(a.children=Fa(a.children,t,a.active||a.hasActiveParent,a,i)),r&&(a.active||a.activeParent)&&(r.activeParent=!0),a})}function Ia(e,t=1){return e.filter(e=>!e.hideInToc).map(e=>({...e,children:Ia(e.children,t+1)}))}function La(e,t,n){let r=d(()=>e.value.filter(e=>e.meta?.slide?.title).reduce((e,t)=>(Pa(e,t),e),[])),i=d(()=>Fa(r.value,n.value,void 0,void 0,t));return d(()=>Ia(i.value))}function Ra(e,t,n=l(0),r,i,o){let s=d(()=>$.value.length),c=l(0),u=l(0),ee=d(()=>Ki(e.value,r.value)),f=d(()=>e.value.no),p=d(()=>e.value.meta?.layout||(f.value===1?`cover`:`default`)),te=d(()=>e.value.meta.slide.frontmatter),m=d(()=>t.value.current),ne=d(()=>t.value.clicksStart),re=d(()=>t.value.total),ie=d(()=>$.value[Math.min($.value.length,f.value+1)-1]),ae=d(()=>$.value[Math.max(1,f.value-1)-1]),oe=d(()=>f.value<$.value.length||m.value<re.value),se=d(()=>f.value>1||m.value>0),ce=d(()=>i.value?void 0:Yi(c.value,e.value,ae.value));a(e,(e,t)=>{c.value=e.no-t.no});async function le(e){return!1}let ue=La($,f,e);async function de(){u.value=1,re.value<=n.value?await pe():n.value+=1}async function fe(){u.value=-1,n.value<=ne.value?await me(!0):--n.value}async function pe(e=!1){u.value=1,f.value<$.value.length&&await h(f.value+1,e&&!i.value?be:void 0)}async function me(e=!1){u.value=-1,f.value>1&&await h(f.value-1,e&&!i.value?be:void 0)}function he(){return h(1)}function ge(){return h(s.value)}async function h(e,t=0,i=!1){ea.value=!1;let a=f.value!==e,s=t!==n.value,c=Gi(e)?.meta,l=c?.slide?.frontmatter.clicksStart??0;t=Se(t,l,c?.__clicksContext?.total??999999),(i||a||s)&&await o?.push({path:Ki(e,r.value,o.currentRoute.value.name===`export`),query:{...o.currentRoute.value.query,clicks:t===0?void 0:t.toString(),embedded:location.search.includes(`embedded`)?`true`:void 0}})}function _e(){o?.push({path:Ki(f.value,!0),query:{...o.currentRoute.value.query}})}function ve(){o?.push({path:Ki(f.value,!1),query:{...o.currentRoute.value.query}})}return{slides:$,total:s,currentPath:ee,currentSlideNo:f,currentPage:f,currentSlideRoute:e,currentLayout:p,currentFrontmatter:te,currentTransition:ce,clicksDirection:u,nextRoute:ie,prevRoute:ae,clicksContext:t,clicks:m,clicksStart:ne,clicksTotal:re,hasNext:oe,hasPrev:se,tocTree:ue,navDirection:c,openInEditor:le,next:de,prev:fe,go:h,goLast:ge,goFirst:he,nextSlide:pe,prevSlide:me,enterPresenter:_e,exitPresenter:ve}}var za=ue(()=>{let e=pe(),t=le(),n=d(()=>(e?.currentRoute?.value?.query,new URLSearchParams(location.search))),r=d(()=>n.value.has(`print`)||t.name===`export`),i=l(n.value.get(`print`)===`clicks`),a=d(()=>n.value.has(`embedded`)),o=d(()=>t.name===`play`),s=d(()=>t.name===`presenter`),c=d(()=>t.name===`notes`),u=d(()=>!s.value&&(!g.remote||n.value.get(`password`)===g.remote)),ee=d(()=>!!t.params.no),f=d(()=>ee.value?Gi(t.params.no)?.no??1:1),p=d(()=>$.value[f.value-1]),te=l(Ke($.value.length,t?.query?.range)),m=Ui(`clicks`,`0`),ne=d(()=>ie(p.value)),re=d({get(){let e=+(m.value||0);return Number.isNaN(e)&&(e=0),e},set(e){ea.value=!1,m.value=e.toString()}});function ie(e){if(e?.meta?.__clicksContext)return e.meta.__clicksContext;let t=e.no,n=He(d({get(){return f.value===t?Math.max(+(m.value??0),n.clicksStart):f.value>t?be:n.clicksStart},set(e){f.value===t&&(m.value=e.toString())}}),e?.meta.slide?.frontmatter.clicksStart??0,e?.meta.clicks);return e?.meta&&(e.meta.__clicksContext=n),n}return{router:e,currentRoute:d(()=>t),isPrintMode:r,isPrintWithClicks:i,isEmbedded:a,isPlaying:o,isPresenter:s,isNotesViewer:c,isPresenterAvailable:u,hasPrimarySlide:ee,currentSlideNo:f,currentSlideRoute:p,clicksContext:ne,queryClicksRaw:m,queryClicks:re,printRange:te,getPrimaryClicks:ie}}),Ba=ue(()=>{let e=za(),t=pe(),n=Ra(e.currentSlideRoute,e.clicksContext,e.queryClicks,e.isPresenter,e.isPrintMode,t);return a([n.total,e.currentRoute],async()=>{let t=e.currentRoute.value.params.no;e.hasPrimarySlide.value&&!Gi(t)&&(t&&t!==`index.html`?await n.go(n.total.value,0,!0):await n.go(1,0,!0))},{flush:`pre`,immediate:!0}),{...n,...e}});function Va(){let e=Ba(),t=f()?ce(xe,void 0):void 0;if(!t)return e;let n=ee(t).nav;return{...e,...n}}export{Fe as $,pa as A,Ki as B,ia as C,$i as D,Zi as E,Da as F,Ue as G,Ke as H,Ea as I,Ae as J,Be as K,ma as L,Ma as M,va as N,ga as O,ka as P,Me as Q,oa as R,na as S,Qi as T,Ge as U,$ as V,He as W,je as X,Ie as Y,Ne as Z,fa as _,_a as a,Ta as b,Sa as c,Oa as d,Pe as et,ha as f,da as g,ba as h,aa as i,we as it,Na as j,Xi as k,xa as l,Aa as m,Ca as n,Se as nt,ja as o,ea as p,_ as q,ua as r,De as rt,ta as s,Va as t,g as tt,la as u,ca as v,ya as w,wa as x,sa as y,Gi as z};
|
lecture-07/index.html
CHANGED
|
@@ -11,16 +11,16 @@
|
|
| 11 |
<meta name="description" content=""PGR207 Deep Learning 2026 — Lecture 07"">
|
| 12 |
<meta name="author" content=""Vajira Thambawita"">
|
| 13 |
<meta property="og:title" content="Generative Models and GANs - Slidev">
|
| 14 |
-
<meta property="og:description" content=""PGR207 Deep Learning 2026 — Lecture 07""> <script type="module" crossorigin src="./assets/index-
|
| 15 |
<link rel="modulepreload" crossorigin href="./assets/rolldown-runtime-hePW80VL.js">
|
| 16 |
-
<link rel="modulepreload" crossorigin href="./assets/modules/shiki-
|
| 17 |
<link rel="modulepreload" crossorigin href="./assets/_plugin-vue_export-helper-BDNMzG2s.js">
|
| 18 |
-
<link rel="modulepreload" crossorigin href="./assets/modules/vue-
|
| 19 |
-
<link rel="modulepreload" crossorigin href="./assets/slidev/context-
|
| 20 |
-
<link rel="modulepreload" crossorigin href="./assets/useNav-
|
| 21 |
-
<link rel="modulepreload" crossorigin href="./assets/syncState-
|
| 22 |
<link rel="stylesheet" crossorigin href="./assets/modules/shiki-BrmBd2_v.css">
|
| 23 |
-
<link rel="stylesheet" crossorigin href="./assets/index-
|
| 24 |
</head>
|
| 25 |
<body>
|
| 26 |
<div id="app"></div>
|
|
|
|
| 11 |
<meta name="description" content=""PGR207 Deep Learning 2026 — Lecture 07"">
|
| 12 |
<meta name="author" content=""Vajira Thambawita"">
|
| 13 |
<meta property="og:title" content="Generative Models and GANs - Slidev">
|
| 14 |
+
<meta property="og:description" content=""PGR207 Deep Learning 2026 — Lecture 07""> <script type="module" crossorigin src="./assets/index-DxDNFTAW.js"></script>
|
| 15 |
<link rel="modulepreload" crossorigin href="./assets/rolldown-runtime-hePW80VL.js">
|
| 16 |
+
<link rel="modulepreload" crossorigin href="./assets/modules/shiki-CJZsCeMT.js">
|
| 17 |
<link rel="modulepreload" crossorigin href="./assets/_plugin-vue_export-helper-BDNMzG2s.js">
|
| 18 |
+
<link rel="modulepreload" crossorigin href="./assets/modules/vue-Dnfgf7Ad.js">
|
| 19 |
+
<link rel="modulepreload" crossorigin href="./assets/slidev/context-DB-9afGB.js">
|
| 20 |
+
<link rel="modulepreload" crossorigin href="./assets/useNav-BmBHxIEh.js">
|
| 21 |
+
<link rel="modulepreload" crossorigin href="./assets/syncState-3Tc2ZArb.js">
|
| 22 |
<link rel="stylesheet" crossorigin href="./assets/modules/shiki-BrmBd2_v.css">
|
| 23 |
+
<link rel="stylesheet" crossorigin href="./assets/index-BzbW-jWD.css">
|
| 24 |
</head>
|
| 25 |
<body>
|
| 26 |
<div id="app"></div>
|
lecture-07/slides.pdf
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b1dba4e6099afa9490aebb2a440bac3715e9dfcc8257cae23dd1df618aa7e676
|
| 3 |
+
size 5002573
|