From 5fc01d53e29eb991cf555a5ca78cd0298d6cae5a Mon Sep 17 00:00:00 2001 From: cmpadden Date: Fri, 27 Dec 2024 19:32:26 +0000 Subject: [PATCH] deploy: fff2c2d527df0f78440ec87e995ea02a441e9e3d --- 200.html | 14 ++--- 404.html | 14 ++--- _nuxt/{DpRgmz7P.js => 36pNPiZA.js} | 4 +- _nuxt/{Bf_P86ar.js => B6OIRZug.js} | 2 +- _nuxt/{IfBlq4eo.js => B6tAB_C8.js} | 2 +- _nuxt/{nJJO8dFm.js => BK37JMLf.js} | 20 +++---- _nuxt/{Bq6TICzc.js => BOWXzEfp.js} | 2 +- _nuxt/{ClDFPAdk.js => BOZf4djk.js} | 2 +- _nuxt/{BpPcz_md.js => BPuIfGRI.js} | 2 +- _nuxt/{axEFYTs9.js => BUUEBr-A.js} | 4 +- _nuxt/{S6IGJMqS.js => BhE0-UjD.js} | 2 +- _nuxt/{ClXDwuF5.js => BicH1kzm.js} | 2 +- _nuxt/{CTor07BM.js => BjS-v8yJ.js} | 2 +- _nuxt/{Bj1tkoTK.js => BtbynY4z.js} | 2 +- _nuxt/{TehJYBZc.js => Bv4zO08n.js} | 2 +- _nuxt/BvrzO_PE.js | 1 + _nuxt/{B34PTUJ1.js => BzA2FW_d.js} | 2 +- _nuxt/{COAihTe6.js => C4nPnnlt.js} | 2 +- _nuxt/C5GwGpip.js | 1 - _nuxt/{D9TPJ0pj.js => C828-xgJ.js} | 2 +- _nuxt/C9FT_e57.js | 1 + _nuxt/CCnUho6I.js | 1 + _nuxt/CFm_cf98.js | 1 - _nuxt/{CFcRRafH.js => CIDd0oDf.js} | 2 +- _nuxt/{CSdKj_mO.js => CNr5x1ND.js} | 2 +- _nuxt/{BkbDttfB.js => CTW-W71u.js} | 2 +- _nuxt/{DwMZCMB-.js => CVSgz9-b.js} | 2 +- _nuxt/{DAyK0gv0.js => CW9x3cwD.js} | 2 +- _nuxt/{RZ_1G7Mx.js => CWkD7dT7.js} | 2 +- _nuxt/{BbQsVLx8.js => CXAQy6Gj.js} | 2 +- _nuxt/{BhgXj1kf.js => CgYWpv8r.js} | 2 +- _nuxt/{D9bwbETQ.js => ChvBJXEt.js} | 2 +- _nuxt/{Bmp1QHsv.js => CkFsoPVF.js} | 2 +- _nuxt/{Cj8D-8E-.js => ClIt1Nvm.js} | 2 +- _nuxt/{BmBAb7Zb.js => Crie1bW-.js} | 2 +- _nuxt/{YC6j4shX.js => D1pfiUWe.js} | 2 +- _nuxt/{CMz-STw3.js => DA-iSWSz.js} | 2 +- _nuxt/{rioP87fJ.js => DAGTk_Eg.js} | 2 +- _nuxt/{Bmi1Nzyj.js => DCC38KAX.js} | 2 +- _nuxt/{g3vSkNzf.js => DCo587Oy.js} | 2 +- _nuxt/{BPM8Blb7.js => DEIA3vjx.js} | 2 +- _nuxt/{fN7CqnJV.js => DGfbSuI8.js} | 2 +- _nuxt/DM953cT8.js | 1 - _nuxt/{DUIBMrHd.js => DNMAzUIu.js} | 2 +- _nuxt/{BpMTv8gi.js => DPuhoZ66.js} | 2 +- _nuxt/DSmS9R0l.js | 1 + _nuxt/{BrSph-fG.js => DTjsV1Wj.js} | 2 +- _nuxt/{CveZ9Rrq.js => D_FI_Dju.js} | 2 +- _nuxt/{D0Jts58Y.js => DahmjARO.js} | 2 +- _nuxt/{BNGAfUEf.js => DbHcoyzM.js} | 2 +- _nuxt/{CwMQLHqL.js => DgtYBS7b.js} | 2 +- _nuxt/{BBOrgyAk.js => Dl5rqmmJ.js} | 2 +- _nuxt/Dm2eZEft.js | 1 + _nuxt/{DFIm0aE1.js => DmH48LNN.js} | 2 +- _nuxt/{D3LDyA07.js => Dp1_NO-z.js} | 2 +- _nuxt/{D3BMvJkl.js => DrqmHo5i.js} | 2 +- _nuxt/{tAX9Dkce.js => DxcFrhhB.js} | 2 +- _nuxt/{Bh-AXKej.js => F-Xgfjj6.js} | 2 +- _nuxt/{DDhUQv0b.js => GEgjpm63.js} | 2 +- _nuxt/LjYdWEq7.js | 1 - _nuxt/{ccqoGSmZ.js => MByIxc3u.js} | 2 +- _nuxt/{VVR0hiId.js => NXtAYMkh.js} | 2 +- _nuxt/{B-4UjY5P.js => Oy3c7nO-.js} | 2 +- _nuxt/{BO4M8-0w.js => Uy2oF-kn.js} | 2 +- _nuxt/{CEXo1ctw.js => YtCHaNyK.js} | 2 +- _nuxt/{BwTjPRNa.js => ZdspzMIb.js} | 2 +- _nuxt/builds/latest.json | 2 +- .../8333855c-1562-4239-a900-e29562dcdda4.json | 1 - .../def0ac76-41f3-44d2-a5f2-1a5d1efc4e29.json | 1 + _nuxt/{BEa6bnVp.js => j0WRL_kM.js} | 2 +- _nuxt/{C4aIg6tX.js => j8GsLxXc.js} | 2 +- _nuxt/{BsbVb7H-.js => kj563EqX.js} | 2 +- _nuxt/{BcwrwQE9.js => nss6DupJ.js} | 2 +- _nuxt/{W7uQzGHR.js => ojq642Va.js} | 2 +- _nuxt/{DGRh_ZVz.js => sTS5Selr.js} | 2 +- _nuxt/xNjjsTAj.js | 1 - _payload.json | 2 +- ...76470171.json => cache.1735327930064.json} | 2 +- ...171.json => 6WfgQ5T9tH.1735327930064.json} | 0 ...171.json => 7TfxHWYxZH.1735327930064.json} | 0 ...171.json => 98CVAb0zLR.1735327930064.json} | 0 ...171.json => DIau8q3IMV.1735327930064.json} | 0 ...171.json => LcWrOc5HNX.1735327930064.json} | 0 ...171.json => Nr5UObwduV.1735327930064.json} | 0 ...171.json => QmL7G3Pk7i.1735327930064.json} | 0 ...171.json => TDaCLaQ73L.1735327930064.json} | 0 ...171.json => XgcK3x9EBy.1735327930064.json} | 0 ...171.json => ZzD9WRl1Uk.1735327930064.json} | 0 ...171.json => bXj5vj6Ts0.1735327930064.json} | 0 ...171.json => d7v45RMayO.1735327930064.json} | 0 ...171.json => pfbAdBSC9a.1735327930064.json} | 0 ...171.json => tGrf8kFZOz.1735327930064.json} | 0 ...171.json => ucEXmLbw2Z.1735327930064.json} | 0 ...171.json => v3HQ7aAWkW.1735327930064.json} | 0 articles/_payload.json | 2 +- articles/apu2-firmware-upgrade/_payload.json | 2 +- articles/apu2-firmware-upgrade/index.html | 54 +++++++++--------- articles/docker-selinux-volumes/_payload.json | 2 +- articles/docker-selinux-volumes/index.html | 56 +++++++++---------- articles/doctl/_payload.json | 2 +- articles/doctl/index.html | 48 ++++++++-------- .../fennel-initial-exploration/_payload.json | 2 +- .../fennel-initial-exploration/index.html | 54 +++++++++--------- articles/index.html | 42 +++++++------- .../_payload.json | 2 +- .../index.html | 46 +++++++-------- articles/nuxt-content-rss-feed/_payload.json | 2 +- articles/nuxt-content-rss-feed/index.html | 48 ++++++++-------- articles/nuxt-v3-migration/_payload.json | 2 +- articles/nuxt-v3-migration/index.html | 44 +++++++-------- .../persistent-archlinux-usb/_payload.json | 2 +- articles/persistent-archlinux-usb/index.html | 56 +++++++++---------- .../_payload.json | 2 +- .../index.html | 48 ++++++++-------- .../_payload.json | 2 +- .../index.html | 48 ++++++++-------- .../_payload.json | 2 +- .../index.html | 48 ++++++++-------- articles/ssh-ed25519-sk-yubikey/_payload.json | 2 +- articles/ssh-ed25519-sk-yubikey/index.html | 50 ++++++++--------- .../_payload.json | 2 +- .../index.html | 54 +++++++++--------- .../vim-fugitive-gpg-pinentry/_payload.json | 2 +- articles/vim-fugitive-gpg-pinentry/index.html | 48 ++++++++-------- atom/index.html | 2 +- card/_payload.json | 2 +- card/index.html | 20 +++---- examples/nested_transitions/_payload.json | 2 +- examples/nested_transitions/index.html | 20 +++---- index.html | 26 ++++----- playground/_payload.json | 2 +- playground/audio/_payload.json | 2 +- playground/audio/index.html | 20 +++---- playground/chords/_payload.json | 2 +- playground/chords/index.html | 20 +++---- playground/conway/_payload.json | 2 +- playground/conway/index.html | 20 +++---- playground/french/_payload.json | 2 +- playground/french/index.html | 22 ++++---- playground/index.html | 22 ++++---- playground/matrix/_payload.json | 2 +- playground/matrix/index.html | 20 +++---- playground/metronome/_payload.json | 2 +- playground/metronome/index.html | 20 +++---- playground/midi/_payload.json | 2 +- playground/midi/index.html | 20 +++---- playground/palettes/mountains/_payload.json | 2 +- playground/palettes/mountains/index.html | 20 +++---- playground/palettes/variance/_payload.json | 2 +- playground/palettes/variance/index.html | 20 +++---- playground/plotter/_payload.json | 2 +- playground/plotter/index.html | 20 +++---- playground/tiling/_payload.json | 2 +- playground/tiling/index.html | 20 +++---- playground/waves/_payload.json | 2 +- playground/waves/index.html | 20 +++---- talks/_payload.json | 2 +- talks/index.html | 20 +++---- 158 files changed, 674 insertions(+), 674 deletions(-) rename _nuxt/{DpRgmz7P.js => 36pNPiZA.js} (75%) rename _nuxt/{Bf_P86ar.js => B6OIRZug.js} (88%) rename _nuxt/{IfBlq4eo.js => B6tAB_C8.js} (95%) rename _nuxt/{nJJO8dFm.js => BK37JMLf.js} (90%) rename _nuxt/{Bq6TICzc.js => BOWXzEfp.js} (99%) rename _nuxt/{ClDFPAdk.js => BOZf4djk.js} (94%) rename _nuxt/{BpPcz_md.js => BPuIfGRI.js} (88%) rename _nuxt/{axEFYTs9.js => BUUEBr-A.js} (91%) rename _nuxt/{S6IGJMqS.js => BhE0-UjD.js} (53%) rename _nuxt/{ClXDwuF5.js => BicH1kzm.js} (97%) rename _nuxt/{CTor07BM.js => BjS-v8yJ.js} (81%) rename _nuxt/{Bj1tkoTK.js => BtbynY4z.js} (65%) rename _nuxt/{TehJYBZc.js => Bv4zO08n.js} (92%) create mode 100644 _nuxt/BvrzO_PE.js rename _nuxt/{B34PTUJ1.js => BzA2FW_d.js} (99%) rename _nuxt/{COAihTe6.js => C4nPnnlt.js} (97%) delete mode 100644 _nuxt/C5GwGpip.js rename _nuxt/{D9TPJ0pj.js => C828-xgJ.js} (65%) create mode 100644 _nuxt/C9FT_e57.js create mode 100644 _nuxt/CCnUho6I.js delete mode 100644 _nuxt/CFm_cf98.js rename _nuxt/{CFcRRafH.js => CIDd0oDf.js} (88%) rename _nuxt/{CSdKj_mO.js => CNr5x1ND.js} (56%) rename _nuxt/{BkbDttfB.js => CTW-W71u.js} (61%) rename _nuxt/{DwMZCMB-.js => CVSgz9-b.js} (72%) rename _nuxt/{DAyK0gv0.js => CW9x3cwD.js} (84%) rename _nuxt/{RZ_1G7Mx.js => CWkD7dT7.js} (99%) rename _nuxt/{BbQsVLx8.js => CXAQy6Gj.js} (88%) rename _nuxt/{BhgXj1kf.js => CgYWpv8r.js} (58%) rename _nuxt/{D9bwbETQ.js => ChvBJXEt.js} (79%) rename _nuxt/{Bmp1QHsv.js => CkFsoPVF.js} (92%) rename _nuxt/{Cj8D-8E-.js => ClIt1Nvm.js} (87%) rename _nuxt/{BmBAb7Zb.js => Crie1bW-.js} (93%) rename _nuxt/{YC6j4shX.js => D1pfiUWe.js} (96%) rename _nuxt/{CMz-STw3.js => DA-iSWSz.js} (65%) rename _nuxt/{rioP87fJ.js => DAGTk_Eg.js} (98%) rename _nuxt/{Bmi1Nzyj.js => DCC38KAX.js} (78%) rename _nuxt/{g3vSkNzf.js => DCo587Oy.js} (89%) rename _nuxt/{BPM8Blb7.js => DEIA3vjx.js} (99%) rename _nuxt/{fN7CqnJV.js => DGfbSuI8.js} (90%) delete mode 100644 _nuxt/DM953cT8.js rename _nuxt/{DUIBMrHd.js => DNMAzUIu.js} (77%) rename _nuxt/{BpMTv8gi.js => DPuhoZ66.js} (64%) create mode 100644 _nuxt/DSmS9R0l.js rename _nuxt/{BrSph-fG.js => DTjsV1Wj.js} (86%) rename _nuxt/{CveZ9Rrq.js => D_FI_Dju.js} (64%) rename _nuxt/{D0Jts58Y.js => DahmjARO.js} (96%) rename _nuxt/{BNGAfUEf.js => DbHcoyzM.js} (98%) rename _nuxt/{CwMQLHqL.js => DgtYBS7b.js} (88%) rename _nuxt/{BBOrgyAk.js => Dl5rqmmJ.js} (97%) create mode 100644 _nuxt/Dm2eZEft.js rename _nuxt/{DFIm0aE1.js => DmH48LNN.js} (98%) rename _nuxt/{D3LDyA07.js => Dp1_NO-z.js} (99%) rename _nuxt/{D3BMvJkl.js => DrqmHo5i.js} (82%) rename _nuxt/{tAX9Dkce.js => DxcFrhhB.js} (78%) rename _nuxt/{Bh-AXKej.js => F-Xgfjj6.js} (64%) rename _nuxt/{DDhUQv0b.js => GEgjpm63.js} (64%) delete mode 100644 _nuxt/LjYdWEq7.js rename _nuxt/{ccqoGSmZ.js => MByIxc3u.js} (65%) rename _nuxt/{VVR0hiId.js => NXtAYMkh.js} (88%) rename _nuxt/{B-4UjY5P.js => Oy3c7nO-.js} (64%) rename _nuxt/{BO4M8-0w.js => Uy2oF-kn.js} (65%) rename _nuxt/{CEXo1ctw.js => YtCHaNyK.js} (93%) rename _nuxt/{BwTjPRNa.js => ZdspzMIb.js} (65%) delete mode 100644 _nuxt/builds/meta/8333855c-1562-4239-a900-e29562dcdda4.json create mode 100644 _nuxt/builds/meta/def0ac76-41f3-44d2-a5f2-1a5d1efc4e29.json rename _nuxt/{BEa6bnVp.js => j0WRL_kM.js} (79%) rename _nuxt/{C4aIg6tX.js => j8GsLxXc.js} (99%) rename _nuxt/{BsbVb7H-.js => kj563EqX.js} (88%) rename _nuxt/{BcwrwQE9.js => nss6DupJ.js} (63%) rename _nuxt/{W7uQzGHR.js => ojq642Va.js} (64%) rename _nuxt/{DGRh_ZVz.js => sTS5Selr.js} (64%) delete mode 100644 _nuxt/xNjjsTAj.js rename api/_content/{cache.1735276470171.json => cache.1735327930064.json} (99%) rename api/_content/query/{6WfgQ5T9tH.1735276470171.json => 6WfgQ5T9tH.1735327930064.json} (100%) rename api/_content/query/{7TfxHWYxZH.1735276470171.json => 7TfxHWYxZH.1735327930064.json} (100%) rename api/_content/query/{98CVAb0zLR.1735276470171.json => 98CVAb0zLR.1735327930064.json} (100%) rename api/_content/query/{DIau8q3IMV.1735276470171.json => DIau8q3IMV.1735327930064.json} (100%) rename api/_content/query/{LcWrOc5HNX.1735276470171.json => LcWrOc5HNX.1735327930064.json} (100%) rename api/_content/query/{Nr5UObwduV.1735276470171.json => Nr5UObwduV.1735327930064.json} (100%) rename api/_content/query/{QmL7G3Pk7i.1735276470171.json => QmL7G3Pk7i.1735327930064.json} (100%) rename api/_content/query/{TDaCLaQ73L.1735276470171.json => TDaCLaQ73L.1735327930064.json} (100%) rename api/_content/query/{XgcK3x9EBy.1735276470171.json => XgcK3x9EBy.1735327930064.json} (100%) rename api/_content/query/{ZzD9WRl1Uk.1735276470171.json => ZzD9WRl1Uk.1735327930064.json} (100%) rename api/_content/query/{bXj5vj6Ts0.1735276470171.json => bXj5vj6Ts0.1735327930064.json} (100%) rename api/_content/query/{d7v45RMayO.1735276470171.json => d7v45RMayO.1735327930064.json} (100%) rename api/_content/query/{pfbAdBSC9a.1735276470171.json => pfbAdBSC9a.1735327930064.json} (100%) rename api/_content/query/{tGrf8kFZOz.1735276470171.json => tGrf8kFZOz.1735327930064.json} (100%) rename api/_content/query/{ucEXmLbw2Z.1735276470171.json => ucEXmLbw2Z.1735327930064.json} (100%) rename api/_content/query/{v3HQ7aAWkW.1735276470171.json => v3HQ7aAWkW.1735327930064.json} (100%) diff --git a/200.html b/200.html index 74646d46..f07deebf 100644 --- a/200.html +++ b/200.html @@ -1,9 +1,9 @@ - - - - - -
- \ No newline at end of file + + + + + +
+ \ No newline at end of file diff --git a/404.html b/404.html index 74646d46..155845ea 100644 --- a/404.html +++ b/404.html @@ -1,9 +1,9 @@ - - - - - -
- \ No newline at end of file + + + + + +
+ \ No newline at end of file diff --git a/_nuxt/DpRgmz7P.js b/_nuxt/36pNPiZA.js similarity index 75% rename from _nuxt/DpRgmz7P.js rename to _nuxt/36pNPiZA.js index 362b235c..68c46dc5 100644 --- a/_nuxt/DpRgmz7P.js +++ b/_nuxt/36pNPiZA.js @@ -1,2 +1,2 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./D3LDyA07.js","./nJJO8dFm.js","./axEFYTs9.js","./IShi1APO.js","./DFIm0aE1.js","./C-v3KzvZ.js"])))=>i.map(i=>d[i]); -import{h as f}from"./IShi1APO.js";import{u as m}from"./BBOrgyAk.js";import{I as v,M as l,N as d,O as g,E as y,d as h,P as _,k as w,J as C,L as p,_ as P}from"./nJJO8dFm.js";import{q as N,w as c,e as $,s as x,j as E,u as T}from"./axEFYTs9.js";import{u as j}from"./DFIm0aE1.js";const S=async t=>{const{content:e}=v().public;typeof(t==null?void 0:t.params)!="function"&&(t=N(t));const n=t.params(),o=e.experimental.stripQueryParameters?c(`/navigation/${`${f(n)}.${e.integrity}`}/${$(n)}.json`):c(`/navigation/${f(n)}.${e.integrity}.json`);if(x())return(await l(()=>import("./D3LDyA07.js"),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url).then(i=>i.generateNavigation))(n);const a=await $fetch(o,{method:"GET",responseType:"json",params:e.experimental.stripQueryParameters?void 0:{_params:E(n),previewToken:j().getPreviewToken()}});if(typeof a=="string"&&a.startsWith(""))throw new Error("Not found");return a},b="$s";function D(...t){const e=typeof t[t.length-1]=="string"?t.pop():void 0;typeof t[0]!="string"&&t.unshift(e);const[n,o]=t;if(!n||typeof n!="string")throw new TypeError("[nuxt] [useState] key must be a string: "+n);if(o!==void 0&&typeof o!="function")throw new Error("[nuxt] [useState] init must be a function: "+o);const a=b+n,r=d(),i=g(r.payload.state,a);if(i.value===void 0&&o){const s=o();if(y(s))return r.payload.state[a]=s,s;i.value=s}return i}const R=h({name:"ContentNavigation",props:{query:{type:Object,required:!1,default:void 0}},async setup(t){const{query:e}=_(t),n=w(()=>{var a;return typeof((a=e.value)==null?void 0:a.params)=="function"?e.value.params():e.value});if(!n.value&&D("dd-navigation").value){const{navigation:a}=T();return{navigation:a}}const{data:o}=await m(`content-navigation-${f(n.value)}`,()=>S(n.value));return{navigation:o}},render(t){const e=C(),{navigation:n}=t,o=i=>p(P,{to:i._path},()=>i.title),a=(i,s)=>p("ul",s?{"data-level":s}:null,i.map(u=>u.children?p("li",null,[o(u),a(u.children,s+1)]):p("li",null,o(u)))),r=i=>a(i,0);return e!=null&&e.default?e.default({navigation:n,...this.$attrs}):r(n)}}),I=R;export{I as default}; +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./Dp1_NO-z.js","./BK37JMLf.js","./BUUEBr-A.js","./IShi1APO.js","./DmH48LNN.js","./C-v3KzvZ.js"])))=>i.map(i=>d[i]); +import{h as f}from"./IShi1APO.js";import{u as m}from"./Dl5rqmmJ.js";import{I as v,M as l,N as d,O as g,E as y,d as h,P as _,k as w,J as C,L as p,_ as P}from"./BK37JMLf.js";import{q as N,w as c,e as $,s as x,j as E,u as T}from"./BUUEBr-A.js";import{u as j}from"./DmH48LNN.js";const S=async t=>{const{content:e}=v().public;typeof(t==null?void 0:t.params)!="function"&&(t=N(t));const n=t.params(),o=e.experimental.stripQueryParameters?c(`/navigation/${`${f(n)}.${e.integrity}`}/${$(n)}.json`):c(`/navigation/${f(n)}.${e.integrity}.json`);if(x())return(await l(()=>import("./Dp1_NO-z.js"),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url).then(i=>i.generateNavigation))(n);const a=await $fetch(o,{method:"GET",responseType:"json",params:e.experimental.stripQueryParameters?void 0:{_params:E(n),previewToken:j().getPreviewToken()}});if(typeof a=="string"&&a.startsWith(""))throw new Error("Not found");return a},b="$s";function D(...t){const e=typeof t[t.length-1]=="string"?t.pop():void 0;typeof t[0]!="string"&&t.unshift(e);const[n,o]=t;if(!n||typeof n!="string")throw new TypeError("[nuxt] [useState] key must be a string: "+n);if(o!==void 0&&typeof o!="function")throw new Error("[nuxt] [useState] init must be a function: "+o);const a=b+n,r=d(),i=g(r.payload.state,a);if(i.value===void 0&&o){const s=o();if(y(s))return r.payload.state[a]=s,s;i.value=s}return i}const R=h({name:"ContentNavigation",props:{query:{type:Object,required:!1,default:void 0}},async setup(t){const{query:e}=_(t),n=w(()=>{var a;return typeof((a=e.value)==null?void 0:a.params)=="function"?e.value.params():e.value});if(!n.value&&D("dd-navigation").value){const{navigation:a}=T();return{navigation:a}}const{data:o}=await m(`content-navigation-${f(n.value)}`,()=>S(n.value));return{navigation:o}},render(t){const e=C(),{navigation:n}=t,o=i=>p(P,{to:i._path},()=>i.title),a=(i,s)=>p("ul",s?{"data-level":s}:null,i.map(u=>u.children?p("li",null,[o(u),a(u.children,s+1)]):p("li",null,o(u)))),r=i=>a(i,0);return e!=null&&e.default?e.default({navigation:n,...this.$attrs}):r(n)}}),I=R;export{I as default}; diff --git a/_nuxt/Bf_P86ar.js b/_nuxt/B6OIRZug.js similarity index 88% rename from _nuxt/Bf_P86ar.js rename to _nuxt/B6OIRZug.js index 58d09d88..7f4994f8 100644 --- a/_nuxt/Bf_P86ar.js +++ b/_nuxt/B6OIRZug.js @@ -1 +1 @@ -import{d as p,I as f,k as i,o as s,c as n,a as u,a9 as r}from"./nJJO8dFm.js";const l=["id"],d=["href"],_=p({__name:"ProseH6",props:{id:{}},setup(c){const t=c,{headings:o}=f().public.mdc,a=i(()=>{var e;return t.id&&(typeof(o==null?void 0:o.anchorLinks)=="boolean"&&(o==null?void 0:o.anchorLinks)===!0||typeof(o==null?void 0:o.anchorLinks)=="object"&&((e=o==null?void 0:o.anchorLinks)==null?void 0:e.h6))});return(e,k)=>(s(),n("h6",{id:t.id},[t.id&&u(a)?(s(),n("a",{key:0,href:`#${t.id}`},[r(e.$slots,"default")],8,d)):r(e.$slots,"default",{key:1})],8,l))}});export{_ as default}; +import{d as p,I as f,k as i,o as s,c as n,a as u,a9 as r}from"./BK37JMLf.js";const l=["id"],d=["href"],_=p({__name:"ProseH6",props:{id:{}},setup(c){const t=c,{headings:o}=f().public.mdc,a=i(()=>{var e;return t.id&&(typeof(o==null?void 0:o.anchorLinks)=="boolean"&&(o==null?void 0:o.anchorLinks)===!0||typeof(o==null?void 0:o.anchorLinks)=="object"&&((e=o==null?void 0:o.anchorLinks)==null?void 0:e.h6))});return(e,k)=>(s(),n("h6",{id:t.id},[t.id&&u(a)?(s(),n("a",{key:0,href:`#${t.id}`},[r(e.$slots,"default")],8,d)):r(e.$slots,"default",{key:1})],8,l))}});export{_ as default}; diff --git a/_nuxt/IfBlq4eo.js b/_nuxt/B6tAB_C8.js similarity index 95% rename from _nuxt/IfBlq4eo.js rename to _nuxt/B6tAB_C8.js index 8bd096b7..a2e5b932 100644 --- a/_nuxt/IfBlq4eo.js +++ b/_nuxt/B6tAB_C8.js @@ -1 +1 @@ -import{m as u,c as v,b as c,o as h}from"./nJJO8dFm.js";const y={data(){return{}},mounted(){document.getElementById("canvas").textContent="";const o=["#FFBA08","#FAA307","#F48C06","#E85D04","#DC2F02","#D00000","#9D0208","#6A040F","#370617","#03071E"],a=e=>{const m=document.getElementById("canvas"),r=m.clientWidth,n=m.clientHeight,f=[{color:o[1],min:0,max:.2,yoff:2},{color:o[2],min:.2,max:.4,yoff:2},{color:o[3],min:.4,max:.6,yoff:2},{color:o[4],min:.6,max:.8,yoff:2},{color:o[5],min:.8,max:1,yoff:2}],l=t=>{e.fill(t.color),e.beginShape();let s=1;for(let i=0;i<=r;i+=10){const x=e.map(e.noise(s,t.yoff),0,1,t.min*n,t.max*n);e.curveVertex(i,x),s+=e.random(.5)}t.yoff+=e.random(-.5,.5),e.curveVertex(r,n),e.curveVertex(0,n),e.endShape(e.CLOSE)},d=()=>{e.clear(),e.background(o[0]),f.forEach(t=>l(t))};e.setup=()=>{e.createCanvas(r,n),e.frameRate(5),e.smooth(),e.stroke(255),e.strokeWeight(3),d(),e.noLoop()},e.mousePressed=()=>{d()}};new this.$p5(a,"canvas")}},p={class:"select-none bg-gradient-to-b from-green-800 to-gray-800"};function g(o,a,e,m,r,n){return h(),v("div",p,a[0]||(a[0]=[c("div",{class:"m-6 grid h-2/3 place-items-center"},[c("div",{class:"font-mono text-white"},[c("div",{id:"canvas",class:"mb-2 h-96 border-2 border-white"}),c("div",{class:"my-2 w-48 text-center md:w-full"}," Click or tap anywhere to redraw the waves! ")])],-1)]))}const E=u(y,[["render",g]]);export{E as default}; +import{m as u,c as v,b as c,o as h}from"./BK37JMLf.js";const y={data(){return{}},mounted(){document.getElementById("canvas").textContent="";const o=["#FFBA08","#FAA307","#F48C06","#E85D04","#DC2F02","#D00000","#9D0208","#6A040F","#370617","#03071E"],a=e=>{const m=document.getElementById("canvas"),r=m.clientWidth,n=m.clientHeight,f=[{color:o[1],min:0,max:.2,yoff:2},{color:o[2],min:.2,max:.4,yoff:2},{color:o[3],min:.4,max:.6,yoff:2},{color:o[4],min:.6,max:.8,yoff:2},{color:o[5],min:.8,max:1,yoff:2}],l=t=>{e.fill(t.color),e.beginShape();let s=1;for(let i=0;i<=r;i+=10){const x=e.map(e.noise(s,t.yoff),0,1,t.min*n,t.max*n);e.curveVertex(i,x),s+=e.random(.5)}t.yoff+=e.random(-.5,.5),e.curveVertex(r,n),e.curveVertex(0,n),e.endShape(e.CLOSE)},d=()=>{e.clear(),e.background(o[0]),f.forEach(t=>l(t))};e.setup=()=>{e.createCanvas(r,n),e.frameRate(5),e.smooth(),e.stroke(255),e.strokeWeight(3),d(),e.noLoop()},e.mousePressed=()=>{d()}};new this.$p5(a,"canvas")}},p={class:"select-none bg-gradient-to-b from-green-800 to-gray-800"};function g(o,a,e,m,r,n){return h(),v("div",p,a[0]||(a[0]=[c("div",{class:"m-6 grid h-2/3 place-items-center"},[c("div",{class:"font-mono text-white"},[c("div",{id:"canvas",class:"mb-2 h-96 border-2 border-white"}),c("div",{class:"my-2 w-48 text-center md:w-full"}," Click or tap anywhere to redraw the waves! ")])],-1)]))}const E=u(y,[["render",g]]);export{E as default}; diff --git a/_nuxt/nJJO8dFm.js b/_nuxt/BK37JMLf.js similarity index 90% rename from _nuxt/nJJO8dFm.js rename to _nuxt/BK37JMLf.js index 61134d04..36164023 100644 --- a/_nuxt/nJJO8dFm.js +++ b/_nuxt/BK37JMLf.js @@ -1,28 +1,28 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./CwMQLHqL.js","./RZ_1G7Mx.js","./C-v3KzvZ.js","./CxYJgpPD.js","./DFIm0aE1.js","./IShi1APO.js","./DAyK0gv0.js","./BBOrgyAk.js","./axEFYTs9.js","./_...DjO8DLlz.css","./fN7CqnJV.js","./C5GwGpip.js","./CFm_cf98.js","./COAihTe6.js","./xNjjsTAj.js","./Cj8D-8E-.js","./Bmp1QHsv.js","./Bmi1Nzyj.js","./DpRgmz7P.js","./LjYdWEq7.js","./TehJYBZc.js","./BkbDttfB.js","./DM953cT8.js","./D9bwbETQ.js","./ProseCode.B_fgAJq0.css","./D3BMvJkl.js"])))=>i.map(i=>d[i]); +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./DgtYBS7b.js","./CWkD7dT7.js","./C-v3KzvZ.js","./CxYJgpPD.js","./DmH48LNN.js","./IShi1APO.js","./CW9x3cwD.js","./Dl5rqmmJ.js","./BUUEBr-A.js","./_...DjO8DLlz.css","./DGfbSuI8.js","./BvrzO_PE.js","./Dm2eZEft.js","./C4nPnnlt.js","./DSmS9R0l.js","./ClIt1Nvm.js","./CkFsoPVF.js","./DCC38KAX.js","./36pNPiZA.js","./C9FT_e57.js","./Bv4zO08n.js","./CTW-W71u.js","./CCnUho6I.js","./ChvBJXEt.js","./ProseCode.B_fgAJq0.css","./DrqmHo5i.js"])))=>i.map(i=>d[i]); /** * @vue/shared v3.5.13 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**//*! #__NO_SIDE_EFFECTS__ */function Va(r){const a=Object.create(null);for(const x of r.split(","))a[x]=1;return x=>x in a}const Mt={},uo=[],Qr=()=>{},Bh=()=>!1,os=r=>r.charCodeAt(0)===111&&r.charCodeAt(1)===110&&(r.charCodeAt(2)>122||r.charCodeAt(2)<97),Ha=r=>r.startsWith("onUpdate:"),$t=Object.assign,za=(r,a)=>{const x=r.indexOf(a);x>-1&&r.splice(x,1)},Gh=Object.prototype.hasOwnProperty,wt=(r,a)=>Gh.call(r,a),st=Array.isArray,co=r=>ss(r)==="[object Map]",Bc=r=>ss(r)==="[object Set]",Vh=r=>ss(r)==="[object RegExp]",at=r=>typeof r=="function",Bt=r=>typeof r=="string",hn=r=>typeof r=="symbol",At=r=>r!==null&&typeof r=="object",Wa=r=>(At(r)||at(r))&&at(r.then)&&at(r.catch),Gc=Object.prototype.toString,ss=r=>Gc.call(r),Hh=r=>ss(r).slice(8,-1),Vc=r=>ss(r)==="[object Object]",qa=r=>Bt(r)&&r!=="NaN"&&r[0]!=="-"&&""+parseInt(r,10)===r,fo=Va(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),ri=r=>{const a=Object.create(null);return x=>a[x]||(a[x]=r(x))},zh=/-(\w)/g,Ir=ri(r=>r.replace(zh,(a,x)=>x?x.toUpperCase():"")),Wh=/\B([A-Z])/g,Kn=ri(r=>r.replace(Wh,"-$1").toLowerCase()),ni=ri(r=>r.charAt(0).toUpperCase()+r.slice(1)),Oi=ri(r=>r?`on${ni(r)}`:""),Mn=(r,a)=>!Object.is(r,a),ho=(r,...a)=>{for(let x=0;x{Object.defineProperty(r,a,{configurable:!0,enumerable:!1,writable:t,value:x})},ra=r=>{const a=parseFloat(r);return isNaN(a)?r:a},zc=r=>{const a=Bt(r)?Number(r):NaN;return isNaN(a)?r:a};let au;const oi=()=>au||(au=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Xa(r){if(st(r)){const a={};for(let x=0;x{if(x){const t=x.split(Xh);t.length>1&&(a[t[0].trim()]=t[1].trim())}}),a}function Vn(r){let a="";if(Bt(r))a=r;else if(st(r))for(let x=0;x!!(r&&r.__v_isRef===!0),Qh=r=>Bt(r)?r:r==null?"":st(r)||At(r)&&(r.toString===Gc||!at(r.toString))?qc(r)?Qh(r.value):JSON.stringify(r,Xc,2):String(r),Xc=(r,a)=>qc(a)?Xc(r,a.value):co(a)?{[`Map(${a.size})`]:[...a.entries()].reduce((x,[t,w],g)=>(x[Pi(t,g)+" =>"]=w,x),{})}:Bc(a)?{[`Set(${a.size})`]:[...a.values()].map(x=>Pi(x))}:hn(a)?Pi(a):At(a)&&!st(a)&&!Vc(a)?String(a):a,Pi=(r,a="")=>{var x;return hn(r)?`Symbol(${(x=r.description)!=null?x:a})`:r};/** +**//*! #__NO_SIDE_EFFECTS__ */function Va(r){const a=Object.create(null);for(const x of r.split(","))a[x]=1;return x=>x in a}const Mt={},co=[],Qr=()=>{},Uh=()=>!1,ns=r=>r.charCodeAt(0)===111&&r.charCodeAt(1)===110&&(r.charCodeAt(2)>122||r.charCodeAt(2)<97),Ha=r=>r.startsWith("onUpdate:"),$t=Object.assign,za=(r,a)=>{const x=r.indexOf(a);x>-1&&r.splice(x,1)},Bh=Object.prototype.hasOwnProperty,jt=(r,a)=>Bh.call(r,a),st=Array.isArray,fo=r=>os(r)==="[object Map]",Bc=r=>os(r)==="[object Set]",Gh=r=>os(r)==="[object RegExp]",at=r=>typeof r=="function",Ut=r=>typeof r=="string",pn=r=>typeof r=="symbol",At=r=>r!==null&&typeof r=="object",Wa=r=>(At(r)||at(r))&&at(r.then)&&at(r.catch),Gc=Object.prototype.toString,os=r=>Gc.call(r),Vh=r=>os(r).slice(8,-1),Vc=r=>os(r)==="[object Object]",qa=r=>Ut(r)&&r!=="NaN"&&r[0]!=="-"&&""+parseInt(r,10)===r,ho=Va(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),ti=r=>{const a=Object.create(null);return x=>a[x]||(a[x]=r(x))},Hh=/-(\w)/g,Ir=ti(r=>r.replace(Hh,(a,x)=>x?x.toUpperCase():"")),zh=/\B([A-Z])/g,Zn=ti(r=>r.replace(zh,"-$1").toLowerCase()),ri=ti(r=>r.charAt(0).toUpperCase()+r.slice(1)),Oi=ti(r=>r?`on${ri(r)}`:""),Cn=(r,a)=>!Object.is(r,a),po=(r,...a)=>{for(let x=0;x{Object.defineProperty(r,a,{configurable:!0,enumerable:!1,writable:t,value:x})},ra=r=>{const a=parseFloat(r);return isNaN(a)?r:a},zc=r=>{const a=Ut(r)?Number(r):NaN;return isNaN(a)?r:a};let au;const ni=()=>au||(au=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Xa(r){if(st(r)){const a={};for(let x=0;x{if(x){const t=x.split(qh);t.length>1&&(a[t[0].trim()]=t[1].trim())}}),a}function un(r){let a="";if(Ut(r))a=r;else if(st(r))for(let x=0;x!!(r&&r.__v_isRef===!0),Zh=r=>Ut(r)?r:r==null?"":st(r)||At(r)&&(r.toString===Gc||!at(r.toString))?qc(r)?Zh(r.value):JSON.stringify(r,Xc,2):String(r),Xc=(r,a)=>qc(a)?Xc(r,a.value):fo(a)?{[`Map(${a.size})`]:[...a.entries()].reduce((x,[t,w],g)=>(x[Pi(t,g)+" =>"]=w,x),{})}:Bc(a)?{[`Set(${a.size})`]:[...a.values()].map(x=>Pi(x))}:pn(a)?Pi(a):At(a)&&!st(a)&&!Vc(a)?String(a):a,Pi=(r,a="")=>{var x;return pn(r)?`Symbol(${(x=r.description)!=null?x:a})`:r};/** * @vue/reactivity v3.5.13 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/let _r;class $c{constructor(a=!1){this.detached=a,this._active=!0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=_r,!a&&_r&&(this.index=(_r.scopes||(_r.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let a,x;if(this.scopes)for(a=0,x=this.scopes.length;a0)return;if(Bo){let a=Bo;for(Bo=void 0;a;){const x=a.next;a.next=void 0,a.flags&=-9,a=x}}let r;for(;Uo;){let a=Uo;for(Uo=void 0;a;){const x=a.next;if(a.next=void 0,a.flags&=-9,a.flags&1)try{a.trigger()}catch(t){r||(r=t)}a=x}}if(r)throw r}function Jc(r){for(let a=r.deps;a;a=a.nextDep)a.version=-1,a.prevActiveLink=a.dep.activeLink,a.dep.activeLink=a}function ed(r){let a,x=r.depsTail,t=x;for(;t;){const w=t.prevDep;t.version===-1?(t===x&&(x=w),Ka(t),ep(t)):a=t,t.dep.activeLink=t.prevActiveLink,t.prevActiveLink=void 0,t=w}r.deps=a,r.depsTail=x}function na(r){for(let a=r.deps;a;a=a.nextDep)if(a.dep.version!==a.version||a.dep.computed&&(td(a.dep.computed)||a.dep.version!==a.version))return!0;return!!r._dirty}function td(r){if(r.flags&4&&!(r.flags&16)||(r.flags&=-17,r.globalVersion===Yo))return;r.globalVersion=Yo;const a=r.dep;if(r.flags|=2,a.version>0&&!r.isSSR&&r.deps&&!na(r)){r.flags&=-3;return}const x=Pt,t=Gr;Pt=r,Gr=!0;try{Jc(r);const w=r.fn(r._value);(a.version===0||Mn(w,r._value))&&(r._value=w,a.version++)}catch(w){throw a.version++,w}finally{Pt=x,Gr=t,ed(r),r.flags&=-3}}function Ka(r,a=!1){const{dep:x,prevSub:t,nextSub:w}=r;if(t&&(t.nextSub=w,r.prevSub=void 0),w&&(w.prevSub=t,r.nextSub=void 0),x.subs===r&&(x.subs=t,!t&&x.computed)){x.computed.flags&=-5;for(let g=x.computed.deps;g;g=g.nextDep)Ka(g,!0)}!a&&!--x.sc&&x.map&&x.map.delete(x.key)}function ep(r){const{prevDep:a,nextDep:x}=r;a&&(a.nextDep=x,r.prevDep=void 0),x&&(x.prevDep=a,r.nextDep=void 0)}let Gr=!0;const rd=[];function An(){rd.push(Gr),Gr=!1}function Rn(){const r=rd.pop();Gr=r===void 0?!0:r}function lu(r){const{cleanup:a}=r;if(r.cleanup=void 0,a){const x=Pt;Pt=void 0;try{a()}finally{Pt=x}}}let Yo=0;class tp{constructor(a,x){this.sub=a,this.dep=x,this.version=x.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class si{constructor(a){this.computed=a,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0}track(a){if(!Pt||!Gr||Pt===this.computed)return;let x=this.activeLink;if(x===void 0||x.sub!==Pt)x=this.activeLink=new tp(Pt,this),Pt.deps?(x.prevDep=Pt.depsTail,Pt.depsTail.nextDep=x,Pt.depsTail=x):Pt.deps=Pt.depsTail=x,nd(x);else if(x.version===-1&&(x.version=this.version,x.nextDep)){const t=x.nextDep;t.prevDep=x.prevDep,x.prevDep&&(x.prevDep.nextDep=t),x.prevDep=Pt.depsTail,x.nextDep=void 0,Pt.depsTail.nextDep=x,Pt.depsTail=x,Pt.deps===x&&(Pt.deps=t)}return x}trigger(a){this.version++,Yo++,this.notify(a)}notify(a){$a();try{for(let x=this.subs;x;x=x.prevSub)x.sub.notify()&&x.sub.dep.notify()}finally{Ya()}}}function nd(r){if(r.dep.sc++,r.sub.flags&4){const a=r.dep.computed;if(a&&!r.dep.subs){a.flags|=20;for(let t=a.deps;t;t=t.nextDep)nd(t)}const x=r.dep.subs;x!==r&&(r.prevSub=x,x&&(x.nextSub=r)),r.dep.subs=r}}const Fs=new WeakMap,Hn=Symbol(""),oa=Symbol(""),Ko=Symbol("");function mr(r,a,x){if(Gr&&Pt){let t=Fs.get(r);t||Fs.set(r,t=new Map);let w=t.get(x);w||(t.set(x,w=new si),w.map=t,w.key=x),w.track()}}function un(r,a,x,t,w,g){const i=Fs.get(r);if(!i){Yo++;return}const u=o=>{o&&o.trigger()};if($a(),a==="clear")i.forEach(u);else{const o=st(r),h=o&&qa(x);if(o&&x==="length"){const y=Number(t);i.forEach((m,n)=>{(n==="length"||n===Ko||!hn(n)&&n>=y)&&u(m)})}else switch((x!==void 0||i.has(void 0))&&u(i.get(x)),h&&u(i.get(Ko)),a){case"add":o?h&&u(i.get("length")):(u(i.get(Hn)),co(r)&&u(i.get(oa)));break;case"delete":o||(u(i.get(Hn)),co(r)&&u(i.get(oa)));break;case"set":co(r)&&u(i.get(Hn));break}}Ya()}function rp(r,a){const x=Fs.get(r);return x&&x.get(a)}function ro(r){const a=bt(r);return a===r?a:(mr(a,"iterate",Ko),Rr(r)?a:a.map(yr))}function ii(r){return mr(r=bt(r),"iterate",Ko),r}const np={__proto__:null,[Symbol.iterator](){return Ri(this,Symbol.iterator,yr)},concat(...r){return ro(this).concat(...r.map(a=>st(a)?ro(a):a))},entries(){return Ri(this,"entries",r=>(r[1]=yr(r[1]),r))},every(r,a){return on(this,"every",r,a,void 0,arguments)},filter(r,a){return on(this,"filter",r,a,x=>x.map(yr),arguments)},find(r,a){return on(this,"find",r,a,yr,arguments)},findIndex(r,a){return on(this,"findIndex",r,a,void 0,arguments)},findLast(r,a){return on(this,"findLast",r,a,yr,arguments)},findLastIndex(r,a){return on(this,"findLastIndex",r,a,void 0,arguments)},forEach(r,a){return on(this,"forEach",r,a,void 0,arguments)},includes(...r){return Li(this,"includes",r)},indexOf(...r){return Li(this,"indexOf",r)},join(r){return ro(this).join(r)},lastIndexOf(...r){return Li(this,"lastIndexOf",r)},map(r,a){return on(this,"map",r,a,void 0,arguments)},pop(){return Lo(this,"pop")},push(...r){return Lo(this,"push",r)},reduce(r,...a){return uu(this,"reduce",r,a)},reduceRight(r,...a){return uu(this,"reduceRight",r,a)},shift(){return Lo(this,"shift")},some(r,a){return on(this,"some",r,a,void 0,arguments)},splice(...r){return Lo(this,"splice",r)},toReversed(){return ro(this).toReversed()},toSorted(r){return ro(this).toSorted(r)},toSpliced(...r){return ro(this).toSpliced(...r)},unshift(...r){return Lo(this,"unshift",r)},values(){return Ri(this,"values",yr)}};function Ri(r,a,x){const t=ii(r),w=t[a]();return t!==r&&!Rr(r)&&(w._next=w.next,w.next=()=>{const g=w._next();return g.value&&(g.value=x(g.value)),g}),w}const op=Array.prototype;function on(r,a,x,t,w,g){const i=ii(r),u=i!==r&&!Rr(r),o=i[a];if(o!==op[a]){const m=o.apply(r,g);return u?yr(m):m}let h=x;i!==r&&(u?h=function(m,n){return x.call(this,yr(m),n,r)}:x.length>2&&(h=function(m,n){return x.call(this,m,n,r)}));const y=o.call(i,h,t);return u&&w?w(y):y}function uu(r,a,x,t){const w=ii(r);let g=x;return w!==r&&(Rr(r)?x.length>3&&(g=function(i,u,o){return x.call(this,i,u,o,r)}):g=function(i,u,o){return x.call(this,i,yr(u),o,r)}),w[a](g,...t)}function Li(r,a,x){const t=bt(r);mr(t,"iterate",Ko);const w=t[a](...x);return(w===-1||w===!1)&&Ja(x[0])?(x[0]=bt(x[0]),t[a](...x)):w}function Lo(r,a,x=[]){An(),$a();const t=bt(r)[a].apply(r,x);return Ya(),Rn(),t}const sp=Va("__proto__,__v_isRef,__isVue"),od=new Set(Object.getOwnPropertyNames(Symbol).filter(r=>r!=="arguments"&&r!=="caller").map(r=>Symbol[r]).filter(hn));function ip(r){hn(r)||(r=String(r));const a=bt(this);return mr(a,"has",r),a.hasOwnProperty(r)}class sd{constructor(a=!1,x=!1){this._isReadonly=a,this._isShallow=x}get(a,x,t){if(x==="__v_skip")return a.__v_skip;const w=this._isReadonly,g=this._isShallow;if(x==="__v_isReactive")return!w;if(x==="__v_isReadonly")return w;if(x==="__v_isShallow")return g;if(x==="__v_raw")return t===(w?g?yp:ud:g?ld:ad).get(a)||Object.getPrototypeOf(a)===Object.getPrototypeOf(t)?a:void 0;const i=st(a);if(!w){let o;if(i&&(o=np[x]))return o;if(x==="hasOwnProperty")return ip}const u=Reflect.get(a,x,or(a)?a:t);return(hn(x)?od.has(x):sp(x))||(w||mr(a,"get",x),g)?u:or(u)?i&&qa(x)?u:u.value:At(u)?w?cd(u):Ln(u):u}}class id extends sd{constructor(a=!1){super(!1,a)}set(a,x,t,w){let g=a[x];if(!this._isShallow){const o=Pn(g);if(!Rr(t)&&!Pn(t)&&(g=bt(g),t=bt(t)),!st(a)&&or(g)&&!or(t))return o?!1:(g.value=t,!0)}const i=st(a)&&qa(x)?Number(x)r,vs=r=>Reflect.getPrototypeOf(r);function dp(r,a,x){return function(...t){const w=this.__v_raw,g=bt(w),i=co(g),u=r==="entries"||r===Symbol.iterator&&i,o=r==="keys"&&i,h=w[r](...t),y=x?sa:a?ia:yr;return!a&&mr(g,"iterate",o?oa:Hn),{next(){const{value:m,done:n}=h.next();return n?{value:m,done:n}:{value:u?[y(m[0]),y(m[1])]:y(m),done:n}},[Symbol.iterator](){return this}}}}function bs(r){return function(...a){return r==="delete"?!1:r==="clear"?void 0:this}}function fp(r,a){const x={get(w){const g=this.__v_raw,i=bt(g),u=bt(w);r||(Mn(w,u)&&mr(i,"get",w),mr(i,"get",u));const{has:o}=vs(i),h=a?sa:r?ia:yr;if(o.call(i,w))return h(g.get(w));if(o.call(i,u))return h(g.get(u));g!==i&&g.get(w)},get size(){const w=this.__v_raw;return!r&&mr(bt(w),"iterate",Hn),Reflect.get(w,"size",w)},has(w){const g=this.__v_raw,i=bt(g),u=bt(w);return r||(Mn(w,u)&&mr(i,"has",w),mr(i,"has",u)),w===u?g.has(w):g.has(w)||g.has(u)},forEach(w,g){const i=this,u=i.__v_raw,o=bt(u),h=a?sa:r?ia:yr;return!r&&mr(o,"iterate",Hn),u.forEach((y,m)=>w.call(g,h(y),h(m),i))}};return $t(x,r?{add:bs("add"),set:bs("set"),delete:bs("delete"),clear:bs("clear")}:{add(w){!a&&!Rr(w)&&!Pn(w)&&(w=bt(w));const g=bt(this);return vs(g).has.call(g,w)||(g.add(w),un(g,"add",w,w)),this},set(w,g){!a&&!Rr(g)&&!Pn(g)&&(g=bt(g));const i=bt(this),{has:u,get:o}=vs(i);let h=u.call(i,w);h||(w=bt(w),h=u.call(i,w));const y=o.call(i,w);return i.set(w,g),h?Mn(g,y)&&un(i,"set",w,g):un(i,"add",w,g),this},delete(w){const g=bt(this),{has:i,get:u}=vs(g);let o=i.call(g,w);o||(w=bt(w),o=i.call(g,w)),u&&u.call(g,w);const h=g.delete(w);return o&&un(g,"delete",w,void 0),h},clear(){const w=bt(this),g=w.size!==0,i=w.clear();return g&&un(w,"clear",void 0,void 0),i}}),["keys","values","entries",Symbol.iterator].forEach(w=>{x[w]=dp(w,r,a)}),x}function Za(r,a){const x=fp(r,a);return(t,w,g)=>w==="__v_isReactive"?!r:w==="__v_isReadonly"?r:w==="__v_raw"?t:Reflect.get(wt(x,w)&&w in t?x:t,w,g)}const hp={get:Za(!1,!1)},pp={get:Za(!1,!0)},mp={get:Za(!0,!1)};const ad=new WeakMap,ld=new WeakMap,ud=new WeakMap,yp=new WeakMap;function gp(r){switch(r){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function vp(r){return r.__v_skip||!Object.isExtensible(r)?0:gp(Hh(r))}function Ln(r){return Pn(r)?r:Qa(r,!1,lp,hp,ad)}function dn(r){return Qa(r,!1,cp,pp,ld)}function cd(r){return Qa(r,!0,up,mp,ud)}function Qa(r,a,x,t,w){if(!At(r)||r.__v_raw&&!(a&&r.__v_isReactive))return r;const g=w.get(r);if(g)return g;const i=vp(r);if(i===0)return r;const u=new Proxy(r,i===2?t:x);return w.set(r,u),u}function zn(r){return Pn(r)?zn(r.__v_raw):!!(r&&r.__v_isReactive)}function Pn(r){return!!(r&&r.__v_isReadonly)}function Rr(r){return!!(r&&r.__v_isShallow)}function Ja(r){return r?!!r.__v_raw:!1}function bt(r){const a=r&&r.__v_raw;return a?bt(a):r}function bp(r){return!wt(r,"__v_skip")&&Object.isExtensible(r)&&Hc(r,"__v_skip",!0),r}const yr=r=>At(r)?Ln(r):r,ia=r=>At(r)?cd(r):r;function or(r){return r?r.__v_isRef===!0:!1}function mt(r){return dd(r,!1)}function Zo(r){return dd(r,!0)}function dd(r,a){return or(r)?r:new _p(r,a)}class _p{constructor(a,x){this.dep=new si,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=x?a:bt(a),this._value=x?a:yr(a),this.__v_isShallow=x}get value(){return this.dep.track(),this._value}set value(a){const x=this._rawValue,t=this.__v_isShallow||Rr(a)||Pn(a);a=t?a:bt(a),Mn(a,x)&&(this._rawValue=a,this._value=t?a:yr(a),this.dep.trigger())}}function Nt(r){return or(r)?r.value:r}function Q_(r){return at(r)?r():Nt(r)}const xp={get:(r,a,x)=>a==="__v_raw"?r:Nt(Reflect.get(r,a,x)),set:(r,a,x,t)=>{const w=r[a];return or(w)&&!or(x)?(w.value=x,!0):Reflect.set(r,a,x,t)}};function fd(r){return zn(r)?r:new Proxy(r,xp)}class wp{constructor(a){this.__v_isRef=!0,this._value=void 0;const x=this.dep=new si,{get:t,set:w}=a(x.track.bind(x),x.trigger.bind(x));this._get=t,this._set=w}get value(){return this._value=this._get()}set value(a){this._set(a)}}function J_(r){return new wp(r)}function ex(r){const a=st(r)?new Array(r.length):{};for(const x in r)a[x]=hd(r,x);return a}class jp{constructor(a,x,t){this._object=a,this._key=x,this._defaultValue=t,this.__v_isRef=!0,this._value=void 0}get value(){const a=this._object[this._key];return this._value=a===void 0?this._defaultValue:a}set value(a){this._object[this._key]=a}get dep(){return rp(bt(this._object),this._key)}}class Sp{constructor(a){this._getter=a,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function Ep(r,a,x){return or(r)?r:at(r)?new Sp(r):At(r)&&arguments.length>1?hd(r,a,x):mt(r)}function hd(r,a,x){const t=r[a];return or(t)?t:new jp(r,a,x)}class Tp{constructor(a,x,t){this.fn=a,this.setter=x,this._value=void 0,this.dep=new si(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Yo-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!x,this.isSSR=t}notify(){if(this.flags|=16,!(this.flags&8)&&Pt!==this)return Qc(this,!0),!0}get value(){const a=this.dep.track();return td(this),a&&(a.version=this.dep.version),this._value}set value(a){this.setter&&this.setter(a)}}function kp(r,a,x=!1){let t,w;return at(r)?t=r:(t=r.get,w=r.set),new Tp(t,w,x)}const _s={},Ns=new WeakMap;let Bn;function Mp(r,a=!1,x=Bn){if(x){let t=Ns.get(x);t||Ns.set(x,t=[]),t.push(r)}}function Cp(r,a,x=Mt){const{immediate:t,deep:w,once:g,scheduler:i,augmentJob:u,call:o}=x,h=v=>w?v:Rr(v)||w===!1||w===0?cn(v,1):cn(v);let y,m,n,s,c=!1,f=!1;if(or(r)?(m=()=>r.value,c=Rr(r)):zn(r)?(m=()=>h(r),c=!0):st(r)?(f=!0,c=r.some(v=>zn(v)||Rr(v)),m=()=>r.map(v=>{if(or(v))return v.value;if(zn(v))return h(v);if(at(v))return o?o(v,2):v()})):at(r)?a?m=o?()=>o(r,2):r:m=()=>{if(n){An();try{n()}finally{Rn()}}const v=Bn;Bn=y;try{return o?o(r,3,[s]):r(s)}finally{Bn=v}}:m=Qr,a&&w){const v=m,j=w===!0?1/0:w;m=()=>cn(v(),j)}const p=Yc(),d=()=>{y.stop(),p&&p.active&&za(p.effects,y)};if(g&&a){const v=a;a=(...j)=>{v(...j),d()}}let l=f?new Array(r.length).fill(_s):_s;const b=v=>{if(!(!(y.flags&1)||!y.dirty&&!v))if(a){const j=y.run();if(w||c||(f?j.some((E,T)=>Mn(E,l[T])):Mn(j,l))){n&&n();const E=Bn;Bn=y;try{const T=[j,l===_s?void 0:f&&l[0]===_s?[]:l,s];o?o(a,3,T):a(...T),l=j}finally{Bn=E}}}else y.run()};return u&&u(b),y=new Kc(m),y.scheduler=i?()=>i(b,!1):b,s=v=>Mp(v,!1,y),n=y.onStop=()=>{const v=Ns.get(y);if(v){if(o)o(v,4);else for(const j of v)j();Ns.delete(y)}},a?t?b(!0):l=y.run():i?i(b.bind(null,!0),!0):y.run(),d.pause=y.pause.bind(y),d.resume=y.resume.bind(y),d.stop=d,d}function cn(r,a=1/0,x){if(a<=0||!At(r)||r.__v_skip||(x=x||new Set,x.has(r)))return r;if(x.add(r),a--,or(r))cn(r.value,a,x);else if(st(r))for(let t=0;t{cn(t,a,x)});else if(Vc(r)){for(const t in r)cn(r[t],a,x);for(const t of Object.getOwnPropertySymbols(r))Object.prototype.propertyIsEnumerable.call(r,t)&&cn(r[t],a,x)}return r}/** +**/let _r;class $c{constructor(a=!1){this.detached=a,this._active=!0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=_r,!a&&_r&&(this.index=(_r.scopes||(_r.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let a,x;if(this.scopes)for(a=0,x=this.scopes.length;a0)return;if(Bo){let a=Bo;for(Bo=void 0;a;){const x=a.next;a.next=void 0,a.flags&=-9,a=x}}let r;for(;Uo;){let a=Uo;for(Uo=void 0;a;){const x=a.next;if(a.next=void 0,a.flags&=-9,a.flags&1)try{a.trigger()}catch(t){r||(r=t)}a=x}}if(r)throw r}function Jc(r){for(let a=r.deps;a;a=a.nextDep)a.version=-1,a.prevActiveLink=a.dep.activeLink,a.dep.activeLink=a}function ed(r){let a,x=r.depsTail,t=x;for(;t;){const w=t.prevDep;t.version===-1?(t===x&&(x=w),Ka(t),Jh(t)):a=t,t.dep.activeLink=t.prevActiveLink,t.prevActiveLink=void 0,t=w}r.deps=a,r.depsTail=x}function na(r){for(let a=r.deps;a;a=a.nextDep)if(a.dep.version!==a.version||a.dep.computed&&(td(a.dep.computed)||a.dep.version!==a.version))return!0;return!!r._dirty}function td(r){if(r.flags&4&&!(r.flags&16)||(r.flags&=-17,r.globalVersion===$o))return;r.globalVersion=$o;const a=r.dep;if(r.flags|=2,a.version>0&&!r.isSSR&&r.deps&&!na(r)){r.flags&=-3;return}const x=Pt,t=Gr;Pt=r,Gr=!0;try{Jc(r);const w=r.fn(r._value);(a.version===0||Cn(w,r._value))&&(r._value=w,a.version++)}catch(w){throw a.version++,w}finally{Pt=x,Gr=t,ed(r),r.flags&=-3}}function Ka(r,a=!1){const{dep:x,prevSub:t,nextSub:w}=r;if(t&&(t.nextSub=w,r.prevSub=void 0),w&&(w.prevSub=t,r.nextSub=void 0),x.subs===r&&(x.subs=t,!t&&x.computed)){x.computed.flags&=-5;for(let g=x.computed.deps;g;g=g.nextDep)Ka(g,!0)}!a&&!--x.sc&&x.map&&x.map.delete(x.key)}function Jh(r){const{prevDep:a,nextDep:x}=r;a&&(a.nextDep=x,r.prevDep=void 0),x&&(x.prevDep=a,r.nextDep=void 0)}let Gr=!0;const rd=[];function Rn(){rd.push(Gr),Gr=!1}function Ln(){const r=rd.pop();Gr=r===void 0?!0:r}function lu(r){const{cleanup:a}=r;if(r.cleanup=void 0,a){const x=Pt;Pt=void 0;try{a()}finally{Pt=x}}}let $o=0;class ep{constructor(a,x){this.sub=a,this.dep=x,this.version=x.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class oi{constructor(a){this.computed=a,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0}track(a){if(!Pt||!Gr||Pt===this.computed)return;let x=this.activeLink;if(x===void 0||x.sub!==Pt)x=this.activeLink=new ep(Pt,this),Pt.deps?(x.prevDep=Pt.depsTail,Pt.depsTail.nextDep=x,Pt.depsTail=x):Pt.deps=Pt.depsTail=x,nd(x);else if(x.version===-1&&(x.version=this.version,x.nextDep)){const t=x.nextDep;t.prevDep=x.prevDep,x.prevDep&&(x.prevDep.nextDep=t),x.prevDep=Pt.depsTail,x.nextDep=void 0,Pt.depsTail.nextDep=x,Pt.depsTail=x,Pt.deps===x&&(Pt.deps=t)}return x}trigger(a){this.version++,$o++,this.notify(a)}notify(a){$a();try{for(let x=this.subs;x;x=x.prevSub)x.sub.notify()&&x.sub.dep.notify()}finally{Ya()}}}function nd(r){if(r.dep.sc++,r.sub.flags&4){const a=r.dep.computed;if(a&&!r.dep.subs){a.flags|=20;for(let t=a.deps;t;t=t.nextDep)nd(t)}const x=r.dep.subs;x!==r&&(r.prevSub=x,x&&(x.nextSub=r)),r.dep.subs=r}}const Ds=new WeakMap,zn=Symbol(""),oa=Symbol(""),Yo=Symbol("");function mr(r,a,x){if(Gr&&Pt){let t=Ds.get(r);t||Ds.set(r,t=new Map);let w=t.get(x);w||(t.set(x,w=new oi),w.map=t,w.key=x),w.track()}}function cn(r,a,x,t,w,g){const i=Ds.get(r);if(!i){$o++;return}const u=o=>{o&&o.trigger()};if($a(),a==="clear")i.forEach(u);else{const o=st(r),h=o&&qa(x);if(o&&x==="length"){const y=Number(t);i.forEach((m,n)=>{(n==="length"||n===Yo||!pn(n)&&n>=y)&&u(m)})}else switch((x!==void 0||i.has(void 0))&&u(i.get(x)),h&&u(i.get(Yo)),a){case"add":o?h&&u(i.get("length")):(u(i.get(zn)),fo(r)&&u(i.get(oa)));break;case"delete":o||(u(i.get(zn)),fo(r)&&u(i.get(oa)));break;case"set":fo(r)&&u(i.get(zn));break}}Ya()}function tp(r,a){const x=Ds.get(r);return x&&x.get(a)}function no(r){const a=_t(r);return a===r?a:(mr(a,"iterate",Yo),Rr(r)?a:a.map(yr))}function si(r){return mr(r=_t(r),"iterate",Yo),r}const rp={__proto__:null,[Symbol.iterator](){return Ri(this,Symbol.iterator,yr)},concat(...r){return no(this).concat(...r.map(a=>st(a)?no(a):a))},entries(){return Ri(this,"entries",r=>(r[1]=yr(r[1]),r))},every(r,a){return on(this,"every",r,a,void 0,arguments)},filter(r,a){return on(this,"filter",r,a,x=>x.map(yr),arguments)},find(r,a){return on(this,"find",r,a,yr,arguments)},findIndex(r,a){return on(this,"findIndex",r,a,void 0,arguments)},findLast(r,a){return on(this,"findLast",r,a,yr,arguments)},findLastIndex(r,a){return on(this,"findLastIndex",r,a,void 0,arguments)},forEach(r,a){return on(this,"forEach",r,a,void 0,arguments)},includes(...r){return Li(this,"includes",r)},indexOf(...r){return Li(this,"indexOf",r)},join(r){return no(this).join(r)},lastIndexOf(...r){return Li(this,"lastIndexOf",r)},map(r,a){return on(this,"map",r,a,void 0,arguments)},pop(){return Lo(this,"pop")},push(...r){return Lo(this,"push",r)},reduce(r,...a){return uu(this,"reduce",r,a)},reduceRight(r,...a){return uu(this,"reduceRight",r,a)},shift(){return Lo(this,"shift")},some(r,a){return on(this,"some",r,a,void 0,arguments)},splice(...r){return Lo(this,"splice",r)},toReversed(){return no(this).toReversed()},toSorted(r){return no(this).toSorted(r)},toSpliced(...r){return no(this).toSpliced(...r)},unshift(...r){return Lo(this,"unshift",r)},values(){return Ri(this,"values",yr)}};function Ri(r,a,x){const t=si(r),w=t[a]();return t!==r&&!Rr(r)&&(w._next=w.next,w.next=()=>{const g=w._next();return g.value&&(g.value=x(g.value)),g}),w}const np=Array.prototype;function on(r,a,x,t,w,g){const i=si(r),u=i!==r&&!Rr(r),o=i[a];if(o!==np[a]){const m=o.apply(r,g);return u?yr(m):m}let h=x;i!==r&&(u?h=function(m,n){return x.call(this,yr(m),n,r)}:x.length>2&&(h=function(m,n){return x.call(this,m,n,r)}));const y=o.call(i,h,t);return u&&w?w(y):y}function uu(r,a,x,t){const w=si(r);let g=x;return w!==r&&(Rr(r)?x.length>3&&(g=function(i,u,o){return x.call(this,i,u,o,r)}):g=function(i,u,o){return x.call(this,i,yr(u),o,r)}),w[a](g,...t)}function Li(r,a,x){const t=_t(r);mr(t,"iterate",Yo);const w=t[a](...x);return(w===-1||w===!1)&&Ja(x[0])?(x[0]=_t(x[0]),t[a](...x)):w}function Lo(r,a,x=[]){Rn(),$a();const t=_t(r)[a].apply(r,x);return Ya(),Ln(),t}const op=Va("__proto__,__v_isRef,__isVue"),od=new Set(Object.getOwnPropertyNames(Symbol).filter(r=>r!=="arguments"&&r!=="caller").map(r=>Symbol[r]).filter(pn));function sp(r){pn(r)||(r=String(r));const a=_t(this);return mr(a,"has",r),a.hasOwnProperty(r)}class sd{constructor(a=!1,x=!1){this._isReadonly=a,this._isShallow=x}get(a,x,t){if(x==="__v_skip")return a.__v_skip;const w=this._isReadonly,g=this._isShallow;if(x==="__v_isReactive")return!w;if(x==="__v_isReadonly")return w;if(x==="__v_isShallow")return g;if(x==="__v_raw")return t===(w?g?mp:ud:g?ld:ad).get(a)||Object.getPrototypeOf(a)===Object.getPrototypeOf(t)?a:void 0;const i=st(a);if(!w){let o;if(i&&(o=rp[x]))return o;if(x==="hasOwnProperty")return sp}const u=Reflect.get(a,x,or(a)?a:t);return(pn(x)?od.has(x):op(x))||(w||mr(a,"get",x),g)?u:or(u)?i&&qa(x)?u:u.value:At(u)?w?cd(u):In(u):u}}class id extends sd{constructor(a=!1){super(!1,a)}set(a,x,t,w){let g=a[x];if(!this._isShallow){const o=An(g);if(!Rr(t)&&!An(t)&&(g=_t(g),t=_t(t)),!st(a)&&or(g)&&!or(t))return o?!1:(g.value=t,!0)}const i=st(a)&&qa(x)?Number(x)r,gs=r=>Reflect.getPrototypeOf(r);function cp(r,a,x){return function(...t){const w=this.__v_raw,g=_t(w),i=fo(g),u=r==="entries"||r===Symbol.iterator&&i,o=r==="keys"&&i,h=w[r](...t),y=x?sa:a?ia:yr;return!a&&mr(g,"iterate",o?oa:zn),{next(){const{value:m,done:n}=h.next();return n?{value:m,done:n}:{value:u?[y(m[0]),y(m[1])]:y(m),done:n}},[Symbol.iterator](){return this}}}}function vs(r){return function(...a){return r==="delete"?!1:r==="clear"?void 0:this}}function dp(r,a){const x={get(w){const g=this.__v_raw,i=_t(g),u=_t(w);r||(Cn(w,u)&&mr(i,"get",w),mr(i,"get",u));const{has:o}=gs(i),h=a?sa:r?ia:yr;if(o.call(i,w))return h(g.get(w));if(o.call(i,u))return h(g.get(u));g!==i&&g.get(w)},get size(){const w=this.__v_raw;return!r&&mr(_t(w),"iterate",zn),Reflect.get(w,"size",w)},has(w){const g=this.__v_raw,i=_t(g),u=_t(w);return r||(Cn(w,u)&&mr(i,"has",w),mr(i,"has",u)),w===u?g.has(w):g.has(w)||g.has(u)},forEach(w,g){const i=this,u=i.__v_raw,o=_t(u),h=a?sa:r?ia:yr;return!r&&mr(o,"iterate",zn),u.forEach((y,m)=>w.call(g,h(y),h(m),i))}};return $t(x,r?{add:vs("add"),set:vs("set"),delete:vs("delete"),clear:vs("clear")}:{add(w){!a&&!Rr(w)&&!An(w)&&(w=_t(w));const g=_t(this);return gs(g).has.call(g,w)||(g.add(w),cn(g,"add",w,w)),this},set(w,g){!a&&!Rr(g)&&!An(g)&&(g=_t(g));const i=_t(this),{has:u,get:o}=gs(i);let h=u.call(i,w);h||(w=_t(w),h=u.call(i,w));const y=o.call(i,w);return i.set(w,g),h?Cn(g,y)&&cn(i,"set",w,g):cn(i,"add",w,g),this},delete(w){const g=_t(this),{has:i,get:u}=gs(g);let o=i.call(g,w);o||(w=_t(w),o=i.call(g,w)),u&&u.call(g,w);const h=g.delete(w);return o&&cn(g,"delete",w,void 0),h},clear(){const w=_t(this),g=w.size!==0,i=w.clear();return g&&cn(w,"clear",void 0,void 0),i}}),["keys","values","entries",Symbol.iterator].forEach(w=>{x[w]=cp(w,r,a)}),x}function Za(r,a){const x=dp(r,a);return(t,w,g)=>w==="__v_isReactive"?!r:w==="__v_isReadonly"?r:w==="__v_raw"?t:Reflect.get(jt(x,w)&&w in t?x:t,w,g)}const fp={get:Za(!1,!1)},hp={get:Za(!1,!0)},pp={get:Za(!0,!1)};const ad=new WeakMap,ld=new WeakMap,ud=new WeakMap,mp=new WeakMap;function yp(r){switch(r){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function gp(r){return r.__v_skip||!Object.isExtensible(r)?0:yp(Vh(r))}function In(r){return An(r)?r:Qa(r,!1,ap,fp,ad)}function fn(r){return Qa(r,!1,up,hp,ld)}function cd(r){return Qa(r,!0,lp,pp,ud)}function Qa(r,a,x,t,w){if(!At(r)||r.__v_raw&&!(a&&r.__v_isReactive))return r;const g=w.get(r);if(g)return g;const i=gp(r);if(i===0)return r;const u=new Proxy(r,i===2?t:x);return w.set(r,u),u}function Wn(r){return An(r)?Wn(r.__v_raw):!!(r&&r.__v_isReactive)}function An(r){return!!(r&&r.__v_isReadonly)}function Rr(r){return!!(r&&r.__v_isShallow)}function Ja(r){return r?!!r.__v_raw:!1}function _t(r){const a=r&&r.__v_raw;return a?_t(a):r}function vp(r){return!jt(r,"__v_skip")&&Object.isExtensible(r)&&Hc(r,"__v_skip",!0),r}const yr=r=>At(r)?In(r):r,ia=r=>At(r)?cd(r):r;function or(r){return r?r.__v_isRef===!0:!1}function mt(r){return dd(r,!1)}function Ko(r){return dd(r,!0)}function dd(r,a){return or(r)?r:new bp(r,a)}class bp{constructor(a,x){this.dep=new oi,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=x?a:_t(a),this._value=x?a:yr(a),this.__v_isShallow=x}get value(){return this.dep.track(),this._value}set value(a){const x=this._rawValue,t=this.__v_isShallow||Rr(a)||An(a);a=t?a:_t(a),Cn(a,x)&&(this._rawValue=a,this._value=t?a:yr(a),this.dep.trigger())}}function Vt(r){return or(r)?r.value:r}function $_(r){return at(r)?r():Vt(r)}const _p={get:(r,a,x)=>a==="__v_raw"?r:Vt(Reflect.get(r,a,x)),set:(r,a,x,t)=>{const w=r[a];return or(w)&&!or(x)?(w.value=x,!0):Reflect.set(r,a,x,t)}};function fd(r){return Wn(r)?r:new Proxy(r,_p)}class xp{constructor(a){this.__v_isRef=!0,this._value=void 0;const x=this.dep=new oi,{get:t,set:w}=a(x.track.bind(x),x.trigger.bind(x));this._get=t,this._set=w}get value(){return this._value=this._get()}set value(a){this._set(a)}}function Y_(r){return new xp(r)}function K_(r){const a=st(r)?new Array(r.length):{};for(const x in r)a[x]=hd(r,x);return a}class wp{constructor(a,x,t){this._object=a,this._key=x,this._defaultValue=t,this.__v_isRef=!0,this._value=void 0}get value(){const a=this._object[this._key];return this._value=a===void 0?this._defaultValue:a}set value(a){this._object[this._key]=a}get dep(){return tp(_t(this._object),this._key)}}class jp{constructor(a){this._getter=a,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function Sp(r,a,x){return or(r)?r:at(r)?new jp(r):At(r)&&arguments.length>1?hd(r,a,x):mt(r)}function hd(r,a,x){const t=r[a];return or(t)?t:new wp(r,a,x)}class Ep{constructor(a,x,t){this.fn=a,this.setter=x,this._value=void 0,this.dep=new oi(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=$o-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!x,this.isSSR=t}notify(){if(this.flags|=16,!(this.flags&8)&&Pt!==this)return Qc(this,!0),!0}get value(){const a=this.dep.track();return td(this),a&&(a.version=this.dep.version),this._value}set value(a){this.setter&&this.setter(a)}}function Tp(r,a,x=!1){let t,w;return at(r)?t=r:(t=r.get,w=r.set),new Ep(t,w,x)}const bs={},Fs=new WeakMap;let Gn;function kp(r,a=!1,x=Gn){if(x){let t=Fs.get(x);t||Fs.set(x,t=[]),t.push(r)}}function Mp(r,a,x=Mt){const{immediate:t,deep:w,once:g,scheduler:i,augmentJob:u,call:o}=x,h=v=>w?v:Rr(v)||w===!1||w===0?dn(v,1):dn(v);let y,m,n,s,c=!1,f=!1;if(or(r)?(m=()=>r.value,c=Rr(r)):Wn(r)?(m=()=>h(r),c=!0):st(r)?(f=!0,c=r.some(v=>Wn(v)||Rr(v)),m=()=>r.map(v=>{if(or(v))return v.value;if(Wn(v))return h(v);if(at(v))return o?o(v,2):v()})):at(r)?a?m=o?()=>o(r,2):r:m=()=>{if(n){Rn();try{n()}finally{Ln()}}const v=Gn;Gn=y;try{return o?o(r,3,[s]):r(s)}finally{Gn=v}}:m=Qr,a&&w){const v=m,j=w===!0?1/0:w;m=()=>dn(v(),j)}const p=Yc(),d=()=>{y.stop(),p&&p.active&&za(p.effects,y)};if(g&&a){const v=a;a=(...j)=>{v(...j),d()}}let l=f?new Array(r.length).fill(bs):bs;const b=v=>{if(!(!(y.flags&1)||!y.dirty&&!v))if(a){const j=y.run();if(w||c||(f?j.some((E,T)=>Cn(E,l[T])):Cn(j,l))){n&&n();const E=Gn;Gn=y;try{const T=[j,l===bs?void 0:f&&l[0]===bs?[]:l,s];o?o(a,3,T):a(...T),l=j}finally{Gn=E}}}else y.run()};return u&&u(b),y=new Kc(m),y.scheduler=i?()=>i(b,!1):b,s=v=>kp(v,!1,y),n=y.onStop=()=>{const v=Fs.get(y);if(v){if(o)o(v,4);else for(const j of v)j();Fs.delete(y)}},a?t?b(!0):l=y.run():i?i(b.bind(null,!0),!0):y.run(),d.pause=y.pause.bind(y),d.resume=y.resume.bind(y),d.stop=d,d}function dn(r,a=1/0,x){if(a<=0||!At(r)||r.__v_skip||(x=x||new Set,x.has(r)))return r;if(x.add(r),a--,or(r))dn(r.value,a,x);else if(st(r))for(let t=0;t{dn(t,a,x)});else if(Vc(r)){for(const t in r)dn(r[t],a,x);for(const t of Object.getOwnPropertySymbols(r))Object.prototype.propertyIsEnumerable.call(r,t)&&dn(r[t],a,x)}return r}/** * @vue/runtime-core v3.5.13 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/function is(r,a,x,t){try{return t?r(...t):r()}catch(w){wo(w,a,x)}}function Hr(r,a,x,t){if(at(r)){const w=is(r,a,x,t);return w&&Wa(w)&&w.catch(g=>{wo(g,a,x)}),w}if(st(r)){const w=[];for(let g=0;g>>1,w=xr[t],g=Qo(w);g=Qo(x)?xr.push(r):xr.splice(Pp(a),0,r),r.flags|=1,md()}}function md(){Us||(Us=pd.then(yd))}function aa(r){st(r)?po.push(...r):_n&&r.id===-1?_n.splice(oo+1,0,r):r.flags&1||(po.push(r),r.flags|=1),md()}function cu(r,a,x=Kr+1){for(;xQo(x)-Qo(t));if(po.length=0,_n){_n.push(...a);return}for(_n=a,oo=0;oo<_n.length;oo++){const x=_n[oo];x.flags&4&&(x.flags&=-2),x.flags&8||x(),x.flags&=-2}_n=null,oo=0}}const Qo=r=>r.id==null?r.flags&2?-1:1/0:r.id;function yd(r){try{for(Kr=0;Kr{t._d&&ju(-1);const g=Gs(a);let i;try{i=r(...w)}finally{Gs(g),t._d&&ju(1)}return i};return t._n=!0,t._c=!0,t._d=!0,t}function tx(r,a){if(Qt===null)return r;const x=ci(Qt),t=r.dirs||(r.dirs=[]);for(let w=0;wr.__isTeleport,xn=Symbol("_leaveCb"),xs=Symbol("_enterCb");function Rp(){const r={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Vr(()=>{r.isMounted=!0}),ls(()=>{r.isUnmounting=!0}),r}const Ar=[Function,Array],bd={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Ar,onEnter:Ar,onAfterEnter:Ar,onEnterCancelled:Ar,onBeforeLeave:Ar,onLeave:Ar,onAfterLeave:Ar,onLeaveCancelled:Ar,onBeforeAppear:Ar,onAppear:Ar,onAfterAppear:Ar,onAppearCancelled:Ar},_d=r=>{const a=r.subTree;return a.component?_d(a.component):a},Lp={name:"BaseTransition",props:bd,setup(r,{slots:a}){const x=Zn(),t=Rp();return()=>{const w=a.default&&jd(a.default(),!0);if(!w||!w.length)return;const g=xd(w),i=bt(r),{mode:u}=i;if(t.isLeaving)return Ii(g);const o=du(g);if(!o)return Ii(g);let h=la(o,i,t,x,m=>h=m);o.type!==Kt&&go(o,h);let y=x.subTree&&du(x.subTree);if(y&&y.type!==Kt&&!Br(o,y)&&_d(x).type!==Kt){let m=la(y,i,t,x);if(go(y,m),u==="out-in"&&o.type!==Kt)return t.isLeaving=!0,m.afterLeave=()=>{t.isLeaving=!1,x.job.flags&8||x.update(),delete m.afterLeave,y=void 0},Ii(g);u==="in-out"&&o.type!==Kt?m.delayLeave=(n,s,c)=>{const f=wd(t,y);f[String(y.key)]=y,n[xn]=()=>{s(),n[xn]=void 0,delete h.delayedLeave,y=void 0},h.delayedLeave=()=>{c(),delete h.delayedLeave,y=void 0}}:y=void 0}else y&&(y=void 0);return g}}};function xd(r){let a=r[0];if(r.length>1){for(const x of r)if(x.type!==Kt){a=x;break}}return a}const Ip=Lp;function wd(r,a){const{leavingVNodes:x}=r;let t=x.get(a.type);return t||(t=Object.create(null),x.set(a.type,t)),t}function la(r,a,x,t,w){const{appear:g,mode:i,persisted:u=!1,onBeforeEnter:o,onEnter:h,onAfterEnter:y,onEnterCancelled:m,onBeforeLeave:n,onLeave:s,onAfterLeave:c,onLeaveCancelled:f,onBeforeAppear:p,onAppear:d,onAfterAppear:l,onAppearCancelled:b}=a,v=String(r.key),j=wd(x,r),E=(P,R)=>{P&&Hr(P,t,9,R)},T=(P,R)=>{const C=R[1];E(P,R),st(P)?P.every(I=>I.length<=1)&&C():P.length<=1&&C()},M={mode:i,persisted:u,beforeEnter(P){let R=o;if(!x.isMounted)if(g)R=p||o;else return;P[xn]&&P[xn](!0);const C=j[v];C&&Br(r,C)&&C.el[xn]&&C.el[xn](),E(R,[P])},enter(P){let R=h,C=y,I=m;if(!x.isMounted)if(g)R=d||h,C=l||y,I=b||m;else return;let A=!1;const N=P[xs]=F=>{A||(A=!0,F?E(I,[P]):E(C,[P]),M.delayedLeave&&M.delayedLeave(),P[xs]=void 0)};R?T(R,[P,N]):N()},leave(P,R){const C=String(r.key);if(P[xs]&&P[xs](!0),x.isUnmounting)return R();E(n,[P]);let I=!1;const A=P[xn]=N=>{I||(I=!0,R(),N?E(f,[P]):E(c,[P]),P[xn]=void 0,j[C]===r&&delete j[C])};j[C]=r,s?T(s,[P,A]):A()},clone(P){const R=la(P,a,x,t,w);return w&&w(R),R}};return M}function Ii(r){if(as(r))return r=en(r),r.children=null,r}function du(r){if(!as(r))return vd(r.type)&&r.children?xd(r.children):r;const{shapeFlag:a,children:x}=r;if(x){if(a&16)return x[0];if(a&32&&at(x.default))return x.default()}}function go(r,a){r.shapeFlag&6&&r.component?(r.transition=a,go(r.component.subTree,a)):r.shapeFlag&128?(r.ssContent.transition=a.clone(r.ssContent),r.ssFallback.transition=a.clone(r.ssFallback)):r.transition=a}function jd(r,a=!1,x){let t=[],w=0;for(let g=0;g1)for(let g=0;gJo(c,a&&(st(a)?a[f]:a),x,t,w));return}if(Cn(t)&&!w){t.shapeFlag&512&&t.type.__asyncResolved&&t.component.subTree.component&&Jo(r,a,x,t.component.subTree);return}const g=t.shapeFlag&4?ci(t.component):t.el,i=w?null:g,{i:u,r:o}=r,h=a&&a.r,y=u.refs===Mt?u.refs={}:u.refs,m=u.setupState,n=bt(m),s=m===Mt?()=>!1:c=>wt(n,c);if(h!=null&&h!==o&&(Bt(h)?(y[h]=null,s(h)&&(m[h]=null)):or(h)&&(h.value=null)),at(o))is(o,u,12,[i,y]);else{const c=Bt(o),f=or(o);if(c||f){const p=()=>{if(r.f){const d=c?s(o)?m[o]:y[o]:o.value;w?st(d)&&za(d,g):st(d)?d.includes(g)||d.push(g):c?(y[o]=[g],s(o)&&(m[o]=y[o])):(o.value=[g],r.k&&(y[r.k]=o.value))}else c?(y[o]=i,s(o)&&(m[o]=i)):f&&(o.value=i,r.k&&(y[r.k]=i))};i?(p.id=-1,lr(p,x)):p()}}}let fu=!1;const no=()=>{fu||(console.error("Hydration completed but contains mismatches."),fu=!0)},Fp=r=>r.namespaceURI.includes("svg")&&r.tagName!=="foreignObject",Np=r=>r.namespaceURI.includes("MathML"),ws=r=>{if(r.nodeType===1){if(Fp(r))return"svg";if(Np(r))return"mathml"}},ao=r=>r.nodeType===8;function Up(r){const{mt:a,p:x,o:{patchProp:t,createText:w,nextSibling:g,parentNode:i,remove:u,insert:o,createComment:h}}=r,y=(b,v)=>{if(!v.hasChildNodes()){x(null,b,v),Bs(),v._vnode=b;return}m(v.firstChild,b,null,null,null),Bs(),v._vnode=b},m=(b,v,j,E,T,M=!1)=>{M=M||!!v.dynamicChildren;const P=ao(b)&&b.data==="[",R=()=>f(b,v,j,E,T,P),{type:C,ref:I,shapeFlag:A,patchFlag:N}=v;let F=b.nodeType;v.el=b,N===-2&&(M=!1,v.dynamicChildren=null);let U=null;switch(C){case qn:F!==3?v.children===""?(o(v.el=w(""),i(b),b),U=b):U=R():(b.data!==v.children&&(no(),b.data=v.children),U=g(b));break;case Kt:l(b)?(U=g(b),d(v.el=b.content.firstChild,b,j)):F!==8||P?U=R():U=g(b);break;case Vo:if(P&&(b=g(b),F=b.nodeType),F===1||F===3){U=b;const W=!v.children.length;for(let V=0;V{M=M||!!v.dynamicChildren;const{type:P,props:R,patchFlag:C,shapeFlag:I,dirs:A,transition:N}=v,F=P==="input"||P==="option";if(F||C!==-1){A&&Zr(v,null,j,"created");let U=!1;if(l(b)){U=qd(null,N)&&j&&j.vnode.props&&j.vnode.props.appear;const V=b.content.firstChild;U&&N.beforeEnter(V),d(V,b,j),v.el=b=V}if(I&16&&!(R&&(R.innerHTML||R.textContent))){let V=s(b.firstChild,v,b,j,E,T,M);for(;V;){js(b,1)||no();const H=V;V=V.nextSibling,u(H)}}else if(I&8){let V=v.children;V[0]===` -`&&(b.tagName==="PRE"||b.tagName==="TEXTAREA")&&(V=V.slice(1)),b.textContent!==V&&(js(b,0)||no(),b.textContent=v.children)}if(R){if(F||!M||C&48){const V=b.tagName.includes("-");for(const H in R)(F&&(H.endsWith("value")||H==="indeterminate")||os(H)&&!fo(H)||H[0]==="."||V)&&t(b,H,null,R[H],void 0,j)}else if(R.onClick)t(b,"onClick",null,R.onClick,void 0,j);else if(C&4&&zn(R.style))for(const V in R.style)R.style[V]}let W;(W=R&&R.onVnodeBeforeMount)&&Er(W,j,v),A&&Zr(v,null,j,"beforeMount"),((W=R&&R.onVnodeMounted)||A||U)&&Qd(()=>{W&&Er(W,j,v),U&&N.enter(b),A&&Zr(v,null,j,"mounted")},E)}return b.nextSibling},s=(b,v,j,E,T,M,P)=>{P=P||!!v.dynamicChildren;const R=v.children,C=R.length;for(let I=0;I{const{slotScopeIds:P}=v;P&&(T=T?T.concat(P):P);const R=i(b),C=s(g(b),v,R,j,E,T,M);return C&&ao(C)&&C.data==="]"?g(v.anchor=C):(no(),o(v.anchor=h("]"),R,C),C)},f=(b,v,j,E,T,M)=>{if(js(b.parentElement,1)||no(),v.el=null,M){const C=p(b);for(;;){const I=g(b);if(I&&I!==C)u(I);else break}}const P=g(b),R=i(b);return u(b),x(null,v,R,P,j,E,ws(R),T),j&&(j.vnode.el=v.el,ui(j,v.el)),P},p=(b,v="[",j="]")=>{let E=0;for(;b;)if(b=g(b),b&&ao(b)&&(b.data===v&&E++,b.data===j)){if(E===0)return g(b);E--}return b},d=(b,v,j)=>{const E=v.parentNode;E&&E.replaceChild(b,v);let T=j;for(;T;)T.vnode.el===v&&(T.vnode.el=T.subTree.el=b),T=T.parent},l=b=>b.nodeType===1&&b.tagName==="TEMPLATE";return[y,m]}const hu="data-allow-mismatch",Bp={0:"text",1:"children",2:"class",3:"style",4:"attribute"};function js(r,a){if(a===0||a===1)for(;r&&!r.hasAttribute(hu);)r=r.parentElement;const x=r&&r.getAttribute(hu);if(x==null)return!1;if(x==="")return!0;{const t=x.split(",");return a===0&&t.includes("children")?!0:x.split(",").includes(Bp[a])}}oi().requestIdleCallback;oi().cancelIdleCallback;function Gp(r,a){if(ao(r)&&r.data==="["){let x=1,t=r.nextSibling;for(;t;){if(t.nodeType===1){if(a(t)===!1)break}else if(ao(t))if(t.data==="]"){if(--x===0)break}else t.data==="["&&x++;t=t.nextSibling}}else a(r)}const Cn=r=>!!r.type.__asyncLoader;/*! #__NO_SIDE_EFFECTS__ */function dt(r){at(r)&&(r={loader:r});const{loader:a,loadingComponent:x,errorComponent:t,delay:w=200,hydrate:g,timeout:i,suspensible:u=!0,onError:o}=r;let h=null,y,m=0;const n=()=>(m++,h=null,s()),s=()=>{let c;return h||(c=h=a().catch(f=>{if(f=f instanceof Error?f:new Error(String(f)),o)return new Promise((p,d)=>{o(f,()=>p(n()),()=>d(f),m+1)});throw f}).then(f=>c!==h&&h?h:(f&&(f.__esModule||f[Symbol.toStringTag]==="Module")&&(f=f.default),y=f,f)))};return gr({name:"AsyncComponentWrapper",__asyncLoader:s,__asyncHydrate(c,f,p){const d=g?()=>{const l=g(p,b=>Gp(c,b));l&&(f.bum||(f.bum=[])).push(l)}:p;y?d():s().then(()=>!f.isUnmounted&&d())},get __asyncResolved(){return y},setup(){const c=Zt;if(tl(c),y)return()=>Di(y,c);const f=b=>{h=null,wo(b,c,13,!t)};if(u&&c.suspense||bo)return s().then(b=>()=>Di(b,c)).catch(b=>(f(b),()=>t?ft(t,{error:b}):null));const p=mt(!1),d=mt(),l=mt(!!w);return w&&setTimeout(()=>{l.value=!1},w),i!=null&&setTimeout(()=>{if(!p.value&&!d.value){const b=new Error(`Async component timed out after ${i}ms.`);f(b),d.value=b}},i),s().then(()=>{p.value=!0,c.parent&&as(c.parent.vnode)&&c.parent.update()}).catch(b=>{f(b),d.value=b}),()=>{if(p.value&&y)return Di(y,c);if(d.value&&t)return ft(t,{error:d.value});if(x&&!l.value)return ft(x)}}})}function Di(r,a){const{ref:x,props:t,children:w,ce:g}=a.vnode,i=ft(r,t,w);return i.ref=x,i.ce=g,delete a.vnode.ce,i}const as=r=>r.type.__isKeepAlive,Vp={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(r,{slots:a}){const x=Zn(),t=x.ctx;if(!t.renderer)return()=>{const l=a.default&&a.default();return l&&l.length===1?l[0]:l};const w=new Map,g=new Set;let i=null;const u=x.suspense,{renderer:{p:o,m:h,um:y,o:{createElement:m}}}=t,n=m("div");t.activate=(l,b,v,j,E)=>{const T=l.component;h(l,b,v,0,u),o(T.vnode,l,b,v,T,u,j,l.slotScopeIds,E),lr(()=>{T.isDeactivated=!1,T.a&&ho(T.a);const M=l.props&&l.props.onVnodeMounted;M&&Er(M,T.parent,l)},u)},t.deactivate=l=>{const b=l.component;Hs(b.m),Hs(b.a),h(l,n,null,1,u),lr(()=>{b.da&&ho(b.da);const v=l.props&&l.props.onVnodeUnmounted;v&&Er(v,b.parent,l),b.isDeactivated=!0},u)};function s(l){Fi(l),y(l,x,u,!0)}function c(l){w.forEach((b,v)=>{const j=ga(b.type);j&&!l(j)&&f(v)})}function f(l){const b=w.get(l);b&&(!i||!Br(b,i))?s(b):i&&Fi(i),w.delete(l),g.delete(l)}On(()=>[r.include,r.exclude],([l,b])=>{l&&c(v=>Fo(l,v)),b&&c(v=>!Fo(b,v))},{flush:"post",deep:!0});let p=null;const d=()=>{p!=null&&(zs(x.subTree.type)?lr(()=>{w.set(p,Ss(x.subTree))},x.subTree.suspense):w.set(p,Ss(x.subTree)))};return Vr(d),kd(d),ls(()=>{w.forEach(l=>{const{subTree:b,suspense:v}=x,j=Ss(b);if(l.type===j.type&&l.key===j.key){Fi(j);const E=j.component.da;E&&lr(E,v);return}s(l)})}),()=>{if(p=null,!a.default)return i=null;const l=a.default(),b=l[0];if(l.length>1)return i=null,l;if(!Xn(b)||!(b.shapeFlag&4)&&!(b.shapeFlag&128))return i=null,b;let v=Ss(b);if(v.type===Kt)return i=null,v;const j=v.type,E=ga(Cn(v)?v.type.__asyncResolved||{}:j),{include:T,exclude:M,max:P}=r;if(T&&(!E||!Fo(T,E))||M&&E&&Fo(M,E))return v.shapeFlag&=-257,i=v,b;const R=v.key==null?j:v.key,C=w.get(R);return v.el&&(v=en(v),b.shapeFlag&128&&(b.ssContent=v)),p=R,C?(v.el=C.el,v.component=C.component,v.transition&&go(v,v.transition),v.shapeFlag|=512,g.delete(R),g.add(R)):(g.add(R),P&&g.size>parseInt(P,10)&&f(g.values().next().value)),v.shapeFlag|=256,i=v,zs(b.type)?b:v}}},Hp=Vp;function Fo(r,a){return st(r)?r.some(x=>Fo(x,a)):Bt(r)?r.split(",").includes(a):Vh(r)?(r.lastIndex=0,r.test(a)):!1}function Sd(r,a){Td(r,"a",a)}function Ed(r,a){Td(r,"da",a)}function Td(r,a,x=Zt){const t=r.__wdc||(r.__wdc=()=>{let w=x;for(;w;){if(w.isDeactivated)return;w=w.parent}return r()});if(ai(a,t,x),x){let w=x.parent;for(;w&&w.parent;)as(w.parent.vnode)&&zp(t,a,x,w),w=w.parent}}function zp(r,a,x,t){const w=ai(a,r,t,!0);us(()=>{za(t[a],w)},x)}function Fi(r){r.shapeFlag&=-257,r.shapeFlag&=-513}function Ss(r){return r.shapeFlag&128?r.ssContent:r}function ai(r,a,x=Zt,t=!1){if(x){const w=x[r]||(x[r]=[]),g=a.__weh||(a.__weh=(...i)=>{An();const u=$n(x),o=Hr(a,x,r,i);return u(),Rn(),o});return t?w.unshift(g):w.push(g),g}}const pn=r=>(a,x=Zt)=>{(!bo||r==="sp")&&ai(r,(...t)=>a(...t),x)},Wp=pn("bm"),Vr=pn("m"),qp=pn("bu"),kd=pn("u"),ls=pn("bum"),us=pn("um"),Xp=pn("sp"),$p=pn("rtg"),Yp=pn("rtc");function Md(r,a=Zt){ai("ec",r,a)}const Cd="components";function pu(r,a){return Pd(Cd,r,!0,a)||r}const Od=Symbol.for("v-ndc");function Kp(r){return Bt(r)?Pd(Cd,r,!1)||r:r||Od}function Pd(r,a,x=!0,t=!1){const w=Qt||Zt;if(w){const g=w.type;{const u=ga(g,!1);if(u&&(u===a||u===Ir(a)||u===ni(Ir(a))))return g}const i=mu(w[r]||g[r],a)||mu(w.appContext[r],a);return!i&&t?g:i}}function mu(r,a){return r&&(r[a]||r[Ir(a)]||r[ni(Ir(a))])}function rx(r,a,x,t){let w;const g=x,i=st(r);if(i||Bt(r)){const u=i&&zn(r);let o=!1;u&&(o=!Rr(r),r=ii(r)),w=new Array(r.length);for(let h=0,y=r.length;ha(u,o,void 0,g));else{const u=Object.keys(r);w=new Array(u.length);for(let o=0,h=u.length;oXn(a)?!(a.type===Kt||a.type===cr&&!Ad(a.children)):!0)?r:null}const ua=r=>r?nf(r)?ci(r):ua(r.parent):null,Go=$t(Object.create(null),{$:r=>r,$el:r=>r.vnode.el,$data:r=>r.data,$props:r=>r.props,$attrs:r=>r.attrs,$slots:r=>r.slots,$refs:r=>r.refs,$parent:r=>ua(r.parent),$root:r=>ua(r.root),$host:r=>r.ce,$emit:r=>r.emit,$options:r=>rl(r),$forceUpdate:r=>r.f||(r.f=()=>{el(r.update)}),$nextTick:r=>r.n||(r.n=Pr.bind(r.proxy)),$watch:r=>gm.bind(r)}),Ni=(r,a)=>r!==Mt&&!r.__isScriptSetup&&wt(r,a),Zp={get({_:r},a){if(a==="__v_skip")return!0;const{ctx:x,setupState:t,data:w,props:g,accessCache:i,type:u,appContext:o}=r;let h;if(a[0]!=="$"){const s=i[a];if(s!==void 0)switch(s){case 1:return t[a];case 2:return w[a];case 4:return x[a];case 3:return g[a]}else{if(Ni(t,a))return i[a]=1,t[a];if(w!==Mt&&wt(w,a))return i[a]=2,w[a];if((h=r.propsOptions[0])&&wt(h,a))return i[a]=3,g[a];if(x!==Mt&&wt(x,a))return i[a]=4,x[a];ca&&(i[a]=0)}}const y=Go[a];let m,n;if(y)return a==="$attrs"&&mr(r.attrs,"get",""),y(r);if((m=u.__cssModules)&&(m=m[a]))return m;if(x!==Mt&&wt(x,a))return i[a]=4,x[a];if(n=o.config.globalProperties,wt(n,a))return n[a]},set({_:r},a,x){const{data:t,setupState:w,ctx:g}=r;return Ni(w,a)?(w[a]=x,!0):t!==Mt&&wt(t,a)?(t[a]=x,!0):wt(r.props,a)||a[0]==="$"&&a.slice(1)in r?!1:(g[a]=x,!0)},has({_:{data:r,setupState:a,accessCache:x,ctx:t,appContext:w,propsOptions:g}},i){let u;return!!x[i]||r!==Mt&&wt(r,i)||Ni(a,i)||(u=g[0])&&wt(u,i)||wt(t,i)||wt(Go,i)||wt(w.config.globalProperties,i)},defineProperty(r,a,x){return x.get!=null?r._.accessCache[a]=0:wt(x,"value")&&this.set(r,a,x.value,null),Reflect.defineProperty(r,a,x)}};function ox(){return Qp().slots}function Qp(){const r=Zn();return r.setupContext||(r.setupContext=sf(r))}function yu(r){return st(r)?r.reduce((a,x)=>(a[x]=null,a),{}):r}function sx(r){const a=Zn();let x=r();return ma(),Wa(x)&&(x=x.catch(t=>{throw $n(a),t})),[x,()=>$n(a)]}let ca=!0;function Jp(r){const a=rl(r),x=r.proxy,t=r.ctx;ca=!1,a.beforeCreate&&gu(a.beforeCreate,r,"bc");const{data:w,computed:g,methods:i,watch:u,provide:o,inject:h,created:y,beforeMount:m,mounted:n,beforeUpdate:s,updated:c,activated:f,deactivated:p,beforeDestroy:d,beforeUnmount:l,destroyed:b,unmounted:v,render:j,renderTracked:E,renderTriggered:T,errorCaptured:M,serverPrefetch:P,expose:R,inheritAttrs:C,components:I,directives:A,filters:N}=a;if(h&&em(h,t,null),i)for(const W in i){const V=i[W];at(V)&&(t[W]=V.bind(x))}if(w){const W=w.call(x,x);At(W)&&(r.data=Ln(W))}if(ca=!0,g)for(const W in g){const V=g[W],H=at(V)?V.bind(x,x):at(V.get)?V.get.bind(x,x):Qr,Q=!at(V)&&at(V.set)?V.set.bind(x):Qr,ee=vt({get:H,set:Q});Object.defineProperty(t,W,{enumerable:!0,configurable:!0,get:()=>ee.value,set:ae=>ee.value=ae})}if(u)for(const W in u)Rd(u[W],t,x,W);if(o){const W=at(o)?o.call(x):o;Reflect.ownKeys(W).forEach(V=>{Lr(V,W[V])})}y&&gu(y,r,"c");function U(W,V){st(V)?V.forEach(H=>W(H.bind(x))):V&&W(V.bind(x))}if(U(Wp,m),U(Vr,n),U(qp,s),U(kd,c),U(Sd,f),U(Ed,p),U(Md,M),U(Yp,E),U($p,T),U(ls,l),U(us,v),U(Xp,P),st(R))if(R.length){const W=r.exposed||(r.exposed={});R.forEach(V=>{Object.defineProperty(W,V,{get:()=>x[V],set:H=>x[V]=H})})}else r.exposed||(r.exposed={});j&&r.render===Qr&&(r.render=j),C!=null&&(r.inheritAttrs=C),I&&(r.components=I),A&&(r.directives=A),P&&tl(r)}function em(r,a,x=Qr){st(r)&&(r=da(r));for(const t in r){const w=r[t];let g;At(w)?"default"in w?g=zt(w.from||t,w.default,!0):g=zt(w.from||t):g=zt(w),or(g)?Object.defineProperty(a,t,{enumerable:!0,configurable:!0,get:()=>g.value,set:i=>g.value=i}):a[t]=g}}function gu(r,a,x){Hr(st(r)?r.map(t=>t.bind(a.proxy)):r.bind(a.proxy),a,x)}function Rd(r,a,x,t){let w=t.includes(".")?Yd(x,t):()=>x[t];if(Bt(r)){const g=a[r];at(g)&&On(w,g)}else if(at(r))On(w,r.bind(x));else if(At(r))if(st(r))r.forEach(g=>Rd(g,a,x,t));else{const g=at(r.handler)?r.handler.bind(x):a[r.handler];at(g)&&On(w,g,r)}}function rl(r){const a=r.type,{mixins:x,extends:t}=a,{mixins:w,optionsCache:g,config:{optionMergeStrategies:i}}=r.appContext,u=g.get(a);let o;return u?o=u:!w.length&&!x&&!t?o=a:(o={},w.length&&w.forEach(h=>Vs(o,h,i,!0)),Vs(o,a,i)),At(a)&&g.set(a,o),o}function Vs(r,a,x,t=!1){const{mixins:w,extends:g}=a;g&&Vs(r,g,x,!0),w&&w.forEach(i=>Vs(r,i,x,!0));for(const i in a)if(!(t&&i==="expose")){const u=tm[i]||x&&x[i];r[i]=u?u(r[i],a[i]):a[i]}return r}const tm={data:vu,props:bu,emits:bu,methods:No,computed:No,beforeCreate:br,created:br,beforeMount:br,mounted:br,beforeUpdate:br,updated:br,beforeDestroy:br,beforeUnmount:br,destroyed:br,unmounted:br,activated:br,deactivated:br,errorCaptured:br,serverPrefetch:br,components:No,directives:No,watch:nm,provide:vu,inject:rm};function vu(r,a){return a?r?function(){return $t(at(r)?r.call(this,this):r,at(a)?a.call(this,this):a)}:a:r}function rm(r,a){return No(da(r),da(a))}function da(r){if(st(r)){const a={};for(let x=0;x1)return x&&at(a)?a.call(t&&t.proxy):a}}function Id(){return!!(Zt||Qt||Wn)}const Dd={},Fd=()=>Object.create(Dd),Nd=r=>Object.getPrototypeOf(r)===Dd;function im(r,a,x,t=!1){const w={},g=Fd();r.propsDefaults=Object.create(null),Ud(r,a,w,g);for(const i in r.propsOptions[0])i in w||(w[i]=void 0);x?r.props=t?w:dn(w):r.type.props?r.props=w:r.props=g,r.attrs=g}function am(r,a,x,t){const{props:w,attrs:g,vnode:{patchFlag:i}}=r,u=bt(w),[o]=r.propsOptions;let h=!1;if((t||i>0)&&!(i&16)){if(i&8){const y=r.vnode.dynamicProps;for(let m=0;m{o=!0;const[n,s]=Bd(m,a,!0);$t(i,n),s&&u.push(...s)};!x&&a.mixins.length&&a.mixins.forEach(y),r.extends&&y(r.extends),r.mixins&&r.mixins.forEach(y)}if(!g&&!o)return At(r)&&t.set(r,uo),uo;if(st(g))for(let y=0;yr[0]==="_"||r==="$stable",nl=r=>st(r)?r.map(Mr):[Mr(r)],um=(r,a,x)=>{if(a._n)return a;const t=Sr((...w)=>nl(a(...w)),x);return t._c=!1,t},Vd=(r,a,x)=>{const t=r._ctx;for(const w in r){if(Gd(w))continue;const g=r[w];if(at(g))a[w]=um(w,g,t);else if(g!=null){const i=nl(g);a[w]=()=>i}}},Hd=(r,a)=>{const x=nl(a);r.slots.default=()=>x},zd=(r,a,x)=>{for(const t in a)(x||t!=="_")&&(r[t]=a[t])},cm=(r,a,x)=>{const t=r.slots=Fd();if(r.vnode.shapeFlag&32){const w=a._;w?(zd(t,a,x),x&&Hc(t,"_",w,!0)):Vd(a,t)}else a&&Hd(r,a)},dm=(r,a,x)=>{const{vnode:t,slots:w}=r;let g=!0,i=Mt;if(t.shapeFlag&32){const u=a._;u?x&&u===1?g=!1:zd(w,a,x):(g=!a.$stable,Vd(a,w)),i=a}else a&&(Hd(r,a),i={default:1});if(g)for(const u in w)!Gd(u)&&i[u]==null&&delete w[u]},lr=Qd;function fm(r){return Wd(r)}function hm(r){return Wd(r,Up)}function Wd(r,a){const x=oi();x.__VUE__=!0;const{insert:t,remove:w,patchProp:g,createElement:i,createText:u,createComment:o,setText:h,setElementText:y,parentNode:m,nextSibling:n,setScopeId:s=Qr,insertStaticContent:c}=r,f=(Y,z,te,ce=null,fe=null,de=null,ye=void 0,ve=null,Ee=!!z.dynamicChildren)=>{if(Y===z)return;Y&&!Br(Y,z)&&(ce=K(Y),ae(Y,fe,de,!0),Y=null),z.patchFlag===-2&&(Ee=!1,z.dynamicChildren=null);const{type:ge,ref:Ne,shapeFlag:Re}=z;switch(ge){case qn:p(Y,z,te,ce);break;case Kt:d(Y,z,te,ce);break;case Vo:Y==null&&l(z,te,ce,ye);break;case cr:I(Y,z,te,ce,fe,de,ye,ve,Ee);break;default:Re&1?j(Y,z,te,ce,fe,de,ye,ve,Ee):Re&6?A(Y,z,te,ce,fe,de,ye,ve,Ee):(Re&64||Re&128)&&ge.process(Y,z,te,ce,fe,de,ye,ve,Ee,ue)}Ne!=null&&fe&&Jo(Ne,Y&&Y.ref,de,z||Y,!z)},p=(Y,z,te,ce)=>{if(Y==null)t(z.el=u(z.children),te,ce);else{const fe=z.el=Y.el;z.children!==Y.children&&h(fe,z.children)}},d=(Y,z,te,ce)=>{Y==null?t(z.el=o(z.children||""),te,ce):z.el=Y.el},l=(Y,z,te,ce)=>{[Y.el,Y.anchor]=c(Y.children,z,te,ce,Y.el,Y.anchor)},b=({el:Y,anchor:z},te,ce)=>{let fe;for(;Y&&Y!==z;)fe=n(Y),t(Y,te,ce),Y=fe;t(z,te,ce)},v=({el:Y,anchor:z})=>{let te;for(;Y&&Y!==z;)te=n(Y),w(Y),Y=te;w(z)},j=(Y,z,te,ce,fe,de,ye,ve,Ee)=>{z.type==="svg"?ye="svg":z.type==="math"&&(ye="mathml"),Y==null?E(z,te,ce,fe,de,ye,ve,Ee):P(Y,z,fe,de,ye,ve,Ee)},E=(Y,z,te,ce,fe,de,ye,ve)=>{let Ee,ge;const{props:Ne,shapeFlag:Re,transition:Ie,dirs:Fe}=Y;if(Ee=Y.el=i(Y.type,de,Ne&&Ne.is,Ne),Re&8?y(Ee,Y.children):Re&16&&M(Y.children,Ee,null,ce,fe,Ui(Y,de),ye,ve),Fe&&Zr(Y,null,ce,"created"),T(Ee,Y,Y.scopeId,ye,ce),Ne){for(const we in Ne)we!=="value"&&!fo(we)&&g(Ee,we,null,Ne[we],de,ce);"value"in Ne&&g(Ee,"value",null,Ne.value,de),(ge=Ne.onVnodeBeforeMount)&&Er(ge,ce,Y)}Fe&&Zr(Y,null,ce,"beforeMount");const Ge=qd(fe,Ie);Ge&&Ie.beforeEnter(Ee),t(Ee,z,te),((ge=Ne&&Ne.onVnodeMounted)||Ge||Fe)&&lr(()=>{ge&&Er(ge,ce,Y),Ge&&Ie.enter(Ee),Fe&&Zr(Y,null,ce,"mounted")},fe)},T=(Y,z,te,ce,fe)=>{if(te&&s(Y,te),ce)for(let de=0;de{for(let ge=Ee;ge{const ve=z.el=Y.el;let{patchFlag:Ee,dynamicChildren:ge,dirs:Ne}=z;Ee|=Y.patchFlag&16;const Re=Y.props||Mt,Ie=z.props||Mt;let Fe;if(te&&In(te,!1),(Fe=Ie.onVnodeBeforeUpdate)&&Er(Fe,te,z,Y),Ne&&Zr(z,Y,te,"beforeUpdate"),te&&In(te,!0),(Re.innerHTML&&Ie.innerHTML==null||Re.textContent&&Ie.textContent==null)&&y(ve,""),ge?R(Y.dynamicChildren,ge,ve,te,ce,Ui(z,fe),de):ye||V(Y,z,ve,null,te,ce,Ui(z,fe),de,!1),Ee>0){if(Ee&16)C(ve,Re,Ie,te,fe);else if(Ee&2&&Re.class!==Ie.class&&g(ve,"class",null,Ie.class,fe),Ee&4&&g(ve,"style",Re.style,Ie.style,fe),Ee&8){const Ge=z.dynamicProps;for(let we=0;we{Fe&&Er(Fe,te,z,Y),Ne&&Zr(z,Y,te,"updated")},ce)},R=(Y,z,te,ce,fe,de,ye)=>{for(let ve=0;ve{if(z!==te){if(z!==Mt)for(const de in z)!fo(de)&&!(de in te)&&g(Y,de,z[de],null,fe,ce);for(const de in te){if(fo(de))continue;const ye=te[de],ve=z[de];ye!==ve&&de!=="value"&&g(Y,de,ve,ye,fe,ce)}"value"in te&&g(Y,"value",z.value,te.value,fe)}},I=(Y,z,te,ce,fe,de,ye,ve,Ee)=>{const ge=z.el=Y?Y.el:u(""),Ne=z.anchor=Y?Y.anchor:u("");let{patchFlag:Re,dynamicChildren:Ie,slotScopeIds:Fe}=z;Fe&&(ve=ve?ve.concat(Fe):Fe),Y==null?(t(ge,te,ce),t(Ne,te,ce),M(z.children||[],te,Ne,fe,de,ye,ve,Ee)):Re>0&&Re&64&&Ie&&Y.dynamicChildren?(R(Y.dynamicChildren,Ie,te,fe,de,ye,ve),(z.key!=null||fe&&z===fe.subTree)&&Xd(Y,z,!0)):V(Y,z,te,Ne,fe,de,ye,ve,Ee)},A=(Y,z,te,ce,fe,de,ye,ve,Ee)=>{z.slotScopeIds=ve,Y==null?z.shapeFlag&512?fe.ctx.activate(z,te,ce,ye,Ee):N(z,te,ce,fe,de,ye,Ee):F(Y,z,Ee)},N=(Y,z,te,ce,fe,de,ye)=>{const ve=Y.component=Im(Y,ce,fe);if(as(Y)&&(ve.ctx.renderer=ue),Dm(ve,!1,ye),ve.asyncDep){if(fe&&fe.registerDep(ve,U,ye),!Y.el){const Ee=ve.subTree=ft(Kt);d(null,Ee,z,te)}}else U(ve,Y,z,te,fe,de,ye)},F=(Y,z,te)=>{const ce=z.component=Y.component;if(jm(Y,z,te))if(ce.asyncDep&&!ce.asyncResolved){W(ce,z,te);return}else ce.next=z,ce.update();else z.el=Y.el,ce.vnode=z},U=(Y,z,te,ce,fe,de,ye)=>{const ve=()=>{if(Y.isMounted){let{next:Re,bu:Ie,u:Fe,parent:Ge,vnode:we}=Y;{const Z=$d(Y);if(Z){Re&&(Re.el=we.el,W(Y,Re,ye)),Z.asyncDep.then(()=>{Y.isUnmounted||ve()});return}}let Le=Re,Te;In(Y,!1),Re?(Re.el=we.el,W(Y,Re,ye)):Re=we,Ie&&ho(Ie),(Te=Re.props&&Re.props.onVnodeBeforeUpdate)&&Er(Te,Ge,Re,we),In(Y,!0);const re=Bi(Y),se=Y.subTree;Y.subTree=re,f(se,re,m(se.el),K(se),Y,fe,de),Re.el=re.el,Le===null&&ui(Y,re.el),Fe&&lr(Fe,fe),(Te=Re.props&&Re.props.onVnodeUpdated)&&lr(()=>Er(Te,Ge,Re,we),fe)}else{let Re;const{el:Ie,props:Fe}=z,{bm:Ge,m:we,parent:Le,root:Te,type:re}=Y,se=Cn(z);if(In(Y,!1),Ge&&ho(Ge),!se&&(Re=Fe&&Fe.onVnodeBeforeMount)&&Er(Re,Le,z),In(Y,!0),Ie&&he){const Z=()=>{Y.subTree=Bi(Y),he(Ie,Y.subTree,Y,fe,null)};se&&re.__asyncHydrate?re.__asyncHydrate(Ie,Y,Z):Z()}else{Te.ce&&Te.ce._injectChildStyle(re);const Z=Y.subTree=Bi(Y);f(null,Z,te,ce,Y,fe,de),z.el=Z.el}if(we&&lr(we,fe),!se&&(Re=Fe&&Fe.onVnodeMounted)){const Z=z;lr(()=>Er(Re,Le,Z),fe)}(z.shapeFlag&256||Le&&Cn(Le.vnode)&&Le.vnode.shapeFlag&256)&&Y.a&&lr(Y.a,fe),Y.isMounted=!0,z=te=ce=null}};Y.scope.on();const Ee=Y.effect=new Kc(ve);Y.scope.off();const ge=Y.update=Ee.run.bind(Ee),Ne=Y.job=Ee.runIfDirty.bind(Ee);Ne.i=Y,Ne.id=Y.uid,Ee.scheduler=()=>el(Ne),In(Y,!0),ge()},W=(Y,z,te)=>{z.component=Y;const ce=Y.vnode.props;Y.vnode=z,Y.next=null,am(Y,z.props,ce,te),dm(Y,z.children,te),An(),cu(Y),Rn()},V=(Y,z,te,ce,fe,de,ye,ve,Ee=!1)=>{const ge=Y&&Y.children,Ne=Y?Y.shapeFlag:0,Re=z.children,{patchFlag:Ie,shapeFlag:Fe}=z;if(Ie>0){if(Ie&128){Q(ge,Re,te,ce,fe,de,ye,ve,Ee);return}else if(Ie&256){H(ge,Re,te,ce,fe,de,ye,ve,Ee);return}}Fe&8?(Ne&16&&X(ge,fe,de),Re!==ge&&y(te,Re)):Ne&16?Fe&16?Q(ge,Re,te,ce,fe,de,ye,ve,Ee):X(ge,fe,de,!0):(Ne&8&&y(te,""),Fe&16&&M(Re,te,ce,fe,de,ye,ve,Ee))},H=(Y,z,te,ce,fe,de,ye,ve,Ee)=>{Y=Y||uo,z=z||uo;const ge=Y.length,Ne=z.length,Re=Math.min(ge,Ne);let Ie;for(Ie=0;IeNe?X(Y,fe,de,!0,!1,Re):M(z,te,ce,fe,de,ye,ve,Ee,Re)},Q=(Y,z,te,ce,fe,de,ye,ve,Ee)=>{let ge=0;const Ne=z.length;let Re=Y.length-1,Ie=Ne-1;for(;ge<=Re&&ge<=Ie;){const Fe=Y[ge],Ge=z[ge]=Ee?wn(z[ge]):Mr(z[ge]);if(Br(Fe,Ge))f(Fe,Ge,te,null,fe,de,ye,ve,Ee);else break;ge++}for(;ge<=Re&&ge<=Ie;){const Fe=Y[Re],Ge=z[Ie]=Ee?wn(z[Ie]):Mr(z[Ie]);if(Br(Fe,Ge))f(Fe,Ge,te,null,fe,de,ye,ve,Ee);else break;Re--,Ie--}if(ge>Re){if(ge<=Ie){const Fe=Ie+1,Ge=FeIe)for(;ge<=Re;)ae(Y[ge],fe,de,!0),ge++;else{const Fe=ge,Ge=ge,we=new Map;for(ge=Ge;ge<=Ie;ge++){const Se=z[ge]=Ee?wn(z[ge]):Mr(z[ge]);Se.key!=null&&we.set(Se.key,ge)}let Le,Te=0;const re=Ie-Ge+1;let se=!1,Z=0;const le=new Array(re);for(ge=0;ge=re){ae(Se,fe,de,!0);continue}let Pe;if(Se.key!=null)Pe=we.get(Se.key);else for(Le=Ge;Le<=Ie;Le++)if(le[Le-Ge]===0&&Br(Se,z[Le])){Pe=Le;break}Pe===void 0?ae(Se,fe,de,!0):(le[Pe-Ge]=ge+1,Pe>=Z?Z=Pe:se=!0,f(Se,z[Pe],te,null,fe,de,ye,ve,Ee),Te++)}const xe=se?pm(le):uo;for(Le=xe.length-1,ge=re-1;ge>=0;ge--){const Se=Ge+ge,Pe=z[Se],He=Se+1{const{el:de,type:ye,transition:ve,children:Ee,shapeFlag:ge}=Y;if(ge&6){ee(Y.component.subTree,z,te,ce);return}if(ge&128){Y.suspense.move(z,te,ce);return}if(ge&64){ye.move(Y,z,te,ue);return}if(ye===cr){t(de,z,te);for(let Re=0;Reve.enter(de),fe);else{const{leave:Re,delayLeave:Ie,afterLeave:Fe}=ve,Ge=()=>t(de,z,te),we=()=>{Re(de,()=>{Ge(),Fe&&Fe()})};Ie?Ie(de,Ge,we):we()}else t(de,z,te)},ae=(Y,z,te,ce=!1,fe=!1)=>{const{type:de,props:ye,ref:ve,children:Ee,dynamicChildren:ge,shapeFlag:Ne,patchFlag:Re,dirs:Ie,cacheIndex:Fe}=Y;if(Re===-2&&(fe=!1),ve!=null&&Jo(ve,null,te,Y,!0),Fe!=null&&(z.renderCache[Fe]=void 0),Ne&256){z.ctx.deactivate(Y);return}const Ge=Ne&1&&Ie,we=!Cn(Y);let Le;if(we&&(Le=ye&&ye.onVnodeBeforeUnmount)&&Er(Le,z,Y),Ne&6)G(Y.component,te,ce);else{if(Ne&128){Y.suspense.unmount(te,ce);return}Ge&&Zr(Y,null,z,"beforeUnmount"),Ne&64?Y.type.remove(Y,z,te,ue,ce):ge&&!ge.hasOnce&&(de!==cr||Re>0&&Re&64)?X(ge,z,te,!1,!0):(de===cr&&Re&384||!fe&&Ne&16)&&X(Ee,z,te),ce&&k(Y)}(we&&(Le=ye&&ye.onVnodeUnmounted)||Ge)&&lr(()=>{Le&&Er(Le,z,Y),Ge&&Zr(Y,null,z,"unmounted")},te)},k=Y=>{const{type:z,el:te,anchor:ce,transition:fe}=Y;if(z===cr){D(te,ce);return}if(z===Vo){v(Y);return}const de=()=>{w(te),fe&&!fe.persisted&&fe.afterLeave&&fe.afterLeave()};if(Y.shapeFlag&1&&fe&&!fe.persisted){const{leave:ye,delayLeave:ve}=fe,Ee=()=>ye(te,de);ve?ve(Y.el,de,Ee):Ee()}else de()},D=(Y,z)=>{let te;for(;Y!==z;)te=n(Y),w(Y),Y=te;w(z)},G=(Y,z,te)=>{const{bum:ce,scope:fe,job:de,subTree:ye,um:ve,m:Ee,a:ge}=Y;Hs(Ee),Hs(ge),ce&&ho(ce),fe.stop(),de&&(de.flags|=8,ae(ye,Y,z,te)),ve&&lr(ve,z),lr(()=>{Y.isUnmounted=!0},z),z&&z.pendingBranch&&!z.isUnmounted&&Y.asyncDep&&!Y.asyncResolved&&Y.suspenseId===z.pendingId&&(z.deps--,z.deps===0&&z.resolve())},X=(Y,z,te,ce=!1,fe=!1,de=0)=>{for(let ye=de;ye{if(Y.shapeFlag&6)return K(Y.component.subTree);if(Y.shapeFlag&128)return Y.suspense.next();const z=n(Y.anchor||Y.el),te=z&&z[Ap];return te?n(te):z};let J=!1;const ne=(Y,z,te)=>{Y==null?z._vnode&&ae(z._vnode,null,null,!0):f(z._vnode||null,Y,z,null,null,null,te),z._vnode=Y,J||(J=!0,cu(),Bs(),J=!1)},ue={p:f,um:ae,m:ee,r:k,mt:N,mc:M,pc:V,pbc:R,n:K,o:r};let ie,he;return a&&([ie,he]=a(ue)),{render:ne,hydrate:ie,createApp:sm(ne,ie)}}function Ui({type:r,props:a},x){return x==="svg"&&r==="foreignObject"||x==="mathml"&&r==="annotation-xml"&&a&&a.encoding&&a.encoding.includes("html")?void 0:x}function In({effect:r,job:a},x){x?(r.flags|=32,a.flags|=4):(r.flags&=-33,a.flags&=-5)}function qd(r,a){return(!r||r&&!r.pendingBranch)&&a&&!a.persisted}function Xd(r,a,x=!1){const t=r.children,w=a.children;if(st(t)&&st(w))for(let g=0;g>1,r[x[u]]0&&(a[t]=x[g-1]),x[g]=t)}}for(g=x.length,i=x[g-1];g-- >0;)x[g]=i,i=a[i];return x}function $d(r){const a=r.subTree.component;if(a)return a.asyncDep&&!a.asyncResolved?a:$d(a)}function Hs(r){if(r)for(let a=0;azt(mm);function Jr(r,a){return ol(r,null,a)}function On(r,a,x){return ol(r,a,x)}function ol(r,a,x=Mt){const{immediate:t,deep:w,flush:g,once:i}=x,u=$t({},x),o=a&&t||!a&&g!=="post";let h;if(bo){if(g==="sync"){const s=ym();h=s.__watcherHandles||(s.__watcherHandles=[])}else if(!o){const s=()=>{};return s.stop=Qr,s.resume=Qr,s.pause=Qr,s}}const y=Zt;u.call=(s,c,f)=>Hr(s,y,c,f);let m=!1;g==="post"?u.scheduler=s=>{lr(s,y&&y.suspense)}:g!=="sync"&&(m=!0,u.scheduler=(s,c)=>{c?s():el(s)}),u.augmentJob=s=>{a&&(s.flags|=4),m&&(s.flags|=2,y&&(s.id=y.uid,s.i=y))};const n=Cp(r,a,u);return bo&&(h?h.push(n):o&&n()),n}function gm(r,a,x){const t=this.proxy,w=Bt(r)?r.includes(".")?Yd(t,r):()=>t[r]:r.bind(t,t);let g;at(a)?g=a:(g=a.handler,x=a);const i=$n(this),u=ol(w,g.bind(t),x);return i(),u}function Yd(r,a){const x=a.split(".");return()=>{let t=r;for(let w=0;wa==="modelValue"||a==="model-value"?r.modelModifiers:r[`${a}Modifiers`]||r[`${Ir(a)}Modifiers`]||r[`${Kn(a)}Modifiers`];function bm(r,a,...x){if(r.isUnmounted)return;const t=r.vnode.props||Mt;let w=x;const g=a.startsWith("update:"),i=g&&vm(t,a.slice(7));i&&(i.trim&&(w=x.map(y=>Bt(y)?y.trim():y)),i.number&&(w=x.map(ra)));let u,o=t[u=Oi(a)]||t[u=Oi(Ir(a))];!o&&g&&(o=t[u=Oi(Kn(a))]),o&&Hr(o,r,6,w);const h=t[u+"Once"];if(h){if(!r.emitted)r.emitted={};else if(r.emitted[u])return;r.emitted[u]=!0,Hr(h,r,6,w)}}function Kd(r,a,x=!1){const t=a.emitsCache,w=t.get(r);if(w!==void 0)return w;const g=r.emits;let i={},u=!1;if(!at(r)){const o=h=>{const y=Kd(h,a,!0);y&&(u=!0,$t(i,y))};!x&&a.mixins.length&&a.mixins.forEach(o),r.extends&&o(r.extends),r.mixins&&r.mixins.forEach(o)}return!g&&!u?(At(r)&&t.set(r,null),null):(st(g)?g.forEach(o=>i[o]=null):$t(i,g),At(r)&&t.set(r,i),i)}function li(r,a){return!r||!os(a)?!1:(a=a.slice(2).replace(/Once$/,""),wt(r,a[0].toLowerCase()+a.slice(1))||wt(r,Kn(a))||wt(r,a))}function Bi(r){const{type:a,vnode:x,proxy:t,withProxy:w,propsOptions:[g],slots:i,attrs:u,emit:o,render:h,renderCache:y,props:m,data:n,setupState:s,ctx:c,inheritAttrs:f}=r,p=Gs(r);let d,l;try{if(x.shapeFlag&4){const v=w||t,j=v;d=Mr(h.call(j,v,y,m,s,n,c)),l=u}else{const v=a;d=Mr(v.length>1?v(m,{attrs:u,slots:i,emit:o}):v(m,null)),l=a.props?u:xm(u)}}catch(v){Ho.length=0,wo(v,r,1),d=ft(Kt)}let b=d;if(l&&f!==!1){const v=Object.keys(l),{shapeFlag:j}=b;v.length&&j&7&&(g&&v.some(Ha)&&(l=wm(l,g)),b=en(b,l,!1,!0))}return x.dirs&&(b=en(b,null,!1,!0),b.dirs=b.dirs?b.dirs.concat(x.dirs):x.dirs),x.transition&&go(b,x.transition),d=b,Gs(p),d}function _m(r,a=!0){let x;for(let t=0;t{let a;for(const x in r)(x==="class"||x==="style"||os(x))&&((a||(a={}))[x]=r[x]);return a},wm=(r,a)=>{const x={};for(const t in r)(!Ha(t)||!(t.slice(9)in a))&&(x[t]=r[t]);return x};function jm(r,a,x){const{props:t,children:w,component:g}=r,{props:i,children:u,patchFlag:o}=a,h=g.emitsOptions;if(a.dirs||a.transition)return!0;if(x&&o>=0){if(o&1024)return!0;if(o&16)return t?xu(t,i,h):!!i;if(o&8){const y=a.dynamicProps;for(let m=0;mr.__isSuspense;let ha=0;const Sm={name:"Suspense",__isSuspense:!0,process(r,a,x,t,w,g,i,u,o,h){if(r==null)Em(a,x,t,w,g,i,u,o,h);else{if(g&&g.deps>0&&!r.suspense.isInFallback){a.suspense=r.suspense,a.suspense.vnode=a,a.el=r.el;return}Tm(r,a,x,t,w,i,u,o,h)}},hydrate:km,normalize:Mm},sl=Sm;function es(r,a){const x=r.props&&r.props[a];at(x)&&x()}function Em(r,a,x,t,w,g,i,u,o){const{p:h,o:{createElement:y}}=o,m=y("div"),n=r.suspense=Zd(r,w,t,a,m,x,g,i,u,o);h(null,n.pendingBranch=r.ssContent,m,null,t,n,g,i),n.deps>0?(es(r,"onPending"),es(r,"onFallback"),h(null,r.ssFallback,a,x,t,null,g,i),mo(n,r.ssFallback)):n.resolve(!1,!0)}function Tm(r,a,x,t,w,g,i,u,{p:o,um:h,o:{createElement:y}}){const m=a.suspense=r.suspense;m.vnode=a,a.el=r.el;const n=a.ssContent,s=a.ssFallback,{activeBranch:c,pendingBranch:f,isInFallback:p,isHydrating:d}=m;if(f)m.pendingBranch=n,Br(n,f)?(o(f,n,m.hiddenContainer,null,w,m,g,i,u),m.deps<=0?m.resolve():p&&(d||(o(c,s,x,t,w,null,g,i,u),mo(m,s)))):(m.pendingId=ha++,d?(m.isHydrating=!1,m.activeBranch=f):h(f,w,m),m.deps=0,m.effects.length=0,m.hiddenContainer=y("div"),p?(o(null,n,m.hiddenContainer,null,w,m,g,i,u),m.deps<=0?m.resolve():(o(c,s,x,t,w,null,g,i,u),mo(m,s))):c&&Br(n,c)?(o(c,n,x,t,w,m,g,i,u),m.resolve(!0)):(o(null,n,m.hiddenContainer,null,w,m,g,i,u),m.deps<=0&&m.resolve()));else if(c&&Br(n,c))o(c,n,x,t,w,m,g,i,u),mo(m,n);else if(es(a,"onPending"),m.pendingBranch=n,n.shapeFlag&512?m.pendingId=n.component.suspenseId:m.pendingId=ha++,o(null,n,m.hiddenContainer,null,w,m,g,i,u),m.deps<=0)m.resolve();else{const{timeout:l,pendingId:b}=m;l>0?setTimeout(()=>{m.pendingId===b&&m.fallback(s)},l):l===0&&m.fallback(s)}}function Zd(r,a,x,t,w,g,i,u,o,h,y=!1){const{p:m,m:n,um:s,n:c,o:{parentNode:f,remove:p}}=h;let d;const l=Cm(r);l&&a&&a.pendingBranch&&(d=a.pendingId,a.deps++);const b=r.props?zc(r.props.timeout):void 0,v=g,j={vnode:r,parent:a,parentComponent:x,namespace:i,container:t,hiddenContainer:w,deps:0,pendingId:ha++,timeout:typeof b=="number"?b:-1,activeBranch:null,pendingBranch:null,isInFallback:!y,isHydrating:y,isUnmounted:!1,effects:[],resolve(E=!1,T=!1){const{vnode:M,activeBranch:P,pendingBranch:R,pendingId:C,effects:I,parentComponent:A,container:N}=j;let F=!1;j.isHydrating?j.isHydrating=!1:E||(F=P&&R.transition&&R.transition.mode==="out-in",F&&(P.transition.afterLeave=()=>{C===j.pendingId&&(n(R,N,g===v?c(P):g,0),aa(I))}),P&&(f(P.el)===N&&(g=c(P)),s(P,A,j,!0)),F||n(R,N,g,0)),mo(j,R),j.pendingBranch=null,j.isInFallback=!1;let U=j.parent,W=!1;for(;U;){if(U.pendingBranch){U.effects.push(...I),W=!0;break}U=U.parent}!W&&!F&&aa(I),j.effects=[],l&&a&&a.pendingBranch&&d===a.pendingId&&(a.deps--,a.deps===0&&!T&&a.resolve()),es(M,"onResolve")},fallback(E){if(!j.pendingBranch)return;const{vnode:T,activeBranch:M,parentComponent:P,container:R,namespace:C}=j;es(T,"onFallback");const I=c(M),A=()=>{j.isInFallback&&(m(null,E,R,I,P,null,C,u,o),mo(j,E))},N=E.transition&&E.transition.mode==="out-in";N&&(M.transition.afterLeave=A),j.isInFallback=!0,s(M,P,null,!0),N||A()},move(E,T,M){j.activeBranch&&n(j.activeBranch,E,T,M),j.container=E},next(){return j.activeBranch&&c(j.activeBranch)},registerDep(E,T,M){const P=!!j.pendingBranch;P&&j.deps++;const R=E.vnode.el;E.asyncDep.catch(C=>{wo(C,E,0)}).then(C=>{if(E.isUnmounted||j.isUnmounted||j.pendingId!==E.suspenseId)return;E.asyncResolved=!0;const{vnode:I}=E;ya(E,C,!1),R&&(I.el=R);const A=!R&&E.subTree.el;T(E,I,f(R||E.subTree.el),R?null:c(E.subTree),j,i,M),A&&p(A),ui(E,I.el),P&&--j.deps===0&&j.resolve()})},unmount(E,T){j.isUnmounted=!0,j.activeBranch&&s(j.activeBranch,x,E,T),j.pendingBranch&&s(j.pendingBranch,x,E,T)}};return j}function km(r,a,x,t,w,g,i,u,o){const h=a.suspense=Zd(a,t,x,r.parentNode,document.createElement("div"),null,w,g,i,u,!0),y=o(r,h.pendingBranch=a.ssContent,x,h,g,i);return h.deps===0&&h.resolve(!1,!0),y}function Mm(r){const{shapeFlag:a,children:x}=r,t=a&32;r.ssContent=wu(t?x.default:x),r.ssFallback=t?wu(x.fallback):ft(Kt)}function wu(r){let a;if(at(r)){const x=vo&&r._c;x&&(r._d=!1,wr()),r=r(),x&&(r._d=!0,a=Tr,Jd())}return st(r)&&(r=_m(r)),r=Mr(r),a&&!r.dynamicChildren&&(r.dynamicChildren=a.filter(x=>x!==r)),r}function Qd(r,a){a&&a.pendingBranch?st(r)?a.effects.push(...r):a.effects.push(r):aa(r)}function mo(r,a){r.activeBranch=a;const{vnode:x,parentComponent:t}=r;let w=a.el;for(;!w&&a.component;)a=a.component.subTree,w=a.el;x.el=w,t&&t.subTree===x&&(t.vnode.el=w,ui(t,w))}function Cm(r){const a=r.props&&r.props.suspensible;return a!=null&&a!==!1}const cr=Symbol.for("v-fgt"),qn=Symbol.for("v-txt"),Kt=Symbol.for("v-cmt"),Vo=Symbol.for("v-stc"),Ho=[];let Tr=null;function wr(r=!1){Ho.push(Tr=r?null:[])}function Jd(){Ho.pop(),Tr=Ho[Ho.length-1]||null}let vo=1;function ju(r,a=!1){vo+=r,r<0&&Tr&&a&&(Tr.hasOnce=!0)}function ef(r){return r.dynamicChildren=vo>0?Tr||uo:null,Jd(),vo>0&&Tr&&Tr.push(r),r}function jo(r,a,x,t,w,g){return ef(Et(r,a,x,t,w,g,!0))}function En(r,a,x,t,w){return ef(ft(r,a,x,t,w,!0))}function Xn(r){return r?r.__v_isVNode===!0:!1}function Br(r,a){return r.type===a.type&&r.key===a.key}const tf=({key:r})=>r??null,As=({ref:r,ref_key:a,ref_for:x})=>(typeof r=="number"&&(r=""+r),r!=null?Bt(r)||or(r)||at(r)?{i:Qt,r,k:a,f:!!x}:r:null);function Et(r,a=null,x=null,t=0,w=null,g=r===cr?0:1,i=!1,u=!1){const o={__v_isVNode:!0,__v_skip:!0,type:r,props:a,key:a&&tf(a),ref:a&&As(a),scopeId:gd,slotScopeIds:null,children:x,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:g,patchFlag:t,dynamicProps:w,dynamicChildren:null,appContext:null,ctx:Qt};return u?(il(o,x),g&128&&r.normalize(o)):x&&(o.shapeFlag|=Bt(x)?8:16),vo>0&&!i&&Tr&&(o.patchFlag>0||g&6)&&o.patchFlag!==32&&Tr.push(o),o}const ft=Om;function Om(r,a=null,x=null,t=0,w=null,g=!1){if((!r||r===Od)&&(r=Kt),Xn(r)){const u=en(r,a,!0);return x&&il(u,x),vo>0&&!g&&Tr&&(u.shapeFlag&6?Tr[Tr.indexOf(r)]=u:Tr.push(u)),u.patchFlag=-2,u}if(Um(r)&&(r=r.__vccOpts),a){a=Pm(a);let{class:u,style:o}=a;u&&!Bt(u)&&(a.class=Vn(u)),At(o)&&(Ja(o)&&!st(o)&&(o=$t({},o)),a.style=Xa(o))}const i=Bt(r)?1:zs(r)?128:vd(r)?64:At(r)?4:at(r)?2:0;return Et(r,a,x,t,w,i,g,!0)}function Pm(r){return r?Ja(r)||Nd(r)?$t({},r):r:null}function en(r,a,x=!1,t=!1){const{props:w,ref:g,patchFlag:i,children:u,transition:o}=r,h=a?rf(w||{},a):w,y={__v_isVNode:!0,__v_skip:!0,type:r.type,props:h,key:h&&tf(h),ref:a&&a.ref?x&&g?st(g)?g.concat(As(a)):[g,As(a)]:As(a):g,scopeId:r.scopeId,slotScopeIds:r.slotScopeIds,children:u,target:r.target,targetStart:r.targetStart,targetAnchor:r.targetAnchor,staticCount:r.staticCount,shapeFlag:r.shapeFlag,patchFlag:a&&r.type!==cr?i===-1?16:i|16:i,dynamicProps:r.dynamicProps,dynamicChildren:r.dynamicChildren,appContext:r.appContext,dirs:r.dirs,transition:o,component:r.component,suspense:r.suspense,ssContent:r.ssContent&&en(r.ssContent),ssFallback:r.ssFallback&&en(r.ssFallback),el:r.el,anchor:r.anchor,ctx:r.ctx,ce:r.ce};return o&&t&&go(y,o.clone(y)),y}function zo(r=" ",a=0){return ft(qn,null,r,a)}function Am(r,a){const x=ft(Vo,null,r);return x.staticCount=a,x}function ix(r="",a=!1){return a?(wr(),En(Kt,null,r)):ft(Kt,null,r)}function Mr(r){return r==null||typeof r=="boolean"?ft(Kt):st(r)?ft(cr,null,r.slice()):Xn(r)?wn(r):ft(qn,null,String(r))}function wn(r){return r.el===null&&r.patchFlag!==-1||r.memo?r:en(r)}function il(r,a){let x=0;const{shapeFlag:t}=r;if(a==null)a=null;else if(st(a))x=16;else if(typeof a=="object")if(t&65){const w=a.default;w&&(w._c&&(w._d=!1),il(r,w()),w._c&&(w._d=!0));return}else{x=32;const w=a._;!w&&!Nd(a)?a._ctx=Qt:w===3&&Qt&&(Qt.slots._===1?a._=1:(a._=2,r.patchFlag|=1024))}else at(a)?(a={default:a,_ctx:Qt},x=32):(a=String(a),t&64?(x=16,a=[zo(a)]):x=8);r.children=a,r.shapeFlag|=x}function rf(...r){const a={};for(let x=0;xZt||Qt;let Ws,pa;{const r=oi(),a=(x,t)=>{let w;return(w=r[x])||(w=r[x]=[]),w.push(t),g=>{w.length>1?w.forEach(i=>i(g)):w[0](g)}};Ws=a("__VUE_INSTANCE_SETTERS__",x=>Zt=x),pa=a("__VUE_SSR_SETTERS__",x=>bo=x)}const $n=r=>{const a=Zt;return Ws(r),r.scope.on(),()=>{r.scope.off(),Ws(a)}},ma=()=>{Zt&&Zt.scope.off(),Ws(null)};function nf(r){return r.vnode.shapeFlag&4}let bo=!1;function Dm(r,a=!1,x=!1){a&&pa(a);const{props:t,children:w}=r.vnode,g=nf(r);im(r,t,g,a),cm(r,w,x);const i=g?Fm(r,a):void 0;return a&&pa(!1),i}function Fm(r,a){const x=r.type;r.accessCache=Object.create(null),r.proxy=new Proxy(r.ctx,Zp);const{setup:t}=x;if(t){An();const w=r.setupContext=t.length>1?sf(r):null,g=$n(r),i=is(t,r,0,[r.props,w]),u=Wa(i);if(Rn(),g(),(u||r.sp)&&!Cn(r)&&tl(r),u){if(i.then(ma,ma),a)return i.then(o=>{ya(r,o,a)}).catch(o=>{wo(o,r,0)});r.asyncDep=i}else ya(r,i,a)}else of(r,a)}function ya(r,a,x){at(a)?r.type.__ssrInlineRender?r.ssrRender=a:r.render=a:At(a)&&(r.setupState=fd(a)),of(r,x)}let Su;function of(r,a,x){const t=r.type;if(!r.render){if(!a&&Su&&!t.render){const w=t.template||rl(r).template;if(w){const{isCustomElement:g,compilerOptions:i}=r.appContext.config,{delimiters:u,compilerOptions:o}=t,h=$t($t({isCustomElement:g,delimiters:u},i),o);t.render=Su(w,h)}}r.render=t.render||Qr}{const w=$n(r);An();try{Jp(r)}finally{Rn(),w()}}}const Nm={get(r,a){return mr(r,"get",""),r[a]}};function sf(r){const a=x=>{r.exposed=x||{}};return{attrs:new Proxy(r.attrs,Nm),slots:r.slots,emit:r.emit,expose:a}}function ci(r){return r.exposed?r.exposeProxy||(r.exposeProxy=new Proxy(fd(bp(r.exposed)),{get(a,x){if(x in a)return a[x];if(x in Go)return Go[x](r)},has(a,x){return x in a||x in Go}})):r.proxy}function ga(r,a=!0){return at(r)?r.displayName||r.name:r.name||a&&r.__name}function Um(r){return at(r)&&"__vccOpts"in r}const vt=(r,a)=>kp(r,a,bo);function Jt(r,a,x){const t=arguments.length;return t===2?At(a)&&!st(a)?Xn(a)?ft(r,null,[a]):ft(r,a):ft(r,null,a):(t>3?x=Array.prototype.slice.call(arguments,2):t===3&&Xn(x)&&(x=[x]),ft(r,a,x))}const af="3.5.13";/** +**/function ss(r,a,x,t){try{return t?r(...t):r()}catch(w){jo(w,a,x)}}function Hr(r,a,x,t){if(at(r)){const w=ss(r,a,x,t);return w&&Wa(w)&&w.catch(g=>{jo(g,a,x)}),w}if(st(r)){const w=[];for(let g=0;g>>1,w=xr[t],g=Zo(w);g=Zo(x)?xr.push(r):xr.splice(Op(a),0,r),r.flags|=1,md()}}function md(){Ns||(Ns=pd.then(yd))}function aa(r){st(r)?mo.push(...r):xn&&r.id===-1?xn.splice(so+1,0,r):r.flags&1||(mo.push(r),r.flags|=1),md()}function cu(r,a,x=Kr+1){for(;xZo(x)-Zo(t));if(mo.length=0,xn){xn.push(...a);return}for(xn=a,so=0;sor.id==null?r.flags&2?-1:1/0:r.id;function yd(r){try{for(Kr=0;Kr{t._d&&ju(-1);const g=Bs(a);let i;try{i=r(...w)}finally{Bs(g),t._d&&ju(1)}return i};return t._n=!0,t._c=!0,t._d=!0,t}function Z_(r,a){if(Qt===null)return r;const x=ci(Qt),t=r.dirs||(r.dirs=[]);for(let w=0;wr.__isTeleport,wn=Symbol("_leaveCb"),_s=Symbol("_enterCb");function Ap(){const r={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Vr(()=>{r.isMounted=!0}),as(()=>{r.isUnmounting=!0}),r}const Ar=[Function,Array],bd={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Ar,onEnter:Ar,onAfterEnter:Ar,onEnterCancelled:Ar,onBeforeLeave:Ar,onLeave:Ar,onAfterLeave:Ar,onLeaveCancelled:Ar,onBeforeAppear:Ar,onAppear:Ar,onAfterAppear:Ar,onAppearCancelled:Ar},_d=r=>{const a=r.subTree;return a.component?_d(a.component):a},Rp={name:"BaseTransition",props:bd,setup(r,{slots:a}){const x=Qn(),t=Ap();return()=>{const w=a.default&&jd(a.default(),!0);if(!w||!w.length)return;const g=xd(w),i=_t(r),{mode:u}=i;if(t.isLeaving)return Ii(g);const o=du(g);if(!o)return Ii(g);let h=la(o,i,t,x,m=>h=m);o.type!==Kt&&vo(o,h);let y=x.subTree&&du(x.subTree);if(y&&y.type!==Kt&&!Br(o,y)&&_d(x).type!==Kt){let m=la(y,i,t,x);if(vo(y,m),u==="out-in"&&o.type!==Kt)return t.isLeaving=!0,m.afterLeave=()=>{t.isLeaving=!1,x.job.flags&8||x.update(),delete m.afterLeave,y=void 0},Ii(g);u==="in-out"&&o.type!==Kt?m.delayLeave=(n,s,c)=>{const f=wd(t,y);f[String(y.key)]=y,n[wn]=()=>{s(),n[wn]=void 0,delete h.delayedLeave,y=void 0},h.delayedLeave=()=>{c(),delete h.delayedLeave,y=void 0}}:y=void 0}else y&&(y=void 0);return g}}};function xd(r){let a=r[0];if(r.length>1){for(const x of r)if(x.type!==Kt){a=x;break}}return a}const Lp=Rp;function wd(r,a){const{leavingVNodes:x}=r;let t=x.get(a.type);return t||(t=Object.create(null),x.set(a.type,t)),t}function la(r,a,x,t,w){const{appear:g,mode:i,persisted:u=!1,onBeforeEnter:o,onEnter:h,onAfterEnter:y,onEnterCancelled:m,onBeforeLeave:n,onLeave:s,onAfterLeave:c,onLeaveCancelled:f,onBeforeAppear:p,onAppear:d,onAfterAppear:l,onAppearCancelled:b}=a,v=String(r.key),j=wd(x,r),E=(P,R)=>{P&&Hr(P,t,9,R)},T=(P,R)=>{const C=R[1];E(P,R),st(P)?P.every(I=>I.length<=1)&&C():P.length<=1&&C()},M={mode:i,persisted:u,beforeEnter(P){let R=o;if(!x.isMounted)if(g)R=p||o;else return;P[wn]&&P[wn](!0);const C=j[v];C&&Br(r,C)&&C.el[wn]&&C.el[wn](),E(R,[P])},enter(P){let R=h,C=y,I=m;if(!x.isMounted)if(g)R=d||h,C=l||y,I=b||m;else return;let A=!1;const N=P[_s]=F=>{A||(A=!0,F?E(I,[P]):E(C,[P]),M.delayedLeave&&M.delayedLeave(),P[_s]=void 0)};R?T(R,[P,N]):N()},leave(P,R){const C=String(r.key);if(P[_s]&&P[_s](!0),x.isUnmounting)return R();E(n,[P]);let I=!1;const A=P[wn]=N=>{I||(I=!0,R(),N?E(f,[P]):E(c,[P]),P[wn]=void 0,j[C]===r&&delete j[C])};j[C]=r,s?T(s,[P,A]):A()},clone(P){const R=la(P,a,x,t,w);return w&&w(R),R}};return M}function Ii(r){if(is(r))return r=en(r),r.children=null,r}function du(r){if(!is(r))return vd(r.type)&&r.children?xd(r.children):r;const{shapeFlag:a,children:x}=r;if(x){if(a&16)return x[0];if(a&32&&at(x.default))return x.default()}}function vo(r,a){r.shapeFlag&6&&r.component?(r.transition=a,vo(r.component.subTree,a)):r.shapeFlag&128?(r.ssContent.transition=a.clone(r.ssContent),r.ssFallback.transition=a.clone(r.ssFallback)):r.transition=a}function jd(r,a=!1,x){let t=[],w=0;for(let g=0;g1)for(let g=0;gQo(c,a&&(st(a)?a[f]:a),x,t,w));return}if(On(t)&&!w){t.shapeFlag&512&&t.type.__asyncResolved&&t.component.subTree.component&&Qo(r,a,x,t.component.subTree);return}const g=t.shapeFlag&4?ci(t.component):t.el,i=w?null:g,{i:u,r:o}=r,h=a&&a.r,y=u.refs===Mt?u.refs={}:u.refs,m=u.setupState,n=_t(m),s=m===Mt?()=>!1:c=>jt(n,c);if(h!=null&&h!==o&&(Ut(h)?(y[h]=null,s(h)&&(m[h]=null)):or(h)&&(h.value=null)),at(o))ss(o,u,12,[i,y]);else{const c=Ut(o),f=or(o);if(c||f){const p=()=>{if(r.f){const d=c?s(o)?m[o]:y[o]:o.value;w?st(d)&&za(d,g):st(d)?d.includes(g)||d.push(g):c?(y[o]=[g],s(o)&&(m[o]=y[o])):(o.value=[g],r.k&&(y[r.k]=o.value))}else c?(y[o]=i,s(o)&&(m[o]=i)):f&&(o.value=i,r.k&&(y[r.k]=i))};i?(p.id=-1,lr(p,x)):p()}}}let fu=!1;const oo=()=>{fu||(console.error("Hydration completed but contains mismatches."),fu=!0)},Dp=r=>r.namespaceURI.includes("svg")&&r.tagName!=="foreignObject",Fp=r=>r.namespaceURI.includes("MathML"),xs=r=>{if(r.nodeType===1){if(Dp(r))return"svg";if(Fp(r))return"mathml"}},lo=r=>r.nodeType===8;function Np(r){const{mt:a,p:x,o:{patchProp:t,createText:w,nextSibling:g,parentNode:i,remove:u,insert:o,createComment:h}}=r,y=(b,v)=>{if(!v.hasChildNodes()){x(null,b,v),Us(),v._vnode=b;return}m(v.firstChild,b,null,null,null),Us(),v._vnode=b},m=(b,v,j,E,T,M=!1)=>{M=M||!!v.dynamicChildren;const P=lo(b)&&b.data==="[",R=()=>f(b,v,j,E,T,P),{type:C,ref:I,shapeFlag:A,patchFlag:N}=v;let F=b.nodeType;v.el=b,N===-2&&(M=!1,v.dynamicChildren=null);let U=null;switch(C){case Xn:F!==3?v.children===""?(o(v.el=w(""),i(b),b),U=b):U=R():(b.data!==v.children&&(oo(),b.data=v.children),U=g(b));break;case Kt:l(b)?(U=g(b),d(v.el=b.content.firstChild,b,j)):F!==8||P?U=R():U=g(b);break;case Vo:if(P&&(b=g(b),F=b.nodeType),F===1||F===3){U=b;const W=!v.children.length;for(let V=0;V{M=M||!!v.dynamicChildren;const{type:P,props:R,patchFlag:C,shapeFlag:I,dirs:A,transition:N}=v,F=P==="input"||P==="option";if(F||C!==-1){A&&Zr(v,null,j,"created");let U=!1;if(l(b)){U=qd(null,N)&&j&&j.vnode.props&&j.vnode.props.appear;const V=b.content.firstChild;U&&N.beforeEnter(V),d(V,b,j),v.el=b=V}if(I&16&&!(R&&(R.innerHTML||R.textContent))){let V=s(b.firstChild,v,b,j,E,T,M);for(;V;){ws(b,1)||oo();const H=V;V=V.nextSibling,u(H)}}else if(I&8){let V=v.children;V[0]===` +`&&(b.tagName==="PRE"||b.tagName==="TEXTAREA")&&(V=V.slice(1)),b.textContent!==V&&(ws(b,0)||oo(),b.textContent=v.children)}if(R){if(F||!M||C&48){const V=b.tagName.includes("-");for(const H in R)(F&&(H.endsWith("value")||H==="indeterminate")||ns(H)&&!ho(H)||H[0]==="."||V)&&t(b,H,null,R[H],void 0,j)}else if(R.onClick)t(b,"onClick",null,R.onClick,void 0,j);else if(C&4&&Wn(R.style))for(const V in R.style)R.style[V]}let W;(W=R&&R.onVnodeBeforeMount)&&Sr(W,j,v),A&&Zr(v,null,j,"beforeMount"),((W=R&&R.onVnodeMounted)||A||U)&&Qd(()=>{W&&Sr(W,j,v),U&&N.enter(b),A&&Zr(v,null,j,"mounted")},E)}return b.nextSibling},s=(b,v,j,E,T,M,P)=>{P=P||!!v.dynamicChildren;const R=v.children,C=R.length;for(let I=0;I{const{slotScopeIds:P}=v;P&&(T=T?T.concat(P):P);const R=i(b),C=s(g(b),v,R,j,E,T,M);return C&&lo(C)&&C.data==="]"?g(v.anchor=C):(oo(),o(v.anchor=h("]"),R,C),C)},f=(b,v,j,E,T,M)=>{if(ws(b.parentElement,1)||oo(),v.el=null,M){const C=p(b);for(;;){const I=g(b);if(I&&I!==C)u(I);else break}}const P=g(b),R=i(b);return u(b),x(null,v,R,P,j,E,xs(R),T),j&&(j.vnode.el=v.el,li(j,v.el)),P},p=(b,v="[",j="]")=>{let E=0;for(;b;)if(b=g(b),b&&lo(b)&&(b.data===v&&E++,b.data===j)){if(E===0)return g(b);E--}return b},d=(b,v,j)=>{const E=v.parentNode;E&&E.replaceChild(b,v);let T=j;for(;T;)T.vnode.el===v&&(T.vnode.el=T.subTree.el=b),T=T.parent},l=b=>b.nodeType===1&&b.tagName==="TEMPLATE";return[y,m]}const hu="data-allow-mismatch",Up={0:"text",1:"children",2:"class",3:"style",4:"attribute"};function ws(r,a){if(a===0||a===1)for(;r&&!r.hasAttribute(hu);)r=r.parentElement;const x=r&&r.getAttribute(hu);if(x==null)return!1;if(x==="")return!0;{const t=x.split(",");return a===0&&t.includes("children")?!0:x.split(",").includes(Up[a])}}ni().requestIdleCallback;ni().cancelIdleCallback;function Bp(r,a){if(lo(r)&&r.data==="["){let x=1,t=r.nextSibling;for(;t;){if(t.nodeType===1){if(a(t)===!1)break}else if(lo(t))if(t.data==="]"){if(--x===0)break}else t.data==="["&&x++;t=t.nextSibling}}else a(r)}const On=r=>!!r.type.__asyncLoader;/*! #__NO_SIDE_EFFECTS__ */function dt(r){at(r)&&(r={loader:r});const{loader:a,loadingComponent:x,errorComponent:t,delay:w=200,hydrate:g,timeout:i,suspensible:u=!0,onError:o}=r;let h=null,y,m=0;const n=()=>(m++,h=null,s()),s=()=>{let c;return h||(c=h=a().catch(f=>{if(f=f instanceof Error?f:new Error(String(f)),o)return new Promise((p,d)=>{o(f,()=>p(n()),()=>d(f),m+1)});throw f}).then(f=>c!==h&&h?h:(f&&(f.__esModule||f[Symbol.toStringTag]==="Module")&&(f=f.default),y=f,f)))};return gr({name:"AsyncComponentWrapper",__asyncLoader:s,__asyncHydrate(c,f,p){const d=g?()=>{const l=g(p,b=>Bp(c,b));l&&(f.bum||(f.bum=[])).push(l)}:p;y?d():s().then(()=>!f.isUnmounted&&d())},get __asyncResolved(){return y},setup(){const c=Zt;if(tl(c),y)return()=>Di(y,c);const f=b=>{h=null,jo(b,c,13,!t)};if(u&&c.suspense||_o)return s().then(b=>()=>Di(b,c)).catch(b=>(f(b),()=>t?ht(t,{error:b}):null));const p=mt(!1),d=mt(),l=mt(!!w);return w&&setTimeout(()=>{l.value=!1},w),i!=null&&setTimeout(()=>{if(!p.value&&!d.value){const b=new Error(`Async component timed out after ${i}ms.`);f(b),d.value=b}},i),s().then(()=>{p.value=!0,c.parent&&is(c.parent.vnode)&&c.parent.update()}).catch(b=>{f(b),d.value=b}),()=>{if(p.value&&y)return Di(y,c);if(d.value&&t)return ht(t,{error:d.value});if(x&&!l.value)return ht(x)}}})}function Di(r,a){const{ref:x,props:t,children:w,ce:g}=a.vnode,i=ht(r,t,w);return i.ref=x,i.ce=g,delete a.vnode.ce,i}const is=r=>r.type.__isKeepAlive,Gp={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(r,{slots:a}){const x=Qn(),t=x.ctx;if(!t.renderer)return()=>{const l=a.default&&a.default();return l&&l.length===1?l[0]:l};const w=new Map,g=new Set;let i=null;const u=x.suspense,{renderer:{p:o,m:h,um:y,o:{createElement:m}}}=t,n=m("div");t.activate=(l,b,v,j,E)=>{const T=l.component;h(l,b,v,0,u),o(T.vnode,l,b,v,T,u,j,l.slotScopeIds,E),lr(()=>{T.isDeactivated=!1,T.a&&po(T.a);const M=l.props&&l.props.onVnodeMounted;M&&Sr(M,T.parent,l)},u)},t.deactivate=l=>{const b=l.component;Vs(b.m),Vs(b.a),h(l,n,null,1,u),lr(()=>{b.da&&po(b.da);const v=l.props&&l.props.onVnodeUnmounted;v&&Sr(v,b.parent,l),b.isDeactivated=!0},u)};function s(l){Fi(l),y(l,x,u,!0)}function c(l){w.forEach((b,v)=>{const j=ga(b.type);j&&!l(j)&&f(v)})}function f(l){const b=w.get(l);b&&(!i||!Br(b,i))?s(b):i&&Fi(i),w.delete(l),g.delete(l)}Pn(()=>[r.include,r.exclude],([l,b])=>{l&&c(v=>Fo(l,v)),b&&c(v=>!Fo(b,v))},{flush:"post",deep:!0});let p=null;const d=()=>{p!=null&&(Hs(x.subTree.type)?lr(()=>{w.set(p,js(x.subTree))},x.subTree.suspense):w.set(p,js(x.subTree)))};return Vr(d),kd(d),as(()=>{w.forEach(l=>{const{subTree:b,suspense:v}=x,j=js(b);if(l.type===j.type&&l.key===j.key){Fi(j);const E=j.component.da;E&&lr(E,v);return}s(l)})}),()=>{if(p=null,!a.default)return i=null;const l=a.default(),b=l[0];if(l.length>1)return i=null,l;if(!$n(b)||!(b.shapeFlag&4)&&!(b.shapeFlag&128))return i=null,b;let v=js(b);if(v.type===Kt)return i=null,v;const j=v.type,E=ga(On(v)?v.type.__asyncResolved||{}:j),{include:T,exclude:M,max:P}=r;if(T&&(!E||!Fo(T,E))||M&&E&&Fo(M,E))return v.shapeFlag&=-257,i=v,b;const R=v.key==null?j:v.key,C=w.get(R);return v.el&&(v=en(v),b.shapeFlag&128&&(b.ssContent=v)),p=R,C?(v.el=C.el,v.component=C.component,v.transition&&vo(v,v.transition),v.shapeFlag|=512,g.delete(R),g.add(R)):(g.add(R),P&&g.size>parseInt(P,10)&&f(g.values().next().value)),v.shapeFlag|=256,i=v,Hs(b.type)?b:v}}},Vp=Gp;function Fo(r,a){return st(r)?r.some(x=>Fo(x,a)):Ut(r)?r.split(",").includes(a):Gh(r)?(r.lastIndex=0,r.test(a)):!1}function Sd(r,a){Td(r,"a",a)}function Ed(r,a){Td(r,"da",a)}function Td(r,a,x=Zt){const t=r.__wdc||(r.__wdc=()=>{let w=x;for(;w;){if(w.isDeactivated)return;w=w.parent}return r()});if(ii(a,t,x),x){let w=x.parent;for(;w&&w.parent;)is(w.parent.vnode)&&Hp(t,a,x,w),w=w.parent}}function Hp(r,a,x,t){const w=ii(a,r,t,!0);ls(()=>{za(t[a],w)},x)}function Fi(r){r.shapeFlag&=-257,r.shapeFlag&=-513}function js(r){return r.shapeFlag&128?r.ssContent:r}function ii(r,a,x=Zt,t=!1){if(x){const w=x[r]||(x[r]=[]),g=a.__weh||(a.__weh=(...i)=>{Rn();const u=Yn(x),o=Hr(a,x,r,i);return u(),Ln(),o});return t?w.unshift(g):w.push(g),g}}const mn=r=>(a,x=Zt)=>{(!_o||r==="sp")&&ii(r,(...t)=>a(...t),x)},zp=mn("bm"),Vr=mn("m"),Wp=mn("bu"),kd=mn("u"),as=mn("bum"),ls=mn("um"),qp=mn("sp"),Xp=mn("rtg"),$p=mn("rtc");function Md(r,a=Zt){ii("ec",r,a)}const Cd="components";function pu(r,a){return Pd(Cd,r,!0,a)||r}const Od=Symbol.for("v-ndc");function Yp(r){return Ut(r)?Pd(Cd,r,!1)||r:r||Od}function Pd(r,a,x=!0,t=!1){const w=Qt||Zt;if(w){const g=w.type;{const u=ga(g,!1);if(u&&(u===a||u===Ir(a)||u===ri(Ir(a))))return g}const i=mu(w[r]||g[r],a)||mu(w.appContext[r],a);return!i&&t?g:i}}function mu(r,a){return r&&(r[a]||r[Ir(a)]||r[ri(Ir(a))])}function Q_(r,a,x,t){let w;const g=x,i=st(r);if(i||Ut(r)){const u=i&&Wn(r);let o=!1;u&&(o=!Rr(r),r=si(r)),w=new Array(r.length);for(let h=0,y=r.length;ha(u,o,void 0,g));else{const u=Object.keys(r);w=new Array(u.length);for(let o=0,h=u.length;o$n(a)?!(a.type===Kt||a.type===cr&&!Ad(a.children)):!0)?r:null}const ua=r=>r?nf(r)?ci(r):ua(r.parent):null,Go=$t(Object.create(null),{$:r=>r,$el:r=>r.vnode.el,$data:r=>r.data,$props:r=>r.props,$attrs:r=>r.attrs,$slots:r=>r.slots,$refs:r=>r.refs,$parent:r=>ua(r.parent),$root:r=>ua(r.root),$host:r=>r.ce,$emit:r=>r.emit,$options:r=>rl(r),$forceUpdate:r=>r.f||(r.f=()=>{el(r.update)}),$nextTick:r=>r.n||(r.n=Pr.bind(r.proxy)),$watch:r=>ym.bind(r)}),Ni=(r,a)=>r!==Mt&&!r.__isScriptSetup&&jt(r,a),Kp={get({_:r},a){if(a==="__v_skip")return!0;const{ctx:x,setupState:t,data:w,props:g,accessCache:i,type:u,appContext:o}=r;let h;if(a[0]!=="$"){const s=i[a];if(s!==void 0)switch(s){case 1:return t[a];case 2:return w[a];case 4:return x[a];case 3:return g[a]}else{if(Ni(t,a))return i[a]=1,t[a];if(w!==Mt&&jt(w,a))return i[a]=2,w[a];if((h=r.propsOptions[0])&&jt(h,a))return i[a]=3,g[a];if(x!==Mt&&jt(x,a))return i[a]=4,x[a];ca&&(i[a]=0)}}const y=Go[a];let m,n;if(y)return a==="$attrs"&&mr(r.attrs,"get",""),y(r);if((m=u.__cssModules)&&(m=m[a]))return m;if(x!==Mt&&jt(x,a))return i[a]=4,x[a];if(n=o.config.globalProperties,jt(n,a))return n[a]},set({_:r},a,x){const{data:t,setupState:w,ctx:g}=r;return Ni(w,a)?(w[a]=x,!0):t!==Mt&&jt(t,a)?(t[a]=x,!0):jt(r.props,a)||a[0]==="$"&&a.slice(1)in r?!1:(g[a]=x,!0)},has({_:{data:r,setupState:a,accessCache:x,ctx:t,appContext:w,propsOptions:g}},i){let u;return!!x[i]||r!==Mt&&jt(r,i)||Ni(a,i)||(u=g[0])&&jt(u,i)||jt(t,i)||jt(Go,i)||jt(w.config.globalProperties,i)},defineProperty(r,a,x){return x.get!=null?r._.accessCache[a]=0:jt(x,"value")&&this.set(r,a,x.value,null),Reflect.defineProperty(r,a,x)}};function ex(){return Zp().slots}function Zp(){const r=Qn();return r.setupContext||(r.setupContext=sf(r))}function yu(r){return st(r)?r.reduce((a,x)=>(a[x]=null,a),{}):r}function tx(r){const a=Qn();let x=r();return ma(),Wa(x)&&(x=x.catch(t=>{throw Yn(a),t})),[x,()=>Yn(a)]}let ca=!0;function Qp(r){const a=rl(r),x=r.proxy,t=r.ctx;ca=!1,a.beforeCreate&&gu(a.beforeCreate,r,"bc");const{data:w,computed:g,methods:i,watch:u,provide:o,inject:h,created:y,beforeMount:m,mounted:n,beforeUpdate:s,updated:c,activated:f,deactivated:p,beforeDestroy:d,beforeUnmount:l,destroyed:b,unmounted:v,render:j,renderTracked:E,renderTriggered:T,errorCaptured:M,serverPrefetch:P,expose:R,inheritAttrs:C,components:I,directives:A,filters:N}=a;if(h&&Jp(h,t,null),i)for(const W in i){const V=i[W];at(V)&&(t[W]=V.bind(x))}if(w){const W=w.call(x,x);At(W)&&(r.data=In(W))}if(ca=!0,g)for(const W in g){const V=g[W],H=at(V)?V.bind(x,x):at(V.get)?V.get.bind(x,x):Qr,Q=!at(V)&&at(V.set)?V.set.bind(x):Qr,ee=bt({get:H,set:Q});Object.defineProperty(t,W,{enumerable:!0,configurable:!0,get:()=>ee.value,set:ae=>ee.value=ae})}if(u)for(const W in u)Rd(u[W],t,x,W);if(o){const W=at(o)?o.call(x):o;Reflect.ownKeys(W).forEach(V=>{Lr(V,W[V])})}y&&gu(y,r,"c");function U(W,V){st(V)?V.forEach(H=>W(H.bind(x))):V&&W(V.bind(x))}if(U(zp,m),U(Vr,n),U(Wp,s),U(kd,c),U(Sd,f),U(Ed,p),U(Md,M),U($p,E),U(Xp,T),U(as,l),U(ls,v),U(qp,P),st(R))if(R.length){const W=r.exposed||(r.exposed={});R.forEach(V=>{Object.defineProperty(W,V,{get:()=>x[V],set:H=>x[V]=H})})}else r.exposed||(r.exposed={});j&&r.render===Qr&&(r.render=j),C!=null&&(r.inheritAttrs=C),I&&(r.components=I),A&&(r.directives=A),P&&tl(r)}function Jp(r,a,x=Qr){st(r)&&(r=da(r));for(const t in r){const w=r[t];let g;At(w)?"default"in w?g=zt(w.from||t,w.default,!0):g=zt(w.from||t):g=zt(w),or(g)?Object.defineProperty(a,t,{enumerable:!0,configurable:!0,get:()=>g.value,set:i=>g.value=i}):a[t]=g}}function gu(r,a,x){Hr(st(r)?r.map(t=>t.bind(a.proxy)):r.bind(a.proxy),a,x)}function Rd(r,a,x,t){let w=t.includes(".")?Yd(x,t):()=>x[t];if(Ut(r)){const g=a[r];at(g)&&Pn(w,g)}else if(at(r))Pn(w,r.bind(x));else if(At(r))if(st(r))r.forEach(g=>Rd(g,a,x,t));else{const g=at(r.handler)?r.handler.bind(x):a[r.handler];at(g)&&Pn(w,g,r)}}function rl(r){const a=r.type,{mixins:x,extends:t}=a,{mixins:w,optionsCache:g,config:{optionMergeStrategies:i}}=r.appContext,u=g.get(a);let o;return u?o=u:!w.length&&!x&&!t?o=a:(o={},w.length&&w.forEach(h=>Gs(o,h,i,!0)),Gs(o,a,i)),At(a)&&g.set(a,o),o}function Gs(r,a,x,t=!1){const{mixins:w,extends:g}=a;g&&Gs(r,g,x,!0),w&&w.forEach(i=>Gs(r,i,x,!0));for(const i in a)if(!(t&&i==="expose")){const u=em[i]||x&&x[i];r[i]=u?u(r[i],a[i]):a[i]}return r}const em={data:vu,props:bu,emits:bu,methods:No,computed:No,beforeCreate:br,created:br,beforeMount:br,mounted:br,beforeUpdate:br,updated:br,beforeDestroy:br,beforeUnmount:br,destroyed:br,unmounted:br,activated:br,deactivated:br,errorCaptured:br,serverPrefetch:br,components:No,directives:No,watch:rm,provide:vu,inject:tm};function vu(r,a){return a?r?function(){return $t(at(r)?r.call(this,this):r,at(a)?a.call(this,this):a)}:a:r}function tm(r,a){return No(da(r),da(a))}function da(r){if(st(r)){const a={};for(let x=0;x1)return x&&at(a)?a.call(t&&t.proxy):a}}function Id(){return!!(Zt||Qt||qn)}const Dd={},Fd=()=>Object.create(Dd),Nd=r=>Object.getPrototypeOf(r)===Dd;function sm(r,a,x,t=!1){const w={},g=Fd();r.propsDefaults=Object.create(null),Ud(r,a,w,g);for(const i in r.propsOptions[0])i in w||(w[i]=void 0);x?r.props=t?w:fn(w):r.type.props?r.props=w:r.props=g,r.attrs=g}function im(r,a,x,t){const{props:w,attrs:g,vnode:{patchFlag:i}}=r,u=_t(w),[o]=r.propsOptions;let h=!1;if((t||i>0)&&!(i&16)){if(i&8){const y=r.vnode.dynamicProps;for(let m=0;m{o=!0;const[n,s]=Bd(m,a,!0);$t(i,n),s&&u.push(...s)};!x&&a.mixins.length&&a.mixins.forEach(y),r.extends&&y(r.extends),r.mixins&&r.mixins.forEach(y)}if(!g&&!o)return At(r)&&t.set(r,co),co;if(st(g))for(let y=0;yr[0]==="_"||r==="$stable",nl=r=>st(r)?r.map(Mr):[Mr(r)],lm=(r,a,x)=>{if(a._n)return a;const t=jr((...w)=>nl(a(...w)),x);return t._c=!1,t},Vd=(r,a,x)=>{const t=r._ctx;for(const w in r){if(Gd(w))continue;const g=r[w];if(at(g))a[w]=lm(w,g,t);else if(g!=null){const i=nl(g);a[w]=()=>i}}},Hd=(r,a)=>{const x=nl(a);r.slots.default=()=>x},zd=(r,a,x)=>{for(const t in a)(x||t!=="_")&&(r[t]=a[t])},um=(r,a,x)=>{const t=r.slots=Fd();if(r.vnode.shapeFlag&32){const w=a._;w?(zd(t,a,x),x&&Hc(t,"_",w,!0)):Vd(a,t)}else a&&Hd(r,a)},cm=(r,a,x)=>{const{vnode:t,slots:w}=r;let g=!0,i=Mt;if(t.shapeFlag&32){const u=a._;u?x&&u===1?g=!1:zd(w,a,x):(g=!a.$stable,Vd(a,w)),i=a}else a&&(Hd(r,a),i={default:1});if(g)for(const u in w)!Gd(u)&&i[u]==null&&delete w[u]},lr=Qd;function dm(r){return Wd(r)}function fm(r){return Wd(r,Np)}function Wd(r,a){const x=ni();x.__VUE__=!0;const{insert:t,remove:w,patchProp:g,createElement:i,createText:u,createComment:o,setText:h,setElementText:y,parentNode:m,nextSibling:n,setScopeId:s=Qr,insertStaticContent:c}=r,f=(Y,z,te,ce=null,fe=null,de=null,ye=void 0,ve=null,Ee=!!z.dynamicChildren)=>{if(Y===z)return;Y&&!Br(Y,z)&&(ce=K(Y),ae(Y,fe,de,!0),Y=null),z.patchFlag===-2&&(Ee=!1,z.dynamicChildren=null);const{type:ge,ref:Ne,shapeFlag:Re}=z;switch(ge){case Xn:p(Y,z,te,ce);break;case Kt:d(Y,z,te,ce);break;case Vo:Y==null&&l(z,te,ce,ye);break;case cr:I(Y,z,te,ce,fe,de,ye,ve,Ee);break;default:Re&1?j(Y,z,te,ce,fe,de,ye,ve,Ee):Re&6?A(Y,z,te,ce,fe,de,ye,ve,Ee):(Re&64||Re&128)&&ge.process(Y,z,te,ce,fe,de,ye,ve,Ee,ue)}Ne!=null&&fe&&Qo(Ne,Y&&Y.ref,de,z||Y,!z)},p=(Y,z,te,ce)=>{if(Y==null)t(z.el=u(z.children),te,ce);else{const fe=z.el=Y.el;z.children!==Y.children&&h(fe,z.children)}},d=(Y,z,te,ce)=>{Y==null?t(z.el=o(z.children||""),te,ce):z.el=Y.el},l=(Y,z,te,ce)=>{[Y.el,Y.anchor]=c(Y.children,z,te,ce,Y.el,Y.anchor)},b=({el:Y,anchor:z},te,ce)=>{let fe;for(;Y&&Y!==z;)fe=n(Y),t(Y,te,ce),Y=fe;t(z,te,ce)},v=({el:Y,anchor:z})=>{let te;for(;Y&&Y!==z;)te=n(Y),w(Y),Y=te;w(z)},j=(Y,z,te,ce,fe,de,ye,ve,Ee)=>{z.type==="svg"?ye="svg":z.type==="math"&&(ye="mathml"),Y==null?E(z,te,ce,fe,de,ye,ve,Ee):P(Y,z,fe,de,ye,ve,Ee)},E=(Y,z,te,ce,fe,de,ye,ve)=>{let Ee,ge;const{props:Ne,shapeFlag:Re,transition:Ie,dirs:Fe}=Y;if(Ee=Y.el=i(Y.type,de,Ne&&Ne.is,Ne),Re&8?y(Ee,Y.children):Re&16&&M(Y.children,Ee,null,ce,fe,Ui(Y,de),ye,ve),Fe&&Zr(Y,null,ce,"created"),T(Ee,Y,Y.scopeId,ye,ce),Ne){for(const we in Ne)we!=="value"&&!ho(we)&&g(Ee,we,null,Ne[we],de,ce);"value"in Ne&&g(Ee,"value",null,Ne.value,de),(ge=Ne.onVnodeBeforeMount)&&Sr(ge,ce,Y)}Fe&&Zr(Y,null,ce,"beforeMount");const Ge=qd(fe,Ie);Ge&&Ie.beforeEnter(Ee),t(Ee,z,te),((ge=Ne&&Ne.onVnodeMounted)||Ge||Fe)&&lr(()=>{ge&&Sr(ge,ce,Y),Ge&&Ie.enter(Ee),Fe&&Zr(Y,null,ce,"mounted")},fe)},T=(Y,z,te,ce,fe)=>{if(te&&s(Y,te),ce)for(let de=0;de{for(let ge=Ee;ge{const ve=z.el=Y.el;let{patchFlag:Ee,dynamicChildren:ge,dirs:Ne}=z;Ee|=Y.patchFlag&16;const Re=Y.props||Mt,Ie=z.props||Mt;let Fe;if(te&&Dn(te,!1),(Fe=Ie.onVnodeBeforeUpdate)&&Sr(Fe,te,z,Y),Ne&&Zr(z,Y,te,"beforeUpdate"),te&&Dn(te,!0),(Re.innerHTML&&Ie.innerHTML==null||Re.textContent&&Ie.textContent==null)&&y(ve,""),ge?R(Y.dynamicChildren,ge,ve,te,ce,Ui(z,fe),de):ye||V(Y,z,ve,null,te,ce,Ui(z,fe),de,!1),Ee>0){if(Ee&16)C(ve,Re,Ie,te,fe);else if(Ee&2&&Re.class!==Ie.class&&g(ve,"class",null,Ie.class,fe),Ee&4&&g(ve,"style",Re.style,Ie.style,fe),Ee&8){const Ge=z.dynamicProps;for(let we=0;we{Fe&&Sr(Fe,te,z,Y),Ne&&Zr(z,Y,te,"updated")},ce)},R=(Y,z,te,ce,fe,de,ye)=>{for(let ve=0;ve{if(z!==te){if(z!==Mt)for(const de in z)!ho(de)&&!(de in te)&&g(Y,de,z[de],null,fe,ce);for(const de in te){if(ho(de))continue;const ye=te[de],ve=z[de];ye!==ve&&de!=="value"&&g(Y,de,ve,ye,fe,ce)}"value"in te&&g(Y,"value",z.value,te.value,fe)}},I=(Y,z,te,ce,fe,de,ye,ve,Ee)=>{const ge=z.el=Y?Y.el:u(""),Ne=z.anchor=Y?Y.anchor:u("");let{patchFlag:Re,dynamicChildren:Ie,slotScopeIds:Fe}=z;Fe&&(ve=ve?ve.concat(Fe):Fe),Y==null?(t(ge,te,ce),t(Ne,te,ce),M(z.children||[],te,Ne,fe,de,ye,ve,Ee)):Re>0&&Re&64&&Ie&&Y.dynamicChildren?(R(Y.dynamicChildren,Ie,te,fe,de,ye,ve),(z.key!=null||fe&&z===fe.subTree)&&Xd(Y,z,!0)):V(Y,z,te,Ne,fe,de,ye,ve,Ee)},A=(Y,z,te,ce,fe,de,ye,ve,Ee)=>{z.slotScopeIds=ve,Y==null?z.shapeFlag&512?fe.ctx.activate(z,te,ce,ye,Ee):N(z,te,ce,fe,de,ye,Ee):F(Y,z,Ee)},N=(Y,z,te,ce,fe,de,ye)=>{const ve=Y.component=Rm(Y,ce,fe);if(is(Y)&&(ve.ctx.renderer=ue),Lm(ve,!1,ye),ve.asyncDep){if(fe&&fe.registerDep(ve,U,ye),!Y.el){const Ee=ve.subTree=ht(Kt);d(null,Ee,z,te)}}else U(ve,Y,z,te,fe,de,ye)},F=(Y,z,te)=>{const ce=z.component=Y.component;if(wm(Y,z,te))if(ce.asyncDep&&!ce.asyncResolved){W(ce,z,te);return}else ce.next=z,ce.update();else z.el=Y.el,ce.vnode=z},U=(Y,z,te,ce,fe,de,ye)=>{const ve=()=>{if(Y.isMounted){let{next:Re,bu:Ie,u:Fe,parent:Ge,vnode:we}=Y;{const Z=$d(Y);if(Z){Re&&(Re.el=we.el,W(Y,Re,ye)),Z.asyncDep.then(()=>{Y.isUnmounted||ve()});return}}let Le=Re,Te;Dn(Y,!1),Re?(Re.el=we.el,W(Y,Re,ye)):Re=we,Ie&&po(Ie),(Te=Re.props&&Re.props.onVnodeBeforeUpdate)&&Sr(Te,Ge,Re,we),Dn(Y,!0);const re=Bi(Y),se=Y.subTree;Y.subTree=re,f(se,re,m(se.el),K(se),Y,fe,de),Re.el=re.el,Le===null&&li(Y,re.el),Fe&&lr(Fe,fe),(Te=Re.props&&Re.props.onVnodeUpdated)&&lr(()=>Sr(Te,Ge,Re,we),fe)}else{let Re;const{el:Ie,props:Fe}=z,{bm:Ge,m:we,parent:Le,root:Te,type:re}=Y,se=On(z);if(Dn(Y,!1),Ge&&po(Ge),!se&&(Re=Fe&&Fe.onVnodeBeforeMount)&&Sr(Re,Le,z),Dn(Y,!0),Ie&&he){const Z=()=>{Y.subTree=Bi(Y),he(Ie,Y.subTree,Y,fe,null)};se&&re.__asyncHydrate?re.__asyncHydrate(Ie,Y,Z):Z()}else{Te.ce&&Te.ce._injectChildStyle(re);const Z=Y.subTree=Bi(Y);f(null,Z,te,ce,Y,fe,de),z.el=Z.el}if(we&&lr(we,fe),!se&&(Re=Fe&&Fe.onVnodeMounted)){const Z=z;lr(()=>Sr(Re,Le,Z),fe)}(z.shapeFlag&256||Le&&On(Le.vnode)&&Le.vnode.shapeFlag&256)&&Y.a&&lr(Y.a,fe),Y.isMounted=!0,z=te=ce=null}};Y.scope.on();const Ee=Y.effect=new Kc(ve);Y.scope.off();const ge=Y.update=Ee.run.bind(Ee),Ne=Y.job=Ee.runIfDirty.bind(Ee);Ne.i=Y,Ne.id=Y.uid,Ee.scheduler=()=>el(Ne),Dn(Y,!0),ge()},W=(Y,z,te)=>{z.component=Y;const ce=Y.vnode.props;Y.vnode=z,Y.next=null,im(Y,z.props,ce,te),cm(Y,z.children,te),Rn(),cu(Y),Ln()},V=(Y,z,te,ce,fe,de,ye,ve,Ee=!1)=>{const ge=Y&&Y.children,Ne=Y?Y.shapeFlag:0,Re=z.children,{patchFlag:Ie,shapeFlag:Fe}=z;if(Ie>0){if(Ie&128){Q(ge,Re,te,ce,fe,de,ye,ve,Ee);return}else if(Ie&256){H(ge,Re,te,ce,fe,de,ye,ve,Ee);return}}Fe&8?(Ne&16&&X(ge,fe,de),Re!==ge&&y(te,Re)):Ne&16?Fe&16?Q(ge,Re,te,ce,fe,de,ye,ve,Ee):X(ge,fe,de,!0):(Ne&8&&y(te,""),Fe&16&&M(Re,te,ce,fe,de,ye,ve,Ee))},H=(Y,z,te,ce,fe,de,ye,ve,Ee)=>{Y=Y||co,z=z||co;const ge=Y.length,Ne=z.length,Re=Math.min(ge,Ne);let Ie;for(Ie=0;IeNe?X(Y,fe,de,!0,!1,Re):M(z,te,ce,fe,de,ye,ve,Ee,Re)},Q=(Y,z,te,ce,fe,de,ye,ve,Ee)=>{let ge=0;const Ne=z.length;let Re=Y.length-1,Ie=Ne-1;for(;ge<=Re&&ge<=Ie;){const Fe=Y[ge],Ge=z[ge]=Ee?jn(z[ge]):Mr(z[ge]);if(Br(Fe,Ge))f(Fe,Ge,te,null,fe,de,ye,ve,Ee);else break;ge++}for(;ge<=Re&&ge<=Ie;){const Fe=Y[Re],Ge=z[Ie]=Ee?jn(z[Ie]):Mr(z[Ie]);if(Br(Fe,Ge))f(Fe,Ge,te,null,fe,de,ye,ve,Ee);else break;Re--,Ie--}if(ge>Re){if(ge<=Ie){const Fe=Ie+1,Ge=FeIe)for(;ge<=Re;)ae(Y[ge],fe,de,!0),ge++;else{const Fe=ge,Ge=ge,we=new Map;for(ge=Ge;ge<=Ie;ge++){const Se=z[ge]=Ee?jn(z[ge]):Mr(z[ge]);Se.key!=null&&we.set(Se.key,ge)}let Le,Te=0;const re=Ie-Ge+1;let se=!1,Z=0;const le=new Array(re);for(ge=0;ge=re){ae(Se,fe,de,!0);continue}let Pe;if(Se.key!=null)Pe=we.get(Se.key);else for(Le=Ge;Le<=Ie;Le++)if(le[Le-Ge]===0&&Br(Se,z[Le])){Pe=Le;break}Pe===void 0?ae(Se,fe,de,!0):(le[Pe-Ge]=ge+1,Pe>=Z?Z=Pe:se=!0,f(Se,z[Pe],te,null,fe,de,ye,ve,Ee),Te++)}const xe=se?hm(le):co;for(Le=xe.length-1,ge=re-1;ge>=0;ge--){const Se=Ge+ge,Pe=z[Se],He=Se+1{const{el:de,type:ye,transition:ve,children:Ee,shapeFlag:ge}=Y;if(ge&6){ee(Y.component.subTree,z,te,ce);return}if(ge&128){Y.suspense.move(z,te,ce);return}if(ge&64){ye.move(Y,z,te,ue);return}if(ye===cr){t(de,z,te);for(let Re=0;Reve.enter(de),fe);else{const{leave:Re,delayLeave:Ie,afterLeave:Fe}=ve,Ge=()=>t(de,z,te),we=()=>{Re(de,()=>{Ge(),Fe&&Fe()})};Ie?Ie(de,Ge,we):we()}else t(de,z,te)},ae=(Y,z,te,ce=!1,fe=!1)=>{const{type:de,props:ye,ref:ve,children:Ee,dynamicChildren:ge,shapeFlag:Ne,patchFlag:Re,dirs:Ie,cacheIndex:Fe}=Y;if(Re===-2&&(fe=!1),ve!=null&&Qo(ve,null,te,Y,!0),Fe!=null&&(z.renderCache[Fe]=void 0),Ne&256){z.ctx.deactivate(Y);return}const Ge=Ne&1&&Ie,we=!On(Y);let Le;if(we&&(Le=ye&&ye.onVnodeBeforeUnmount)&&Sr(Le,z,Y),Ne&6)G(Y.component,te,ce);else{if(Ne&128){Y.suspense.unmount(te,ce);return}Ge&&Zr(Y,null,z,"beforeUnmount"),Ne&64?Y.type.remove(Y,z,te,ue,ce):ge&&!ge.hasOnce&&(de!==cr||Re>0&&Re&64)?X(ge,z,te,!1,!0):(de===cr&&Re&384||!fe&&Ne&16)&&X(Ee,z,te),ce&&k(Y)}(we&&(Le=ye&&ye.onVnodeUnmounted)||Ge)&&lr(()=>{Le&&Sr(Le,z,Y),Ge&&Zr(Y,null,z,"unmounted")},te)},k=Y=>{const{type:z,el:te,anchor:ce,transition:fe}=Y;if(z===cr){D(te,ce);return}if(z===Vo){v(Y);return}const de=()=>{w(te),fe&&!fe.persisted&&fe.afterLeave&&fe.afterLeave()};if(Y.shapeFlag&1&&fe&&!fe.persisted){const{leave:ye,delayLeave:ve}=fe,Ee=()=>ye(te,de);ve?ve(Y.el,de,Ee):Ee()}else de()},D=(Y,z)=>{let te;for(;Y!==z;)te=n(Y),w(Y),Y=te;w(z)},G=(Y,z,te)=>{const{bum:ce,scope:fe,job:de,subTree:ye,um:ve,m:Ee,a:ge}=Y;Vs(Ee),Vs(ge),ce&&po(ce),fe.stop(),de&&(de.flags|=8,ae(ye,Y,z,te)),ve&&lr(ve,z),lr(()=>{Y.isUnmounted=!0},z),z&&z.pendingBranch&&!z.isUnmounted&&Y.asyncDep&&!Y.asyncResolved&&Y.suspenseId===z.pendingId&&(z.deps--,z.deps===0&&z.resolve())},X=(Y,z,te,ce=!1,fe=!1,de=0)=>{for(let ye=de;ye{if(Y.shapeFlag&6)return K(Y.component.subTree);if(Y.shapeFlag&128)return Y.suspense.next();const z=n(Y.anchor||Y.el),te=z&&z[Pp];return te?n(te):z};let J=!1;const ne=(Y,z,te)=>{Y==null?z._vnode&&ae(z._vnode,null,null,!0):f(z._vnode||null,Y,z,null,null,null,te),z._vnode=Y,J||(J=!0,cu(),Us(),J=!1)},ue={p:f,um:ae,m:ee,r:k,mt:N,mc:M,pc:V,pbc:R,n:K,o:r};let ie,he;return a&&([ie,he]=a(ue)),{render:ne,hydrate:ie,createApp:om(ne,ie)}}function Ui({type:r,props:a},x){return x==="svg"&&r==="foreignObject"||x==="mathml"&&r==="annotation-xml"&&a&&a.encoding&&a.encoding.includes("html")?void 0:x}function Dn({effect:r,job:a},x){x?(r.flags|=32,a.flags|=4):(r.flags&=-33,a.flags&=-5)}function qd(r,a){return(!r||r&&!r.pendingBranch)&&a&&!a.persisted}function Xd(r,a,x=!1){const t=r.children,w=a.children;if(st(t)&&st(w))for(let g=0;g>1,r[x[u]]0&&(a[t]=x[g-1]),x[g]=t)}}for(g=x.length,i=x[g-1];g-- >0;)x[g]=i,i=a[i];return x}function $d(r){const a=r.subTree.component;if(a)return a.asyncDep&&!a.asyncResolved?a:$d(a)}function Vs(r){if(r)for(let a=0;azt(pm);function Jr(r,a){return ol(r,null,a)}function Pn(r,a,x){return ol(r,a,x)}function ol(r,a,x=Mt){const{immediate:t,deep:w,flush:g,once:i}=x,u=$t({},x),o=a&&t||!a&&g!=="post";let h;if(_o){if(g==="sync"){const s=mm();h=s.__watcherHandles||(s.__watcherHandles=[])}else if(!o){const s=()=>{};return s.stop=Qr,s.resume=Qr,s.pause=Qr,s}}const y=Zt;u.call=(s,c,f)=>Hr(s,y,c,f);let m=!1;g==="post"?u.scheduler=s=>{lr(s,y&&y.suspense)}:g!=="sync"&&(m=!0,u.scheduler=(s,c)=>{c?s():el(s)}),u.augmentJob=s=>{a&&(s.flags|=4),m&&(s.flags|=2,y&&(s.id=y.uid,s.i=y))};const n=Mp(r,a,u);return _o&&(h?h.push(n):o&&n()),n}function ym(r,a,x){const t=this.proxy,w=Ut(r)?r.includes(".")?Yd(t,r):()=>t[r]:r.bind(t,t);let g;at(a)?g=a:(g=a.handler,x=a);const i=Yn(this),u=ol(w,g.bind(t),x);return i(),u}function Yd(r,a){const x=a.split(".");return()=>{let t=r;for(let w=0;wa==="modelValue"||a==="model-value"?r.modelModifiers:r[`${a}Modifiers`]||r[`${Ir(a)}Modifiers`]||r[`${Zn(a)}Modifiers`];function vm(r,a,...x){if(r.isUnmounted)return;const t=r.vnode.props||Mt;let w=x;const g=a.startsWith("update:"),i=g&&gm(t,a.slice(7));i&&(i.trim&&(w=x.map(y=>Ut(y)?y.trim():y)),i.number&&(w=x.map(ra)));let u,o=t[u=Oi(a)]||t[u=Oi(Ir(a))];!o&&g&&(o=t[u=Oi(Zn(a))]),o&&Hr(o,r,6,w);const h=t[u+"Once"];if(h){if(!r.emitted)r.emitted={};else if(r.emitted[u])return;r.emitted[u]=!0,Hr(h,r,6,w)}}function Kd(r,a,x=!1){const t=a.emitsCache,w=t.get(r);if(w!==void 0)return w;const g=r.emits;let i={},u=!1;if(!at(r)){const o=h=>{const y=Kd(h,a,!0);y&&(u=!0,$t(i,y))};!x&&a.mixins.length&&a.mixins.forEach(o),r.extends&&o(r.extends),r.mixins&&r.mixins.forEach(o)}return!g&&!u?(At(r)&&t.set(r,null),null):(st(g)?g.forEach(o=>i[o]=null):$t(i,g),At(r)&&t.set(r,i),i)}function ai(r,a){return!r||!ns(a)?!1:(a=a.slice(2).replace(/Once$/,""),jt(r,a[0].toLowerCase()+a.slice(1))||jt(r,Zn(a))||jt(r,a))}function Bi(r){const{type:a,vnode:x,proxy:t,withProxy:w,propsOptions:[g],slots:i,attrs:u,emit:o,render:h,renderCache:y,props:m,data:n,setupState:s,ctx:c,inheritAttrs:f}=r,p=Bs(r);let d,l;try{if(x.shapeFlag&4){const v=w||t,j=v;d=Mr(h.call(j,v,y,m,s,n,c)),l=u}else{const v=a;d=Mr(v.length>1?v(m,{attrs:u,slots:i,emit:o}):v(m,null)),l=a.props?u:_m(u)}}catch(v){Ho.length=0,jo(v,r,1),d=ht(Kt)}let b=d;if(l&&f!==!1){const v=Object.keys(l),{shapeFlag:j}=b;v.length&&j&7&&(g&&v.some(Ha)&&(l=xm(l,g)),b=en(b,l,!1,!0))}return x.dirs&&(b=en(b,null,!1,!0),b.dirs=b.dirs?b.dirs.concat(x.dirs):x.dirs),x.transition&&vo(b,x.transition),d=b,Bs(p),d}function bm(r,a=!0){let x;for(let t=0;t{let a;for(const x in r)(x==="class"||x==="style"||ns(x))&&((a||(a={}))[x]=r[x]);return a},xm=(r,a)=>{const x={};for(const t in r)(!Ha(t)||!(t.slice(9)in a))&&(x[t]=r[t]);return x};function wm(r,a,x){const{props:t,children:w,component:g}=r,{props:i,children:u,patchFlag:o}=a,h=g.emitsOptions;if(a.dirs||a.transition)return!0;if(x&&o>=0){if(o&1024)return!0;if(o&16)return t?xu(t,i,h):!!i;if(o&8){const y=a.dynamicProps;for(let m=0;mr.__isSuspense;let ha=0;const jm={name:"Suspense",__isSuspense:!0,process(r,a,x,t,w,g,i,u,o,h){if(r==null)Sm(a,x,t,w,g,i,u,o,h);else{if(g&&g.deps>0&&!r.suspense.isInFallback){a.suspense=r.suspense,a.suspense.vnode=a,a.el=r.el;return}Em(r,a,x,t,w,i,u,o,h)}},hydrate:Tm,normalize:km},sl=jm;function Jo(r,a){const x=r.props&&r.props[a];at(x)&&x()}function Sm(r,a,x,t,w,g,i,u,o){const{p:h,o:{createElement:y}}=o,m=y("div"),n=r.suspense=Zd(r,w,t,a,m,x,g,i,u,o);h(null,n.pendingBranch=r.ssContent,m,null,t,n,g,i),n.deps>0?(Jo(r,"onPending"),Jo(r,"onFallback"),h(null,r.ssFallback,a,x,t,null,g,i),yo(n,r.ssFallback)):n.resolve(!1,!0)}function Em(r,a,x,t,w,g,i,u,{p:o,um:h,o:{createElement:y}}){const m=a.suspense=r.suspense;m.vnode=a,a.el=r.el;const n=a.ssContent,s=a.ssFallback,{activeBranch:c,pendingBranch:f,isInFallback:p,isHydrating:d}=m;if(f)m.pendingBranch=n,Br(n,f)?(o(f,n,m.hiddenContainer,null,w,m,g,i,u),m.deps<=0?m.resolve():p&&(d||(o(c,s,x,t,w,null,g,i,u),yo(m,s)))):(m.pendingId=ha++,d?(m.isHydrating=!1,m.activeBranch=f):h(f,w,m),m.deps=0,m.effects.length=0,m.hiddenContainer=y("div"),p?(o(null,n,m.hiddenContainer,null,w,m,g,i,u),m.deps<=0?m.resolve():(o(c,s,x,t,w,null,g,i,u),yo(m,s))):c&&Br(n,c)?(o(c,n,x,t,w,m,g,i,u),m.resolve(!0)):(o(null,n,m.hiddenContainer,null,w,m,g,i,u),m.deps<=0&&m.resolve()));else if(c&&Br(n,c))o(c,n,x,t,w,m,g,i,u),yo(m,n);else if(Jo(a,"onPending"),m.pendingBranch=n,n.shapeFlag&512?m.pendingId=n.component.suspenseId:m.pendingId=ha++,o(null,n,m.hiddenContainer,null,w,m,g,i,u),m.deps<=0)m.resolve();else{const{timeout:l,pendingId:b}=m;l>0?setTimeout(()=>{m.pendingId===b&&m.fallback(s)},l):l===0&&m.fallback(s)}}function Zd(r,a,x,t,w,g,i,u,o,h,y=!1){const{p:m,m:n,um:s,n:c,o:{parentNode:f,remove:p}}=h;let d;const l=Mm(r);l&&a&&a.pendingBranch&&(d=a.pendingId,a.deps++);const b=r.props?zc(r.props.timeout):void 0,v=g,j={vnode:r,parent:a,parentComponent:x,namespace:i,container:t,hiddenContainer:w,deps:0,pendingId:ha++,timeout:typeof b=="number"?b:-1,activeBranch:null,pendingBranch:null,isInFallback:!y,isHydrating:y,isUnmounted:!1,effects:[],resolve(E=!1,T=!1){const{vnode:M,activeBranch:P,pendingBranch:R,pendingId:C,effects:I,parentComponent:A,container:N}=j;let F=!1;j.isHydrating?j.isHydrating=!1:E||(F=P&&R.transition&&R.transition.mode==="out-in",F&&(P.transition.afterLeave=()=>{C===j.pendingId&&(n(R,N,g===v?c(P):g,0),aa(I))}),P&&(f(P.el)===N&&(g=c(P)),s(P,A,j,!0)),F||n(R,N,g,0)),yo(j,R),j.pendingBranch=null,j.isInFallback=!1;let U=j.parent,W=!1;for(;U;){if(U.pendingBranch){U.effects.push(...I),W=!0;break}U=U.parent}!W&&!F&&aa(I),j.effects=[],l&&a&&a.pendingBranch&&d===a.pendingId&&(a.deps--,a.deps===0&&!T&&a.resolve()),Jo(M,"onResolve")},fallback(E){if(!j.pendingBranch)return;const{vnode:T,activeBranch:M,parentComponent:P,container:R,namespace:C}=j;Jo(T,"onFallback");const I=c(M),A=()=>{j.isInFallback&&(m(null,E,R,I,P,null,C,u,o),yo(j,E))},N=E.transition&&E.transition.mode==="out-in";N&&(M.transition.afterLeave=A),j.isInFallback=!0,s(M,P,null,!0),N||A()},move(E,T,M){j.activeBranch&&n(j.activeBranch,E,T,M),j.container=E},next(){return j.activeBranch&&c(j.activeBranch)},registerDep(E,T,M){const P=!!j.pendingBranch;P&&j.deps++;const R=E.vnode.el;E.asyncDep.catch(C=>{jo(C,E,0)}).then(C=>{if(E.isUnmounted||j.isUnmounted||j.pendingId!==E.suspenseId)return;E.asyncResolved=!0;const{vnode:I}=E;ya(E,C,!1),R&&(I.el=R);const A=!R&&E.subTree.el;T(E,I,f(R||E.subTree.el),R?null:c(E.subTree),j,i,M),A&&p(A),li(E,I.el),P&&--j.deps===0&&j.resolve()})},unmount(E,T){j.isUnmounted=!0,j.activeBranch&&s(j.activeBranch,x,E,T),j.pendingBranch&&s(j.pendingBranch,x,E,T)}};return j}function Tm(r,a,x,t,w,g,i,u,o){const h=a.suspense=Zd(a,t,x,r.parentNode,document.createElement("div"),null,w,g,i,u,!0),y=o(r,h.pendingBranch=a.ssContent,x,h,g,i);return h.deps===0&&h.resolve(!1,!0),y}function km(r){const{shapeFlag:a,children:x}=r,t=a&32;r.ssContent=wu(t?x.default:x),r.ssFallback=t?wu(x.fallback):ht(Kt)}function wu(r){let a;if(at(r)){const x=bo&&r._c;x&&(r._d=!1,kr()),r=r(),x&&(r._d=!0,a=Er,Jd())}return st(r)&&(r=bm(r)),r=Mr(r),a&&!r.dynamicChildren&&(r.dynamicChildren=a.filter(x=>x!==r)),r}function Qd(r,a){a&&a.pendingBranch?st(r)?a.effects.push(...r):a.effects.push(r):aa(r)}function yo(r,a){r.activeBranch=a;const{vnode:x,parentComponent:t}=r;let w=a.el;for(;!w&&a.component;)a=a.component.subTree,w=a.el;x.el=w,t&&t.subTree===x&&(t.vnode.el=w,li(t,w))}function Mm(r){const a=r.props&&r.props.suspensible;return a!=null&&a!==!1}const cr=Symbol.for("v-fgt"),Xn=Symbol.for("v-txt"),Kt=Symbol.for("v-cmt"),Vo=Symbol.for("v-stc"),Ho=[];let Er=null;function kr(r=!1){Ho.push(Er=r?null:[])}function Jd(){Ho.pop(),Er=Ho[Ho.length-1]||null}let bo=1;function ju(r,a=!1){bo+=r,r<0&&Er&&a&&(Er.hasOnce=!0)}function ef(r){return r.dynamicChildren=bo>0?Er||co:null,Jd(),bo>0&&Er&&Er.push(r),r}function ui(r,a,x,t,w,g){return ef(vt(r,a,x,t,w,g,!0))}function Tn(r,a,x,t,w){return ef(ht(r,a,x,t,w,!0))}function $n(r){return r?r.__v_isVNode===!0:!1}function Br(r,a){return r.type===a.type&&r.key===a.key}const tf=({key:r})=>r??null,Ps=({ref:r,ref_key:a,ref_for:x})=>(typeof r=="number"&&(r=""+r),r!=null?Ut(r)||or(r)||at(r)?{i:Qt,r,k:a,f:!!x}:r:null);function vt(r,a=null,x=null,t=0,w=null,g=r===cr?0:1,i=!1,u=!1){const o={__v_isVNode:!0,__v_skip:!0,type:r,props:a,key:a&&tf(a),ref:a&&Ps(a),scopeId:gd,slotScopeIds:null,children:x,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:g,patchFlag:t,dynamicProps:w,dynamicChildren:null,appContext:null,ctx:Qt};return u?(il(o,x),g&128&&r.normalize(o)):x&&(o.shapeFlag|=Ut(x)?8:16),bo>0&&!i&&Er&&(o.patchFlag>0||g&6)&&o.patchFlag!==32&&Er.push(o),o}const ht=Cm;function Cm(r,a=null,x=null,t=0,w=null,g=!1){if((!r||r===Od)&&(r=Kt),$n(r)){const u=en(r,a,!0);return x&&il(u,x),bo>0&&!g&&Er&&(u.shapeFlag&6?Er[Er.indexOf(r)]=u:Er.push(u)),u.patchFlag=-2,u}if(Fm(r)&&(r=r.__vccOpts),a){a=Om(a);let{class:u,style:o}=a;u&&!Ut(u)&&(a.class=un(u)),At(o)&&(Ja(o)&&!st(o)&&(o=$t({},o)),a.style=Xa(o))}const i=Ut(r)?1:Hs(r)?128:vd(r)?64:At(r)?4:at(r)?2:0;return vt(r,a,x,t,w,i,g,!0)}function Om(r){return r?Ja(r)||Nd(r)?$t({},r):r:null}function en(r,a,x=!1,t=!1){const{props:w,ref:g,patchFlag:i,children:u,transition:o}=r,h=a?rf(w||{},a):w,y={__v_isVNode:!0,__v_skip:!0,type:r.type,props:h,key:h&&tf(h),ref:a&&a.ref?x&&g?st(g)?g.concat(Ps(a)):[g,Ps(a)]:Ps(a):g,scopeId:r.scopeId,slotScopeIds:r.slotScopeIds,children:u,target:r.target,targetStart:r.targetStart,targetAnchor:r.targetAnchor,staticCount:r.staticCount,shapeFlag:r.shapeFlag,patchFlag:a&&r.type!==cr?i===-1?16:i|16:i,dynamicProps:r.dynamicProps,dynamicChildren:r.dynamicChildren,appContext:r.appContext,dirs:r.dirs,transition:o,component:r.component,suspense:r.suspense,ssContent:r.ssContent&&en(r.ssContent),ssFallback:r.ssFallback&&en(r.ssFallback),el:r.el,anchor:r.anchor,ctx:r.ctx,ce:r.ce};return o&&t&&vo(y,o.clone(y)),y}function Hn(r=" ",a=0){return ht(Xn,null,r,a)}function rx(r,a){const x=ht(Vo,null,r);return x.staticCount=a,x}function nx(r="",a=!1){return a?(kr(),Tn(Kt,null,r)):ht(Kt,null,r)}function Mr(r){return r==null||typeof r=="boolean"?ht(Kt):st(r)?ht(cr,null,r.slice()):$n(r)?jn(r):ht(Xn,null,String(r))}function jn(r){return r.el===null&&r.patchFlag!==-1||r.memo?r:en(r)}function il(r,a){let x=0;const{shapeFlag:t}=r;if(a==null)a=null;else if(st(a))x=16;else if(typeof a=="object")if(t&65){const w=a.default;w&&(w._c&&(w._d=!1),il(r,w()),w._c&&(w._d=!0));return}else{x=32;const w=a._;!w&&!Nd(a)?a._ctx=Qt:w===3&&Qt&&(Qt.slots._===1?a._=1:(a._=2,r.patchFlag|=1024))}else at(a)?(a={default:a,_ctx:Qt},x=32):(a=String(a),t&64?(x=16,a=[Hn(a)]):x=8);r.children=a,r.shapeFlag|=x}function rf(...r){const a={};for(let x=0;xZt||Qt;let zs,pa;{const r=ni(),a=(x,t)=>{let w;return(w=r[x])||(w=r[x]=[]),w.push(t),g=>{w.length>1?w.forEach(i=>i(g)):w[0](g)}};zs=a("__VUE_INSTANCE_SETTERS__",x=>Zt=x),pa=a("__VUE_SSR_SETTERS__",x=>_o=x)}const Yn=r=>{const a=Zt;return zs(r),r.scope.on(),()=>{r.scope.off(),zs(a)}},ma=()=>{Zt&&Zt.scope.off(),zs(null)};function nf(r){return r.vnode.shapeFlag&4}let _o=!1;function Lm(r,a=!1,x=!1){a&&pa(a);const{props:t,children:w}=r.vnode,g=nf(r);sm(r,t,g,a),um(r,w,x);const i=g?Im(r,a):void 0;return a&&pa(!1),i}function Im(r,a){const x=r.type;r.accessCache=Object.create(null),r.proxy=new Proxy(r.ctx,Kp);const{setup:t}=x;if(t){Rn();const w=r.setupContext=t.length>1?sf(r):null,g=Yn(r),i=ss(t,r,0,[r.props,w]),u=Wa(i);if(Ln(),g(),(u||r.sp)&&!On(r)&&tl(r),u){if(i.then(ma,ma),a)return i.then(o=>{ya(r,o,a)}).catch(o=>{jo(o,r,0)});r.asyncDep=i}else ya(r,i,a)}else of(r,a)}function ya(r,a,x){at(a)?r.type.__ssrInlineRender?r.ssrRender=a:r.render=a:At(a)&&(r.setupState=fd(a)),of(r,x)}let Su;function of(r,a,x){const t=r.type;if(!r.render){if(!a&&Su&&!t.render){const w=t.template||rl(r).template;if(w){const{isCustomElement:g,compilerOptions:i}=r.appContext.config,{delimiters:u,compilerOptions:o}=t,h=$t($t({isCustomElement:g,delimiters:u},i),o);t.render=Su(w,h)}}r.render=t.render||Qr}{const w=Yn(r);Rn();try{Qp(r)}finally{Ln(),w()}}}const Dm={get(r,a){return mr(r,"get",""),r[a]}};function sf(r){const a=x=>{r.exposed=x||{}};return{attrs:new Proxy(r.attrs,Dm),slots:r.slots,emit:r.emit,expose:a}}function ci(r){return r.exposed?r.exposeProxy||(r.exposeProxy=new Proxy(fd(vp(r.exposed)),{get(a,x){if(x in a)return a[x];if(x in Go)return Go[x](r)},has(a,x){return x in a||x in Go}})):r.proxy}function ga(r,a=!0){return at(r)?r.displayName||r.name:r.name||a&&r.__name}function Fm(r){return at(r)&&"__vccOpts"in r}const bt=(r,a)=>Tp(r,a,_o);function Jt(r,a,x){const t=arguments.length;return t===2?At(a)&&!st(a)?$n(a)?ht(r,null,[a]):ht(r,a):ht(r,null,a):(t>3?x=Array.prototype.slice.call(arguments,2):t===3&&$n(x)&&(x=[x]),ht(r,a,x))}const af="3.5.13";/** * @vue/runtime-dom v3.5.13 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/let va;const Eu=typeof window<"u"&&window.trustedTypes;if(Eu)try{va=Eu.createPolicy("vue",{createHTML:r=>r})}catch{}const lf=va?r=>va.createHTML(r):r=>r,Bm="http://www.w3.org/2000/svg",Gm="http://www.w3.org/1998/Math/MathML",ln=typeof document<"u"?document:null,Tu=ln&&ln.createElement("template"),Vm={insert:(r,a,x)=>{a.insertBefore(r,x||null)},remove:r=>{const a=r.parentNode;a&&a.removeChild(r)},createElement:(r,a,x,t)=>{const w=a==="svg"?ln.createElementNS(Bm,r):a==="mathml"?ln.createElementNS(Gm,r):x?ln.createElement(r,{is:x}):ln.createElement(r);return r==="select"&&t&&t.multiple!=null&&w.setAttribute("multiple",t.multiple),w},createText:r=>ln.createTextNode(r),createComment:r=>ln.createComment(r),setText:(r,a)=>{r.nodeValue=a},setElementText:(r,a)=>{r.textContent=a},parentNode:r=>r.parentNode,nextSibling:r=>r.nextSibling,querySelector:r=>ln.querySelector(r),setScopeId(r,a){r.setAttribute(a,"")},insertStaticContent(r,a,x,t,w,g){const i=x?x.previousSibling:a.lastChild;if(w&&(w===g||w.nextSibling))for(;a.insertBefore(w.cloneNode(!0),x),!(w===g||!(w=w.nextSibling)););else{Tu.innerHTML=lf(t==="svg"?`${r}`:t==="mathml"?`${r}`:r);const u=Tu.content;if(t==="svg"||t==="mathml"){const o=u.firstChild;for(;o.firstChild;)u.appendChild(o.firstChild);u.removeChild(o)}a.insertBefore(u,x)}return[i?i.nextSibling:a.firstChild,x?x.previousSibling:a.lastChild]}},bn="transition",Io="animation",ts=Symbol("_vtc"),uf={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},Hm=$t({},bd,uf),zm=r=>(r.displayName="Transition",r.props=Hm,r),al=zm((r,{slots:a})=>Jt(Ip,Wm(r),a)),Dn=(r,a=[])=>{st(r)?r.forEach(x=>x(...a)):r&&r(...a)},ku=r=>r?st(r)?r.some(a=>a.length>1):r.length>1:!1;function Wm(r){const a={};for(const I in r)I in uf||(a[I]=r[I]);if(r.css===!1)return a;const{name:x="v",type:t,duration:w,enterFromClass:g=`${x}-enter-from`,enterActiveClass:i=`${x}-enter-active`,enterToClass:u=`${x}-enter-to`,appearFromClass:o=g,appearActiveClass:h=i,appearToClass:y=u,leaveFromClass:m=`${x}-leave-from`,leaveActiveClass:n=`${x}-leave-active`,leaveToClass:s=`${x}-leave-to`}=r,c=qm(w),f=c&&c[0],p=c&&c[1],{onBeforeEnter:d,onEnter:l,onEnterCancelled:b,onLeave:v,onLeaveCancelled:j,onBeforeAppear:E=d,onAppear:T=l,onAppearCancelled:M=b}=a,P=(I,A,N,F)=>{I._enterCancelled=F,Fn(I,A?y:u),Fn(I,A?h:i),N&&N()},R=(I,A)=>{I._isLeaving=!1,Fn(I,m),Fn(I,s),Fn(I,n),A&&A()},C=I=>(A,N)=>{const F=I?T:l,U=()=>P(A,I,N);Dn(F,[A,U]),Mu(()=>{Fn(A,I?o:g),sn(A,I?y:u),ku(F)||Cu(A,t,f,U)})};return $t(a,{onBeforeEnter(I){Dn(d,[I]),sn(I,g),sn(I,i)},onBeforeAppear(I){Dn(E,[I]),sn(I,o),sn(I,h)},onEnter:C(!1),onAppear:C(!0),onLeave(I,A){I._isLeaving=!0;const N=()=>R(I,A);sn(I,m),I._enterCancelled?(sn(I,n),Au()):(Au(),sn(I,n)),Mu(()=>{I._isLeaving&&(Fn(I,m),sn(I,s),ku(v)||Cu(I,t,p,N))}),Dn(v,[I,N])},onEnterCancelled(I){P(I,!1,void 0,!0),Dn(b,[I])},onAppearCancelled(I){P(I,!0,void 0,!0),Dn(M,[I])},onLeaveCancelled(I){R(I),Dn(j,[I])}})}function qm(r){if(r==null)return null;if(At(r))return[Gi(r.enter),Gi(r.leave)];{const a=Gi(r);return[a,a]}}function Gi(r){return zc(r)}function sn(r,a){a.split(/\s+/).forEach(x=>x&&r.classList.add(x)),(r[ts]||(r[ts]=new Set)).add(a)}function Fn(r,a){a.split(/\s+/).forEach(t=>t&&r.classList.remove(t));const x=r[ts];x&&(x.delete(a),x.size||(r[ts]=void 0))}function Mu(r){requestAnimationFrame(()=>{requestAnimationFrame(r)})}let Xm=0;function Cu(r,a,x,t){const w=r._endId=++Xm,g=()=>{w===r._endId&&t()};if(x!=null)return setTimeout(g,x);const{type:i,timeout:u,propCount:o}=$m(r,a);if(!i)return t();const h=i+"end";let y=0;const m=()=>{r.removeEventListener(h,n),g()},n=s=>{s.target===r&&++y>=o&&m()};setTimeout(()=>{y(x[c]||"").split(", "),w=t(`${bn}Delay`),g=t(`${bn}Duration`),i=Ou(w,g),u=t(`${Io}Delay`),o=t(`${Io}Duration`),h=Ou(u,o);let y=null,m=0,n=0;a===bn?i>0&&(y=bn,m=i,n=g.length):a===Io?h>0&&(y=Io,m=h,n=o.length):(m=Math.max(i,h),y=m>0?i>h?bn:Io:null,n=y?y===bn?g.length:o.length:0);const s=y===bn&&/\b(transform|all)(,|$)/.test(t(`${bn}Property`).toString());return{type:y,timeout:m,propCount:n,hasTransform:s}}function Ou(r,a){for(;r.lengthPu(x)+Pu(r[t])))}function Pu(r){return r==="auto"?0:Number(r.slice(0,-1).replace(",","."))*1e3}function Au(){return document.body.offsetHeight}function Ym(r,a,x){const t=r[ts];t&&(a=(a?[a,...t]:[...t]).join(" ")),a==null?r.removeAttribute("class"):x?r.setAttribute("class",a):r.className=a}const Ru=Symbol("_vod"),Km=Symbol("_vsh"),Zm=Symbol(""),Qm=/(^|;)\s*display\s*:/;function Jm(r,a,x){const t=r.style,w=Bt(x);let g=!1;if(x&&!w){if(a)if(Bt(a))for(const i of a.split(";")){const u=i.slice(0,i.indexOf(":")).trim();x[u]==null&&Rs(t,u,"")}else for(const i in a)x[i]==null&&Rs(t,i,"");for(const i in x)i==="display"&&(g=!0),Rs(t,i,x[i])}else if(w){if(a!==x){const i=t[Zm];i&&(x+=";"+i),t.cssText=x,g=Qm.test(x)}}else a&&r.removeAttribute("style");Ru in r&&(r[Ru]=g?t.display:"",r[Km]&&(t.display="none"))}const Lu=/\s*!important$/;function Rs(r,a,x){if(st(x))x.forEach(t=>Rs(r,a,t));else if(x==null&&(x=""),a.startsWith("--"))r.setProperty(a,x);else{const t=ey(r,a);Lu.test(x)?r.setProperty(Kn(t),x.replace(Lu,""),"important"):r[t]=x}}const Iu=["Webkit","Moz","ms"],Vi={};function ey(r,a){const x=Vi[a];if(x)return x;let t=Ir(a);if(t!=="filter"&&t in r)return Vi[a]=t;t=ni(t);for(let w=0;wHi||(oy.then(()=>Hi=0),Hi=Date.now());function iy(r,a){const x=t=>{if(!t._vts)t._vts=Date.now();else if(t._vts<=x.attached)return;Hr(ay(t,x.value),a,5,[t])};return x.value=r,x.attached=sy(),x}function ay(r,a){if(st(a)){const x=r.stopImmediatePropagation;return r.stopImmediatePropagation=()=>{x.call(r),r._stopped=!0},a.map(t=>w=>!w._stopped&&t&&t(w))}else return a}const Gu=r=>r.charCodeAt(0)===111&&r.charCodeAt(1)===110&&r.charCodeAt(2)>96&&r.charCodeAt(2)<123,ly=(r,a,x,t,w,g)=>{const i=w==="svg";a==="class"?Ym(r,t,i):a==="style"?Jm(r,x,t):os(a)?Ha(a)||ry(r,a,x,t,g):(a[0]==="."?(a=a.slice(1),!0):a[0]==="^"?(a=a.slice(1),!1):uy(r,a,t,i))?(Nu(r,a,t),!r.tagName.includes("-")&&(a==="value"||a==="checked"||a==="selected")&&Fu(r,a,t,i,g,a!=="value")):r._isVueCE&&(/[A-Z]/.test(a)||!Bt(t))?Nu(r,Ir(a),t,g,a):(a==="true-value"?r._trueValue=t:a==="false-value"&&(r._falseValue=t),Fu(r,a,t,i))};function uy(r,a,x,t){if(t)return!!(a==="innerHTML"||a==="textContent"||a in r&&Gu(a)&&at(x));if(a==="spellcheck"||a==="draggable"||a==="translate"||a==="form"||a==="list"&&r.tagName==="INPUT"||a==="type"&&r.tagName==="TEXTAREA")return!1;if(a==="width"||a==="height"){const w=r.tagName;if(w==="IMG"||w==="VIDEO"||w==="CANVAS"||w==="SOURCE")return!1}return Gu(a)&&Bt(x)?!1:a in r}const Vu=r=>{const a=r.props["onUpdate:modelValue"]||!1;return st(a)?x=>ho(a,x):a};function cy(r){r.target.composing=!0}function Hu(r){const a=r.target;a.composing&&(a.composing=!1,a.dispatchEvent(new Event("input")))}const zi=Symbol("_assign"),ax={created(r,{modifiers:{lazy:a,trim:x,number:t}},w){r[zi]=Vu(w);const g=t||w.props&&w.props.type==="number";so(r,a?"change":"input",i=>{if(i.target.composing)return;let u=r.value;x&&(u=u.trim()),g&&(u=ra(u)),r[zi](u)}),x&&so(r,"change",()=>{r.value=r.value.trim()}),a||(so(r,"compositionstart",cy),so(r,"compositionend",Hu),so(r,"change",Hu))},mounted(r,{value:a}){r.value=a??""},beforeUpdate(r,{value:a,oldValue:x,modifiers:{lazy:t,trim:w,number:g}},i){if(r[zi]=Vu(i),r.composing)return;const u=(g||r.type==="number")&&!/^0\d/.test(r.value)?ra(r.value):r.value,o=a??"";u!==o&&(document.activeElement===r&&r.type!=="range"&&(t&&a===x||w&&r.value.trim()===o)||(r.value=o))}},cf=$t({patchProp:ly},Vm);let Wo,zu=!1;function dy(){return Wo||(Wo=fm(cf))}function fy(){return Wo=zu?Wo:hm(cf),zu=!0,Wo}const hy=(...r)=>{const a=dy().createApp(...r),{mount:x}=a;return a.mount=t=>{const w=ff(t);if(!w)return;const g=a._component;!at(g)&&!g.render&&!g.template&&(g.template=w.innerHTML),w.nodeType===1&&(w.textContent="");const i=x(w,!1,df(w));return w instanceof Element&&(w.removeAttribute("v-cloak"),w.setAttribute("data-v-app","")),i},a},py=(...r)=>{const a=fy().createApp(...r),{mount:x}=a;return a.mount=t=>{const w=ff(t);if(w)return x(w,!0,df(w))},a};function df(r){if(r instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&r instanceof MathMLElement)return"mathml"}function ff(r){return Bt(r)?document.querySelector(r):r}const my=/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,yy=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,gy=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;function vy(r,a){if(r==="__proto__"||r==="constructor"&&a&&typeof a=="object"&&"prototype"in a){by(r);return}return a}function by(r){console.warn(`[destr] Dropping "${r}" key to prevent prototype pollution.`)}function qs(r,a={}){if(typeof r!="string")return r;const x=r.trim();if(r[0]==='"'&&r.endsWith('"')&&!r.includes("\\"))return x.slice(1,-1);if(x.length<=9){const t=x.toLowerCase();if(t==="true")return!0;if(t==="false")return!1;if(t==="undefined")return;if(t==="null")return null;if(t==="nan")return Number.NaN;if(t==="infinity")return Number.POSITIVE_INFINITY;if(t==="-infinity")return Number.NEGATIVE_INFINITY}if(!gy.test(r)){if(a.strict)throw new SyntaxError("[destr] Invalid JSON");return r}try{if(my.test(r)||yy.test(r)){if(a.strict)throw new Error("[destr] Possible prototype pollution");return JSON.parse(r,vy)}return JSON.parse(r)}catch(t){if(a.strict)throw t;return r}}const _y=/#/g,xy=/&/g,wy=/\//g,jy=/=/g,ll=/\+/g,Sy=/%5e/gi,Ey=/%60/gi,Ty=/%7c/gi,ky=/%20/gi;function My(r){return encodeURI(""+r).replace(Ty,"|")}function ba(r){return My(typeof r=="string"?r:JSON.stringify(r)).replace(ll,"%2B").replace(ky,"+").replace(_y,"%23").replace(xy,"%26").replace(Ey,"`").replace(Sy,"^").replace(wy,"%2F")}function Wi(r){return ba(r).replace(jy,"%3D")}function Xs(r=""){try{return decodeURIComponent(""+r)}catch{return""+r}}function Cy(r){return Xs(r.replace(ll," "))}function Oy(r){return Xs(r.replace(ll," "))}function hf(r=""){const a={};r[0]==="?"&&(r=r.slice(1));for(const x of r.split("&")){const t=x.match(/([^=]+)=?(.*)/)||[];if(t.length<2)continue;const w=Cy(t[1]);if(w==="__proto__"||w==="constructor")continue;const g=Oy(t[2]||"");a[w]===void 0?a[w]=g:Array.isArray(a[w])?a[w].push(g):a[w]=[a[w],g]}return a}function Py(r,a){return(typeof a=="number"||typeof a=="boolean")&&(a=String(a)),a?Array.isArray(a)?a.map(x=>`${Wi(r)}=${ba(x)}`).join("&"):`${Wi(r)}=${ba(a)}`:Wi(r)}function Ay(r){return Object.keys(r).filter(a=>r[a]!==void 0).map(a=>Py(a,r[a])).filter(Boolean).join("&")}const Ry=/^[\s\w\0+.-]{2,}:([/\\]{1,2})/,Ly=/^[\s\w\0+.-]{2,}:([/\\]{2})?/,Iy=/^([/\\]\s*){2,}[^/\\]/,Dy=/^[\s\0]*(blob|data|javascript|vbscript):$/i,Fy=/\/$|\/\?|\/#/,Ny=/^\.?\//;function mn(r,a={}){return typeof a=="boolean"&&(a={acceptRelative:a}),a.strict?Ry.test(r):Ly.test(r)||(a.acceptRelative?Iy.test(r):!1)}function Uy(r){return!!r&&Dy.test(r)}function _a(r="",a){return a?Fy.test(r):r.endsWith("/")}function di(r="",a){if(!a)return(_a(r)?r.slice(0,-1):r)||"/";if(!_a(r,!0))return r||"/";let x=r,t="";const w=r.indexOf("#");w>=0&&(x=r.slice(0,w),t=r.slice(w));const[g,...i]=x.split("?");return((g.endsWith("/")?g.slice(0,-1):g)||"/")+(i.length>0?`?${i.join("?")}`:"")+t}function $s(r="",a){if(!a)return r.endsWith("/")?r:r+"/";if(_a(r,!0))return r||"/";let x=r,t="";const w=r.indexOf("#");if(w>=0&&(x=r.slice(0,w),t=r.slice(w),!x))return t;const[g,...i]=x.split("?");return g+"/"+(i.length>0?`?${i.join("?")}`:"")+t}function By(r=""){return r.startsWith("/")}function Wu(r=""){return By(r)?r:"/"+r}function Gy(r,a){if(mf(a)||mn(r))return r;const x=di(a);return r.startsWith(x)?r:fi(x,r)}function qu(r,a){if(mf(a))return r;const x=di(a);if(!r.startsWith(x))return r;const t=r.slice(x.length);return t[0]==="/"?t:"/"+t}function pf(r,a){const x=zy(r),t={...hf(x.search),...a};return x.search=Ay(t),Wy(x)}function mf(r){return!r||r==="/"}function Vy(r){return r&&r!=="/"}function fi(r,...a){let x=r||"";for(const t of a.filter(w=>Vy(w)))if(x){const w=t.replace(Ny,"");x=$s(x)+w}else x=t;return x}function yf(...r){var i,u,o,h;const a=/\/(?!\/)/,x=r.filter(Boolean),t=[];let w=0;for(const y of x)if(!(!y||y==="/")){for(const[m,n]of y.split(a).entries())if(!(!n||n===".")){if(n===".."){if(t.length===1&&mn(t[0]))continue;t.pop(),w--;continue}if(m===1&&((i=t[t.length-1])!=null&&i.endsWith(":/"))){t[t.length-1]+="/"+n;continue}t.push(n),w++}}let g=t.join("/");return w>=0?(u=x[0])!=null&&u.startsWith("/")&&!g.startsWith("/")?g="/"+g:(o=x[0])!=null&&o.startsWith("./")&&!g.startsWith("./")&&(g="./"+g):g="../".repeat(-1*w)+g,(h=x[x.length-1])!=null&&h.endsWith("/")&&!g.endsWith("/")&&(g+="/"),g}function Hy(r,a,x={}){return x.trailingSlash||(r=$s(r),a=$s(a)),x.leadingSlash||(r=Wu(r),a=Wu(a)),x.encoding||(r=Xs(r),a=Xs(a)),r===a}const gf=Symbol.for("ufo:protocolRelative");function zy(r="",a){const x=r.match(/^[\s\0]*(blob:|data:|javascript:|vbscript:)(.*)/i);if(x){const[,m,n=""]=x;return{protocol:m.toLowerCase(),pathname:n,href:m+n,auth:"",host:"",search:"",hash:""}}if(!mn(r,{acceptRelative:!0}))return Xu(r);const[,t="",w,g=""]=r.replace(/\\/g,"/").match(/^[\s\0]*([\w+.-]{2,}:)?\/\/([^/@]+@)?(.*)/)||[];let[,i="",u=""]=g.match(/([^#/?]*)(.*)?/)||[];t==="file:"&&(u=u.replace(/\/(?=[A-Za-z]:)/,""));const{pathname:o,search:h,hash:y}=Xu(u);return{protocol:t.toLowerCase(),auth:w?w.slice(0,Math.max(0,w.length-1)):"",host:i,pathname:o,search:h,hash:y,[gf]:!t}}function Xu(r=""){const[a="",x="",t=""]=(r.match(/([^#?]*)(\?[^#]*)?(#.*)?/)||[]).splice(1);return{pathname:a,search:x,hash:t}}function Wy(r){const a=r.pathname||"",x=r.search?(r.search.startsWith("?")?"":"?")+r.search:"",t=r.hash||"",w=r.auth?r.auth+"@":"",g=r.host||"";return(r.protocol||r[gf]?(r.protocol||"")+"//":"")+w+g+a+x+t}class qy extends Error{constructor(a,x){super(a,x),this.name="FetchError",x!=null&&x.cause&&!this.cause&&(this.cause=x.cause)}}function Xy(r){var o,h,y,m,n;const a=((o=r.error)==null?void 0:o.message)||((h=r.error)==null?void 0:h.toString())||"",x=((y=r.request)==null?void 0:y.method)||((m=r.options)==null?void 0:m.method)||"GET",t=((n=r.request)==null?void 0:n.url)||String(r.request)||"/",w=`[${x}] ${JSON.stringify(t)}`,g=r.response?`${r.response.status} ${r.response.statusText}`:"",i=`${w}: ${g}${a?` ${a}`:""}`,u=new qy(i,r.error?{cause:r.error}:void 0);for(const s of["request","options","response"])Object.defineProperty(u,s,{get(){return r[s]}});for(const[s,c]of[["data","_data"],["status","status"],["statusCode","status"],["statusText","statusText"],["statusMessage","statusText"]])Object.defineProperty(u,s,{get(){return r.response&&r.response[c]}});return u}const $y=new Set(Object.freeze(["PATCH","POST","PUT","DELETE"]));function $u(r="GET"){return $y.has(r.toUpperCase())}function Yy(r){if(r===void 0)return!1;const a=typeof r;return a==="string"||a==="number"||a==="boolean"||a===null?!0:a!=="object"?!1:Array.isArray(r)?!0:r.buffer?!1:r.constructor&&r.constructor.name==="Object"||typeof r.toJSON=="function"}const Ky=new Set(["image/svg","application/xml","application/xhtml","application/html"]),Zy=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function Qy(r=""){if(!r)return"json";const a=r.split(";").shift()||"";return Zy.test(a)?"json":Ky.has(a)||a.startsWith("text/")?"text":"blob"}function Jy(r,a,x,t){const w=eg((a==null?void 0:a.headers)??(r==null?void 0:r.headers),x==null?void 0:x.headers,t);let g;return(x!=null&&x.query||x!=null&&x.params||a!=null&&a.params||a!=null&&a.query)&&(g={...x==null?void 0:x.params,...x==null?void 0:x.query,...a==null?void 0:a.params,...a==null?void 0:a.query}),{...x,...a,query:g,params:g,headers:w}}function eg(r,a,x){if(!a)return new x(r);const t=new x(a);if(r)for(const[w,g]of Symbol.iterator in r||Array.isArray(r)?r:new x(r))t.set(w,g);return t}async function Es(r,a){if(a)if(Array.isArray(a))for(const x of a)await x(r);else await a(r)}const tg=new Set([408,409,425,429,500,502,503,504]),rg=new Set([101,204,205,304]);function vf(r={}){const{fetch:a=globalThis.fetch,Headers:x=globalThis.Headers,AbortController:t=globalThis.AbortController}=r;async function w(u){const o=u.error&&u.error.name==="AbortError"&&!u.options.timeout||!1;if(u.options.retry!==!1&&!o){let y;typeof u.options.retry=="number"?y=u.options.retry:y=$u(u.options.method)?0:1;const m=u.response&&u.response.status||500;if(y>0&&(Array.isArray(u.options.retryStatusCodes)?u.options.retryStatusCodes.includes(m):tg.has(m))){const n=typeof u.options.retryDelay=="function"?u.options.retryDelay(u):u.options.retryDelay||0;return n>0&&await new Promise(s=>setTimeout(s,n)),g(u.request,{...u.options,retry:y-1})}}const h=Xy(u);throw Error.captureStackTrace&&Error.captureStackTrace(h,g),h}const g=async function(o,h={}){const y={request:o,options:Jy(o,h,r.defaults,x),response:void 0,error:void 0};y.options.method&&(y.options.method=y.options.method.toUpperCase()),y.options.onRequest&&await Es(y,y.options.onRequest),typeof y.request=="string"&&(y.options.baseURL&&(y.request=Gy(y.request,y.options.baseURL)),y.options.query&&(y.request=pf(y.request,y.options.query),delete y.options.query),"query"in y.options&&delete y.options.query,"params"in y.options&&delete y.options.params),y.options.body&&$u(y.options.method)&&(Yy(y.options.body)?(y.options.body=typeof y.options.body=="string"?y.options.body:JSON.stringify(y.options.body),y.options.headers=new x(y.options.headers||{}),y.options.headers.has("content-type")||y.options.headers.set("content-type","application/json"),y.options.headers.has("accept")||y.options.headers.set("accept","application/json")):("pipeTo"in y.options.body&&typeof y.options.body.pipeTo=="function"||typeof y.options.body.pipe=="function")&&("duplex"in y.options||(y.options.duplex="half")));let m;if(!y.options.signal&&y.options.timeout){const s=new t;m=setTimeout(()=>{const c=new Error("[TimeoutError]: The operation was aborted due to timeout");c.name="TimeoutError",c.code=23,s.abort(c)},y.options.timeout),y.options.signal=s.signal}try{y.response=await a(y.request,y.options)}catch(s){return y.error=s,y.options.onRequestError&&await Es(y,y.options.onRequestError),await w(y)}finally{m&&clearTimeout(m)}if((y.response.body||y.response._bodyInit)&&!rg.has(y.response.status)&&y.options.method!=="HEAD"){const s=(y.options.parseResponse?"json":y.options.responseType)||Qy(y.response.headers.get("content-type")||"");switch(s){case"json":{const c=await y.response.text(),f=y.options.parseResponse||qs;y.response._data=f(c);break}case"stream":{y.response._data=y.response.body||y.response._bodyInit;break}default:y.response._data=await y.response[s]()}}return y.options.onResponse&&await Es(y,y.options.onResponse),!y.options.ignoreResponseError&&y.response.status>=400&&y.response.status<600?(y.options.onResponseError&&await Es(y,y.options.onResponseError),await w(y)):y.response},i=async function(o,h){return(await g(o,h))._data};return i.raw=g,i.native=(...u)=>a(...u),i.create=(u={},o={})=>vf({...r,...o,defaults:{...r.defaults,...o.defaults,...u}}),i}const Ys=function(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")}(),ng=Ys.fetch?(...r)=>Ys.fetch(...r):()=>Promise.reject(new Error("[ofetch] global.fetch is not supported!")),og=Ys.Headers,sg=Ys.AbortController,ig=vf({fetch:ng,Headers:og,AbortController:sg}),ag=ig,lg=()=>{var r;return((r=window==null?void 0:window.__NUXT__)==null?void 0:r.config)||{}},Ks=lg().app,ug=()=>Ks.baseURL,cg=()=>Ks.buildAssetsDir,ul=(...r)=>yf(bf(),cg(),...r),bf=(...r)=>{const a=Ks.cdnURL||Ks.baseURL;return r.length?yf(a,...r):a};globalThis.__buildAssetsURL=ul,globalThis.__publicAssetsURL=bf;globalThis.$fetch||(globalThis.$fetch=ag.create({baseURL:ug()}));function xa(r,a={},x){for(const t in r){const w=r[t],g=x?`${x}:${t}`:t;typeof w=="object"&&w!==null?xa(w,a,g):typeof w=="function"&&(a[g]=w)}return a}const dg={run:r=>r()},fg=()=>dg,_f=typeof console.createTask<"u"?console.createTask:fg;function hg(r,a){const x=a.shift(),t=_f(x);return r.reduce((w,g)=>w.then(()=>t.run(()=>g(...a))),Promise.resolve())}function pg(r,a){const x=a.shift(),t=_f(x);return Promise.all(r.map(w=>t.run(()=>w(...a))))}function qi(r,a){for(const x of[...r])x(a)}class mg{constructor(){this._hooks={},this._before=void 0,this._after=void 0,this._deprecatedMessages=void 0,this._deprecatedHooks={},this.hook=this.hook.bind(this),this.callHook=this.callHook.bind(this),this.callHookWith=this.callHookWith.bind(this)}hook(a,x,t={}){if(!a||typeof x!="function")return()=>{};const w=a;let g;for(;this._deprecatedHooks[a];)g=this._deprecatedHooks[a],a=g.to;if(g&&!t.allowDeprecated){let i=g.message;i||(i=`${w} hook has been deprecated`+(g.to?`, please use ${g.to}`:"")),this._deprecatedMessages||(this._deprecatedMessages=new Set),this._deprecatedMessages.has(i)||(console.warn(i),this._deprecatedMessages.add(i))}if(!x.name)try{Object.defineProperty(x,"name",{get:()=>"_"+a.replace(/\W+/g,"_")+"_hook_cb",configurable:!0})}catch{}return this._hooks[a]=this._hooks[a]||[],this._hooks[a].push(x),()=>{x&&(this.removeHook(a,x),x=void 0)}}hookOnce(a,x){let t,w=(...g)=>(typeof t=="function"&&t(),t=void 0,w=void 0,x(...g));return t=this.hook(a,w),t}removeHook(a,x){if(this._hooks[a]){const t=this._hooks[a].indexOf(x);t!==-1&&this._hooks[a].splice(t,1),this._hooks[a].length===0&&delete this._hooks[a]}}deprecateHook(a,x){this._deprecatedHooks[a]=typeof x=="string"?{to:x}:x;const t=this._hooks[a]||[];delete this._hooks[a];for(const w of t)this.hook(a,w)}deprecateHooks(a){Object.assign(this._deprecatedHooks,a);for(const x in a)this.deprecateHook(x,a[x])}addHooks(a){const x=xa(a),t=Object.keys(x).map(w=>this.hook(w,x[w]));return()=>{for(const w of t.splice(0,t.length))w()}}removeHooks(a){const x=xa(a);for(const t in x)this.removeHook(t,x[t])}removeAllHooks(){for(const a in this._hooks)delete this._hooks[a]}callHook(a,...x){return x.unshift(a),this.callHookWith(hg,a,...x)}callHookParallel(a,...x){return x.unshift(a),this.callHookWith(pg,a,...x)}callHookWith(a,x,...t){const w=this._before||this._after?{name:x,args:t,context:{}}:void 0;this._before&&qi(this._before,w);const g=a(x in this._hooks?[...this._hooks[x]]:[],t);return g instanceof Promise?g.finally(()=>{this._after&&w&&qi(this._after,w)}):(this._after&&w&&qi(this._after,w),g)}beforeEach(a){return this._before=this._before||[],this._before.push(a),()=>{if(this._before!==void 0){const x=this._before.indexOf(a);x!==-1&&this._before.splice(x,1)}}}afterEach(a){return this._after=this._after||[],this._after.push(a),()=>{if(this._after!==void 0){const x=this._after.indexOf(a);x!==-1&&this._after.splice(x,1)}}}}function xf(){return new mg}function yg(r={}){let a,x=!1;const t=i=>{if(a&&a!==i)throw new Error("Context conflict")};let w;if(r.asyncContext){const i=r.AsyncLocalStorage||globalThis.AsyncLocalStorage;i?w=new i:console.warn("[unctx] `AsyncLocalStorage` is not provided.")}const g=()=>{if(w){const i=w.getStore();if(i!==void 0)return i}return a};return{use:()=>{const i=g();if(i===void 0)throw new Error("Context is not available");return i},tryUse:()=>g(),set:(i,u)=>{u||t(i),a=i,x=!0},unset:()=>{a=void 0,x=!1},call:(i,u)=>{t(i),a=i;try{return w?w.run(i,u):u()}finally{x||(a=void 0)}},async callAsync(i,u){a=i;const o=()=>{a=i},h=()=>a===i?o:void 0;wa.add(h);try{const y=w?w.run(i,u):u();return x||(a=void 0),await y}finally{wa.delete(h)}}}}function gg(r={}){const a={};return{get(x,t={}){return a[x]||(a[x]=yg({...r,...t})),a[x]}}}const Zs=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof global<"u"?global:typeof window<"u"?window:{},Yu="__unctx__",vg=Zs[Yu]||(Zs[Yu]=gg()),bg=(r,a={})=>vg.get(r,a),Ku="__unctx_async_handlers__",wa=Zs[Ku]||(Zs[Ku]=new Set);function yo(r){const a=[];for(const w of wa){const g=w();g&&a.push(g)}const x=()=>{for(const w of a)w()};let t=r();return t&&typeof t=="object"&&"catch"in t&&(t=t.catch(w=>{throw x(),w})),[t,x]}const _g=!1,ja=!1,xg=!1,wg={componentName:"NuxtLink",prefetch:!0,prefetchOn:{visibility:!0}},lx={value:null,errorValue:null,deep:!0},jg=null,ux={},Sg="#__nuxt",wf="nuxt-app",Zu=36e5,Eg="vite:preloadError";function jf(r=wf){return bg(r,{asyncContext:!1})}const Tg="__nuxt_plugin";function kg(r){var w;let a=0;const x={_id:r.id||wf||"nuxt-app",_scope:Jh(),provide:void 0,globalName:"nuxt",versions:{get nuxt(){return"3.15.0"},get vue(){return x.vueApp.version}},payload:dn({...((w=r.ssrContext)==null?void 0:w.payload)||{},data:dn({}),state:Ln({}),once:new Set,_errors:dn({})}),static:{data:{}},runWithContext(g){return x._scope.active&&!Yc()?x._scope.run(()=>Qu(x,g)):Qu(x,g)},isHydrating:!0,deferHydration(){if(!x.isHydrating)return()=>{};a++;let g=!1;return()=>{if(!g&&(g=!0,a--,a===0))return x.isHydrating=!1,x.callHook("app:suspense:resolve")}},_asyncDataPromises:{},_asyncData:dn({}),_payloadRevivers:{},...r};{const g=window.__NUXT__;if(g)for(const i in g)switch(i){case"data":case"state":case"_errors":Object.assign(x.payload[i],g[i]);break;default:x.payload[i]=g[i]}}x.hooks=xf(),x.hook=x.hooks.hook,x.callHook=x.hooks.callHook,x.provide=(g,i)=>{const u="$"+g;Ts(x,u,i),Ts(x.vueApp.config.globalProperties,u,i)},Ts(x.vueApp,"$nuxt",x),Ts(x.vueApp.config.globalProperties,"$nuxt",x);{window.addEventListener(Eg,i=>{x.callHook("app:chunkError",{error:i.payload}),(x.isHydrating||i.payload.message.includes("Unable to preload CSS"))&&i.preventDefault()}),window.useNuxtApp=window.useNuxtApp||Dt;const g=x.hook("app:error",(...i)=>{console.error("[nuxt] error caught during app initialization",...i)});x.hook("app:mounted",g)}const t=x.payload.config;return x.provide("config",t),x}function Mg(r,a){a.hooks&&r.hooks.addHooks(a.hooks)}async function Cg(r,a){if(typeof a=="function"){const{provide:x}=await r.runWithContext(()=>a(r))||{};if(x&&typeof x=="object")for(const t in x)r.provide(t,x[t])}}async function Og(r,a){const x=[],t=[],w=[],g=[];let i=0;async function u(o){var y;const h=((y=o.dependsOn)==null?void 0:y.filter(m=>a.some(n=>n._name===m)&&!x.includes(m)))??[];if(h.length>0)t.push([new Set(h),o]);else{const m=Cg(r,o).then(async()=>{o._name&&(x.push(o._name),await Promise.all(t.map(async([n,s])=>{n.has(o._name)&&(n.delete(o._name),n.size===0&&(i++,await u(s)))})))});o.parallel?w.push(m.catch(n=>g.push(n))):await m}}for(const o of a)Mg(r,o);for(const o of a)await u(o);if(await Promise.all(w),i)for(let o=0;o{}),r,{[Tg]:!0,_name:a})}function Qu(r,a,x){const t=()=>a();return jf(r._id).set(r),r.vueApp.runWithContext(t)}function Pg(r){var x;let a;return Id()&&(a=(x=Zn())==null?void 0:x.appContext.app.$nuxt),a=a||jf(r).tryUse(),a||null}function Dt(r){const a=Pg(r);if(!a)throw new Error("[nuxt] instance unavailable");return a}function cs(r){return Dt().$config}function Ts(r,a,x){Object.defineProperty(r,a,{get:()=>x})}function Ag(r,a){return{ctx:{table:r},matchAll:x=>Ef(x,r)}}function Sf(r){const a={};for(const x in r)a[x]=x==="dynamic"?new Map(Object.entries(r[x]).map(([t,w])=>[t,Sf(w)])):new Map(Object.entries(r[x]));return a}function Rg(r){return Ag(Sf(r))}function Ef(r,a,x){r.endsWith("/")&&(r=r.slice(0,-1)||"/");const t=[];for(const[g,i]of Ju(a.wildcard))(r===g||r.startsWith(g+"/"))&&t.push(i);for(const[g,i]of Ju(a.dynamic))if(r.startsWith(g+"/")){const u="/"+r.slice(g.length).split("/").splice(2).join("/");t.push(...Ef(u,i))}const w=a.static.get(r);return w&&t.push(w),t.filter(Boolean)}function Ju(r){return[...r.entries()].sort((a,x)=>a[0].length-x[0].length)}function Xi(r){if(r===null||typeof r!="object")return!1;const a=Object.getPrototypeOf(r);return a!==null&&a!==Object.prototype&&Object.getPrototypeOf(a)!==null||Symbol.iterator in r?!1:Symbol.toStringTag in r?Object.prototype.toString.call(r)==="[object Module]":!0}function Sa(r,a,x=".",t){if(!Xi(a))return Sa(r,{},x,t);const w=Object.assign({},a);for(const g in r){if(g==="__proto__"||g==="constructor")continue;const i=r[g];i!=null&&(t&&t(w,g,i,x)||(Array.isArray(i)&&Array.isArray(w[g])?w[g]=[...i,...w[g]]:Xi(i)&&Xi(w[g])?w[g]=Sa(i,w[g],(x?`${x}.`:"")+g.toString(),t):w[g]=i))}return w}function Lg(r){return(...a)=>a.reduce((x,t)=>Sa(x,t,"",r),{})}const Tf=Lg();function Ig(r,a){try{return a in r}catch{return!1}}var Dg=Object.defineProperty,Fg=(r,a,x)=>a in r?Dg(r,a,{enumerable:!0,configurable:!0,writable:!0,value:x}):r[a]=x,Gn=(r,a,x)=>(Fg(r,typeof a!="symbol"?a+"":a,x),x);class Ea extends Error{constructor(a,x={}){super(a,x),Gn(this,"statusCode",500),Gn(this,"fatal",!1),Gn(this,"unhandled",!1),Gn(this,"statusMessage"),Gn(this,"data"),Gn(this,"cause"),x.cause&&!this.cause&&(this.cause=x.cause)}toJSON(){const a={message:this.message,statusCode:ka(this.statusCode,500)};return this.statusMessage&&(a.statusMessage=kf(this.statusMessage)),this.data!==void 0&&(a.data=this.data),a}}Gn(Ea,"__h3_error__",!0);function Ta(r){if(typeof r=="string")return new Ea(r);if(Ng(r))return r;const a=new Ea(r.message??r.statusMessage??"",{cause:r.cause||r});if(Ig(r,"stack"))try{Object.defineProperty(a,"stack",{get(){return r.stack}})}catch{try{a.stack=r.stack}catch{}}if(r.data&&(a.data=r.data),r.statusCode?a.statusCode=ka(r.statusCode,a.statusCode):r.status&&(a.statusCode=ka(r.status,a.statusCode)),r.statusMessage?a.statusMessage=r.statusMessage:r.statusText&&(a.statusMessage=r.statusText),a.statusMessage){const x=a.statusMessage;kf(a.statusMessage)!==x&&console.warn("[h3] Please prefer using `message` for longer error messages instead of `statusMessage`. In the future, `statusMessage` will be sanitized by default.")}return r.fatal!==void 0&&(a.fatal=r.fatal),r.unhandled!==void 0&&(a.unhandled=r.unhandled),a}function Ng(r){var a;return((a=r==null?void 0:r.constructor)==null?void 0:a.__h3_error__)===!0}const Ug=/[^\u0009\u0020-\u007E]/g;function kf(r=""){return r.replace(Ug,"")}function ka(r,a=200){return!r||(typeof r=="string"&&(r=Number.parseInt(r,10)),r<100||r>999)?a:r}const Mf=Symbol("layout-meta"),ds=Symbol("route"),jr=()=>{var r;return(r=Dt())==null?void 0:r.$router},hi=()=>Id()?zt(ds,Dt()._route):Dt()._route;const Bg=()=>{try{if(Dt()._processingMiddleware)return!0}catch{return!1}return!1},Gg=(r,a)=>{r||(r="/");const x=typeof r=="string"?r:"path"in r?Ma(r):jr().resolve(r).href;if(a!=null&&a.open){const{target:o="_blank",windowFeatures:h={}}=a.open,y=Object.entries(h).filter(([m,n])=>n!==void 0).map(([m,n])=>`${m.toLowerCase()}=${n}`).join(", ");return open(x,o,y),Promise.resolve()}const t=mn(x,{acceptRelative:!0}),w=(a==null?void 0:a.external)||t;if(w){if(!(a!=null&&a.external))throw new Error("Navigating to an external URL is not allowed by default. Use `navigateTo(url, { external: true })`.");const{protocol:o}=new URL(x,window.location.href);if(o&&Uy(o))throw new Error(`Cannot navigate to a URL with '${o}' protocol.`)}const g=Bg();if(!w&&g)return a!=null&&a.replace?typeof r=="string"?{path:r,replace:!0}:{...r,replace:!0}:r;const i=jr(),u=Dt();return w?(u._scope.stop(),a!=null&&a.replace?location.replace(x):location.href=x,g?u.isHydrating?new Promise(()=>{}):!1:Promise.resolve()):a!=null&&a.replace?i.replace(r):i.push(r)};function Ma(r){return pf(r.path||"",r.query||{})+(r.hash||"")}const Cf="__nuxt_error",pi=()=>Ep(Dt().payload,"error"),lo=r=>{const a=mi(r);try{const x=Dt(),t=pi();x.hooks.callHook("app:error",a),t.value=t.value||a}catch{throw a}return a},Vg=async(r={})=>{const a=Dt(),x=pi();a.callHook("app:error:cleared",r),r.redirect&&await jr().replace(r.redirect),x.value=jg},Hg=r=>!!r&&typeof r=="object"&&Cf in r,mi=r=>{const a=Ta(r);return Object.defineProperty(a,Cf,{value:!0,configurable:!1,writable:!1}),a};function ec(r){const a=Wg(r),x=new ArrayBuffer(a.length),t=new DataView(x);for(let w=0;w>16),a+=String.fromCharCode((x&65280)>>8),a+=String.fromCharCode(x&255),x=t=0);return t===12?(x>>=4,a+=String.fromCharCode(x)):t===18&&(x>>=2,a+=String.fromCharCode((x&65280)>>8),a+=String.fromCharCode(x&255)),a}const qg=-1,Xg=-2,$g=-3,Yg=-4,Kg=-5,Zg=-6;function Qg(r,a){return Jg(JSON.parse(r),a)}function Jg(r,a){if(typeof r=="number")return w(r,!0);if(!Array.isArray(r)||r.length===0)throw new Error("Invalid input");const x=r,t=Array(x.length);function w(g,i=!1){if(g===qg)return;if(g===$g)return NaN;if(g===Yg)return 1/0;if(g===Kg)return-1/0;if(g===Zg)return-0;if(i)throw new Error("Invalid input");if(g in t)return t[g];const u=x[g];if(!u||typeof u!="object")t[g]=u;else if(Array.isArray(u))if(typeof u[0]=="string"){const o=u[0],h=a==null?void 0:a[o];if(h)return t[g]=h(w(u[1]));switch(o){case"Date":t[g]=new Date(u[1]);break;case"Set":const y=new Set;t[g]=y;for(let s=1;s>>9)+65536).toString(16).substring(1,8).toLowerCase()}function Ca(r){if(r._h)return r._h;if(r._d)return Qs(r._d);let a=`${r.tag}:${r.textContent||r.innerHTML||""}:`;for(const x in r.props)a+=`${x}:${String(r.props[x])},`;return Qs(a)}function Pf(r,a){const x=[],t=a.resolveKeyData||(g=>g.key),w=a.resolveValueData||(g=>g.value);for(const[g,i]of Object.entries(r))x.push(...(Array.isArray(i)?i:[i]).map(u=>{const o={key:g,value:u},h=w(o);return typeof h=="object"?Pf(h,a):Array.isArray(h)?h:{[typeof a.key=="function"?a.key(o):a.key]:t(o),[typeof a.value=="function"?a.value(o):a.value]:h}}).flat());return x}function Af(r,a){return Object.entries(r).map(([x,t])=>{if(typeof t=="object"&&(t=Af(t,a)),a.resolve){const w=a.resolve({key:x,value:t});if(typeof w<"u")return w}return typeof t=="number"&&(t=t.toString()),typeof t=="string"&&a.wrapValue&&(t=t.replace(new RegExp(a.wrapValue,"g"),`\\${a.wrapValue}`),t=`${a.wrapValue}${t}${a.wrapValue}`),`${x}${a.keyValueSeparator||""}${t}`}).join(a.entrySeparator||"")}const vr=r=>({keyValue:r,metaKey:"property"}),$i=r=>({keyValue:r}),cl={appleItunesApp:{unpack:{entrySeparator:", ",resolve({key:r,value:a}){return`${fn(r)}=${a}`}}},articleExpirationTime:vr("article:expiration_time"),articleModifiedTime:vr("article:modified_time"),articlePublishedTime:vr("article:published_time"),bookReleaseDate:vr("book:release_date"),charset:{metaKey:"charset"},contentSecurityPolicy:{unpack:{entrySeparator:"; ",resolve({key:r,value:a}){return`${fn(r)} ${a}`}},metaKey:"http-equiv"},contentType:{metaKey:"http-equiv"},defaultStyle:{metaKey:"http-equiv"},fbAppId:vr("fb:app_id"),msapplicationConfig:$i("msapplication-Config"),msapplicationTileColor:$i("msapplication-TileColor"),msapplicationTileImage:$i("msapplication-TileImage"),ogAudioSecureUrl:vr("og:audio:secure_url"),ogAudioUrl:vr("og:audio"),ogImageSecureUrl:vr("og:image:secure_url"),ogImageUrl:vr("og:image"),ogSiteName:vr("og:site_name"),ogVideoSecureUrl:vr("og:video:secure_url"),ogVideoUrl:vr("og:video"),profileFirstName:vr("profile:first_name"),profileLastName:vr("profile:last_name"),profileUsername:vr("profile:username"),refresh:{metaKey:"http-equiv",unpack:{entrySeparator:";",resolve({key:r,value:a}){if(r==="seconds")return`${a}`}}},robots:{unpack:{entrySeparator:", ",resolve({key:r,value:a}){return typeof a=="boolean"?`${fn(r)}`:`${fn(r)}:${a}`}}},xUaCompatible:{metaKey:"http-equiv"}},Rf=new Set(["og","book","article","profile"]);function Lf(r){var t;const a=fn(r),x=a.indexOf(":");return Rf.has(a.substring(0,x))?"property":((t=cl[r])==null?void 0:t.metaKey)||"name"}function ov(r){var a;return((a=cl[r])==null?void 0:a.keyValue)||fn(r)}function fn(r){const a=r.replace(/([A-Z])/g,"-$1").toLowerCase(),x=a.indexOf("-"),t=a.substring(0,x);return t==="twitter"||Rf.has(t)?r.replace(/([A-Z])/g,":$1").toLowerCase():a}function Oa(r){if(Array.isArray(r))return r.map(x=>Oa(x));if(typeof r!="object"||Array.isArray(r))return r;const a={};for(const x in r)Object.prototype.hasOwnProperty.call(r,x)&&(a[fn(x)]=Oa(r[x]));return a}function sv(r,a){const x=cl[a];return a==="refresh"?`${r.seconds};url=${r.url}`:Af(Oa(r),{keyValueSeparator:"=",entrySeparator:", ",resolve({value:t,key:w}){if(t===null)return"";if(typeof t=="boolean")return`${w}`},...x==null?void 0:x.unpack})}const If=new Set(["og:image","og:video","og:audio","twitter:image"]);function Df(r){const a={};for(const x in r){if(!Object.prototype.hasOwnProperty.call(r,x))continue;const t=r[x];String(t)!=="false"&&x&&(a[x]=t)}return a}function tc(r,a){const x=Df(a),t=fn(r),w=Lf(t);if(If.has(t)){const g={};for(const i in x)Object.prototype.hasOwnProperty.call(x,i)&&(g[`${r}${i==="url"?"":`${i[0].toUpperCase()}${i.slice(1)}`}`]=x[i]);return dl(g).sort((i,u)=>{var o,h;return(((o=i[w])==null?void 0:o.length)||0)-(((h=u[w])==null?void 0:h.length)||0)})}return[{[w]:t,...x}]}function dl(r){const a=[],x={};for(const w in r){if(!Object.prototype.hasOwnProperty.call(r,w))continue;const g=r[w];if(!Array.isArray(g)){if(typeof g=="object"&&g){if(If.has(fn(w))){a.push(...tc(w,g));continue}x[w]=Df(g)}else x[w]=g;continue}for(const i of g)a.push(...typeof i=="string"?dl({[w]:i}):tc(w,i))}const t=Pf(x,{key({key:w}){return Lf(w)},value({key:w}){return w==="charset"?"charset":"content"},resolveKeyData({key:w}){return ov(w)},resolveValueData({value:w,key:g}){return w===null?"_null":typeof w=="object"?sv(w,g):typeof w=="number"?w.toString():w}});return[...a,...t].map(w=>(w.content==="_null"&&(w.content=null),w))}function iv(r,a){return r instanceof Promise?r.then(a):a(r)}function Pa(r,a,x,t){const w=t||Nf(typeof a=="object"&&typeof a!="function"&&!(a instanceof Promise)?{...a}:{[r==="script"||r==="noscript"||r==="style"?"innerHTML":"textContent"]:a},r==="templateParams"||r==="titleTemplate");if(w instanceof Promise)return w.then(i=>Pa(r,a,x,i));const g={tag:r,props:w};for(const i of Of){const u=g.props[i]!==void 0?g.props[i]:x[i];u!==void 0&&((!(i==="innerHTML"||i==="textContent"||i==="children")||ev.has(g.tag))&&(g[i==="children"?"innerHTML":i]=u),delete g.props[i])}return g.props.body&&(g.tagPosition="bodyClose",delete g.props.body),g.tag==="script"&&typeof g.innerHTML=="object"&&(g.innerHTML=JSON.stringify(g.innerHTML),g.props.type=g.props.type||"application/json"),Array.isArray(g.props.content)?g.props.content.map(i=>({...g,props:{...g.props,content:i}})):g}function av(r,a){var t;const x=r==="class"?" ":";";return a&&typeof a=="object"&&!Array.isArray(a)&&(a=Object.entries(a).filter(([,w])=>w).map(([w,g])=>r==="style"?`${w}:${g}`:w)),(t=String(Array.isArray(a)?a.join(x):a))==null?void 0:t.split(x).filter(w=>!!w.trim()).join(x)}function Ff(r,a,x,t){for(let w=t;w(r[g]=i,Ff(r,a,x,w)));if(!a&&!Of.has(g)){const i=String(r[g]),u=g.startsWith("data-");i==="true"||i===""?r[g]=u?"true":!0:r[g]||(u&&i==="false"?r[g]="false":delete r[g])}}}function Nf(r,a=!1){const x=Ff(r,a,Object.keys(r),0);return x instanceof Promise?x.then(()=>r):r}const lv=10;function Uf(r,a,x){for(let t=x;t(a[t]=g,Uf(r,a,t)));Array.isArray(w)?r.push(...w):r.push(w)}}function uv(r){const a=[],x=r.resolvedInput;for(const w in x){if(!Object.prototype.hasOwnProperty.call(x,w))continue;const g=x[w];if(!(g===void 0||!tv.has(w))){if(Array.isArray(g)){for(const i of g)a.push(Pa(w,i,r));continue}a.push(Pa(w,g,r))}}if(a.length===0)return[];const t=[];return iv(Uf(t,a,0),()=>t.map((w,g)=>(w._e=r._i,r.mode&&(w._m=r.mode),w._p=(r._i<{if(u===jn||!g.includes(u))return u;const o=fv(a,u.slice(1),t);return o!==void 0?o:u}).trim(),i&&(r.endsWith(jn)&&(r=r.slice(0,-jn.length)),r.startsWith(jn)&&(r=r.slice(jn.length)),r=r.replace(hv,x).trim()),r}function sc(r,a){return r==null?a||null:typeof r=="function"?r(a):r}async function Gf(r,a={}){const x=a.document||r.resolvedOptions.document;if(!x||!r.dirty)return;const t={shouldRender:!0,tags:[]};if(await r.hooks.callHook("dom:beforeRender",t),!!t.shouldRender)return r._domUpdatePromise||(r._domUpdatePromise=new Promise(async w=>{var m;const g=(await r.resolveTags()).map(n=>({tag:n,id:Ls.has(n.tag)?Ca(n):n.tag,shouldRender:!0}));let i=r._dom;if(!i){i={elMap:{htmlAttrs:x.documentElement,bodyAttrs:x.body}};const n=new Set;for(const s of["body","head"]){const c=(m=x[s])==null?void 0:m.children;for(const f of c){const p=f.tagName.toLowerCase();if(!Ls.has(p))continue;const d={tag:p,props:await Nf(f.getAttributeNames().reduce((j,E)=>({...j,[E]:f.getAttribute(E)}),{})),innerHTML:f.innerHTML},l=Bf(d);let b=l,v=1;for(;b&&n.has(b);)b=`${l}:${v++}`;b&&(d._d=b,n.add(b)),i.elMap[f.getAttribute("data-hid")||Ca(d)]=f}}}i.pendingSideEffects={...i.sideEffects},i.sideEffects={};function u(n,s,c){const f=`${n}:${s}`;i.sideEffects[f]=c,delete i.pendingSideEffects[f]}function o({id:n,$el:s,tag:c}){const f=c.tag.endsWith("Attrs");if(i.elMap[n]=s,f||(c.textContent&&c.textContent!==s.textContent&&(s.textContent=c.textContent),c.innerHTML&&c.innerHTML!==s.innerHTML&&(s.innerHTML=c.innerHTML),u(n,"el",()=>{var p;(p=i.elMap[n])==null||p.remove(),delete i.elMap[n]})),c._eventHandlers)for(const p in c._eventHandlers)Object.prototype.hasOwnProperty.call(c._eventHandlers,p)&&s.getAttribute(`data-${p}`)!==""&&((c.tag==="bodyAttrs"?x.defaultView:s).addEventListener(p.substring(2),c._eventHandlers[p].bind(s)),s.setAttribute(`data-${p}`,""));for(const p in c.props){if(!Object.prototype.hasOwnProperty.call(c.props,p))continue;const d=c.props[p],l=`attr:${p}`;if(p==="class"){if(!d)continue;for(const b of d.split(" "))f&&u(n,`${l}:${b}`,()=>s.classList.remove(b)),!s.classList.contains(b)&&s.classList.add(b)}else if(p==="style"){if(!d)continue;for(const b of d.split(";")){const v=b.indexOf(":"),j=b.substring(0,v).trim(),E=b.substring(v+1).trim();u(n,`${l}:${j}`,()=>{s.style.removeProperty(j)}),s.style.setProperty(j,E)}}else s.getAttribute(p)!==d&&s.setAttribute(p,d===!0?"":String(d)),f&&u(n,l,()=>s.removeAttribute(p))}}const h=[],y={bodyClose:void 0,bodyOpen:void 0,head:void 0};for(const n of g){const{tag:s,shouldRender:c,id:f}=n;if(c){if(s.tag==="title"){x.title=s.textContent;continue}n.$el=n.$el||i.elMap[f],n.$el?o(n):Ls.has(s.tag)&&h.push(n)}}for(const n of h){const s=n.tag.tagPosition||"head";n.$el=x.createElement(n.tag.tag),o(n),y[s]=y[s]||x.createDocumentFragment(),y[s].appendChild(n.$el)}for(const n of g)await r.hooks.callHook("dom:renderTag",n,x,u);y.head&&x.head.appendChild(y.head),y.bodyOpen&&x.body.insertBefore(y.bodyOpen,x.body.firstChild),y.bodyClose&&x.body.appendChild(y.bodyClose);for(const n in i.pendingSideEffects)i.pendingSideEffects[n]();r._dom=i,await r.hooks.callHook("dom:rendered",{renders:g}),w()}).finally(()=>{r._domUpdatePromise=void 0,r.dirty=!1})),r._domUpdatePromise}function pv(r,a={}){const x=a.delayFn||(t=>setTimeout(t,10));return r._domDebouncedUpdatePromise=r._domDebouncedUpdatePromise||new Promise(t=>x(()=>Gf(r,a).then(()=>{delete r._domDebouncedUpdatePromise,t()})))}function mv(r){return a=>{var t,w;const x=((w=(t=a.resolvedOptions.document)==null?void 0:t.head.querySelector('script[id="unhead:payload"]'))==null?void 0:w.innerHTML)||!1;return x&&a.push(JSON.parse(x)),{mode:"client",hooks:{"entries:updated":g=>{pv(g,r)}}}}}const yv=new Set(["templateParams","htmlAttrs","bodyAttrs"]),gv={hooks:{"tag:normalise":({tag:r})=>{r.props.hid&&(r.key=r.props.hid,delete r.props.hid),r.props.vmid&&(r.key=r.props.vmid,delete r.props.vmid),r.props.key&&(r.key=r.props.key,delete r.props.key);const a=Bf(r);a&&!a.startsWith("meta:og:")&&!a.startsWith("meta:twitter:")&&delete r.key;const x=a||(r.key?`${r.tag}:${r.key}`:!1);x&&(r._d=x)},"tags:resolve":r=>{const a=Object.create(null);for(const t of r.tags){const w=(t.key?`${t.tag}:${t.key}`:t._d)||Ca(t),g=a[w];if(g){let u=t==null?void 0:t.tagDuplicateStrategy;if(!u&&yv.has(t.tag)&&(u="merge"),u==="merge"){const o=g.props;o.style&&t.props.style&&(o.style[o.style.length-1]!==";"&&(o.style+=";"),t.props.style=`${o.style} ${t.props.style}`),o.class&&t.props.class?t.props.class=`${o.class} ${t.props.class}`:o.class&&(t.props.class=o.class),a[w].props={...o,...t.props};continue}else if(t._e===g._e){g._duped=g._duped||[],t._d=`${g._d}:${g._duped.length+1}`,g._duped.push(t);continue}else if(Js(t)>Js(g))continue}if(!(t.innerHTML||t.textContent||Object.keys(t.props).length!==0)&&Ls.has(t.tag)){delete a[w];continue}a[w]=t}const x=[];for(const t in a){const w=a[t],g=w._duped;x.push(w),g&&(delete w._duped,x.push(...g))}r.tags=x,r.tags=r.tags.filter(t=>!(t.tag==="meta"&&(t.props.name||t.props.property)&&!t.props.content))}}},vv=new Set(["script","link","bodyAttrs"]),bv=r=>({hooks:{"tags:resolve":a=>{for(const x of a.tags){if(!vv.has(x.tag))continue;const t=x.props;for(const w in t){if(w[0]!=="o"||w[1]!=="n"||!Object.prototype.hasOwnProperty.call(t,w))continue;const g=t[w];typeof g=="function"&&(r.ssr&&rc.has(w)?t[w]=`this.dataset.${w}fired = true`:delete t[w],x._eventHandlers=x._eventHandlers||{},x._eventHandlers[w]=g)}r.ssr&&x._eventHandlers&&(x.props.src||x.props.href)&&(x.key=x.key||Qs(x.props.src||x.props.href))}},"dom:renderTag":({$el:a,tag:x})=>{var w,g;const t=a==null?void 0:a.dataset;if(t)for(const i in t){if(!i.endsWith("fired"))continue;const u=i.slice(0,-5);rc.has(u)&&((g=(w=x._eventHandlers)==null?void 0:w[u])==null||g.call(a,new Event(u.substring(2))))}}}}),_v=new Set(["link","style","script","noscript"]),xv={hooks:{"tag:normalise":({tag:r})=>{r.key&&_v.has(r.tag)&&(r.props["data-hid"]=r._h=Qs(r.key))}}},wv={mode:"server",hooks:{"tags:beforeResolve":r=>{const a={};let x=!1;for(const t of r.tags)t._m!=="server"||t.tag!=="titleTemplate"&&t.tag!=="templateParams"&&t.tag!=="title"||(a[t.tag]=t.tag==="title"||t.tag==="titleTemplate"?t.textContent:t.props,x=!0);x&&r.tags.push({tag:"script",innerHTML:JSON.stringify(a),props:{id:"unhead:payload",type:"application/json"}})}}},jv={hooks:{"tags:resolve":r=>{var a;for(const x of r.tags)if(typeof x.tagPriority=="string")for(const{prefix:t,offset:w}of cv){if(!x.tagPriority.startsWith(t))continue;const g=x.tagPriority.substring(t.length),i=(a=r.tags.find(u=>u._d===g))==null?void 0:a._p;if(i!==void 0){x._p=i+w;break}}r.tags.sort((x,t)=>{const w=Js(x),g=Js(t);return wg?1:x._p-t._p})}}},Sv={meta:"content",link:"href",htmlAttrs:"lang"},Ev=["innerHTML","textContent"],Tv=r=>({hooks:{"tags:resolve":a=>{var i;const{tags:x}=a;let t;for(let u=0;uu.tag==="title"))==null?void 0:i.textContent)||"",w,g);for(const u of x){if(u.processTemplateParams===!1)continue;const o=Sv[u.tag];if(o&&typeof u.props[o]=="string")u.props[o]=ks(u.props[o],w,g);else if(u.processTemplateParams||u.tag==="titleTemplate"||u.tag==="title")for(const h of Ev)typeof u[h]=="string"&&(u[h]=ks(u[h],w,g,u.tag==="script"&&u.props.type.endsWith("json")))}r._templateParams=w,r._separator=g},"tags:afterResolve":({tags:a})=>{let x;for(let t=0;t{const{tags:a}=r;let x,t;for(let w=0;w{for(const a of r.tags)typeof a.innerHTML=="string"&&(a.innerHTML&&(a.props.type==="application/ld+json"||a.props.type==="application/json")?a.innerHTML=a.innerHTML.replace(/{u.dirty=!0,a.callHook("entries:updated",u)};let w=0,g=[];const i=[],u={plugins:i,dirty:!1,resolvedOptions:r,hooks:a,headEntries(){return g},use(o){const h=typeof o=="function"?o(u):o;(!h.key||!i.some(y=>y.key===h.key))&&(i.push(h),ic(h.mode,x)&&a.addHooks(h.hooks||{}))},push(o,h){h==null||delete h.head;const y={_i:w++,input:o,...h};return ic(y.mode,x)&&(g.push(y),t()),{dispose(){g=g.filter(m=>m._i!==y._i),t()},patch(m){for(const n of g)n._i===y._i&&(n.input=y.input=m);t()}}},async resolveTags(){const o={tags:[],entries:[...g]};await a.callHook("entries:resolve",o);for(const h of o.entries){const y=h.resolvedInput||h.input;if(h.resolvedInput=await(h.transform?h.transform(y):y),h.resolvedInput)for(const m of await uv(h)){const n={tag:m,entry:h,resolvedOptions:u.resolvedOptions};await a.callHook("tag:normalise",n),o.tags.push(n.tag)}}return await a.callHook("tags:beforeResolve",o),await a.callHook("tags:resolve",o),await a.callHook("tags:afterResolve",o),o.tags},ssr:x};return[gv,wv,bv,xv,jv,Tv,kv,Mv,...(r==null?void 0:r.plugins)||[]].forEach(o=>u.use(o)),u.hooks.callHook("init",u),u}function Pv(){return Vf}const Av=af[0]==="3";function Rv(r){return typeof r=="function"?r():Nt(r)}function ei(r){if(r instanceof Promise||r instanceof Date||r instanceof RegExp)return r;const a=Rv(r);if(!r||!a)return a;if(Array.isArray(a))return a.map(x=>ei(x));if(typeof a=="object"){const x={};for(const t in a)if(Object.prototype.hasOwnProperty.call(a,t)){if(t==="titleTemplate"||t[0]==="o"&&t[1]==="n"){x[t]=Nt(a[t]);continue}x[t]=ei(a[t])}return x}return a}const Lv={hooks:{"entries:resolve":r=>{for(const a of r.entries)a.resolvedInput=ei(a.input)}}},Hf="usehead";function Iv(r){return{install(x){Av&&(x.config.globalProperties.$unhead=r,x.config.globalProperties.$head=r,x.provide(Hf,r))}}.install}function Dv(r={}){r.domDelayFn=r.domDelayFn||(x=>Pr(()=>setTimeout(()=>x(),0)));const a=Cv(r);return a.use(Lv),a.install=Iv(a),a}const Aa=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Ra="__unhead_injection_handler__";function Fv(r){Aa[Ra]=r}function Nv(){return Ra in Aa?Aa[Ra]():zt(Hf)||Pv()}function Uv(r,a={}){const x=a.head||Nv();if(x)return x.ssr?x.push(r,a):Bv(x,r,a)}function Bv(r,a,x={}){const t=mt(!1),w=mt({});Jr(()=>{w.value=t.value?{}:ei(a)});const g=r.push(w.value,x);return On(w,u=>{g.patch(u)}),Zn()&&(ls(()=>{g.dispose()}),Ed(()=>{t.value=!0}),Sd(()=>{t.value=!1})),g}function Gv(r,a){const{title:x,titleTemplate:t,...w}=r;return Uv({title:x,titleTemplate:t,_flatMeta:w},{...a,transform(g){const i=dl({...g._flatMeta});return delete g._flatMeta,{...g,meta:i}}})}const Vv="modulepreload",Hv=function(r,a){return new URL(r,a).href},ac={},rt=function(a,x,t){let w=Promise.resolve();if(x&&x.length>0){const i=document.getElementsByTagName("link"),u=document.querySelector("meta[property=csp-nonce]"),o=(u==null?void 0:u.nonce)||(u==null?void 0:u.getAttribute("nonce"));w=Promise.allSettled(x.map(h=>{if(h=Hv(h,t),h in ac)return;ac[h]=!0;const y=h.endsWith(".css"),m=y?'[rel="stylesheet"]':"";if(!!t)for(let c=i.length-1;c>=0;c--){const f=i[c];if(f.href===h&&(!y||f.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${h}"]${m}`))return;const s=document.createElement("link");if(s.rel=y?"stylesheet":Vv,y||(s.as="script"),s.crossOrigin="",s.href=h,o&&s.setAttribute("nonce",o),document.head.appendChild(s),y)return new Promise((c,f)=>{s.addEventListener("load",c),s.addEventListener("error",()=>f(new Error(`Unable to preload CSS for ${h}`)))})}))}function g(i){const u=new Event("vite:preloadError",{cancelable:!0});if(u.payload=i,window.dispatchEvent(u),!u.defaultPrevented)throw i}return w.then(i=>{for(const u of i||[])u.status==="rejected"&&g(u.reason);return a().catch(g)})};let Is,Ds;function zv(){return Is=$fetch(ul(`builds/meta/${cs().app.buildId}.json`),{responseType:"json"}),Is.then(r=>{Ds=Rg(r.matcher)}).catch(r=>{console.error("[nuxt] Error fetching app manifest.",r)}),Is}function yi(){return Is||zv()}async function fl(r){const a=typeof r=="string"?r:r.path;if(await yi(),!Ds)return console.error("[nuxt] Error creating app manifest matcher.",Ds),{};try{return Tf({},...Ds.matchAll(a).reverse())}catch(x){return console.error("[nuxt] Error matching route rules.",x),{}}}async function lc(r,a={}){const x=await qv(r,a),t=Dt(),w=t._payloadCache=t._payloadCache||{};return x in w?w[x]||null:(w[x]=Wf(r).then(g=>g?zf(x).then(i=>i||(delete w[x],null)):(w[x]=null,null)),w[x])}const Wv="_payload.json";async function qv(r,a={}){const x=new URL(r,"http://localhost");if(x.host!=="localhost"||mn(x.pathname,{acceptRelative:!0}))throw new Error("Payload URL must not include hostname: "+r);const t=cs(),w=a.hash||(a.fresh?Date.now():t.app.buildId),g=t.app.cdnURL,i=g&&await Wf(r)?g:t.app.baseURL;return fi(i,x.pathname,Wv+(w?`?${w}`:""))}async function zf(r){const a=fetch(r).then(x=>x.text().then(qf));try{return await a}catch(x){console.warn("[nuxt] Cannot load payload ",r,x)}return null}async function Wf(r=hi().path){const a=Dt();return r=di(r),(await yi()).prerendered.includes(r)?!0:a.runWithContext(async()=>{const t=await fl({path:r});return!!t.prerender&&!t.redirect})}let Nn=null;async function Xv(){var t;if(Nn)return Nn;const r=document.getElementById("__NUXT_DATA__");if(!r)return{};const a=await qf(r.textContent||""),x=r.dataset.src?await zf(r.dataset.src):void 0;return Nn={...a,...x,...window.__NUXT__},(t=Nn.config)!=null&&t.public&&(Nn.config.public=Ln(Nn.config.public)),Nn}async function qf(r){return await Qg(r,Dt()._payloadRevivers)}function $v(r,a){Dt()._payloadRevivers[r]=a}const Yv=[["NuxtError",r=>mi(r)],["EmptyShallowRef",r=>Zo(r==="_"?void 0:r==="0n"?BigInt(0):qs(r))],["EmptyRef",r=>mt(r==="_"?void 0:r==="0n"?BigInt(0):qs(r))],["ShallowRef",r=>Zo(r)],["ShallowReactive",r=>dn(r)],["Ref",r=>mt(r)],["Reactive",r=>Ln(r)]],Kv=tn({name:"nuxt:revive-payload:client",order:-30,async setup(r){let a,x;for(const[t,w]of Yv)$v(t,w);Object.assign(r.payload,([a,x]=yo(()=>r.runWithContext(Xv)),a=await a,x(),a)),window.__NUXT__=r.payload}}),Zv=[],Qv=tn({name:"nuxt:head",enforce:"pre",setup(r){const a=Dv({plugins:Zv});Fv(()=>Dt().vueApp._context.provides.usehead),r.vueApp.use(a);{let x=!0;const t=async()=>{x=!1,await Gf(a)};a.hooks.hook("dom:beforeRender",w=>{w.shouldRender=!x}),r.hooks.hook("page:start",()=>{x=!0}),r.hooks.hook("page:finish",()=>{r.isHydrating||t()}),r.hooks.hook("app:error",t),r.hooks.hook("app:suspense:resolve",t)}}});/*! +**/let va;const Eu=typeof window<"u"&&window.trustedTypes;if(Eu)try{va=Eu.createPolicy("vue",{createHTML:r=>r})}catch{}const lf=va?r=>va.createHTML(r):r=>r,Nm="http://www.w3.org/2000/svg",Um="http://www.w3.org/1998/Math/MathML",ln=typeof document<"u"?document:null,Tu=ln&&ln.createElement("template"),Bm={insert:(r,a,x)=>{a.insertBefore(r,x||null)},remove:r=>{const a=r.parentNode;a&&a.removeChild(r)},createElement:(r,a,x,t)=>{const w=a==="svg"?ln.createElementNS(Nm,r):a==="mathml"?ln.createElementNS(Um,r):x?ln.createElement(r,{is:x}):ln.createElement(r);return r==="select"&&t&&t.multiple!=null&&w.setAttribute("multiple",t.multiple),w},createText:r=>ln.createTextNode(r),createComment:r=>ln.createComment(r),setText:(r,a)=>{r.nodeValue=a},setElementText:(r,a)=>{r.textContent=a},parentNode:r=>r.parentNode,nextSibling:r=>r.nextSibling,querySelector:r=>ln.querySelector(r),setScopeId(r,a){r.setAttribute(a,"")},insertStaticContent(r,a,x,t,w,g){const i=x?x.previousSibling:a.lastChild;if(w&&(w===g||w.nextSibling))for(;a.insertBefore(w.cloneNode(!0),x),!(w===g||!(w=w.nextSibling)););else{Tu.innerHTML=lf(t==="svg"?`${r}`:t==="mathml"?`${r}`:r);const u=Tu.content;if(t==="svg"||t==="mathml"){const o=u.firstChild;for(;o.firstChild;)u.appendChild(o.firstChild);u.removeChild(o)}a.insertBefore(u,x)}return[i?i.nextSibling:a.firstChild,x?x.previousSibling:a.lastChild]}},_n="transition",Io="animation",es=Symbol("_vtc"),uf={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},Gm=$t({},bd,uf),Vm=r=>(r.displayName="Transition",r.props=Gm,r),al=Vm((r,{slots:a})=>Jt(Lp,Hm(r),a)),Fn=(r,a=[])=>{st(r)?r.forEach(x=>x(...a)):r&&r(...a)},ku=r=>r?st(r)?r.some(a=>a.length>1):r.length>1:!1;function Hm(r){const a={};for(const I in r)I in uf||(a[I]=r[I]);if(r.css===!1)return a;const{name:x="v",type:t,duration:w,enterFromClass:g=`${x}-enter-from`,enterActiveClass:i=`${x}-enter-active`,enterToClass:u=`${x}-enter-to`,appearFromClass:o=g,appearActiveClass:h=i,appearToClass:y=u,leaveFromClass:m=`${x}-leave-from`,leaveActiveClass:n=`${x}-leave-active`,leaveToClass:s=`${x}-leave-to`}=r,c=zm(w),f=c&&c[0],p=c&&c[1],{onBeforeEnter:d,onEnter:l,onEnterCancelled:b,onLeave:v,onLeaveCancelled:j,onBeforeAppear:E=d,onAppear:T=l,onAppearCancelled:M=b}=a,P=(I,A,N,F)=>{I._enterCancelled=F,Nn(I,A?y:u),Nn(I,A?h:i),N&&N()},R=(I,A)=>{I._isLeaving=!1,Nn(I,m),Nn(I,s),Nn(I,n),A&&A()},C=I=>(A,N)=>{const F=I?T:l,U=()=>P(A,I,N);Fn(F,[A,U]),Mu(()=>{Nn(A,I?o:g),sn(A,I?y:u),ku(F)||Cu(A,t,f,U)})};return $t(a,{onBeforeEnter(I){Fn(d,[I]),sn(I,g),sn(I,i)},onBeforeAppear(I){Fn(E,[I]),sn(I,o),sn(I,h)},onEnter:C(!1),onAppear:C(!0),onLeave(I,A){I._isLeaving=!0;const N=()=>R(I,A);sn(I,m),I._enterCancelled?(sn(I,n),Au()):(Au(),sn(I,n)),Mu(()=>{I._isLeaving&&(Nn(I,m),sn(I,s),ku(v)||Cu(I,t,p,N))}),Fn(v,[I,N])},onEnterCancelled(I){P(I,!1,void 0,!0),Fn(b,[I])},onAppearCancelled(I){P(I,!0,void 0,!0),Fn(M,[I])},onLeaveCancelled(I){R(I),Fn(j,[I])}})}function zm(r){if(r==null)return null;if(At(r))return[Gi(r.enter),Gi(r.leave)];{const a=Gi(r);return[a,a]}}function Gi(r){return zc(r)}function sn(r,a){a.split(/\s+/).forEach(x=>x&&r.classList.add(x)),(r[es]||(r[es]=new Set)).add(a)}function Nn(r,a){a.split(/\s+/).forEach(t=>t&&r.classList.remove(t));const x=r[es];x&&(x.delete(a),x.size||(r[es]=void 0))}function Mu(r){requestAnimationFrame(()=>{requestAnimationFrame(r)})}let Wm=0;function Cu(r,a,x,t){const w=r._endId=++Wm,g=()=>{w===r._endId&&t()};if(x!=null)return setTimeout(g,x);const{type:i,timeout:u,propCount:o}=qm(r,a);if(!i)return t();const h=i+"end";let y=0;const m=()=>{r.removeEventListener(h,n),g()},n=s=>{s.target===r&&++y>=o&&m()};setTimeout(()=>{y(x[c]||"").split(", "),w=t(`${_n}Delay`),g=t(`${_n}Duration`),i=Ou(w,g),u=t(`${Io}Delay`),o=t(`${Io}Duration`),h=Ou(u,o);let y=null,m=0,n=0;a===_n?i>0&&(y=_n,m=i,n=g.length):a===Io?h>0&&(y=Io,m=h,n=o.length):(m=Math.max(i,h),y=m>0?i>h?_n:Io:null,n=y?y===_n?g.length:o.length:0);const s=y===_n&&/\b(transform|all)(,|$)/.test(t(`${_n}Property`).toString());return{type:y,timeout:m,propCount:n,hasTransform:s}}function Ou(r,a){for(;r.lengthPu(x)+Pu(r[t])))}function Pu(r){return r==="auto"?0:Number(r.slice(0,-1).replace(",","."))*1e3}function Au(){return document.body.offsetHeight}function Xm(r,a,x){const t=r[es];t&&(a=(a?[a,...t]:[...t]).join(" ")),a==null?r.removeAttribute("class"):x?r.setAttribute("class",a):r.className=a}const Ru=Symbol("_vod"),$m=Symbol("_vsh"),Ym=Symbol(""),Km=/(^|;)\s*display\s*:/;function Zm(r,a,x){const t=r.style,w=Ut(x);let g=!1;if(x&&!w){if(a)if(Ut(a))for(const i of a.split(";")){const u=i.slice(0,i.indexOf(":")).trim();x[u]==null&&As(t,u,"")}else for(const i in a)x[i]==null&&As(t,i,"");for(const i in x)i==="display"&&(g=!0),As(t,i,x[i])}else if(w){if(a!==x){const i=t[Ym];i&&(x+=";"+i),t.cssText=x,g=Km.test(x)}}else a&&r.removeAttribute("style");Ru in r&&(r[Ru]=g?t.display:"",r[$m]&&(t.display="none"))}const Lu=/\s*!important$/;function As(r,a,x){if(st(x))x.forEach(t=>As(r,a,t));else if(x==null&&(x=""),a.startsWith("--"))r.setProperty(a,x);else{const t=Qm(r,a);Lu.test(x)?r.setProperty(Zn(t),x.replace(Lu,""),"important"):r[t]=x}}const Iu=["Webkit","Moz","ms"],Vi={};function Qm(r,a){const x=Vi[a];if(x)return x;let t=Ir(a);if(t!=="filter"&&t in r)return Vi[a]=t;t=ri(t);for(let w=0;wHi||(ry.then(()=>Hi=0),Hi=Date.now());function oy(r,a){const x=t=>{if(!t._vts)t._vts=Date.now();else if(t._vts<=x.attached)return;Hr(sy(t,x.value),a,5,[t])};return x.value=r,x.attached=ny(),x}function sy(r,a){if(st(a)){const x=r.stopImmediatePropagation;return r.stopImmediatePropagation=()=>{x.call(r),r._stopped=!0},a.map(t=>w=>!w._stopped&&t&&t(w))}else return a}const Gu=r=>r.charCodeAt(0)===111&&r.charCodeAt(1)===110&&r.charCodeAt(2)>96&&r.charCodeAt(2)<123,iy=(r,a,x,t,w,g)=>{const i=w==="svg";a==="class"?Xm(r,t,i):a==="style"?Zm(r,x,t):ns(a)?Ha(a)||ey(r,a,x,t,g):(a[0]==="."?(a=a.slice(1),!0):a[0]==="^"?(a=a.slice(1),!1):ay(r,a,t,i))?(Nu(r,a,t),!r.tagName.includes("-")&&(a==="value"||a==="checked"||a==="selected")&&Fu(r,a,t,i,g,a!=="value")):r._isVueCE&&(/[A-Z]/.test(a)||!Ut(t))?Nu(r,Ir(a),t,g,a):(a==="true-value"?r._trueValue=t:a==="false-value"&&(r._falseValue=t),Fu(r,a,t,i))};function ay(r,a,x,t){if(t)return!!(a==="innerHTML"||a==="textContent"||a in r&&Gu(a)&&at(x));if(a==="spellcheck"||a==="draggable"||a==="translate"||a==="form"||a==="list"&&r.tagName==="INPUT"||a==="type"&&r.tagName==="TEXTAREA")return!1;if(a==="width"||a==="height"){const w=r.tagName;if(w==="IMG"||w==="VIDEO"||w==="CANVAS"||w==="SOURCE")return!1}return Gu(a)&&Ut(x)?!1:a in r}const Vu=r=>{const a=r.props["onUpdate:modelValue"]||!1;return st(a)?x=>po(a,x):a};function ly(r){r.target.composing=!0}function Hu(r){const a=r.target;a.composing&&(a.composing=!1,a.dispatchEvent(new Event("input")))}const zi=Symbol("_assign"),ox={created(r,{modifiers:{lazy:a,trim:x,number:t}},w){r[zi]=Vu(w);const g=t||w.props&&w.props.type==="number";io(r,a?"change":"input",i=>{if(i.target.composing)return;let u=r.value;x&&(u=u.trim()),g&&(u=ra(u)),r[zi](u)}),x&&io(r,"change",()=>{r.value=r.value.trim()}),a||(io(r,"compositionstart",ly),io(r,"compositionend",Hu),io(r,"change",Hu))},mounted(r,{value:a}){r.value=a??""},beforeUpdate(r,{value:a,oldValue:x,modifiers:{lazy:t,trim:w,number:g}},i){if(r[zi]=Vu(i),r.composing)return;const u=(g||r.type==="number")&&!/^0\d/.test(r.value)?ra(r.value):r.value,o=a??"";u!==o&&(document.activeElement===r&&r.type!=="range"&&(t&&a===x||w&&r.value.trim()===o)||(r.value=o))}},cf=$t({patchProp:iy},Bm);let zo,zu=!1;function uy(){return zo||(zo=dm(cf))}function cy(){return zo=zu?zo:fm(cf),zu=!0,zo}const dy=(...r)=>{const a=uy().createApp(...r),{mount:x}=a;return a.mount=t=>{const w=ff(t);if(!w)return;const g=a._component;!at(g)&&!g.render&&!g.template&&(g.template=w.innerHTML),w.nodeType===1&&(w.textContent="");const i=x(w,!1,df(w));return w instanceof Element&&(w.removeAttribute("v-cloak"),w.setAttribute("data-v-app","")),i},a},fy=(...r)=>{const a=cy().createApp(...r),{mount:x}=a;return a.mount=t=>{const w=ff(t);if(w)return x(w,!0,df(w))},a};function df(r){if(r instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&r instanceof MathMLElement)return"mathml"}function ff(r){return Ut(r)?document.querySelector(r):r}const hy=/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,py=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,my=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;function yy(r,a){if(r==="__proto__"||r==="constructor"&&a&&typeof a=="object"&&"prototype"in a){gy(r);return}return a}function gy(r){console.warn(`[destr] Dropping "${r}" key to prevent prototype pollution.`)}function Ws(r,a={}){if(typeof r!="string")return r;const x=r.trim();if(r[0]==='"'&&r.endsWith('"')&&!r.includes("\\"))return x.slice(1,-1);if(x.length<=9){const t=x.toLowerCase();if(t==="true")return!0;if(t==="false")return!1;if(t==="undefined")return;if(t==="null")return null;if(t==="nan")return Number.NaN;if(t==="infinity")return Number.POSITIVE_INFINITY;if(t==="-infinity")return Number.NEGATIVE_INFINITY}if(!my.test(r)){if(a.strict)throw new SyntaxError("[destr] Invalid JSON");return r}try{if(hy.test(r)||py.test(r)){if(a.strict)throw new Error("[destr] Possible prototype pollution");return JSON.parse(r,yy)}return JSON.parse(r)}catch(t){if(a.strict)throw t;return r}}const vy=/#/g,by=/&/g,_y=/\//g,xy=/=/g,ll=/\+/g,wy=/%5e/gi,jy=/%60/gi,Sy=/%7c/gi,Ey=/%20/gi;function Ty(r){return encodeURI(""+r).replace(Sy,"|")}function ba(r){return Ty(typeof r=="string"?r:JSON.stringify(r)).replace(ll,"%2B").replace(Ey,"+").replace(vy,"%23").replace(by,"%26").replace(jy,"`").replace(wy,"^").replace(_y,"%2F")}function Wi(r){return ba(r).replace(xy,"%3D")}function qs(r=""){try{return decodeURIComponent(""+r)}catch{return""+r}}function ky(r){return qs(r.replace(ll," "))}function My(r){return qs(r.replace(ll," "))}function hf(r=""){const a={};r[0]==="?"&&(r=r.slice(1));for(const x of r.split("&")){const t=x.match(/([^=]+)=?(.*)/)||[];if(t.length<2)continue;const w=ky(t[1]);if(w==="__proto__"||w==="constructor")continue;const g=My(t[2]||"");a[w]===void 0?a[w]=g:Array.isArray(a[w])?a[w].push(g):a[w]=[a[w],g]}return a}function Cy(r,a){return(typeof a=="number"||typeof a=="boolean")&&(a=String(a)),a?Array.isArray(a)?a.map(x=>`${Wi(r)}=${ba(x)}`).join("&"):`${Wi(r)}=${ba(a)}`:Wi(r)}function Oy(r){return Object.keys(r).filter(a=>r[a]!==void 0).map(a=>Cy(a,r[a])).filter(Boolean).join("&")}const Py=/^[\s\w\0+.-]{2,}:([/\\]{1,2})/,Ay=/^[\s\w\0+.-]{2,}:([/\\]{2})?/,Ry=/^([/\\]\s*){2,}[^/\\]/,Ly=/^[\s\0]*(blob|data|javascript|vbscript):$/i,Iy=/\/$|\/\?|\/#/,Dy=/^\.?\//;function yn(r,a={}){return typeof a=="boolean"&&(a={acceptRelative:a}),a.strict?Py.test(r):Ay.test(r)||(a.acceptRelative?Ry.test(r):!1)}function Fy(r){return!!r&&Ly.test(r)}function _a(r="",a){return a?Iy.test(r):r.endsWith("/")}function di(r="",a){if(!a)return(_a(r)?r.slice(0,-1):r)||"/";if(!_a(r,!0))return r||"/";let x=r,t="";const w=r.indexOf("#");w>=0&&(x=r.slice(0,w),t=r.slice(w));const[g,...i]=x.split("?");return((g.endsWith("/")?g.slice(0,-1):g)||"/")+(i.length>0?`?${i.join("?")}`:"")+t}function Xs(r="",a){if(!a)return r.endsWith("/")?r:r+"/";if(_a(r,!0))return r||"/";let x=r,t="";const w=r.indexOf("#");if(w>=0&&(x=r.slice(0,w),t=r.slice(w),!x))return t;const[g,...i]=x.split("?");return g+"/"+(i.length>0?`?${i.join("?")}`:"")+t}function Ny(r=""){return r.startsWith("/")}function Wu(r=""){return Ny(r)?r:"/"+r}function Uy(r,a){if(mf(a)||yn(r))return r;const x=di(a);return r.startsWith(x)?r:fi(x,r)}function qu(r,a){if(mf(a))return r;const x=di(a);if(!r.startsWith(x))return r;const t=r.slice(x.length);return t[0]==="/"?t:"/"+t}function pf(r,a){const x=Vy(r),t={...hf(x.search),...a};return x.search=Oy(t),Hy(x)}function mf(r){return!r||r==="/"}function By(r){return r&&r!=="/"}function fi(r,...a){let x=r||"";for(const t of a.filter(w=>By(w)))if(x){const w=t.replace(Dy,"");x=Xs(x)+w}else x=t;return x}function yf(...r){var i,u,o,h;const a=/\/(?!\/)/,x=r.filter(Boolean),t=[];let w=0;for(const y of x)if(!(!y||y==="/")){for(const[m,n]of y.split(a).entries())if(!(!n||n===".")){if(n===".."){if(t.length===1&&yn(t[0]))continue;t.pop(),w--;continue}if(m===1&&((i=t[t.length-1])!=null&&i.endsWith(":/"))){t[t.length-1]+="/"+n;continue}t.push(n),w++}}let g=t.join("/");return w>=0?(u=x[0])!=null&&u.startsWith("/")&&!g.startsWith("/")?g="/"+g:(o=x[0])!=null&&o.startsWith("./")&&!g.startsWith("./")&&(g="./"+g):g="../".repeat(-1*w)+g,(h=x[x.length-1])!=null&&h.endsWith("/")&&!g.endsWith("/")&&(g+="/"),g}function Gy(r,a,x={}){return x.trailingSlash||(r=Xs(r),a=Xs(a)),x.leadingSlash||(r=Wu(r),a=Wu(a)),x.encoding||(r=qs(r),a=qs(a)),r===a}const gf=Symbol.for("ufo:protocolRelative");function Vy(r="",a){const x=r.match(/^[\s\0]*(blob:|data:|javascript:|vbscript:)(.*)/i);if(x){const[,m,n=""]=x;return{protocol:m.toLowerCase(),pathname:n,href:m+n,auth:"",host:"",search:"",hash:""}}if(!yn(r,{acceptRelative:!0}))return Xu(r);const[,t="",w,g=""]=r.replace(/\\/g,"/").match(/^[\s\0]*([\w+.-]{2,}:)?\/\/([^/@]+@)?(.*)/)||[];let[,i="",u=""]=g.match(/([^#/?]*)(.*)?/)||[];t==="file:"&&(u=u.replace(/\/(?=[A-Za-z]:)/,""));const{pathname:o,search:h,hash:y}=Xu(u);return{protocol:t.toLowerCase(),auth:w?w.slice(0,Math.max(0,w.length-1)):"",host:i,pathname:o,search:h,hash:y,[gf]:!t}}function Xu(r=""){const[a="",x="",t=""]=(r.match(/([^#?]*)(\?[^#]*)?(#.*)?/)||[]).splice(1);return{pathname:a,search:x,hash:t}}function Hy(r){const a=r.pathname||"",x=r.search?(r.search.startsWith("?")?"":"?")+r.search:"",t=r.hash||"",w=r.auth?r.auth+"@":"",g=r.host||"";return(r.protocol||r[gf]?(r.protocol||"")+"//":"")+w+g+a+x+t}class zy extends Error{constructor(a,x){super(a,x),this.name="FetchError",x!=null&&x.cause&&!this.cause&&(this.cause=x.cause)}}function Wy(r){var o,h,y,m,n;const a=((o=r.error)==null?void 0:o.message)||((h=r.error)==null?void 0:h.toString())||"",x=((y=r.request)==null?void 0:y.method)||((m=r.options)==null?void 0:m.method)||"GET",t=((n=r.request)==null?void 0:n.url)||String(r.request)||"/",w=`[${x}] ${JSON.stringify(t)}`,g=r.response?`${r.response.status} ${r.response.statusText}`:"",i=`${w}: ${g}${a?` ${a}`:""}`,u=new zy(i,r.error?{cause:r.error}:void 0);for(const s of["request","options","response"])Object.defineProperty(u,s,{get(){return r[s]}});for(const[s,c]of[["data","_data"],["status","status"],["statusCode","status"],["statusText","statusText"],["statusMessage","statusText"]])Object.defineProperty(u,s,{get(){return r.response&&r.response[c]}});return u}const qy=new Set(Object.freeze(["PATCH","POST","PUT","DELETE"]));function $u(r="GET"){return qy.has(r.toUpperCase())}function Xy(r){if(r===void 0)return!1;const a=typeof r;return a==="string"||a==="number"||a==="boolean"||a===null?!0:a!=="object"?!1:Array.isArray(r)?!0:r.buffer?!1:r.constructor&&r.constructor.name==="Object"||typeof r.toJSON=="function"}const $y=new Set(["image/svg","application/xml","application/xhtml","application/html"]),Yy=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function Ky(r=""){if(!r)return"json";const a=r.split(";").shift()||"";return Yy.test(a)?"json":$y.has(a)||a.startsWith("text/")?"text":"blob"}function Zy(r,a,x,t){const w=Qy((a==null?void 0:a.headers)??(r==null?void 0:r.headers),x==null?void 0:x.headers,t);let g;return(x!=null&&x.query||x!=null&&x.params||a!=null&&a.params||a!=null&&a.query)&&(g={...x==null?void 0:x.params,...x==null?void 0:x.query,...a==null?void 0:a.params,...a==null?void 0:a.query}),{...x,...a,query:g,params:g,headers:w}}function Qy(r,a,x){if(!a)return new x(r);const t=new x(a);if(r)for(const[w,g]of Symbol.iterator in r||Array.isArray(r)?r:new x(r))t.set(w,g);return t}async function Ss(r,a){if(a)if(Array.isArray(a))for(const x of a)await x(r);else await a(r)}const Jy=new Set([408,409,425,429,500,502,503,504]),eg=new Set([101,204,205,304]);function vf(r={}){const{fetch:a=globalThis.fetch,Headers:x=globalThis.Headers,AbortController:t=globalThis.AbortController}=r;async function w(u){const o=u.error&&u.error.name==="AbortError"&&!u.options.timeout||!1;if(u.options.retry!==!1&&!o){let y;typeof u.options.retry=="number"?y=u.options.retry:y=$u(u.options.method)?0:1;const m=u.response&&u.response.status||500;if(y>0&&(Array.isArray(u.options.retryStatusCodes)?u.options.retryStatusCodes.includes(m):Jy.has(m))){const n=typeof u.options.retryDelay=="function"?u.options.retryDelay(u):u.options.retryDelay||0;return n>0&&await new Promise(s=>setTimeout(s,n)),g(u.request,{...u.options,retry:y-1})}}const h=Wy(u);throw Error.captureStackTrace&&Error.captureStackTrace(h,g),h}const g=async function(o,h={}){const y={request:o,options:Zy(o,h,r.defaults,x),response:void 0,error:void 0};y.options.method&&(y.options.method=y.options.method.toUpperCase()),y.options.onRequest&&await Ss(y,y.options.onRequest),typeof y.request=="string"&&(y.options.baseURL&&(y.request=Uy(y.request,y.options.baseURL)),y.options.query&&(y.request=pf(y.request,y.options.query),delete y.options.query),"query"in y.options&&delete y.options.query,"params"in y.options&&delete y.options.params),y.options.body&&$u(y.options.method)&&(Xy(y.options.body)?(y.options.body=typeof y.options.body=="string"?y.options.body:JSON.stringify(y.options.body),y.options.headers=new x(y.options.headers||{}),y.options.headers.has("content-type")||y.options.headers.set("content-type","application/json"),y.options.headers.has("accept")||y.options.headers.set("accept","application/json")):("pipeTo"in y.options.body&&typeof y.options.body.pipeTo=="function"||typeof y.options.body.pipe=="function")&&("duplex"in y.options||(y.options.duplex="half")));let m;if(!y.options.signal&&y.options.timeout){const s=new t;m=setTimeout(()=>{const c=new Error("[TimeoutError]: The operation was aborted due to timeout");c.name="TimeoutError",c.code=23,s.abort(c)},y.options.timeout),y.options.signal=s.signal}try{y.response=await a(y.request,y.options)}catch(s){return y.error=s,y.options.onRequestError&&await Ss(y,y.options.onRequestError),await w(y)}finally{m&&clearTimeout(m)}if((y.response.body||y.response._bodyInit)&&!eg.has(y.response.status)&&y.options.method!=="HEAD"){const s=(y.options.parseResponse?"json":y.options.responseType)||Ky(y.response.headers.get("content-type")||"");switch(s){case"json":{const c=await y.response.text(),f=y.options.parseResponse||Ws;y.response._data=f(c);break}case"stream":{y.response._data=y.response.body||y.response._bodyInit;break}default:y.response._data=await y.response[s]()}}return y.options.onResponse&&await Ss(y,y.options.onResponse),!y.options.ignoreResponseError&&y.response.status>=400&&y.response.status<600?(y.options.onResponseError&&await Ss(y,y.options.onResponseError),await w(y)):y.response},i=async function(o,h){return(await g(o,h))._data};return i.raw=g,i.native=(...u)=>a(...u),i.create=(u={},o={})=>vf({...r,...o,defaults:{...r.defaults,...o.defaults,...u}}),i}const $s=function(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")}(),tg=$s.fetch?(...r)=>$s.fetch(...r):()=>Promise.reject(new Error("[ofetch] global.fetch is not supported!")),rg=$s.Headers,ng=$s.AbortController,og=vf({fetch:tg,Headers:rg,AbortController:ng}),sg=og,ig=()=>{var r;return((r=window==null?void 0:window.__NUXT__)==null?void 0:r.config)||{}},Ys=ig().app,ag=()=>Ys.baseURL,lg=()=>Ys.buildAssetsDir,ul=(...r)=>yf(bf(),lg(),...r),bf=(...r)=>{const a=Ys.cdnURL||Ys.baseURL;return r.length?yf(a,...r):a};globalThis.__buildAssetsURL=ul,globalThis.__publicAssetsURL=bf;globalThis.$fetch||(globalThis.$fetch=sg.create({baseURL:ag()}));function xa(r,a={},x){for(const t in r){const w=r[t],g=x?`${x}:${t}`:t;typeof w=="object"&&w!==null?xa(w,a,g):typeof w=="function"&&(a[g]=w)}return a}const ug={run:r=>r()},cg=()=>ug,_f=typeof console.createTask<"u"?console.createTask:cg;function dg(r,a){const x=a.shift(),t=_f(x);return r.reduce((w,g)=>w.then(()=>t.run(()=>g(...a))),Promise.resolve())}function fg(r,a){const x=a.shift(),t=_f(x);return Promise.all(r.map(w=>t.run(()=>w(...a))))}function qi(r,a){for(const x of[...r])x(a)}class hg{constructor(){this._hooks={},this._before=void 0,this._after=void 0,this._deprecatedMessages=void 0,this._deprecatedHooks={},this.hook=this.hook.bind(this),this.callHook=this.callHook.bind(this),this.callHookWith=this.callHookWith.bind(this)}hook(a,x,t={}){if(!a||typeof x!="function")return()=>{};const w=a;let g;for(;this._deprecatedHooks[a];)g=this._deprecatedHooks[a],a=g.to;if(g&&!t.allowDeprecated){let i=g.message;i||(i=`${w} hook has been deprecated`+(g.to?`, please use ${g.to}`:"")),this._deprecatedMessages||(this._deprecatedMessages=new Set),this._deprecatedMessages.has(i)||(console.warn(i),this._deprecatedMessages.add(i))}if(!x.name)try{Object.defineProperty(x,"name",{get:()=>"_"+a.replace(/\W+/g,"_")+"_hook_cb",configurable:!0})}catch{}return this._hooks[a]=this._hooks[a]||[],this._hooks[a].push(x),()=>{x&&(this.removeHook(a,x),x=void 0)}}hookOnce(a,x){let t,w=(...g)=>(typeof t=="function"&&t(),t=void 0,w=void 0,x(...g));return t=this.hook(a,w),t}removeHook(a,x){if(this._hooks[a]){const t=this._hooks[a].indexOf(x);t!==-1&&this._hooks[a].splice(t,1),this._hooks[a].length===0&&delete this._hooks[a]}}deprecateHook(a,x){this._deprecatedHooks[a]=typeof x=="string"?{to:x}:x;const t=this._hooks[a]||[];delete this._hooks[a];for(const w of t)this.hook(a,w)}deprecateHooks(a){Object.assign(this._deprecatedHooks,a);for(const x in a)this.deprecateHook(x,a[x])}addHooks(a){const x=xa(a),t=Object.keys(x).map(w=>this.hook(w,x[w]));return()=>{for(const w of t.splice(0,t.length))w()}}removeHooks(a){const x=xa(a);for(const t in x)this.removeHook(t,x[t])}removeAllHooks(){for(const a in this._hooks)delete this._hooks[a]}callHook(a,...x){return x.unshift(a),this.callHookWith(dg,a,...x)}callHookParallel(a,...x){return x.unshift(a),this.callHookWith(fg,a,...x)}callHookWith(a,x,...t){const w=this._before||this._after?{name:x,args:t,context:{}}:void 0;this._before&&qi(this._before,w);const g=a(x in this._hooks?[...this._hooks[x]]:[],t);return g instanceof Promise?g.finally(()=>{this._after&&w&&qi(this._after,w)}):(this._after&&w&&qi(this._after,w),g)}beforeEach(a){return this._before=this._before||[],this._before.push(a),()=>{if(this._before!==void 0){const x=this._before.indexOf(a);x!==-1&&this._before.splice(x,1)}}}afterEach(a){return this._after=this._after||[],this._after.push(a),()=>{if(this._after!==void 0){const x=this._after.indexOf(a);x!==-1&&this._after.splice(x,1)}}}}function xf(){return new hg}function pg(r={}){let a,x=!1;const t=i=>{if(a&&a!==i)throw new Error("Context conflict")};let w;if(r.asyncContext){const i=r.AsyncLocalStorage||globalThis.AsyncLocalStorage;i?w=new i:console.warn("[unctx] `AsyncLocalStorage` is not provided.")}const g=()=>{if(w){const i=w.getStore();if(i!==void 0)return i}return a};return{use:()=>{const i=g();if(i===void 0)throw new Error("Context is not available");return i},tryUse:()=>g(),set:(i,u)=>{u||t(i),a=i,x=!0},unset:()=>{a=void 0,x=!1},call:(i,u)=>{t(i),a=i;try{return w?w.run(i,u):u()}finally{x||(a=void 0)}},async callAsync(i,u){a=i;const o=()=>{a=i},h=()=>a===i?o:void 0;wa.add(h);try{const y=w?w.run(i,u):u();return x||(a=void 0),await y}finally{wa.delete(h)}}}}function mg(r={}){const a={};return{get(x,t={}){return a[x]||(a[x]=pg({...r,...t})),a[x]}}}const Ks=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof global<"u"?global:typeof window<"u"?window:{},Yu="__unctx__",yg=Ks[Yu]||(Ks[Yu]=mg()),gg=(r,a={})=>yg.get(r,a),Ku="__unctx_async_handlers__",wa=Ks[Ku]||(Ks[Ku]=new Set);function go(r){const a=[];for(const w of wa){const g=w();g&&a.push(g)}const x=()=>{for(const w of a)w()};let t=r();return t&&typeof t=="object"&&"catch"in t&&(t=t.catch(w=>{throw x(),w})),[t,x]}const vg=!1,ja=!1,bg=!1,_g={componentName:"NuxtLink",prefetch:!0,prefetchOn:{visibility:!0}},sx={value:null,errorValue:null,deep:!0},xg=null,ix={},wg="#__nuxt",wf="nuxt-app",Zu=36e5,jg="vite:preloadError";function jf(r=wf){return gg(r,{asyncContext:!1})}const Sg="__nuxt_plugin";function Eg(r){var w;let a=0;const x={_id:r.id||wf||"nuxt-app",_scope:Qh(),provide:void 0,globalName:"nuxt",versions:{get nuxt(){return"3.15.0"},get vue(){return x.vueApp.version}},payload:fn({...((w=r.ssrContext)==null?void 0:w.payload)||{},data:fn({}),state:In({}),once:new Set,_errors:fn({})}),static:{data:{}},runWithContext(g){return x._scope.active&&!Yc()?x._scope.run(()=>Qu(x,g)):Qu(x,g)},isHydrating:!0,deferHydration(){if(!x.isHydrating)return()=>{};a++;let g=!1;return()=>{if(!g&&(g=!0,a--,a===0))return x.isHydrating=!1,x.callHook("app:suspense:resolve")}},_asyncDataPromises:{},_asyncData:fn({}),_payloadRevivers:{},...r};{const g=window.__NUXT__;if(g)for(const i in g)switch(i){case"data":case"state":case"_errors":Object.assign(x.payload[i],g[i]);break;default:x.payload[i]=g[i]}}x.hooks=xf(),x.hook=x.hooks.hook,x.callHook=x.hooks.callHook,x.provide=(g,i)=>{const u="$"+g;Es(x,u,i),Es(x.vueApp.config.globalProperties,u,i)},Es(x.vueApp,"$nuxt",x),Es(x.vueApp.config.globalProperties,"$nuxt",x);{window.addEventListener(jg,i=>{x.callHook("app:chunkError",{error:i.payload}),(x.isHydrating||i.payload.message.includes("Unable to preload CSS"))&&i.preventDefault()}),window.useNuxtApp=window.useNuxtApp||Dt;const g=x.hook("app:error",(...i)=>{console.error("[nuxt] error caught during app initialization",...i)});x.hook("app:mounted",g)}const t=x.payload.config;return x.provide("config",t),x}function Tg(r,a){a.hooks&&r.hooks.addHooks(a.hooks)}async function kg(r,a){if(typeof a=="function"){const{provide:x}=await r.runWithContext(()=>a(r))||{};if(x&&typeof x=="object")for(const t in x)r.provide(t,x[t])}}async function Mg(r,a){const x=[],t=[],w=[],g=[];let i=0;async function u(o){var y;const h=((y=o.dependsOn)==null?void 0:y.filter(m=>a.some(n=>n._name===m)&&!x.includes(m)))??[];if(h.length>0)t.push([new Set(h),o]);else{const m=kg(r,o).then(async()=>{o._name&&(x.push(o._name),await Promise.all(t.map(async([n,s])=>{n.has(o._name)&&(n.delete(o._name),n.size===0&&(i++,await u(s)))})))});o.parallel?w.push(m.catch(n=>g.push(n))):await m}}for(const o of a)Tg(r,o);for(const o of a)await u(o);if(await Promise.all(w),i)for(let o=0;o{}),r,{[Sg]:!0,_name:a})}function Qu(r,a,x){const t=()=>a();return jf(r._id).set(r),r.vueApp.runWithContext(t)}function Cg(r){var x;let a;return Id()&&(a=(x=Qn())==null?void 0:x.appContext.app.$nuxt),a=a||jf(r).tryUse(),a||null}function Dt(r){const a=Cg(r);if(!a)throw new Error("[nuxt] instance unavailable");return a}function us(r){return Dt().$config}function Es(r,a,x){Object.defineProperty(r,a,{get:()=>x})}function Og(r,a){return{ctx:{table:r},matchAll:x=>Ef(x,r)}}function Sf(r){const a={};for(const x in r)a[x]=x==="dynamic"?new Map(Object.entries(r[x]).map(([t,w])=>[t,Sf(w)])):new Map(Object.entries(r[x]));return a}function Pg(r){return Og(Sf(r))}function Ef(r,a,x){r.endsWith("/")&&(r=r.slice(0,-1)||"/");const t=[];for(const[g,i]of Ju(a.wildcard))(r===g||r.startsWith(g+"/"))&&t.push(i);for(const[g,i]of Ju(a.dynamic))if(r.startsWith(g+"/")){const u="/"+r.slice(g.length).split("/").splice(2).join("/");t.push(...Ef(u,i))}const w=a.static.get(r);return w&&t.push(w),t.filter(Boolean)}function Ju(r){return[...r.entries()].sort((a,x)=>a[0].length-x[0].length)}function Xi(r){if(r===null||typeof r!="object")return!1;const a=Object.getPrototypeOf(r);return a!==null&&a!==Object.prototype&&Object.getPrototypeOf(a)!==null||Symbol.iterator in r?!1:Symbol.toStringTag in r?Object.prototype.toString.call(r)==="[object Module]":!0}function Sa(r,a,x=".",t){if(!Xi(a))return Sa(r,{},x,t);const w=Object.assign({},a);for(const g in r){if(g==="__proto__"||g==="constructor")continue;const i=r[g];i!=null&&(t&&t(w,g,i,x)||(Array.isArray(i)&&Array.isArray(w[g])?w[g]=[...i,...w[g]]:Xi(i)&&Xi(w[g])?w[g]=Sa(i,w[g],(x?`${x}.`:"")+g.toString(),t):w[g]=i))}return w}function Ag(r){return(...a)=>a.reduce((x,t)=>Sa(x,t,"",r),{})}const Tf=Ag();function Rg(r,a){try{return a in r}catch{return!1}}var Lg=Object.defineProperty,Ig=(r,a,x)=>a in r?Lg(r,a,{enumerable:!0,configurable:!0,writable:!0,value:x}):r[a]=x,Vn=(r,a,x)=>(Ig(r,typeof a!="symbol"?a+"":a,x),x);class Ea extends Error{constructor(a,x={}){super(a,x),Vn(this,"statusCode",500),Vn(this,"fatal",!1),Vn(this,"unhandled",!1),Vn(this,"statusMessage"),Vn(this,"data"),Vn(this,"cause"),x.cause&&!this.cause&&(this.cause=x.cause)}toJSON(){const a={message:this.message,statusCode:ka(this.statusCode,500)};return this.statusMessage&&(a.statusMessage=kf(this.statusMessage)),this.data!==void 0&&(a.data=this.data),a}}Vn(Ea,"__h3_error__",!0);function Ta(r){if(typeof r=="string")return new Ea(r);if(Dg(r))return r;const a=new Ea(r.message??r.statusMessage??"",{cause:r.cause||r});if(Rg(r,"stack"))try{Object.defineProperty(a,"stack",{get(){return r.stack}})}catch{try{a.stack=r.stack}catch{}}if(r.data&&(a.data=r.data),r.statusCode?a.statusCode=ka(r.statusCode,a.statusCode):r.status&&(a.statusCode=ka(r.status,a.statusCode)),r.statusMessage?a.statusMessage=r.statusMessage:r.statusText&&(a.statusMessage=r.statusText),a.statusMessage){const x=a.statusMessage;kf(a.statusMessage)!==x&&console.warn("[h3] Please prefer using `message` for longer error messages instead of `statusMessage`. In the future, `statusMessage` will be sanitized by default.")}return r.fatal!==void 0&&(a.fatal=r.fatal),r.unhandled!==void 0&&(a.unhandled=r.unhandled),a}function Dg(r){var a;return((a=r==null?void 0:r.constructor)==null?void 0:a.__h3_error__)===!0}const Fg=/[^\u0009\u0020-\u007E]/g;function kf(r=""){return r.replace(Fg,"")}function ka(r,a=200){return!r||(typeof r=="string"&&(r=Number.parseInt(r,10)),r<100||r>999)?a:r}const Mf=Symbol("layout-meta"),cs=Symbol("route"),wr=()=>{var r;return(r=Dt())==null?void 0:r.$router},hi=()=>Id()?zt(cs,Dt()._route):Dt()._route;const Ng=()=>{try{if(Dt()._processingMiddleware)return!0}catch{return!1}return!1},Ug=(r,a)=>{r||(r="/");const x=typeof r=="string"?r:"path"in r?Ma(r):wr().resolve(r).href;if(a!=null&&a.open){const{target:o="_blank",windowFeatures:h={}}=a.open,y=Object.entries(h).filter(([m,n])=>n!==void 0).map(([m,n])=>`${m.toLowerCase()}=${n}`).join(", ");return open(x,o,y),Promise.resolve()}const t=yn(x,{acceptRelative:!0}),w=(a==null?void 0:a.external)||t;if(w){if(!(a!=null&&a.external))throw new Error("Navigating to an external URL is not allowed by default. Use `navigateTo(url, { external: true })`.");const{protocol:o}=new URL(x,window.location.href);if(o&&Fy(o))throw new Error(`Cannot navigate to a URL with '${o}' protocol.`)}const g=Ng();if(!w&&g)return a!=null&&a.replace?typeof r=="string"?{path:r,replace:!0}:{...r,replace:!0}:r;const i=wr(),u=Dt();return w?(u._scope.stop(),a!=null&&a.replace?location.replace(x):location.href=x,g?u.isHydrating?new Promise(()=>{}):!1:Promise.resolve()):a!=null&&a.replace?i.replace(r):i.push(r)};function Ma(r){return pf(r.path||"",r.query||{})+(r.hash||"")}const Cf="__nuxt_error",pi=()=>Sp(Dt().payload,"error"),uo=r=>{const a=mi(r);try{const x=Dt(),t=pi();x.hooks.callHook("app:error",a),t.value=t.value||a}catch{throw a}return a},Bg=async(r={})=>{const a=Dt(),x=pi();a.callHook("app:error:cleared",r),r.redirect&&await wr().replace(r.redirect),x.value=xg},Gg=r=>!!r&&typeof r=="object"&&Cf in r,mi=r=>{const a=Ta(r);return Object.defineProperty(a,Cf,{value:!0,configurable:!1,writable:!1}),a};function ec(r){const a=Hg(r),x=new ArrayBuffer(a.length),t=new DataView(x);for(let w=0;w>16),a+=String.fromCharCode((x&65280)>>8),a+=String.fromCharCode(x&255),x=t=0);return t===12?(x>>=4,a+=String.fromCharCode(x)):t===18&&(x>>=2,a+=String.fromCharCode((x&65280)>>8),a+=String.fromCharCode(x&255)),a}const zg=-1,Wg=-2,qg=-3,Xg=-4,$g=-5,Yg=-6;function Kg(r,a){return Zg(JSON.parse(r),a)}function Zg(r,a){if(typeof r=="number")return w(r,!0);if(!Array.isArray(r)||r.length===0)throw new Error("Invalid input");const x=r,t=Array(x.length);function w(g,i=!1){if(g===zg)return;if(g===qg)return NaN;if(g===Xg)return 1/0;if(g===$g)return-1/0;if(g===Yg)return-0;if(i)throw new Error("Invalid input");if(g in t)return t[g];const u=x[g];if(!u||typeof u!="object")t[g]=u;else if(Array.isArray(u))if(typeof u[0]=="string"){const o=u[0],h=a==null?void 0:a[o];if(h)return t[g]=h(w(u[1]));switch(o){case"Date":t[g]=new Date(u[1]);break;case"Set":const y=new Set;t[g]=y;for(let s=1;s>>9)+65536).toString(16).substring(1,8).toLowerCase()}function Ca(r){if(r._h)return r._h;if(r._d)return Zs(r._d);let a=`${r.tag}:${r.textContent||r.innerHTML||""}:`;for(const x in r.props)a+=`${x}:${String(r.props[x])},`;return Zs(a)}function Pf(r,a){const x=[],t=a.resolveKeyData||(g=>g.key),w=a.resolveValueData||(g=>g.value);for(const[g,i]of Object.entries(r))x.push(...(Array.isArray(i)?i:[i]).map(u=>{const o={key:g,value:u},h=w(o);return typeof h=="object"?Pf(h,a):Array.isArray(h)?h:{[typeof a.key=="function"?a.key(o):a.key]:t(o),[typeof a.value=="function"?a.value(o):a.value]:h}}).flat());return x}function Af(r,a){return Object.entries(r).map(([x,t])=>{if(typeof t=="object"&&(t=Af(t,a)),a.resolve){const w=a.resolve({key:x,value:t});if(typeof w<"u")return w}return typeof t=="number"&&(t=t.toString()),typeof t=="string"&&a.wrapValue&&(t=t.replace(new RegExp(a.wrapValue,"g"),`\\${a.wrapValue}`),t=`${a.wrapValue}${t}${a.wrapValue}`),`${x}${a.keyValueSeparator||""}${t}`}).join(a.entrySeparator||"")}const vr=r=>({keyValue:r,metaKey:"property"}),$i=r=>({keyValue:r}),cl={appleItunesApp:{unpack:{entrySeparator:", ",resolve({key:r,value:a}){return`${hn(r)}=${a}`}}},articleExpirationTime:vr("article:expiration_time"),articleModifiedTime:vr("article:modified_time"),articlePublishedTime:vr("article:published_time"),bookReleaseDate:vr("book:release_date"),charset:{metaKey:"charset"},contentSecurityPolicy:{unpack:{entrySeparator:"; ",resolve({key:r,value:a}){return`${hn(r)} ${a}`}},metaKey:"http-equiv"},contentType:{metaKey:"http-equiv"},defaultStyle:{metaKey:"http-equiv"},fbAppId:vr("fb:app_id"),msapplicationConfig:$i("msapplication-Config"),msapplicationTileColor:$i("msapplication-TileColor"),msapplicationTileImage:$i("msapplication-TileImage"),ogAudioSecureUrl:vr("og:audio:secure_url"),ogAudioUrl:vr("og:audio"),ogImageSecureUrl:vr("og:image:secure_url"),ogImageUrl:vr("og:image"),ogSiteName:vr("og:site_name"),ogVideoSecureUrl:vr("og:video:secure_url"),ogVideoUrl:vr("og:video"),profileFirstName:vr("profile:first_name"),profileLastName:vr("profile:last_name"),profileUsername:vr("profile:username"),refresh:{metaKey:"http-equiv",unpack:{entrySeparator:";",resolve({key:r,value:a}){if(r==="seconds")return`${a}`}}},robots:{unpack:{entrySeparator:", ",resolve({key:r,value:a}){return typeof a=="boolean"?`${hn(r)}`:`${hn(r)}:${a}`}}},xUaCompatible:{metaKey:"http-equiv"}},Rf=new Set(["og","book","article","profile"]);function Lf(r){var t;const a=hn(r),x=a.indexOf(":");return Rf.has(a.substring(0,x))?"property":((t=cl[r])==null?void 0:t.metaKey)||"name"}function rv(r){var a;return((a=cl[r])==null?void 0:a.keyValue)||hn(r)}function hn(r){const a=r.replace(/([A-Z])/g,"-$1").toLowerCase(),x=a.indexOf("-"),t=a.substring(0,x);return t==="twitter"||Rf.has(t)?r.replace(/([A-Z])/g,":$1").toLowerCase():a}function Oa(r){if(Array.isArray(r))return r.map(x=>Oa(x));if(typeof r!="object"||Array.isArray(r))return r;const a={};for(const x in r)Object.prototype.hasOwnProperty.call(r,x)&&(a[hn(x)]=Oa(r[x]));return a}function nv(r,a){const x=cl[a];return a==="refresh"?`${r.seconds};url=${r.url}`:Af(Oa(r),{keyValueSeparator:"=",entrySeparator:", ",resolve({value:t,key:w}){if(t===null)return"";if(typeof t=="boolean")return`${w}`},...x==null?void 0:x.unpack})}const If=new Set(["og:image","og:video","og:audio","twitter:image"]);function Df(r){const a={};for(const x in r){if(!Object.prototype.hasOwnProperty.call(r,x))continue;const t=r[x];String(t)!=="false"&&x&&(a[x]=t)}return a}function tc(r,a){const x=Df(a),t=hn(r),w=Lf(t);if(If.has(t)){const g={};for(const i in x)Object.prototype.hasOwnProperty.call(x,i)&&(g[`${r}${i==="url"?"":`${i[0].toUpperCase()}${i.slice(1)}`}`]=x[i]);return dl(g).sort((i,u)=>{var o,h;return(((o=i[w])==null?void 0:o.length)||0)-(((h=u[w])==null?void 0:h.length)||0)})}return[{[w]:t,...x}]}function dl(r){const a=[],x={};for(const w in r){if(!Object.prototype.hasOwnProperty.call(r,w))continue;const g=r[w];if(!Array.isArray(g)){if(typeof g=="object"&&g){if(If.has(hn(w))){a.push(...tc(w,g));continue}x[w]=Df(g)}else x[w]=g;continue}for(const i of g)a.push(...typeof i=="string"?dl({[w]:i}):tc(w,i))}const t=Pf(x,{key({key:w}){return Lf(w)},value({key:w}){return w==="charset"?"charset":"content"},resolveKeyData({key:w}){return rv(w)},resolveValueData({value:w,key:g}){return w===null?"_null":typeof w=="object"?nv(w,g):typeof w=="number"?w.toString():w}});return[...a,...t].map(w=>(w.content==="_null"&&(w.content=null),w))}function ov(r,a){return r instanceof Promise?r.then(a):a(r)}function Pa(r,a,x,t){const w=t||Nf(typeof a=="object"&&typeof a!="function"&&!(a instanceof Promise)?{...a}:{[r==="script"||r==="noscript"||r==="style"?"innerHTML":"textContent"]:a},r==="templateParams"||r==="titleTemplate");if(w instanceof Promise)return w.then(i=>Pa(r,a,x,i));const g={tag:r,props:w};for(const i of Of){const u=g.props[i]!==void 0?g.props[i]:x[i];u!==void 0&&((!(i==="innerHTML"||i==="textContent"||i==="children")||Qg.has(g.tag))&&(g[i==="children"?"innerHTML":i]=u),delete g.props[i])}return g.props.body&&(g.tagPosition="bodyClose",delete g.props.body),g.tag==="script"&&typeof g.innerHTML=="object"&&(g.innerHTML=JSON.stringify(g.innerHTML),g.props.type=g.props.type||"application/json"),Array.isArray(g.props.content)?g.props.content.map(i=>({...g,props:{...g.props,content:i}})):g}function sv(r,a){var t;const x=r==="class"?" ":";";return a&&typeof a=="object"&&!Array.isArray(a)&&(a=Object.entries(a).filter(([,w])=>w).map(([w,g])=>r==="style"?`${w}:${g}`:w)),(t=String(Array.isArray(a)?a.join(x):a))==null?void 0:t.split(x).filter(w=>!!w.trim()).join(x)}function Ff(r,a,x,t){for(let w=t;w(r[g]=i,Ff(r,a,x,w)));if(!a&&!Of.has(g)){const i=String(r[g]),u=g.startsWith("data-");i==="true"||i===""?r[g]=u?"true":!0:r[g]||(u&&i==="false"?r[g]="false":delete r[g])}}}function Nf(r,a=!1){const x=Ff(r,a,Object.keys(r),0);return x instanceof Promise?x.then(()=>r):r}const iv=10;function Uf(r,a,x){for(let t=x;t(a[t]=g,Uf(r,a,t)));Array.isArray(w)?r.push(...w):r.push(w)}}function av(r){const a=[],x=r.resolvedInput;for(const w in x){if(!Object.prototype.hasOwnProperty.call(x,w))continue;const g=x[w];if(!(g===void 0||!Jg.has(w))){if(Array.isArray(g)){for(const i of g)a.push(Pa(w,i,r));continue}a.push(Pa(w,g,r))}}if(a.length===0)return[];const t=[];return ov(Uf(t,a,0),()=>t.map((w,g)=>(w._e=r._i,r.mode&&(w._m=r.mode),w._p=(r._i<{if(u===Sn||!g.includes(u))return u;const o=cv(a,u.slice(1),t);return o!==void 0?o:u}).trim(),i&&(r.endsWith(Sn)&&(r=r.slice(0,-Sn.length)),r.startsWith(Sn)&&(r=r.slice(Sn.length)),r=r.replace(dv,x).trim()),r}function sc(r,a){return r==null?a||null:typeof r=="function"?r(a):r}async function Gf(r,a={}){const x=a.document||r.resolvedOptions.document;if(!x||!r.dirty)return;const t={shouldRender:!0,tags:[]};if(await r.hooks.callHook("dom:beforeRender",t),!!t.shouldRender)return r._domUpdatePromise||(r._domUpdatePromise=new Promise(async w=>{var m;const g=(await r.resolveTags()).map(n=>({tag:n,id:Rs.has(n.tag)?Ca(n):n.tag,shouldRender:!0}));let i=r._dom;if(!i){i={elMap:{htmlAttrs:x.documentElement,bodyAttrs:x.body}};const n=new Set;for(const s of["body","head"]){const c=(m=x[s])==null?void 0:m.children;for(const f of c){const p=f.tagName.toLowerCase();if(!Rs.has(p))continue;const d={tag:p,props:await Nf(f.getAttributeNames().reduce((j,E)=>({...j,[E]:f.getAttribute(E)}),{})),innerHTML:f.innerHTML},l=Bf(d);let b=l,v=1;for(;b&&n.has(b);)b=`${l}:${v++}`;b&&(d._d=b,n.add(b)),i.elMap[f.getAttribute("data-hid")||Ca(d)]=f}}}i.pendingSideEffects={...i.sideEffects},i.sideEffects={};function u(n,s,c){const f=`${n}:${s}`;i.sideEffects[f]=c,delete i.pendingSideEffects[f]}function o({id:n,$el:s,tag:c}){const f=c.tag.endsWith("Attrs");if(i.elMap[n]=s,f||(c.textContent&&c.textContent!==s.textContent&&(s.textContent=c.textContent),c.innerHTML&&c.innerHTML!==s.innerHTML&&(s.innerHTML=c.innerHTML),u(n,"el",()=>{var p;(p=i.elMap[n])==null||p.remove(),delete i.elMap[n]})),c._eventHandlers)for(const p in c._eventHandlers)Object.prototype.hasOwnProperty.call(c._eventHandlers,p)&&s.getAttribute(`data-${p}`)!==""&&((c.tag==="bodyAttrs"?x.defaultView:s).addEventListener(p.substring(2),c._eventHandlers[p].bind(s)),s.setAttribute(`data-${p}`,""));for(const p in c.props){if(!Object.prototype.hasOwnProperty.call(c.props,p))continue;const d=c.props[p],l=`attr:${p}`;if(p==="class"){if(!d)continue;for(const b of d.split(" "))f&&u(n,`${l}:${b}`,()=>s.classList.remove(b)),!s.classList.contains(b)&&s.classList.add(b)}else if(p==="style"){if(!d)continue;for(const b of d.split(";")){const v=b.indexOf(":"),j=b.substring(0,v).trim(),E=b.substring(v+1).trim();u(n,`${l}:${j}`,()=>{s.style.removeProperty(j)}),s.style.setProperty(j,E)}}else s.getAttribute(p)!==d&&s.setAttribute(p,d===!0?"":String(d)),f&&u(n,l,()=>s.removeAttribute(p))}}const h=[],y={bodyClose:void 0,bodyOpen:void 0,head:void 0};for(const n of g){const{tag:s,shouldRender:c,id:f}=n;if(c){if(s.tag==="title"){x.title=s.textContent;continue}n.$el=n.$el||i.elMap[f],n.$el?o(n):Rs.has(s.tag)&&h.push(n)}}for(const n of h){const s=n.tag.tagPosition||"head";n.$el=x.createElement(n.tag.tag),o(n),y[s]=y[s]||x.createDocumentFragment(),y[s].appendChild(n.$el)}for(const n of g)await r.hooks.callHook("dom:renderTag",n,x,u);y.head&&x.head.appendChild(y.head),y.bodyOpen&&x.body.insertBefore(y.bodyOpen,x.body.firstChild),y.bodyClose&&x.body.appendChild(y.bodyClose);for(const n in i.pendingSideEffects)i.pendingSideEffects[n]();r._dom=i,await r.hooks.callHook("dom:rendered",{renders:g}),w()}).finally(()=>{r._domUpdatePromise=void 0,r.dirty=!1})),r._domUpdatePromise}function fv(r,a={}){const x=a.delayFn||(t=>setTimeout(t,10));return r._domDebouncedUpdatePromise=r._domDebouncedUpdatePromise||new Promise(t=>x(()=>Gf(r,a).then(()=>{delete r._domDebouncedUpdatePromise,t()})))}function hv(r){return a=>{var t,w;const x=((w=(t=a.resolvedOptions.document)==null?void 0:t.head.querySelector('script[id="unhead:payload"]'))==null?void 0:w.innerHTML)||!1;return x&&a.push(JSON.parse(x)),{mode:"client",hooks:{"entries:updated":g=>{fv(g,r)}}}}}const pv=new Set(["templateParams","htmlAttrs","bodyAttrs"]),mv={hooks:{"tag:normalise":({tag:r})=>{r.props.hid&&(r.key=r.props.hid,delete r.props.hid),r.props.vmid&&(r.key=r.props.vmid,delete r.props.vmid),r.props.key&&(r.key=r.props.key,delete r.props.key);const a=Bf(r);a&&!a.startsWith("meta:og:")&&!a.startsWith("meta:twitter:")&&delete r.key;const x=a||(r.key?`${r.tag}:${r.key}`:!1);x&&(r._d=x)},"tags:resolve":r=>{const a=Object.create(null);for(const t of r.tags){const w=(t.key?`${t.tag}:${t.key}`:t._d)||Ca(t),g=a[w];if(g){let u=t==null?void 0:t.tagDuplicateStrategy;if(!u&&pv.has(t.tag)&&(u="merge"),u==="merge"){const o=g.props;o.style&&t.props.style&&(o.style[o.style.length-1]!==";"&&(o.style+=";"),t.props.style=`${o.style} ${t.props.style}`),o.class&&t.props.class?t.props.class=`${o.class} ${t.props.class}`:o.class&&(t.props.class=o.class),a[w].props={...o,...t.props};continue}else if(t._e===g._e){g._duped=g._duped||[],t._d=`${g._d}:${g._duped.length+1}`,g._duped.push(t);continue}else if(Qs(t)>Qs(g))continue}if(!(t.innerHTML||t.textContent||Object.keys(t.props).length!==0)&&Rs.has(t.tag)){delete a[w];continue}a[w]=t}const x=[];for(const t in a){const w=a[t],g=w._duped;x.push(w),g&&(delete w._duped,x.push(...g))}r.tags=x,r.tags=r.tags.filter(t=>!(t.tag==="meta"&&(t.props.name||t.props.property)&&!t.props.content))}}},yv=new Set(["script","link","bodyAttrs"]),gv=r=>({hooks:{"tags:resolve":a=>{for(const x of a.tags){if(!yv.has(x.tag))continue;const t=x.props;for(const w in t){if(w[0]!=="o"||w[1]!=="n"||!Object.prototype.hasOwnProperty.call(t,w))continue;const g=t[w];typeof g=="function"&&(r.ssr&&rc.has(w)?t[w]=`this.dataset.${w}fired = true`:delete t[w],x._eventHandlers=x._eventHandlers||{},x._eventHandlers[w]=g)}r.ssr&&x._eventHandlers&&(x.props.src||x.props.href)&&(x.key=x.key||Zs(x.props.src||x.props.href))}},"dom:renderTag":({$el:a,tag:x})=>{var w,g;const t=a==null?void 0:a.dataset;if(t)for(const i in t){if(!i.endsWith("fired"))continue;const u=i.slice(0,-5);rc.has(u)&&((g=(w=x._eventHandlers)==null?void 0:w[u])==null||g.call(a,new Event(u.substring(2))))}}}}),vv=new Set(["link","style","script","noscript"]),bv={hooks:{"tag:normalise":({tag:r})=>{r.key&&vv.has(r.tag)&&(r.props["data-hid"]=r._h=Zs(r.key))}}},_v={mode:"server",hooks:{"tags:beforeResolve":r=>{const a={};let x=!1;for(const t of r.tags)t._m!=="server"||t.tag!=="titleTemplate"&&t.tag!=="templateParams"&&t.tag!=="title"||(a[t.tag]=t.tag==="title"||t.tag==="titleTemplate"?t.textContent:t.props,x=!0);x&&r.tags.push({tag:"script",innerHTML:JSON.stringify(a),props:{id:"unhead:payload",type:"application/json"}})}}},xv={hooks:{"tags:resolve":r=>{var a;for(const x of r.tags)if(typeof x.tagPriority=="string")for(const{prefix:t,offset:w}of lv){if(!x.tagPriority.startsWith(t))continue;const g=x.tagPriority.substring(t.length),i=(a=r.tags.find(u=>u._d===g))==null?void 0:a._p;if(i!==void 0){x._p=i+w;break}}r.tags.sort((x,t)=>{const w=Qs(x),g=Qs(t);return wg?1:x._p-t._p})}}},wv={meta:"content",link:"href",htmlAttrs:"lang"},jv=["innerHTML","textContent"],Sv=r=>({hooks:{"tags:resolve":a=>{var i;const{tags:x}=a;let t;for(let u=0;uu.tag==="title"))==null?void 0:i.textContent)||"",w,g);for(const u of x){if(u.processTemplateParams===!1)continue;const o=wv[u.tag];if(o&&typeof u.props[o]=="string")u.props[o]=Ts(u.props[o],w,g);else if(u.processTemplateParams||u.tag==="titleTemplate"||u.tag==="title")for(const h of jv)typeof u[h]=="string"&&(u[h]=Ts(u[h],w,g,u.tag==="script"&&u.props.type.endsWith("json")))}r._templateParams=w,r._separator=g},"tags:afterResolve":({tags:a})=>{let x;for(let t=0;t{const{tags:a}=r;let x,t;for(let w=0;w{for(const a of r.tags)typeof a.innerHTML=="string"&&(a.innerHTML&&(a.props.type==="application/ld+json"||a.props.type==="application/json")?a.innerHTML=a.innerHTML.replace(/{u.dirty=!0,a.callHook("entries:updated",u)};let w=0,g=[];const i=[],u={plugins:i,dirty:!1,resolvedOptions:r,hooks:a,headEntries(){return g},use(o){const h=typeof o=="function"?o(u):o;(!h.key||!i.some(y=>y.key===h.key))&&(i.push(h),ic(h.mode,x)&&a.addHooks(h.hooks||{}))},push(o,h){h==null||delete h.head;const y={_i:w++,input:o,...h};return ic(y.mode,x)&&(g.push(y),t()),{dispose(){g=g.filter(m=>m._i!==y._i),t()},patch(m){for(const n of g)n._i===y._i&&(n.input=y.input=m);t()}}},async resolveTags(){const o={tags:[],entries:[...g]};await a.callHook("entries:resolve",o);for(const h of o.entries){const y=h.resolvedInput||h.input;if(h.resolvedInput=await(h.transform?h.transform(y):y),h.resolvedInput)for(const m of await av(h)){const n={tag:m,entry:h,resolvedOptions:u.resolvedOptions};await a.callHook("tag:normalise",n),o.tags.push(n.tag)}}return await a.callHook("tags:beforeResolve",o),await a.callHook("tags:resolve",o),await a.callHook("tags:afterResolve",o),o.tags},ssr:x};return[mv,_v,gv,bv,xv,Sv,Ev,Tv,...(r==null?void 0:r.plugins)||[]].forEach(o=>u.use(o)),u.hooks.callHook("init",u),u}function Cv(){return Vf}const Ov=af[0]==="3";function Pv(r){return typeof r=="function"?r():Vt(r)}function Js(r){if(r instanceof Promise||r instanceof Date||r instanceof RegExp)return r;const a=Pv(r);if(!r||!a)return a;if(Array.isArray(a))return a.map(x=>Js(x));if(typeof a=="object"){const x={};for(const t in a)if(Object.prototype.hasOwnProperty.call(a,t)){if(t==="titleTemplate"||t[0]==="o"&&t[1]==="n"){x[t]=Vt(a[t]);continue}x[t]=Js(a[t])}return x}return a}const Av={hooks:{"entries:resolve":r=>{for(const a of r.entries)a.resolvedInput=Js(a.input)}}},Hf="usehead";function Rv(r){return{install(x){Ov&&(x.config.globalProperties.$unhead=r,x.config.globalProperties.$head=r,x.provide(Hf,r))}}.install}function Lv(r={}){r.domDelayFn=r.domDelayFn||(x=>Pr(()=>setTimeout(()=>x(),0)));const a=kv(r);return a.use(Av),a.install=Rv(a),a}const Aa=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Ra="__unhead_injection_handler__";function Iv(r){Aa[Ra]=r}function Dv(){return Ra in Aa?Aa[Ra]():zt(Hf)||Cv()}function Fv(r,a={}){const x=a.head||Dv();if(x)return x.ssr?x.push(r,a):Nv(x,r,a)}function Nv(r,a,x={}){const t=mt(!1),w=mt({});Jr(()=>{w.value=t.value?{}:Js(a)});const g=r.push(w.value,x);return Pn(w,u=>{g.patch(u)}),Qn()&&(as(()=>{g.dispose()}),Ed(()=>{t.value=!0}),Sd(()=>{t.value=!1})),g}function Uv(r,a){const{title:x,titleTemplate:t,...w}=r;return Fv({title:x,titleTemplate:t,_flatMeta:w},{...a,transform(g){const i=dl({...g._flatMeta});return delete g._flatMeta,{...g,meta:i}}})}const Bv="modulepreload",Gv=function(r,a){return new URL(r,a).href},ac={},rt=function(a,x,t){let w=Promise.resolve();if(x&&x.length>0){const i=document.getElementsByTagName("link"),u=document.querySelector("meta[property=csp-nonce]"),o=(u==null?void 0:u.nonce)||(u==null?void 0:u.getAttribute("nonce"));w=Promise.allSettled(x.map(h=>{if(h=Gv(h,t),h in ac)return;ac[h]=!0;const y=h.endsWith(".css"),m=y?'[rel="stylesheet"]':"";if(!!t)for(let c=i.length-1;c>=0;c--){const f=i[c];if(f.href===h&&(!y||f.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${h}"]${m}`))return;const s=document.createElement("link");if(s.rel=y?"stylesheet":Bv,y||(s.as="script"),s.crossOrigin="",s.href=h,o&&s.setAttribute("nonce",o),document.head.appendChild(s),y)return new Promise((c,f)=>{s.addEventListener("load",c),s.addEventListener("error",()=>f(new Error(`Unable to preload CSS for ${h}`)))})}))}function g(i){const u=new Event("vite:preloadError",{cancelable:!0});if(u.payload=i,window.dispatchEvent(u),!u.defaultPrevented)throw i}return w.then(i=>{for(const u of i||[])u.status==="rejected"&&g(u.reason);return a().catch(g)})};let Ls,Is;function Vv(){return Ls=$fetch(ul(`builds/meta/${us().app.buildId}.json`),{responseType:"json"}),Ls.then(r=>{Is=Pg(r.matcher)}).catch(r=>{console.error("[nuxt] Error fetching app manifest.",r)}),Ls}function yi(){return Ls||Vv()}async function fl(r){const a=typeof r=="string"?r:r.path;if(await yi(),!Is)return console.error("[nuxt] Error creating app manifest matcher.",Is),{};try{return Tf({},...Is.matchAll(a).reverse())}catch(x){return console.error("[nuxt] Error matching route rules.",x),{}}}async function lc(r,a={}){const x=await zv(r,a),t=Dt(),w=t._payloadCache=t._payloadCache||{};return x in w?w[x]||null:(w[x]=Wf(r).then(g=>g?zf(x).then(i=>i||(delete w[x],null)):(w[x]=null,null)),w[x])}const Hv="_payload.json";async function zv(r,a={}){const x=new URL(r,"http://localhost");if(x.host!=="localhost"||yn(x.pathname,{acceptRelative:!0}))throw new Error("Payload URL must not include hostname: "+r);const t=us(),w=a.hash||(a.fresh?Date.now():t.app.buildId),g=t.app.cdnURL,i=g&&await Wf(r)?g:t.app.baseURL;return fi(i,x.pathname,Hv+(w?`?${w}`:""))}async function zf(r){const a=fetch(r).then(x=>x.text().then(qf));try{return await a}catch(x){console.warn("[nuxt] Cannot load payload ",r,x)}return null}async function Wf(r=hi().path){const a=Dt();return r=di(r),(await yi()).prerendered.includes(r)?!0:a.runWithContext(async()=>{const t=await fl({path:r});return!!t.prerender&&!t.redirect})}let Un=null;async function Wv(){var t;if(Un)return Un;const r=document.getElementById("__NUXT_DATA__");if(!r)return{};const a=await qf(r.textContent||""),x=r.dataset.src?await zf(r.dataset.src):void 0;return Un={...a,...x,...window.__NUXT__},(t=Un.config)!=null&&t.public&&(Un.config.public=In(Un.config.public)),Un}async function qf(r){return await Kg(r,Dt()._payloadRevivers)}function qv(r,a){Dt()._payloadRevivers[r]=a}const Xv=[["NuxtError",r=>mi(r)],["EmptyShallowRef",r=>Ko(r==="_"?void 0:r==="0n"?BigInt(0):Ws(r))],["EmptyRef",r=>mt(r==="_"?void 0:r==="0n"?BigInt(0):Ws(r))],["ShallowRef",r=>Ko(r)],["ShallowReactive",r=>fn(r)],["Ref",r=>mt(r)],["Reactive",r=>In(r)]],$v=tn({name:"nuxt:revive-payload:client",order:-30,async setup(r){let a,x;for(const[t,w]of Xv)qv(t,w);Object.assign(r.payload,([a,x]=go(()=>r.runWithContext(Wv)),a=await a,x(),a)),window.__NUXT__=r.payload}}),Yv=[],Kv=tn({name:"nuxt:head",enforce:"pre",setup(r){const a=Lv({plugins:Yv});Iv(()=>Dt().vueApp._context.provides.usehead),r.vueApp.use(a);{let x=!0;const t=async()=>{x=!1,await Gf(a)};a.hooks.hook("dom:beforeRender",w=>{w.shouldRender=!x}),r.hooks.hook("page:start",()=>{x=!0}),r.hooks.hook("page:finish",()=>{r.isHydrating||t()}),r.hooks.hook("app:error",t),r.hooks.hook("app:suspense:resolve",t)}}});/*! * vue-router v4.5.0 * (c) 2024 Eduardo San Martin Morote * @license MIT - */const io=typeof document<"u";function Xf(r){return typeof r=="object"||"displayName"in r||"props"in r||"__vccOpts"in r}function Jv(r){return r.__esModule||r[Symbol.toStringTag]==="Module"||r.default&&Xf(r.default)}const xt=Object.assign;function Yi(r,a){const x={};for(const t in a){const w=a[t];x[t]=zr(w)?w.map(r):r(w)}return x}const qo=()=>{},zr=Array.isArray,$f=/#/g,e0=/&/g,t0=/\//g,r0=/=/g,n0=/\?/g,Yf=/\+/g,o0=/%5B/g,s0=/%5D/g,Kf=/%5E/g,i0=/%60/g,Zf=/%7B/g,a0=/%7C/g,Qf=/%7D/g,l0=/%20/g;function hl(r){return encodeURI(""+r).replace(a0,"|").replace(o0,"[").replace(s0,"]")}function u0(r){return hl(r).replace(Zf,"{").replace(Qf,"}").replace(Kf,"^")}function La(r){return hl(r).replace(Yf,"%2B").replace(l0,"+").replace($f,"%23").replace(e0,"%26").replace(i0,"`").replace(Zf,"{").replace(Qf,"}").replace(Kf,"^")}function c0(r){return La(r).replace(r0,"%3D")}function d0(r){return hl(r).replace($f,"%23").replace(n0,"%3F")}function f0(r){return r==null?"":d0(r).replace(t0,"%2F")}function rs(r){try{return decodeURIComponent(""+r)}catch{}return""+r}const h0=/\/$/,p0=r=>r.replace(h0,"");function Ki(r,a,x="/"){let t,w={},g="",i="";const u=a.indexOf("#");let o=a.indexOf("?");return u=0&&(o=-1),o>-1&&(t=a.slice(0,o),g=a.slice(o+1,u>-1?u:a.length),w=r(g)),u>-1&&(t=t||a.slice(0,u),i=a.slice(u,a.length)),t=v0(t??a,x),{fullPath:t+(g&&"?")+g+i,path:t,query:w,hash:rs(i)}}function m0(r,a){const x=a.query?r(a.query):"";return a.path+(x&&"?")+x+(a.hash||"")}function uc(r,a){return!a||!r.toLowerCase().startsWith(a.toLowerCase())?r:r.slice(a.length)||"/"}function y0(r,a,x){const t=a.matched.length-1,w=x.matched.length-1;return t>-1&&t===w&&_o(a.matched[t],x.matched[w])&&Jf(a.params,x.params)&&r(a.query)===r(x.query)&&a.hash===x.hash}function _o(r,a){return(r.aliasOf||r)===(a.aliasOf||a)}function Jf(r,a){if(Object.keys(r).length!==Object.keys(a).length)return!1;for(const x in r)if(!g0(r[x],a[x]))return!1;return!0}function g0(r,a){return zr(r)?cc(r,a):zr(a)?cc(a,r):r===a}function cc(r,a){return zr(a)?r.length===a.length&&r.every((x,t)=>x===a[t]):r.length===1&&r[0]===a}function v0(r,a){if(r.startsWith("/"))return r;if(!r)return a;const x=a.split("/"),t=r.split("/"),w=t[t.length-1];(w===".."||w===".")&&t.push("");let g=x.length-1,i,u;for(i=0;i1&&g--;else break;return x.slice(0,g).join("/")+"/"+t.slice(i).join("/")}const Ur={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};var ns;(function(r){r.pop="pop",r.push="push"})(ns||(ns={}));var Xo;(function(r){r.back="back",r.forward="forward",r.unknown=""})(Xo||(Xo={}));function b0(r){if(!r)if(io){const a=document.querySelector("base");r=a&&a.getAttribute("href")||"/",r=r.replace(/^\w+:\/\/[^\/]+/,"")}else r="/";return r[0]!=="/"&&r[0]!=="#"&&(r="/"+r),p0(r)}const _0=/^[^#]+#/;function x0(r,a){return r.replace(_0,"#")+a}function w0(r,a){const x=document.documentElement.getBoundingClientRect(),t=r.getBoundingClientRect();return{behavior:a.behavior,left:t.left-x.left-(a.left||0),top:t.top-x.top-(a.top||0)}}const gi=()=>({left:window.scrollX,top:window.scrollY});function j0(r){let a;if("el"in r){const x=r.el,t=typeof x=="string"&&x.startsWith("#"),w=typeof x=="string"?t?document.getElementById(x.slice(1)):document.querySelector(x):x;if(!w)return;a=w0(w,r)}else a=r;"scrollBehavior"in document.documentElement.style?window.scrollTo(a):window.scrollTo(a.left!=null?a.left:window.scrollX,a.top!=null?a.top:window.scrollY)}function dc(r,a){return(history.state?history.state.position-a:-1)+r}const Ia=new Map;function S0(r,a){Ia.set(r,a)}function E0(r){const a=Ia.get(r);return Ia.delete(r),a}let T0=()=>location.protocol+"//"+location.host;function eh(r,a){const{pathname:x,search:t,hash:w}=a,g=r.indexOf("#");if(g>-1){let u=w.includes(r.slice(g))?r.slice(g).length:1,o=w.slice(u);return o[0]!=="/"&&(o="/"+o),uc(o,"")}return uc(x,r)+t+w}function k0(r,a,x,t){let w=[],g=[],i=null;const u=({state:n})=>{const s=eh(r,location),c=x.value,f=a.value;let p=0;if(n){if(x.value=s,a.value=n,i&&i===c){i=null;return}p=f?n.position-f.position:0}else t(s);w.forEach(d=>{d(x.value,c,{delta:p,type:ns.pop,direction:p?p>0?Xo.forward:Xo.back:Xo.unknown})})};function o(){i=x.value}function h(n){w.push(n);const s=()=>{const c=w.indexOf(n);c>-1&&w.splice(c,1)};return g.push(s),s}function y(){const{history:n}=window;n.state&&n.replaceState(xt({},n.state,{scroll:gi()}),"")}function m(){for(const n of g)n();g=[],window.removeEventListener("popstate",u),window.removeEventListener("beforeunload",y)}return window.addEventListener("popstate",u),window.addEventListener("beforeunload",y,{passive:!0}),{pauseListeners:o,listen:h,destroy:m}}function fc(r,a,x,t=!1,w=!1){return{back:r,current:a,forward:x,replaced:t,position:window.history.length,scroll:w?gi():null}}function M0(r){const{history:a,location:x}=window,t={value:eh(r,x)},w={value:a.state};w.value||g(t.value,{back:null,current:t.value,forward:null,position:a.length-1,replaced:!0,scroll:null},!0);function g(o,h,y){const m=r.indexOf("#"),n=m>-1?(x.host&&document.querySelector("base")?r:r.slice(m))+o:T0()+r+o;try{a[y?"replaceState":"pushState"](h,"",n),w.value=h}catch(s){console.error(s),x[y?"replace":"assign"](n)}}function i(o,h){const y=xt({},a.state,fc(w.value.back,o,w.value.forward,!0),h,{position:w.value.position});g(o,y,!0),t.value=o}function u(o,h){const y=xt({},w.value,a.state,{forward:o,scroll:gi()});g(y.current,y,!0);const m=xt({},fc(t.value,o,null),{position:y.position+1},h);g(o,m,!1),t.value=o}return{location:t,state:w,push:u,replace:i}}function C0(r){r=b0(r);const a=M0(r),x=k0(r,a.state,a.location,a.replace);function t(g,i=!0){i||x.pauseListeners(),history.go(g)}const w=xt({location:"",base:r,go:t,createHref:x0.bind(null,r)},a,x);return Object.defineProperty(w,"location",{enumerable:!0,get:()=>a.location.value}),Object.defineProperty(w,"state",{enumerable:!0,get:()=>a.state.value}),w}function O0(r){return typeof r=="string"||r&&typeof r=="object"}function th(r){return typeof r=="string"||typeof r=="symbol"}const rh=Symbol("");var hc;(function(r){r[r.aborted=4]="aborted",r[r.cancelled=8]="cancelled",r[r.duplicated=16]="duplicated"})(hc||(hc={}));function xo(r,a){return xt(new Error,{type:r,[rh]:!0},a)}function an(r,a){return r instanceof Error&&rh in r&&(a==null||!!(r.type&a))}const pc="[^/]+?",P0={sensitive:!1,strict:!1,start:!0,end:!0},A0=/[.+*?^${}()[\]/\\]/g;function R0(r,a){const x=xt({},P0,a),t=[];let w=x.start?"^":"";const g=[];for(const h of r){const y=h.length?[]:[90];x.strict&&!h.length&&(w+="/");for(let m=0;ma.length?a.length===1&&a[0]===80?1:-1:0}function nh(r,a){let x=0;const t=r.score,w=a.score;for(;x0&&a[a.length-1]<0}const I0={type:0,value:""},D0=/[a-zA-Z0-9_]/;function F0(r){if(!r)return[[]];if(r==="/")return[[I0]];if(!r.startsWith("/"))throw new Error(`Invalid path "${r}"`);function a(s){throw new Error(`ERR (${x})/"${h}": ${s}`)}let x=0,t=x;const w=[];let g;function i(){g&&w.push(g),g=[]}let u=0,o,h="",y="";function m(){h&&(x===0?g.push({type:0,value:h}):x===1||x===2||x===3?(g.length>1&&(o==="*"||o==="+")&&a(`A repeatable param (${h}) must be alone in its segment. eg: '/:ids+.`),g.push({type:1,value:h,regexp:y,repeatable:o==="*"||o==="+",optional:o==="*"||o==="?"})):a("Invalid state to consume buffer"),h="")}function n(){h+=o}for(;u{i(b)}:qo}function i(m){if(th(m)){const n=t.get(m);n&&(t.delete(m),x.splice(x.indexOf(n),1),n.children.forEach(i),n.alias.forEach(i))}else{const n=x.indexOf(m);n>-1&&(x.splice(n,1),m.record.name&&t.delete(m.record.name),m.children.forEach(i),m.alias.forEach(i))}}function u(){return x}function o(m){const n=V0(m,x);x.splice(n,0,m),m.record.name&&!vc(m)&&t.set(m.record.name,m)}function h(m,n){let s,c={},f,p;if("name"in m&&m.name){if(s=t.get(m.name),!s)throw xo(1,{location:m});p=s.record.name,c=xt(yc(n.params,s.keys.filter(b=>!b.optional).concat(s.parent?s.parent.keys.filter(b=>b.optional):[]).map(b=>b.name)),m.params&&yc(m.params,s.keys.map(b=>b.name))),f=s.stringify(c)}else if(m.path!=null)f=m.path,s=x.find(b=>b.re.test(f)),s&&(c=s.parse(f),p=s.record.name);else{if(s=n.name?t.get(n.name):x.find(b=>b.re.test(n.path)),!s)throw xo(1,{location:m,currentLocation:n});p=s.record.name,c=xt({},n.params,m.params),f=s.stringify(c)}const d=[];let l=s;for(;l;)d.unshift(l.record),l=l.parent;return{name:p,path:f,params:c,matched:d,meta:G0(d)}}r.forEach(m=>g(m));function y(){x.length=0,t.clear()}return{addRoute:g,resolve:h,removeRoute:i,clearRoutes:y,getRoutes:u,getRecordMatcher:w}}function yc(r,a){const x={};for(const t of a)t in r&&(x[t]=r[t]);return x}function gc(r){const a={path:r.path,redirect:r.redirect,name:r.name,meta:r.meta||{},aliasOf:r.aliasOf,beforeEnter:r.beforeEnter,props:B0(r),children:r.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in r?r.components||null:r.component&&{default:r.component}};return Object.defineProperty(a,"mods",{value:{}}),a}function B0(r){const a={},x=r.props||!1;if("component"in r)a.default=x;else for(const t in r.components)a[t]=typeof x=="object"?x[t]:x;return a}function vc(r){for(;r;){if(r.record.aliasOf)return!0;r=r.parent}return!1}function G0(r){return r.reduce((a,x)=>xt(a,x.meta),{})}function bc(r,a){const x={};for(const t in r)x[t]=t in a?a[t]:r[t];return x}function V0(r,a){let x=0,t=a.length;for(;x!==t;){const g=x+t>>1;nh(r,a[g])<0?t=g:x=g+1}const w=H0(r);return w&&(t=a.lastIndexOf(w,t-1)),t}function H0(r){let a=r;for(;a=a.parent;)if(oh(a)&&nh(r,a)===0)return a}function oh({record:r}){return!!(r.name||r.components&&Object.keys(r.components).length||r.redirect)}function z0(r){const a={};if(r===""||r==="?")return a;const t=(r[0]==="?"?r.slice(1):r).split("&");for(let w=0;wg&&La(g)):[t&&La(t)]).forEach(g=>{g!==void 0&&(a+=(a.length?"&":"")+x,g!=null&&(a+="="+g))})}return a}function W0(r){const a={};for(const x in r){const t=r[x];t!==void 0&&(a[x]=zr(t)?t.map(w=>w==null?null:""+w):t==null?t:""+t)}return a}const q0=Symbol(""),xc=Symbol(""),pl=Symbol(""),ml=Symbol(""),Da=Symbol("");function Do(){let r=[];function a(t){return r.push(t),()=>{const w=r.indexOf(t);w>-1&&r.splice(w,1)}}function x(){r=[]}return{add:a,list:()=>r.slice(),reset:x}}function Sn(r,a,x,t,w,g=i=>i()){const i=t&&(t.enterCallbacks[w]=t.enterCallbacks[w]||[]);return()=>new Promise((u,o)=>{const h=n=>{n===!1?o(xo(4,{from:x,to:a})):n instanceof Error?o(n):O0(n)?o(xo(2,{from:a,to:n})):(i&&t.enterCallbacks[w]===i&&typeof n=="function"&&i.push(n),u())},y=g(()=>r.call(t&&t.instances[w],a,x,h));let m=Promise.resolve(y);r.length<3&&(m=m.then(h)),m.catch(n=>o(n))})}function Zi(r,a,x,t,w=g=>g()){const g=[];for(const i of r)for(const u in i.components){let o=i.components[u];if(!(a!=="beforeRouteEnter"&&!i.instances[u]))if(Xf(o)){const y=(o.__vccOpts||o)[a];y&&g.push(Sn(y,x,t,i,u,w))}else{let h=o();g.push(()=>h.then(y=>{if(!y)throw new Error(`Couldn't resolve component "${u}" at "${i.path}"`);const m=Jv(y)?y.default:y;i.mods[u]=y,i.components[u]=m;const s=(m.__vccOpts||m)[a];return s&&Sn(s,x,t,i,u,w)()}))}}return g}function wc(r){const a=zt(pl),x=zt(ml),t=vt(()=>{const o=Nt(r.to);return a.resolve(o)}),w=vt(()=>{const{matched:o}=t.value,{length:h}=o,y=o[h-1],m=x.matched;if(!y||!m.length)return-1;const n=m.findIndex(_o.bind(null,y));if(n>-1)return n;const s=jc(o[h-2]);return h>1&&jc(y)===s&&m[m.length-1].path!==s?m.findIndex(_o.bind(null,o[h-2])):n}),g=vt(()=>w.value>-1&&Z0(x.params,t.value.params)),i=vt(()=>w.value>-1&&w.value===x.matched.length-1&&Jf(x.params,t.value.params));function u(o={}){if(K0(o)){const h=a[Nt(r.replace)?"replace":"push"](Nt(r.to)).catch(qo);return r.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>h),h}return Promise.resolve()}return{route:t,href:vt(()=>t.value.href),isActive:g,isExactActive:i,navigate:u}}function X0(r){return r.length===1?r[0]:r}const $0=gr({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:wc,setup(r,{slots:a}){const x=Ln(wc(r)),{options:t}=zt(pl),w=vt(()=>({[Sc(r.activeClass,t.linkActiveClass,"router-link-active")]:x.isActive,[Sc(r.exactActiveClass,t.linkExactActiveClass,"router-link-exact-active")]:x.isExactActive}));return()=>{const g=a.default&&X0(a.default(x));return r.custom?g:Jt("a",{"aria-current":x.isExactActive?r.ariaCurrentValue:null,href:x.href,onClick:x.navigate,class:w.value},g)}}}),Y0=$0;function K0(r){if(!(r.metaKey||r.altKey||r.ctrlKey||r.shiftKey)&&!r.defaultPrevented&&!(r.button!==void 0&&r.button!==0)){if(r.currentTarget&&r.currentTarget.getAttribute){const a=r.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(a))return}return r.preventDefault&&r.preventDefault(),!0}}function Z0(r,a){for(const x in a){const t=a[x],w=r[x];if(typeof t=="string"){if(t!==w)return!1}else if(!zr(w)||w.length!==t.length||t.some((g,i)=>g!==w[i]))return!1}return!0}function jc(r){return r?r.aliasOf?r.aliasOf.path:r.path:""}const Sc=(r,a,x)=>r??a??x,Q0=gr({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(r,{attrs:a,slots:x}){const t=zt(Da),w=vt(()=>r.route||t.value),g=zt(xc,0),i=vt(()=>{let h=Nt(g);const{matched:y}=w.value;let m;for(;(m=y[h])&&!m.components;)h++;return h}),u=vt(()=>w.value.matched[i.value]);Lr(xc,vt(()=>i.value+1)),Lr(q0,u),Lr(Da,w);const o=mt();return On(()=>[o.value,u.value,r.name],([h,y,m],[n,s,c])=>{y&&(y.instances[m]=h,s&&s!==y&&h&&h===n&&(y.leaveGuards.size||(y.leaveGuards=s.leaveGuards),y.updateGuards.size||(y.updateGuards=s.updateGuards))),h&&y&&(!s||!_o(y,s)||!n)&&(y.enterCallbacks[m]||[]).forEach(f=>f(h))},{flush:"post"}),()=>{const h=w.value,y=r.name,m=u.value,n=m&&m.components[y];if(!n)return Ec(x.default,{Component:n,route:h});const s=m.props[y],c=s?s===!0?h.params:typeof s=="function"?s(h):s:null,p=Jt(n,xt({},c,a,{onVnodeUnmounted:d=>{d.component.isUnmounted&&(m.instances[y]=null)},ref:o}));return Ec(x.default,{Component:p,route:h})||p}}});function Ec(r,a){if(!r)return null;const x=r(a);return x.length===1?x[0]:x}const sh=Q0;function J0(r){const a=U0(r.routes,r),x=r.parseQuery||z0,t=r.stringifyQuery||_c,w=r.history,g=Do(),i=Do(),u=Do(),o=Zo(Ur);let h=Ur;io&&r.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const y=Yi.bind(null,K=>""+K),m=Yi.bind(null,f0),n=Yi.bind(null,rs);function s(K,J){let ne,ue;return th(K)?(ne=a.getRecordMatcher(K),ue=J):ue=K,a.addRoute(ue,ne)}function c(K){const J=a.getRecordMatcher(K);J&&a.removeRoute(J)}function f(){return a.getRoutes().map(K=>K.record)}function p(K){return!!a.getRecordMatcher(K)}function d(K,J){if(J=xt({},J||o.value),typeof K=="string"){const z=Ki(x,K,J.path),te=a.resolve({path:z.path},J),ce=w.createHref(z.fullPath);return xt(z,te,{params:n(te.params),hash:rs(z.hash),redirectedFrom:void 0,href:ce})}let ne;if(K.path!=null)ne=xt({},K,{path:Ki(x,K.path,J.path).path});else{const z=xt({},K.params);for(const te in z)z[te]==null&&delete z[te];ne=xt({},K,{params:m(z)}),J.params=m(J.params)}const ue=a.resolve(ne,J),ie=K.hash||"";ue.params=y(n(ue.params));const he=m0(t,xt({},K,{hash:u0(ie),path:ue.path})),Y=w.createHref(he);return xt({fullPath:he,hash:ie,query:t===_c?W0(K.query):K.query||{}},ue,{redirectedFrom:void 0,href:Y})}function l(K){return typeof K=="string"?Ki(x,K,o.value.path):xt({},K)}function b(K,J){if(h!==K)return xo(8,{from:J,to:K})}function v(K){return T(K)}function j(K){return v(xt(l(K),{replace:!0}))}function E(K){const J=K.matched[K.matched.length-1];if(J&&J.redirect){const{redirect:ne}=J;let ue=typeof ne=="function"?ne(K):ne;return typeof ue=="string"&&(ue=ue.includes("?")||ue.includes("#")?ue=l(ue):{path:ue},ue.params={}),xt({query:K.query,hash:K.hash,params:ue.path!=null?{}:K.params},ue)}}function T(K,J){const ne=h=d(K),ue=o.value,ie=K.state,he=K.force,Y=K.replace===!0,z=E(ne);if(z)return T(xt(l(z),{state:typeof z=="object"?xt({},ie,z.state):ie,force:he,replace:Y}),J||ne);const te=ne;te.redirectedFrom=J;let ce;return!he&&y0(t,ue,ne)&&(ce=xo(16,{to:te,from:ue}),ee(ue,ue,!0,!1)),(ce?Promise.resolve(ce):R(te,ue)).catch(fe=>an(fe)?an(fe,2)?fe:Q(fe):V(fe,te,ue)).then(fe=>{if(fe){if(an(fe,2))return T(xt({replace:Y},l(fe.to),{state:typeof fe.to=="object"?xt({},ie,fe.to.state):ie,force:he}),J||te)}else fe=I(te,ue,!0,Y,ie);return C(te,ue,fe),fe})}function M(K,J){const ne=b(K,J);return ne?Promise.reject(ne):Promise.resolve()}function P(K){const J=D.values().next().value;return J&&typeof J.runWithContext=="function"?J.runWithContext(K):K()}function R(K,J){let ne;const[ue,ie,he]=eb(K,J);ne=Zi(ue.reverse(),"beforeRouteLeave",K,J);for(const z of ue)z.leaveGuards.forEach(te=>{ne.push(Sn(te,K,J))});const Y=M.bind(null,K,J);return ne.push(Y),X(ne).then(()=>{ne=[];for(const z of g.list())ne.push(Sn(z,K,J));return ne.push(Y),X(ne)}).then(()=>{ne=Zi(ie,"beforeRouteUpdate",K,J);for(const z of ie)z.updateGuards.forEach(te=>{ne.push(Sn(te,K,J))});return ne.push(Y),X(ne)}).then(()=>{ne=[];for(const z of he)if(z.beforeEnter)if(zr(z.beforeEnter))for(const te of z.beforeEnter)ne.push(Sn(te,K,J));else ne.push(Sn(z.beforeEnter,K,J));return ne.push(Y),X(ne)}).then(()=>(K.matched.forEach(z=>z.enterCallbacks={}),ne=Zi(he,"beforeRouteEnter",K,J,P),ne.push(Y),X(ne))).then(()=>{ne=[];for(const z of i.list())ne.push(Sn(z,K,J));return ne.push(Y),X(ne)}).catch(z=>an(z,8)?z:Promise.reject(z))}function C(K,J,ne){u.list().forEach(ue=>P(()=>ue(K,J,ne)))}function I(K,J,ne,ue,ie){const he=b(K,J);if(he)return he;const Y=J===Ur,z=io?history.state:{};ne&&(ue||Y?w.replace(K.fullPath,xt({scroll:Y&&z&&z.scroll},ie)):w.push(K.fullPath,ie)),o.value=K,ee(K,J,ne,Y),Q()}let A;function N(){A||(A=w.listen((K,J,ne)=>{if(!G.listening)return;const ue=d(K),ie=E(ue);if(ie){T(xt(ie,{replace:!0,force:!0}),ue).catch(qo);return}h=ue;const he=o.value;io&&S0(dc(he.fullPath,ne.delta),gi()),R(ue,he).catch(Y=>an(Y,12)?Y:an(Y,2)?(T(xt(l(Y.to),{force:!0}),ue).then(z=>{an(z,20)&&!ne.delta&&ne.type===ns.pop&&w.go(-1,!1)}).catch(qo),Promise.reject()):(ne.delta&&w.go(-ne.delta,!1),V(Y,ue,he))).then(Y=>{Y=Y||I(ue,he,!1),Y&&(ne.delta&&!an(Y,8)?w.go(-ne.delta,!1):ne.type===ns.pop&&an(Y,20)&&w.go(-1,!1)),C(ue,he,Y)}).catch(qo)}))}let F=Do(),U=Do(),W;function V(K,J,ne){Q(K);const ue=U.list();return ue.length?ue.forEach(ie=>ie(K,J,ne)):console.error(K),Promise.reject(K)}function H(){return W&&o.value!==Ur?Promise.resolve():new Promise((K,J)=>{F.add([K,J])})}function Q(K){return W||(W=!K,N(),F.list().forEach(([J,ne])=>K?ne(K):J()),F.reset()),K}function ee(K,J,ne,ue){const{scrollBehavior:ie}=r;if(!io||!ie)return Promise.resolve();const he=!ne&&E0(dc(K.fullPath,0))||(ue||!ne)&&history.state&&history.state.scroll||null;return Pr().then(()=>ie(K,J,he)).then(Y=>Y&&j0(Y)).catch(Y=>V(Y,K,J))}const ae=K=>w.go(K);let k;const D=new Set,G={currentRoute:o,listening:!0,addRoute:s,removeRoute:c,clearRoutes:a.clearRoutes,hasRoute:p,getRoutes:f,resolve:d,options:r,push:v,replace:j,go:ae,back:()=>ae(-1),forward:()=>ae(1),beforeEach:g.add,beforeResolve:i.add,afterEach:u.add,onError:U.add,isReady:H,install(K){const J=this;K.component("RouterLink",Y0),K.component("RouterView",sh),K.config.globalProperties.$router=J,Object.defineProperty(K.config.globalProperties,"$route",{enumerable:!0,get:()=>Nt(o)}),io&&!k&&o.value===Ur&&(k=!0,v(w.location).catch(ie=>{}));const ne={};for(const ie in Ur)Object.defineProperty(ne,ie,{get:()=>o.value[ie],enumerable:!0});K.provide(pl,J),K.provide(ml,dn(ne)),K.provide(Da,o);const ue=K.unmount;D.add(K),K.unmount=function(){D.delete(K),D.size<1&&(h=Ur,A&&A(),A=null,o.value=Ur,k=!1,W=!1),ue()}}};function X(K){return K.reduce((J,ne)=>J.then(()=>P(ne)),Promise.resolve())}return G}function eb(r,a){const x=[],t=[],w=[],g=Math.max(a.matched.length,r.matched.length);for(let i=0;i_o(h,u))?t.push(u):x.push(u));const o=r.matched[i];o&&(a.matched.find(h=>_o(h,o))||w.push(o))}return[x,t,w]}function tb(r){return zt(ml)}const rb=/(:\w+)\([^)]+\)/g,nb=/(:\w+)[?+*]/g,ob=/:\w+/g,sb=(r,a)=>a.path.replace(rb,"$1").replace(nb,"$1").replace(ob,x=>{var t;return((t=r.params[x.slice(1)])==null?void 0:t.toString())||""}),Fa=(r,a)=>{const x=r.route.matched.find(w=>{var g;return((g=w.components)==null?void 0:g.default)===r.Component.type}),t=a??(x==null?void 0:x.meta.key)??(x&&sb(r.route,x));return typeof t=="function"?t(r.route):t},ib=(r,a)=>({default:()=>r?Jt(Hp,r===!0?{}:r,a):a});function yl(r){return Array.isArray(r)?r:[r]}const ab={layout:"empty"},lb={layout:"light"},ub={layout:"light"},cb={layout:"light"},db={layout:"light"},fb={layout:"light"},hb={layout:"light"},pb={layout:"light"},mb={layout:"light"},yb={layout:"light"},gb={layout:"light"},vb={layout:"light"},Qi=[{name:"articles-slug",path:"/articles/:slug(.*)*",component:()=>rt(()=>import("./CwMQLHqL.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9]),import.meta.url)},{name:"articles",path:"/articles",component:()=>rt(()=>import("./fN7CqnJV.js"),__vite__mapDeps([10,1,2,3,4,5,6,7,8]),import.meta.url)},{name:"card",path:"/card",meta:ab,component:()=>rt(()=>import("./B34PTUJ1.js"),[],import.meta.url)},{name:"examples-nested_transitions",path:"/examples/nested_transitions",component:()=>rt(()=>import("./D0Jts58Y.js"),[],import.meta.url)},{name:"index",path:"/",component:()=>rt(()=>import("./C5GwGpip.js"),__vite__mapDeps([11,12,8,5,4]),import.meta.url)},{name:"playground-audio",path:"/playground/audio",component:()=>rt(()=>import("./Bq6TICzc.js"),[],import.meta.url)},{name:"playground-chords",path:"/playground/chords",meta:lb,component:()=>rt(()=>import("./C4aIg6tX.js"),[],import.meta.url)},{name:"playground-conway",path:"/playground/conway",meta:ub,component:()=>rt(()=>import("./BEa6bnVp.js"),[],import.meta.url)},{name:"playground-french",path:"/playground/french",meta:cb,component:()=>rt(()=>import("./COAihTe6.js"),__vite__mapDeps([13,5,7]),import.meta.url)},{name:"playground",path:"/playground",component:()=>rt(()=>import("./xNjjsTAj.js"),__vite__mapDeps([14,12]),import.meta.url)},{name:"playground-matrix",path:"/playground/matrix",meta:db,component:()=>rt(()=>import("./rioP87fJ.js"),[],import.meta.url)},{name:"playground-metronome",path:"/playground/metronome",meta:fb,component:()=>rt(()=>import("./tAX9Dkce.js"),[],import.meta.url)},{name:"playground-midi",path:"/playground/midi",meta:hb,component:()=>rt(()=>import("./BNGAfUEf.js"),[],import.meta.url)},{name:"playground-palettes-mountains",path:"/playground/palettes/mountains",meta:pb,component:()=>rt(()=>import("./IfBlq4eo.js"),[],import.meta.url)},{name:"playground-palettes-variance",path:"/playground/palettes/variance",meta:mb,component:()=>rt(()=>import("./CEXo1ctw.js"),[],import.meta.url)},{name:"playground-plotter",path:"/playground/plotter",meta:yb,component:()=>rt(()=>import("./BPM8Blb7.js"),[],import.meta.url)},{name:"playground-tiling",path:"/playground/tiling",meta:gb,component:()=>rt(()=>import("./ClXDwuF5.js"),[],import.meta.url)},{name:"playground-waves",path:"/playground/waves",meta:vb,component:()=>rt(()=>import("./YC6j4shX.js"),[],import.meta.url)},{name:"talks",path:"/talks",component:()=>rt(()=>import("./ClDFPAdk.js"),[],import.meta.url)}],ih=(r,a,x)=>(a=a===!0?{}:a,{default:()=>{var t;return a?Jt(r,a,x):(t=x.default)==null?void 0:t.call(x)}}),bb=/(:\w+)\([^)]+\)/g,_b=/(:\w+)[?+*]/g,xb=/:\w+/g;function Tc(r){const a=(r==null?void 0:r.meta.key)??r.path.replace(bb,"$1").replace(_b,"$1").replace(xb,x=>{var t;return((t=r.params[x.slice(1)])==null?void 0:t.toString())||""});return typeof a=="function"?a(r):a}function wb(r,a){return r===a||a===Ur?!1:Tc(r)!==Tc(a)?!0:!r.matched.every((t,w)=>{var g,i;return t.components&&t.components.default===((i=(g=a.matched[w])==null?void 0:g.components)==null?void 0:i.default)})}const jb={scrollBehavior(r,a,x){var h;const t=Dt(),w=((h=jr().options)==null?void 0:h.scrollBehaviorType)??"auto";let g=x||void 0;const i=typeof r.meta.scrollToTop=="function"?r.meta.scrollToTop(r,a):r.meta.scrollToTop;if(!g&&a&&r&&i!==!1&&wb(r,a)&&(g={left:0,top:0}),r.path===a.path)return a.hash&&!r.hash?{left:0,top:0}:r.hash?{el:r.hash,top:kc(r.hash),behavior:w}:!1;const u=y=>!!(y.meta.pageTransition??ja),o=u(a)&&u(r)?"page:transition:finish":"page:finish";return new Promise(y=>{t.hooks.hookOnce(o,async()=>{await new Promise(m=>setTimeout(m,0)),r.hash&&(g={el:r.hash,top:kc(r.hash),behavior:w}),y(g)})})}};function kc(r){try{const a=document.querySelector(r);if(a)return(Number.parseFloat(getComputedStyle(a).scrollMarginTop)||0)+(Number.parseFloat(getComputedStyle(document.documentElement).scrollPaddingTop)||0)}catch{}return 0}const Sb={hashMode:!1,scrollBehaviorType:"auto"},Yr={...Sb,...jb},Eb=async r=>{var o;let a,x;if(!((o=r.meta)!=null&&o.validate))return;const t=Dt(),w=jr(),g=([a,x]=yo(()=>Promise.resolve(r.meta.validate(r))),a=await a,x(),a);if(g===!0)return;const i=mi({statusCode:g&&g.statusCode||404,statusMessage:g&&g.statusMessage||`Page Not Found: ${r.fullPath}`,data:{path:r.fullPath}}),u=w.beforeResolve(h=>{if(u(),h===r){const y=w.afterEach(async()=>{y(),await t.runWithContext(()=>lo(i)),window==null||window.history.pushState({},"",r.fullPath)});return!1}})},Tb=async r=>{let a,x;const t=([a,x]=yo(()=>fl({path:r.path})),a=await a,x(),a);if(t.redirect)return mn(t.redirect,{acceptRelative:!0})?(window.location.href=t.redirect,!1):t.redirect},kb=[Eb,Tb],$o={};function Mb(r,a,x){const{pathname:t,search:w,hash:g}=a,i=r.indexOf("#");if(i>-1){const h=g.includes(r.slice(i))?r.slice(i).length:1;let y=g.slice(h);return y[0]!=="/"&&(y="/"+y),qu(y,"")}const u=qu(t,r),o=!x||Hy(u,x,{trailingSlash:!0})?u:x;return o+(o.includes("?")?"":w)+g}const Cb=tn({name:"nuxt:router",enforce:"pre",async setup(r){var p;let a,x,t=cs().app.baseURL;const w=((p=Yr.history)==null?void 0:p.call(Yr,t))??C0(t),g=Yr.routes?([a,x]=yo(()=>Yr.routes(Qi)),a=await a,x(),a??Qi):Qi;let i;const u=J0({...Yr,scrollBehavior:(d,l,b)=>{if(l===Ur){i=b;return}if(Yr.scrollBehavior){if(u.options.scrollBehavior=Yr.scrollBehavior,"scrollRestoration"in window.history){const v=u.beforeEach(()=>{v(),window.history.scrollRestoration="manual"})}return Yr.scrollBehavior(d,Ur,i||b)}},history:w,routes:g});"scrollRestoration"in window.history&&(window.history.scrollRestoration="auto"),r.vueApp.use(u);const o=Zo(u.currentRoute.value);u.afterEach((d,l)=>{o.value=l}),Object.defineProperty(r.vueApp.config.globalProperties,"previousRoute",{get:()=>o.value});const h=Mb(t,window.location,r.payload.path),y=Zo(u.currentRoute.value),m=()=>{y.value=u.currentRoute.value};r.hook("page:finish",m),u.afterEach((d,l)=>{var b,v,j,E;((v=(b=d.matched[0])==null?void 0:b.components)==null?void 0:v.default)===((E=(j=l.matched[0])==null?void 0:j.components)==null?void 0:E.default)&&m()});const n={};for(const d in y.value)Object.defineProperty(n,d,{get:()=>y.value[d],enumerable:!0});r._route=dn(n),r._middleware=r._middleware||{global:[],named:{}};const s=pi();u.afterEach(async(d,l,b)=>{delete r._processingMiddleware,!r.isHydrating&&s.value&&await r.runWithContext(Vg),b&&await r.callHook("page:loading:end")});try{[a,x]=yo(()=>u.isReady()),await a,x()}catch(d){[a,x]=yo(()=>r.runWithContext(()=>lo(d))),await a,x()}const c=h!==u.currentRoute.value.fullPath?u.resolve(h):u.currentRoute.value;m();const f=r.payload.state._layout;return u.beforeEach(async(d,l)=>{var b;await r.callHook("page:loading:start"),d.meta=Ln(d.meta),r.isHydrating&&f&&!Pn(d.meta.layout)&&(d.meta.layout=f),r._processingMiddleware=!0;{const v=new Set([...kb,...r._middleware.global]);for(const j of d.matched){const E=j.meta.middleware;if(E)for(const T of yl(E))v.add(T)}{const j=await r.runWithContext(()=>fl({path:d.path}));if(j.appMiddleware)for(const E in j.appMiddleware)j.appMiddleware[E]?v.add(E):v.delete(E)}for(const j of v){const E=typeof j=="string"?r._middleware.named[j]||await((b=$o[j])==null?void 0:b.call($o).then(M=>M.default||M)):j;if(!E)throw new Error(`Unknown route middleware: '${j}'.`);const T=await r.runWithContext(()=>E(d,l));if(!r.payload.serverRendered&&r.isHydrating&&(T===!1||T instanceof Error)){const M=T||Ta({statusCode:404,statusMessage:`Page Not Found: ${h}`});return await r.runWithContext(()=>lo(M)),!1}if(T!==!0&&(T||T===!1))return T}}}),u.onError(async()=>{delete r._processingMiddleware,await r.callHook("page:loading:end")}),u.afterEach(async(d,l)=>{d.matched.length===0&&await r.runWithContext(()=>lo(Ta({statusCode:404,fatal:!1,statusMessage:`Page not found: ${d.fullPath}`,data:{path:d.fullPath}})))}),r.hooks.hookOnce("app:created",async()=>{try{"name"in c&&(c.name=void 0),await u.replace({...c,force:!0}),u.options.scrollBehavior=Yr.scrollBehavior}catch(d){await r.runWithContext(()=>lo(d))}}),{provide:{router:u}}}}),Na=globalThis.requestIdleCallback||(r=>{const a=Date.now(),x={didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-a))};return setTimeout(()=>{r(x)},1)}),Ob=globalThis.cancelIdleCallback||(r=>{clearTimeout(r)}),vi=r=>{const a=Dt();a.isHydrating?a.hooks.hookOnce("app:suspense:resolve",()=>{Na(()=>r())}):Na(()=>r())},Pb=tn({name:"nuxt:payload",setup(r){jr().beforeResolve(async(a,x)=>{if(a.path===x.path)return;const t=await lc(a.path);t&&Object.assign(r.static.data,t.data)}),vi(()=>{var a;r.hooks.hook("link:prefetch",async x=>{const{hostname:t}=new URL(x,window.location.href);t===window.location.hostname&&await lc(x)}),((a=navigator.connection)==null?void 0:a.effectiveType)!=="slow-2g"&&setTimeout(yi,1e3)})}}),Ab=tn(()=>{const r=jr();vi(()=>{r.beforeResolve(async()=>{await new Promise(a=>{setTimeout(a,100),requestAnimationFrame(()=>{setTimeout(a,0)})})})})}),Rb=tn(r=>{let a;async function x(){const t=await yi();a&&clearTimeout(a),a=setTimeout(x,Zu);try{const w=await $fetch(ul("builds/latest.json")+`?${Date.now()}`);w.id!==t.id&&r.hooks.callHook("app:manifest:update",w)}catch{}}vi(()=>{a=setTimeout(x,Zu)})});function Lb(r={}){const a=r.path||window.location.pathname;let x={};try{x=qs(sessionStorage.getItem("nuxt:reload")||"{}")}catch{}if(r.force||(x==null?void 0:x.path)!==a||(x==null?void 0:x.expires){t.clear()}),r.hook("app:chunkError",({error:g})=>{t.add(g)});function w(g){const u="href"in g&&g.href[0]==="#"?x.app.baseURL+g.href:fi(x.app.baseURL,g.fullPath);Lb({path:u,persistState:!0})}r.hook("app:manifest:update",()=>{a.beforeResolve(w)}),a.onError((g,i)=>{t.has(g)&&w(i)})}}),Db=dt(()=>rt(()=>import("./Cj8D-8E-.js"),__vite__mapDeps([15,6,1,2,3,4,5,16,7,8]),import.meta.url).then(r=>r.default||r.default||r)),Fb=dt(()=>rt(()=>import("./Bmi1Nzyj.js"),__vite__mapDeps([17,16,5,7,8,4]),import.meta.url).then(r=>r.default||r.default||r)),Nb=dt(()=>rt(()=>import("./DpRgmz7P.js"),__vite__mapDeps([18,5,7,8,4]),import.meta.url).then(r=>r.default||r.default||r)),Ub=dt(()=>rt(()=>import("./Bmp1QHsv.js"),__vite__mapDeps([16,5,7,8,4]),import.meta.url).then(r=>r.default||r.default||r)),Bb=dt(()=>rt(()=>import("./DAyK0gv0.js"),__vite__mapDeps([6,1,2,3,4,5]),import.meta.url).then(r=>r.default||r.default||r)),Gb=dt(()=>rt(()=>import("./LjYdWEq7.js"),__vite__mapDeps([19,1,2,3,4,5]),import.meta.url).then(r=>r.default||r.default||r)),Vb=dt(()=>rt(()=>import("./TehJYBZc.js"),__vite__mapDeps([20,3]),import.meta.url).then(r=>r.default||r.default||r)),Hb=dt(()=>rt(()=>import("./DUIBMrHd.js"),[],import.meta.url).then(r=>r.default||r.default||r)),zb=dt(()=>rt(()=>import("./BhgXj1kf.js"),[],import.meta.url).then(r=>r.default||r.default||r)),Wb=dt(()=>rt(()=>import("./BkbDttfB.js"),__vite__mapDeps([21,20,3]),import.meta.url).then(r=>r.default||r.default||r)),qb=dt(()=>rt(()=>import("./DM953cT8.js"),__vite__mapDeps([22,23,24]),import.meta.url).then(r=>r.default||r.default||r)),Xb=dt(()=>rt(()=>import("./CMz-STw3.js"),[],import.meta.url).then(r=>r.default||r.default||r)),$b=dt(()=>rt(()=>import("./D3BMvJkl.js"),__vite__mapDeps([25,23,24]),import.meta.url).then(r=>r.default||r.default||r)),Yb=dt(()=>rt(()=>import("./CTor07BM.js"),[],import.meta.url).then(r=>r.default||r.default||r)),Kb=dt(()=>rt(()=>import("./D9TPJ0pj.js"),[],import.meta.url).then(r=>r.default||r.default||r)),Zb=dt(()=>rt(()=>import("./BpMTv8gi.js"),[],import.meta.url).then(r=>r.default||r.default||r)),Qb=dt(()=>rt(()=>import("./BbQsVLx8.js"),[],import.meta.url).then(r=>r.default||r.default||r)),Jb=dt(()=>rt(()=>import("./CFcRRafH.js"),[],import.meta.url).then(r=>r.default||r.default||r)),e1=dt(()=>rt(()=>import("./VVR0hiId.js"),[],import.meta.url).then(r=>r.default||r.default||r)),t1=dt(()=>rt(()=>import("./BpPcz_md.js"),[],import.meta.url).then(r=>r.default||r.default||r)),r1=dt(()=>rt(()=>import("./BsbVb7H-.js"),[],import.meta.url).then(r=>r.default||r.default||r)),n1=dt(()=>rt(()=>import("./Bf_P86ar.js"),[],import.meta.url).then(r=>r.default||r.default||r)),o1=dt(()=>rt(()=>import("./S6IGJMqS.js"),[],import.meta.url).then(r=>r.default||r.default||r)),s1=dt(()=>rt(()=>import("./g3vSkNzf.js"),[],import.meta.url).then(r=>r.default||r.default||r)),i1=dt(()=>rt(()=>import("./DGRh_ZVz.js"),[],import.meta.url).then(r=>r.default||r.default||r)),a1=dt(()=>rt(()=>import("./B-4UjY5P.js"),[],import.meta.url).then(r=>r.default||r.default||r)),l1=dt(()=>rt(()=>import("./Bh-AXKej.js"),[],import.meta.url).then(r=>r.default||r.default||r)),u1=dt(()=>rt(()=>import("./DwMZCMB-.js"),[],import.meta.url).then(r=>r.default||r.default||r)),c1=dt(()=>rt(()=>import("./ccqoGSmZ.js"),[],import.meta.url).then(r=>r.default||r.default||r)),d1=dt(()=>rt(()=>import("./Bj1tkoTK.js"),[],import.meta.url).then(r=>r.default||r.default||r)),f1=dt(()=>rt(()=>import("./BwTjPRNa.js"),[],import.meta.url).then(r=>r.default||r.default||r)),h1=dt(()=>rt(()=>import("./DDhUQv0b.js"),[],import.meta.url).then(r=>r.default||r.default||r)),p1=dt(()=>rt(()=>import("./W7uQzGHR.js"),[],import.meta.url).then(r=>r.default||r.default||r)),m1=dt(()=>rt(()=>import("./BO4M8-0w.js"),[],import.meta.url).then(r=>r.default||r.default||r)),y1=dt(()=>rt(()=>import("./BcwrwQE9.js"),[],import.meta.url).then(r=>r.default||r.default||r)),g1=dt(()=>rt(()=>import("./CveZ9Rrq.js"),[],import.meta.url).then(r=>r.default||r.default||r)),v1=[["ContentDoc",Db],["ContentList",Fb],["ContentNavigation",Nb],["ContentQuery",Ub],["ContentRenderer",Bb],["ContentRendererMarkdown",Gb],["MDCSlot",Vb],["DocumentDrivenEmpty",Hb],["DocumentDrivenNotFound",zb],["Markdown",Wb],["ProseCode",qb],["ProseCodeInline",Xb],["ProsePre",$b],["ProseA",Yb],["ProseBlockquote",Kb],["ProseEm",Zb],["ProseH1",Qb],["ProseH2",Jb],["ProseH3",e1],["ProseH4",t1],["ProseH5",r1],["ProseH6",n1],["ProseHr",o1],["ProseImg",s1],["ProseLi",i1],["ProseOl",a1],["ProseP",l1],["ProseScript",u1],["ProseStrong",c1],["ProseTable",d1],["ProseTbody",f1],["ProseTd",h1],["ProseTh",p1],["ProseThead",m1],["ProseTr",y1],["ProseUl",g1]],b1=tn({name:"nuxt:global-components",setup(r){for(const[a,x]of v1)r.vueApp.component(a,x),r.vueApp.component("Lazy"+a,x)}}),Tn={default:dt(()=>rt(()=>import("./BrSph-fG.js"),[],import.meta.url).then(r=>r.default||r)),empty:dt(()=>rt(()=>import("./CSdKj_mO.js"),[],import.meta.url).then(r=>r.default||r)),light:dt(()=>rt(()=>import("./BmBAb7Zb.js"),[],import.meta.url).then(r=>r.default||r))},_1=tn({name:"nuxt:prefetch",setup(r){const a=jr();r.hooks.hook("app:mounted",()=>{a.beforeEach(async x=>{var w;const t=(w=x==null?void 0:x.meta)==null?void 0:w.layout;t&&typeof Tn[t]=="function"&&await Tn[t]()})}),r.hooks.hook("link:prefetch",x=>{if(mn(x))return;const t=a.resolve(x);if(!t)return;const w=t.meta.layout;let g=yl(t.meta.middleware);g=g.filter(i=>typeof i=="string");for(const i of g)typeof $o[i]=="function"&&$o[i]();w&&typeof Tn[w]=="function"&&Tn[w]()})}});var Ms=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function x1(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function Cs(r){throw new Error('Could not dynamically require "'+r+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Ji={exports:{}};/*! p5.js v1.11.2 November 28, 2024 */var Mc;function w1(){return Mc||(Mc=1,function(r,a){(function(x){r.exports=x()})(function(){var x;return function t(w,g,i){function u(y,m){if(!g[y]){if(!w[y]){var n=typeof Cs=="function"&&Cs;if(!m&&n)return n(y,!0);if(o)return o(y,!0);throw(m=new Error("Cannot find module '"+y+"'")).code="MODULE_NOT_FOUND",m}n=g[y]={exports:{}},w[y][0].call(n.exports,function(s){return u(w[y][1][s]||s)},n,n.exports,t,w,g,i)}return g[y].exports}for(var o=typeof Cs=="function"&&Cs,h=0;h>16&255,l[b++]=c>>8&255,l[b++]=255&c;return d===2&&(c=u[s.charCodeAt(f)]<<2|u[s.charCodeAt(f+1)]>>4,l[b++]=255&c),d===1&&(c=u[s.charCodeAt(f)]<<10|u[s.charCodeAt(f+1)]<<4|u[s.charCodeAt(f+2)]>>2,l[b++]=c>>8&255,l[b++]=255&c),l},g.fromByteArray=function(s){for(var c,f=s.length,p=f%3,d=[],l=0,b=f-p;l>18&63]+i[R>>12&63]+i[R>>6&63]+i[63&R]}(T));return M.join("")}(s,l,b>2]+i[c<<4&63]+"==")):p==2&&(c=(s[f-2]<<8)+s[f-1],d.push(i[c>>10]+i[c>>4&63]+i[c<<2&63]+"=")),d.join("")};for(var i=[],u=[],o=typeof Uint8Array<"u"?Uint8Array:Array,h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",y=0,m=h.length;y>>1;case"base64":return V(k).length;default:if(K)return X?-1:W(k).length;D=(""+D).toLowerCase(),K=!0}}function b(k,D,G){var X,K=!1;if((D=D===void 0||D<0?0:D)>this.length||(G=G===void 0||G>this.length?this.length:G)<=0||(G>>>=0)<=(D>>>=0))return"";for(k=k||"utf8";;)switch(k){case"hex":var J=this,de=D,ne=G,Y=J.length;(!ne||ne<0||Y=k.length){if(K)return-1;G=k.length-1}else if(G<0){if(!K)return-1;G=0}if(typeof D=="string"&&(D=n.from(D,X)),n.isBuffer(D))return D.length===0?-1:E(k,D,G,X,K);if(typeof D=="number")return D&=255,typeof Uint8Array.prototype.indexOf=="function"?(K?Uint8Array.prototype.indexOf:Uint8Array.prototype.lastIndexOf).call(k,D,G):E(k,[D],G,X,K);throw new TypeError("val must be string, number or Buffer")}function E(k,D,G,X,K){var J=1,ne=k.length,ue=D.length;if(X!==void 0&&((X=String(X).toLowerCase())==="ucs2"||X==="ucs-2"||X==="utf16le"||X==="utf-16le")){if(k.length<2||D.length<2)return-1;ne/=J=2,ue/=2,G/=2}function ie(ce,fe){return J===1?ce[fe]:ce.readUInt16BE(fe*J)}if(K)for(var he=-1,Y=G;Y>8,ue=ue%256,ie.push(ue),ie.push(ne);return ie}(D,k.length-G),k,G,X)}function P(k,D,G){G=Math.min(k.length,G);for(var X=[],K=D;K>>10&1023|55296),Y=56320|1023&Y),X.push(Y),K+=z}var te=X,ce=te.length;if(ce<=R)return String.fromCharCode.apply(String,te);for(var fe="",de=0;de"u"||typeof console.error!="function"||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(n.prototype,"parent",{enumerable:!0,get:function(){if(n.isBuffer(this))return this.buffer}}),Object.defineProperty(n.prototype,"offset",{enumerable:!0,get:function(){if(n.isBuffer(this))return this.byteOffset}}),typeof Symbol<"u"&&Symbol.species!=null&&n[Symbol.species]===n&&Object.defineProperty(n,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),n.poolSize=8192,n.from=s,Object.setPrototypeOf(n.prototype,Uint8Array.prototype),Object.setPrototypeOf(n,Uint8Array),n.alloc=function(k,D,G){return D=D,G=G,c(k=k),!(k<=0)&&D!==void 0?typeof G=="string"?m(k).fill(D,G):m(k).fill(D):m(k)},n.allocUnsafe=f,n.allocUnsafeSlow=f,n.isBuffer=function(k){return k!=null&&k._isBuffer===!0&&k!==n.prototype},n.compare=function(k,D){if(Q(k,Uint8Array)&&(k=n.from(k,k.offset,k.byteLength)),Q(D,Uint8Array)&&(D=n.from(D,D.offset,D.byteLength)),!n.isBuffer(k)||!n.isBuffer(D))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(k===D)return 0;for(var G=k.length,X=D.length,K=0,J=Math.min(G,X);Kk&&(D+=" ... "),""},h&&(n.prototype[h]=n.prototype.inspect),n.prototype.compare=function(k,D,G,X,K){if(Q(k,Uint8Array)&&(k=n.from(k,k.offset,k.byteLength)),!n.isBuffer(k))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof k);if(G===void 0&&(G=k?k.length:0),X===void 0&&(X=0),K===void 0&&(K=this.length),(D=D===void 0?0:D)<0||G>k.length||X<0||K>this.length)throw new RangeError("out of range index");if(K<=X&&G<=D)return 0;if(K<=X)return-1;if(G<=D)return 1;if(this===k)return 0;for(var J=(K>>>=0)-(X>>>=0),ne=(G>>>=0)-(D>>>=0),ue=Math.min(J,ne),ie=this.slice(X,K),he=k.slice(D,G),Y=0;Y>>=0,isFinite(G)?(G>>>=0,X===void 0&&(X="utf8")):(X=G,G=void 0)}var K=this.length-D;if((G===void 0||Kthis.length)throw new RangeError("Attempt to write outside buffer bounds");X=X||"utf8";for(var J,ne,ue,ie=!1;;)switch(X){case"hex":var he=this,Y=k,z=D,te=G,ce=(z=Number(z)||0,he.length-z);(!te||ce<(te=Number(te)))&&(te=ce),(ce=Y.length)/2k.length)throw new RangeError("Index out of range")}function A(k,D,G,X){if(G+X>k.length)throw new RangeError("Index out of range");if(G<0)throw new RangeError("Index out of range")}function N(k,D,G,X,K){return D=+D,G>>>=0,K||A(k,0,G,4),o.write(k,D,G,X,23,4),G+4}function F(k,D,G,X,K){return D=+D,G>>>=0,K||A(k,0,G,8),o.write(k,D,G,X,52,8),G+8}n.prototype.slice=function(k,D){var G=this.length,G=((k=~~k)<0?(k+=G)<0&&(k=0):G>>=0,D>>>=0,G||C(k,D,this.length);for(var X=this[k],K=1,J=0;++J>>=0,D>>>=0,G||C(k,D,this.length);for(var X=this[k+--D],K=1;0>>=0,D||C(k,1,this.length),this[k]},n.prototype.readUInt16LE=function(k,D){return k>>>=0,D||C(k,2,this.length),this[k]|this[k+1]<<8},n.prototype.readUInt16BE=function(k,D){return k>>>=0,D||C(k,2,this.length),this[k]<<8|this[k+1]},n.prototype.readUInt32LE=function(k,D){return k>>>=0,D||C(k,4,this.length),(this[k]|this[k+1]<<8|this[k+2]<<16)+16777216*this[k+3]},n.prototype.readUInt32BE=function(k,D){return k>>>=0,D||C(k,4,this.length),16777216*this[k]+(this[k+1]<<16|this[k+2]<<8|this[k+3])},n.prototype.readIntLE=function(k,D,G){k>>>=0,D>>>=0,G||C(k,D,this.length);for(var X=this[k],K=1,J=0;++J>>=0,D>>>=0,G||C(k,D,this.length);for(var X=D,K=1,J=this[k+--X];0>>=0,D||C(k,1,this.length),128&this[k]?-1*(255-this[k]+1):this[k]},n.prototype.readInt16LE=function(k,D){return k>>>=0,D||C(k,2,this.length),D=this[k]|this[k+1]<<8,32768&D?4294901760|D:D},n.prototype.readInt16BE=function(k,D){return k>>>=0,D||C(k,2,this.length),D=this[k+1]|this[k]<<8,32768&D?4294901760|D:D},n.prototype.readInt32LE=function(k,D){return k>>>=0,D||C(k,4,this.length),this[k]|this[k+1]<<8|this[k+2]<<16|this[k+3]<<24},n.prototype.readInt32BE=function(k,D){return k>>>=0,D||C(k,4,this.length),this[k]<<24|this[k+1]<<16|this[k+2]<<8|this[k+3]},n.prototype.readFloatLE=function(k,D){return k>>>=0,D||C(k,4,this.length),o.read(this,k,!0,23,4)},n.prototype.readFloatBE=function(k,D){return k>>>=0,D||C(k,4,this.length),o.read(this,k,!1,23,4)},n.prototype.readDoubleLE=function(k,D){return k>>>=0,D||C(k,8,this.length),o.read(this,k,!0,52,8)},n.prototype.readDoubleBE=function(k,D){return k>>>=0,D||C(k,8,this.length),o.read(this,k,!1,52,8)},n.prototype.writeUIntLE=function(k,D,G,X){k=+k,D>>>=0,G>>>=0,X||I(this,k,D,G,Math.pow(2,8*G)-1,0);var K=1,J=0;for(this[D]=255&k;++J>>=0,G>>>=0,X||I(this,k,D,G,Math.pow(2,8*G)-1,0);var K=G-1,J=1;for(this[D+K]=255&k;0<=--K&&(J*=256);)this[D+K]=k/J&255;return D+G},n.prototype.writeUInt8=function(k,D,G){return k=+k,D>>>=0,G||I(this,k,D,1,255,0),this[D]=255&k,D+1},n.prototype.writeUInt16LE=function(k,D,G){return k=+k,D>>>=0,G||I(this,k,D,2,65535,0),this[D]=255&k,this[D+1]=k>>>8,D+2},n.prototype.writeUInt16BE=function(k,D,G){return k=+k,D>>>=0,G||I(this,k,D,2,65535,0),this[D]=k>>>8,this[D+1]=255&k,D+2},n.prototype.writeUInt32LE=function(k,D,G){return k=+k,D>>>=0,G||I(this,k,D,4,4294967295,0),this[D+3]=k>>>24,this[D+2]=k>>>16,this[D+1]=k>>>8,this[D]=255&k,D+4},n.prototype.writeUInt32BE=function(k,D,G){return k=+k,D>>>=0,G||I(this,k,D,4,4294967295,0),this[D]=k>>>24,this[D+1]=k>>>16,this[D+2]=k>>>8,this[D+3]=255&k,D+4},n.prototype.writeIntLE=function(k,D,G,X){k=+k,D>>>=0,X||I(this,k,D,G,(X=Math.pow(2,8*G-1))-1,-X);var K=0,J=1,ne=0;for(this[D]=255&k;++K>0)-ne&255;return D+G},n.prototype.writeIntBE=function(k,D,G,X){k=+k,D>>>=0,X||I(this,k,D,G,(X=Math.pow(2,8*G-1))-1,-X);var K=G-1,J=1,ne=0;for(this[D+K]=255&k;0<=--K&&(J*=256);)k<0&&ne===0&&this[D+K+1]!==0&&(ne=1),this[D+K]=(k/J>>0)-ne&255;return D+G},n.prototype.writeInt8=function(k,D,G){return k=+k,D>>>=0,G||I(this,k,D,1,127,-128),this[D]=255&(k=k<0?255+k+1:k),D+1},n.prototype.writeInt16LE=function(k,D,G){return k=+k,D>>>=0,G||I(this,k,D,2,32767,-32768),this[D]=255&k,this[D+1]=k>>>8,D+2},n.prototype.writeInt16BE=function(k,D,G){return k=+k,D>>>=0,G||I(this,k,D,2,32767,-32768),this[D]=k>>>8,this[D+1]=255&k,D+2},n.prototype.writeInt32LE=function(k,D,G){return k=+k,D>>>=0,G||I(this,k,D,4,2147483647,-2147483648),this[D]=255&k,this[D+1]=k>>>8,this[D+2]=k>>>16,this[D+3]=k>>>24,D+4},n.prototype.writeInt32BE=function(k,D,G){return k=+k,D>>>=0,G||I(this,k,D,4,2147483647,-2147483648),this[D]=(k=k<0?4294967295+k+1:k)>>>24,this[D+1]=k>>>16,this[D+2]=k>>>8,this[D+3]=255&k,D+4},n.prototype.writeFloatLE=function(k,D,G){return N(this,k,D,!0,G)},n.prototype.writeFloatBE=function(k,D,G){return N(this,k,D,!1,G)},n.prototype.writeDoubleLE=function(k,D,G){return F(this,k,D,!0,G)},n.prototype.writeDoubleBE=function(k,D,G){return F(this,k,D,!1,G)},n.prototype.copy=function(k,D,G,X){if(!n.isBuffer(k))throw new TypeError("argument should be a Buffer");if(G=G||0,X||X===0||(X=this.length),D>=k.length&&(D=k.length),(X=0=this.length)throw new RangeError("Index out of range");if(X<0)throw new RangeError("sourceEnd out of bounds");X>this.length&&(X=this.length);var K=(X=k.length-D>>=0,G=G===void 0?this.length:G>>>0,typeof(k=k||0)=="number")for(J=D;J>6|192,63&G|128)}else if(G<65536){if((D-=3)<0)break;J.push(G>>12|224,G>>6&63|128,63&G|128)}else{if(!(G<1114112))throw new Error("Invalid code point");if((D-=4)<0)break;J.push(G>>18|240,G>>12&63|128,G>>6&63|128,63&G|128)}}return J}function V(k){return u.toByteArray(function(D){if((D=(D=D.split("=")[0]).trim().replace(U,"")).length<2)return"";for(;D.length%4!=0;)D+="=";return D}(k))}function H(k,D,G,X){for(var K=0;K=D.length||K>=k.length);++K)D[K+G]=k[K];return K}function Q(k,D){return k instanceof D||k!=null&&k.constructor!=null&&k.constructor.name!=null&&k.constructor.name===D.name}function ee(k){return k!=k}var ae=function(){for(var k="0123456789abcdef",D=new Array(256),G=0;G<16;++G)for(var X=16*G,K=0;K<16;++K)D[X+K]=k[G]+k[K];return D}()}).call(this,t("buffer").Buffer)},{"base64-js":1,buffer:4,ieee754:254}],5:[function(t,w,g){w.exports=function(i){if(typeof i!="function")throw TypeError(String(i)+" is not a function");return i}},{}],6:[function(t,w,g){var i=t("../internals/is-object");w.exports=function(u){if(i(u)||u===null)return u;throw TypeError("Can't set "+String(u)+" as a prototype")}},{"../internals/is-object":75}],7:[function(o,w,g){var i=o("../internals/well-known-symbol"),u=o("../internals/object-create"),o=o("../internals/object-define-property"),h=i("unscopables"),y=Array.prototype;y[h]==null&&o.f(y,h,{configurable:!0,value:u(null)}),w.exports=function(m){y[h][m]=!0}},{"../internals/object-create":91,"../internals/object-define-property":93,"../internals/well-known-symbol":150}],8:[function(t,w,g){var i=t("../internals/string-multibyte").charAt;w.exports=function(u,o,h){return o+(h?i(u,o).length:1)}},{"../internals/string-multibyte":125}],9:[function(t,w,g){w.exports=function(i,u,o){if(i instanceof u)return i;throw TypeError("Incorrect "+(o?o+" ":"")+"invocation")}},{}],10:[function(t,w,g){var i=t("../internals/is-object");w.exports=function(u){if(i(u))return u;throw TypeError(String(u)+" is not an object")}},{"../internals/is-object":75}],11:[function(t,w,g){w.exports=typeof ArrayBuffer<"u"&&typeof DataView<"u"},{}],12:[function(A,w,g){function i(F){return m(F)&&n(N,s(F))}var u,o=A("../internals/array-buffer-native"),h=A("../internals/descriptors"),y=A("../internals/global"),m=A("../internals/is-object"),n=A("../internals/has"),s=A("../internals/classof"),c=A("../internals/create-non-enumerable-property"),f=A("../internals/redefine"),p=A("../internals/object-define-property").f,d=A("../internals/object-get-prototype-of"),l=A("../internals/object-set-prototype-of"),R=A("../internals/well-known-symbol"),A=A("../internals/uid"),b=y.Int8Array,v=b&&b.prototype,j=y.Uint8ClampedArray,j=j&&j.prototype,E=b&&d(b),T=v&&d(v),M=Object.prototype,P=M.isPrototypeOf,R=R("toStringTag"),C=A("TYPED_ARRAY_TAG"),I=o&&!!l&&s(y.opera)!=="Opera",A=!1,N={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8};for(u in N)y[u]||(I=!1);if((!I||typeof E!="function"||E===Function.prototype)&&(E=function(){throw TypeError("Incorrect invocation")},I))for(u in N)y[u]&&l(y[u],E);if((!I||!T||T===M)&&(T=E.prototype,I))for(u in N)y[u]&&l(y[u].prototype,T);if(I&&d(j)!==T&&l(j,T),h&&!n(T,R))for(u in A=!0,p(T,R,{get:function(){return m(this)?this[C]:void 0}}),N)y[u]&&c(y[u],C,u);w.exports={NATIVE_ARRAY_BUFFER_VIEWS:I,TYPED_ARRAY_TAG:A&&C,aTypedArray:function(F){if(i(F))return F;throw TypeError("Target is not a typed array")},aTypedArrayConstructor:function(F){if(l){if(P.call(E,F))return F}else for(var U in N)if(n(N,u)&&(U=y[U],U&&(F===U||P.call(U,F))))return F;throw TypeError("Target is not a typed array constructor")},exportTypedArrayMethod:function(F,U,W){if(h){if(W)for(var V in N)V=y[V],V&&n(V.prototype,F)&&delete V.prototype[F];T[F]&&!W||f(T,F,!W&&I&&v[F]||U)}},exportTypedArrayStaticMethod:function(F,U,W){var V,H;if(h){if(l){if(W)for(V in N)(H=y[V])&&n(H,F)&&delete H[F];if(E[F]&&!W)return;try{return f(E,F,!W&&I&&b[F]||U)}catch{}}for(V in N)!(H=y[V])||H[F]&&!W||f(H,F,U)}},isView:function(F){return F=s(F),F==="DataView"||n(N,F)},isTypedArray:i,TypedArray:E,TypedArrayPrototype:T}},{"../internals/array-buffer-native":11,"../internals/classof":29,"../internals/create-non-enumerable-property":38,"../internals/descriptors":43,"../internals/global":60,"../internals/has":61,"../internals/is-object":75,"../internals/object-define-property":93,"../internals/object-get-prototype-of":98,"../internals/object-set-prototype-of":102,"../internals/redefine":110,"../internals/uid":147,"../internals/well-known-symbol":150}],13:[function(G,w,g){function i(z){return[255&z]}function u(z){return[255&z,z>>8&255]}function o(z){return[255&z,z>>8&255,z>>16&255,z>>24&255]}function h(z){return z[3]<<24|z[2]<<16|z[1]<<8|z[0]}function y(z){return J(z,23,4)}function m(z){return J(z,52,8)}function n(z,te){A(z[Q],te,{get:function(){return U(this)[te]}})}function s(ve,te,ye,fe){if(ye=M(ye),ve=U(ve),ye+te>ve.byteLength)throw K(ee);var de=U(ve.buffer).bytes,ye=ye+ve.byteOffset,ve=de.slice(ye,ye+te);return fe?ve:ve.reverse()}function c(z,te,ce,fe,de,ye){if(ce=M(ce),z=U(z),ce+te>z.byteLength)throw K(ee);for(var ve=U(z.buffer).bytes,Ee=ce+z.byteOffset,ge=fe(+de),Ne=0;Nehe;)(ue=ie[he++])in k||l(k,ue,ae[ue]);f.constructor=k}C&&R(G)!==X&&C(G,X);var P=new D(new k(2)),Y=G.setInt8;P.setInt8(0,2147483648),P.setInt8(1,2147483649),!P.getInt8(0)&&P.getInt8(1)||b(G,{setInt8:function(te,ce){Y.call(this,te,ce<<24>>24)},setUint8:function(te,ce){Y.call(this,te,ce<<24>>24)}},{unsafe:!0})}else k=function(z){j(this,k,V),z=M(z),W(this,{bytes:N.call(new Array(z),0),byteLength:z}),p||(this.byteLength=z)},D=function(z,de,ce){j(this,D,H),j(z,k,H);var fe=U(z).byteLength,de=E(de);if(de<0||fe>24},getUint8:function(z){return s(this,1,z)[0]},getInt16:function(z){return z=s(this,2,z,1>16},getUint16:function(z){return z=s(this,2,z,1>>0},getFloat32:function(z){return ne(s(this,4,z,1"+n+""}},{"../internals/require-object-coercible":115}],37:[function(t,w,g){function i(){return this}var u=t("../internals/iterators-core").IteratorPrototype,o=t("../internals/object-create"),h=t("../internals/create-property-descriptor"),y=t("../internals/set-to-string-tag"),m=t("../internals/iterators");w.exports=function(n,s,c){return s+=" Iterator",n.prototype=o(u,{next:h(1,c)}),y(n,s,!1,!0),m[s]=i,n}},{"../internals/create-property-descriptor":39,"../internals/iterators":80,"../internals/iterators-core":79,"../internals/object-create":91,"../internals/set-to-string-tag":119}],38:[function(t,w,g){var i=t("../internals/descriptors"),u=t("../internals/object-define-property"),o=t("../internals/create-property-descriptor");w.exports=i?function(h,y,m){return u.f(h,y,o(1,m))}:function(h,y,m){return h[y]=m,h}},{"../internals/create-property-descriptor":39,"../internals/descriptors":43,"../internals/object-define-property":93}],39:[function(t,w,g){w.exports=function(i,u){return{enumerable:!(1&i),configurable:!(2&i),writable:!(4&i),value:u}}},{}],40:[function(t,w,g){var i=t("../internals/to-primitive"),u=t("../internals/object-define-property"),o=t("../internals/create-property-descriptor");w.exports=function(h,y,m){y=i(y),y in h?u.f(h,y,o(0,m)):h[y]=m}},{"../internals/create-property-descriptor":39,"../internals/object-define-property":93,"../internals/to-primitive":142}],41:[function(d,w,g){function i(){return this}var u=d("../internals/export"),o=d("../internals/create-iterator-constructor"),h=d("../internals/object-get-prototype-of"),y=d("../internals/object-set-prototype-of"),m=d("../internals/set-to-string-tag"),n=d("../internals/create-non-enumerable-property"),s=d("../internals/redefine"),c=d("../internals/well-known-symbol"),f=d("../internals/is-pure"),p=d("../internals/iterators"),d=d("../internals/iterators-core"),l=d.IteratorPrototype,b=d.BUGGY_SAFARI_ITERATORS,v=c("iterator"),j="values",E="entries";w.exports=function(T,M,P,W,C,I,A){o(P,M,W);function N(k){if(k===C&&ee)return ee;if(!b&&k in H)return H[k];switch(k){case"keys":case j:case E:return function(){return new P(this,k)}}return function(){return new P(this)}}var F,U,W=M+" Iterator",V=!1,H=T.prototype,Q=H[v]||H["@@iterator"]||C&&H[C],ee=!b&&Q||N(C),ae=M=="Array"&&H.entries||Q;if(ae&&(ae=h(ae.call(new T)),l!==Object.prototype&&ae.next&&(f||h(ae)===l||(y?y(ae,l):typeof ae[v]!="function"&&n(ae,v,i)),m(ae,W,!0,!0),f&&(p[W]=i))),C==j&&Q&&Q.name!==j&&(V=!0,ee=function(){return Q.call(this)}),f&&!A||H[v]===ee||n(H,v,ee),p[M]=ee,C)if(F={values:N(j),keys:I?ee:N("keys"),entries:N(E)},A)for(U in F)!b&&!V&&U in H||s(H,U,F[U]);else u({target:M,proto:!0,forced:b||V},F);return F}},{"../internals/create-iterator-constructor":37,"../internals/create-non-enumerable-property":38,"../internals/export":50,"../internals/is-pure":76,"../internals/iterators":80,"../internals/iterators-core":79,"../internals/object-get-prototype-of":98,"../internals/object-set-prototype-of":102,"../internals/redefine":110,"../internals/set-to-string-tag":119,"../internals/well-known-symbol":150}],42:[function(t,w,g){var i=t("../internals/path"),u=t("../internals/has"),o=t("../internals/well-known-symbol-wrapped"),h=t("../internals/object-define-property").f;w.exports=function(y){var m=i.Symbol||(i.Symbol={});u(m,y)||h(m,y,{value:o.f(y)})}},{"../internals/has":61,"../internals/object-define-property":93,"../internals/path":106,"../internals/well-known-symbol-wrapped":149}],43:[function(t,w,g){t=t("../internals/fails"),w.exports=!t(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})},{"../internals/fails":51}],44:[function(u,w,g){var i=u("../internals/global"),u=u("../internals/is-object"),o=i.document,h=u(o)&&u(o.createElement);w.exports=function(y){return h?o.createElement(y):{}}},{"../internals/global":60,"../internals/is-object":75}],45:[function(t,w,g){w.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},{}],46:[function(t,w,g){t=t("../internals/engine-user-agent"),w.exports=/(iphone|ipod|ipad).*applewebkit/i.test(t)},{"../internals/engine-user-agent":47}],47:[function(t,w,g){t=t("../internals/get-built-in"),w.exports=t("navigator","userAgent")||""},{"../internals/get-built-in":57}],48:[function(o,w,g){var i,u,h=o("../internals/global"),o=o("../internals/engine-user-agent"),h=h.process,h=h&&h.versions,h=h&&h.v8;h?u=(i=h.split("."))[0]+i[1]:o&&(!(i=o.match(/Edge\/(\d+)/))||74<=i[1])&&(i=o.match(/Chrome\/(\d+)/))&&(u=i[1]),w.exports=u&&+u},{"../internals/engine-user-agent":47,"../internals/global":60}],49:[function(t,w,g){w.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},{}],50:[function(t,w,g){var i=t("../internals/global"),u=t("../internals/object-get-own-property-descriptor").f,o=t("../internals/create-non-enumerable-property"),h=t("../internals/redefine"),y=t("../internals/set-global"),m=t("../internals/copy-constructor-properties"),n=t("../internals/is-forced");w.exports=function(s,c){var f,p,d,l=s.target,b=s.global,v=s.stat,j=b?i:v?i[l]||y(l,{}):(i[l]||{}).prototype;if(j)for(f in c){if(p=c[f],d=s.noTargetGet?(d=u(j,f))&&d.value:j[f],!n(b?f:l+(v?".":"#")+f,s.forced)&&d!==void 0){if(typeof p==typeof d)continue;m(p,d)}(s.sham||d&&d.sham)&&o(p,"sham",!0),h(j,f,p,s)}}},{"../internals/copy-constructor-properties":33,"../internals/create-non-enumerable-property":38,"../internals/global":60,"../internals/is-forced":74,"../internals/object-get-own-property-descriptor":94,"../internals/redefine":110,"../internals/set-global":117}],51:[function(t,w,g){w.exports=function(i){try{return!!i()}catch{return!0}}},{}],52:[function(c,w,g){c("../modules/es.regexp.exec");var i=c("../internals/redefine"),u=c("../internals/fails"),o=c("../internals/well-known-symbol"),h=c("../internals/regexp-exec"),y=c("../internals/create-non-enumerable-property"),m=o("species"),n=!u(function(){var d=/./;return d.exec=function(){var l=[];return l.groups={a:"7"},l},"".replace(d,"$")!=="7"}),s="a".replace(/./,"$0")==="$0",c=o("replace"),f=!!/./[c]&&/./[c]("a","$0")==="",p=!u(function(){var l=/(?:)/,d=l.exec,l=(l.exec=function(){return d.apply(this,arguments)},"ab".split(l));return l.length!==2||l[0]!=="a"||l[1]!=="b"});w.exports=function(d,l,b,v){var j,E,T=o(d),M=!u(function(){var R={};return R[T]=function(){return 7},""[d](R)!=7}),P=M&&!u(function(){var R=!1,C=/a/;return d==="split"&&((C={constructor:{}}).constructor[m]=function(){return C},C.flags="",C[T]=/./[T]),C.exec=function(){return R=!0,null},C[T](""),!R});M&&P&&(d!=="replace"||n&&s&&!f)&&(d!=="split"||p)||(j=/./[T],b=(P=b(T,""[d],function(R,C,I,A,N){return C.exec===h?M&&!N?{done:!0,value:j.call(C,I,A)}:{done:!0,value:R.call(I,C,A)}:{done:!1}},{REPLACE_KEEPS_$0:s,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:f}))[0],E=P[1],i(String.prototype,d,b),i(RegExp.prototype,T,l==2?function(R,C){return E.call(R,this,C)}:function(R){return E.call(R,this)})),v&&y(RegExp.prototype[T],"sham",!0)}},{"../internals/create-non-enumerable-property":38,"../internals/fails":51,"../internals/redefine":110,"../internals/regexp-exec":112,"../internals/well-known-symbol":150,"../modules/es.regexp.exec":195}],53:[function(t,w,g){function i(y,m,n,s,c,f,p,d){for(var l,b=c,v=0,j=!!p&&h(p,d,3);v>1,j=n===23?u(2,-24)-u(2,-77):0,E=m<0||m===0&&1/m<0?1:0,T=0;for((m=i(m))!=m||m===1/0?(f=m!=m?1:0,c=b):(c=o(h(m)/y),m*(p=u(2,-c))<1&&(c--,p*=2),2<=(m+=1<=c+v?j/p:j*u(2,1-v))*p&&(c++,p/=2),b<=c+v?(f=0,c=b):1<=c+v?(f=(m*p-1)*u(2,n),c+=v):(f=m*u(2,v-1)*u(2,n),c=0));8<=n;d[T++]=255&f,f/=256,n-=8);for(c=c<>1,d=b-7,l=c-1,b=m[l--],v=127&b;for(b>>=7;0>=-d,d+=n;0"+v+""},b=function(){try{u=document.domain&&new ActiveXObject("htmlfile")}catch{}b=u?((v=u).write(l("")),v.close(),j=v.parentWindow.Object,v=null,j):(v=s("iframe"),j="java"+p+":",v.style.display="none",n.appendChild(v),v.src=String(j),(j=v.contentWindow.document).open(),j.write(l("document.F=Object")),j.close(),j.F);for(var v,j,E=y.length;E--;)delete b[f][y[E]];return b()};m[d]=!0,w.exports=Object.create||function(v,j){var E;return v!==null?(i[f]=o(v),E=new i,i[f]=null,E[d]=v):E=b(),j===void 0?E:h(E,j)}},{"../internals/an-object":10,"../internals/document-create-element":44,"../internals/enum-bug-keys":49,"../internals/hidden-keys":62,"../internals/html":64,"../internals/object-define-properties":92,"../internals/shared-key":120}],92:[function(t,w,g){var i=t("../internals/descriptors"),u=t("../internals/object-define-property"),o=t("../internals/an-object"),h=t("../internals/object-keys");w.exports=i?Object.defineProperties:function(y,m){o(y);for(var n,s=h(m),c=s.length,f=0;fc;)!i(s,n=m[c++])||~o(f,n)||f.push(n);return f}},{"../internals/array-includes":18,"../internals/has":61,"../internals/hidden-keys":62,"../internals/to-indexed-object":136}],100:[function(t,w,g){var i=t("../internals/object-keys-internal"),u=t("../internals/enum-bug-keys");w.exports=Object.keys||function(o){return i(o,u)}},{"../internals/enum-bug-keys":49,"../internals/object-keys-internal":99}],101:[function(t,w,g){var i={}.propertyIsEnumerable,u=Object.getOwnPropertyDescriptor,o=u&&!i.call({1:2},1);g.f=o?function(h){return h=u(this,h),!!h&&h.enumerable}:i},{}],102:[function(t,w,g){var i=t("../internals/an-object"),u=t("../internals/a-possible-prototype");w.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var o,h=!1,y={};try{(o=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(y,[]),h=y instanceof Array}catch{}return function(m,n){return i(m),u(n),h?o.call(m,n):m.__proto__=n,m}}():void 0)},{"../internals/a-possible-prototype":6,"../internals/an-object":10}],103:[function(t,w,g){function i(m){return function(n){for(var s,c=h(n),f=o(c),p=f.length,d=0,l=[];d{},zr=Array.isArray,$f=/#/g,Qv=/&/g,Jv=/\//g,e0=/=/g,t0=/\?/g,Yf=/\+/g,r0=/%5B/g,n0=/%5D/g,Kf=/%5E/g,o0=/%60/g,Zf=/%7B/g,s0=/%7C/g,Qf=/%7D/g,i0=/%20/g;function hl(r){return encodeURI(""+r).replace(s0,"|").replace(r0,"[").replace(n0,"]")}function a0(r){return hl(r).replace(Zf,"{").replace(Qf,"}").replace(Kf,"^")}function La(r){return hl(r).replace(Yf,"%2B").replace(i0,"+").replace($f,"%23").replace(Qv,"%26").replace(o0,"`").replace(Zf,"{").replace(Qf,"}").replace(Kf,"^")}function l0(r){return La(r).replace(e0,"%3D")}function u0(r){return hl(r).replace($f,"%23").replace(t0,"%3F")}function c0(r){return r==null?"":u0(r).replace(Jv,"%2F")}function ts(r){try{return decodeURIComponent(""+r)}catch{}return""+r}const d0=/\/$/,f0=r=>r.replace(d0,"");function Ki(r,a,x="/"){let t,w={},g="",i="";const u=a.indexOf("#");let o=a.indexOf("?");return u=0&&(o=-1),o>-1&&(t=a.slice(0,o),g=a.slice(o+1,u>-1?u:a.length),w=r(g)),u>-1&&(t=t||a.slice(0,u),i=a.slice(u,a.length)),t=y0(t??a,x),{fullPath:t+(g&&"?")+g+i,path:t,query:w,hash:ts(i)}}function h0(r,a){const x=a.query?r(a.query):"";return a.path+(x&&"?")+x+(a.hash||"")}function uc(r,a){return!a||!r.toLowerCase().startsWith(a.toLowerCase())?r:r.slice(a.length)||"/"}function p0(r,a,x){const t=a.matched.length-1,w=x.matched.length-1;return t>-1&&t===w&&xo(a.matched[t],x.matched[w])&&Jf(a.params,x.params)&&r(a.query)===r(x.query)&&a.hash===x.hash}function xo(r,a){return(r.aliasOf||r)===(a.aliasOf||a)}function Jf(r,a){if(Object.keys(r).length!==Object.keys(a).length)return!1;for(const x in r)if(!m0(r[x],a[x]))return!1;return!0}function m0(r,a){return zr(r)?cc(r,a):zr(a)?cc(a,r):r===a}function cc(r,a){return zr(a)?r.length===a.length&&r.every((x,t)=>x===a[t]):r.length===1&&r[0]===a}function y0(r,a){if(r.startsWith("/"))return r;if(!r)return a;const x=a.split("/"),t=r.split("/"),w=t[t.length-1];(w===".."||w===".")&&t.push("");let g=x.length-1,i,u;for(i=0;i1&&g--;else break;return x.slice(0,g).join("/")+"/"+t.slice(i).join("/")}const Ur={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};var rs;(function(r){r.pop="pop",r.push="push"})(rs||(rs={}));var qo;(function(r){r.back="back",r.forward="forward",r.unknown=""})(qo||(qo={}));function g0(r){if(!r)if(ao){const a=document.querySelector("base");r=a&&a.getAttribute("href")||"/",r=r.replace(/^\w+:\/\/[^\/]+/,"")}else r="/";return r[0]!=="/"&&r[0]!=="#"&&(r="/"+r),f0(r)}const v0=/^[^#]+#/;function b0(r,a){return r.replace(v0,"#")+a}function _0(r,a){const x=document.documentElement.getBoundingClientRect(),t=r.getBoundingClientRect();return{behavior:a.behavior,left:t.left-x.left-(a.left||0),top:t.top-x.top-(a.top||0)}}const gi=()=>({left:window.scrollX,top:window.scrollY});function x0(r){let a;if("el"in r){const x=r.el,t=typeof x=="string"&&x.startsWith("#"),w=typeof x=="string"?t?document.getElementById(x.slice(1)):document.querySelector(x):x;if(!w)return;a=_0(w,r)}else a=r;"scrollBehavior"in document.documentElement.style?window.scrollTo(a):window.scrollTo(a.left!=null?a.left:window.scrollX,a.top!=null?a.top:window.scrollY)}function dc(r,a){return(history.state?history.state.position-a:-1)+r}const Ia=new Map;function w0(r,a){Ia.set(r,a)}function j0(r){const a=Ia.get(r);return Ia.delete(r),a}let S0=()=>location.protocol+"//"+location.host;function eh(r,a){const{pathname:x,search:t,hash:w}=a,g=r.indexOf("#");if(g>-1){let u=w.includes(r.slice(g))?r.slice(g).length:1,o=w.slice(u);return o[0]!=="/"&&(o="/"+o),uc(o,"")}return uc(x,r)+t+w}function E0(r,a,x,t){let w=[],g=[],i=null;const u=({state:n})=>{const s=eh(r,location),c=x.value,f=a.value;let p=0;if(n){if(x.value=s,a.value=n,i&&i===c){i=null;return}p=f?n.position-f.position:0}else t(s);w.forEach(d=>{d(x.value,c,{delta:p,type:rs.pop,direction:p?p>0?qo.forward:qo.back:qo.unknown})})};function o(){i=x.value}function h(n){w.push(n);const s=()=>{const c=w.indexOf(n);c>-1&&w.splice(c,1)};return g.push(s),s}function y(){const{history:n}=window;n.state&&n.replaceState(wt({},n.state,{scroll:gi()}),"")}function m(){for(const n of g)n();g=[],window.removeEventListener("popstate",u),window.removeEventListener("beforeunload",y)}return window.addEventListener("popstate",u),window.addEventListener("beforeunload",y,{passive:!0}),{pauseListeners:o,listen:h,destroy:m}}function fc(r,a,x,t=!1,w=!1){return{back:r,current:a,forward:x,replaced:t,position:window.history.length,scroll:w?gi():null}}function T0(r){const{history:a,location:x}=window,t={value:eh(r,x)},w={value:a.state};w.value||g(t.value,{back:null,current:t.value,forward:null,position:a.length-1,replaced:!0,scroll:null},!0);function g(o,h,y){const m=r.indexOf("#"),n=m>-1?(x.host&&document.querySelector("base")?r:r.slice(m))+o:S0()+r+o;try{a[y?"replaceState":"pushState"](h,"",n),w.value=h}catch(s){console.error(s),x[y?"replace":"assign"](n)}}function i(o,h){const y=wt({},a.state,fc(w.value.back,o,w.value.forward,!0),h,{position:w.value.position});g(o,y,!0),t.value=o}function u(o,h){const y=wt({},w.value,a.state,{forward:o,scroll:gi()});g(y.current,y,!0);const m=wt({},fc(t.value,o,null),{position:y.position+1},h);g(o,m,!1),t.value=o}return{location:t,state:w,push:u,replace:i}}function k0(r){r=g0(r);const a=T0(r),x=E0(r,a.state,a.location,a.replace);function t(g,i=!0){i||x.pauseListeners(),history.go(g)}const w=wt({location:"",base:r,go:t,createHref:b0.bind(null,r)},a,x);return Object.defineProperty(w,"location",{enumerable:!0,get:()=>a.location.value}),Object.defineProperty(w,"state",{enumerable:!0,get:()=>a.state.value}),w}function M0(r){return typeof r=="string"||r&&typeof r=="object"}function th(r){return typeof r=="string"||typeof r=="symbol"}const rh=Symbol("");var hc;(function(r){r[r.aborted=4]="aborted",r[r.cancelled=8]="cancelled",r[r.duplicated=16]="duplicated"})(hc||(hc={}));function wo(r,a){return wt(new Error,{type:r,[rh]:!0},a)}function an(r,a){return r instanceof Error&&rh in r&&(a==null||!!(r.type&a))}const pc="[^/]+?",C0={sensitive:!1,strict:!1,start:!0,end:!0},O0=/[.+*?^${}()[\]/\\]/g;function P0(r,a){const x=wt({},C0,a),t=[];let w=x.start?"^":"";const g=[];for(const h of r){const y=h.length?[]:[90];x.strict&&!h.length&&(w+="/");for(let m=0;ma.length?a.length===1&&a[0]===80?1:-1:0}function nh(r,a){let x=0;const t=r.score,w=a.score;for(;x0&&a[a.length-1]<0}const R0={type:0,value:""},L0=/[a-zA-Z0-9_]/;function I0(r){if(!r)return[[]];if(r==="/")return[[R0]];if(!r.startsWith("/"))throw new Error(`Invalid path "${r}"`);function a(s){throw new Error(`ERR (${x})/"${h}": ${s}`)}let x=0,t=x;const w=[];let g;function i(){g&&w.push(g),g=[]}let u=0,o,h="",y="";function m(){h&&(x===0?g.push({type:0,value:h}):x===1||x===2||x===3?(g.length>1&&(o==="*"||o==="+")&&a(`A repeatable param (${h}) must be alone in its segment. eg: '/:ids+.`),g.push({type:1,value:h,regexp:y,repeatable:o==="*"||o==="+",optional:o==="*"||o==="?"})):a("Invalid state to consume buffer"),h="")}function n(){h+=o}for(;u{i(b)}:Wo}function i(m){if(th(m)){const n=t.get(m);n&&(t.delete(m),x.splice(x.indexOf(n),1),n.children.forEach(i),n.alias.forEach(i))}else{const n=x.indexOf(m);n>-1&&(x.splice(n,1),m.record.name&&t.delete(m.record.name),m.children.forEach(i),m.alias.forEach(i))}}function u(){return x}function o(m){const n=B0(m,x);x.splice(n,0,m),m.record.name&&!vc(m)&&t.set(m.record.name,m)}function h(m,n){let s,c={},f,p;if("name"in m&&m.name){if(s=t.get(m.name),!s)throw wo(1,{location:m});p=s.record.name,c=wt(yc(n.params,s.keys.filter(b=>!b.optional).concat(s.parent?s.parent.keys.filter(b=>b.optional):[]).map(b=>b.name)),m.params&&yc(m.params,s.keys.map(b=>b.name))),f=s.stringify(c)}else if(m.path!=null)f=m.path,s=x.find(b=>b.re.test(f)),s&&(c=s.parse(f),p=s.record.name);else{if(s=n.name?t.get(n.name):x.find(b=>b.re.test(n.path)),!s)throw wo(1,{location:m,currentLocation:n});p=s.record.name,c=wt({},n.params,m.params),f=s.stringify(c)}const d=[];let l=s;for(;l;)d.unshift(l.record),l=l.parent;return{name:p,path:f,params:c,matched:d,meta:U0(d)}}r.forEach(m=>g(m));function y(){x.length=0,t.clear()}return{addRoute:g,resolve:h,removeRoute:i,clearRoutes:y,getRoutes:u,getRecordMatcher:w}}function yc(r,a){const x={};for(const t of a)t in r&&(x[t]=r[t]);return x}function gc(r){const a={path:r.path,redirect:r.redirect,name:r.name,meta:r.meta||{},aliasOf:r.aliasOf,beforeEnter:r.beforeEnter,props:N0(r),children:r.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in r?r.components||null:r.component&&{default:r.component}};return Object.defineProperty(a,"mods",{value:{}}),a}function N0(r){const a={},x=r.props||!1;if("component"in r)a.default=x;else for(const t in r.components)a[t]=typeof x=="object"?x[t]:x;return a}function vc(r){for(;r;){if(r.record.aliasOf)return!0;r=r.parent}return!1}function U0(r){return r.reduce((a,x)=>wt(a,x.meta),{})}function bc(r,a){const x={};for(const t in r)x[t]=t in a?a[t]:r[t];return x}function B0(r,a){let x=0,t=a.length;for(;x!==t;){const g=x+t>>1;nh(r,a[g])<0?t=g:x=g+1}const w=G0(r);return w&&(t=a.lastIndexOf(w,t-1)),t}function G0(r){let a=r;for(;a=a.parent;)if(oh(a)&&nh(r,a)===0)return a}function oh({record:r}){return!!(r.name||r.components&&Object.keys(r.components).length||r.redirect)}function V0(r){const a={};if(r===""||r==="?")return a;const t=(r[0]==="?"?r.slice(1):r).split("&");for(let w=0;wg&&La(g)):[t&&La(t)]).forEach(g=>{g!==void 0&&(a+=(a.length?"&":"")+x,g!=null&&(a+="="+g))})}return a}function H0(r){const a={};for(const x in r){const t=r[x];t!==void 0&&(a[x]=zr(t)?t.map(w=>w==null?null:""+w):t==null?t:""+t)}return a}const z0=Symbol(""),xc=Symbol(""),pl=Symbol(""),ml=Symbol(""),Da=Symbol("");function Do(){let r=[];function a(t){return r.push(t),()=>{const w=r.indexOf(t);w>-1&&r.splice(w,1)}}function x(){r=[]}return{add:a,list:()=>r.slice(),reset:x}}function En(r,a,x,t,w,g=i=>i()){const i=t&&(t.enterCallbacks[w]=t.enterCallbacks[w]||[]);return()=>new Promise((u,o)=>{const h=n=>{n===!1?o(wo(4,{from:x,to:a})):n instanceof Error?o(n):M0(n)?o(wo(2,{from:a,to:n})):(i&&t.enterCallbacks[w]===i&&typeof n=="function"&&i.push(n),u())},y=g(()=>r.call(t&&t.instances[w],a,x,h));let m=Promise.resolve(y);r.length<3&&(m=m.then(h)),m.catch(n=>o(n))})}function Zi(r,a,x,t,w=g=>g()){const g=[];for(const i of r)for(const u in i.components){let o=i.components[u];if(!(a!=="beforeRouteEnter"&&!i.instances[u]))if(Xf(o)){const y=(o.__vccOpts||o)[a];y&&g.push(En(y,x,t,i,u,w))}else{let h=o();g.push(()=>h.then(y=>{if(!y)throw new Error(`Couldn't resolve component "${u}" at "${i.path}"`);const m=Zv(y)?y.default:y;i.mods[u]=y,i.components[u]=m;const s=(m.__vccOpts||m)[a];return s&&En(s,x,t,i,u,w)()}))}}return g}function wc(r){const a=zt(pl),x=zt(ml),t=bt(()=>{const o=Vt(r.to);return a.resolve(o)}),w=bt(()=>{const{matched:o}=t.value,{length:h}=o,y=o[h-1],m=x.matched;if(!y||!m.length)return-1;const n=m.findIndex(xo.bind(null,y));if(n>-1)return n;const s=jc(o[h-2]);return h>1&&jc(y)===s&&m[m.length-1].path!==s?m.findIndex(xo.bind(null,o[h-2])):n}),g=bt(()=>w.value>-1&&Y0(x.params,t.value.params)),i=bt(()=>w.value>-1&&w.value===x.matched.length-1&&Jf(x.params,t.value.params));function u(o={}){if($0(o)){const h=a[Vt(r.replace)?"replace":"push"](Vt(r.to)).catch(Wo);return r.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>h),h}return Promise.resolve()}return{route:t,href:bt(()=>t.value.href),isActive:g,isExactActive:i,navigate:u}}function W0(r){return r.length===1?r[0]:r}const q0=gr({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:wc,setup(r,{slots:a}){const x=In(wc(r)),{options:t}=zt(pl),w=bt(()=>({[Sc(r.activeClass,t.linkActiveClass,"router-link-active")]:x.isActive,[Sc(r.exactActiveClass,t.linkExactActiveClass,"router-link-exact-active")]:x.isExactActive}));return()=>{const g=a.default&&W0(a.default(x));return r.custom?g:Jt("a",{"aria-current":x.isExactActive?r.ariaCurrentValue:null,href:x.href,onClick:x.navigate,class:w.value},g)}}}),X0=q0;function $0(r){if(!(r.metaKey||r.altKey||r.ctrlKey||r.shiftKey)&&!r.defaultPrevented&&!(r.button!==void 0&&r.button!==0)){if(r.currentTarget&&r.currentTarget.getAttribute){const a=r.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(a))return}return r.preventDefault&&r.preventDefault(),!0}}function Y0(r,a){for(const x in a){const t=a[x],w=r[x];if(typeof t=="string"){if(t!==w)return!1}else if(!zr(w)||w.length!==t.length||t.some((g,i)=>g!==w[i]))return!1}return!0}function jc(r){return r?r.aliasOf?r.aliasOf.path:r.path:""}const Sc=(r,a,x)=>r??a??x,K0=gr({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(r,{attrs:a,slots:x}){const t=zt(Da),w=bt(()=>r.route||t.value),g=zt(xc,0),i=bt(()=>{let h=Vt(g);const{matched:y}=w.value;let m;for(;(m=y[h])&&!m.components;)h++;return h}),u=bt(()=>w.value.matched[i.value]);Lr(xc,bt(()=>i.value+1)),Lr(z0,u),Lr(Da,w);const o=mt();return Pn(()=>[o.value,u.value,r.name],([h,y,m],[n,s,c])=>{y&&(y.instances[m]=h,s&&s!==y&&h&&h===n&&(y.leaveGuards.size||(y.leaveGuards=s.leaveGuards),y.updateGuards.size||(y.updateGuards=s.updateGuards))),h&&y&&(!s||!xo(y,s)||!n)&&(y.enterCallbacks[m]||[]).forEach(f=>f(h))},{flush:"post"}),()=>{const h=w.value,y=r.name,m=u.value,n=m&&m.components[y];if(!n)return Ec(x.default,{Component:n,route:h});const s=m.props[y],c=s?s===!0?h.params:typeof s=="function"?s(h):s:null,p=Jt(n,wt({},c,a,{onVnodeUnmounted:d=>{d.component.isUnmounted&&(m.instances[y]=null)},ref:o}));return Ec(x.default,{Component:p,route:h})||p}}});function Ec(r,a){if(!r)return null;const x=r(a);return x.length===1?x[0]:x}const sh=K0;function Z0(r){const a=F0(r.routes,r),x=r.parseQuery||V0,t=r.stringifyQuery||_c,w=r.history,g=Do(),i=Do(),u=Do(),o=Ko(Ur);let h=Ur;ao&&r.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const y=Yi.bind(null,K=>""+K),m=Yi.bind(null,c0),n=Yi.bind(null,ts);function s(K,J){let ne,ue;return th(K)?(ne=a.getRecordMatcher(K),ue=J):ue=K,a.addRoute(ue,ne)}function c(K){const J=a.getRecordMatcher(K);J&&a.removeRoute(J)}function f(){return a.getRoutes().map(K=>K.record)}function p(K){return!!a.getRecordMatcher(K)}function d(K,J){if(J=wt({},J||o.value),typeof K=="string"){const z=Ki(x,K,J.path),te=a.resolve({path:z.path},J),ce=w.createHref(z.fullPath);return wt(z,te,{params:n(te.params),hash:ts(z.hash),redirectedFrom:void 0,href:ce})}let ne;if(K.path!=null)ne=wt({},K,{path:Ki(x,K.path,J.path).path});else{const z=wt({},K.params);for(const te in z)z[te]==null&&delete z[te];ne=wt({},K,{params:m(z)}),J.params=m(J.params)}const ue=a.resolve(ne,J),ie=K.hash||"";ue.params=y(n(ue.params));const he=h0(t,wt({},K,{hash:a0(ie),path:ue.path})),Y=w.createHref(he);return wt({fullPath:he,hash:ie,query:t===_c?H0(K.query):K.query||{}},ue,{redirectedFrom:void 0,href:Y})}function l(K){return typeof K=="string"?Ki(x,K,o.value.path):wt({},K)}function b(K,J){if(h!==K)return wo(8,{from:J,to:K})}function v(K){return T(K)}function j(K){return v(wt(l(K),{replace:!0}))}function E(K){const J=K.matched[K.matched.length-1];if(J&&J.redirect){const{redirect:ne}=J;let ue=typeof ne=="function"?ne(K):ne;return typeof ue=="string"&&(ue=ue.includes("?")||ue.includes("#")?ue=l(ue):{path:ue},ue.params={}),wt({query:K.query,hash:K.hash,params:ue.path!=null?{}:K.params},ue)}}function T(K,J){const ne=h=d(K),ue=o.value,ie=K.state,he=K.force,Y=K.replace===!0,z=E(ne);if(z)return T(wt(l(z),{state:typeof z=="object"?wt({},ie,z.state):ie,force:he,replace:Y}),J||ne);const te=ne;te.redirectedFrom=J;let ce;return!he&&p0(t,ue,ne)&&(ce=wo(16,{to:te,from:ue}),ee(ue,ue,!0,!1)),(ce?Promise.resolve(ce):R(te,ue)).catch(fe=>an(fe)?an(fe,2)?fe:Q(fe):V(fe,te,ue)).then(fe=>{if(fe){if(an(fe,2))return T(wt({replace:Y},l(fe.to),{state:typeof fe.to=="object"?wt({},ie,fe.to.state):ie,force:he}),J||te)}else fe=I(te,ue,!0,Y,ie);return C(te,ue,fe),fe})}function M(K,J){const ne=b(K,J);return ne?Promise.reject(ne):Promise.resolve()}function P(K){const J=D.values().next().value;return J&&typeof J.runWithContext=="function"?J.runWithContext(K):K()}function R(K,J){let ne;const[ue,ie,he]=Q0(K,J);ne=Zi(ue.reverse(),"beforeRouteLeave",K,J);for(const z of ue)z.leaveGuards.forEach(te=>{ne.push(En(te,K,J))});const Y=M.bind(null,K,J);return ne.push(Y),X(ne).then(()=>{ne=[];for(const z of g.list())ne.push(En(z,K,J));return ne.push(Y),X(ne)}).then(()=>{ne=Zi(ie,"beforeRouteUpdate",K,J);for(const z of ie)z.updateGuards.forEach(te=>{ne.push(En(te,K,J))});return ne.push(Y),X(ne)}).then(()=>{ne=[];for(const z of he)if(z.beforeEnter)if(zr(z.beforeEnter))for(const te of z.beforeEnter)ne.push(En(te,K,J));else ne.push(En(z.beforeEnter,K,J));return ne.push(Y),X(ne)}).then(()=>(K.matched.forEach(z=>z.enterCallbacks={}),ne=Zi(he,"beforeRouteEnter",K,J,P),ne.push(Y),X(ne))).then(()=>{ne=[];for(const z of i.list())ne.push(En(z,K,J));return ne.push(Y),X(ne)}).catch(z=>an(z,8)?z:Promise.reject(z))}function C(K,J,ne){u.list().forEach(ue=>P(()=>ue(K,J,ne)))}function I(K,J,ne,ue,ie){const he=b(K,J);if(he)return he;const Y=J===Ur,z=ao?history.state:{};ne&&(ue||Y?w.replace(K.fullPath,wt({scroll:Y&&z&&z.scroll},ie)):w.push(K.fullPath,ie)),o.value=K,ee(K,J,ne,Y),Q()}let A;function N(){A||(A=w.listen((K,J,ne)=>{if(!G.listening)return;const ue=d(K),ie=E(ue);if(ie){T(wt(ie,{replace:!0,force:!0}),ue).catch(Wo);return}h=ue;const he=o.value;ao&&w0(dc(he.fullPath,ne.delta),gi()),R(ue,he).catch(Y=>an(Y,12)?Y:an(Y,2)?(T(wt(l(Y.to),{force:!0}),ue).then(z=>{an(z,20)&&!ne.delta&&ne.type===rs.pop&&w.go(-1,!1)}).catch(Wo),Promise.reject()):(ne.delta&&w.go(-ne.delta,!1),V(Y,ue,he))).then(Y=>{Y=Y||I(ue,he,!1),Y&&(ne.delta&&!an(Y,8)?w.go(-ne.delta,!1):ne.type===rs.pop&&an(Y,20)&&w.go(-1,!1)),C(ue,he,Y)}).catch(Wo)}))}let F=Do(),U=Do(),W;function V(K,J,ne){Q(K);const ue=U.list();return ue.length?ue.forEach(ie=>ie(K,J,ne)):console.error(K),Promise.reject(K)}function H(){return W&&o.value!==Ur?Promise.resolve():new Promise((K,J)=>{F.add([K,J])})}function Q(K){return W||(W=!K,N(),F.list().forEach(([J,ne])=>K?ne(K):J()),F.reset()),K}function ee(K,J,ne,ue){const{scrollBehavior:ie}=r;if(!ao||!ie)return Promise.resolve();const he=!ne&&j0(dc(K.fullPath,0))||(ue||!ne)&&history.state&&history.state.scroll||null;return Pr().then(()=>ie(K,J,he)).then(Y=>Y&&x0(Y)).catch(Y=>V(Y,K,J))}const ae=K=>w.go(K);let k;const D=new Set,G={currentRoute:o,listening:!0,addRoute:s,removeRoute:c,clearRoutes:a.clearRoutes,hasRoute:p,getRoutes:f,resolve:d,options:r,push:v,replace:j,go:ae,back:()=>ae(-1),forward:()=>ae(1),beforeEach:g.add,beforeResolve:i.add,afterEach:u.add,onError:U.add,isReady:H,install(K){const J=this;K.component("RouterLink",X0),K.component("RouterView",sh),K.config.globalProperties.$router=J,Object.defineProperty(K.config.globalProperties,"$route",{enumerable:!0,get:()=>Vt(o)}),ao&&!k&&o.value===Ur&&(k=!0,v(w.location).catch(ie=>{}));const ne={};for(const ie in Ur)Object.defineProperty(ne,ie,{get:()=>o.value[ie],enumerable:!0});K.provide(pl,J),K.provide(ml,fn(ne)),K.provide(Da,o);const ue=K.unmount;D.add(K),K.unmount=function(){D.delete(K),D.size<1&&(h=Ur,A&&A(),A=null,o.value=Ur,k=!1,W=!1),ue()}}};function X(K){return K.reduce((J,ne)=>J.then(()=>P(ne)),Promise.resolve())}return G}function Q0(r,a){const x=[],t=[],w=[],g=Math.max(a.matched.length,r.matched.length);for(let i=0;ixo(h,u))?t.push(u):x.push(u));const o=r.matched[i];o&&(a.matched.find(h=>xo(h,o))||w.push(o))}return[x,t,w]}function J0(r){return zt(ml)}const eb=/(:\w+)\([^)]+\)/g,tb=/(:\w+)[?+*]/g,rb=/:\w+/g,nb=(r,a)=>a.path.replace(eb,"$1").replace(tb,"$1").replace(rb,x=>{var t;return((t=r.params[x.slice(1)])==null?void 0:t.toString())||""}),Fa=(r,a)=>{const x=r.route.matched.find(w=>{var g;return((g=w.components)==null?void 0:g.default)===r.Component.type}),t=a??(x==null?void 0:x.meta.key)??(x&&nb(r.route,x));return typeof t=="function"?t(r.route):t},ob=(r,a)=>({default:()=>r?Jt(Vp,r===!0?{}:r,a):a});function yl(r){return Array.isArray(r)?r:[r]}const sb={layout:"empty"},ib={layout:"light"},ab={layout:"light"},lb={layout:"light"},ub={layout:"light"},cb={layout:"light"},db={layout:"light"},fb={layout:"light"},hb={layout:"light"},pb={layout:"light"},mb={layout:"light"},yb={layout:"light"},Qi=[{name:"articles-slug",path:"/articles/:slug(.*)*",component:()=>rt(()=>import("./DgtYBS7b.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9]),import.meta.url)},{name:"articles",path:"/articles",component:()=>rt(()=>import("./DGfbSuI8.js"),__vite__mapDeps([10,1,2,3,4,5,6,7,8]),import.meta.url)},{name:"card",path:"/card",meta:sb,component:()=>rt(()=>import("./BzA2FW_d.js"),[],import.meta.url)},{name:"examples-nested_transitions",path:"/examples/nested_transitions",component:()=>rt(()=>import("./DahmjARO.js"),[],import.meta.url)},{name:"index",path:"/",component:()=>rt(()=>import("./BvrzO_PE.js"),__vite__mapDeps([11,12,8,5,4]),import.meta.url)},{name:"playground-audio",path:"/playground/audio",component:()=>rt(()=>import("./BOWXzEfp.js"),[],import.meta.url)},{name:"playground-chords",path:"/playground/chords",meta:ib,component:()=>rt(()=>import("./j8GsLxXc.js"),[],import.meta.url)},{name:"playground-conway",path:"/playground/conway",meta:ab,component:()=>rt(()=>import("./j0WRL_kM.js"),[],import.meta.url)},{name:"playground-french",path:"/playground/french",meta:lb,component:()=>rt(()=>import("./C4nPnnlt.js"),__vite__mapDeps([13,5,7]),import.meta.url)},{name:"playground",path:"/playground",component:()=>rt(()=>import("./DSmS9R0l.js"),__vite__mapDeps([14,12]),import.meta.url)},{name:"playground-matrix",path:"/playground/matrix",meta:ub,component:()=>rt(()=>import("./DAGTk_Eg.js"),[],import.meta.url)},{name:"playground-metronome",path:"/playground/metronome",meta:cb,component:()=>rt(()=>import("./DxcFrhhB.js"),[],import.meta.url)},{name:"playground-midi",path:"/playground/midi",meta:db,component:()=>rt(()=>import("./DbHcoyzM.js"),[],import.meta.url)},{name:"playground-palettes-mountains",path:"/playground/palettes/mountains",meta:fb,component:()=>rt(()=>import("./B6tAB_C8.js"),[],import.meta.url)},{name:"playground-palettes-variance",path:"/playground/palettes/variance",meta:hb,component:()=>rt(()=>import("./YtCHaNyK.js"),[],import.meta.url)},{name:"playground-plotter",path:"/playground/plotter",meta:pb,component:()=>rt(()=>import("./DEIA3vjx.js"),[],import.meta.url)},{name:"playground-tiling",path:"/playground/tiling",meta:mb,component:()=>rt(()=>import("./BicH1kzm.js"),[],import.meta.url)},{name:"playground-waves",path:"/playground/waves",meta:yb,component:()=>rt(()=>import("./D1pfiUWe.js"),[],import.meta.url)},{name:"talks",path:"/talks",component:()=>rt(()=>import("./BOZf4djk.js"),[],import.meta.url)}],ih=(r,a,x)=>(a=a===!0?{}:a,{default:()=>{var t;return a?Jt(r,a,x):(t=x.default)==null?void 0:t.call(x)}}),gb=/(:\w+)\([^)]+\)/g,vb=/(:\w+)[?+*]/g,bb=/:\w+/g;function Tc(r){const a=(r==null?void 0:r.meta.key)??r.path.replace(gb,"$1").replace(vb,"$1").replace(bb,x=>{var t;return((t=r.params[x.slice(1)])==null?void 0:t.toString())||""});return typeof a=="function"?a(r):a}function _b(r,a){return r===a||a===Ur?!1:Tc(r)!==Tc(a)?!0:!r.matched.every((t,w)=>{var g,i;return t.components&&t.components.default===((i=(g=a.matched[w])==null?void 0:g.components)==null?void 0:i.default)})}const xb={scrollBehavior(r,a,x){var h;const t=Dt(),w=((h=wr().options)==null?void 0:h.scrollBehaviorType)??"auto";let g=x||void 0;const i=typeof r.meta.scrollToTop=="function"?r.meta.scrollToTop(r,a):r.meta.scrollToTop;if(!g&&a&&r&&i!==!1&&_b(r,a)&&(g={left:0,top:0}),r.path===a.path)return a.hash&&!r.hash?{left:0,top:0}:r.hash?{el:r.hash,top:kc(r.hash),behavior:w}:!1;const u=y=>!!(y.meta.pageTransition??ja),o=u(a)&&u(r)?"page:transition:finish":"page:finish";return new Promise(y=>{t.hooks.hookOnce(o,async()=>{await new Promise(m=>setTimeout(m,0)),r.hash&&(g={el:r.hash,top:kc(r.hash),behavior:w}),y(g)})})}};function kc(r){try{const a=document.querySelector(r);if(a)return(Number.parseFloat(getComputedStyle(a).scrollMarginTop)||0)+(Number.parseFloat(getComputedStyle(document.documentElement).scrollPaddingTop)||0)}catch{}return 0}const wb={hashMode:!1,scrollBehaviorType:"auto"},Yr={...wb,...xb},jb=async r=>{var o;let a,x;if(!((o=r.meta)!=null&&o.validate))return;const t=Dt(),w=wr(),g=([a,x]=go(()=>Promise.resolve(r.meta.validate(r))),a=await a,x(),a);if(g===!0)return;const i=mi({statusCode:g&&g.statusCode||404,statusMessage:g&&g.statusMessage||`Page Not Found: ${r.fullPath}`,data:{path:r.fullPath}}),u=w.beforeResolve(h=>{if(u(),h===r){const y=w.afterEach(async()=>{y(),await t.runWithContext(()=>uo(i)),window==null||window.history.pushState({},"",r.fullPath)});return!1}})},Sb=async r=>{let a,x;const t=([a,x]=go(()=>fl({path:r.path})),a=await a,x(),a);if(t.redirect)return yn(t.redirect,{acceptRelative:!0})?(window.location.href=t.redirect,!1):t.redirect},Eb=[jb,Sb],Xo={};function Tb(r,a,x){const{pathname:t,search:w,hash:g}=a,i=r.indexOf("#");if(i>-1){const h=g.includes(r.slice(i))?r.slice(i).length:1;let y=g.slice(h);return y[0]!=="/"&&(y="/"+y),qu(y,"")}const u=qu(t,r),o=!x||Gy(u,x,{trailingSlash:!0})?u:x;return o+(o.includes("?")?"":w)+g}const kb=tn({name:"nuxt:router",enforce:"pre",async setup(r){var p;let a,x,t=us().app.baseURL;const w=((p=Yr.history)==null?void 0:p.call(Yr,t))??k0(t),g=Yr.routes?([a,x]=go(()=>Yr.routes(Qi)),a=await a,x(),a??Qi):Qi;let i;const u=Z0({...Yr,scrollBehavior:(d,l,b)=>{if(l===Ur){i=b;return}if(Yr.scrollBehavior){if(u.options.scrollBehavior=Yr.scrollBehavior,"scrollRestoration"in window.history){const v=u.beforeEach(()=>{v(),window.history.scrollRestoration="manual"})}return Yr.scrollBehavior(d,Ur,i||b)}},history:w,routes:g});"scrollRestoration"in window.history&&(window.history.scrollRestoration="auto"),r.vueApp.use(u);const o=Ko(u.currentRoute.value);u.afterEach((d,l)=>{o.value=l}),Object.defineProperty(r.vueApp.config.globalProperties,"previousRoute",{get:()=>o.value});const h=Tb(t,window.location,r.payload.path),y=Ko(u.currentRoute.value),m=()=>{y.value=u.currentRoute.value};r.hook("page:finish",m),u.afterEach((d,l)=>{var b,v,j,E;((v=(b=d.matched[0])==null?void 0:b.components)==null?void 0:v.default)===((E=(j=l.matched[0])==null?void 0:j.components)==null?void 0:E.default)&&m()});const n={};for(const d in y.value)Object.defineProperty(n,d,{get:()=>y.value[d],enumerable:!0});r._route=fn(n),r._middleware=r._middleware||{global:[],named:{}};const s=pi();u.afterEach(async(d,l,b)=>{delete r._processingMiddleware,!r.isHydrating&&s.value&&await r.runWithContext(Bg),b&&await r.callHook("page:loading:end")});try{[a,x]=go(()=>u.isReady()),await a,x()}catch(d){[a,x]=go(()=>r.runWithContext(()=>uo(d))),await a,x()}const c=h!==u.currentRoute.value.fullPath?u.resolve(h):u.currentRoute.value;m();const f=r.payload.state._layout;return u.beforeEach(async(d,l)=>{var b;await r.callHook("page:loading:start"),d.meta=In(d.meta),r.isHydrating&&f&&!An(d.meta.layout)&&(d.meta.layout=f),r._processingMiddleware=!0;{const v=new Set([...Eb,...r._middleware.global]);for(const j of d.matched){const E=j.meta.middleware;if(E)for(const T of yl(E))v.add(T)}{const j=await r.runWithContext(()=>fl({path:d.path}));if(j.appMiddleware)for(const E in j.appMiddleware)j.appMiddleware[E]?v.add(E):v.delete(E)}for(const j of v){const E=typeof j=="string"?r._middleware.named[j]||await((b=Xo[j])==null?void 0:b.call(Xo).then(M=>M.default||M)):j;if(!E)throw new Error(`Unknown route middleware: '${j}'.`);const T=await r.runWithContext(()=>E(d,l));if(!r.payload.serverRendered&&r.isHydrating&&(T===!1||T instanceof Error)){const M=T||Ta({statusCode:404,statusMessage:`Page Not Found: ${h}`});return await r.runWithContext(()=>uo(M)),!1}if(T!==!0&&(T||T===!1))return T}}}),u.onError(async()=>{delete r._processingMiddleware,await r.callHook("page:loading:end")}),u.afterEach(async(d,l)=>{d.matched.length===0&&await r.runWithContext(()=>uo(Ta({statusCode:404,fatal:!1,statusMessage:`Page not found: ${d.fullPath}`,data:{path:d.fullPath}})))}),r.hooks.hookOnce("app:created",async()=>{try{"name"in c&&(c.name=void 0),await u.replace({...c,force:!0}),u.options.scrollBehavior=Yr.scrollBehavior}catch(d){await r.runWithContext(()=>uo(d))}}),{provide:{router:u}}}}),Na=globalThis.requestIdleCallback||(r=>{const a=Date.now(),x={didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-a))};return setTimeout(()=>{r(x)},1)}),Mb=globalThis.cancelIdleCallback||(r=>{clearTimeout(r)}),vi=r=>{const a=Dt();a.isHydrating?a.hooks.hookOnce("app:suspense:resolve",()=>{Na(()=>r())}):Na(()=>r())},Cb=tn({name:"nuxt:payload",setup(r){wr().beforeResolve(async(a,x)=>{if(a.path===x.path)return;const t=await lc(a.path);t&&Object.assign(r.static.data,t.data)}),vi(()=>{var a;r.hooks.hook("link:prefetch",async x=>{const{hostname:t}=new URL(x,window.location.href);t===window.location.hostname&&await lc(x)}),((a=navigator.connection)==null?void 0:a.effectiveType)!=="slow-2g"&&setTimeout(yi,1e3)})}}),Ob=tn(()=>{const r=wr();vi(()=>{r.beforeResolve(async()=>{await new Promise(a=>{setTimeout(a,100),requestAnimationFrame(()=>{setTimeout(a,0)})})})})}),Pb=tn(r=>{let a;async function x(){const t=await yi();a&&clearTimeout(a),a=setTimeout(x,Zu);try{const w=await $fetch(ul("builds/latest.json")+`?${Date.now()}`);w.id!==t.id&&r.hooks.callHook("app:manifest:update",w)}catch{}}vi(()=>{a=setTimeout(x,Zu)})});function Ab(r={}){const a=r.path||window.location.pathname;let x={};try{x=Ws(sessionStorage.getItem("nuxt:reload")||"{}")}catch{}if(r.force||(x==null?void 0:x.path)!==a||(x==null?void 0:x.expires){t.clear()}),r.hook("app:chunkError",({error:g})=>{t.add(g)});function w(g){const u="href"in g&&g.href[0]==="#"?x.app.baseURL+g.href:fi(x.app.baseURL,g.fullPath);Ab({path:u,persistState:!0})}r.hook("app:manifest:update",()=>{a.beforeResolve(w)}),a.onError((g,i)=>{t.has(g)&&w(i)})}}),Lb=dt(()=>rt(()=>import("./ClIt1Nvm.js"),__vite__mapDeps([15,6,1,2,3,4,5,16,7,8]),import.meta.url).then(r=>r.default||r.default||r)),Ib=dt(()=>rt(()=>import("./DCC38KAX.js"),__vite__mapDeps([17,16,5,7,8,4]),import.meta.url).then(r=>r.default||r.default||r)),Db=dt(()=>rt(()=>import("./36pNPiZA.js"),__vite__mapDeps([18,5,7,8,4]),import.meta.url).then(r=>r.default||r.default||r)),Fb=dt(()=>rt(()=>import("./CkFsoPVF.js"),__vite__mapDeps([16,5,7,8,4]),import.meta.url).then(r=>r.default||r.default||r)),Nb=dt(()=>rt(()=>import("./CW9x3cwD.js"),__vite__mapDeps([6,1,2,3,4,5]),import.meta.url).then(r=>r.default||r.default||r)),Ub=dt(()=>rt(()=>import("./C9FT_e57.js"),__vite__mapDeps([19,1,2,3,4,5]),import.meta.url).then(r=>r.default||r.default||r)),Bb=dt(()=>rt(()=>import("./Bv4zO08n.js"),__vite__mapDeps([20,3]),import.meta.url).then(r=>r.default||r.default||r)),Gb=dt(()=>rt(()=>import("./DNMAzUIu.js"),[],import.meta.url).then(r=>r.default||r.default||r)),Vb=dt(()=>rt(()=>import("./CgYWpv8r.js"),[],import.meta.url).then(r=>r.default||r.default||r)),Hb=dt(()=>rt(()=>import("./CTW-W71u.js"),__vite__mapDeps([21,20,3]),import.meta.url).then(r=>r.default||r.default||r)),zb=dt(()=>rt(()=>import("./CCnUho6I.js"),__vite__mapDeps([22,23,24]),import.meta.url).then(r=>r.default||r.default||r)),Wb=dt(()=>rt(()=>import("./DA-iSWSz.js"),[],import.meta.url).then(r=>r.default||r.default||r)),qb=dt(()=>rt(()=>import("./DrqmHo5i.js"),__vite__mapDeps([25,23,24]),import.meta.url).then(r=>r.default||r.default||r)),Xb=dt(()=>rt(()=>import("./BjS-v8yJ.js"),[],import.meta.url).then(r=>r.default||r.default||r)),$b=dt(()=>rt(()=>import("./C828-xgJ.js"),[],import.meta.url).then(r=>r.default||r.default||r)),Yb=dt(()=>rt(()=>import("./DPuhoZ66.js"),[],import.meta.url).then(r=>r.default||r.default||r)),Kb=dt(()=>rt(()=>import("./CXAQy6Gj.js"),[],import.meta.url).then(r=>r.default||r.default||r)),Zb=dt(()=>rt(()=>import("./CIDd0oDf.js"),[],import.meta.url).then(r=>r.default||r.default||r)),Qb=dt(()=>rt(()=>import("./NXtAYMkh.js"),[],import.meta.url).then(r=>r.default||r.default||r)),Jb=dt(()=>rt(()=>import("./BPuIfGRI.js"),[],import.meta.url).then(r=>r.default||r.default||r)),e1=dt(()=>rt(()=>import("./kj563EqX.js"),[],import.meta.url).then(r=>r.default||r.default||r)),t1=dt(()=>rt(()=>import("./B6OIRZug.js"),[],import.meta.url).then(r=>r.default||r.default||r)),r1=dt(()=>rt(()=>import("./BhE0-UjD.js"),[],import.meta.url).then(r=>r.default||r.default||r)),n1=dt(()=>rt(()=>import("./DCo587Oy.js"),[],import.meta.url).then(r=>r.default||r.default||r)),o1=dt(()=>rt(()=>import("./sTS5Selr.js"),[],import.meta.url).then(r=>r.default||r.default||r)),s1=dt(()=>rt(()=>import("./Oy3c7nO-.js"),[],import.meta.url).then(r=>r.default||r.default||r)),i1=dt(()=>rt(()=>import("./F-Xgfjj6.js"),[],import.meta.url).then(r=>r.default||r.default||r)),a1=dt(()=>rt(()=>import("./CVSgz9-b.js"),[],import.meta.url).then(r=>r.default||r.default||r)),l1=dt(()=>rt(()=>import("./MByIxc3u.js"),[],import.meta.url).then(r=>r.default||r.default||r)),u1=dt(()=>rt(()=>import("./BtbynY4z.js"),[],import.meta.url).then(r=>r.default||r.default||r)),c1=dt(()=>rt(()=>import("./ZdspzMIb.js"),[],import.meta.url).then(r=>r.default||r.default||r)),d1=dt(()=>rt(()=>import("./GEgjpm63.js"),[],import.meta.url).then(r=>r.default||r.default||r)),f1=dt(()=>rt(()=>import("./ojq642Va.js"),[],import.meta.url).then(r=>r.default||r.default||r)),h1=dt(()=>rt(()=>import("./Uy2oF-kn.js"),[],import.meta.url).then(r=>r.default||r.default||r)),p1=dt(()=>rt(()=>import("./nss6DupJ.js"),[],import.meta.url).then(r=>r.default||r.default||r)),m1=dt(()=>rt(()=>import("./D_FI_Dju.js"),[],import.meta.url).then(r=>r.default||r.default||r)),y1=[["ContentDoc",Lb],["ContentList",Ib],["ContentNavigation",Db],["ContentQuery",Fb],["ContentRenderer",Nb],["ContentRendererMarkdown",Ub],["MDCSlot",Bb],["DocumentDrivenEmpty",Gb],["DocumentDrivenNotFound",Vb],["Markdown",Hb],["ProseCode",zb],["ProseCodeInline",Wb],["ProsePre",qb],["ProseA",Xb],["ProseBlockquote",$b],["ProseEm",Yb],["ProseH1",Kb],["ProseH2",Zb],["ProseH3",Qb],["ProseH4",Jb],["ProseH5",e1],["ProseH6",t1],["ProseHr",r1],["ProseImg",n1],["ProseLi",o1],["ProseOl",s1],["ProseP",i1],["ProseScript",a1],["ProseStrong",l1],["ProseTable",u1],["ProseTbody",c1],["ProseTd",d1],["ProseTh",f1],["ProseThead",h1],["ProseTr",p1],["ProseUl",m1]],g1=tn({name:"nuxt:global-components",setup(r){for(const[a,x]of y1)r.vueApp.component(a,x),r.vueApp.component("Lazy"+a,x)}}),kn={default:dt(()=>rt(()=>import("./DTjsV1Wj.js"),[],import.meta.url).then(r=>r.default||r)),empty:dt(()=>rt(()=>import("./CNr5x1ND.js"),[],import.meta.url).then(r=>r.default||r)),light:dt(()=>rt(()=>import("./Crie1bW-.js"),[],import.meta.url).then(r=>r.default||r))},v1=tn({name:"nuxt:prefetch",setup(r){const a=wr();r.hooks.hook("app:mounted",()=>{a.beforeEach(async x=>{var w;const t=(w=x==null?void 0:x.meta)==null?void 0:w.layout;t&&typeof kn[t]=="function"&&await kn[t]()})}),r.hooks.hook("link:prefetch",x=>{if(yn(x))return;const t=a.resolve(x);if(!t)return;const w=t.meta.layout;let g=yl(t.meta.middleware);g=g.filter(i=>typeof i=="string");for(const i of g)typeof Xo[i]=="function"&&Xo[i]();w&&typeof kn[w]=="function"&&kn[w]()})}});var ks=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function b1(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function Ms(r){throw new Error('Could not dynamically require "'+r+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Ji={exports:{}};/*! p5.js v1.11.2 November 28, 2024 */var Mc;function _1(){return Mc||(Mc=1,function(r,a){(function(x){r.exports=x()})(function(){var x;return function t(w,g,i){function u(y,m){if(!g[y]){if(!w[y]){var n=typeof Ms=="function"&&Ms;if(!m&&n)return n(y,!0);if(o)return o(y,!0);throw(m=new Error("Cannot find module '"+y+"'")).code="MODULE_NOT_FOUND",m}n=g[y]={exports:{}},w[y][0].call(n.exports,function(s){return u(w[y][1][s]||s)},n,n.exports,t,w,g,i)}return g[y].exports}for(var o=typeof Ms=="function"&&Ms,h=0;h>16&255,l[b++]=c>>8&255,l[b++]=255&c;return d===2&&(c=u[s.charCodeAt(f)]<<2|u[s.charCodeAt(f+1)]>>4,l[b++]=255&c),d===1&&(c=u[s.charCodeAt(f)]<<10|u[s.charCodeAt(f+1)]<<4|u[s.charCodeAt(f+2)]>>2,l[b++]=c>>8&255,l[b++]=255&c),l},g.fromByteArray=function(s){for(var c,f=s.length,p=f%3,d=[],l=0,b=f-p;l>18&63]+i[R>>12&63]+i[R>>6&63]+i[63&R]}(T));return M.join("")}(s,l,b>2]+i[c<<4&63]+"==")):p==2&&(c=(s[f-2]<<8)+s[f-1],d.push(i[c>>10]+i[c>>4&63]+i[c<<2&63]+"=")),d.join("")};for(var i=[],u=[],o=typeof Uint8Array<"u"?Uint8Array:Array,h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",y=0,m=h.length;y>>1;case"base64":return V(k).length;default:if(K)return X?-1:W(k).length;D=(""+D).toLowerCase(),K=!0}}function b(k,D,G){var X,K=!1;if((D=D===void 0||D<0?0:D)>this.length||(G=G===void 0||G>this.length?this.length:G)<=0||(G>>>=0)<=(D>>>=0))return"";for(k=k||"utf8";;)switch(k){case"hex":var J=this,de=D,ne=G,Y=J.length;(!ne||ne<0||Y=k.length){if(K)return-1;G=k.length-1}else if(G<0){if(!K)return-1;G=0}if(typeof D=="string"&&(D=n.from(D,X)),n.isBuffer(D))return D.length===0?-1:E(k,D,G,X,K);if(typeof D=="number")return D&=255,typeof Uint8Array.prototype.indexOf=="function"?(K?Uint8Array.prototype.indexOf:Uint8Array.prototype.lastIndexOf).call(k,D,G):E(k,[D],G,X,K);throw new TypeError("val must be string, number or Buffer")}function E(k,D,G,X,K){var J=1,ne=k.length,ue=D.length;if(X!==void 0&&((X=String(X).toLowerCase())==="ucs2"||X==="ucs-2"||X==="utf16le"||X==="utf-16le")){if(k.length<2||D.length<2)return-1;ne/=J=2,ue/=2,G/=2}function ie(ce,fe){return J===1?ce[fe]:ce.readUInt16BE(fe*J)}if(K)for(var he=-1,Y=G;Y>8,ue=ue%256,ie.push(ue),ie.push(ne);return ie}(D,k.length-G),k,G,X)}function P(k,D,G){G=Math.min(k.length,G);for(var X=[],K=D;K>>10&1023|55296),Y=56320|1023&Y),X.push(Y),K+=z}var te=X,ce=te.length;if(ce<=R)return String.fromCharCode.apply(String,te);for(var fe="",de=0;de"u"||typeof console.error!="function"||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(n.prototype,"parent",{enumerable:!0,get:function(){if(n.isBuffer(this))return this.buffer}}),Object.defineProperty(n.prototype,"offset",{enumerable:!0,get:function(){if(n.isBuffer(this))return this.byteOffset}}),typeof Symbol<"u"&&Symbol.species!=null&&n[Symbol.species]===n&&Object.defineProperty(n,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),n.poolSize=8192,n.from=s,Object.setPrototypeOf(n.prototype,Uint8Array.prototype),Object.setPrototypeOf(n,Uint8Array),n.alloc=function(k,D,G){return D=D,G=G,c(k=k),!(k<=0)&&D!==void 0?typeof G=="string"?m(k).fill(D,G):m(k).fill(D):m(k)},n.allocUnsafe=f,n.allocUnsafeSlow=f,n.isBuffer=function(k){return k!=null&&k._isBuffer===!0&&k!==n.prototype},n.compare=function(k,D){if(Q(k,Uint8Array)&&(k=n.from(k,k.offset,k.byteLength)),Q(D,Uint8Array)&&(D=n.from(D,D.offset,D.byteLength)),!n.isBuffer(k)||!n.isBuffer(D))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(k===D)return 0;for(var G=k.length,X=D.length,K=0,J=Math.min(G,X);Kk&&(D+=" ... "),""},h&&(n.prototype[h]=n.prototype.inspect),n.prototype.compare=function(k,D,G,X,K){if(Q(k,Uint8Array)&&(k=n.from(k,k.offset,k.byteLength)),!n.isBuffer(k))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof k);if(G===void 0&&(G=k?k.length:0),X===void 0&&(X=0),K===void 0&&(K=this.length),(D=D===void 0?0:D)<0||G>k.length||X<0||K>this.length)throw new RangeError("out of range index");if(K<=X&&G<=D)return 0;if(K<=X)return-1;if(G<=D)return 1;if(this===k)return 0;for(var J=(K>>>=0)-(X>>>=0),ne=(G>>>=0)-(D>>>=0),ue=Math.min(J,ne),ie=this.slice(X,K),he=k.slice(D,G),Y=0;Y>>=0,isFinite(G)?(G>>>=0,X===void 0&&(X="utf8")):(X=G,G=void 0)}var K=this.length-D;if((G===void 0||Kthis.length)throw new RangeError("Attempt to write outside buffer bounds");X=X||"utf8";for(var J,ne,ue,ie=!1;;)switch(X){case"hex":var he=this,Y=k,z=D,te=G,ce=(z=Number(z)||0,he.length-z);(!te||ce<(te=Number(te)))&&(te=ce),(ce=Y.length)/2k.length)throw new RangeError("Index out of range")}function A(k,D,G,X){if(G+X>k.length)throw new RangeError("Index out of range");if(G<0)throw new RangeError("Index out of range")}function N(k,D,G,X,K){return D=+D,G>>>=0,K||A(k,0,G,4),o.write(k,D,G,X,23,4),G+4}function F(k,D,G,X,K){return D=+D,G>>>=0,K||A(k,0,G,8),o.write(k,D,G,X,52,8),G+8}n.prototype.slice=function(k,D){var G=this.length,G=((k=~~k)<0?(k+=G)<0&&(k=0):G>>=0,D>>>=0,G||C(k,D,this.length);for(var X=this[k],K=1,J=0;++J>>=0,D>>>=0,G||C(k,D,this.length);for(var X=this[k+--D],K=1;0>>=0,D||C(k,1,this.length),this[k]},n.prototype.readUInt16LE=function(k,D){return k>>>=0,D||C(k,2,this.length),this[k]|this[k+1]<<8},n.prototype.readUInt16BE=function(k,D){return k>>>=0,D||C(k,2,this.length),this[k]<<8|this[k+1]},n.prototype.readUInt32LE=function(k,D){return k>>>=0,D||C(k,4,this.length),(this[k]|this[k+1]<<8|this[k+2]<<16)+16777216*this[k+3]},n.prototype.readUInt32BE=function(k,D){return k>>>=0,D||C(k,4,this.length),16777216*this[k]+(this[k+1]<<16|this[k+2]<<8|this[k+3])},n.prototype.readIntLE=function(k,D,G){k>>>=0,D>>>=0,G||C(k,D,this.length);for(var X=this[k],K=1,J=0;++J>>=0,D>>>=0,G||C(k,D,this.length);for(var X=D,K=1,J=this[k+--X];0>>=0,D||C(k,1,this.length),128&this[k]?-1*(255-this[k]+1):this[k]},n.prototype.readInt16LE=function(k,D){return k>>>=0,D||C(k,2,this.length),D=this[k]|this[k+1]<<8,32768&D?4294901760|D:D},n.prototype.readInt16BE=function(k,D){return k>>>=0,D||C(k,2,this.length),D=this[k+1]|this[k]<<8,32768&D?4294901760|D:D},n.prototype.readInt32LE=function(k,D){return k>>>=0,D||C(k,4,this.length),this[k]|this[k+1]<<8|this[k+2]<<16|this[k+3]<<24},n.prototype.readInt32BE=function(k,D){return k>>>=0,D||C(k,4,this.length),this[k]<<24|this[k+1]<<16|this[k+2]<<8|this[k+3]},n.prototype.readFloatLE=function(k,D){return k>>>=0,D||C(k,4,this.length),o.read(this,k,!0,23,4)},n.prototype.readFloatBE=function(k,D){return k>>>=0,D||C(k,4,this.length),o.read(this,k,!1,23,4)},n.prototype.readDoubleLE=function(k,D){return k>>>=0,D||C(k,8,this.length),o.read(this,k,!0,52,8)},n.prototype.readDoubleBE=function(k,D){return k>>>=0,D||C(k,8,this.length),o.read(this,k,!1,52,8)},n.prototype.writeUIntLE=function(k,D,G,X){k=+k,D>>>=0,G>>>=0,X||I(this,k,D,G,Math.pow(2,8*G)-1,0);var K=1,J=0;for(this[D]=255&k;++J>>=0,G>>>=0,X||I(this,k,D,G,Math.pow(2,8*G)-1,0);var K=G-1,J=1;for(this[D+K]=255&k;0<=--K&&(J*=256);)this[D+K]=k/J&255;return D+G},n.prototype.writeUInt8=function(k,D,G){return k=+k,D>>>=0,G||I(this,k,D,1,255,0),this[D]=255&k,D+1},n.prototype.writeUInt16LE=function(k,D,G){return k=+k,D>>>=0,G||I(this,k,D,2,65535,0),this[D]=255&k,this[D+1]=k>>>8,D+2},n.prototype.writeUInt16BE=function(k,D,G){return k=+k,D>>>=0,G||I(this,k,D,2,65535,0),this[D]=k>>>8,this[D+1]=255&k,D+2},n.prototype.writeUInt32LE=function(k,D,G){return k=+k,D>>>=0,G||I(this,k,D,4,4294967295,0),this[D+3]=k>>>24,this[D+2]=k>>>16,this[D+1]=k>>>8,this[D]=255&k,D+4},n.prototype.writeUInt32BE=function(k,D,G){return k=+k,D>>>=0,G||I(this,k,D,4,4294967295,0),this[D]=k>>>24,this[D+1]=k>>>16,this[D+2]=k>>>8,this[D+3]=255&k,D+4},n.prototype.writeIntLE=function(k,D,G,X){k=+k,D>>>=0,X||I(this,k,D,G,(X=Math.pow(2,8*G-1))-1,-X);var K=0,J=1,ne=0;for(this[D]=255&k;++K>0)-ne&255;return D+G},n.prototype.writeIntBE=function(k,D,G,X){k=+k,D>>>=0,X||I(this,k,D,G,(X=Math.pow(2,8*G-1))-1,-X);var K=G-1,J=1,ne=0;for(this[D+K]=255&k;0<=--K&&(J*=256);)k<0&&ne===0&&this[D+K+1]!==0&&(ne=1),this[D+K]=(k/J>>0)-ne&255;return D+G},n.prototype.writeInt8=function(k,D,G){return k=+k,D>>>=0,G||I(this,k,D,1,127,-128),this[D]=255&(k=k<0?255+k+1:k),D+1},n.prototype.writeInt16LE=function(k,D,G){return k=+k,D>>>=0,G||I(this,k,D,2,32767,-32768),this[D]=255&k,this[D+1]=k>>>8,D+2},n.prototype.writeInt16BE=function(k,D,G){return k=+k,D>>>=0,G||I(this,k,D,2,32767,-32768),this[D]=k>>>8,this[D+1]=255&k,D+2},n.prototype.writeInt32LE=function(k,D,G){return k=+k,D>>>=0,G||I(this,k,D,4,2147483647,-2147483648),this[D]=255&k,this[D+1]=k>>>8,this[D+2]=k>>>16,this[D+3]=k>>>24,D+4},n.prototype.writeInt32BE=function(k,D,G){return k=+k,D>>>=0,G||I(this,k,D,4,2147483647,-2147483648),this[D]=(k=k<0?4294967295+k+1:k)>>>24,this[D+1]=k>>>16,this[D+2]=k>>>8,this[D+3]=255&k,D+4},n.prototype.writeFloatLE=function(k,D,G){return N(this,k,D,!0,G)},n.prototype.writeFloatBE=function(k,D,G){return N(this,k,D,!1,G)},n.prototype.writeDoubleLE=function(k,D,G){return F(this,k,D,!0,G)},n.prototype.writeDoubleBE=function(k,D,G){return F(this,k,D,!1,G)},n.prototype.copy=function(k,D,G,X){if(!n.isBuffer(k))throw new TypeError("argument should be a Buffer");if(G=G||0,X||X===0||(X=this.length),D>=k.length&&(D=k.length),(X=0=this.length)throw new RangeError("Index out of range");if(X<0)throw new RangeError("sourceEnd out of bounds");X>this.length&&(X=this.length);var K=(X=k.length-D>>=0,G=G===void 0?this.length:G>>>0,typeof(k=k||0)=="number")for(J=D;J>6|192,63&G|128)}else if(G<65536){if((D-=3)<0)break;J.push(G>>12|224,G>>6&63|128,63&G|128)}else{if(!(G<1114112))throw new Error("Invalid code point");if((D-=4)<0)break;J.push(G>>18|240,G>>12&63|128,G>>6&63|128,63&G|128)}}return J}function V(k){return u.toByteArray(function(D){if((D=(D=D.split("=")[0]).trim().replace(U,"")).length<2)return"";for(;D.length%4!=0;)D+="=";return D}(k))}function H(k,D,G,X){for(var K=0;K=D.length||K>=k.length);++K)D[K+G]=k[K];return K}function Q(k,D){return k instanceof D||k!=null&&k.constructor!=null&&k.constructor.name!=null&&k.constructor.name===D.name}function ee(k){return k!=k}var ae=function(){for(var k="0123456789abcdef",D=new Array(256),G=0;G<16;++G)for(var X=16*G,K=0;K<16;++K)D[X+K]=k[G]+k[K];return D}()}).call(this,t("buffer").Buffer)},{"base64-js":1,buffer:4,ieee754:254}],5:[function(t,w,g){w.exports=function(i){if(typeof i!="function")throw TypeError(String(i)+" is not a function");return i}},{}],6:[function(t,w,g){var i=t("../internals/is-object");w.exports=function(u){if(i(u)||u===null)return u;throw TypeError("Can't set "+String(u)+" as a prototype")}},{"../internals/is-object":75}],7:[function(o,w,g){var i=o("../internals/well-known-symbol"),u=o("../internals/object-create"),o=o("../internals/object-define-property"),h=i("unscopables"),y=Array.prototype;y[h]==null&&o.f(y,h,{configurable:!0,value:u(null)}),w.exports=function(m){y[h][m]=!0}},{"../internals/object-create":91,"../internals/object-define-property":93,"../internals/well-known-symbol":150}],8:[function(t,w,g){var i=t("../internals/string-multibyte").charAt;w.exports=function(u,o,h){return o+(h?i(u,o).length:1)}},{"../internals/string-multibyte":125}],9:[function(t,w,g){w.exports=function(i,u,o){if(i instanceof u)return i;throw TypeError("Incorrect "+(o?o+" ":"")+"invocation")}},{}],10:[function(t,w,g){var i=t("../internals/is-object");w.exports=function(u){if(i(u))return u;throw TypeError(String(u)+" is not an object")}},{"../internals/is-object":75}],11:[function(t,w,g){w.exports=typeof ArrayBuffer<"u"&&typeof DataView<"u"},{}],12:[function(A,w,g){function i(F){return m(F)&&n(N,s(F))}var u,o=A("../internals/array-buffer-native"),h=A("../internals/descriptors"),y=A("../internals/global"),m=A("../internals/is-object"),n=A("../internals/has"),s=A("../internals/classof"),c=A("../internals/create-non-enumerable-property"),f=A("../internals/redefine"),p=A("../internals/object-define-property").f,d=A("../internals/object-get-prototype-of"),l=A("../internals/object-set-prototype-of"),R=A("../internals/well-known-symbol"),A=A("../internals/uid"),b=y.Int8Array,v=b&&b.prototype,j=y.Uint8ClampedArray,j=j&&j.prototype,E=b&&d(b),T=v&&d(v),M=Object.prototype,P=M.isPrototypeOf,R=R("toStringTag"),C=A("TYPED_ARRAY_TAG"),I=o&&!!l&&s(y.opera)!=="Opera",A=!1,N={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8};for(u in N)y[u]||(I=!1);if((!I||typeof E!="function"||E===Function.prototype)&&(E=function(){throw TypeError("Incorrect invocation")},I))for(u in N)y[u]&&l(y[u],E);if((!I||!T||T===M)&&(T=E.prototype,I))for(u in N)y[u]&&l(y[u].prototype,T);if(I&&d(j)!==T&&l(j,T),h&&!n(T,R))for(u in A=!0,p(T,R,{get:function(){return m(this)?this[C]:void 0}}),N)y[u]&&c(y[u],C,u);w.exports={NATIVE_ARRAY_BUFFER_VIEWS:I,TYPED_ARRAY_TAG:A&&C,aTypedArray:function(F){if(i(F))return F;throw TypeError("Target is not a typed array")},aTypedArrayConstructor:function(F){if(l){if(P.call(E,F))return F}else for(var U in N)if(n(N,u)&&(U=y[U],U&&(F===U||P.call(U,F))))return F;throw TypeError("Target is not a typed array constructor")},exportTypedArrayMethod:function(F,U,W){if(h){if(W)for(var V in N)V=y[V],V&&n(V.prototype,F)&&delete V.prototype[F];T[F]&&!W||f(T,F,!W&&I&&v[F]||U)}},exportTypedArrayStaticMethod:function(F,U,W){var V,H;if(h){if(l){if(W)for(V in N)(H=y[V])&&n(H,F)&&delete H[F];if(E[F]&&!W)return;try{return f(E,F,!W&&I&&b[F]||U)}catch{}}for(V in N)!(H=y[V])||H[F]&&!W||f(H,F,U)}},isView:function(F){return F=s(F),F==="DataView"||n(N,F)},isTypedArray:i,TypedArray:E,TypedArrayPrototype:T}},{"../internals/array-buffer-native":11,"../internals/classof":29,"../internals/create-non-enumerable-property":38,"../internals/descriptors":43,"../internals/global":60,"../internals/has":61,"../internals/is-object":75,"../internals/object-define-property":93,"../internals/object-get-prototype-of":98,"../internals/object-set-prototype-of":102,"../internals/redefine":110,"../internals/uid":147,"../internals/well-known-symbol":150}],13:[function(G,w,g){function i(z){return[255&z]}function u(z){return[255&z,z>>8&255]}function o(z){return[255&z,z>>8&255,z>>16&255,z>>24&255]}function h(z){return z[3]<<24|z[2]<<16|z[1]<<8|z[0]}function y(z){return J(z,23,4)}function m(z){return J(z,52,8)}function n(z,te){A(z[Q],te,{get:function(){return U(this)[te]}})}function s(ve,te,ye,fe){if(ye=M(ye),ve=U(ve),ye+te>ve.byteLength)throw K(ee);var de=U(ve.buffer).bytes,ye=ye+ve.byteOffset,ve=de.slice(ye,ye+te);return fe?ve:ve.reverse()}function c(z,te,ce,fe,de,ye){if(ce=M(ce),z=U(z),ce+te>z.byteLength)throw K(ee);for(var ve=U(z.buffer).bytes,Ee=ce+z.byteOffset,ge=fe(+de),Ne=0;Nehe;)(ue=ie[he++])in k||l(k,ue,ae[ue]);f.constructor=k}C&&R(G)!==X&&C(G,X);var P=new D(new k(2)),Y=G.setInt8;P.setInt8(0,2147483648),P.setInt8(1,2147483649),!P.getInt8(0)&&P.getInt8(1)||b(G,{setInt8:function(te,ce){Y.call(this,te,ce<<24>>24)},setUint8:function(te,ce){Y.call(this,te,ce<<24>>24)}},{unsafe:!0})}else k=function(z){j(this,k,V),z=M(z),W(this,{bytes:N.call(new Array(z),0),byteLength:z}),p||(this.byteLength=z)},D=function(z,de,ce){j(this,D,H),j(z,k,H);var fe=U(z).byteLength,de=E(de);if(de<0||fe>24},getUint8:function(z){return s(this,1,z)[0]},getInt16:function(z){return z=s(this,2,z,1>16},getUint16:function(z){return z=s(this,2,z,1>>0},getFloat32:function(z){return ne(s(this,4,z,1"+n+""}},{"../internals/require-object-coercible":115}],37:[function(t,w,g){function i(){return this}var u=t("../internals/iterators-core").IteratorPrototype,o=t("../internals/object-create"),h=t("../internals/create-property-descriptor"),y=t("../internals/set-to-string-tag"),m=t("../internals/iterators");w.exports=function(n,s,c){return s+=" Iterator",n.prototype=o(u,{next:h(1,c)}),y(n,s,!1,!0),m[s]=i,n}},{"../internals/create-property-descriptor":39,"../internals/iterators":80,"../internals/iterators-core":79,"../internals/object-create":91,"../internals/set-to-string-tag":119}],38:[function(t,w,g){var i=t("../internals/descriptors"),u=t("../internals/object-define-property"),o=t("../internals/create-property-descriptor");w.exports=i?function(h,y,m){return u.f(h,y,o(1,m))}:function(h,y,m){return h[y]=m,h}},{"../internals/create-property-descriptor":39,"../internals/descriptors":43,"../internals/object-define-property":93}],39:[function(t,w,g){w.exports=function(i,u){return{enumerable:!(1&i),configurable:!(2&i),writable:!(4&i),value:u}}},{}],40:[function(t,w,g){var i=t("../internals/to-primitive"),u=t("../internals/object-define-property"),o=t("../internals/create-property-descriptor");w.exports=function(h,y,m){y=i(y),y in h?u.f(h,y,o(0,m)):h[y]=m}},{"../internals/create-property-descriptor":39,"../internals/object-define-property":93,"../internals/to-primitive":142}],41:[function(d,w,g){function i(){return this}var u=d("../internals/export"),o=d("../internals/create-iterator-constructor"),h=d("../internals/object-get-prototype-of"),y=d("../internals/object-set-prototype-of"),m=d("../internals/set-to-string-tag"),n=d("../internals/create-non-enumerable-property"),s=d("../internals/redefine"),c=d("../internals/well-known-symbol"),f=d("../internals/is-pure"),p=d("../internals/iterators"),d=d("../internals/iterators-core"),l=d.IteratorPrototype,b=d.BUGGY_SAFARI_ITERATORS,v=c("iterator"),j="values",E="entries";w.exports=function(T,M,P,W,C,I,A){o(P,M,W);function N(k){if(k===C&&ee)return ee;if(!b&&k in H)return H[k];switch(k){case"keys":case j:case E:return function(){return new P(this,k)}}return function(){return new P(this)}}var F,U,W=M+" Iterator",V=!1,H=T.prototype,Q=H[v]||H["@@iterator"]||C&&H[C],ee=!b&&Q||N(C),ae=M=="Array"&&H.entries||Q;if(ae&&(ae=h(ae.call(new T)),l!==Object.prototype&&ae.next&&(f||h(ae)===l||(y?y(ae,l):typeof ae[v]!="function"&&n(ae,v,i)),m(ae,W,!0,!0),f&&(p[W]=i))),C==j&&Q&&Q.name!==j&&(V=!0,ee=function(){return Q.call(this)}),f&&!A||H[v]===ee||n(H,v,ee),p[M]=ee,C)if(F={values:N(j),keys:I?ee:N("keys"),entries:N(E)},A)for(U in F)!b&&!V&&U in H||s(H,U,F[U]);else u({target:M,proto:!0,forced:b||V},F);return F}},{"../internals/create-iterator-constructor":37,"../internals/create-non-enumerable-property":38,"../internals/export":50,"../internals/is-pure":76,"../internals/iterators":80,"../internals/iterators-core":79,"../internals/object-get-prototype-of":98,"../internals/object-set-prototype-of":102,"../internals/redefine":110,"../internals/set-to-string-tag":119,"../internals/well-known-symbol":150}],42:[function(t,w,g){var i=t("../internals/path"),u=t("../internals/has"),o=t("../internals/well-known-symbol-wrapped"),h=t("../internals/object-define-property").f;w.exports=function(y){var m=i.Symbol||(i.Symbol={});u(m,y)||h(m,y,{value:o.f(y)})}},{"../internals/has":61,"../internals/object-define-property":93,"../internals/path":106,"../internals/well-known-symbol-wrapped":149}],43:[function(t,w,g){t=t("../internals/fails"),w.exports=!t(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})},{"../internals/fails":51}],44:[function(u,w,g){var i=u("../internals/global"),u=u("../internals/is-object"),o=i.document,h=u(o)&&u(o.createElement);w.exports=function(y){return h?o.createElement(y):{}}},{"../internals/global":60,"../internals/is-object":75}],45:[function(t,w,g){w.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},{}],46:[function(t,w,g){t=t("../internals/engine-user-agent"),w.exports=/(iphone|ipod|ipad).*applewebkit/i.test(t)},{"../internals/engine-user-agent":47}],47:[function(t,w,g){t=t("../internals/get-built-in"),w.exports=t("navigator","userAgent")||""},{"../internals/get-built-in":57}],48:[function(o,w,g){var i,u,h=o("../internals/global"),o=o("../internals/engine-user-agent"),h=h.process,h=h&&h.versions,h=h&&h.v8;h?u=(i=h.split("."))[0]+i[1]:o&&(!(i=o.match(/Edge\/(\d+)/))||74<=i[1])&&(i=o.match(/Chrome\/(\d+)/))&&(u=i[1]),w.exports=u&&+u},{"../internals/engine-user-agent":47,"../internals/global":60}],49:[function(t,w,g){w.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},{}],50:[function(t,w,g){var i=t("../internals/global"),u=t("../internals/object-get-own-property-descriptor").f,o=t("../internals/create-non-enumerable-property"),h=t("../internals/redefine"),y=t("../internals/set-global"),m=t("../internals/copy-constructor-properties"),n=t("../internals/is-forced");w.exports=function(s,c){var f,p,d,l=s.target,b=s.global,v=s.stat,j=b?i:v?i[l]||y(l,{}):(i[l]||{}).prototype;if(j)for(f in c){if(p=c[f],d=s.noTargetGet?(d=u(j,f))&&d.value:j[f],!n(b?f:l+(v?".":"#")+f,s.forced)&&d!==void 0){if(typeof p==typeof d)continue;m(p,d)}(s.sham||d&&d.sham)&&o(p,"sham",!0),h(j,f,p,s)}}},{"../internals/copy-constructor-properties":33,"../internals/create-non-enumerable-property":38,"../internals/global":60,"../internals/is-forced":74,"../internals/object-get-own-property-descriptor":94,"../internals/redefine":110,"../internals/set-global":117}],51:[function(t,w,g){w.exports=function(i){try{return!!i()}catch{return!0}}},{}],52:[function(c,w,g){c("../modules/es.regexp.exec");var i=c("../internals/redefine"),u=c("../internals/fails"),o=c("../internals/well-known-symbol"),h=c("../internals/regexp-exec"),y=c("../internals/create-non-enumerable-property"),m=o("species"),n=!u(function(){var d=/./;return d.exec=function(){var l=[];return l.groups={a:"7"},l},"".replace(d,"$")!=="7"}),s="a".replace(/./,"$0")==="$0",c=o("replace"),f=!!/./[c]&&/./[c]("a","$0")==="",p=!u(function(){var l=/(?:)/,d=l.exec,l=(l.exec=function(){return d.apply(this,arguments)},"ab".split(l));return l.length!==2||l[0]!=="a"||l[1]!=="b"});w.exports=function(d,l,b,v){var j,E,T=o(d),M=!u(function(){var R={};return R[T]=function(){return 7},""[d](R)!=7}),P=M&&!u(function(){var R=!1,C=/a/;return d==="split"&&((C={constructor:{}}).constructor[m]=function(){return C},C.flags="",C[T]=/./[T]),C.exec=function(){return R=!0,null},C[T](""),!R});M&&P&&(d!=="replace"||n&&s&&!f)&&(d!=="split"||p)||(j=/./[T],b=(P=b(T,""[d],function(R,C,I,A,N){return C.exec===h?M&&!N?{done:!0,value:j.call(C,I,A)}:{done:!0,value:R.call(I,C,A)}:{done:!1}},{REPLACE_KEEPS_$0:s,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:f}))[0],E=P[1],i(String.prototype,d,b),i(RegExp.prototype,T,l==2?function(R,C){return E.call(R,this,C)}:function(R){return E.call(R,this)})),v&&y(RegExp.prototype[T],"sham",!0)}},{"../internals/create-non-enumerable-property":38,"../internals/fails":51,"../internals/redefine":110,"../internals/regexp-exec":112,"../internals/well-known-symbol":150,"../modules/es.regexp.exec":195}],53:[function(t,w,g){function i(y,m,n,s,c,f,p,d){for(var l,b=c,v=0,j=!!p&&h(p,d,3);v>1,j=n===23?u(2,-24)-u(2,-77):0,E=m<0||m===0&&1/m<0?1:0,T=0;for((m=i(m))!=m||m===1/0?(f=m!=m?1:0,c=b):(c=o(h(m)/y),m*(p=u(2,-c))<1&&(c--,p*=2),2<=(m+=1<=c+v?j/p:j*u(2,1-v))*p&&(c++,p/=2),b<=c+v?(f=0,c=b):1<=c+v?(f=(m*p-1)*u(2,n),c+=v):(f=m*u(2,v-1)*u(2,n),c=0));8<=n;d[T++]=255&f,f/=256,n-=8);for(c=c<>1,d=b-7,l=c-1,b=m[l--],v=127&b;for(b>>=7;0>=-d,d+=n;0"+v+""},b=function(){try{u=document.domain&&new ActiveXObject("htmlfile")}catch{}b=u?((v=u).write(l("")),v.close(),j=v.parentWindow.Object,v=null,j):(v=s("iframe"),j="java"+p+":",v.style.display="none",n.appendChild(v),v.src=String(j),(j=v.contentWindow.document).open(),j.write(l("document.F=Object")),j.close(),j.F);for(var v,j,E=y.length;E--;)delete b[f][y[E]];return b()};m[d]=!0,w.exports=Object.create||function(v,j){var E;return v!==null?(i[f]=o(v),E=new i,i[f]=null,E[d]=v):E=b(),j===void 0?E:h(E,j)}},{"../internals/an-object":10,"../internals/document-create-element":44,"../internals/enum-bug-keys":49,"../internals/hidden-keys":62,"../internals/html":64,"../internals/object-define-properties":92,"../internals/shared-key":120}],92:[function(t,w,g){var i=t("../internals/descriptors"),u=t("../internals/object-define-property"),o=t("../internals/an-object"),h=t("../internals/object-keys");w.exports=i?Object.defineProperties:function(y,m){o(y);for(var n,s=h(m),c=s.length,f=0;fc;)!i(s,n=m[c++])||~o(f,n)||f.push(n);return f}},{"../internals/array-includes":18,"../internals/has":61,"../internals/hidden-keys":62,"../internals/to-indexed-object":136}],100:[function(t,w,g){var i=t("../internals/object-keys-internal"),u=t("../internals/enum-bug-keys");w.exports=Object.keys||function(o){return i(o,u)}},{"../internals/enum-bug-keys":49,"../internals/object-keys-internal":99}],101:[function(t,w,g){var i={}.propertyIsEnumerable,u=Object.getOwnPropertyDescriptor,o=u&&!i.call({1:2},1);g.f=o?function(h){return h=u(this,h),!!h&&h.enumerable}:i},{}],102:[function(t,w,g){var i=t("../internals/an-object"),u=t("../internals/a-possible-prototype");w.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var o,h=!1,y={};try{(o=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(y,[]),h=y instanceof Array}catch{}return function(m,n){return i(m),u(n),h?o.call(m,n):m.__proto__=n,m}}():void 0)},{"../internals/a-possible-prototype":6,"../internals/an-object":10}],103:[function(t,w,g){function i(m){return function(n){for(var s,c=h(n),f=o(c),p=f.length,d=0,l=[];dl&&(p=p.slice(0,l)),m?f+p:p+f)}}var u=t("../internals/to-length"),o=t("../internals/string-repeat"),h=t("../internals/require-object-coercible"),y=Math.ceil;w.exports={start:i(!1),end:i(!0)}},{"../internals/require-object-coercible":115,"../internals/string-repeat":129,"../internals/to-length":138}],128:[function(t,w,g){function i(b){return b+22+75*(b<26)}function u(b){var v,j=[],E=(b=function(Q){for(var ee=[],ae=0,k=Q.length;aed((o-M)/N))throw RangeError(f);for(M+=(I-T)*N,T=I,A=0;Ao)throw RangeError(f);if(v==T){for(var F=M,U=h;;U+=h){var W=U<=P?1:P+y<=U?y:U-P;if(F>1,Q+=d(Q/ee);p*y>>1>>=1)&&(h+=h))1&m&&(y+=h);return y}},{"../internals/require-object-coercible":115,"../internals/to-integer":137}],130:[function(t,w,g){var i=t("../internals/fails"),u=t("../internals/whitespaces");w.exports=function(o){return i(function(){return!!u[o]()||"​…᠎"[o]()!="​…᠎"||u[o].name!==o})}},{"../internals/fails":51,"../internals/whitespaces":151}],131:[function(o,w,g){function i(m){return function(n){return n=String(u(n)),1&m&&(n=n.replace(h,"")),n=2&m?n.replace(y,""):n}}var u=o("../internals/require-object-coercible"),o="["+o("../internals/whitespaces")+"]",h=RegExp("^"+o+o+"*"),y=RegExp(o+o+"*$");w.exports={start:i(1),end:i(2),trim:i(3)}},{"../internals/require-object-coercible":115,"../internals/whitespaces":151}],132:[function(p,w,g){function i(C){return function(){R(C)}}function u(C){R(C.data)}function o(C){y.postMessage(C+"",d.protocol+"//"+d.host)}var h,y=p("../internals/global"),m=p("../internals/fails"),n=p("../internals/classof-raw"),s=p("../internals/function-bind-context"),c=p("../internals/html"),f=p("../internals/document-create-element"),p=p("../internals/engine-is-ios"),d=y.location,l=y.setImmediate,b=y.clearImmediate,v=y.process,j=y.MessageChannel,E=y.Dispatch,T=0,M={},P="onreadystatechange",R=function(C){var I;M.hasOwnProperty(C)&&(I=M[C],delete M[C],I())};l&&b||(l=function(C){for(var I=[],A=1;A=f.length?{value:c.target=void 0,done:!0}:p=="keys"?{value:d,done:!1}:p=="values"?{value:f[d],done:!1}:{value:[d,f[d]],done:!1}},"values"),o.Arguments=o.Array,u("keys"),u("values"),u("entries")},{"../internals/add-to-unscopables":7,"../internals/define-iterator":41,"../internals/internal-state":71,"../internals/iterators":80,"../internals/to-indexed-object":136}],166:[function(y,w,g){var i=y("../internals/export"),h=y("../internals/indexed-object"),u=y("../internals/to-indexed-object"),y=y("../internals/array-method-is-strict"),o=[].join,h=h!=Object,y=y("join",",");i({target:"Array",proto:!0,forced:h||!y},{join:function(m){return o.call(u(this),m===void 0?",":m)}})},{"../internals/array-method-is-strict":22,"../internals/export":50,"../internals/indexed-object":67,"../internals/to-indexed-object":136}],167:[function(u,w,g){var i=u("../internals/export"),u=u("../internals/array-last-index-of");i({target:"Array",proto:!0,forced:u!==[].lastIndexOf},{lastIndexOf:u})},{"../internals/array-last-index-of":20,"../internals/export":50}],168:[function(h,w,g){var i=h("../internals/export"),u=h("../internals/array-iteration").map,o=h("../internals/array-method-has-species-support"),h=h("../internals/array-method-uses-to-length"),o=o("map"),h=h("map");i({target:"Array",proto:!0,forced:!o||!h},{map:function(y){return u(this,y,1I;I++)m(E,P=C[I])&&!m(R,P)&&b(R,P,l(E,P));(R.prototype=T).constructor=R,y(o,j,R)}},{"../internals/classof-raw":28,"../internals/descriptors":43,"../internals/fails":51,"../internals/global":60,"../internals/has":61,"../internals/inherit-if-required":68,"../internals/is-forced":74,"../internals/object-create":91,"../internals/object-define-property":93,"../internals/object-get-own-property-descriptor":94,"../internals/object-get-own-property-names":96,"../internals/redefine":110,"../internals/string-trim":131,"../internals/to-primitive":142}],180:[function(t,w,g){t("../internals/export")({target:"Number",stat:!0},{EPSILON:Math.pow(2,-52)})},{"../internals/export":50}],181:[function(t,w,g){t("../internals/export")({target:"Number",stat:!0},{isFinite:t("../internals/number-is-finite")})},{"../internals/export":50,"../internals/number-is-finite":89}],182:[function(m,w,g){function i(c,f,p){return f===0?p:f%2==1?i(c,f-1,p*c):i(c*c,f/2,p)}var u=m("../internals/export"),o=m("../internals/to-integer"),h=m("../internals/this-number-value"),y=m("../internals/string-repeat"),m=m("../internals/fails"),n=1 .toFixed,s=Math.floor;u({target:"Number",proto:!0,forced:n&&(8e-5.toFixed(3)!=="0.000"||.9.toFixed(0)!=="1"||1.255.toFixed(2)!=="1.25"||0xde0b6b3a7640080.toFixed(0)!=="1000000000000000128")||!m(function(){n.call({})})},{toFixed:function(j){function f(P,R){for(var C=-1,I=R;++C<6;)I+=P*E[C],E[C]=I%1e7,I=s(I/1e7)}function p(P){for(var R=6,C=0;0<=--R;)C+=E[R],E[R]=s(C/P),C=C%P*1e7}function d(){for(var P,R=6,C="";0<=--R;)C===""&&R!==0&&E[R]===0||(P=String(E[R]),C=C===""?P:C+y.call("0",7-P.length)+P);return C}var l,b,v=h(this),j=o(j),E=[0,0,0,0,0,0],T="",M="0";if(j<0||20Pe;){var He,We,qe,$e=se[Pe++],lt=Se?$e.ok:$e.fail,ot=$e.resolve,Ze=$e.reject,it=$e.domain;try{lt?(Se||(Te.rejection===ye&&function(nt,Ct){C.call(n,function(){he?J.emit("rejectionHandled",nt):Re(te,nt,Ct.value)})}(Le,Te),Te.rejection=de),lt===!0?He=xe:(it&&it.enter(),He=lt(xe),it&&(it.exit(),qe=!0)),He===$e.promise?Ze(X("Promise-chain cycle")):(We=ge(He))?We.call(He,ot,Ze):ot(He)):Ze(xe)}catch(nt){it&&!qe&&it.exit(),Ze(nt)}}Te.reactions=[],Te.notified=!1,re&&!Te.rejection&&(Z=Le,le=Te,C.call(n,function(){var nt=le.value,Ct=Ie(le);if(Ct&&(Ct=U(function(){he?J.emit("unhandledRejection",nt,Z):Re(z,Z,nt)}),le.rejection=he||Ie(le)?ye:de,Ct.error))throw Ct.value}))}))},Re=function(Le,Te,re){var se;Y?((se=K.createEvent("Event")).promise=Te,se.reason=re,se.initEvent(Le,!1,!0),n.dispatchEvent(se)):se={promise:Te,reason:re},(Te=n["on"+Le])?Te(se):Le===z&&N("Unhandled promise rejection",re)},Ie=function(Le){return Le.rejection!==de&&!Le.parent},Fe=function(Le,Te,re,se){return function(Z){Le(Te,re,Z,se)}},Ge=function(Le,Te,re,se){Te.done||(Te.done=!0,(Te=se||Te).value=re,Te.state=fe,Ne(Le,Te,!0))},we=function(Le,Te,re,se){if(!Te.done){Te.done=!0,se&&(Te=se);try{if(Le===re)throw X("Promise can't be resolved itself");var Z=ge(re);Z?I(function(){var le={done:!1};try{Z.call(re,Fe(we,Le,le,Te),Fe(Ge,Le,le,Te))}catch(xe){Ge(Le,le,xe,Te)}}):(Te.value=re,Te.state=ce,Ne(Le,Te,!1))}catch(le){Ge(Le,{done:!1},le,Te)}}};ve&&(G=function(Le){j(this,G,ee),v(Le),i.call(this);var Te=ae(this);try{Le(Fe(we,this,Te),Fe(Ge,this,Te))}catch(re){Ge(this,Te,re)}},(i=function(Le){k(this,{type:ee,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=p(G.prototype,{then:function(Le,Te){var re=D(this),se=ue(R(this,G));return se.ok=typeof Le!="function"||Le,se.fail=typeof Te=="function"&&Te,se.domain=he?J.domain:void 0,re.parent=!0,re.reactions.push(se),re.state!=0&&Ne(this,re,!1),se.promise},catch:function(Le){return this.then(void 0,Le)}}),u=function(){var Le=new i,Te=ae(Le);this.promise=Le,this.resolve=Fe(we,Le,Te),this.reject=Fe(Ge,Le,Te)},F.f=ue=function(Le){return Le===G||Le===o?new u:ie(Le)},m||typeof c!="function"||(h=c.prototype.then,f(c.prototype,"then",function(Le,Te){var re=this;return new G(function(se,Z){h.call(re,se,Z)}).then(Le,Te)},{unsafe:!0}),typeof ne=="function"&&y({global:!0,enumerable:!0,forced:!0},{fetch:function(Le){return A(G,ne.apply(n,arguments))}}))),y({global:!0,wrap:!0,forced:ve},{Promise:G}),d(G,ee,!1,!0),l(ee),o=s(ee),y({target:ee,stat:!0,forced:ve},{reject:function(Le){var Te=ue(this);return Te.reject.call(void 0,Le),Te.promise}}),y({target:ee,stat:!0,forced:m||ve},{resolve:function(Le){return A(m&&this===o?G:this,Le)}}),y({target:ee,stat:!0,forced:Ee},{all:function(Le){var Te=this,re=ue(Te),se=re.resolve,Z=re.reject,le=U(function(){var xe=v(Te.resolve),Se=[],Pe=0,He=1;M(Le,function(We){var qe=Pe++,$e=!1;Se.push(void 0),He++,xe.call(Te,We).then(function(lt){$e||($e=!0,Se[qe]=lt,--He||se(Se))},Z)}),--He||se(Se)});return le.error&&Z(le.value),re.promise},race:function(Le){var Te=this,re=ue(Te),se=re.reject,Z=U(function(){var le=v(Te.resolve);M(Le,function(xe){le.call(Te,xe).then(re.resolve,se)})});return Z.error&&se(Z.value),re.promise}})},{"../internals/a-function":5,"../internals/an-instance":9,"../internals/check-correctness-of-iteration":27,"../internals/classof-raw":28,"../internals/engine-v8-version":48,"../internals/export":50,"../internals/get-built-in":57,"../internals/global":60,"../internals/host-report-errors":63,"../internals/inspect-source":69,"../internals/internal-state":71,"../internals/is-forced":74,"../internals/is-object":75,"../internals/is-pure":76,"../internals/iterate":78,"../internals/microtask":82,"../internals/native-promise-constructor":83,"../internals/new-promise-capability":87,"../internals/perform":107,"../internals/promise-resolve":108,"../internals/redefine":110,"../internals/redefine-all":109,"../internals/set-species":118,"../internals/set-to-string-tag":119,"../internals/species-constructor":123,"../internals/task":132,"../internals/well-known-symbol":150}],192:[function(n,w,g){var i=n("../internals/export"),p=n("../internals/get-built-in"),u=n("../internals/a-function"),o=n("../internals/an-object"),h=n("../internals/is-object"),y=n("../internals/object-create"),m=n("../internals/function-bind"),n=n("../internals/fails"),s=p("Reflect","construct"),c=n(function(){function d(){}return!(s(function(){},[],d)instanceof d)}),f=!n(function(){s(function(){})}),p=c||f;i({target:"Reflect",stat:!0,forced:p,sham:p},{construct:function(d,l){u(d),o(l);var b=arguments.length<3?d:u(arguments[2]);if(f&&!c)return s(d,l,b);if(d==b){switch(l.length){case 0:return new d;case 1:return new d(l[0]);case 2:return new d(l[0],l[1]);case 3:return new d(l[0],l[1],l[2]);case 4:return new d(l[0],l[1],l[2],l[3])}var v=[null];return v.push.apply(v,l),new(m.apply(d,v))}return v=b.prototype,b=y(h(v)?v:Object.prototype),v=Function.apply.call(d,b,l),h(v)?v:b}})},{"../internals/a-function":5,"../internals/an-object":10,"../internals/export":50,"../internals/fails":51,"../internals/function-bind":56,"../internals/get-built-in":57,"../internals/is-object":75,"../internals/object-create":91}],193:[function(t,w,g){var i=t("../internals/export"),u=t("../internals/is-object"),o=t("../internals/an-object"),h=t("../internals/has"),y=t("../internals/object-get-own-property-descriptor"),m=t("../internals/object-get-prototype-of");i({target:"Reflect",stat:!0},{get:function n(s,c){var f,p=arguments.length<3?s:arguments[2];return o(s)===p?s[c]:(f=y.f(s,c))?h(f,"value")?f.value:f.get===void 0?void 0:f.get.call(p):u(f=m(s))?n(f,c,p):void 0}})},{"../internals/an-object":10,"../internals/export":50,"../internals/has":61,"../internals/is-object":75,"../internals/object-get-own-property-descriptor":94,"../internals/object-get-prototype-of":98}],194:[function(t,w,g){var i=t("../internals/descriptors"),u=t("../internals/global"),o=t("../internals/is-forced"),h=t("../internals/inherit-if-required"),y=t("../internals/object-define-property").f,m=t("../internals/object-get-own-property-names").f,n=t("../internals/is-regexp"),s=t("../internals/regexp-flags"),c=t("../internals/regexp-sticky-helpers"),f=t("../internals/redefine"),p=t("../internals/fails"),d=t("../internals/internal-state").set,l=t("../internals/set-species"),b=t("../internals/well-known-symbol")("match"),v=u.RegExp,j=v.prototype,E=/a/g,T=/a/g,M=new v(E)!==E,P=c.UNSUPPORTED_Y;if(i&&o("RegExp",!M||P||p(function(){return T[b]=!1,v(E)!=E||v(T)==T||v(E,"i")!="/a/i"}))){for(var R=function(A,N){var F,U=this instanceof R,W=n(A),V=N===void 0;return!U&&W&&A.constructor===R&&V?A:(M?W&&!V&&(A=A.source):A instanceof R&&(V&&(N=s.call(A)),A=A.source),P&&(F=!!N&&-1I;)(function(A){A in R||y(R,A,{configurable:!0,get:function(){return v[A]},set:function(N){v[A]=N}})})(C[I++]);(j.constructor=R).prototype=j,f(u,"RegExp",R)}l("RegExp")},{"../internals/descriptors":43,"../internals/fails":51,"../internals/global":60,"../internals/inherit-if-required":68,"../internals/internal-state":71,"../internals/is-forced":74,"../internals/is-regexp":77,"../internals/object-define-property":93,"../internals/object-get-own-property-names":96,"../internals/redefine":110,"../internals/regexp-flags":113,"../internals/regexp-sticky-helpers":114,"../internals/set-species":118,"../internals/well-known-symbol":150}],195:[function(u,w,g){var i=u("../internals/export"),u=u("../internals/regexp-exec");i({target:"RegExp",proto:!0,forced:/./.exec!==u},{exec:u})},{"../internals/export":50,"../internals/regexp-exec":112}],196:[function(h,w,g){var i=h("../internals/redefine"),u=h("../internals/an-object"),n=h("../internals/fails"),o=h("../internals/regexp-flags"),h="toString",y=RegExp.prototype,m=y[h],n=n(function(){return m.call({source:"a",flags:"b"})!="/a/b"}),s=m.name!=h;(n||s)&&i(RegExp.prototype,h,function(){var c=u(this),f=String(c.source),p=c.flags;return"/"+f+"/"+String(p===void 0&&c instanceof RegExp&&!("flags"in y)?o.call(c):p)},{unsafe:!0})},{"../internals/an-object":10,"../internals/fails":51,"../internals/redefine":110,"../internals/regexp-flags":113}],197:[function(u,w,g){var i=u("../internals/collection"),u=u("../internals/collection-strong");w.exports=i("Set",function(o){return function(){return o(this,arguments.length?arguments[0]:void 0)}},u)},{"../internals/collection":32,"../internals/collection-strong":30}],198:[function(m,w,g){var i=m("../internals/export"),u=m("../internals/object-get-own-property-descriptor").f,o=m("../internals/to-length"),h=m("../internals/not-a-regexp"),y=m("../internals/require-object-coercible"),c=m("../internals/correct-is-regexp-logic"),m=m("../internals/is-pure"),n="".endsWith,s=Math.min,c=c("endsWith");i({target:"String",proto:!0,forced:!!(m||c||!(i=u(String.prototype,"endsWith"))||i.writable)&&!c},{endsWith:function(f){var p=String(y(this)),d=(h(f),1=s.length?{value:void 0,done:!0}:(s=i(s,c),n.index+=s.length,{value:s,done:!1})})},{"../internals/define-iterator":41,"../internals/internal-state":71,"../internals/string-multibyte":125}],201:[function(t,w,g){var i=t("../internals/fix-regexp-well-known-symbol-logic"),u=t("../internals/an-object"),o=t("../internals/to-length"),h=t("../internals/require-object-coercible"),y=t("../internals/advance-string-index"),m=t("../internals/regexp-exec-abstract");i("match",1,function(n,s,c){return[function(f){var p=h(this),d=f==null?void 0:f[n];return d!==void 0?d.call(f,p):new RegExp(f)[n](String(p))},function(f){var p=c(s,f,this);if(p.done)return p.value;var d=u(f),l=String(this);if(!d.global)return m(d,l);for(var b=d.unicode,v=[],j=d.lastIndex=0;(E=m(d,l))!==null;){var E=String(E[0]);(v[j]=E)===""&&(d.lastIndex=y(l,o(d.lastIndex),b)),j++}return j===0?null:v}]})},{"../internals/advance-string-index":8,"../internals/an-object":10,"../internals/fix-regexp-well-known-symbol-logic":52,"../internals/regexp-exec-abstract":111,"../internals/require-object-coercible":115,"../internals/to-length":138}],202:[function(t,w,g){var i=t("../internals/export"),u=t("../internals/string-pad").start;i({target:"String",proto:!0,forced:t("../internals/string-pad-webkit-bug")},{padStart:function(o){return u(this,o,1]*>)/g,l=/\$([$&'`]|\d\d?)/g;i("replace",2,function(b,v,j,E){var T=E.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,M=E.REPLACE_KEEPS_$0,P=T?"$":"$0";return[function(R,C){var I=m(this),A=R==null?void 0:R[b];return A!==void 0?A.call(R,I,C):v.call(String(I),R,C)},function(R,C){if(!T&&M||typeof C=="string"&&C.indexOf(P)===-1){var I=j(v,R,this,C);if(I.done)return I.value}for(var A,N=u(R),F=String(this),U=typeof C=="function",W=(U||(C=String(C)),N.global),V=(W&&(A=N.unicode,N.lastIndex=0),[]);(k=s(N,F))!==null&&(V.push(k),W);)String(k[0])===""&&(N.lastIndex=n(F,h(N.lastIndex),A));for(var H,Q="",ee=0,ae=0;ae>>0;if(C==0)return[];if(M===void 0)return[R];if(!u(M))return j.call(R,M,C);for(var I,A,N,F=[],P=(M.ignoreCase?"i":"")+(M.multiline?"m":"")+(M.unicode?"u":"")+(M.sticky?"y":""),U=0,W=new RegExp(M.source,P+"g");(I=c.call(W,R))&&!(U<(A=W.lastIndex)&&(F.push(R.slice(U,I.index)),1=C));)W.lastIndex===I.index&&W.lastIndex++;return U===R.length?!N&&W.test("")||F.push(""):F.push(R.slice(U)),F.length>C?F.slice(0,C):F}:"0".split(void 0,0).length?function(M,P){return M===void 0&&P===0?[]:j.call(this,M,P)}:j;return[function(M,P){var R=h(this),C=M==null?void 0:M[v];return C!==void 0?C.call(M,R,P):T.call(String(R),M,P)},function(I,P){var R=E(T,I,this,P,T!==j);if(R.done)return R.value;var R=o(I),C=String(this),I=y(R,RegExp),A=R.unicode,N=(R.ignoreCase?"i":"")+(R.multiline?"m":"")+(R.unicode?"u":"")+(b?"y":"g"),F=new I(b?R:"^(?:"+R.source+")",N),U=P===void 0?l:P>>>0;if(U==0)return[];if(C.length===0)return s(F,C)===null?[C]:[];for(var W=0,V=0,H=[];Vne.key){he.splice(ue,0,ne);break}ue===z&&he.push(ne)}ie.updateURL()},forEach:function(ne){for(var ue,ie=H(this).entries,he=j(ne,16))return;for(Gt=0;rr();){if(tr=null,Gt>0)if(rr()=="."&&Gt<4)Ye++;else return;if(!G.test(rr()))return;for(;G.test(rr());){if(Wr=parseInt(rr(),10),tr===null)tr=Wr;else{if(tr==0)return;tr=tr*10+Wr}if(tr>255)return;Ye++}gt[Xe]=gt[Xe]*256+tr,Gt++,(Gt==2||Gt==4)&&Xe++}if(Gt!=4)return;break}else if(rr()==":"){if(Ye++,!rr())return}else if(rr())return;gt[Xe++]=Ht}if(pt!==null)for(kr=Xe-pt,Xe=7;Xe!=0&&kr>0;)qr=gt[Xe],gt[Xe--]=gt[pt+kr-1],gt[pt+--kr]=qr;else if(Xe!=8)return;return gt}(ze.slice(1,-1)))?void(_e.host=Ke):ee;if(ge(_e))return ze=M(ze),ue.test(ze)||(Ke=function(Be){var gt=Be.split("."),Xe,pt,Ye,Ht,Yt,Gt,tr;if(gt.length&>[gt.length-1]==""&>.pop(),(Xe=gt.length)>4)return Be;for(pt=[],Ye=0;Ye1&&Ht.charAt(0)=="0"&&(Yt=X.test(Ht)?16:8,Ht=Ht.slice(Yt==8?1:2)),Ht==="")Gt=0;else{if(!(Yt==10?J:Yt==8?K:ne).test(Ht))return Be;Gt=parseInt(Ht,Yt)}pt.push(Gt)}for(Ye=0;Ye=V(256,5-Xe))return null}else if(Gt>255)return null;for(tr=pt.pop(),Ye=0;Ye":1,"`":1}),de=j({},fe,{"#":1,"?":1,"{":1,"}":1}),ye=j({},de,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),ve=function(_e,ze){var Ke=T(_e,0);return 32"u"&&i!==void 0&&{}.toString.call(i)==="[object process]",b=typeof Uint8ClampedArray<"u"&&typeof importScripts<"u"&&typeof MessageChannel<"u";function v(){var z=setTimeout;return function(){return z(E,1)}}var j=new Array(1e3);function E(){for(var z=0;zR,applyPalette:()=>function(U,W,V="rgb565"){if(!U||!U.buffer)throw new Error("quantize() expected RGBA Uint8Array data");if(!(U instanceof Uint8Array||U instanceof Uint8ClampedArray))throw new Error("quantize() expected RGBA Uint8Array data");if(256>24&255,G=K>>16&255,X=K>>8&255,K=255&K,J=f(K,X,G,D),J=J in k?k[J]:k[J]=function(z,te,ce,fe,de){let ye=0,ve=1e100;for(let Re=0;Reve||(Ee=ge[0],(Ne+=T(Ee-z))>ve||(Ee=ge[1],(Ne+=T(Ee-te))>ve||(Ee=ge[2],(Ne+=T(Ee-ce))>ve||(ve=Ne,ye=Re))))}return ye}(K,X,G,D,W);ae[Y]=J}else{const Y=V==="rgb444"?p:c;for(let z=0;z>16&255,ue=ie>>8&255,ie=255&ie,he=Y(ie,ue,ne),he=he in k?k[he]:k[he]=function(te,ce,fe,de){let ye=0,ve=1e100;for(let Re=0;Reve||(Ee=ge[1],(Ne+=T(Ee-ce))>ve||(Ee=ge[2],(Ne+=T(Ee-fe))>ve||(ve=Ne,ye=Re)))}return ye}(ie,ue,ne,W);ae[z]=he}}return ae},default:()=>F,nearestColor:()=>function(U,W,V=j){return U[M(U,W,V)]},nearestColorIndex:()=>M,nearestColorIndexWithDistance:()=>P,prequantize:()=>function(U,{roundRGB:W=5,roundAlpha:V=10,oneBitAlpha:H=null}={}){const Q=new Uint32Array(U.buffer);for(let G=0;G>24&255;var ee,ae=D>>16&255,k=D>>8&255,D=255&D;X=E(X,V),H&&(ee=typeof H=="number"?H:127,X=X<=ee?0:255),D=E(D,W),k=E(k,W),ae=E(ae,W),Q[G]=X<<24|ae<<16|k<<8|D<<0}},quantize:()=>function(U,W,V={}){var{format:H="rgb565",clearAlpha:Q=!0,clearAlphaColor:ee=0,clearAlphaThreshold:ae=0,oneBitAlpha:k=!1}=V;if(!U||!U.buffer)throw new Error("quantize() expected RGBA Uint8Array data");if(!(U instanceof Uint8Array||U instanceof Uint8ClampedArray))throw new Error("quantize() expected RGBA Uint8Array data");U=new Uint32Array(U.buffer);let D=V.useSqrt!==!1;const G=H==="rgba4444",X=function(Ie,Fe){const Ge=Fe==="rgb444"?4096:65536,we=new Array(Ge),Le=Ie.length;if(Fe==="rgba4444")for(let ot=0;ot>24&255,re=Z>>16&255,se=Z>>8&255,Z=255&Z,le=f(Z,se,re,Te);let Ze=le in we?we[le]:we[le]=v();Ze.rc+=Z,Ze.gc+=se,Ze.bc+=re,Ze.ac+=Te,Ze.cnt++}else if(Fe==="rgb444")for(let ot=0;ot>16&255,Se=Pe>>8&255,Pe=255&Pe,He=p(Pe,Se,xe);let Ze=He in we?we[He]:we[He]=v();Ze.rc+=Pe,Ze.gc+=Se,Ze.bc+=xe,Ze.cnt++}else for(let ot=0;ot>16&255,qe=$e>>8&255,$e=255&$e,lt=c($e,qe,We);let Ze=lt in we?we[lt]:we[lt]=v();Ze.rc+=$e,Ze.gc+=qe,Ze.bc+=We,Ze.cnt++}return we}(U,H),K=X.length,J=K-1,ne=new Uint32Array(K+1);for(var ue=0,ie=0;ie>1,!(X[he=ne[z]].err<=te));Y=z)ne[Y]=he;ne[Y]=ie}var ce,fe=ue-W;for(ie=0;ie=ce.mtm&&X[ce.nn].mtm<=ce.tm)break;for(ce.mtm==J?de=ne[1]=ne[ne[0]--]:(b(X,de),ce.tm=ie),te=X[de].err,Y=1;(z=Y+Y)<=ne[0]&&(zX[ne[z+1]].err&&z++,!(te<=X[he=ne[z]].err));Y=z)ne[Y]=he;ne[Y]=de}var ye=X[ce.nn],ve=ce.cnt,Ee=ye.cnt,ge=1/(ve+Ee);G&&(ce.ac=ge*(ve*ce.ac+Ee*ye.ac)),ce.rc=ge*(ve*ce.rc+Ee*ye.rc),ce.gc=ge*(ve*ce.gc+Ee*ye.gc),ce.bc=ge*(ve*ce.bc+Ee*ye.bc),ce.cnt+=ye.cnt,ce.mtm=++ie,X[ye.bk].fw=ye.fw,X[ye.fw].bk=ye.bk,ye.mtm=J}let Ne=[];for(ie=0;;0){let Ie=d(Math.round(X[ie].rc),0,255),Fe=d(Math.round(X[ie].gc),0,255),Ge=d(Math.round(X[ie].bc),0,255),we=255;G&&(we=d(Math.round(X[ie].ac),0,255),k&&(Re=typeof k=="number"?k:127,we=we<=Re?0:255),Q&&we<=ae&&(Ie=Fe=Ge=ee,we=0));var Re=G?[Ie,Fe,Ge,we]:[Ie,Fe,Ge];if(function(Le,Te){for(let Z=0;Zfunction(U,W,V=5){if(U.length&&W.length){var H=U.map(D=>D.slice(0,3)),Q=V*V,ee=U[0].length;for(let D=0;Dee?G.slice(0,3):G.slice();var k=P(H,G.slice(0,3),j),ae=k[0],k=k[1];0>>0),ee!=0&&(Q=Math.max(Q,256));const ae=V;V=new Uint8Array(Q),0>=8,K-=8;if((te>he||ue)&&(ue?(ie=ne,he=(1<>=8,K-=8;0>3}function f(U,W,V,H){return U>>4|240&W|(240&V)<<4|(240&H)<<8}function p(U,W,V){return U>>4<<8|240&W|V>>4}function d(U,W,V){return U>8&255)}function A(U,W){for(var V=0;V>1,p=-7,d=o?b-1:0,l=o?-1:1,b=i[u+d];for(d+=l,m=b&(1<<-p)-1,b>>=-p,p+=s;0>=-p,p+=h;0>1,d=y===23?Math.pow(2,-24)-Math.pow(2,-77):0,l=h?0:v-1,b=h?1:-1,v=u<0||u===0&&1/u<0?1:0;for(u=Math.abs(u),isNaN(u)||u===1/0?(s=isNaN(u)?1:0,n=f):(n=Math.floor(Math.log(u)/Math.LN2),u*(h=Math.pow(2,-n))<1&&(n--,h*=2),2<=(u+=1<=n+p?d/h:d*Math.pow(2,1-p))*h&&(n++,h/=2),f<=n+p?(s=0,n=f):1<=n+p?(s=(u*h-1)*Math.pow(2,y),n+=p):(s=u*Math.pow(2,p-1)*Math.pow(2,y),n=0));8<=y;i[o+l]=255&s,l+=b,s/=256,y-=8);for(n=n<Math.abs(re[0])&&(se=1),se=Math.abs(re[2])>Math.abs(re[se])?2:se}function I(re,se){re.f+=se.f,re.b.f+=se.b.f}function A(re,se,Z){return re=re.a,se=se.a,Z=Z.a,se.b.a===re?Z.b.a===re?o(se.a,Z.a)?y(Z.b.a,se.a,Z.a)<=0:0<=y(se.b.a,Z.a,se.a):y(Z.b.a,re,Z.a)<=0:Z.b.a===re?0<=y(se.b.a,re,se.a):(se=h(se.b.a,re,se.a),(re=h(Z.b.a,re,Z.a))<=se)}function N(re){re.a.i=null;var se=re.e;se.a.c=se.c,se.c.a=se.a,re.e=null}function F(re,se){d(re.a),re.c=!1,(re.a=se).i=re}function U(re){for(var se=re.a.a;(re=Te(re)).a.a===se;);return re.c&&(F(re,se=b(Le(re).a.b,re.a.e)),re=Te(re)),re}function W(re,se,Z){var le=new we;return le.a=Z,le.e=ue(re.f,se.e,le),Z.i=le}function V(re,se){switch(re.s){case 100130:return(1&se)!=0;case 100131:return se!==0;case 100132:return 0>1]],He[Pe[qe]])?Fe:Ge)(Z,qe),He[Se]=null,We[Se]=Z.b,Z.b=Se}else for(Z.c[-(Se+1)]=null;0Math.max(Pe.a,We.a))){if(o(Se,Pe)){if(0Z.f&&(Z.f*=2,Z.c=Ne(Z.c,Z.f+1)),Z.b===0?xe=le:(xe=Z.b,Z.b=Z.c[Z.b]),Z.e[xe]=se,Z.c[xe]=le,Z.d[le]=xe,Z.h&&Ge(Z,le),xe):(Z=re.a++,re.c[Z]=se,-(Z+1))}function Ee(re){if(re.a===0)return Ie(re.b);var se=re.c[re.d[re.a-1]];if(re.b.a!==0&&o(Re(re.b),se))return Ie(re.b);for(;--re.a,0re.a||o(le[Pe],le[We])){xe[Z[Se]=Pe]=Se;break}xe[Z[Se]=We]=Se,Se=He}}function Ge(re,se){for(var Z=re.d,le=re.e,xe=re.c,Se=se,Pe=Z[Se];;){var He=Se>>1,We=Z[He];if(He==0||o(le[We],le[Pe])){xe[Z[Se]=Pe]=Se;break}xe[Z[Se]=We]=Se,Se=He}}function we(){this.e=this.a=null,this.f=0,this.c=this.b=this.h=this.d=!1}function Le(re){return re.e.c.b}function Te(re){return re.e.a.b}(i=he.prototype).x=function(){Y(this,0)},i.B=function(re,se){switch(re){case 100142:return;case 100140:switch(se){case 100130:case 100131:case 100132:case 100133:case 100134:return void(this.s=se)}break;case 100141:return void(this.m=!!se);default:return void z(this,100900)}z(this,100901)},i.y=function(re){switch(re){case 100142:return 0;case 100140:return this.s;case 100141:return this.m;default:z(this,100900)}return!1},i.A=function(re,se,Z){this.j[0]=re,this.j[1]=se,this.j[2]=Z},i.z=function(re,se){var Z=se||null;switch(re){case 100100:case 100106:this.h=Z;break;case 100104:case 100110:this.l=Z;break;case 100101:case 100107:this.k=Z;break;case 100102:case 100108:this.i=Z;break;case 100103:case 100109:this.p=Z;break;case 100105:case 100111:this.o=Z;break;case 100112:this.r=Z;break;default:z(this,100900)}},i.C=function(re,se){var Z=!1,le=[0,0,0];Y(this,2);for(var xe=0;xe<3;++xe){var Se=re[xe];Se<-1e150&&(Se=-1e150,Z=!0),1e150le[qe]&&(le[qe]=$e,xe[qe]=Z)}if(le[1]-He[1]>le[Z=0]-He[0]&&(Z=1),He[Z=le[2]-He[2]>le[Z]-He[Z]?2:Z]>=le[Z])Pe[0]=0,Pe[1]=0,Pe[2]=1;else{for(He=We[Z],xe=xe[Z],We=[le=0,0,0],He=[He.g[0]-xe.g[0],He.g[1]-xe.g[1],He.g[2]-xe.g[2]],qe=[0,0,0],Z=Se.e;Z!==Se;Z=Z.e)qe[0]=Z.g[0]-xe.g[0],qe[1]=Z.g[1]-xe.g[1],qe[2]=Z.g[2]-xe.g[2],We[0]=He[1]*qe[2]-He[2]*qe[1],We[1]=He[2]*qe[0]-He[0]*qe[2],We[2]=He[0]*qe[1]-He[1]*qe[0],le<($e=We[0]*We[0]+We[1]*We[1]+We[2]*We[2])&&(le=$e,Pe[0]=We[0],Pe[1]=We[1],Pe[2]=We[2]);le<=0&&(Pe[0]=Pe[1]=Pe[2]=0,Pe[C(He)]=1)}Se=!0}for(We=C(Pe),Z=this.b.c,le=(We+1)%3,xe=(We+2)%3,We=0>=1;)++p;if(l=1<>8&255,o[n++]=255&y,o[n++]=y>>8&255,o[n++]=(c!==null?128:0)|p,o[n++]=d,o[n++]=0,c!==null)for(var b=0,v=c.length;b>16&255,o[n++]=j>>8&255,o[n++]=255&j}if(s!==null){if(s<0||65535>8&255,o[n++]=0}var E=!1;this.addFrame=function(T,M,P,R,C,I){if(E===!0&&(--n,E=!1),I=I===void 0?{}:I,T<0||M<0||65535>=1;)++F;var U=1<>8&255,o[n++]=Q,o[n++]=0),o[n++]=44,o[n++]=255&T,o[n++]=T>>8&255,o[n++]=255&M,o[n++]=M>>8&255,o[n++]=255&P,o[n++]=P>>8&255,o[n++]=255&R,o[n++]=R>>8&255,o[n++]=A===!0?128|F-1:0,A===!0)for(var ee=0,ae=N.length;ee>16&255,o[n++]=k>>8&255,o[n++]=255&k}return n=function(D,G,X,K){D[G++]=X;var J=G++,ne=1<>=8,z-=8,G===J+256&&(D[J]=255,J=G++)}function fe(Ie){te|=Ie<>=8,z-=8,G===J+256&&(D[J]=255,J=G++);he===4096?(fe(ne),he=1+ie,Y=X+1,ye={}):(1<>=p,l-=p,M==s)f=1+c,d=(1<<(p=n+1))-1,T=null;else{if(M==c)break;for(var P=M>8,++R;var I=C;if(m>=8;T!==null&&f<4096&&(E[f++]=T<<8|I,d+1<=f&&p<12&&(++p,d=d<<1|1)),T=M}}v!==m&&console.log("Warning, gif stream shorter than expected.")}try{g.GifWriter=i,g.GifReader=function(o){var h=0;if(o[h++]!==71||o[h++]!==73||o[h++]!==70||o[h++]!==56||(o[h++]+1&253)!=56||o[h++]!==97)throw new Error("Invalid GIF 87a/89a header.");var y=o[h++]|o[h++]<<8,m=o[h++]|o[h++]<<8,n=o[h++],s=1<<1+(7&n),c=(o[h++],o[h++],null),f=null,p=(n>>7&&(c=h,h+=3*(f=s)),!0),d=[],l=0,b=null,v=0,j=null;for(this.width=y,this.height=m;p&&h>2&7,h++;break;case 254:for(;;){if(!(0<=(T=o[h++])))throw Error("Invalid block size");if(T===0)break;h+=T}break;default:throw new Error("Unknown graphic control label: 0x"+o[h-1].toString(16))}break;case 44:var T,M=o[h++]|o[h++]<<8,P=o[h++]|o[h++]<<8,R=o[h++]|o[h++]<<8,C=o[h++]|o[h++]<<8,W=o[h++],I=W>>6&1,A=1<<1+(7&W),N=c,F=f,U=!1,W=(W>>7&&(U=!0,N=h,h+=3*(F=A)),h);for(h++;;){if(!(0<=(T=o[h++])))throw Error("Invalid block size");if(T===0)break;h+=T}d.push({x:M,y:P,width:R,height:C,has_local_palette:U,palette_offset:N,palette_size:F,data_offset:W,data_length:h-W,transparent_index:b,interlaced:!!I,delay:l,disposal:v});break;case 59:p=!1;break;default:throw new Error("Unknown gif block: 0x"+o[h-1].toString(16))}this.numFrames=function(){return d.length},this.loopCount=function(){return j},this.frameInfo=function(V){if(V<0||V>=d.length)throw new Error("Frame index out of range.");return d[V]},this.decodeAndBlitFrameBGRA=function(V,H){for(var V=this.frameInfo(V),Q=V.width*V.height,ee=new Uint8Array(Q),ae=(u(o,V.data_offset,ee,Q),V.palette_offset),k=V.transparent_index,D=(k===null&&(k=256),V.width),G=y-D,X=D,K=4*(V.y*y+V.x),J=4*((V.y+V.height)*y+V.x),ne=K,ue=4*G,ie=(V.interlaced===!0&&(ue+=4*y*7),8),he=0,Y=ee.length;he>=1)),ce===k?ne+=4:(z=o[ae+3*ce],te=o[ae+3*ce+1],ce=o[ae+3*ce+2],H[ne++]=ce,H[ne++]=te,H[ne++]=z,H[ne++]=255),--X}},this.decodeAndBlitFrameRGBA=function(V,H){for(var V=this.frameInfo(V),Q=V.width*V.height,ee=new Uint8Array(Q),ae=(u(o,V.data_offset,ee,Q),V.palette_offset),k=V.transparent_index,D=(k===null&&(k=256),V.width),G=y-D,X=D,K=4*(V.y*y+V.x),J=4*((V.y+V.height)*y+V.x),ne=K,ue=4*G,ie=(V.interlaced===!0&&(ue+=4*y*7),8),he=0,Y=ee.length;he>=1)),ce===k?ne+=4:(z=o[ae+3*ce],te=o[ae+3*ce+1],ce=o[ae+3*ce+2],H[ne++]=z,H[ne++]=te,H[ne++]=ce,H[ne++]=255),--X}}}}catch{}},{}],257:[function(t,w,g){(function(i){var u,o;u=this,o=function(h){function y(B){if(this==null)throw TypeError();var S,O=String(this),L=O.length,B=B?Number(B):0;if(!((B=B!=B?0:B)<0||L<=B))return 55296<=(S=O.charCodeAt(B))&&S<=56319&&B+1>>16-S;return _.tag>>>=S,_.bitcount-=S,L+O}function A(_,S){for(;_.bitcount<24;)_.tag|=_.source[_.sourceIndex++]<<_.bitcount,_.bitcount+=8;for(var O=0,L=0,B=0,q=_.tag;L=2*L+(1&q),q>>>=1,O+=S.table[++B],0<=(L-=S.table[B]););return _.tag=q,_.bitcount-=B,S.trans[O+L]}function N(_,S,O){for(;;){var L=A(_,S);if(L===256)return n;if(L<256)_.dest[_.destLen++]=L;else for(var B,q=I(_,l[L-=257],b[L]),L=A(_,O),$=B=_.destLen-I(_,v[L],j[L]);$>>=1,L=B,I(q,2,0)){case 0:O=function(Oe){for(var Je,ut;8this.x2&&(this.x2=_)),typeof S=="number"&&((isNaN(this.y1)||isNaN(this.y2))&&(this.y1=S,this.y2=S),Sthis.y2&&(this.y2=S))},Q.prototype.addX=function(_){this.addPoint(_,null)},Q.prototype.addY=function(_){this.addPoint(null,_)},Q.prototype.addBezier=function(_,S,O,L,B,q,$,oe){var me=[_,S],pe=[O,L],je=[B,q],Me=[$,oe];this.addPoint(_,S),this.addPoint($,oe);for(var ke=0;ke<=1;ke++){var be,Ue=6*me[ke]-12*pe[ke]+6*je[ke],Ae=-3*me[ke]+9*pe[ke]-9*je[ke]+3*Me[ke],De=3*pe[ke]-3*me[ke];Ae==0?Ue==0||0<(be=-De/Ue)&&be<1&&(ke===0&&this.addX(H(me[ke],pe[ke],je[ke],Me[ke],be)),ke===1&&this.addY(H(me[ke],pe[ke],je[ke],Me[ke],be))):(be=Math.pow(Ue,2)-4*De*Ae)<0||(0<(De=(-Ue+Math.sqrt(be))/(2*Ae))&&De<1&&(ke===0&&this.addX(H(me[ke],pe[ke],je[ke],Me[ke],De)),ke===1&&this.addY(H(me[ke],pe[ke],je[ke],Me[ke],De))),0<(De=(-Ue-Math.sqrt(be))/(2*Ae))&&De<1&&(ke===0&&this.addX(H(me[ke],pe[ke],je[ke],Me[ke],De)),ke===1&&this.addY(H(me[ke],pe[ke],je[ke],Me[ke],De))))}},Q.prototype.addQuad=function(_,S,O,L,B,q){O=_+2/3*(O-_),L=S+2/3*(L-S),this.addBezier(_,S,O,L,O+1/3*(B-_),L+1/3*(q-S),B,q)},ee.prototype.moveTo=function(_,S){this.commands.push({type:"M",x:_,y:S})},ee.prototype.lineTo=function(_,S){this.commands.push({type:"L",x:_,y:S})},ee.prototype.curveTo=ee.prototype.bezierCurveTo=function(_,S,O,L,B,q){this.commands.push({type:"C",x1:_,y1:S,x2:O,y2:L,x:B,y:q})},ee.prototype.quadTo=ee.prototype.quadraticCurveTo=function(_,S,O,L){this.commands.push({type:"Q",x1:_,y1:S,x:O,y:L})},ee.prototype.close=ee.prototype.closePath=function(){this.commands.push({type:"Z"})},ee.prototype.extend=function(_){var S;if(_.commands)_=_.commands;else if(_ instanceof Q)return S=_,this.moveTo(S.x1,S.y1),this.lineTo(S.x2,S.y1),this.lineTo(S.x2,S.y2),this.lineTo(S.x1,S.y2),void this.close();Array.prototype.push.apply(this.commands,_)},ee.prototype.getBoundingBox=function(){for(var _=new Q,S=0,O=0,L=0,B=0,q=0;q>8&255,255&_]},K.USHORT=J(2),X.SHORT=function(_){return[(_=32768<=_?-(65536-_):_)>>8&255,255&_]},K.SHORT=J(2),X.UINT24=function(_){return[_>>16&255,_>>8&255,255&_]},K.UINT24=J(3),X.ULONG=function(_){return[_>>24&255,_>>16&255,_>>8&255,255&_]},K.ULONG=J(4),X.LONG=function(_){return[(_=2147483648<=_?-(4294967296-_):_)>>24&255,_>>16&255,_>>8&255,255&_]},K.LONG=J(4),X.FIXED=X.ULONG,K.FIXED=K.ULONG,X.FWORD=X.SHORT,K.FWORD=K.SHORT,X.UFWORD=X.USHORT,K.UFWORD=K.USHORT,X.LONGDATETIME=function(_){return[0,0,0,0,_>>24&255,_>>16&255,_>>8&255,255&_]},K.LONGDATETIME=J(8),X.TAG=function(_){return D.argument(_.length===4,"Tag should be exactly 4 ASCII characters."),[_.charCodeAt(0),_.charCodeAt(1),_.charCodeAt(2),_.charCodeAt(3)]},K.TAG=J(4),X.Card8=X.BYTE,K.Card8=K.BYTE,X.Card16=X.USHORT,K.Card16=K.USHORT,X.OffSize=X.BYTE,K.OffSize=K.BYTE,X.SID=X.USHORT,K.SID=K.USHORT,X.NUMBER=function(_){return-107<=_&&_<=107?[_+139]:108<=_&&_<=1131?[247+((_-=108)>>8),255&_]:-1131<=_&&_<=-108?[251+((_=-_-108)>>8),255&_]:-32768<=_&&_<=32767?X.NUMBER16(_):X.NUMBER32(_)},K.NUMBER=function(_){return X.NUMBER(_).length},X.NUMBER16=function(_){return[28,_>>8&255,255&_]},K.NUMBER16=J(3),X.NUMBER32=function(_){return[29,_>>24&255,_>>16&255,_>>8&255,255&_]},K.NUMBER32=J(5),X.REAL=function(_){for(var S=_.toString(),O=/\.(\d*?)(?:9{5,20}|0{5,20})\d{0,2}(?:e(.+)|$)/.exec(S),L=(O&&(O=parseFloat("1e"+((O[2]?+O[2]:0)+O[1].length)),S=(Math.round(_*O)/O).toString()),""),B=0,q=S.length;B>8&255,S[S.length]=255&L}return S},K.UTF16=function(_){return 2*_.length};var ne,ue={"x-mac-croatian":"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®Š™´¨≠ŽØ∞±≤≥∆µ∂∑∏š∫ªºΩžø¿¡¬√ƒ≈Ć«Č… ÀÃÕŒœĐ—“”‘’÷◊©⁄€‹›Æ»–·‚„‰ÂćÁčÈÍÎÏÌÓÔđÒÚÛÙıˆ˜¯πË˚¸Êæˇ","x-mac-cyrillic":"АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ†°Ґ£§•¶І®©™Ђђ≠Ѓѓ∞±≤≥іµґЈЄєЇїЉљЊњјЅ¬√ƒ≈∆«»… ЋћЌќѕ–—“”‘’÷„ЎўЏџ№Ёёяабвгдежзийклмнопрстуфхцчшщъыьэю","x-mac-gaelic":"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØḂ±≤≥ḃĊċḊḋḞḟĠġṀæøṁṖṗɼƒſṠ«»… ÀÃÕŒœ–—“”‘’ṡẛÿŸṪ€‹›Ŷŷṫ·Ỳỳ⁊ÂÊÁËÈÍÎÏÌÓÔ♣ÒÚÛÙıÝýŴŵẄẅẀẁẂẃ","x-mac-greek":"Ĺ²É³ÖÜ΅àâä΄¨çéèê룙î‰ôö¦€ùûü†ΓΔΘΛΞΠß®©ΣΪ§≠°·Α±≤≥¥ΒΕΖΗΙΚΜΦΫΨΩάΝ¬ΟΡ≈Τ«»… ΥΧΆΈœ–―“”‘’÷ΉΊΌΎέήίόΏύαβψδεφγηιξκλμνοπώρστθωςχυζϊϋΐΰ­","x-mac-icelandic":"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûüÝ°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄€ÐðÞþý·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ","x-mac-inuit":"ᐃᐄᐅᐆᐊᐋᐱᐲᐳᐴᐸᐹᑉᑎᑏᑐᑑᑕᑖᑦᑭᑮᑯᑰᑲᑳᒃᒋᒌᒍᒎᒐᒑ°ᒡᒥᒦ•¶ᒧ®©™ᒨᒪᒫᒻᓂᓃᓄᓅᓇᓈᓐᓯᓰᓱᓲᓴᓵᔅᓕᓖᓗᓘᓚᓛᓪᔨᔩᔪᔫᔭ… ᔮᔾᕕᕖᕗ–—“”‘’ᕘᕙᕚᕝᕆᕇᕈᕉᕋᕌᕐᕿᖀᖁᖂᖃᖄᖅᖏᖐᖑᖒᖓᖔᖕᙱᙲᙳᙴᙵᙶᖖᖠᖡᖢᖣᖤᖥᖦᕼŁł","x-mac-ce":"ÄĀāÉĄÖÜáąČäčĆć鏟ĎíďĒēĖóėôöõúĚěü†°Ę£§•¶ß®©™ę¨≠ģĮįĪ≤≥īĶ∂∑łĻļĽľĹĺŅņѬ√ńŇ∆«»… ňŐÕőŌ–—“”‘’÷◊ōŔŕŘ‹›řŖŗŠ‚„šŚśÁŤťÍŽžŪÓÔūŮÚůŰűŲųÝýķŻŁżĢˇ",macintosh:"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄€‹›fifl‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ","x-mac-romanian":"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ĂȘ∞±≤≥¥µ∂∑∏π∫ªºΩăș¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄€‹›Țț‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ","x-mac-turkish":"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸĞğİıŞş‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙˆ˜¯˘˙˚¸˝˛ˇ"},ie=(G.MACSTRING=function(_,S,O,L){var B=ue[L];if(B!==void 0){for(var q="",$=0;$>8&255,ke+256&255)}return pe})(_,L,S);return S},X.INDEX=function(_){for(var S=1,O=[S],L=[],B=0;B<_.length;B+=1){var q=X.OBJECT(_[B]);Array.prototype.push.apply(L,q),S+=q.length,O.push(S)}if(L.length===0)return[0,0];for(var $=[],oe=1+Math.floor(Math.log(S)/Math.log(2))/8|0,me=[void 0,X.BYTE,X.USHORT,X.UINT24,X.ULONG][oe],pe=0;pe>8,S[je+1]=255&Me,S=S.concat(L[pe])}return S},K.TABLE=function(_){for(var S=0,O=_.fields.length,L=0;L>1,oe.skip("uShort",3),De.glyphIndexMap={};for(var ut,et=new Te.Parser(Ce,Oe+Je+14),tt=new Te.Parser(Ce,Oe+Je+16+2*ut),ct=new Te.Parser(Ce,Oe+Je+16+4*ut),Ot=new Te.Parser(Ce,Oe+Je+16+6*ut),Vt=Oe+Je+16+8*ut,Xt=0;Xt>4,$=15&$;if(q==15||(L+=B[q],$==15))break;L+=B[$]}return parseFloat(L)}if(32<=S&&S<=246)return S-139;if(247<=S&&S<=250)return 256*(S-247)+_.parseByte()+108;if(251<=S&&S<=254)return 256*-(S-251)-_.parseByte()-108;throw new Error("Invalid b0 "+S)}function dr(_,S,O){var L=new Te.Parser(_,S=S!==void 0?S:0),B=[],q=[];for(O=O!==void 0?O:_.length;L.relativeOffset>1,be.length=0,Ae=!0}return function tt(ct){for(var Ot,Vt,Xt,fr,hr,Nr,kt,Lt,jt,pr,Ft,ar,It=0;ItMath.abs(ar-Oe)?Ce=Ft+be.shift():Oe=ar+be.shift(),ke.curveTo(L,B,q,$,kt,Lt),ke.curveTo(jt,pr,Ft,ar,Ce,Oe);break;default:console.log("Glyph "+S.index+": unknown operator 1200"+nr),be.length=0}break;case 14:0>3;break;case 21:2>16),It+=2;break;case 29:hr=be.pop()+_.gsubrsBias,(Nr=_.gsubrs[hr])&&tt(Nr);break;case 30:for(;0=O.begin&&_=xe.length&&(q=L.parseChar(),O.names.push(L.parseString(q)));break;case 2.5:O.numberOfGlyphs=L.parseUShort(),O.offset=new Array(O.numberOfGlyphs);for(var oe=0;oeMe.value.tag?1:-1}),S.fields=S.fields.concat(L),S.fields=S.fields.concat(B),S}function Ol(_,S,O){for(var L=0;L 123 are reserved for internal usage");be|=1<>>1,q=_[B].tag;if(q===S)return B;q>>1,q=_[B];if(q===S)return B;q>>1,$=(B=_[q]).start;if($===S)return B;$(B=_[O-1]).end?0:B}function ps(_,S){this.font=_,this.tableName=S}function ms(_){ps.call(this,_,"gpos")}function Xr(_){ps.call(this,_,"gsub")}function Rl(_,S,O){for(var L=_.subtables,B=0;BS.points.length-1||L.matchedPoints[1]>B.points.length-1)throw Error("Matched points out of range in "+S.name);var $=S.points[L.matchedPoints[0]],oe=B.points[L.matchedPoints[1]],L={xScale:L.xScale,scale01:L.scale01,scale10:L.scale10,yScale:L.yScale,dx:0,dy:0},oe=Ei([oe],L)[0];L.dx=$.x-oe.x,L.dy=$.y-oe.y,q=Ei(B.points,L)}S.points=S.points.concat(q)}}return Dl(S.points)}(ms.prototype=ps.prototype={searchTag:Si,binSearch:Pl,getTable:function(_){var S=this.font.tables[this.tableName];return S=!S&&_?this.font.tables[this.tableName]=this.createDefaultTable():S},getScriptNames:function(){var _=this.getTable();return _?_.scripts.map(function(S){return S.tag}):[]},getDefaultScriptName:function(){var _=this.getTable();if(_){for(var S=!1,O=0;O<_.scripts.length;O++){var L=_.scripts[O].tag;if(L==="DFLT")return L;L==="latn"&&(S=!0)}return S?"latn":void 0}},getScriptTable:function(_,S){var O,L=this.getTable(S);if(L)return O=L.scripts,0<=(L=Si(L.scripts,_=_||"DFLT"))?O[L].script:S?(O.splice(-1-L,0,S={tag:_,script:{defaultLangSys:{reserved:0,reqFeatureIndex:65535,featureIndexes:[]},langSysRecords:[]}}),S.script):void 0},getLangSysTable:function(B,S,O){var L,B=this.getScriptTable(B,O);if(B)return S&&S!=="dflt"&&S!=="DFLT"?0<=(L=Si(B.langSysRecords,S))?B.langSysRecords[L].langSys:O?(B.langSysRecords.splice(-1-L,0,O={tag:S,langSys:{reserved:0,reqFeatureIndex:65535,featureIndexes:[]}}),O.langSys):void 0:B.defaultLangSys},getFeatureTable:function(_,S,O,L){if(_=this.getLangSysTable(_,S,L),_){for(var B,q=_.featureIndexes,$=this.font.tables[this.tableName].features,oe=0;oe=$[S-1].tag,"Features must be added in alphabetical order."),$.push(B={tag:O,feature:{params:0,lookupListIndexes:[]}}),q.push(S),B.feature}},getLookupTables:function(q,S,O,L,B){var q=this.getFeatureTable(q,S,O,B),$=[];if(q){for(var oe,me=q.lookupListIndexes,pe=this.font.tables[this.tableName].lookups,je=0;je",q),S.stack.push(Math.round(64*q))}function ki(_,S){var O=S.stack,L=O.pop(),B=S.fv,q=S.pv,$=S.ppem,oe=S.deltaBase+16*(_-1),me=S.deltaShift,pe=S.z0;h.DEBUG&&console.log(S.step,"DELTAP["+_+"]",L,O);for(var je=0;je>4)===$&&(0<=(ke=(15&ke)-8)&&ke++,h.DEBUG&&console.log(S.step,"DELTAPFIX",Me,"by",ke*me),Me=pe[Me],B.setRelative(Me,Me,ke*me,q))}}function gs(_,S){var O=S.stack,L=O.pop();h.DEBUG&&console.log(S.step,"ROUND[]"),O.push(64*S.round(L/64))}function Mi(_,S){var O=S.stack,L=O.pop(),B=S.ppem,q=S.deltaBase+16*(_-1),$=S.deltaShift;h.DEBUG&&console.log(S.step,"DELTAC["+_+"]",L,O);for(var oe=0;oe>4)===B&&(0<=(pe=(15&pe)-8)&&pe++,pe=pe*$,h.DEBUG&&console.log(S.step,"DELTACFIX",me,"by",pe),S.cvt[me]+=pe)}}function ru(_,S){var O,B=S.stack,L=B.pop(),B=B.pop(),q=S.z2[L],$=S.z1[B];h.DEBUG&&console.log(S.step,"SDPVTL["+_+"]",L,B),L=_?(O=q.y-$.y,$.x-q.x):(O=$.x-q.x,$.y-q.y),S.dpv=Po(O,L)}function gn(_,S){var O=S.stack,L=S.prog,B=S.ip;h.DEBUG&&console.log(S.step,"PUSHB["+_+"]");for(var q=0;q<_;q++)O.push(L[++B]);S.ip=B}function vn(_,S){var O=S.ip,L=S.prog,B=S.stack;h.DEBUG&&console.log(S.ip,"PUSHW["+_+"]");for(var q=0;q<_;q++){var $=L[++O]<<8|L[++O];32768&$&&($=-(1+(65535^$))),B.push($)}S.ip=O}function Qe(_,S,O,L,B,q){var $,oe,pe=q.stack,me=_&&pe.pop(),pe=pe.pop(),je=q.rp0,je=q.z0[je],Me=q.z1[pe],ke=q.minDis,be=q.fv,Ue=q.dpv,Ae=$=Ue.distance(Me,je,!0,!0),De=0<=Ae?1:-1;Ae=Math.abs(Ae),_&&(oe=q.cvt[me],L&&Math.abs(Ae-oe)":"_")+(L?"R":"_")+(B===0?"Gr":B===1?"Bl":B===2?"Wh":"")+"]",_?me+"("+q.cvt[me]+","+oe+")":"",pe,"(d =",$,"->",De*Ae,")"),q.rp1=q.rp0,q.rp2=pe,S&&(q.rp0=pe)}Nl.prototype.exec=function(_,S){if(typeof S!="number")throw new Error("Point size is not a number!");if(!(2",L),oe.interpolate(Me,q,$,me),oe.touch(Me)}_.loop=1},Ql.bind(void 0,0),Ql.bind(void 0,1),function(_){for(var S=_.stack,O=_.rp0,L=_.z0[O],B=_.loop,q=_.fv,$=_.pv,oe=_.z1;B--;){var me=S.pop(),pe=oe[me];h.DEBUG&&console.log(_.step,(1<_.loop?"loop "+(_.loop-B)+": ":"")+"ALIGNRP[]",me),q.setRelative(pe,L,0,$),q.touch(pe)}_.loop=1},function(_){h.DEBUG&&console.log(_.step,"RTDG[]"),_.round=Eh},Jl.bind(void 0,0),Jl.bind(void 0,1),function(_){var S=_.prog,O=_.ip,L=_.stack,B=S[++O];h.DEBUG&&console.log(_.step,"NPUSHB[]",B);for(var q=0;q"u"?Nh:Uh)(_,function(O,L){if(O)return S(O);var B;try{B=Ci(L)}catch(q){return S(q,null)}return S(null,B)})},h.loadSync=function(_){return Ci(Ll(t("fs").readFileSync(_)))},Object.defineProperty(h,"__esModule",{value:!0})},o(typeof g=="object"&&w!==void 0?g:u.opentype={})}).call(this,t("buffer").Buffer)},{buffer:4,fs:2}],258:[function(t,w,g){(function(i){function u(y,m){for(var n=0,s=y.length-1;0<=s;s--){var c=y[s];c==="."?y.splice(s,1):c===".."?(y.splice(s,1),n++):n&&(y.splice(s,1),n--)}if(m)for(;n--;)y.unshift("..");return y}function o(y,m){if(y.filter)return y.filter(m);for(var n=[],s=0;s'.concat(l,"").concat(f,""),this.dummyDOM||(this.dummyDOM=document.getElementById(d).parentNode),this.descriptions?this.descriptions.fallbackElements||(this.descriptions.fallbackElements={}):this.descriptions={fallbackElements:{}},this.descriptions.fallbackElements[c]?this.descriptions.fallbackElements[c].innerHTML!==l&&(this.descriptions.fallbackElements[c].innerHTML=l):this._describeElementHTML("fallback",c,l),p===this.LABEL&&(this.descriptions.labelElements||(this.descriptions.labelElements={}),this.descriptions.labelElements[c]?this.descriptions.labelElements[c].innerHTML!==l&&(this.descriptions.labelElements[c].innerHTML=l):this._describeElementHTML("label",c,l)))},i.default.prototype._describeHTML=function(c,f){var p,d=this.canvas.id;c==="fallback"?(this.dummyDOM.querySelector("#".concat(d+u))?this.dummyDOM.querySelector("#"+d+h).insertAdjacentHTML("beforebegin",'

')):(p='

'),this.dummyDOM.querySelector("#".concat(d,"accessibleOutput"))?this.dummyDOM.querySelector("#".concat(d,"accessibleOutput")).insertAdjacentHTML("beforebegin",p):this.dummyDOM.querySelector("#".concat(d)).innerHTML=p),this.descriptions.fallback=this.dummyDOM.querySelector("#".concat(d).concat(o)),this.descriptions.fallback.innerHTML=f):c==="label"&&(this.dummyDOM.querySelector("#".concat(d+y))?this.dummyDOM.querySelector("#".concat(d+n))&&this.dummyDOM.querySelector("#".concat(d+n)).insertAdjacentHTML("beforebegin",'

')):(p='

'),this.dummyDOM.querySelector("#".concat(d,"accessibleOutputLabel"))?this.dummyDOM.querySelector("#".concat(d,"accessibleOutputLabel")).insertAdjacentHTML("beforebegin",p):this.dummyDOM.querySelector("#"+d).insertAdjacentHTML("afterend",p)),this.descriptions.label=this.dummyDOM.querySelector("#"+d+m),this.descriptions.label.innerHTML=f)},i.default.prototype._describeElementHTML=function(c,f,p){var d,l=this.canvas.id;c==="fallback"?(this.dummyDOM.querySelector("#".concat(l+u))?this.dummyDOM.querySelector("#"+l+h)||this.dummyDOM.querySelector("#"+l+o).insertAdjacentHTML("afterend",'
Canvas elements and their descriptions
')):(d='
Canvas elements and their descriptions
'),this.dummyDOM.querySelector("#".concat(l,"accessibleOutput"))?this.dummyDOM.querySelector("#".concat(l,"accessibleOutput")).insertAdjacentHTML("beforebegin",d):this.dummyDOM.querySelector("#"+l).innerHTML=d),(d=document.createElement("tr")).id=l+"_fte_"+f,this.dummyDOM.querySelector("#"+l+h).appendChild(d),this.descriptions.fallbackElements[f]=this.dummyDOM.querySelector("#".concat(l).concat("_fte_").concat(f)),this.descriptions.fallbackElements[f].innerHTML=p):c==="label"&&(this.dummyDOM.querySelector("#".concat(l+y))?this.dummyDOM.querySelector("#".concat(l+n))||this.dummyDOM.querySelector("#"+l+m).insertAdjacentHTML("afterend",'
')):(d='
'),this.dummyDOM.querySelector("#".concat(l,"accessibleOutputLabel"))?this.dummyDOM.querySelector("#".concat(l,"accessibleOutputLabel")).insertAdjacentHTML("beforebegin",d):this.dummyDOM.querySelector("#"+l).insertAdjacentHTML("afterend",d)),(c=document.createElement("tr")).id=l+"_lte_"+f,this.dummyDOM.querySelector("#"+l+n).appendChild(c),this.descriptions.labelElements[f]=this.dummyDOM.querySelector("#".concat(l).concat("_lte_").concat(f)),this.descriptions.labelElements[f].innerHTML=p)},t=i.default,g.default=t},{"../core/main":283,"core-js/modules/es.array.concat":153,"core-js/modules/es.regexp.exec":195,"core-js/modules/es.string.ends-with":198,"core-js/modules/es.string.replace":204}],264:[function(t,w,g){t("core-js/modules/es.array.concat"),t("core-js/modules/es.array.from"),t("core-js/modules/es.array.map"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.array.concat"),t("core-js/modules/es.array.from"),t("core-js/modules/es.array.map"),t("core-js/modules/es.string.iterator"),Object.defineProperty(g,"__esModule",{value:!0}),g.default=void 0,t=(t=t("../core/main"))&&t.__esModule?t:{default:t},t.default.prototype._updateGridOutput=function(i){var u,o,h,y;this.dummyDOM.querySelector("#".concat(i,"_summary"))&&(u=this._accessibleOutputs[i],h=function(m,n,s,c){return n="".concat(n," canvas, ").concat(s," by ").concat(c," pixels, contains ").concat(m[0]),n=(m[0]===1?"".concat(n," shape: "):"".concat(n," shapes: ")).concat(m[1]),n}((o=function(m,n){var s,c="",f="",p=0;for(s in n){var d,l=0;for(d in n[s]){var b='
  • ').concat(n[s][d].color," ").concat(s,",");s==="line"?b+=" location = ".concat(n[s][d].pos,", length = ").concat(n[s][d].length," pixels"):(b+=" location = ".concat(n[s][d].pos),s!=="point"&&(b+=", area = ".concat(n[s][d].area," %")),b+="
  • "),c+=b,l++,p++}f=1').concat(n[s][l].color," ").concat(s,"
    "):'').concat(n[s][l].color," ").concat(s," midpoint"),n[s][l].loc.locY";p=p+j+""}return p}(i,this.ingredients.shapes),h!==u.summary.innerHTML&&(u.summary.innerHTML=h),y!==u.map.innerHTML&&(u.map.innerHTML=y),o.details!==u.shapeDetails.innerHTML&&(u.shapeDetails.innerHTML=o.details),this._accessibleOutputs[i]=u)},t=t.default,g.default=t},{"../core/main":283,"core-js/modules/es.array.concat":153,"core-js/modules/es.array.from":162,"core-js/modules/es.array.map":168,"core-js/modules/es.string.iterator":200}],265:[function(t,w,g){t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.concat"),t("core-js/modules/es.array.fill"),t("core-js/modules/es.array.from"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.array.map"),t("core-js/modules/es.number.to-fixed"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.regexp.to-string"),t("core-js/modules/es.string.iterator"),t("core-js/modules/web.dom-collections.iterator"),t("core-js/modules/es.array.concat"),t("core-js/modules/es.array.fill"),t("core-js/modules/es.array.map"),t("core-js/modules/es.number.to-fixed"),Object.defineProperty(g,"__esModule",{value:!0}),g.default=void 0;var i=(t=t("../core/main"))&&t.__esModule?t:{default:t};function u(h){return function(y){if(Array.isArray(y)){for(var m=0,n=new Array(y.length);m')):this.dummyDOM.querySelector("#".concat(c)).innerHTML='
    '))):y==="Label"&&(m=c+h+(f=y),this.dummyDOM.querySelector("#".concat(n=c+"accessibleOutput"+y))||(this.dummyDOM.querySelector("#".concat(c,"_Label"))?this.dummyDOM.querySelector("#".concat(c,"_Label")):this.dummyDOM.querySelector("#".concat(c))).insertAdjacentHTML("afterend",'
    '))),this._accessibleOutputs[m]={},h==="textOutput"?(f="#".concat(c,"gridOutput").concat(f),s='
    Text Output

      '),this.dummyDOM.querySelector(f)?this.dummyDOM.querySelector(f).insertAdjacentHTML("beforebegin",s):this.dummyDOM.querySelector("#".concat(n)).innerHTML=s,this._accessibleOutputs[m].list=this.dummyDOM.querySelector("#".concat(m,"_list"))):h==="gridOutput"&&(f="#".concat(c,"textOutput").concat(f),s='
      Grid Output

        '),this.dummyDOM.querySelector(f)?this.dummyDOM.querySelector(f).insertAdjacentHTML("afterend",s):this.dummyDOM.querySelector("#".concat(n)).innerHTML=s,this._accessibleOutputs[m].map=this.dummyDOM.querySelector("#".concat(m,"_map"))),this._accessibleOutputs[m].shapeDetails=this.dummyDOM.querySelector("#".concat(m,"_shapeDetails")),this._accessibleOutputs[m].summary=this.dummyDOM.querySelector("#".concat(m,"_summary"))},i.default.prototype._updateAccsOutput=function(){var h=this.canvas.id;JSON.stringify(this.ingredients.shapes)===this.ingredients.pShapes&&this.ingredients.colors.background===this.ingredients.pBackground||(this.ingredients.pShapes=JSON.stringify(this.ingredients.shapes),this._accessibleOutputs.text&&this._updateTextOutput(h+"textOutput"),this._accessibleOutputs.grid&&this._updateGridOutput(h+"gridOutput"),this._accessibleOutputs.textLabel&&this._updateTextOutput(h+"textOutputLabel"),this._accessibleOutputs.gridLabel&&this._updateGridOutput(h+"gridOutputLabel"))},i.default.prototype._accsBackground=function(h){this.ingredients.pShapes=JSON.stringify(this.ingredients.shapes),this.ingredients.pBackground=this.ingredients.colors.background,this.ingredients.shapes={},this.ingredients.colors.backgroundRGBA!==h&&(this.ingredients.colors.backgroundRGBA=h,this.ingredients.colors.background=this._rgbColorName(h))},i.default.prototype._accsCanvasColors=function(h,y){h==="fill"?this.ingredients.colors.fillRGBA!==y&&(this.ingredients.colors.fillRGBA=y,this.ingredients.colors.fill=this._rgbColorName(y)):h==="stroke"&&this.ingredients.colors.strokeRGBA!==y&&(this.ingredients.colors.strokeRGBA=y,this.ingredients.colors.stroke=this._rgbColorName(y))},i.default.prototype._accsOutput=function(h,y){h==="ellipse"&&y[2]===y[3]?h="circle":h==="rectangle"&&y[2]===y[3]&&(h="square");var m,n,s={},c=!0,f=function(d,l){var b;return d=d==="rectangle"||d==="ellipse"||d==="arc"||d==="circle"||d==="square"?(b=Math.round(l[0]+l[2]/2),Math.round(l[1]+l[3]/2)):d==="triangle"?(b=(l[0]+l[2]+l[4])/3,(l[1]+l[3]+l[5])/3):d==="quadrilateral"?(b=(l[0]+l[2]+l[4]+l[6])/4,(l[1]+l[3]+l[5]+l[7])/4):d==="line"?(b=(l[0]+l[2])/2,(l[1]+l[3])/2):(b=l[0],l[1]),[b,d]}(h,y);if(h==="line"?(s.color=this.ingredients.colors.stroke,s.length=Math.round(this.dist(y[0],y[1],y[2],y[3])),m=this._getPos(y[0],[1]),n=this._getPos(y[2],[3]),s.loc=o(f,this.width,this.height),s.pos=m===n?"at ".concat(m):"from ".concat(m," to ").concat(n)):(h==="point"?s.color=this.ingredients.colors.stroke:(s.color=this.ingredients.colors.fill,s.area=this._getArea(h,y)),s.pos=this._getPos.apply(this,u(f)),s.loc=o(f,this.width,this.height)),this.ingredients.shapes[h]){if(this.ingredients.shapes[h]!==[s]){for(var p in this.ingredients.shapes[h])JSON.stringify(this.ingredients.shapes[h][p])===JSON.stringify(s)&&(c=!1);c===!0&&this.ingredients.shapes[h].push(s)}}else this.ingredients.shapes[h]=[s]},i.default.prototype._getPos=function(n,m){var n=new DOMPointReadOnly(n,m),m=this._renderer.isP3D?new DOMMatrix(this._renderer.uMVMatrix.mat4):this.drawingContext.getTransform(),n=n.matrixTransform(m),m=n.x,n=n.y,s=this.width*this._pixelDensity,c=this.height*this._pixelDensity;return m<.4*s?n<.4*c?"top left":.6*cMath.PI?s+=n:s-=n)):h==="ellipse"||h==="circle"?s=3.14*y[2]/2*y[3]/2:h==="line"||h==="point"?s=0:h==="quadrilateral"?s=Math.abs((y[6]+y[0])*(y[7]-y[1])+(y[0]+y[2])*(y[1]-y[3])+(y[2]+y[4])*(y[3]-y[5])+(y[4]+y[6])*(y[5]-y[7]))/2:h==="rectangle"||h==="square"?s=y[2]*y[3]:h==="triangle"&&(s=Math.abs(y[0]*(y[3]-y[5])+y[2]*(y[5]-y[1])+y[4]*(y[1]-y[3]))/2),this.width*this._pixelDensity),f=this.height*this._pixelDensity,p=[new DOMPoint(0,0),new DOMPoint(c,0),new DOMPoint(c,f),new DOMPoint(0,f)],d=(this._renderer.isP3D?new DOMMatrix(this._renderer.uMVMatrix.mat4):this.drawingContext.getTransform()).inverse(),l=p.map(function(v){return v.matrixTransform(d)}),b=Math.abs((l[3].x+l[0].x)*(l[3].y-l[0].y)+(l[0].x+l[1].x)*(l[0].y-l[1].y)+(l[1].x+l[2].x)*(l[1].y-l[2].y)+(l[2].x+l[3].x)*(l[2].y-l[3].y))/2;return Math.round(100*s/b)},t=i.default,g.default=t},{"../core/main":283,"core-js/modules/es.array.concat":153,"core-js/modules/es.array.fill":156,"core-js/modules/es.array.from":162,"core-js/modules/es.array.iterator":165,"core-js/modules/es.array.map":168,"core-js/modules/es.number.to-fixed":182,"core-js/modules/es.object.to-string":190,"core-js/modules/es.regexp.to-string":196,"core-js/modules/es.string.iterator":200,"core-js/modules/es.symbol":212,"core-js/modules/es.symbol.description":210,"core-js/modules/es.symbol.iterator":211,"core-js/modules/web.dom-collections.iterator":246}],266:[function(t,w,g){t("core-js/modules/es.array.concat"),t("core-js/modules/es.array.concat"),Object.defineProperty(g,"__esModule",{value:!0}),g.default=void 0,t=(t=t("../core/main"))&&t.__esModule?t:{default:t},t.default.prototype._updateTextOutput=function(i){var u,o,h,y;this.dummyDOM.querySelector("#".concat(i,"_summary"))&&(u=this._accessibleOutputs[i],h=function(m,n,s,c){return s="Your output is a, ".concat(s," by ").concat(c," pixels, ").concat(n," canvas containing the following"),s=m===1?"".concat(s," shape:"):"".concat(s," ").concat(m," shapes:"),s}((o=function(m,n){var s,c="",f=0;for(s in n)for(var p in n[s]){var d='
      • ').concat(n[s][p].color," ").concat(s,"");s==="line"?d+=", ".concat(n[s][p].pos,", ").concat(n[s][p].length," pixels long.
      • "):(d+=", at ".concat(n[s][p].pos),s!=="point"&&(d+=", covering ".concat(n[s][p].area,"% of the canvas")),d+="."),c+=d,f++}return{numShapes:f,listShapes:c}}(i,this.ingredients.shapes)).numShapes,this.ingredients.colors.background,this.width,this.height),y=function(m,n){var s,c="",f=0;for(s in n)for(var p in n[s]){var d='').concat(n[s][p].color," ").concat(s,"");s==="line"?d+="location = ".concat(n[s][p].pos,"length = ").concat(n[s][p].length," pixels"):(d+="location = ".concat(n[s][p].pos,""),s!=="point"&&(d+=" area = ".concat(n[s][p].area,"%")),d+=""),c+=d,f++}return c}(i,this.ingredients.shapes),h!==u.summary.innerHTML&&(u.summary.innerHTML=h),o.listShapes!==u.list.innerHTML&&(u.list.innerHTML=o.listShapes),y!==u.shapeDetails.innerHTML&&(u.shapeDetails.innerHTML=y),this._accessibleOutputs[i]=u)},t=t.default,g.default=t},{"../core/main":283,"core-js/modules/es.array.concat":153}],267:[function(t,w,g){var i=(i=t("./core/main"))&&i.__esModule?i:{default:i};t("./core/constants"),t("./core/environment"),t("./core/friendly_errors/stacktrace"),t("./core/friendly_errors/validate_params"),t("./core/friendly_errors/file_errors"),t("./core/friendly_errors/fes_core"),t("./core/friendly_errors/sketch_reader"),t("./core/helpers"),t("./core/legacy"),t("./core/preload"),t("./core/p5.Element"),t("./core/p5.Graphics"),t("./core/p5.Renderer"),t("./core/p5.Renderer2D"),t("./core/rendering"),t("./core/shim"),t("./core/structure"),t("./core/transform"),t("./core/shape/2d_primitives"),t("./core/shape/attributes"),t("./core/shape/curves"),t("./core/shape/vertex"),t("./accessibility/outputs"),t("./accessibility/textOutput"),t("./accessibility/gridOutput"),t("./accessibility/color_namer"),t("./color/color_conversion"),t("./color/creating_reading"),t("./color/p5.Color"),t("./color/setting"),t("./data/p5.TypedDict"),t("./data/local_storage.js"),t("./dom/dom"),t("./accessibility/describe"),t("./events/acceleration"),t("./events/keyboard"),t("./events/mouse"),t("./events/touch"),t("./image/filters"),t("./image/image"),t("./image/loading_displaying"),t("./image/p5.Image"),t("./image/pixels"),t("./io/files"),t("./io/p5.Table"),t("./io/p5.TableRow"),t("./io/p5.XML"),t("./math/calculation"),t("./math/math"),t("./math/noise"),t("./math/p5.Vector"),t("./math/random"),t("./math/trigonometry"),t("./typography/attributes"),t("./typography/loading_displaying"),t("./typography/p5.Font"),t("./utilities/array_functions"),t("./utilities/conversion"),t("./utilities/string_functions"),t("./utilities/time_date"),t("./webgl/3d_primitives"),t("./webgl/interaction"),t("./webgl/light"),t("./webgl/loading"),t("./webgl/material"),t("./webgl/p5.Camera"),t("./webgl/p5.DataArray"),t("./webgl/p5.Geometry"),t("./webgl/p5.Matrix"),t("./webgl/p5.Quat"),t("./webgl/p5.RendererGL.Immediate"),t("./webgl/p5.RendererGL"),t("./webgl/p5.RendererGL.Retained"),t("./webgl/p5.Framebuffer"),t("./webgl/p5.Shader"),t("./webgl/p5.RenderBuffer"),t("./webgl/p5.Texture"),t("./webgl/text"),t("./core/init"),w.exports=i.default},{"./accessibility/color_namer":262,"./accessibility/describe":263,"./accessibility/gridOutput":264,"./accessibility/outputs":265,"./accessibility/textOutput":266,"./color/color_conversion":268,"./color/creating_reading":269,"./color/p5.Color":270,"./color/setting":271,"./core/constants":272,"./core/environment":273,"./core/friendly_errors/fes_core":274,"./core/friendly_errors/file_errors":275,"./core/friendly_errors/sketch_reader":276,"./core/friendly_errors/stacktrace":277,"./core/friendly_errors/validate_params":278,"./core/helpers":279,"./core/init":280,"./core/legacy":282,"./core/main":283,"./core/p5.Element":284,"./core/p5.Graphics":285,"./core/p5.Renderer":286,"./core/p5.Renderer2D":287,"./core/preload":288,"./core/rendering":289,"./core/shape/2d_primitives":290,"./core/shape/attributes":291,"./core/shape/curves":292,"./core/shape/vertex":293,"./core/shim":294,"./core/structure":295,"./core/transform":296,"./data/local_storage.js":297,"./data/p5.TypedDict":298,"./dom/dom":299,"./events/acceleration":300,"./events/keyboard":301,"./events/mouse":302,"./events/touch":303,"./image/filters":304,"./image/image":305,"./image/loading_displaying":306,"./image/p5.Image":307,"./image/pixels":308,"./io/files":309,"./io/p5.Table":310,"./io/p5.TableRow":311,"./io/p5.XML":312,"./math/calculation":313,"./math/math":314,"./math/noise":315,"./math/p5.Vector":316,"./math/random":317,"./math/trigonometry":318,"./typography/attributes":319,"./typography/loading_displaying":320,"./typography/p5.Font":321,"./utilities/array_functions":322,"./utilities/conversion":323,"./utilities/string_functions":324,"./utilities/time_date":325,"./webgl/3d_primitives":326,"./webgl/interaction":328,"./webgl/light":329,"./webgl/loading":330,"./webgl/material":331,"./webgl/p5.Camera":332,"./webgl/p5.DataArray":333,"./webgl/p5.Framebuffer":334,"./webgl/p5.Geometry":335,"./webgl/p5.Matrix":336,"./webgl/p5.Quat":337,"./webgl/p5.RenderBuffer":338,"./webgl/p5.RendererGL":341,"./webgl/p5.RendererGL.Immediate":339,"./webgl/p5.RendererGL.Retained":340,"./webgl/p5.Shader":342,"./webgl/p5.Texture":343,"./webgl/text":344}],268:[function(t,w,g){Object.defineProperty(g,"__esModule",{value:!0}),g.default=void 0,t=(t=t("../core/main"))&&t.__esModule?t:{default:t},t.default.ColorConversion={_hsbaToHSLA:function(i){var u=i[0],o=i[1],h=i[2],y=(2-o)*h/2;return y!=0&&(y==1?o=0:y<.5?o/=2-o:o=o*h/(2-2*y)),[u,o,y,i[3]]},_hsbaToRGBA:function(i){var u,o,h,y,m,n=6*i[0],s=i[1],c=i[2];return s===0?[c,c,c,i[3]]:(o=c*(1-s),h=c*(1-s*(n-(u=Math.floor(n)))),s=c*(1-s*(1+u-n)),n=u===1?(y=h,m=c,o):u===2?(y=o,m=c,s):u===3?(y=o,m=h,c):u===4?(y=s,m=o,c):u===5?(y=c,m=o,h):(y=c,m=s,o),[y,m,n,i[3]])},_hslaToHSBA:function(i){var u=i[0],o=i[1],h=i[2],y=h<.5?(1+o)*h:h+o-h*o;return[u,o=2*(y-h)/y,y,i[3]]},_hslaToRGBA:function(i){var u,o=6*i[0],h=i[1],y=i[2];return h===0?[y,y,y,i[3]]:[(u=function(m,n,s){return m<0?m+=6:6<=m&&(m-=6),m<1?n+(s-n)*m:m<3?s:m<4?n+(s-n)*(4-m):n})(2+o,h=2*y-(y=y<.5?(1+h)*y:y+h-y*h),y),u(o,h,y),u(o-2,h,y),i[3]]},_rgbaToHSBA:function(i){var u,o,h=i[0],y=i[1],m=i[2],n=Math.max(h,y,m),s=n-Math.min(h,y,m);return s==0?o=u=0:(o=s/n,h===n?u=(y-m)/s:y===n?u=2+(m-h)/s:m===n&&(u=4+(h-y)/s),u<0?u+=6:6<=u&&(u-=6)),[u/6,o,n,i[3]]},_rgbaToHSLA:function(i){var u,o,h=i[0],y=i[1],m=i[2],n=Math.max(h,y,m),c=Math.min(h,y,m),s=n+c,c=n-c;return c==0?o=u=0:(o=s<1?c/s:c/(2-s),h===n?u=(y-m)/c:y===n?u=2+(m-h)/c:m===n&&(u=4+(h-y)/c),u<0?u+=6:6<=u&&(u-=6)),[u/6,o,s/2,i[3]]}},t=t.default.ColorConversion,g.default=t},{"../core/main":283}],269:[function(t,w,g){function i(n){return(i=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(s){return typeof s}:function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s})(n)}function u(n){return(u=typeof Symbol=="function"&&i(Symbol.iterator)==="symbol"?function(s){return i(s)}:function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":i(s)})(n)}t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.array.map"),t("core-js/modules/es.object.get-own-property-descriptor"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.weak-map"),t("core-js/modules/web.dom-collections.iterator"),t("core-js/modules/es.array.map"),Object.defineProperty(g,"__esModule",{value:!0}),g.default=void 0;var o=(m=t("../core/main"))&&m.__esModule?m:{default:m},h=function(n){if(n&&n.__esModule)return n;if(n===null||u(n)!=="object"&&typeof n!="function")return{default:n};var s=y();if(s&&s.has(n))return s.get(n);var c,f={},p=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(c in n){var d;Object.prototype.hasOwnProperty.call(n,c)&&((d=p?Object.getOwnPropertyDescriptor(n,c):null)&&(d.get||d.set)?Object.defineProperty(f,c,d):f[c]=n[c])}return f.default=n,s&&s.set(n,f),f}(t("../core/constants"));function y(){var n;return typeof WeakMap!="function"?null:(n=new WeakMap,y=function(){return n},n)}t("./p5.Color"),t("../core/friendly_errors/validate_params"),t("../core/friendly_errors/file_errors"),t("../core/friendly_errors/fes_core"),o.default.prototype.alpha=function(n){return o.default._validateParameters("alpha",arguments),this.color(n)._getAlpha()},o.default.prototype.blue=function(n){return o.default._validateParameters("blue",arguments),this.color(n)._getBlue()},o.default.prototype.brightness=function(n){return o.default._validateParameters("brightness",arguments),this.color(n)._getBrightness()},o.default.prototype.color=function(){for(var n,s=arguments.length,c=new Array(s),f=0;fd[0]?d[0]+=1:p[0]+=1),1<=(f=this.lerp(p[0],d[0],c))&&--f),n=this.lerp(p[1],d[1],c),s=this.lerp(p[2],d[2],c),p=this.lerp(p[3],d[3],c),f*=b[l][0],n*=b[l][1],s*=b[l][2],p*=b[l][3],this.color(f,n,s,p)},o.default.prototype.paletteLerp=function(n,s){var c=n[0];if(s=f.length?{value:c.target=void 0,done:!0}:p=="keys"?{value:d,done:!1}:p=="values"?{value:f[d],done:!1}:{value:[d,f[d]],done:!1}},"values"),o.Arguments=o.Array,u("keys"),u("values"),u("entries")},{"../internals/add-to-unscopables":7,"../internals/define-iterator":41,"../internals/internal-state":71,"../internals/iterators":80,"../internals/to-indexed-object":136}],166:[function(y,w,g){var i=y("../internals/export"),h=y("../internals/indexed-object"),u=y("../internals/to-indexed-object"),y=y("../internals/array-method-is-strict"),o=[].join,h=h!=Object,y=y("join",",");i({target:"Array",proto:!0,forced:h||!y},{join:function(m){return o.call(u(this),m===void 0?",":m)}})},{"../internals/array-method-is-strict":22,"../internals/export":50,"../internals/indexed-object":67,"../internals/to-indexed-object":136}],167:[function(u,w,g){var i=u("../internals/export"),u=u("../internals/array-last-index-of");i({target:"Array",proto:!0,forced:u!==[].lastIndexOf},{lastIndexOf:u})},{"../internals/array-last-index-of":20,"../internals/export":50}],168:[function(h,w,g){var i=h("../internals/export"),u=h("../internals/array-iteration").map,o=h("../internals/array-method-has-species-support"),h=h("../internals/array-method-uses-to-length"),o=o("map"),h=h("map");i({target:"Array",proto:!0,forced:!o||!h},{map:function(y){return u(this,y,1I;I++)m(E,P=C[I])&&!m(R,P)&&b(R,P,l(E,P));(R.prototype=T).constructor=R,y(o,j,R)}},{"../internals/classof-raw":28,"../internals/descriptors":43,"../internals/fails":51,"../internals/global":60,"../internals/has":61,"../internals/inherit-if-required":68,"../internals/is-forced":74,"../internals/object-create":91,"../internals/object-define-property":93,"../internals/object-get-own-property-descriptor":94,"../internals/object-get-own-property-names":96,"../internals/redefine":110,"../internals/string-trim":131,"../internals/to-primitive":142}],180:[function(t,w,g){t("../internals/export")({target:"Number",stat:!0},{EPSILON:Math.pow(2,-52)})},{"../internals/export":50}],181:[function(t,w,g){t("../internals/export")({target:"Number",stat:!0},{isFinite:t("../internals/number-is-finite")})},{"../internals/export":50,"../internals/number-is-finite":89}],182:[function(m,w,g){function i(c,f,p){return f===0?p:f%2==1?i(c,f-1,p*c):i(c*c,f/2,p)}var u=m("../internals/export"),o=m("../internals/to-integer"),h=m("../internals/this-number-value"),y=m("../internals/string-repeat"),m=m("../internals/fails"),n=1 .toFixed,s=Math.floor;u({target:"Number",proto:!0,forced:n&&(8e-5.toFixed(3)!=="0.000"||.9.toFixed(0)!=="1"||1.255.toFixed(2)!=="1.25"||0xde0b6b3a7640080.toFixed(0)!=="1000000000000000128")||!m(function(){n.call({})})},{toFixed:function(j){function f(P,R){for(var C=-1,I=R;++C<6;)I+=P*E[C],E[C]=I%1e7,I=s(I/1e7)}function p(P){for(var R=6,C=0;0<=--R;)C+=E[R],E[R]=s(C/P),C=C%P*1e7}function d(){for(var P,R=6,C="";0<=--R;)C===""&&R!==0&&E[R]===0||(P=String(E[R]),C=C===""?P:C+y.call("0",7-P.length)+P);return C}var l,b,v=h(this),j=o(j),E=[0,0,0,0,0,0],T="",M="0";if(j<0||20Pe;){var He,We,qe,$e=se[Pe++],lt=Se?$e.ok:$e.fail,ot=$e.resolve,Ze=$e.reject,it=$e.domain;try{lt?(Se||(Te.rejection===ye&&function(nt,Ct){C.call(n,function(){he?J.emit("rejectionHandled",nt):Re(te,nt,Ct.value)})}(Le,Te),Te.rejection=de),lt===!0?He=xe:(it&&it.enter(),He=lt(xe),it&&(it.exit(),qe=!0)),He===$e.promise?Ze(X("Promise-chain cycle")):(We=ge(He))?We.call(He,ot,Ze):ot(He)):Ze(xe)}catch(nt){it&&!qe&&it.exit(),Ze(nt)}}Te.reactions=[],Te.notified=!1,re&&!Te.rejection&&(Z=Le,le=Te,C.call(n,function(){var nt=le.value,Ct=Ie(le);if(Ct&&(Ct=U(function(){he?J.emit("unhandledRejection",nt,Z):Re(z,Z,nt)}),le.rejection=he||Ie(le)?ye:de,Ct.error))throw Ct.value}))}))},Re=function(Le,Te,re){var se;Y?((se=K.createEvent("Event")).promise=Te,se.reason=re,se.initEvent(Le,!1,!0),n.dispatchEvent(se)):se={promise:Te,reason:re},(Te=n["on"+Le])?Te(se):Le===z&&N("Unhandled promise rejection",re)},Ie=function(Le){return Le.rejection!==de&&!Le.parent},Fe=function(Le,Te,re,se){return function(Z){Le(Te,re,Z,se)}},Ge=function(Le,Te,re,se){Te.done||(Te.done=!0,(Te=se||Te).value=re,Te.state=fe,Ne(Le,Te,!0))},we=function(Le,Te,re,se){if(!Te.done){Te.done=!0,se&&(Te=se);try{if(Le===re)throw X("Promise can't be resolved itself");var Z=ge(re);Z?I(function(){var le={done:!1};try{Z.call(re,Fe(we,Le,le,Te),Fe(Ge,Le,le,Te))}catch(xe){Ge(Le,le,xe,Te)}}):(Te.value=re,Te.state=ce,Ne(Le,Te,!1))}catch(le){Ge(Le,{done:!1},le,Te)}}};ve&&(G=function(Le){j(this,G,ee),v(Le),i.call(this);var Te=ae(this);try{Le(Fe(we,this,Te),Fe(Ge,this,Te))}catch(re){Ge(this,Te,re)}},(i=function(Le){k(this,{type:ee,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=p(G.prototype,{then:function(Le,Te){var re=D(this),se=ue(R(this,G));return se.ok=typeof Le!="function"||Le,se.fail=typeof Te=="function"&&Te,se.domain=he?J.domain:void 0,re.parent=!0,re.reactions.push(se),re.state!=0&&Ne(this,re,!1),se.promise},catch:function(Le){return this.then(void 0,Le)}}),u=function(){var Le=new i,Te=ae(Le);this.promise=Le,this.resolve=Fe(we,Le,Te),this.reject=Fe(Ge,Le,Te)},F.f=ue=function(Le){return Le===G||Le===o?new u:ie(Le)},m||typeof c!="function"||(h=c.prototype.then,f(c.prototype,"then",function(Le,Te){var re=this;return new G(function(se,Z){h.call(re,se,Z)}).then(Le,Te)},{unsafe:!0}),typeof ne=="function"&&y({global:!0,enumerable:!0,forced:!0},{fetch:function(Le){return A(G,ne.apply(n,arguments))}}))),y({global:!0,wrap:!0,forced:ve},{Promise:G}),d(G,ee,!1,!0),l(ee),o=s(ee),y({target:ee,stat:!0,forced:ve},{reject:function(Le){var Te=ue(this);return Te.reject.call(void 0,Le),Te.promise}}),y({target:ee,stat:!0,forced:m||ve},{resolve:function(Le){return A(m&&this===o?G:this,Le)}}),y({target:ee,stat:!0,forced:Ee},{all:function(Le){var Te=this,re=ue(Te),se=re.resolve,Z=re.reject,le=U(function(){var xe=v(Te.resolve),Se=[],Pe=0,He=1;M(Le,function(We){var qe=Pe++,$e=!1;Se.push(void 0),He++,xe.call(Te,We).then(function(lt){$e||($e=!0,Se[qe]=lt,--He||se(Se))},Z)}),--He||se(Se)});return le.error&&Z(le.value),re.promise},race:function(Le){var Te=this,re=ue(Te),se=re.reject,Z=U(function(){var le=v(Te.resolve);M(Le,function(xe){le.call(Te,xe).then(re.resolve,se)})});return Z.error&&se(Z.value),re.promise}})},{"../internals/a-function":5,"../internals/an-instance":9,"../internals/check-correctness-of-iteration":27,"../internals/classof-raw":28,"../internals/engine-v8-version":48,"../internals/export":50,"../internals/get-built-in":57,"../internals/global":60,"../internals/host-report-errors":63,"../internals/inspect-source":69,"../internals/internal-state":71,"../internals/is-forced":74,"../internals/is-object":75,"../internals/is-pure":76,"../internals/iterate":78,"../internals/microtask":82,"../internals/native-promise-constructor":83,"../internals/new-promise-capability":87,"../internals/perform":107,"../internals/promise-resolve":108,"../internals/redefine":110,"../internals/redefine-all":109,"../internals/set-species":118,"../internals/set-to-string-tag":119,"../internals/species-constructor":123,"../internals/task":132,"../internals/well-known-symbol":150}],192:[function(n,w,g){var i=n("../internals/export"),p=n("../internals/get-built-in"),u=n("../internals/a-function"),o=n("../internals/an-object"),h=n("../internals/is-object"),y=n("../internals/object-create"),m=n("../internals/function-bind"),n=n("../internals/fails"),s=p("Reflect","construct"),c=n(function(){function d(){}return!(s(function(){},[],d)instanceof d)}),f=!n(function(){s(function(){})}),p=c||f;i({target:"Reflect",stat:!0,forced:p,sham:p},{construct:function(d,l){u(d),o(l);var b=arguments.length<3?d:u(arguments[2]);if(f&&!c)return s(d,l,b);if(d==b){switch(l.length){case 0:return new d;case 1:return new d(l[0]);case 2:return new d(l[0],l[1]);case 3:return new d(l[0],l[1],l[2]);case 4:return new d(l[0],l[1],l[2],l[3])}var v=[null];return v.push.apply(v,l),new(m.apply(d,v))}return v=b.prototype,b=y(h(v)?v:Object.prototype),v=Function.apply.call(d,b,l),h(v)?v:b}})},{"../internals/a-function":5,"../internals/an-object":10,"../internals/export":50,"../internals/fails":51,"../internals/function-bind":56,"../internals/get-built-in":57,"../internals/is-object":75,"../internals/object-create":91}],193:[function(t,w,g){var i=t("../internals/export"),u=t("../internals/is-object"),o=t("../internals/an-object"),h=t("../internals/has"),y=t("../internals/object-get-own-property-descriptor"),m=t("../internals/object-get-prototype-of");i({target:"Reflect",stat:!0},{get:function n(s,c){var f,p=arguments.length<3?s:arguments[2];return o(s)===p?s[c]:(f=y.f(s,c))?h(f,"value")?f.value:f.get===void 0?void 0:f.get.call(p):u(f=m(s))?n(f,c,p):void 0}})},{"../internals/an-object":10,"../internals/export":50,"../internals/has":61,"../internals/is-object":75,"../internals/object-get-own-property-descriptor":94,"../internals/object-get-prototype-of":98}],194:[function(t,w,g){var i=t("../internals/descriptors"),u=t("../internals/global"),o=t("../internals/is-forced"),h=t("../internals/inherit-if-required"),y=t("../internals/object-define-property").f,m=t("../internals/object-get-own-property-names").f,n=t("../internals/is-regexp"),s=t("../internals/regexp-flags"),c=t("../internals/regexp-sticky-helpers"),f=t("../internals/redefine"),p=t("../internals/fails"),d=t("../internals/internal-state").set,l=t("../internals/set-species"),b=t("../internals/well-known-symbol")("match"),v=u.RegExp,j=v.prototype,E=/a/g,T=/a/g,M=new v(E)!==E,P=c.UNSUPPORTED_Y;if(i&&o("RegExp",!M||P||p(function(){return T[b]=!1,v(E)!=E||v(T)==T||v(E,"i")!="/a/i"}))){for(var R=function(A,N){var F,U=this instanceof R,W=n(A),V=N===void 0;return!U&&W&&A.constructor===R&&V?A:(M?W&&!V&&(A=A.source):A instanceof R&&(V&&(N=s.call(A)),A=A.source),P&&(F=!!N&&-1I;)(function(A){A in R||y(R,A,{configurable:!0,get:function(){return v[A]},set:function(N){v[A]=N}})})(C[I++]);(j.constructor=R).prototype=j,f(u,"RegExp",R)}l("RegExp")},{"../internals/descriptors":43,"../internals/fails":51,"../internals/global":60,"../internals/inherit-if-required":68,"../internals/internal-state":71,"../internals/is-forced":74,"../internals/is-regexp":77,"../internals/object-define-property":93,"../internals/object-get-own-property-names":96,"../internals/redefine":110,"../internals/regexp-flags":113,"../internals/regexp-sticky-helpers":114,"../internals/set-species":118,"../internals/well-known-symbol":150}],195:[function(u,w,g){var i=u("../internals/export"),u=u("../internals/regexp-exec");i({target:"RegExp",proto:!0,forced:/./.exec!==u},{exec:u})},{"../internals/export":50,"../internals/regexp-exec":112}],196:[function(h,w,g){var i=h("../internals/redefine"),u=h("../internals/an-object"),n=h("../internals/fails"),o=h("../internals/regexp-flags"),h="toString",y=RegExp.prototype,m=y[h],n=n(function(){return m.call({source:"a",flags:"b"})!="/a/b"}),s=m.name!=h;(n||s)&&i(RegExp.prototype,h,function(){var c=u(this),f=String(c.source),p=c.flags;return"/"+f+"/"+String(p===void 0&&c instanceof RegExp&&!("flags"in y)?o.call(c):p)},{unsafe:!0})},{"../internals/an-object":10,"../internals/fails":51,"../internals/redefine":110,"../internals/regexp-flags":113}],197:[function(u,w,g){var i=u("../internals/collection"),u=u("../internals/collection-strong");w.exports=i("Set",function(o){return function(){return o(this,arguments.length?arguments[0]:void 0)}},u)},{"../internals/collection":32,"../internals/collection-strong":30}],198:[function(m,w,g){var i=m("../internals/export"),u=m("../internals/object-get-own-property-descriptor").f,o=m("../internals/to-length"),h=m("../internals/not-a-regexp"),y=m("../internals/require-object-coercible"),c=m("../internals/correct-is-regexp-logic"),m=m("../internals/is-pure"),n="".endsWith,s=Math.min,c=c("endsWith");i({target:"String",proto:!0,forced:!!(m||c||!(i=u(String.prototype,"endsWith"))||i.writable)&&!c},{endsWith:function(f){var p=String(y(this)),d=(h(f),1=s.length?{value:void 0,done:!0}:(s=i(s,c),n.index+=s.length,{value:s,done:!1})})},{"../internals/define-iterator":41,"../internals/internal-state":71,"../internals/string-multibyte":125}],201:[function(t,w,g){var i=t("../internals/fix-regexp-well-known-symbol-logic"),u=t("../internals/an-object"),o=t("../internals/to-length"),h=t("../internals/require-object-coercible"),y=t("../internals/advance-string-index"),m=t("../internals/regexp-exec-abstract");i("match",1,function(n,s,c){return[function(f){var p=h(this),d=f==null?void 0:f[n];return d!==void 0?d.call(f,p):new RegExp(f)[n](String(p))},function(f){var p=c(s,f,this);if(p.done)return p.value;var d=u(f),l=String(this);if(!d.global)return m(d,l);for(var b=d.unicode,v=[],j=d.lastIndex=0;(E=m(d,l))!==null;){var E=String(E[0]);(v[j]=E)===""&&(d.lastIndex=y(l,o(d.lastIndex),b)),j++}return j===0?null:v}]})},{"../internals/advance-string-index":8,"../internals/an-object":10,"../internals/fix-regexp-well-known-symbol-logic":52,"../internals/regexp-exec-abstract":111,"../internals/require-object-coercible":115,"../internals/to-length":138}],202:[function(t,w,g){var i=t("../internals/export"),u=t("../internals/string-pad").start;i({target:"String",proto:!0,forced:t("../internals/string-pad-webkit-bug")},{padStart:function(o){return u(this,o,1]*>)/g,l=/\$([$&'`]|\d\d?)/g;i("replace",2,function(b,v,j,E){var T=E.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,M=E.REPLACE_KEEPS_$0,P=T?"$":"$0";return[function(R,C){var I=m(this),A=R==null?void 0:R[b];return A!==void 0?A.call(R,I,C):v.call(String(I),R,C)},function(R,C){if(!T&&M||typeof C=="string"&&C.indexOf(P)===-1){var I=j(v,R,this,C);if(I.done)return I.value}for(var A,N=u(R),F=String(this),U=typeof C=="function",W=(U||(C=String(C)),N.global),V=(W&&(A=N.unicode,N.lastIndex=0),[]);(k=s(N,F))!==null&&(V.push(k),W);)String(k[0])===""&&(N.lastIndex=n(F,h(N.lastIndex),A));for(var H,Q="",ee=0,ae=0;ae>>0;if(C==0)return[];if(M===void 0)return[R];if(!u(M))return j.call(R,M,C);for(var I,A,N,F=[],P=(M.ignoreCase?"i":"")+(M.multiline?"m":"")+(M.unicode?"u":"")+(M.sticky?"y":""),U=0,W=new RegExp(M.source,P+"g");(I=c.call(W,R))&&!(U<(A=W.lastIndex)&&(F.push(R.slice(U,I.index)),1=C));)W.lastIndex===I.index&&W.lastIndex++;return U===R.length?!N&&W.test("")||F.push(""):F.push(R.slice(U)),F.length>C?F.slice(0,C):F}:"0".split(void 0,0).length?function(M,P){return M===void 0&&P===0?[]:j.call(this,M,P)}:j;return[function(M,P){var R=h(this),C=M==null?void 0:M[v];return C!==void 0?C.call(M,R,P):T.call(String(R),M,P)},function(I,P){var R=E(T,I,this,P,T!==j);if(R.done)return R.value;var R=o(I),C=String(this),I=y(R,RegExp),A=R.unicode,N=(R.ignoreCase?"i":"")+(R.multiline?"m":"")+(R.unicode?"u":"")+(b?"y":"g"),F=new I(b?R:"^(?:"+R.source+")",N),U=P===void 0?l:P>>>0;if(U==0)return[];if(C.length===0)return s(F,C)===null?[C]:[];for(var W=0,V=0,H=[];Vne.key){he.splice(ue,0,ne);break}ue===z&&he.push(ne)}ie.updateURL()},forEach:function(ne){for(var ue,ie=H(this).entries,he=j(ne,16))return;for(Bt=0;rr();){if(tr=null,Bt>0)if(rr()=="."&&Bt<4)Ye++;else return;if(!G.test(rr()))return;for(;G.test(rr());){if(Wr=parseInt(rr(),10),tr===null)tr=Wr;else{if(tr==0)return;tr=tr*10+Wr}if(tr>255)return;Ye++}gt[Xe]=gt[Xe]*256+tr,Bt++,(Bt==2||Bt==4)&&Xe++}if(Bt!=4)return;break}else if(rr()==":"){if(Ye++,!rr())return}else if(rr())return;gt[Xe++]=Ht}if(pt!==null)for(Tr=Xe-pt,Xe=7;Xe!=0&&Tr>0;)qr=gt[Xe],gt[Xe--]=gt[pt+Tr-1],gt[pt+--Tr]=qr;else if(Xe!=8)return;return gt}(ze.slice(1,-1)))?void(_e.host=Ke):ee;if(ge(_e))return ze=M(ze),ue.test(ze)||(Ke=function(Be){var gt=Be.split("."),Xe,pt,Ye,Ht,Yt,Bt,tr;if(gt.length&>[gt.length-1]==""&>.pop(),(Xe=gt.length)>4)return Be;for(pt=[],Ye=0;Ye1&&Ht.charAt(0)=="0"&&(Yt=X.test(Ht)?16:8,Ht=Ht.slice(Yt==8?1:2)),Ht==="")Bt=0;else{if(!(Yt==10?J:Yt==8?K:ne).test(Ht))return Be;Bt=parseInt(Ht,Yt)}pt.push(Bt)}for(Ye=0;Ye=V(256,5-Xe))return null}else if(Bt>255)return null;for(tr=pt.pop(),Ye=0;Ye":1,"`":1}),de=j({},fe,{"#":1,"?":1,"{":1,"}":1}),ye=j({},de,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),ve=function(_e,ze){var Ke=T(_e,0);return 32"u"&&i!==void 0&&{}.toString.call(i)==="[object process]",b=typeof Uint8ClampedArray<"u"&&typeof importScripts<"u"&&typeof MessageChannel<"u";function v(){var z=setTimeout;return function(){return z(E,1)}}var j=new Array(1e3);function E(){for(var z=0;zR,applyPalette:()=>function(U,W,V="rgb565"){if(!U||!U.buffer)throw new Error("quantize() expected RGBA Uint8Array data");if(!(U instanceof Uint8Array||U instanceof Uint8ClampedArray))throw new Error("quantize() expected RGBA Uint8Array data");if(256>24&255,G=K>>16&255,X=K>>8&255,K=255&K,J=f(K,X,G,D),J=J in k?k[J]:k[J]=function(z,te,ce,fe,de){let ye=0,ve=1e100;for(let Re=0;Reve||(Ee=ge[0],(Ne+=T(Ee-z))>ve||(Ee=ge[1],(Ne+=T(Ee-te))>ve||(Ee=ge[2],(Ne+=T(Ee-ce))>ve||(ve=Ne,ye=Re))))}return ye}(K,X,G,D,W);ae[Y]=J}else{const Y=V==="rgb444"?p:c;for(let z=0;z>16&255,ue=ie>>8&255,ie=255&ie,he=Y(ie,ue,ne),he=he in k?k[he]:k[he]=function(te,ce,fe,de){let ye=0,ve=1e100;for(let Re=0;Reve||(Ee=ge[1],(Ne+=T(Ee-ce))>ve||(Ee=ge[2],(Ne+=T(Ee-fe))>ve||(ve=Ne,ye=Re)))}return ye}(ie,ue,ne,W);ae[z]=he}}return ae},default:()=>F,nearestColor:()=>function(U,W,V=j){return U[M(U,W,V)]},nearestColorIndex:()=>M,nearestColorIndexWithDistance:()=>P,prequantize:()=>function(U,{roundRGB:W=5,roundAlpha:V=10,oneBitAlpha:H=null}={}){const Q=new Uint32Array(U.buffer);for(let G=0;G>24&255;var ee,ae=D>>16&255,k=D>>8&255,D=255&D;X=E(X,V),H&&(ee=typeof H=="number"?H:127,X=X<=ee?0:255),D=E(D,W),k=E(k,W),ae=E(ae,W),Q[G]=X<<24|ae<<16|k<<8|D<<0}},quantize:()=>function(U,W,V={}){var{format:H="rgb565",clearAlpha:Q=!0,clearAlphaColor:ee=0,clearAlphaThreshold:ae=0,oneBitAlpha:k=!1}=V;if(!U||!U.buffer)throw new Error("quantize() expected RGBA Uint8Array data");if(!(U instanceof Uint8Array||U instanceof Uint8ClampedArray))throw new Error("quantize() expected RGBA Uint8Array data");U=new Uint32Array(U.buffer);let D=V.useSqrt!==!1;const G=H==="rgba4444",X=function(Ie,Fe){const Ge=Fe==="rgb444"?4096:65536,we=new Array(Ge),Le=Ie.length;if(Fe==="rgba4444")for(let ot=0;ot>24&255,re=Z>>16&255,se=Z>>8&255,Z=255&Z,le=f(Z,se,re,Te);let Ze=le in we?we[le]:we[le]=v();Ze.rc+=Z,Ze.gc+=se,Ze.bc+=re,Ze.ac+=Te,Ze.cnt++}else if(Fe==="rgb444")for(let ot=0;ot>16&255,Se=Pe>>8&255,Pe=255&Pe,He=p(Pe,Se,xe);let Ze=He in we?we[He]:we[He]=v();Ze.rc+=Pe,Ze.gc+=Se,Ze.bc+=xe,Ze.cnt++}else for(let ot=0;ot>16&255,qe=$e>>8&255,$e=255&$e,lt=c($e,qe,We);let Ze=lt in we?we[lt]:we[lt]=v();Ze.rc+=$e,Ze.gc+=qe,Ze.bc+=We,Ze.cnt++}return we}(U,H),K=X.length,J=K-1,ne=new Uint32Array(K+1);for(var ue=0,ie=0;ie>1,!(X[he=ne[z]].err<=te));Y=z)ne[Y]=he;ne[Y]=ie}var ce,fe=ue-W;for(ie=0;ie=ce.mtm&&X[ce.nn].mtm<=ce.tm)break;for(ce.mtm==J?de=ne[1]=ne[ne[0]--]:(b(X,de),ce.tm=ie),te=X[de].err,Y=1;(z=Y+Y)<=ne[0]&&(zX[ne[z+1]].err&&z++,!(te<=X[he=ne[z]].err));Y=z)ne[Y]=he;ne[Y]=de}var ye=X[ce.nn],ve=ce.cnt,Ee=ye.cnt,ge=1/(ve+Ee);G&&(ce.ac=ge*(ve*ce.ac+Ee*ye.ac)),ce.rc=ge*(ve*ce.rc+Ee*ye.rc),ce.gc=ge*(ve*ce.gc+Ee*ye.gc),ce.bc=ge*(ve*ce.bc+Ee*ye.bc),ce.cnt+=ye.cnt,ce.mtm=++ie,X[ye.bk].fw=ye.fw,X[ye.fw].bk=ye.bk,ye.mtm=J}let Ne=[];for(ie=0;;0){let Ie=d(Math.round(X[ie].rc),0,255),Fe=d(Math.round(X[ie].gc),0,255),Ge=d(Math.round(X[ie].bc),0,255),we=255;G&&(we=d(Math.round(X[ie].ac),0,255),k&&(Re=typeof k=="number"?k:127,we=we<=Re?0:255),Q&&we<=ae&&(Ie=Fe=Ge=ee,we=0));var Re=G?[Ie,Fe,Ge,we]:[Ie,Fe,Ge];if(function(Le,Te){for(let Z=0;Zfunction(U,W,V=5){if(U.length&&W.length){var H=U.map(D=>D.slice(0,3)),Q=V*V,ee=U[0].length;for(let D=0;Dee?G.slice(0,3):G.slice();var k=P(H,G.slice(0,3),j),ae=k[0],k=k[1];0>>0),ee!=0&&(Q=Math.max(Q,256));const ae=V;V=new Uint8Array(Q),0>=8,K-=8;if((te>he||ue)&&(ue?(ie=ne,he=(1<>=8,K-=8;0>3}function f(U,W,V,H){return U>>4|240&W|(240&V)<<4|(240&H)<<8}function p(U,W,V){return U>>4<<8|240&W|V>>4}function d(U,W,V){return U>8&255)}function A(U,W){for(var V=0;V>1,p=-7,d=o?b-1:0,l=o?-1:1,b=i[u+d];for(d+=l,m=b&(1<<-p)-1,b>>=-p,p+=s;0>=-p,p+=h;0>1,d=y===23?Math.pow(2,-24)-Math.pow(2,-77):0,l=h?0:v-1,b=h?1:-1,v=u<0||u===0&&1/u<0?1:0;for(u=Math.abs(u),isNaN(u)||u===1/0?(s=isNaN(u)?1:0,n=f):(n=Math.floor(Math.log(u)/Math.LN2),u*(h=Math.pow(2,-n))<1&&(n--,h*=2),2<=(u+=1<=n+p?d/h:d*Math.pow(2,1-p))*h&&(n++,h/=2),f<=n+p?(s=0,n=f):1<=n+p?(s=(u*h-1)*Math.pow(2,y),n+=p):(s=u*Math.pow(2,p-1)*Math.pow(2,y),n=0));8<=y;i[o+l]=255&s,l+=b,s/=256,y-=8);for(n=n<Math.abs(re[0])&&(se=1),se=Math.abs(re[2])>Math.abs(re[se])?2:se}function I(re,se){re.f+=se.f,re.b.f+=se.b.f}function A(re,se,Z){return re=re.a,se=se.a,Z=Z.a,se.b.a===re?Z.b.a===re?o(se.a,Z.a)?y(Z.b.a,se.a,Z.a)<=0:0<=y(se.b.a,Z.a,se.a):y(Z.b.a,re,Z.a)<=0:Z.b.a===re?0<=y(se.b.a,re,se.a):(se=h(se.b.a,re,se.a),(re=h(Z.b.a,re,Z.a))<=se)}function N(re){re.a.i=null;var se=re.e;se.a.c=se.c,se.c.a=se.a,re.e=null}function F(re,se){d(re.a),re.c=!1,(re.a=se).i=re}function U(re){for(var se=re.a.a;(re=Te(re)).a.a===se;);return re.c&&(F(re,se=b(Le(re).a.b,re.a.e)),re=Te(re)),re}function W(re,se,Z){var le=new we;return le.a=Z,le.e=ue(re.f,se.e,le),Z.i=le}function V(re,se){switch(re.s){case 100130:return(1&se)!=0;case 100131:return se!==0;case 100132:return 0>1]],He[Pe[qe]])?Fe:Ge)(Z,qe),He[Se]=null,We[Se]=Z.b,Z.b=Se}else for(Z.c[-(Se+1)]=null;0Math.max(Pe.a,We.a))){if(o(Se,Pe)){if(0Z.f&&(Z.f*=2,Z.c=Ne(Z.c,Z.f+1)),Z.b===0?xe=le:(xe=Z.b,Z.b=Z.c[Z.b]),Z.e[xe]=se,Z.c[xe]=le,Z.d[le]=xe,Z.h&&Ge(Z,le),xe):(Z=re.a++,re.c[Z]=se,-(Z+1))}function Ee(re){if(re.a===0)return Ie(re.b);var se=re.c[re.d[re.a-1]];if(re.b.a!==0&&o(Re(re.b),se))return Ie(re.b);for(;--re.a,0re.a||o(le[Pe],le[We])){xe[Z[Se]=Pe]=Se;break}xe[Z[Se]=We]=Se,Se=He}}function Ge(re,se){for(var Z=re.d,le=re.e,xe=re.c,Se=se,Pe=Z[Se];;){var He=Se>>1,We=Z[He];if(He==0||o(le[We],le[Pe])){xe[Z[Se]=Pe]=Se;break}xe[Z[Se]=We]=Se,Se=He}}function we(){this.e=this.a=null,this.f=0,this.c=this.b=this.h=this.d=!1}function Le(re){return re.e.c.b}function Te(re){return re.e.a.b}(i=he.prototype).x=function(){Y(this,0)},i.B=function(re,se){switch(re){case 100142:return;case 100140:switch(se){case 100130:case 100131:case 100132:case 100133:case 100134:return void(this.s=se)}break;case 100141:return void(this.m=!!se);default:return void z(this,100900)}z(this,100901)},i.y=function(re){switch(re){case 100142:return 0;case 100140:return this.s;case 100141:return this.m;default:z(this,100900)}return!1},i.A=function(re,se,Z){this.j[0]=re,this.j[1]=se,this.j[2]=Z},i.z=function(re,se){var Z=se||null;switch(re){case 100100:case 100106:this.h=Z;break;case 100104:case 100110:this.l=Z;break;case 100101:case 100107:this.k=Z;break;case 100102:case 100108:this.i=Z;break;case 100103:case 100109:this.p=Z;break;case 100105:case 100111:this.o=Z;break;case 100112:this.r=Z;break;default:z(this,100900)}},i.C=function(re,se){var Z=!1,le=[0,0,0];Y(this,2);for(var xe=0;xe<3;++xe){var Se=re[xe];Se<-1e150&&(Se=-1e150,Z=!0),1e150le[qe]&&(le[qe]=$e,xe[qe]=Z)}if(le[1]-He[1]>le[Z=0]-He[0]&&(Z=1),He[Z=le[2]-He[2]>le[Z]-He[Z]?2:Z]>=le[Z])Pe[0]=0,Pe[1]=0,Pe[2]=1;else{for(He=We[Z],xe=xe[Z],We=[le=0,0,0],He=[He.g[0]-xe.g[0],He.g[1]-xe.g[1],He.g[2]-xe.g[2]],qe=[0,0,0],Z=Se.e;Z!==Se;Z=Z.e)qe[0]=Z.g[0]-xe.g[0],qe[1]=Z.g[1]-xe.g[1],qe[2]=Z.g[2]-xe.g[2],We[0]=He[1]*qe[2]-He[2]*qe[1],We[1]=He[2]*qe[0]-He[0]*qe[2],We[2]=He[0]*qe[1]-He[1]*qe[0],le<($e=We[0]*We[0]+We[1]*We[1]+We[2]*We[2])&&(le=$e,Pe[0]=We[0],Pe[1]=We[1],Pe[2]=We[2]);le<=0&&(Pe[0]=Pe[1]=Pe[2]=0,Pe[C(He)]=1)}Se=!0}for(We=C(Pe),Z=this.b.c,le=(We+1)%3,xe=(We+2)%3,We=0>=1;)++p;if(l=1<>8&255,o[n++]=255&y,o[n++]=y>>8&255,o[n++]=(c!==null?128:0)|p,o[n++]=d,o[n++]=0,c!==null)for(var b=0,v=c.length;b>16&255,o[n++]=j>>8&255,o[n++]=255&j}if(s!==null){if(s<0||65535>8&255,o[n++]=0}var E=!1;this.addFrame=function(T,M,P,R,C,I){if(E===!0&&(--n,E=!1),I=I===void 0?{}:I,T<0||M<0||65535>=1;)++F;var U=1<>8&255,o[n++]=Q,o[n++]=0),o[n++]=44,o[n++]=255&T,o[n++]=T>>8&255,o[n++]=255&M,o[n++]=M>>8&255,o[n++]=255&P,o[n++]=P>>8&255,o[n++]=255&R,o[n++]=R>>8&255,o[n++]=A===!0?128|F-1:0,A===!0)for(var ee=0,ae=N.length;ee>16&255,o[n++]=k>>8&255,o[n++]=255&k}return n=function(D,G,X,K){D[G++]=X;var J=G++,ne=1<>=8,z-=8,G===J+256&&(D[J]=255,J=G++)}function fe(Ie){te|=Ie<>=8,z-=8,G===J+256&&(D[J]=255,J=G++);he===4096?(fe(ne),he=1+ie,Y=X+1,ye={}):(1<>=p,l-=p,M==s)f=1+c,d=(1<<(p=n+1))-1,T=null;else{if(M==c)break;for(var P=M>8,++R;var I=C;if(m>=8;T!==null&&f<4096&&(E[f++]=T<<8|I,d+1<=f&&p<12&&(++p,d=d<<1|1)),T=M}}v!==m&&console.log("Warning, gif stream shorter than expected.")}try{g.GifWriter=i,g.GifReader=function(o){var h=0;if(o[h++]!==71||o[h++]!==73||o[h++]!==70||o[h++]!==56||(o[h++]+1&253)!=56||o[h++]!==97)throw new Error("Invalid GIF 87a/89a header.");var y=o[h++]|o[h++]<<8,m=o[h++]|o[h++]<<8,n=o[h++],s=1<<1+(7&n),c=(o[h++],o[h++],null),f=null,p=(n>>7&&(c=h,h+=3*(f=s)),!0),d=[],l=0,b=null,v=0,j=null;for(this.width=y,this.height=m;p&&h>2&7,h++;break;case 254:for(;;){if(!(0<=(T=o[h++])))throw Error("Invalid block size");if(T===0)break;h+=T}break;default:throw new Error("Unknown graphic control label: 0x"+o[h-1].toString(16))}break;case 44:var T,M=o[h++]|o[h++]<<8,P=o[h++]|o[h++]<<8,R=o[h++]|o[h++]<<8,C=o[h++]|o[h++]<<8,W=o[h++],I=W>>6&1,A=1<<1+(7&W),N=c,F=f,U=!1,W=(W>>7&&(U=!0,N=h,h+=3*(F=A)),h);for(h++;;){if(!(0<=(T=o[h++])))throw Error("Invalid block size");if(T===0)break;h+=T}d.push({x:M,y:P,width:R,height:C,has_local_palette:U,palette_offset:N,palette_size:F,data_offset:W,data_length:h-W,transparent_index:b,interlaced:!!I,delay:l,disposal:v});break;case 59:p=!1;break;default:throw new Error("Unknown gif block: 0x"+o[h-1].toString(16))}this.numFrames=function(){return d.length},this.loopCount=function(){return j},this.frameInfo=function(V){if(V<0||V>=d.length)throw new Error("Frame index out of range.");return d[V]},this.decodeAndBlitFrameBGRA=function(V,H){for(var V=this.frameInfo(V),Q=V.width*V.height,ee=new Uint8Array(Q),ae=(u(o,V.data_offset,ee,Q),V.palette_offset),k=V.transparent_index,D=(k===null&&(k=256),V.width),G=y-D,X=D,K=4*(V.y*y+V.x),J=4*((V.y+V.height)*y+V.x),ne=K,ue=4*G,ie=(V.interlaced===!0&&(ue+=4*y*7),8),he=0,Y=ee.length;he>=1)),ce===k?ne+=4:(z=o[ae+3*ce],te=o[ae+3*ce+1],ce=o[ae+3*ce+2],H[ne++]=ce,H[ne++]=te,H[ne++]=z,H[ne++]=255),--X}},this.decodeAndBlitFrameRGBA=function(V,H){for(var V=this.frameInfo(V),Q=V.width*V.height,ee=new Uint8Array(Q),ae=(u(o,V.data_offset,ee,Q),V.palette_offset),k=V.transparent_index,D=(k===null&&(k=256),V.width),G=y-D,X=D,K=4*(V.y*y+V.x),J=4*((V.y+V.height)*y+V.x),ne=K,ue=4*G,ie=(V.interlaced===!0&&(ue+=4*y*7),8),he=0,Y=ee.length;he>=1)),ce===k?ne+=4:(z=o[ae+3*ce],te=o[ae+3*ce+1],ce=o[ae+3*ce+2],H[ne++]=z,H[ne++]=te,H[ne++]=ce,H[ne++]=255),--X}}}}catch{}},{}],257:[function(t,w,g){(function(i){var u,o;u=this,o=function(h){function y(B){if(this==null)throw TypeError();var S,O=String(this),L=O.length,B=B?Number(B):0;if(!((B=B!=B?0:B)<0||L<=B))return 55296<=(S=O.charCodeAt(B))&&S<=56319&&B+1>>16-S;return _.tag>>>=S,_.bitcount-=S,L+O}function A(_,S){for(;_.bitcount<24;)_.tag|=_.source[_.sourceIndex++]<<_.bitcount,_.bitcount+=8;for(var O=0,L=0,B=0,q=_.tag;L=2*L+(1&q),q>>>=1,O+=S.table[++B],0<=(L-=S.table[B]););return _.tag=q,_.bitcount-=B,S.trans[O+L]}function N(_,S,O){for(;;){var L=A(_,S);if(L===256)return n;if(L<256)_.dest[_.destLen++]=L;else for(var B,q=I(_,l[L-=257],b[L]),L=A(_,O),$=B=_.destLen-I(_,v[L],j[L]);$>>=1,L=B,I(q,2,0)){case 0:O=function(Oe){for(var Je,ut;8this.x2&&(this.x2=_)),typeof S=="number"&&((isNaN(this.y1)||isNaN(this.y2))&&(this.y1=S,this.y2=S),Sthis.y2&&(this.y2=S))},Q.prototype.addX=function(_){this.addPoint(_,null)},Q.prototype.addY=function(_){this.addPoint(null,_)},Q.prototype.addBezier=function(_,S,O,L,B,q,$,oe){var me=[_,S],pe=[O,L],je=[B,q],Me=[$,oe];this.addPoint(_,S),this.addPoint($,oe);for(var ke=0;ke<=1;ke++){var be,Ue=6*me[ke]-12*pe[ke]+6*je[ke],Ae=-3*me[ke]+9*pe[ke]-9*je[ke]+3*Me[ke],De=3*pe[ke]-3*me[ke];Ae==0?Ue==0||0<(be=-De/Ue)&&be<1&&(ke===0&&this.addX(H(me[ke],pe[ke],je[ke],Me[ke],be)),ke===1&&this.addY(H(me[ke],pe[ke],je[ke],Me[ke],be))):(be=Math.pow(Ue,2)-4*De*Ae)<0||(0<(De=(-Ue+Math.sqrt(be))/(2*Ae))&&De<1&&(ke===0&&this.addX(H(me[ke],pe[ke],je[ke],Me[ke],De)),ke===1&&this.addY(H(me[ke],pe[ke],je[ke],Me[ke],De))),0<(De=(-Ue-Math.sqrt(be))/(2*Ae))&&De<1&&(ke===0&&this.addX(H(me[ke],pe[ke],je[ke],Me[ke],De)),ke===1&&this.addY(H(me[ke],pe[ke],je[ke],Me[ke],De))))}},Q.prototype.addQuad=function(_,S,O,L,B,q){O=_+2/3*(O-_),L=S+2/3*(L-S),this.addBezier(_,S,O,L,O+1/3*(B-_),L+1/3*(q-S),B,q)},ee.prototype.moveTo=function(_,S){this.commands.push({type:"M",x:_,y:S})},ee.prototype.lineTo=function(_,S){this.commands.push({type:"L",x:_,y:S})},ee.prototype.curveTo=ee.prototype.bezierCurveTo=function(_,S,O,L,B,q){this.commands.push({type:"C",x1:_,y1:S,x2:O,y2:L,x:B,y:q})},ee.prototype.quadTo=ee.prototype.quadraticCurveTo=function(_,S,O,L){this.commands.push({type:"Q",x1:_,y1:S,x:O,y:L})},ee.prototype.close=ee.prototype.closePath=function(){this.commands.push({type:"Z"})},ee.prototype.extend=function(_){var S;if(_.commands)_=_.commands;else if(_ instanceof Q)return S=_,this.moveTo(S.x1,S.y1),this.lineTo(S.x2,S.y1),this.lineTo(S.x2,S.y2),this.lineTo(S.x1,S.y2),void this.close();Array.prototype.push.apply(this.commands,_)},ee.prototype.getBoundingBox=function(){for(var _=new Q,S=0,O=0,L=0,B=0,q=0;q>8&255,255&_]},K.USHORT=J(2),X.SHORT=function(_){return[(_=32768<=_?-(65536-_):_)>>8&255,255&_]},K.SHORT=J(2),X.UINT24=function(_){return[_>>16&255,_>>8&255,255&_]},K.UINT24=J(3),X.ULONG=function(_){return[_>>24&255,_>>16&255,_>>8&255,255&_]},K.ULONG=J(4),X.LONG=function(_){return[(_=2147483648<=_?-(4294967296-_):_)>>24&255,_>>16&255,_>>8&255,255&_]},K.LONG=J(4),X.FIXED=X.ULONG,K.FIXED=K.ULONG,X.FWORD=X.SHORT,K.FWORD=K.SHORT,X.UFWORD=X.USHORT,K.UFWORD=K.USHORT,X.LONGDATETIME=function(_){return[0,0,0,0,_>>24&255,_>>16&255,_>>8&255,255&_]},K.LONGDATETIME=J(8),X.TAG=function(_){return D.argument(_.length===4,"Tag should be exactly 4 ASCII characters."),[_.charCodeAt(0),_.charCodeAt(1),_.charCodeAt(2),_.charCodeAt(3)]},K.TAG=J(4),X.Card8=X.BYTE,K.Card8=K.BYTE,X.Card16=X.USHORT,K.Card16=K.USHORT,X.OffSize=X.BYTE,K.OffSize=K.BYTE,X.SID=X.USHORT,K.SID=K.USHORT,X.NUMBER=function(_){return-107<=_&&_<=107?[_+139]:108<=_&&_<=1131?[247+((_-=108)>>8),255&_]:-1131<=_&&_<=-108?[251+((_=-_-108)>>8),255&_]:-32768<=_&&_<=32767?X.NUMBER16(_):X.NUMBER32(_)},K.NUMBER=function(_){return X.NUMBER(_).length},X.NUMBER16=function(_){return[28,_>>8&255,255&_]},K.NUMBER16=J(3),X.NUMBER32=function(_){return[29,_>>24&255,_>>16&255,_>>8&255,255&_]},K.NUMBER32=J(5),X.REAL=function(_){for(var S=_.toString(),O=/\.(\d*?)(?:9{5,20}|0{5,20})\d{0,2}(?:e(.+)|$)/.exec(S),L=(O&&(O=parseFloat("1e"+((O[2]?+O[2]:0)+O[1].length)),S=(Math.round(_*O)/O).toString()),""),B=0,q=S.length;B>8&255,S[S.length]=255&L}return S},K.UTF16=function(_){return 2*_.length};var ne,ue={"x-mac-croatian":"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®Š™´¨≠ŽØ∞±≤≥∆µ∂∑∏š∫ªºΩžø¿¡¬√ƒ≈Ć«Č… ÀÃÕŒœĐ—“”‘’÷◊©⁄€‹›Æ»–·‚„‰ÂćÁčÈÍÎÏÌÓÔđÒÚÛÙıˆ˜¯πË˚¸Êæˇ","x-mac-cyrillic":"АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ†°Ґ£§•¶І®©™Ђђ≠Ѓѓ∞±≤≥іµґЈЄєЇїЉљЊњјЅ¬√ƒ≈∆«»… ЋћЌќѕ–—“”‘’÷„ЎўЏџ№Ёёяабвгдежзийклмнопрстуфхцчшщъыьэю","x-mac-gaelic":"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØḂ±≤≥ḃĊċḊḋḞḟĠġṀæøṁṖṗɼƒſṠ«»… ÀÃÕŒœ–—“”‘’ṡẛÿŸṪ€‹›Ŷŷṫ·Ỳỳ⁊ÂÊÁËÈÍÎÏÌÓÔ♣ÒÚÛÙıÝýŴŵẄẅẀẁẂẃ","x-mac-greek":"Ĺ²É³ÖÜ΅àâä΄¨çéèê룙î‰ôö¦€ùûü†ΓΔΘΛΞΠß®©ΣΪ§≠°·Α±≤≥¥ΒΕΖΗΙΚΜΦΫΨΩάΝ¬ΟΡ≈Τ«»… ΥΧΆΈœ–―“”‘’÷ΉΊΌΎέήίόΏύαβψδεφγηιξκλμνοπώρστθωςχυζϊϋΐΰ­","x-mac-icelandic":"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûüÝ°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄€ÐðÞþý·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ","x-mac-inuit":"ᐃᐄᐅᐆᐊᐋᐱᐲᐳᐴᐸᐹᑉᑎᑏᑐᑑᑕᑖᑦᑭᑮᑯᑰᑲᑳᒃᒋᒌᒍᒎᒐᒑ°ᒡᒥᒦ•¶ᒧ®©™ᒨᒪᒫᒻᓂᓃᓄᓅᓇᓈᓐᓯᓰᓱᓲᓴᓵᔅᓕᓖᓗᓘᓚᓛᓪᔨᔩᔪᔫᔭ… ᔮᔾᕕᕖᕗ–—“”‘’ᕘᕙᕚᕝᕆᕇᕈᕉᕋᕌᕐᕿᖀᖁᖂᖃᖄᖅᖏᖐᖑᖒᖓᖔᖕᙱᙲᙳᙴᙵᙶᖖᖠᖡᖢᖣᖤᖥᖦᕼŁł","x-mac-ce":"ÄĀāÉĄÖÜáąČäčĆć鏟ĎíďĒēĖóėôöõúĚěü†°Ę£§•¶ß®©™ę¨≠ģĮįĪ≤≥īĶ∂∑łĻļĽľĹĺŅņѬ√ńŇ∆«»… ňŐÕőŌ–—“”‘’÷◊ōŔŕŘ‹›řŖŗŠ‚„šŚśÁŤťÍŽžŪÓÔūŮÚůŰűŲųÝýķŻŁżĢˇ",macintosh:"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄€‹›fifl‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ","x-mac-romanian":"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ĂȘ∞±≤≥¥µ∂∑∏π∫ªºΩăș¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄€‹›Țț‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ","x-mac-turkish":"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸĞğİıŞş‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙˆ˜¯˘˙˚¸˝˛ˇ"},ie=(G.MACSTRING=function(_,S,O,L){var B=ue[L];if(B!==void 0){for(var q="",$=0;$>8&255,ke+256&255)}return pe})(_,L,S);return S},X.INDEX=function(_){for(var S=1,O=[S],L=[],B=0;B<_.length;B+=1){var q=X.OBJECT(_[B]);Array.prototype.push.apply(L,q),S+=q.length,O.push(S)}if(L.length===0)return[0,0];for(var $=[],oe=1+Math.floor(Math.log(S)/Math.log(2))/8|0,me=[void 0,X.BYTE,X.USHORT,X.UINT24,X.ULONG][oe],pe=0;pe>8,S[je+1]=255&Me,S=S.concat(L[pe])}return S},K.TABLE=function(_){for(var S=0,O=_.fields.length,L=0;L>1,oe.skip("uShort",3),De.glyphIndexMap={};for(var ut,et=new Te.Parser(Ce,Oe+Je+14),tt=new Te.Parser(Ce,Oe+Je+16+2*ut),ct=new Te.Parser(Ce,Oe+Je+16+4*ut),Ot=new Te.Parser(Ce,Oe+Je+16+6*ut),Gt=Oe+Je+16+8*ut,Xt=0;Xt>4,$=15&$;if(q==15||(L+=B[q],$==15))break;L+=B[$]}return parseFloat(L)}if(32<=S&&S<=246)return S-139;if(247<=S&&S<=250)return 256*(S-247)+_.parseByte()+108;if(251<=S&&S<=254)return 256*-(S-251)-_.parseByte()-108;throw new Error("Invalid b0 "+S)}function dr(_,S,O){var L=new Te.Parser(_,S=S!==void 0?S:0),B=[],q=[];for(O=O!==void 0?O:_.length;L.relativeOffset>1,be.length=0,Ae=!0}return function tt(ct){for(var Ot,Gt,Xt,fr,hr,Nr,kt,Lt,St,pr,Ft,ar,It=0;ItMath.abs(ar-Oe)?Ce=Ft+be.shift():Oe=ar+be.shift(),ke.curveTo(L,B,q,$,kt,Lt),ke.curveTo(St,pr,Ft,ar,Ce,Oe);break;default:console.log("Glyph "+S.index+": unknown operator 1200"+nr),be.length=0}break;case 14:0>3;break;case 21:2>16),It+=2;break;case 29:hr=be.pop()+_.gsubrsBias,(Nr=_.gsubrs[hr])&&tt(Nr);break;case 30:for(;0=O.begin&&_=xe.length&&(q=L.parseChar(),O.names.push(L.parseString(q)));break;case 2.5:O.numberOfGlyphs=L.parseUShort(),O.offset=new Array(O.numberOfGlyphs);for(var oe=0;oeMe.value.tag?1:-1}),S.fields=S.fields.concat(L),S.fields=S.fields.concat(B),S}function Ol(_,S,O){for(var L=0;L 123 are reserved for internal usage");be|=1<>>1,q=_[B].tag;if(q===S)return B;q>>1,q=_[B];if(q===S)return B;q>>1,$=(B=_[q]).start;if($===S)return B;$(B=_[O-1]).end?0:B}function hs(_,S){this.font=_,this.tableName=S}function ps(_){hs.call(this,_,"gpos")}function Xr(_){hs.call(this,_,"gsub")}function Rl(_,S,O){for(var L=_.subtables,B=0;BS.points.length-1||L.matchedPoints[1]>B.points.length-1)throw Error("Matched points out of range in "+S.name);var $=S.points[L.matchedPoints[0]],oe=B.points[L.matchedPoints[1]],L={xScale:L.xScale,scale01:L.scale01,scale10:L.scale10,yScale:L.yScale,dx:0,dy:0},oe=Ei([oe],L)[0];L.dx=$.x-oe.x,L.dy=$.y-oe.y,q=Ei(B.points,L)}S.points=S.points.concat(q)}}return Dl(S.points)}(ps.prototype=hs.prototype={searchTag:Si,binSearch:Pl,getTable:function(_){var S=this.font.tables[this.tableName];return S=!S&&_?this.font.tables[this.tableName]=this.createDefaultTable():S},getScriptNames:function(){var _=this.getTable();return _?_.scripts.map(function(S){return S.tag}):[]},getDefaultScriptName:function(){var _=this.getTable();if(_){for(var S=!1,O=0;O<_.scripts.length;O++){var L=_.scripts[O].tag;if(L==="DFLT")return L;L==="latn"&&(S=!0)}return S?"latn":void 0}},getScriptTable:function(_,S){var O,L=this.getTable(S);if(L)return O=L.scripts,0<=(L=Si(L.scripts,_=_||"DFLT"))?O[L].script:S?(O.splice(-1-L,0,S={tag:_,script:{defaultLangSys:{reserved:0,reqFeatureIndex:65535,featureIndexes:[]},langSysRecords:[]}}),S.script):void 0},getLangSysTable:function(B,S,O){var L,B=this.getScriptTable(B,O);if(B)return S&&S!=="dflt"&&S!=="DFLT"?0<=(L=Si(B.langSysRecords,S))?B.langSysRecords[L].langSys:O?(B.langSysRecords.splice(-1-L,0,O={tag:S,langSys:{reserved:0,reqFeatureIndex:65535,featureIndexes:[]}}),O.langSys):void 0:B.defaultLangSys},getFeatureTable:function(_,S,O,L){if(_=this.getLangSysTable(_,S,L),_){for(var B,q=_.featureIndexes,$=this.font.tables[this.tableName].features,oe=0;oe=$[S-1].tag,"Features must be added in alphabetical order."),$.push(B={tag:O,feature:{params:0,lookupListIndexes:[]}}),q.push(S),B.feature}},getLookupTables:function(q,S,O,L,B){var q=this.getFeatureTable(q,S,O,B),$=[];if(q){for(var oe,me=q.lookupListIndexes,pe=this.font.tables[this.tableName].lookups,je=0;je",q),S.stack.push(Math.round(64*q))}function ki(_,S){var O=S.stack,L=O.pop(),B=S.fv,q=S.pv,$=S.ppem,oe=S.deltaBase+16*(_-1),me=S.deltaShift,pe=S.z0;h.DEBUG&&console.log(S.step,"DELTAP["+_+"]",L,O);for(var je=0;je>4)===$&&(0<=(ke=(15&ke)-8)&&ke++,h.DEBUG&&console.log(S.step,"DELTAPFIX",Me,"by",ke*me),Me=pe[Me],B.setRelative(Me,Me,ke*me,q))}}function ys(_,S){var O=S.stack,L=O.pop();h.DEBUG&&console.log(S.step,"ROUND[]"),O.push(64*S.round(L/64))}function Mi(_,S){var O=S.stack,L=O.pop(),B=S.ppem,q=S.deltaBase+16*(_-1),$=S.deltaShift;h.DEBUG&&console.log(S.step,"DELTAC["+_+"]",L,O);for(var oe=0;oe>4)===B&&(0<=(pe=(15&pe)-8)&&pe++,pe=pe*$,h.DEBUG&&console.log(S.step,"DELTACFIX",me,"by",pe),S.cvt[me]+=pe)}}function ru(_,S){var O,B=S.stack,L=B.pop(),B=B.pop(),q=S.z2[L],$=S.z1[B];h.DEBUG&&console.log(S.step,"SDPVTL["+_+"]",L,B),L=_?(O=q.y-$.y,$.x-q.x):(O=$.x-q.x,$.y-q.y),S.dpv=Po(O,L)}function vn(_,S){var O=S.stack,L=S.prog,B=S.ip;h.DEBUG&&console.log(S.step,"PUSHB["+_+"]");for(var q=0;q<_;q++)O.push(L[++B]);S.ip=B}function bn(_,S){var O=S.ip,L=S.prog,B=S.stack;h.DEBUG&&console.log(S.ip,"PUSHW["+_+"]");for(var q=0;q<_;q++){var $=L[++O]<<8|L[++O];32768&$&&($=-(1+(65535^$))),B.push($)}S.ip=O}function Qe(_,S,O,L,B,q){var $,oe,pe=q.stack,me=_&&pe.pop(),pe=pe.pop(),je=q.rp0,je=q.z0[je],Me=q.z1[pe],ke=q.minDis,be=q.fv,Ue=q.dpv,Ae=$=Ue.distance(Me,je,!0,!0),De=0<=Ae?1:-1;Ae=Math.abs(Ae),_&&(oe=q.cvt[me],L&&Math.abs(Ae-oe)":"_")+(L?"R":"_")+(B===0?"Gr":B===1?"Bl":B===2?"Wh":"")+"]",_?me+"("+q.cvt[me]+","+oe+")":"",pe,"(d =",$,"->",De*Ae,")"),q.rp1=q.rp0,q.rp2=pe,S&&(q.rp0=pe)}Nl.prototype.exec=function(_,S){if(typeof S!="number")throw new Error("Point size is not a number!");if(!(2",L),oe.interpolate(Me,q,$,me),oe.touch(Me)}_.loop=1},Ql.bind(void 0,0),Ql.bind(void 0,1),function(_){for(var S=_.stack,O=_.rp0,L=_.z0[O],B=_.loop,q=_.fv,$=_.pv,oe=_.z1;B--;){var me=S.pop(),pe=oe[me];h.DEBUG&&console.log(_.step,(1<_.loop?"loop "+(_.loop-B)+": ":"")+"ALIGNRP[]",me),q.setRelative(pe,L,0,$),q.touch(pe)}_.loop=1},function(_){h.DEBUG&&console.log(_.step,"RTDG[]"),_.round=Sh},Jl.bind(void 0,0),Jl.bind(void 0,1),function(_){var S=_.prog,O=_.ip,L=_.stack,B=S[++O];h.DEBUG&&console.log(_.step,"NPUSHB[]",B);for(var q=0;q"u"?Fh:Nh)(_,function(O,L){if(O)return S(O);var B;try{B=Ci(L)}catch(q){return S(q,null)}return S(null,B)})},h.loadSync=function(_){return Ci(Ll(t("fs").readFileSync(_)))},Object.defineProperty(h,"__esModule",{value:!0})},o(typeof g=="object"&&w!==void 0?g:u.opentype={})}).call(this,t("buffer").Buffer)},{buffer:4,fs:2}],258:[function(t,w,g){(function(i){function u(y,m){for(var n=0,s=y.length-1;0<=s;s--){var c=y[s];c==="."?y.splice(s,1):c===".."?(y.splice(s,1),n++):n&&(y.splice(s,1),n--)}if(m)for(;n--;)y.unshift("..");return y}function o(y,m){if(y.filter)return y.filter(m);for(var n=[],s=0;s'.concat(l,"").concat(f,""),this.dummyDOM||(this.dummyDOM=document.getElementById(d).parentNode),this.descriptions?this.descriptions.fallbackElements||(this.descriptions.fallbackElements={}):this.descriptions={fallbackElements:{}},this.descriptions.fallbackElements[c]?this.descriptions.fallbackElements[c].innerHTML!==l&&(this.descriptions.fallbackElements[c].innerHTML=l):this._describeElementHTML("fallback",c,l),p===this.LABEL&&(this.descriptions.labelElements||(this.descriptions.labelElements={}),this.descriptions.labelElements[c]?this.descriptions.labelElements[c].innerHTML!==l&&(this.descriptions.labelElements[c].innerHTML=l):this._describeElementHTML("label",c,l)))},i.default.prototype._describeHTML=function(c,f){var p,d=this.canvas.id;c==="fallback"?(this.dummyDOM.querySelector("#".concat(d+u))?this.dummyDOM.querySelector("#"+d+h).insertAdjacentHTML("beforebegin",'

        ')):(p='

        '),this.dummyDOM.querySelector("#".concat(d,"accessibleOutput"))?this.dummyDOM.querySelector("#".concat(d,"accessibleOutput")).insertAdjacentHTML("beforebegin",p):this.dummyDOM.querySelector("#".concat(d)).innerHTML=p),this.descriptions.fallback=this.dummyDOM.querySelector("#".concat(d).concat(o)),this.descriptions.fallback.innerHTML=f):c==="label"&&(this.dummyDOM.querySelector("#".concat(d+y))?this.dummyDOM.querySelector("#".concat(d+n))&&this.dummyDOM.querySelector("#".concat(d+n)).insertAdjacentHTML("beforebegin",'

        ')):(p='

        '),this.dummyDOM.querySelector("#".concat(d,"accessibleOutputLabel"))?this.dummyDOM.querySelector("#".concat(d,"accessibleOutputLabel")).insertAdjacentHTML("beforebegin",p):this.dummyDOM.querySelector("#"+d).insertAdjacentHTML("afterend",p)),this.descriptions.label=this.dummyDOM.querySelector("#"+d+m),this.descriptions.label.innerHTML=f)},i.default.prototype._describeElementHTML=function(c,f,p){var d,l=this.canvas.id;c==="fallback"?(this.dummyDOM.querySelector("#".concat(l+u))?this.dummyDOM.querySelector("#"+l+h)||this.dummyDOM.querySelector("#"+l+o).insertAdjacentHTML("afterend",'
        Canvas elements and their descriptions
        ')):(d='
        Canvas elements and their descriptions
        '),this.dummyDOM.querySelector("#".concat(l,"accessibleOutput"))?this.dummyDOM.querySelector("#".concat(l,"accessibleOutput")).insertAdjacentHTML("beforebegin",d):this.dummyDOM.querySelector("#"+l).innerHTML=d),(d=document.createElement("tr")).id=l+"_fte_"+f,this.dummyDOM.querySelector("#"+l+h).appendChild(d),this.descriptions.fallbackElements[f]=this.dummyDOM.querySelector("#".concat(l).concat("_fte_").concat(f)),this.descriptions.fallbackElements[f].innerHTML=p):c==="label"&&(this.dummyDOM.querySelector("#".concat(l+y))?this.dummyDOM.querySelector("#".concat(l+n))||this.dummyDOM.querySelector("#"+l+m).insertAdjacentHTML("afterend",'
        ')):(d='
        '),this.dummyDOM.querySelector("#".concat(l,"accessibleOutputLabel"))?this.dummyDOM.querySelector("#".concat(l,"accessibleOutputLabel")).insertAdjacentHTML("beforebegin",d):this.dummyDOM.querySelector("#"+l).insertAdjacentHTML("afterend",d)),(c=document.createElement("tr")).id=l+"_lte_"+f,this.dummyDOM.querySelector("#"+l+n).appendChild(c),this.descriptions.labelElements[f]=this.dummyDOM.querySelector("#".concat(l).concat("_lte_").concat(f)),this.descriptions.labelElements[f].innerHTML=p)},t=i.default,g.default=t},{"../core/main":283,"core-js/modules/es.array.concat":153,"core-js/modules/es.regexp.exec":195,"core-js/modules/es.string.ends-with":198,"core-js/modules/es.string.replace":204}],264:[function(t,w,g){t("core-js/modules/es.array.concat"),t("core-js/modules/es.array.from"),t("core-js/modules/es.array.map"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.array.concat"),t("core-js/modules/es.array.from"),t("core-js/modules/es.array.map"),t("core-js/modules/es.string.iterator"),Object.defineProperty(g,"__esModule",{value:!0}),g.default=void 0,t=(t=t("../core/main"))&&t.__esModule?t:{default:t},t.default.prototype._updateGridOutput=function(i){var u,o,h,y;this.dummyDOM.querySelector("#".concat(i,"_summary"))&&(u=this._accessibleOutputs[i],h=function(m,n,s,c){return n="".concat(n," canvas, ").concat(s," by ").concat(c," pixels, contains ").concat(m[0]),n=(m[0]===1?"".concat(n," shape: "):"".concat(n," shapes: ")).concat(m[1]),n}((o=function(m,n){var s,c="",f="",p=0;for(s in n){var d,l=0;for(d in n[s]){var b='
      • ').concat(n[s][d].color," ").concat(s,",");s==="line"?b+=" location = ".concat(n[s][d].pos,", length = ").concat(n[s][d].length," pixels"):(b+=" location = ".concat(n[s][d].pos),s!=="point"&&(b+=", area = ".concat(n[s][d].area," %")),b+="
      • "),c+=b,l++,p++}f=1').concat(n[s][l].color," ").concat(s,""):'').concat(n[s][l].color," ").concat(s," midpoint"),n[s][l].loc.locY";p=p+j+""}return p}(i,this.ingredients.shapes),h!==u.summary.innerHTML&&(u.summary.innerHTML=h),y!==u.map.innerHTML&&(u.map.innerHTML=y),o.details!==u.shapeDetails.innerHTML&&(u.shapeDetails.innerHTML=o.details),this._accessibleOutputs[i]=u)},t=t.default,g.default=t},{"../core/main":283,"core-js/modules/es.array.concat":153,"core-js/modules/es.array.from":162,"core-js/modules/es.array.map":168,"core-js/modules/es.string.iterator":200}],265:[function(t,w,g){t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.concat"),t("core-js/modules/es.array.fill"),t("core-js/modules/es.array.from"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.array.map"),t("core-js/modules/es.number.to-fixed"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.regexp.to-string"),t("core-js/modules/es.string.iterator"),t("core-js/modules/web.dom-collections.iterator"),t("core-js/modules/es.array.concat"),t("core-js/modules/es.array.fill"),t("core-js/modules/es.array.map"),t("core-js/modules/es.number.to-fixed"),Object.defineProperty(g,"__esModule",{value:!0}),g.default=void 0;var i=(t=t("../core/main"))&&t.__esModule?t:{default:t};function u(h){return function(y){if(Array.isArray(y)){for(var m=0,n=new Array(y.length);m')):this.dummyDOM.querySelector("#".concat(c)).innerHTML='
        '))):y==="Label"&&(m=c+h+(f=y),this.dummyDOM.querySelector("#".concat(n=c+"accessibleOutput"+y))||(this.dummyDOM.querySelector("#".concat(c,"_Label"))?this.dummyDOM.querySelector("#".concat(c,"_Label")):this.dummyDOM.querySelector("#".concat(c))).insertAdjacentHTML("afterend",'
        '))),this._accessibleOutputs[m]={},h==="textOutput"?(f="#".concat(c,"gridOutput").concat(f),s='
        Text Output

          '),this.dummyDOM.querySelector(f)?this.dummyDOM.querySelector(f).insertAdjacentHTML("beforebegin",s):this.dummyDOM.querySelector("#".concat(n)).innerHTML=s,this._accessibleOutputs[m].list=this.dummyDOM.querySelector("#".concat(m,"_list"))):h==="gridOutput"&&(f="#".concat(c,"textOutput").concat(f),s='
          Grid Output

            '),this.dummyDOM.querySelector(f)?this.dummyDOM.querySelector(f).insertAdjacentHTML("afterend",s):this.dummyDOM.querySelector("#".concat(n)).innerHTML=s,this._accessibleOutputs[m].map=this.dummyDOM.querySelector("#".concat(m,"_map"))),this._accessibleOutputs[m].shapeDetails=this.dummyDOM.querySelector("#".concat(m,"_shapeDetails")),this._accessibleOutputs[m].summary=this.dummyDOM.querySelector("#".concat(m,"_summary"))},i.default.prototype._updateAccsOutput=function(){var h=this.canvas.id;JSON.stringify(this.ingredients.shapes)===this.ingredients.pShapes&&this.ingredients.colors.background===this.ingredients.pBackground||(this.ingredients.pShapes=JSON.stringify(this.ingredients.shapes),this._accessibleOutputs.text&&this._updateTextOutput(h+"textOutput"),this._accessibleOutputs.grid&&this._updateGridOutput(h+"gridOutput"),this._accessibleOutputs.textLabel&&this._updateTextOutput(h+"textOutputLabel"),this._accessibleOutputs.gridLabel&&this._updateGridOutput(h+"gridOutputLabel"))},i.default.prototype._accsBackground=function(h){this.ingredients.pShapes=JSON.stringify(this.ingredients.shapes),this.ingredients.pBackground=this.ingredients.colors.background,this.ingredients.shapes={},this.ingredients.colors.backgroundRGBA!==h&&(this.ingredients.colors.backgroundRGBA=h,this.ingredients.colors.background=this._rgbColorName(h))},i.default.prototype._accsCanvasColors=function(h,y){h==="fill"?this.ingredients.colors.fillRGBA!==y&&(this.ingredients.colors.fillRGBA=y,this.ingredients.colors.fill=this._rgbColorName(y)):h==="stroke"&&this.ingredients.colors.strokeRGBA!==y&&(this.ingredients.colors.strokeRGBA=y,this.ingredients.colors.stroke=this._rgbColorName(y))},i.default.prototype._accsOutput=function(h,y){h==="ellipse"&&y[2]===y[3]?h="circle":h==="rectangle"&&y[2]===y[3]&&(h="square");var m,n,s={},c=!0,f=function(d,l){var b;return d=d==="rectangle"||d==="ellipse"||d==="arc"||d==="circle"||d==="square"?(b=Math.round(l[0]+l[2]/2),Math.round(l[1]+l[3]/2)):d==="triangle"?(b=(l[0]+l[2]+l[4])/3,(l[1]+l[3]+l[5])/3):d==="quadrilateral"?(b=(l[0]+l[2]+l[4]+l[6])/4,(l[1]+l[3]+l[5]+l[7])/4):d==="line"?(b=(l[0]+l[2])/2,(l[1]+l[3])/2):(b=l[0],l[1]),[b,d]}(h,y);if(h==="line"?(s.color=this.ingredients.colors.stroke,s.length=Math.round(this.dist(y[0],y[1],y[2],y[3])),m=this._getPos(y[0],[1]),n=this._getPos(y[2],[3]),s.loc=o(f,this.width,this.height),s.pos=m===n?"at ".concat(m):"from ".concat(m," to ").concat(n)):(h==="point"?s.color=this.ingredients.colors.stroke:(s.color=this.ingredients.colors.fill,s.area=this._getArea(h,y)),s.pos=this._getPos.apply(this,u(f)),s.loc=o(f,this.width,this.height)),this.ingredients.shapes[h]){if(this.ingredients.shapes[h]!==[s]){for(var p in this.ingredients.shapes[h])JSON.stringify(this.ingredients.shapes[h][p])===JSON.stringify(s)&&(c=!1);c===!0&&this.ingredients.shapes[h].push(s)}}else this.ingredients.shapes[h]=[s]},i.default.prototype._getPos=function(n,m){var n=new DOMPointReadOnly(n,m),m=this._renderer.isP3D?new DOMMatrix(this._renderer.uMVMatrix.mat4):this.drawingContext.getTransform(),n=n.matrixTransform(m),m=n.x,n=n.y,s=this.width*this._pixelDensity,c=this.height*this._pixelDensity;return m<.4*s?n<.4*c?"top left":.6*cMath.PI?s+=n:s-=n)):h==="ellipse"||h==="circle"?s=3.14*y[2]/2*y[3]/2:h==="line"||h==="point"?s=0:h==="quadrilateral"?s=Math.abs((y[6]+y[0])*(y[7]-y[1])+(y[0]+y[2])*(y[1]-y[3])+(y[2]+y[4])*(y[3]-y[5])+(y[4]+y[6])*(y[5]-y[7]))/2:h==="rectangle"||h==="square"?s=y[2]*y[3]:h==="triangle"&&(s=Math.abs(y[0]*(y[3]-y[5])+y[2]*(y[5]-y[1])+y[4]*(y[1]-y[3]))/2),this.width*this._pixelDensity),f=this.height*this._pixelDensity,p=[new DOMPoint(0,0),new DOMPoint(c,0),new DOMPoint(c,f),new DOMPoint(0,f)],d=(this._renderer.isP3D?new DOMMatrix(this._renderer.uMVMatrix.mat4):this.drawingContext.getTransform()).inverse(),l=p.map(function(v){return v.matrixTransform(d)}),b=Math.abs((l[3].x+l[0].x)*(l[3].y-l[0].y)+(l[0].x+l[1].x)*(l[0].y-l[1].y)+(l[1].x+l[2].x)*(l[1].y-l[2].y)+(l[2].x+l[3].x)*(l[2].y-l[3].y))/2;return Math.round(100*s/b)},t=i.default,g.default=t},{"../core/main":283,"core-js/modules/es.array.concat":153,"core-js/modules/es.array.fill":156,"core-js/modules/es.array.from":162,"core-js/modules/es.array.iterator":165,"core-js/modules/es.array.map":168,"core-js/modules/es.number.to-fixed":182,"core-js/modules/es.object.to-string":190,"core-js/modules/es.regexp.to-string":196,"core-js/modules/es.string.iterator":200,"core-js/modules/es.symbol":212,"core-js/modules/es.symbol.description":210,"core-js/modules/es.symbol.iterator":211,"core-js/modules/web.dom-collections.iterator":246}],266:[function(t,w,g){t("core-js/modules/es.array.concat"),t("core-js/modules/es.array.concat"),Object.defineProperty(g,"__esModule",{value:!0}),g.default=void 0,t=(t=t("../core/main"))&&t.__esModule?t:{default:t},t.default.prototype._updateTextOutput=function(i){var u,o,h,y;this.dummyDOM.querySelector("#".concat(i,"_summary"))&&(u=this._accessibleOutputs[i],h=function(m,n,s,c){return s="Your output is a, ".concat(s," by ").concat(c," pixels, ").concat(n," canvas containing the following"),s=m===1?"".concat(s," shape:"):"".concat(s," ").concat(m," shapes:"),s}((o=function(m,n){var s,c="",f=0;for(s in n)for(var p in n[s]){var d='
          • ').concat(n[s][p].color," ").concat(s,"");s==="line"?d+=", ".concat(n[s][p].pos,", ").concat(n[s][p].length," pixels long.
          • "):(d+=", at ".concat(n[s][p].pos),s!=="point"&&(d+=", covering ".concat(n[s][p].area,"% of the canvas")),d+="."),c+=d,f++}return{numShapes:f,listShapes:c}}(i,this.ingredients.shapes)).numShapes,this.ingredients.colors.background,this.width,this.height),y=function(m,n){var s,c="",f=0;for(s in n)for(var p in n[s]){var d='').concat(n[s][p].color," ").concat(s,"");s==="line"?d+="location = ".concat(n[s][p].pos,"length = ").concat(n[s][p].length," pixels"):(d+="location = ".concat(n[s][p].pos,""),s!=="point"&&(d+=" area = ".concat(n[s][p].area,"%")),d+=""),c+=d,f++}return c}(i,this.ingredients.shapes),h!==u.summary.innerHTML&&(u.summary.innerHTML=h),o.listShapes!==u.list.innerHTML&&(u.list.innerHTML=o.listShapes),y!==u.shapeDetails.innerHTML&&(u.shapeDetails.innerHTML=y),this._accessibleOutputs[i]=u)},t=t.default,g.default=t},{"../core/main":283,"core-js/modules/es.array.concat":153}],267:[function(t,w,g){var i=(i=t("./core/main"))&&i.__esModule?i:{default:i};t("./core/constants"),t("./core/environment"),t("./core/friendly_errors/stacktrace"),t("./core/friendly_errors/validate_params"),t("./core/friendly_errors/file_errors"),t("./core/friendly_errors/fes_core"),t("./core/friendly_errors/sketch_reader"),t("./core/helpers"),t("./core/legacy"),t("./core/preload"),t("./core/p5.Element"),t("./core/p5.Graphics"),t("./core/p5.Renderer"),t("./core/p5.Renderer2D"),t("./core/rendering"),t("./core/shim"),t("./core/structure"),t("./core/transform"),t("./core/shape/2d_primitives"),t("./core/shape/attributes"),t("./core/shape/curves"),t("./core/shape/vertex"),t("./accessibility/outputs"),t("./accessibility/textOutput"),t("./accessibility/gridOutput"),t("./accessibility/color_namer"),t("./color/color_conversion"),t("./color/creating_reading"),t("./color/p5.Color"),t("./color/setting"),t("./data/p5.TypedDict"),t("./data/local_storage.js"),t("./dom/dom"),t("./accessibility/describe"),t("./events/acceleration"),t("./events/keyboard"),t("./events/mouse"),t("./events/touch"),t("./image/filters"),t("./image/image"),t("./image/loading_displaying"),t("./image/p5.Image"),t("./image/pixels"),t("./io/files"),t("./io/p5.Table"),t("./io/p5.TableRow"),t("./io/p5.XML"),t("./math/calculation"),t("./math/math"),t("./math/noise"),t("./math/p5.Vector"),t("./math/random"),t("./math/trigonometry"),t("./typography/attributes"),t("./typography/loading_displaying"),t("./typography/p5.Font"),t("./utilities/array_functions"),t("./utilities/conversion"),t("./utilities/string_functions"),t("./utilities/time_date"),t("./webgl/3d_primitives"),t("./webgl/interaction"),t("./webgl/light"),t("./webgl/loading"),t("./webgl/material"),t("./webgl/p5.Camera"),t("./webgl/p5.DataArray"),t("./webgl/p5.Geometry"),t("./webgl/p5.Matrix"),t("./webgl/p5.Quat"),t("./webgl/p5.RendererGL.Immediate"),t("./webgl/p5.RendererGL"),t("./webgl/p5.RendererGL.Retained"),t("./webgl/p5.Framebuffer"),t("./webgl/p5.Shader"),t("./webgl/p5.RenderBuffer"),t("./webgl/p5.Texture"),t("./webgl/text"),t("./core/init"),w.exports=i.default},{"./accessibility/color_namer":262,"./accessibility/describe":263,"./accessibility/gridOutput":264,"./accessibility/outputs":265,"./accessibility/textOutput":266,"./color/color_conversion":268,"./color/creating_reading":269,"./color/p5.Color":270,"./color/setting":271,"./core/constants":272,"./core/environment":273,"./core/friendly_errors/fes_core":274,"./core/friendly_errors/file_errors":275,"./core/friendly_errors/sketch_reader":276,"./core/friendly_errors/stacktrace":277,"./core/friendly_errors/validate_params":278,"./core/helpers":279,"./core/init":280,"./core/legacy":282,"./core/main":283,"./core/p5.Element":284,"./core/p5.Graphics":285,"./core/p5.Renderer":286,"./core/p5.Renderer2D":287,"./core/preload":288,"./core/rendering":289,"./core/shape/2d_primitives":290,"./core/shape/attributes":291,"./core/shape/curves":292,"./core/shape/vertex":293,"./core/shim":294,"./core/structure":295,"./core/transform":296,"./data/local_storage.js":297,"./data/p5.TypedDict":298,"./dom/dom":299,"./events/acceleration":300,"./events/keyboard":301,"./events/mouse":302,"./events/touch":303,"./image/filters":304,"./image/image":305,"./image/loading_displaying":306,"./image/p5.Image":307,"./image/pixels":308,"./io/files":309,"./io/p5.Table":310,"./io/p5.TableRow":311,"./io/p5.XML":312,"./math/calculation":313,"./math/math":314,"./math/noise":315,"./math/p5.Vector":316,"./math/random":317,"./math/trigonometry":318,"./typography/attributes":319,"./typography/loading_displaying":320,"./typography/p5.Font":321,"./utilities/array_functions":322,"./utilities/conversion":323,"./utilities/string_functions":324,"./utilities/time_date":325,"./webgl/3d_primitives":326,"./webgl/interaction":328,"./webgl/light":329,"./webgl/loading":330,"./webgl/material":331,"./webgl/p5.Camera":332,"./webgl/p5.DataArray":333,"./webgl/p5.Framebuffer":334,"./webgl/p5.Geometry":335,"./webgl/p5.Matrix":336,"./webgl/p5.Quat":337,"./webgl/p5.RenderBuffer":338,"./webgl/p5.RendererGL":341,"./webgl/p5.RendererGL.Immediate":339,"./webgl/p5.RendererGL.Retained":340,"./webgl/p5.Shader":342,"./webgl/p5.Texture":343,"./webgl/text":344}],268:[function(t,w,g){Object.defineProperty(g,"__esModule",{value:!0}),g.default=void 0,t=(t=t("../core/main"))&&t.__esModule?t:{default:t},t.default.ColorConversion={_hsbaToHSLA:function(i){var u=i[0],o=i[1],h=i[2],y=(2-o)*h/2;return y!=0&&(y==1?o=0:y<.5?o/=2-o:o=o*h/(2-2*y)),[u,o,y,i[3]]},_hsbaToRGBA:function(i){var u,o,h,y,m,n=6*i[0],s=i[1],c=i[2];return s===0?[c,c,c,i[3]]:(o=c*(1-s),h=c*(1-s*(n-(u=Math.floor(n)))),s=c*(1-s*(1+u-n)),n=u===1?(y=h,m=c,o):u===2?(y=o,m=c,s):u===3?(y=o,m=h,c):u===4?(y=s,m=o,c):u===5?(y=c,m=o,h):(y=c,m=s,o),[y,m,n,i[3]])},_hslaToHSBA:function(i){var u=i[0],o=i[1],h=i[2],y=h<.5?(1+o)*h:h+o-h*o;return[u,o=2*(y-h)/y,y,i[3]]},_hslaToRGBA:function(i){var u,o=6*i[0],h=i[1],y=i[2];return h===0?[y,y,y,i[3]]:[(u=function(m,n,s){return m<0?m+=6:6<=m&&(m-=6),m<1?n+(s-n)*m:m<3?s:m<4?n+(s-n)*(4-m):n})(2+o,h=2*y-(y=y<.5?(1+h)*y:y+h-y*h),y),u(o,h,y),u(o-2,h,y),i[3]]},_rgbaToHSBA:function(i){var u,o,h=i[0],y=i[1],m=i[2],n=Math.max(h,y,m),s=n-Math.min(h,y,m);return s==0?o=u=0:(o=s/n,h===n?u=(y-m)/s:y===n?u=2+(m-h)/s:m===n&&(u=4+(h-y)/s),u<0?u+=6:6<=u&&(u-=6)),[u/6,o,n,i[3]]},_rgbaToHSLA:function(i){var u,o,h=i[0],y=i[1],m=i[2],n=Math.max(h,y,m),c=Math.min(h,y,m),s=n+c,c=n-c;return c==0?o=u=0:(o=s<1?c/s:c/(2-s),h===n?u=(y-m)/c:y===n?u=2+(m-h)/c:m===n&&(u=4+(h-y)/c),u<0?u+=6:6<=u&&(u-=6)),[u/6,o,s/2,i[3]]}},t=t.default.ColorConversion,g.default=t},{"../core/main":283}],269:[function(t,w,g){function i(n){return(i=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(s){return typeof s}:function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s})(n)}function u(n){return(u=typeof Symbol=="function"&&i(Symbol.iterator)==="symbol"?function(s){return i(s)}:function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":i(s)})(n)}t("core-js/modules/es.symbol"),t("core-js/modules/es.symbol.description"),t("core-js/modules/es.symbol.iterator"),t("core-js/modules/es.array.iterator"),t("core-js/modules/es.array.map"),t("core-js/modules/es.object.get-own-property-descriptor"),t("core-js/modules/es.object.to-string"),t("core-js/modules/es.string.iterator"),t("core-js/modules/es.weak-map"),t("core-js/modules/web.dom-collections.iterator"),t("core-js/modules/es.array.map"),Object.defineProperty(g,"__esModule",{value:!0}),g.default=void 0;var o=(m=t("../core/main"))&&m.__esModule?m:{default:m},h=function(n){if(n&&n.__esModule)return n;if(n===null||u(n)!=="object"&&typeof n!="function")return{default:n};var s=y();if(s&&s.has(n))return s.get(n);var c,f={},p=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(c in n){var d;Object.prototype.hasOwnProperty.call(n,c)&&((d=p?Object.getOwnPropertyDescriptor(n,c):null)&&(d.get||d.set)?Object.defineProperty(f,c,d):f[c]=n[c])}return f.default=n,s&&s.set(n,f),f}(t("../core/constants"));function y(){var n;return typeof WeakMap!="function"?null:(n=new WeakMap,y=function(){return n},n)}t("./p5.Color"),t("../core/friendly_errors/validate_params"),t("../core/friendly_errors/file_errors"),t("../core/friendly_errors/fes_core"),o.default.prototype.alpha=function(n){return o.default._validateParameters("alpha",arguments),this.color(n)._getAlpha()},o.default.prototype.blue=function(n){return o.default._validateParameters("blue",arguments),this.color(n)._getBlue()},o.default.prototype.brightness=function(n){return o.default._validateParameters("brightness",arguments),this.color(n)._getBrightness()},o.default.prototype.color=function(){for(var n,s=arguments.length,c=new Array(s),f=0;fd[0]?d[0]+=1:p[0]+=1),1<=(f=this.lerp(p[0],d[0],c))&&--f),n=this.lerp(p[1],d[1],c),s=this.lerp(p[2],d[2],c),p=this.lerp(p[3],d[3],c),f*=b[l][0],n*=b[l][1],s*=b[l][2],p*=b[l][3],this.color(f,n,s,p)},o.default.prototype.paletteLerp=function(n,s){var c=n[0];if(s"].indexOf(s[0])?void 0:s[0],lineNumber:s[1],columnNumber:s[2],source:m}},this)},parseFFOrSafari:function(y){return y.stack.split(` @@ -1795,7 +1795,7 @@ void main() { `);return b+j+"void main"+v}},{key:"version",value:function(){var n=/#version (.+)$/.exec(this.vertSrc());return n?n[1]:"100 es"}},{key:"vertSrc",value:function(){return this.shaderSrc(this._vertSrc,"vertex")}},{key:"fragSrc",value:function(){return this.shaderSrc(this._fragSrc,"fragment")}},{key:"inspectHooks",value:function(){for(var n in console.log("==== Vertex shader hooks: ===="),this.hooks.vertex)console.log((this.hooks.modified.vertex[n]?"[MODIFIED] ":"")+n+this.hooks.vertex[n]);for(var s in console.log(""),console.log("==== Fragment shader hooks: ===="),this.hooks.fragment)console.log((this.hooks.modified.fragment[s]?"[MODIFIED] ":"")+s+this.hooks.fragment[s]);for(var c in console.log(""),console.log("==== Helper functions: ===="),this.hooks.helpers)console.log(c+this.hooks.helpers[c])}},{key:"modify",value:function(n){i.default._validateParameters("p5.Shader.modify",arguments);var s,c={vertex:{},fragment:{},helpers:{}};for(s in n)s!=="declarations"&&s!=="uniforms"&&(s==="vertexDeclarations"?c.vertex.declarations=(c.vertex.declarations||"")+` `+n[s]:s==="fragmentDeclarations"?c.fragment.declarations=(c.fragment.declarations||"")+` `+n[s]:this.hooks.vertex[s]?c.vertex[s]=n[s]:this.hooks.fragment[s]?c.fragment[s]=n[s]:c.helpers[s]=n[s]);var f,p,d=Object.assign({},this.hooks.modified.vertex),l=Object.assign({},this.hooks.modified.fragment);for(f in c.vertex)f!=="declarations"&&(d[f]=!0);for(p in c.fragment)p!=="declarations"&&(l[p]=!0);return new i.default.Shader(this._renderer,this._vertSrc,this._fragSrc,{declarations:(this.hooks.declarations||"")+` -`+(n.declarations||""),uniforms:Object.assign({},this.hooks.uniforms,n.uniforms||{}),fragment:Object.assign({},this.hooks.fragment,c.fragment),vertex:Object.assign({},this.hooks.vertex,c.vertex),helpers:Object.assign({},this.hooks.helpers,c.helpers),modified:{vertex:d,fragment:l}})}},{key:"init",value:function(){if(this._glProgram===0){var n,s=this._renderer.GL;if(this._vertShader=s.createShader(s.VERTEX_SHADER),s.shaderSource(this._vertShader,this.vertSrc()),s.compileShader(this._vertShader),!s.getShaderParameter(this._vertShader,s.COMPILE_STATUS))return n=s.getShaderInfoLog(this._vertShader),console.error(n),null;if(this._fragShader=s.createShader(s.FRAGMENT_SHADER),s.shaderSource(this._fragShader,this.fragSrc()),s.compileShader(this._fragShader),!s.getShaderParameter(this._fragShader,s.COMPILE_STATUS))return n=s.getShaderInfoLog(this._fragShader),console.error(n),null;this._glProgram=s.createProgram(),s.attachShader(this._glProgram,this._vertShader),s.attachShader(this._glProgram,this._fragShader),s.linkProgram(this._glProgram),s.getProgramParameter(this._glProgram,s.LINK_STATUS)||i.default._friendlyError("Snap! Error linking shader program: ".concat(s.getProgramInfoLog(this._glProgram))),this._loadAttributes(),this._loadUniforms()}return this}},{key:"setDefaultUniforms",value:function(){for(var n in this.hooks.uniforms){var s=u(n.split(" "),2)[1],n=this.hooks.uniforms[n],c=void 0;(c=n instanceof Function?n():n)!=null&&this.setUniform(s,c)}}},{key:"copyToContext",value:function(n){var s=new i.default.Shader(n._renderer,this._vertSrc,this._fragSrc);return s.ensureCompiledOnContext(n),s}},{key:"ensureCompiledOnContext",value:function(n){if(this._glProgram!==0&&this._renderer!==n._renderer)throw new Error("The shader being run is attached to a different context. Do you need to copy it to this context first with .copyToContext()?");this._glProgram===0&&(this._renderer=n._renderer,this.init())}},{key:"_loadAttributes",value:function(){if(!this._loadedAttributes){this.attributes={};for(var n=this._renderer.GL,s=n.getProgramParameter(this._glProgram,n.ACTIVE_ATTRIBUTES),c=0;c>7,127&xe,le>>7,127&le);for(var Se=0;Se>7,127&Pe,0,0)}}return{cellImageInfo:re,dimOffset:Ie,dimImageInfo:we}}}}]),b}();h.default.RendererGL.prototype._renderText=function(b,v,j,E,T){if(this._textFont&&typeof this._textFont!="string"){if(!(T<=E)&&this._doFill){if(this._isOpenType()){b.push();var T=this._doStroke,M=this.drawMode,P=(this._doStroke=!1,this.drawMode=y.TEXTURE,this._textFont.font),R=(R=this._textFont._fontInfo)||(this._textFont._fontInfo=new l(P)),j=this._textFont._handleAlignment(this,v,j,E),E=this._textSize/P.unitsPerEm,C=(this.translate(j.x,j.y,0),this.scale(E,E,1),this.GL),j=!this._defaultFontShader,I=this._getFontShader(),A=(I.init(),I.bindShader(),j&&(I.setUniform("uGridImageSize",[64,64]),I.setUniform("uCellsImageSize",[64,64]),I.setUniform("uStrokeImageSize",[64,64]),I.setUniform("uGridSize",[9,9])),this._applyColorBlend(this.curFillColor),this.retainedMode.geometry.glyph),N=(A||((E=this._textGeom=new h.default.Geometry(1,1,function(){for(var he=0;he<=1;he++)for(var Y=0;Y<=1;Y++)this.vertices.push(new h.default.Vector(Y,he,0)),this.uvs.push(Y,he)})).computeFaces().computeNormals(),A=this.createBuffers("glyph",E)),!0),j=!1,E=void 0;try{for(var F,U=this.retainedMode.buffers.text[Symbol.iterator]();!(N=(F=U.next()).done);N=!0)F.value._prepareBuffer(A,I)}catch(he){j=!0,E=he}finally{try{N||U.return==null||U.return()}finally{if(j)throw E}}this._bindBuffer(A.indexBuffer,C.ELEMENT_ARRAY_BUFFER),I.setUniform("uMaterialColor",this.curFillColor),C.pixelStorei(C.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1);try{var W=0,V=null,H=P.stringToGlyphs(v),Q=!0,ee=!1,ae=void 0;try{for(var k,D=H[Symbol.iterator]();!(Q=(k=D.next()).done);Q=!0){var G,X,K=k.value,J=(V&&(W+=P.getKerningValue(V,K)),R.getGlyphInfo(K));J.uGlyphRect&&(G=J.rowInfo,X=J.colInfo,I.setUniform("uSamplerStrokes",J.strokeImageInfo.imageData),I.setUniform("uSamplerRowStrokes",G.cellImageInfo.imageData),I.setUniform("uSamplerRows",G.dimImageInfo.imageData),I.setUniform("uSamplerColStrokes",X.cellImageInfo.imageData),I.setUniform("uSamplerCols",X.dimImageInfo.imageData),I.setUniform("uGridOffset",J.uGridOffset),I.setUniform("uGlyphRect",J.uGlyphRect),I.setUniform("uGlyphOffset",W),I.bindTextures(),C.drawElements(C.TRIANGLES,6,this.GL.UNSIGNED_SHORT,0)),W+=K.advanceWidth,V=K}}catch(he){ee=!0,ae=he}finally{try{Q||D.return==null||D.return()}finally{if(ee)throw ae}}}finally{I.unbindShader(),this._doStroke=T,this.drawMode=M,C.pixelStorei(C.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0),b.pop()}}else console.log("WEBGL: only Opentype (.otf) and Truetype (.ttf) fonts are supported");return b}}else console.log("WEBGL: you must load and set a font before drawing text. See `loadFont` and `textFont` for more details.")}},{"../core/constants":272,"../core/main":283,"./p5.RendererGL.Retained":340,"./p5.Shader":342,"core-js/modules/es.array.iterator":165,"core-js/modules/es.object.get-own-property-descriptor":186,"core-js/modules/es.object.to-string":190,"core-js/modules/es.regexp.exec":195,"core-js/modules/es.string.iterator":200,"core-js/modules/es.string.split":206,"core-js/modules/es.string.sub":208,"core-js/modules/es.symbol":212,"core-js/modules/es.symbol.description":210,"core-js/modules/es.symbol.iterator":211,"core-js/modules/es.weak-map":244,"core-js/modules/web.dom-collections.iterator":246}]},{},[267])(267)})}(Ji)),Ji.exports}var j1=w1();const Cc=x1(j1),S1=tn(()=>({provide:{p5:Cc,p5:Cc}})),E1=[Kv,Qv,Cb,Pb,Ab,Rb,Ib,b1,_1,S1],T1=gr({props:{vnode:{type:Object,required:!0},route:{type:Object,required:!0},vnodeRef:Object,renderKey:String,trackRootNodes:Boolean},setup(r){const a=r.renderKey,x=r.route,t={};for(const w in r.route)Object.defineProperty(t,w,{get:()=>a===r.renderKey?r.route[w]:x[w],enumerable:!0});return Lr(ds,dn(t)),()=>Jt(r.vnode,{ref:r.vnodeRef})}}),k1=gr({name:"NuxtPage",inheritAttrs:!1,props:{name:{type:String},transition:{type:[Boolean,Object],default:void 0},keepalive:{type:[Boolean,Object],default:void 0},route:{type:Object},pageKey:{type:[Function,String],default:null}},setup(r,{attrs:a,slots:x,expose:t}){const w=Dt(),g=mt(),i=zt(ds,null);let u;t({pageRef:g});const o=zt(Mf,null);let h;const y=w.deferHydration();if(w.isHydrating){const m=w.hooks.hookOnce("app:error",y);jr().beforeEach(m)}return r.pageKey&&On(()=>r.pageKey,(m,n)=>{m!==n&&w.callHook("page:loading:start")}),()=>Jt(sh,{name:r.name,route:r.route,...a},{default:m=>{const n=C1(i,m.route,m.Component),s=i&&i.matched.length===m.route.matched.length;if(!m.Component){if(h&&!s)return h;y();return}if(h&&o&&!o.isCurrent(m.route))return h;if(n&&i&&(!o||o!=null&&o.isCurrent(i)))return s?h:null;const c=Fa(m,r.pageKey);!w.isHydrating&&!O1(i,m.route,m.Component)&&u===c&&w.callHook("page:loading:end"),u=c;const f=!!(r.transition??m.route.meta.pageTransition??ja),p=f&&M1([r.transition,m.route.meta.pageTransition,ja,{onAfterLeave:()=>{w.callHook("page:transition:finish",m.Component)}}].filter(Boolean)),d=r.keepalive??m.route.meta.keepalive??xg;return h=ih(al,f&&p,ib(d,Jt(sl,{suspensible:!0,onPending:()=>w.callHook("page:start",m.Component),onResolve:()=>{Pr(()=>w.callHook("page:finish",m.Component).then(()=>w.callHook("page:loading:end")).finally(y))}},{default:()=>{const l=Jt(T1,{key:c||void 0,vnode:x.default?Jt(cr,void 0,x.default(m)):m.Component,route:m.route,renderKey:c||void 0,trackRootNodes:f,vnodeRef:g});return d&&(l.type.name=m.Component.type.name||m.Component.type.__name||"RouteProvider"),l}}))).default(),h}})}});function M1(r){const a=r.map(x=>({...x,onAfterLeave:x.onAfterLeave?yl(x.onAfterLeave):void 0}));return Tf(...a)}function C1(r,a,x){if(!r)return!1;const t=a.matched.findIndex(w=>{var g;return((g=w.components)==null?void 0:g.default)===(x==null?void 0:x.type)});return!t||t===-1?!1:a.matched.slice(0,t).some((w,g)=>{var i,u,o;return((i=w.components)==null?void 0:i.default)!==((o=(u=r.matched[g])==null?void 0:u.components)==null?void 0:o.default)})||x&&Fa({route:a,Component:x})!==Fa({route:r,Component:x})}function O1(r,a,x){return r?a.matched.findIndex(w=>{var g;return((g=w.components)==null?void 0:g.default)===(x==null?void 0:x.type)})Jt(Tn[r.name],r.layoutProps,a.slots)}}),A1=gr({name:"NuxtLayout",inheritAttrs:!1,props:{name:{type:[String,Boolean,Object],default:null},fallback:{type:[String,Object],default:null}},setup(r,a){const x=Dt(),t=zt(ds),w=t===hi()?tb():t,g=vt(()=>{let o=Nt(r.name)??w.meta.layout??"default";return o&&!(o in Tn)&&r.fallback&&(o=Nt(r.fallback)),o}),i=mt();a.expose({layoutRef:i});const u=x.deferHydration();if(x.isHydrating){const o=x.hooks.hookOnce("app:error",u);jr().beforeEach(o)}return()=>{const o=g.value&&g.value in Tn,h=w.meta.layoutTransition??_g;return ih(al,o&&h,{default:()=>Jt(sl,{suspensible:!0,onResolve:()=>{Pr(u)}},{default:()=>Jt(R1,{layoutProps:rf(a.attrs,{ref:i}),key:g.value||void 0,name:g.value,shouldProvide:!r.name,hasTransition:!!h},a.slots)})}).default()}}}),R1=gr({name:"NuxtLayoutProvider",inheritAttrs:!1,props:{name:{type:[String,Boolean]},layoutProps:{type:Object},hasTransition:{type:Boolean},shouldProvide:{type:Boolean}},setup(r,a){const x=r.name;return r.shouldProvide&&Lr(Mf,{isCurrent:t=>x===(t.meta.layout??"default")}),()=>{var t,w;return!x||typeof x=="string"&&!(x in Tn)?(w=(t=a.slots).default)==null?void 0:w.call(t):Jt(P1,{key:x,layoutProps:r.layoutProps,name:x},a.slots)}}}),L1={class:"bg-background"},I1=gr({__name:"app",setup(r){return Gv({title:"Colton Padden",ogTitle:"Colton Padden",description:"This is where you can find the blog, portfolio, and experiments of Colton Padden.",ogDescription:"This is where you can find the blog, portfolio, and experiments of Colton Padden."}),(a,x)=>{const t=k1,w=A1;return wr(),jo("body",L1,[ft(w,null,{default:Sr(()=>[ft(t)]),_:1})])}}}),ah=(r,a)=>{const x=r.__vccOpts||r;for(const[t,w]of a)x[t]=w;return x},D1={},F1={class:"hover:text-orange-500",width:"366",height:"24",viewBox:"0 0 366 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function N1(r,a){return wr(),jo("svg",F1,a[0]||(a[0]=[Am('',6)]))}const U1=ah(D1,[["render",N1]]);async function lh(r,a=jr()){const{path:x,matched:t}=a.resolve(r);if(!t.length||(a._routePreloaded||(a._routePreloaded=new Set),a._routePreloaded.has(x)))return;const w=a._preloadPromises=a._preloadPromises||[];if(w.length>4)return Promise.all(w).then(()=>lh(r,a));a._routePreloaded.add(x);const g=t.map(i=>{var u;return(u=i.components)==null?void 0:u.default}).filter(i=>typeof i=="function");for(const i of g){const u=Promise.resolve(i()).catch(()=>{}).finally(()=>w.splice(w.indexOf(u)));w.push(u)}await Promise.all(w)}const B1=(...r)=>r.find(a=>a!==void 0);function G1(r){const a=r.componentName||"NuxtLink";function x(g){return typeof g=="string"&&g.startsWith("#")}function t(g,i){if(!g||r.trailingSlash!=="append"&&r.trailingSlash!=="remove")return g;if(typeof g=="string")return Oc(g,r.trailingSlash);const u="path"in g&&g.path!==void 0?g.path:i(g).path;return{...g,name:void 0,path:Oc(u,r.trailingSlash)}}function w(g){const i=jr(),u=cs(),o=vt(()=>!!g.target&&g.target!=="_self"),h=vt(()=>{const p=g.to||g.href||"";return typeof p=="string"&&mn(p,{acceptRelative:!0})}),y=pu("RouterLink"),m=y&&typeof y!="string"?y.useLink:void 0,n=vt(()=>{if(g.external)return!0;const p=g.to||g.href||"";return typeof p=="object"?!1:p===""||h.value}),s=vt(()=>{const p=g.to||g.href||"";return n.value?p:t(p,i.resolve)}),c=n.value||m==null?void 0:m({...g,to:s}),f=vt(()=>{var p;if(!s.value||h.value||x(s.value))return s.value;if(n.value){const d=typeof s.value=="object"&&"path"in s.value?Ma(s.value):s.value,l=typeof d=="object"?i.resolve(d).href:d;return t(l,i.resolve)}return typeof s.value=="object"?((p=i.resolve(s.value))==null?void 0:p.href)??null:t(fi(u.app.baseURL,s.value),i.resolve)});return{to:s,hasTarget:o,isAbsoluteUrl:h,isExternal:n,href:f,isActive:(c==null?void 0:c.isActive)??vt(()=>s.value===i.currentRoute.value.path),isExactActive:(c==null?void 0:c.isExactActive)??vt(()=>s.value===i.currentRoute.value.path),route:(c==null?void 0:c.route)??vt(()=>i.resolve(s.value)),async navigate(){await Gg(f.value,{replace:g.replace,external:n.value||o.value})}}}return gr({name:a,props:{to:{type:[String,Object],default:void 0,required:!1},href:{type:[String,Object],default:void 0,required:!1},target:{type:String,default:void 0,required:!1},rel:{type:String,default:void 0,required:!1},noRel:{type:Boolean,default:void 0,required:!1},prefetch:{type:Boolean,default:void 0,required:!1},prefetchOn:{type:[String,Object],default:void 0,required:!1},noPrefetch:{type:Boolean,default:void 0,required:!1},activeClass:{type:String,default:void 0,required:!1},exactActiveClass:{type:String,default:void 0,required:!1},prefetchedClass:{type:String,default:void 0,required:!1},replace:{type:Boolean,default:void 0,required:!1},ariaCurrentValue:{type:String,default:void 0,required:!1},external:{type:Boolean,default:void 0,required:!1},custom:{type:Boolean,default:void 0,required:!1}},useLink:w,setup(g,{slots:i}){const u=jr(),{to:o,href:h,navigate:y,isExternal:m,hasTarget:n,isAbsoluteUrl:s}=w(g),c=mt(!1),f=mt(null),p=b=>{var v;f.value=g.custom?(v=b==null?void 0:b.$el)==null?void 0:v.nextElementSibling:b==null?void 0:b.$el};function d(b){var v,j;return!c.value&&(typeof g.prefetchOn=="string"?g.prefetchOn===b:((v=g.prefetchOn)==null?void 0:v[b])??((j=r.prefetchOn)==null?void 0:j[b]))&&(g.prefetch??r.prefetch)!==!1&&g.noPrefetch!==!0&&g.target!=="_blank"&&!W1()}async function l(b=Dt()){if(c.value)return;c.value=!0;const v=typeof o.value=="string"?o.value:m.value?Ma(o.value):u.resolve(o.value).fullPath,j=m.value?new URL(v,window.location.href).href:v;await Promise.all([b.hooks.callHook("link:prefetch",j).catch(()=>{}),!m.value&&!n.value&&lh(o.value,u).catch(()=>{})])}if(d("visibility")){const b=Dt();let v,j=null;Vr(()=>{const E=H1();vi(()=>{v=Na(()=>{var T;(T=f==null?void 0:f.value)!=null&&T.tagName&&(j=E.observe(f.value,async()=>{j==null||j(),j=null,await l(b)}))})})}),ls(()=>{v&&Ob(v),j==null||j(),j=null})}return()=>{var j;if(!m.value&&!n.value&&!x(o.value)){const E={ref:p,to:o.value,activeClass:g.activeClass||r.activeClass,exactActiveClass:g.exactActiveClass||r.exactActiveClass,replace:g.replace,ariaCurrentValue:g.ariaCurrentValue,custom:g.custom};return g.custom||(d("interaction")&&(E.onPointerenter=l.bind(null,void 0),E.onFocus=l.bind(null,void 0)),c.value&&(E.class=g.prefetchedClass||r.prefetchedClass),E.rel=g.rel||void 0),Jt(pu("RouterLink"),E,i.default)}const b=g.target||null,v=B1(g.noRel?"":g.rel,r.externalRelAttribute,s.value||n.value?"noopener noreferrer":"")||null;return g.custom?i.default?i.default({href:h.value,navigate:y,prefetch:l,get route(){if(!h.value)return;const E=new URL(h.value,window.location.href);return{path:E.pathname,fullPath:E.pathname,get query(){return hf(E.search)},hash:E.hash,params:{},name:void 0,matched:[],redirectedFrom:void 0,meta:{},href:h.value}},rel:v,target:b,isExternal:m.value||n.value,isActive:!1,isExactActive:!1}):null:Jt("a",{ref:f,href:h.value||null,rel:v,target:b},(j=i.default)==null?void 0:j.call(i))}}})}const V1=G1(wg);function Oc(r,a){const x=a==="append"?$s:di;return mn(r)&&!r.startsWith("http")?r:x(r,!0)}function H1(){const r=Dt();if(r._observer)return r._observer;let a=null;const x=new Map,t=(g,i)=>(a||(a=new IntersectionObserver(u=>{for(const o of u){const h=x.get(o.target);(o.isIntersecting||o.intersectionRatio>0)&&h&&h()}})),x.set(g,i),a.observe(g),()=>{x.delete(g),a==null||a.unobserve(g),x.size===0&&(a==null||a.disconnect(),a=null)});return r._observer={observe:t}}const z1=/2g/;function W1(){const r=navigator.connection;return!!(r&&(r.saveData||z1.test(r.effectiveType)))}var Pc;let q1=Symbol("headlessui.useid"),X1=0;const bi=(Pc=Dp)!=null?Pc:function(){return zt(q1,()=>`${++X1}`)()};function Ut(r){var a;if(r==null||r.value==null)return null;let x=(a=r.value.$el)!=null?a:r.value;return x instanceof Node?x:null}function Yn(r,a,...x){if(r in a){let w=a[r];return typeof w=="function"?w(...x):w}let t=new Error(`Tried to handle "${r}" but there is no handler defined. Only defined handlers are: ${Object.keys(a).map(w=>`"${w}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,Yn),t}var $1=Object.defineProperty,Y1=(r,a,x)=>a in r?$1(r,a,{enumerable:!0,configurable:!0,writable:!0,value:x}):r[a]=x,Ac=(r,a,x)=>(Y1(r,typeof a!="symbol"?a+"":a,x),x);let K1=class{constructor(){Ac(this,"current",this.detect()),Ac(this,"currentId",0)}set(a){this.current!==a&&(this.currentId=0,this.current=a)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}},_i=new K1;function gl(r){if(_i.isServer)return null;if(r instanceof Node)return r.ownerDocument;if(r!=null&&r.hasOwnProperty("value")){let a=Ut(r);if(a)return a.ownerDocument}return document}let Ua=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(r=>`${r}:not([tabindex='-1'])`).join(",");var Ba=(r=>(r[r.First=1]="First",r[r.Previous=2]="Previous",r[r.Next=4]="Next",r[r.Last=8]="Last",r[r.WrapAround=16]="WrapAround",r[r.NoScroll=32]="NoScroll",r))(Ba||{}),Z1=(r=>(r[r.Error=0]="Error",r[r.Overflow=1]="Overflow",r[r.Success=2]="Success",r[r.Underflow=3]="Underflow",r))(Z1||{}),Q1=(r=>(r[r.Previous=-1]="Previous",r[r.Next=1]="Next",r))(Q1||{});function uh(r=document.body){return r==null?[]:Array.from(r.querySelectorAll(Ua)).sort((a,x)=>Math.sign((a.tabIndex||Number.MAX_SAFE_INTEGER)-(x.tabIndex||Number.MAX_SAFE_INTEGER)))}var vl=(r=>(r[r.Strict=0]="Strict",r[r.Loose=1]="Loose",r))(vl||{});function bl(r,a=0){var x;return r===((x=gl(r))==null?void 0:x.body)?!1:Yn(a,{0(){return r.matches(Ua)},1(){let t=r;for(;t!==null;){if(t.matches(Ua))return!0;t=t.parentElement}return!1}})}function ch(r){let a=gl(r);Pr(()=>{a&&!bl(a.activeElement,0)&&e_(r)})}var J1=(r=>(r[r.Keyboard=0]="Keyboard",r[r.Mouse=1]="Mouse",r))(J1||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",r=>{r.metaKey||r.altKey||r.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",r=>{r.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:r.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function e_(r){r==null||r.focus({preventScroll:!0})}let t_=["textarea","input"].join(",");function r_(r){var a,x;return(x=(a=r==null?void 0:r.matches)==null?void 0:a.call(r,t_))!=null?x:!1}function dh(r,a=x=>x){return r.slice().sort((x,t)=>{let w=a(x),g=a(t);if(w===null||g===null)return 0;let i=w.compareDocumentPosition(g);return i&Node.DOCUMENT_POSITION_FOLLOWING?-1:i&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function n_(r,a){return o_(uh(),a,{relativeTo:r})}function o_(r,a,{sorted:x=!0,relativeTo:t=null,skipElements:w=[]}={}){var g;let i=(g=Array.isArray(r)?r.length>0?r[0].ownerDocument:document:r==null?void 0:r.ownerDocument)!=null?g:document,u=Array.isArray(r)?x?dh(r):r:uh(r);w.length>0&&u.length>1&&(u=u.filter(c=>!w.includes(c))),t=t??i.activeElement;let o=(()=>{if(a&5)return 1;if(a&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),h=(()=>{if(a&1)return 0;if(a&2)return Math.max(0,u.indexOf(t))-1;if(a&4)return Math.max(0,u.indexOf(t))+1;if(a&8)return u.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),y=a&32?{preventScroll:!0}:{},m=0,n=u.length,s;do{if(m>=n||m+n<=0)return 0;let c=h+m;if(a&16)c=(c+n)%n;else{if(c<0)return 3;if(c>=n)return 1}s=u[c],s==null||s.focus(y),m+=o}while(s!==i.activeElement);return a&6&&r_(s)&&s.select(),2}function s_(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function i_(){return/Android/gi.test(window.navigator.userAgent)}function a_(){return s_()||i_()}function Os(r,a,x){_i.isServer||Jr(t=>{document.addEventListener(r,a,x),t(()=>document.removeEventListener(r,a,x))})}function l_(r,a,x){_i.isServer||Jr(t=>{window.addEventListener(r,a,x),t(()=>window.removeEventListener(r,a,x))})}function u_(r,a,x=vt(()=>!0)){function t(g,i){if(!x.value||g.defaultPrevented)return;let u=i(g);if(u===null||!u.getRootNode().contains(u))return;let o=function h(y){return typeof y=="function"?h(y()):Array.isArray(y)||y instanceof Set?y:[y]}(r);for(let h of o){if(h===null)continue;let y=h instanceof HTMLElement?h:Ut(h);if(y!=null&&y.contains(u)||g.composed&&g.composedPath().includes(y))return}return!bl(u,vl.Loose)&&u.tabIndex!==-1&&g.preventDefault(),a(g,u)}let w=mt(null);Os("pointerdown",g=>{var i,u;x.value&&(w.value=((u=(i=g.composedPath)==null?void 0:i.call(g))==null?void 0:u[0])||g.target)},!0),Os("mousedown",g=>{var i,u;x.value&&(w.value=((u=(i=g.composedPath)==null?void 0:i.call(g))==null?void 0:u[0])||g.target)},!0),Os("click",g=>{a_()||w.value&&(t(g,()=>w.value),w.value=null)},!0),Os("touchend",g=>t(g,()=>g.target instanceof HTMLElement?g.target:null),!0),l_("blur",g=>t(g,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function Rc(r,a){if(r)return r;let x=a??"button";if(typeof x=="string"&&x.toLowerCase()==="button")return"button"}function c_(r,a){let x=mt(Rc(r.value.type,r.value.as));return Vr(()=>{x.value=Rc(r.value.type,r.value.as)}),Jr(()=>{var t;x.value||Ut(a)&&Ut(a)instanceof HTMLButtonElement&&!((t=Ut(a))!=null&&t.hasAttribute("type"))&&(x.value="button")}),x}let Lc=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function Ic(r){var a,x;let t=(a=r.innerText)!=null?a:"",w=r.cloneNode(!0);if(!(w instanceof HTMLElement))return t;let g=!1;for(let u of w.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))u.remove(),g=!0;let i=g?(x=w.innerText)!=null?x:"":t;return Lc.test(i)&&(i=i.replace(Lc,"")),i}function d_(r){let a=r.getAttribute("aria-label");if(typeof a=="string")return a.trim();let x=r.getAttribute("aria-labelledby");if(x){let t=x.split(" ").map(w=>{let g=document.getElementById(w);if(g){let i=g.getAttribute("aria-label");return typeof i=="string"?i.trim():Ic(g).trim()}return null}).filter(Boolean);if(t.length>0)return t.join(", ")}return Ic(r).trim()}function f_(r){let a=mt(""),x=mt("");return()=>{let t=Ut(r);if(!t)return"";let w=t.innerText;if(a.value===w)return x.value;let g=d_(t).trim().toLowerCase();return a.value=w,x.value=g,g}}function Dc(r){return[r.screenX,r.screenY]}function h_(){let r=mt([-1,-1]);return{wasMoved(a){let x=Dc(a);return r.value[0]===x[0]&&r.value[1]===x[1]?!1:(r.value=x,!0)},update(a){r.value=Dc(a)}}}function p_({container:r,accept:a,walk:x,enabled:t}){Jr(()=>{let w=r.value;if(!w||t!==void 0&&!t.value)return;let g=gl(r);if(!g)return;let i=Object.assign(o=>a(o),{acceptNode:a}),u=g.createTreeWalker(w,NodeFilter.SHOW_ELEMENT,i,!1);for(;u.nextNode();)x(u.currentNode)})}let fh=Symbol("Context");var Cr=(r=>(r[r.Open=1]="Open",r[r.Closed=2]="Closed",r[r.Closing=4]="Closing",r[r.Opening=8]="Opening",r))(Cr||{});function m_(){return _l()!==null}function _l(){return zt(fh,null)}function hh(r){Lr(fh,r)}var ur=(r=>(r.Space=" ",r.Enter="Enter",r.Escape="Escape",r.Backspace="Backspace",r.Delete="Delete",r.ArrowLeft="ArrowLeft",r.ArrowUp="ArrowUp",r.ArrowRight="ArrowRight",r.ArrowDown="ArrowDown",r.Home="Home",r.End="End",r.PageUp="PageUp",r.PageDown="PageDown",r.Tab="Tab",r))(ur||{});function y_(r){throw new Error("Unexpected object: "+r)}var Or=(r=>(r[r.First=0]="First",r[r.Previous=1]="Previous",r[r.Next=2]="Next",r[r.Last=3]="Last",r[r.Specific=4]="Specific",r[r.Nothing=5]="Nothing",r))(Or||{});function g_(r,a){let x=a.resolveItems();if(x.length<=0)return null;let t=a.resolveActiveIndex(),w=t??-1;switch(r.focus){case 0:{for(let g=0;g=0;--g)if(!a.resolveDisabled(x[g],g,x))return g;return t}case 2:{for(let g=w+1;g=0;--g)if(!a.resolveDisabled(x[g],g,x))return g;return t}case 4:{for(let g=0;g(r[r.None=0]="None",r[r.RenderStrategy=1]="RenderStrategy",r[r.Static=2]="Static",r))(ti||{}),kn=(r=>(r[r.Unmount=0]="Unmount",r[r.Hidden=1]="Hidden",r))(kn||{});function So({visible:r=!0,features:a=0,ourProps:x,theirProps:t,...w}){var g;let i=mh(t,x),u=Object.assign(w,{props:i});if(r||a&2&&i.static)return ea(u);if(a&1){let o=(g=i.unmount)==null||g?0:1;return Yn(o,{0(){return null},1(){return ea({...w,props:{...i,hidden:!0,style:{display:"none"}}})}})}return ea(u)}function ea({props:r,attrs:a,slots:x,slot:t,name:w}){var g,i;let{as:u,...o}=yh(r,["unmount","static"]),h=(g=x.default)==null?void 0:g.call(x,t),y={};if(t){let m=!1,n=[];for(let[s,c]of Object.entries(t))typeof c=="boolean"&&(m=!0),c===!0&&n.push(s);m&&(y["data-headlessui-state"]=n.join(" "))}if(u==="template"){if(h=ph(h??[]),Object.keys(o).length>0||Object.keys(a).length>0){let[m,...n]=h??[];if(!v_(m)||n.length>0)throw new Error(['Passing props on "template"!',"",`The current component <${w} /> is rendering a "template".`,"However we need to passthrough the following props:",Object.keys(o).concat(Object.keys(a)).map(f=>f.trim()).filter((f,p,d)=>d.indexOf(f)===p).sort((f,p)=>f.localeCompare(p)).map(f=>` - ${f}`).join(` +`+(n.declarations||""),uniforms:Object.assign({},this.hooks.uniforms,n.uniforms||{}),fragment:Object.assign({},this.hooks.fragment,c.fragment),vertex:Object.assign({},this.hooks.vertex,c.vertex),helpers:Object.assign({},this.hooks.helpers,c.helpers),modified:{vertex:d,fragment:l}})}},{key:"init",value:function(){if(this._glProgram===0){var n,s=this._renderer.GL;if(this._vertShader=s.createShader(s.VERTEX_SHADER),s.shaderSource(this._vertShader,this.vertSrc()),s.compileShader(this._vertShader),!s.getShaderParameter(this._vertShader,s.COMPILE_STATUS))return n=s.getShaderInfoLog(this._vertShader),console.error(n),null;if(this._fragShader=s.createShader(s.FRAGMENT_SHADER),s.shaderSource(this._fragShader,this.fragSrc()),s.compileShader(this._fragShader),!s.getShaderParameter(this._fragShader,s.COMPILE_STATUS))return n=s.getShaderInfoLog(this._fragShader),console.error(n),null;this._glProgram=s.createProgram(),s.attachShader(this._glProgram,this._vertShader),s.attachShader(this._glProgram,this._fragShader),s.linkProgram(this._glProgram),s.getProgramParameter(this._glProgram,s.LINK_STATUS)||i.default._friendlyError("Snap! Error linking shader program: ".concat(s.getProgramInfoLog(this._glProgram))),this._loadAttributes(),this._loadUniforms()}return this}},{key:"setDefaultUniforms",value:function(){for(var n in this.hooks.uniforms){var s=u(n.split(" "),2)[1],n=this.hooks.uniforms[n],c=void 0;(c=n instanceof Function?n():n)!=null&&this.setUniform(s,c)}}},{key:"copyToContext",value:function(n){var s=new i.default.Shader(n._renderer,this._vertSrc,this._fragSrc);return s.ensureCompiledOnContext(n),s}},{key:"ensureCompiledOnContext",value:function(n){if(this._glProgram!==0&&this._renderer!==n._renderer)throw new Error("The shader being run is attached to a different context. Do you need to copy it to this context first with .copyToContext()?");this._glProgram===0&&(this._renderer=n._renderer,this.init())}},{key:"_loadAttributes",value:function(){if(!this._loadedAttributes){this.attributes={};for(var n=this._renderer.GL,s=n.getProgramParameter(this._glProgram,n.ACTIVE_ATTRIBUTES),c=0;c>7,127&xe,le>>7,127&le);for(var Se=0;Se>7,127&Pe,0,0)}}return{cellImageInfo:re,dimOffset:Ie,dimImageInfo:we}}}}]),b}();h.default.RendererGL.prototype._renderText=function(b,v,j,E,T){if(this._textFont&&typeof this._textFont!="string"){if(!(T<=E)&&this._doFill){if(this._isOpenType()){b.push();var T=this._doStroke,M=this.drawMode,P=(this._doStroke=!1,this.drawMode=y.TEXTURE,this._textFont.font),R=(R=this._textFont._fontInfo)||(this._textFont._fontInfo=new l(P)),j=this._textFont._handleAlignment(this,v,j,E),E=this._textSize/P.unitsPerEm,C=(this.translate(j.x,j.y,0),this.scale(E,E,1),this.GL),j=!this._defaultFontShader,I=this._getFontShader(),A=(I.init(),I.bindShader(),j&&(I.setUniform("uGridImageSize",[64,64]),I.setUniform("uCellsImageSize",[64,64]),I.setUniform("uStrokeImageSize",[64,64]),I.setUniform("uGridSize",[9,9])),this._applyColorBlend(this.curFillColor),this.retainedMode.geometry.glyph),N=(A||((E=this._textGeom=new h.default.Geometry(1,1,function(){for(var he=0;he<=1;he++)for(var Y=0;Y<=1;Y++)this.vertices.push(new h.default.Vector(Y,he,0)),this.uvs.push(Y,he)})).computeFaces().computeNormals(),A=this.createBuffers("glyph",E)),!0),j=!1,E=void 0;try{for(var F,U=this.retainedMode.buffers.text[Symbol.iterator]();!(N=(F=U.next()).done);N=!0)F.value._prepareBuffer(A,I)}catch(he){j=!0,E=he}finally{try{N||U.return==null||U.return()}finally{if(j)throw E}}this._bindBuffer(A.indexBuffer,C.ELEMENT_ARRAY_BUFFER),I.setUniform("uMaterialColor",this.curFillColor),C.pixelStorei(C.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1);try{var W=0,V=null,H=P.stringToGlyphs(v),Q=!0,ee=!1,ae=void 0;try{for(var k,D=H[Symbol.iterator]();!(Q=(k=D.next()).done);Q=!0){var G,X,K=k.value,J=(V&&(W+=P.getKerningValue(V,K)),R.getGlyphInfo(K));J.uGlyphRect&&(G=J.rowInfo,X=J.colInfo,I.setUniform("uSamplerStrokes",J.strokeImageInfo.imageData),I.setUniform("uSamplerRowStrokes",G.cellImageInfo.imageData),I.setUniform("uSamplerRows",G.dimImageInfo.imageData),I.setUniform("uSamplerColStrokes",X.cellImageInfo.imageData),I.setUniform("uSamplerCols",X.dimImageInfo.imageData),I.setUniform("uGridOffset",J.uGridOffset),I.setUniform("uGlyphRect",J.uGlyphRect),I.setUniform("uGlyphOffset",W),I.bindTextures(),C.drawElements(C.TRIANGLES,6,this.GL.UNSIGNED_SHORT,0)),W+=K.advanceWidth,V=K}}catch(he){ee=!0,ae=he}finally{try{Q||D.return==null||D.return()}finally{if(ee)throw ae}}}finally{I.unbindShader(),this._doStroke=T,this.drawMode=M,C.pixelStorei(C.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0),b.pop()}}else console.log("WEBGL: only Opentype (.otf) and Truetype (.ttf) fonts are supported");return b}}else console.log("WEBGL: you must load and set a font before drawing text. See `loadFont` and `textFont` for more details.")}},{"../core/constants":272,"../core/main":283,"./p5.RendererGL.Retained":340,"./p5.Shader":342,"core-js/modules/es.array.iterator":165,"core-js/modules/es.object.get-own-property-descriptor":186,"core-js/modules/es.object.to-string":190,"core-js/modules/es.regexp.exec":195,"core-js/modules/es.string.iterator":200,"core-js/modules/es.string.split":206,"core-js/modules/es.string.sub":208,"core-js/modules/es.symbol":212,"core-js/modules/es.symbol.description":210,"core-js/modules/es.symbol.iterator":211,"core-js/modules/es.weak-map":244,"core-js/modules/web.dom-collections.iterator":246}]},{},[267])(267)})}(Ji)),Ji.exports}var x1=_1();const Cc=b1(x1),w1=tn(()=>({provide:{p5:Cc,p5:Cc}})),j1=[$v,Kv,kb,Cb,Ob,Pb,Rb,g1,v1,w1],S1=gr({props:{vnode:{type:Object,required:!0},route:{type:Object,required:!0},vnodeRef:Object,renderKey:String,trackRootNodes:Boolean},setup(r){const a=r.renderKey,x=r.route,t={};for(const w in r.route)Object.defineProperty(t,w,{get:()=>a===r.renderKey?r.route[w]:x[w],enumerable:!0});return Lr(cs,fn(t)),()=>Jt(r.vnode,{ref:r.vnodeRef})}}),E1=gr({name:"NuxtPage",inheritAttrs:!1,props:{name:{type:String},transition:{type:[Boolean,Object],default:void 0},keepalive:{type:[Boolean,Object],default:void 0},route:{type:Object},pageKey:{type:[Function,String],default:null}},setup(r,{attrs:a,slots:x,expose:t}){const w=Dt(),g=mt(),i=zt(cs,null);let u;t({pageRef:g});const o=zt(Mf,null);let h;const y=w.deferHydration();if(w.isHydrating){const m=w.hooks.hookOnce("app:error",y);wr().beforeEach(m)}return r.pageKey&&Pn(()=>r.pageKey,(m,n)=>{m!==n&&w.callHook("page:loading:start")}),()=>Jt(sh,{name:r.name,route:r.route,...a},{default:m=>{const n=k1(i,m.route,m.Component),s=i&&i.matched.length===m.route.matched.length;if(!m.Component){if(h&&!s)return h;y();return}if(h&&o&&!o.isCurrent(m.route))return h;if(n&&i&&(!o||o!=null&&o.isCurrent(i)))return s?h:null;const c=Fa(m,r.pageKey);!w.isHydrating&&!M1(i,m.route,m.Component)&&u===c&&w.callHook("page:loading:end"),u=c;const f=!!(r.transition??m.route.meta.pageTransition??ja),p=f&&T1([r.transition,m.route.meta.pageTransition,ja,{onAfterLeave:()=>{w.callHook("page:transition:finish",m.Component)}}].filter(Boolean)),d=r.keepalive??m.route.meta.keepalive??bg;return h=ih(al,f&&p,ob(d,Jt(sl,{suspensible:!0,onPending:()=>w.callHook("page:start",m.Component),onResolve:()=>{Pr(()=>w.callHook("page:finish",m.Component).then(()=>w.callHook("page:loading:end")).finally(y))}},{default:()=>{const l=Jt(S1,{key:c||void 0,vnode:x.default?Jt(cr,void 0,x.default(m)):m.Component,route:m.route,renderKey:c||void 0,trackRootNodes:f,vnodeRef:g});return d&&(l.type.name=m.Component.type.name||m.Component.type.__name||"RouteProvider"),l}}))).default(),h}})}});function T1(r){const a=r.map(x=>({...x,onAfterLeave:x.onAfterLeave?yl(x.onAfterLeave):void 0}));return Tf(...a)}function k1(r,a,x){if(!r)return!1;const t=a.matched.findIndex(w=>{var g;return((g=w.components)==null?void 0:g.default)===(x==null?void 0:x.type)});return!t||t===-1?!1:a.matched.slice(0,t).some((w,g)=>{var i,u,o;return((i=w.components)==null?void 0:i.default)!==((o=(u=r.matched[g])==null?void 0:u.components)==null?void 0:o.default)})||x&&Fa({route:a,Component:x})!==Fa({route:r,Component:x})}function M1(r,a,x){return r?a.matched.findIndex(w=>{var g;return((g=w.components)==null?void 0:g.default)===(x==null?void 0:x.type)})Jt(kn[r.name],r.layoutProps,a.slots)}}),O1=gr({name:"NuxtLayout",inheritAttrs:!1,props:{name:{type:[String,Boolean,Object],default:null},fallback:{type:[String,Object],default:null}},setup(r,a){const x=Dt(),t=zt(cs),w=t===hi()?J0():t,g=bt(()=>{let o=Vt(r.name)??w.meta.layout??"default";return o&&!(o in kn)&&r.fallback&&(o=Vt(r.fallback)),o}),i=mt();a.expose({layoutRef:i});const u=x.deferHydration();if(x.isHydrating){const o=x.hooks.hookOnce("app:error",u);wr().beforeEach(o)}return()=>{const o=g.value&&g.value in kn,h=w.meta.layoutTransition??vg;return ih(al,o&&h,{default:()=>Jt(sl,{suspensible:!0,onResolve:()=>{Pr(u)}},{default:()=>Jt(P1,{layoutProps:rf(a.attrs,{ref:i}),key:g.value||void 0,name:g.value,shouldProvide:!r.name,hasTransition:!!h},a.slots)})}).default()}}}),P1=gr({name:"NuxtLayoutProvider",inheritAttrs:!1,props:{name:{type:[String,Boolean]},layoutProps:{type:Object},hasTransition:{type:Boolean},shouldProvide:{type:Boolean}},setup(r,a){const x=r.name;return r.shouldProvide&&Lr(Mf,{isCurrent:t=>x===(t.meta.layout??"default")}),()=>{var t,w;return!x||typeof x=="string"&&!(x in kn)?(w=(t=a.slots).default)==null?void 0:w.call(t):Jt(C1,{key:x,layoutProps:r.layoutProps,name:x},a.slots)}}}),A1={class:"bg-background"},R1=gr({__name:"app",setup(r){return Uv({title:"Colton Padden",ogTitle:"Colton Padden",description:"This is where you can find the blog, portfolio, and experiments of Colton Padden.",ogDescription:"This is where you can find the blog, portfolio, and experiments of Colton Padden."}),(a,x)=>{const t=E1,w=O1;return kr(),ui("body",A1,[ht(w,null,{default:jr(()=>[ht(t)]),_:1})])}}});async function ah(r,a=wr()){const{path:x,matched:t}=a.resolve(r);if(!t.length||(a._routePreloaded||(a._routePreloaded=new Set),a._routePreloaded.has(x)))return;const w=a._preloadPromises=a._preloadPromises||[];if(w.length>4)return Promise.all(w).then(()=>ah(r,a));a._routePreloaded.add(x);const g=t.map(i=>{var u;return(u=i.components)==null?void 0:u.default}).filter(i=>typeof i=="function");for(const i of g){const u=Promise.resolve(i()).catch(()=>{}).finally(()=>w.splice(w.indexOf(u)));w.push(u)}await Promise.all(w)}const L1=(...r)=>r.find(a=>a!==void 0);function I1(r){const a=r.componentName||"NuxtLink";function x(g){return typeof g=="string"&&g.startsWith("#")}function t(g,i){if(!g||r.trailingSlash!=="append"&&r.trailingSlash!=="remove")return g;if(typeof g=="string")return Oc(g,r.trailingSlash);const u="path"in g&&g.path!==void 0?g.path:i(g).path;return{...g,name:void 0,path:Oc(u,r.trailingSlash)}}function w(g){const i=wr(),u=us(),o=bt(()=>!!g.target&&g.target!=="_self"),h=bt(()=>{const p=g.to||g.href||"";return typeof p=="string"&&yn(p,{acceptRelative:!0})}),y=pu("RouterLink"),m=y&&typeof y!="string"?y.useLink:void 0,n=bt(()=>{if(g.external)return!0;const p=g.to||g.href||"";return typeof p=="object"?!1:p===""||h.value}),s=bt(()=>{const p=g.to||g.href||"";return n.value?p:t(p,i.resolve)}),c=n.value||m==null?void 0:m({...g,to:s}),f=bt(()=>{var p;if(!s.value||h.value||x(s.value))return s.value;if(n.value){const d=typeof s.value=="object"&&"path"in s.value?Ma(s.value):s.value,l=typeof d=="object"?i.resolve(d).href:d;return t(l,i.resolve)}return typeof s.value=="object"?((p=i.resolve(s.value))==null?void 0:p.href)??null:t(fi(u.app.baseURL,s.value),i.resolve)});return{to:s,hasTarget:o,isAbsoluteUrl:h,isExternal:n,href:f,isActive:(c==null?void 0:c.isActive)??bt(()=>s.value===i.currentRoute.value.path),isExactActive:(c==null?void 0:c.isExactActive)??bt(()=>s.value===i.currentRoute.value.path),route:(c==null?void 0:c.route)??bt(()=>i.resolve(s.value)),async navigate(){await Ug(f.value,{replace:g.replace,external:n.value||o.value})}}}return gr({name:a,props:{to:{type:[String,Object],default:void 0,required:!1},href:{type:[String,Object],default:void 0,required:!1},target:{type:String,default:void 0,required:!1},rel:{type:String,default:void 0,required:!1},noRel:{type:Boolean,default:void 0,required:!1},prefetch:{type:Boolean,default:void 0,required:!1},prefetchOn:{type:[String,Object],default:void 0,required:!1},noPrefetch:{type:Boolean,default:void 0,required:!1},activeClass:{type:String,default:void 0,required:!1},exactActiveClass:{type:String,default:void 0,required:!1},prefetchedClass:{type:String,default:void 0,required:!1},replace:{type:Boolean,default:void 0,required:!1},ariaCurrentValue:{type:String,default:void 0,required:!1},external:{type:Boolean,default:void 0,required:!1},custom:{type:Boolean,default:void 0,required:!1}},useLink:w,setup(g,{slots:i}){const u=wr(),{to:o,href:h,navigate:y,isExternal:m,hasTarget:n,isAbsoluteUrl:s}=w(g),c=mt(!1),f=mt(null),p=b=>{var v;f.value=g.custom?(v=b==null?void 0:b.$el)==null?void 0:v.nextElementSibling:b==null?void 0:b.$el};function d(b){var v,j;return!c.value&&(typeof g.prefetchOn=="string"?g.prefetchOn===b:((v=g.prefetchOn)==null?void 0:v[b])??((j=r.prefetchOn)==null?void 0:j[b]))&&(g.prefetch??r.prefetch)!==!1&&g.noPrefetch!==!0&&g.target!=="_blank"&&!U1()}async function l(b=Dt()){if(c.value)return;c.value=!0;const v=typeof o.value=="string"?o.value:m.value?Ma(o.value):u.resolve(o.value).fullPath,j=m.value?new URL(v,window.location.href).href:v;await Promise.all([b.hooks.callHook("link:prefetch",j).catch(()=>{}),!m.value&&!n.value&&ah(o.value,u).catch(()=>{})])}if(d("visibility")){const b=Dt();let v,j=null;Vr(()=>{const E=F1();vi(()=>{v=Na(()=>{var T;(T=f==null?void 0:f.value)!=null&&T.tagName&&(j=E.observe(f.value,async()=>{j==null||j(),j=null,await l(b)}))})})}),as(()=>{v&&Mb(v),j==null||j(),j=null})}return()=>{var j;if(!m.value&&!n.value&&!x(o.value)){const E={ref:p,to:o.value,activeClass:g.activeClass||r.activeClass,exactActiveClass:g.exactActiveClass||r.exactActiveClass,replace:g.replace,ariaCurrentValue:g.ariaCurrentValue,custom:g.custom};return g.custom||(d("interaction")&&(E.onPointerenter=l.bind(null,void 0),E.onFocus=l.bind(null,void 0)),c.value&&(E.class=g.prefetchedClass||r.prefetchedClass),E.rel=g.rel||void 0),Jt(pu("RouterLink"),E,i.default)}const b=g.target||null,v=L1(g.noRel?"":g.rel,r.externalRelAttribute,s.value||n.value?"noopener noreferrer":"")||null;return g.custom?i.default?i.default({href:h.value,navigate:y,prefetch:l,get route(){if(!h.value)return;const E=new URL(h.value,window.location.href);return{path:E.pathname,fullPath:E.pathname,get query(){return hf(E.search)},hash:E.hash,params:{},name:void 0,matched:[],redirectedFrom:void 0,meta:{},href:h.value}},rel:v,target:b,isExternal:m.value||n.value,isActive:!1,isExactActive:!1}):null:Jt("a",{ref:f,href:h.value||null,rel:v,target:b},(j=i.default)==null?void 0:j.call(i))}}})}const D1=I1(_g);function Oc(r,a){const x=a==="append"?Xs:di;return yn(r)&&!r.startsWith("http")?r:x(r,!0)}function F1(){const r=Dt();if(r._observer)return r._observer;let a=null;const x=new Map,t=(g,i)=>(a||(a=new IntersectionObserver(u=>{for(const o of u){const h=x.get(o.target);(o.isIntersecting||o.intersectionRatio>0)&&h&&h()}})),x.set(g,i),a.observe(g),()=>{x.delete(g),a==null||a.unobserve(g),x.size===0&&(a==null||a.disconnect(),a=null)});return r._observer={observe:t}}const N1=/2g/;function U1(){const r=navigator.connection;return!!(r&&(r.saveData||N1.test(r.effectiveType)))}var Pc;let B1=Symbol("headlessui.useid"),G1=0;const bi=(Pc=Ip)!=null?Pc:function(){return zt(B1,()=>`${++G1}`)()};function Nt(r){var a;if(r==null||r.value==null)return null;let x=(a=r.value.$el)!=null?a:r.value;return x instanceof Node?x:null}function Kn(r,a,...x){if(r in a){let w=a[r];return typeof w=="function"?w(...x):w}let t=new Error(`Tried to handle "${r}" but there is no handler defined. Only defined handlers are: ${Object.keys(a).map(w=>`"${w}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,Kn),t}var V1=Object.defineProperty,H1=(r,a,x)=>a in r?V1(r,a,{enumerable:!0,configurable:!0,writable:!0,value:x}):r[a]=x,Ac=(r,a,x)=>(H1(r,typeof a!="symbol"?a+"":a,x),x);let z1=class{constructor(){Ac(this,"current",this.detect()),Ac(this,"currentId",0)}set(a){this.current!==a&&(this.currentId=0,this.current=a)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}},_i=new z1;function gl(r){if(_i.isServer)return null;if(r instanceof Node)return r.ownerDocument;if(r!=null&&r.hasOwnProperty("value")){let a=Nt(r);if(a)return a.ownerDocument}return document}let Ua=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(r=>`${r}:not([tabindex='-1'])`).join(",");var Ba=(r=>(r[r.First=1]="First",r[r.Previous=2]="Previous",r[r.Next=4]="Next",r[r.Last=8]="Last",r[r.WrapAround=16]="WrapAround",r[r.NoScroll=32]="NoScroll",r))(Ba||{}),W1=(r=>(r[r.Error=0]="Error",r[r.Overflow=1]="Overflow",r[r.Success=2]="Success",r[r.Underflow=3]="Underflow",r))(W1||{}),q1=(r=>(r[r.Previous=-1]="Previous",r[r.Next=1]="Next",r))(q1||{});function lh(r=document.body){return r==null?[]:Array.from(r.querySelectorAll(Ua)).sort((a,x)=>Math.sign((a.tabIndex||Number.MAX_SAFE_INTEGER)-(x.tabIndex||Number.MAX_SAFE_INTEGER)))}var vl=(r=>(r[r.Strict=0]="Strict",r[r.Loose=1]="Loose",r))(vl||{});function bl(r,a=0){var x;return r===((x=gl(r))==null?void 0:x.body)?!1:Kn(a,{0(){return r.matches(Ua)},1(){let t=r;for(;t!==null;){if(t.matches(Ua))return!0;t=t.parentElement}return!1}})}function uh(r){let a=gl(r);Pr(()=>{a&&!bl(a.activeElement,0)&&$1(r)})}var X1=(r=>(r[r.Keyboard=0]="Keyboard",r[r.Mouse=1]="Mouse",r))(X1||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",r=>{r.metaKey||r.altKey||r.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",r=>{r.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:r.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function $1(r){r==null||r.focus({preventScroll:!0})}let Y1=["textarea","input"].join(",");function K1(r){var a,x;return(x=(a=r==null?void 0:r.matches)==null?void 0:a.call(r,Y1))!=null?x:!1}function ch(r,a=x=>x){return r.slice().sort((x,t)=>{let w=a(x),g=a(t);if(w===null||g===null)return 0;let i=w.compareDocumentPosition(g);return i&Node.DOCUMENT_POSITION_FOLLOWING?-1:i&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function Z1(r,a){return Q1(lh(),a,{relativeTo:r})}function Q1(r,a,{sorted:x=!0,relativeTo:t=null,skipElements:w=[]}={}){var g;let i=(g=Array.isArray(r)?r.length>0?r[0].ownerDocument:document:r==null?void 0:r.ownerDocument)!=null?g:document,u=Array.isArray(r)?x?ch(r):r:lh(r);w.length>0&&u.length>1&&(u=u.filter(c=>!w.includes(c))),t=t??i.activeElement;let o=(()=>{if(a&5)return 1;if(a&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),h=(()=>{if(a&1)return 0;if(a&2)return Math.max(0,u.indexOf(t))-1;if(a&4)return Math.max(0,u.indexOf(t))+1;if(a&8)return u.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),y=a&32?{preventScroll:!0}:{},m=0,n=u.length,s;do{if(m>=n||m+n<=0)return 0;let c=h+m;if(a&16)c=(c+n)%n;else{if(c<0)return 3;if(c>=n)return 1}s=u[c],s==null||s.focus(y),m+=o}while(s!==i.activeElement);return a&6&&K1(s)&&s.select(),2}function J1(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function e_(){return/Android/gi.test(window.navigator.userAgent)}function t_(){return J1()||e_()}function Cs(r,a,x){_i.isServer||Jr(t=>{document.addEventListener(r,a,x),t(()=>document.removeEventListener(r,a,x))})}function r_(r,a,x){_i.isServer||Jr(t=>{window.addEventListener(r,a,x),t(()=>window.removeEventListener(r,a,x))})}function n_(r,a,x=bt(()=>!0)){function t(g,i){if(!x.value||g.defaultPrevented)return;let u=i(g);if(u===null||!u.getRootNode().contains(u))return;let o=function h(y){return typeof y=="function"?h(y()):Array.isArray(y)||y instanceof Set?y:[y]}(r);for(let h of o){if(h===null)continue;let y=h instanceof HTMLElement?h:Nt(h);if(y!=null&&y.contains(u)||g.composed&&g.composedPath().includes(y))return}return!bl(u,vl.Loose)&&u.tabIndex!==-1&&g.preventDefault(),a(g,u)}let w=mt(null);Cs("pointerdown",g=>{var i,u;x.value&&(w.value=((u=(i=g.composedPath)==null?void 0:i.call(g))==null?void 0:u[0])||g.target)},!0),Cs("mousedown",g=>{var i,u;x.value&&(w.value=((u=(i=g.composedPath)==null?void 0:i.call(g))==null?void 0:u[0])||g.target)},!0),Cs("click",g=>{t_()||w.value&&(t(g,()=>w.value),w.value=null)},!0),Cs("touchend",g=>t(g,()=>g.target instanceof HTMLElement?g.target:null),!0),r_("blur",g=>t(g,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function Rc(r,a){if(r)return r;let x=a??"button";if(typeof x=="string"&&x.toLowerCase()==="button")return"button"}function o_(r,a){let x=mt(Rc(r.value.type,r.value.as));return Vr(()=>{x.value=Rc(r.value.type,r.value.as)}),Jr(()=>{var t;x.value||Nt(a)&&Nt(a)instanceof HTMLButtonElement&&!((t=Nt(a))!=null&&t.hasAttribute("type"))&&(x.value="button")}),x}let Lc=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function Ic(r){var a,x;let t=(a=r.innerText)!=null?a:"",w=r.cloneNode(!0);if(!(w instanceof HTMLElement))return t;let g=!1;for(let u of w.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))u.remove(),g=!0;let i=g?(x=w.innerText)!=null?x:"":t;return Lc.test(i)&&(i=i.replace(Lc,"")),i}function s_(r){let a=r.getAttribute("aria-label");if(typeof a=="string")return a.trim();let x=r.getAttribute("aria-labelledby");if(x){let t=x.split(" ").map(w=>{let g=document.getElementById(w);if(g){let i=g.getAttribute("aria-label");return typeof i=="string"?i.trim():Ic(g).trim()}return null}).filter(Boolean);if(t.length>0)return t.join(", ")}return Ic(r).trim()}function i_(r){let a=mt(""),x=mt("");return()=>{let t=Nt(r);if(!t)return"";let w=t.innerText;if(a.value===w)return x.value;let g=s_(t).trim().toLowerCase();return a.value=w,x.value=g,g}}function Dc(r){return[r.screenX,r.screenY]}function a_(){let r=mt([-1,-1]);return{wasMoved(a){let x=Dc(a);return r.value[0]===x[0]&&r.value[1]===x[1]?!1:(r.value=x,!0)},update(a){r.value=Dc(a)}}}function l_({container:r,accept:a,walk:x,enabled:t}){Jr(()=>{let w=r.value;if(!w||t!==void 0&&!t.value)return;let g=gl(r);if(!g)return;let i=Object.assign(o=>a(o),{acceptNode:a}),u=g.createTreeWalker(w,NodeFilter.SHOW_ELEMENT,i,!1);for(;u.nextNode();)x(u.currentNode)})}let dh=Symbol("Context");var Cr=(r=>(r[r.Open=1]="Open",r[r.Closed=2]="Closed",r[r.Closing=4]="Closing",r[r.Opening=8]="Opening",r))(Cr||{});function u_(){return _l()!==null}function _l(){return zt(dh,null)}function fh(r){Lr(dh,r)}var ur=(r=>(r.Space=" ",r.Enter="Enter",r.Escape="Escape",r.Backspace="Backspace",r.Delete="Delete",r.ArrowLeft="ArrowLeft",r.ArrowUp="ArrowUp",r.ArrowRight="ArrowRight",r.ArrowDown="ArrowDown",r.Home="Home",r.End="End",r.PageUp="PageUp",r.PageDown="PageDown",r.Tab="Tab",r))(ur||{});function c_(r){throw new Error("Unexpected object: "+r)}var Or=(r=>(r[r.First=0]="First",r[r.Previous=1]="Previous",r[r.Next=2]="Next",r[r.Last=3]="Last",r[r.Specific=4]="Specific",r[r.Nothing=5]="Nothing",r))(Or||{});function d_(r,a){let x=a.resolveItems();if(x.length<=0)return null;let t=a.resolveActiveIndex(),w=t??-1;switch(r.focus){case 0:{for(let g=0;g=0;--g)if(!a.resolveDisabled(x[g],g,x))return g;return t}case 2:{for(let g=w+1;g=0;--g)if(!a.resolveDisabled(x[g],g,x))return g;return t}case 4:{for(let g=0;g(r[r.None=0]="None",r[r.RenderStrategy=1]="RenderStrategy",r[r.Static=2]="Static",r))(ei||{}),Mn=(r=>(r[r.Unmount=0]="Unmount",r[r.Hidden=1]="Hidden",r))(Mn||{});function So({visible:r=!0,features:a=0,ourProps:x,theirProps:t,...w}){var g;let i=ph(t,x),u=Object.assign(w,{props:i});if(r||a&2&&i.static)return ea(u);if(a&1){let o=(g=i.unmount)==null||g?0:1;return Kn(o,{0(){return null},1(){return ea({...w,props:{...i,hidden:!0,style:{display:"none"}}})}})}return ea(u)}function ea({props:r,attrs:a,slots:x,slot:t,name:w}){var g,i;let{as:u,...o}=mh(r,["unmount","static"]),h=(g=x.default)==null?void 0:g.call(x,t),y={};if(t){let m=!1,n=[];for(let[s,c]of Object.entries(t))typeof c=="boolean"&&(m=!0),c===!0&&n.push(s);m&&(y["data-headlessui-state"]=n.join(" "))}if(u==="template"){if(h=hh(h??[]),Object.keys(o).length>0||Object.keys(a).length>0){let[m,...n]=h??[];if(!f_(m)||n.length>0)throw new Error(['Passing props on "template"!',"",`The current component <${w} /> is rendering a "template".`,"However we need to passthrough the following props:",Object.keys(o).concat(Object.keys(a)).map(f=>f.trim()).filter((f,p,d)=>d.indexOf(f)===p).sort((f,p)=>f.localeCompare(p)).map(f=>` - ${f}`).join(` `),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "template".',"Render a single element as the child so that we can forward the props onto that element."].map(f=>` - ${f}`).join(` `)].join(` -`));let s=mh((i=m.props)!=null?i:{},o,y),c=en(m,s,!0);for(let f in s)f.startsWith("on")&&(c.props||(c.props={}),c.props[f]=s[f]);return c}return Array.isArray(h)&&h.length===1?h[0]:h}return Jt(u,Object.assign({},o,y),{default:()=>h})}function ph(r){return r.flatMap(a=>a.type===cr?ph(a.children):[a])}function mh(...r){if(r.length===0)return{};if(r.length===1)return r[0];let a={},x={};for(let t of r)for(let w in t)w.startsWith("on")&&typeof t[w]=="function"?(x[w]!=null||(x[w]=[]),x[w].push(t[w])):a[w]=t[w];if(a.disabled||a["aria-disabled"])return Object.assign(a,Object.fromEntries(Object.keys(x).map(t=>[t,void 0])));for(let t in x)Object.assign(a,{[t](w,...g){let i=x[t];for(let u of i){if(w instanceof Event&&w.defaultPrevented)return;u(w,...g)}}});return a}function yh(r,a=[]){let x=Object.assign({},r);for(let t of a)t in x&&delete x[t];return x}function v_(r){return r==null?!1:typeof r.type=="string"||typeof r.type=="object"||typeof r.type=="function"}var b_=(r=>(r[r.Open=0]="Open",r[r.Closed=1]="Closed",r))(b_||{}),__=(r=>(r[r.Pointer=0]="Pointer",r[r.Other=1]="Other",r))(__||{});function x_(r){requestAnimationFrame(()=>requestAnimationFrame(r))}let gh=Symbol("MenuContext");function xi(r){let a=zt(gh,null);if(a===null){let x=new Error(`<${r} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(x,xi),x}return a}let w_=gr({name:"Menu",props:{as:{type:[Object,String],default:"template"}},setup(r,{slots:a,attrs:x}){let t=mt(1),w=mt(null),g=mt(null),i=mt([]),u=mt(""),o=mt(null),h=mt(1);function y(n=s=>s){let s=o.value!==null?i.value[o.value]:null,c=dh(n(i.value.slice()),p=>Ut(p.dataRef.domRef)),f=s?c.indexOf(s):null;return f===-1&&(f=null),{items:c,activeItemIndex:f}}let m={menuState:t,buttonRef:w,itemsRef:g,items:i,searchQuery:u,activeItemIndex:o,activationTrigger:h,closeMenu:()=>{t.value=1,o.value=null},openMenu:()=>t.value=0,goToItem(n,s,c){let f=y(),p=g_(n===Or.Specific?{focus:Or.Specific,id:s}:{focus:n},{resolveItems:()=>f.items,resolveActiveIndex:()=>f.activeItemIndex,resolveId:d=>d.id,resolveDisabled:d=>d.dataRef.disabled});u.value="",o.value=p,h.value=c??1,i.value=f.items},search(n){let s=u.value!==""?0:1;u.value+=n.toLowerCase();let c=(o.value!==null?i.value.slice(o.value+s).concat(i.value.slice(0,o.value+s)):i.value).find(p=>p.dataRef.textValue.startsWith(u.value)&&!p.dataRef.disabled),f=c?i.value.indexOf(c):-1;f===-1||f===o.value||(o.value=f,h.value=1)},clearSearch(){u.value=""},registerItem(n,s){let c=y(f=>[...f,{id:n,dataRef:s}]);i.value=c.items,o.value=c.activeItemIndex,h.value=1},unregisterItem(n){let s=y(c=>{let f=c.findIndex(p=>p.id===n);return f!==-1&&c.splice(f,1),c});i.value=s.items,o.value=s.activeItemIndex,h.value=1}};return u_([w,g],(n,s)=>{var c;m.closeMenu(),bl(s,vl.Loose)||(n.preventDefault(),(c=Ut(w))==null||c.focus())},vt(()=>t.value===0)),Lr(gh,m),hh(vt(()=>Yn(t.value,{0:Cr.Open,1:Cr.Closed}))),()=>{let n={open:t.value===0,close:m.closeMenu};return So({ourProps:{},theirProps:r,slot:n,slots:a,attrs:x,name:"Menu"})}}}),j_=gr({name:"MenuButton",props:{disabled:{type:Boolean,default:!1},as:{type:[Object,String],default:"button"},id:{type:String,default:null}},setup(r,{attrs:a,slots:x,expose:t}){var w;let g=(w=r.id)!=null?w:`headlessui-menu-button-${bi()}`,i=xi("MenuButton");t({el:i.buttonRef,$el:i.buttonRef});function u(m){switch(m.key){case ur.Space:case ur.Enter:case ur.ArrowDown:m.preventDefault(),m.stopPropagation(),i.openMenu(),Pr(()=>{var n;(n=Ut(i.itemsRef))==null||n.focus({preventScroll:!0}),i.goToItem(Or.First)});break;case ur.ArrowUp:m.preventDefault(),m.stopPropagation(),i.openMenu(),Pr(()=>{var n;(n=Ut(i.itemsRef))==null||n.focus({preventScroll:!0}),i.goToItem(Or.Last)});break}}function o(m){switch(m.key){case ur.Space:m.preventDefault();break}}function h(m){r.disabled||(i.menuState.value===0?(i.closeMenu(),Pr(()=>{var n;return(n=Ut(i.buttonRef))==null?void 0:n.focus({preventScroll:!0})})):(m.preventDefault(),i.openMenu(),x_(()=>{var n;return(n=Ut(i.itemsRef))==null?void 0:n.focus({preventScroll:!0})})))}let y=c_(vt(()=>({as:r.as,type:a.type})),i.buttonRef);return()=>{var m;let n={open:i.menuState.value===0},{...s}=r,c={ref:i.buttonRef,id:g,type:y.value,"aria-haspopup":"menu","aria-controls":(m=Ut(i.itemsRef))==null?void 0:m.id,"aria-expanded":i.menuState.value===0,onKeydown:u,onKeyup:o,onClick:h};return So({ourProps:c,theirProps:s,slot:n,attrs:a,slots:x,name:"MenuButton"})}}}),S_=gr({name:"MenuItems",props:{as:{type:[Object,String],default:"div"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},id:{type:String,default:null}},setup(r,{attrs:a,slots:x,expose:t}){var w;let g=(w=r.id)!=null?w:`headlessui-menu-items-${bi()}`,i=xi("MenuItems"),u=mt(null);t({el:i.itemsRef,$el:i.itemsRef}),p_({container:vt(()=>Ut(i.itemsRef)),enabled:vt(()=>i.menuState.value===0),accept(n){return n.getAttribute("role")==="menuitem"?NodeFilter.FILTER_REJECT:n.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(n){n.setAttribute("role","none")}});function o(n){var s;switch(u.value&&clearTimeout(u.value),n.key){case ur.Space:if(i.searchQuery.value!=="")return n.preventDefault(),n.stopPropagation(),i.search(n.key);case ur.Enter:if(n.preventDefault(),n.stopPropagation(),i.activeItemIndex.value!==null){let c=i.items.value[i.activeItemIndex.value];(s=Ut(c.dataRef.domRef))==null||s.click()}i.closeMenu(),ch(Ut(i.buttonRef));break;case ur.ArrowDown:return n.preventDefault(),n.stopPropagation(),i.goToItem(Or.Next);case ur.ArrowUp:return n.preventDefault(),n.stopPropagation(),i.goToItem(Or.Previous);case ur.Home:case ur.PageUp:return n.preventDefault(),n.stopPropagation(),i.goToItem(Or.First);case ur.End:case ur.PageDown:return n.preventDefault(),n.stopPropagation(),i.goToItem(Or.Last);case ur.Escape:n.preventDefault(),n.stopPropagation(),i.closeMenu(),Pr(()=>{var c;return(c=Ut(i.buttonRef))==null?void 0:c.focus({preventScroll:!0})});break;case ur.Tab:n.preventDefault(),n.stopPropagation(),i.closeMenu(),Pr(()=>n_(Ut(i.buttonRef),n.shiftKey?Ba.Previous:Ba.Next));break;default:n.key.length===1&&(i.search(n.key),u.value=setTimeout(()=>i.clearSearch(),350));break}}function h(n){switch(n.key){case ur.Space:n.preventDefault();break}}let y=_l(),m=vt(()=>y!==null?(y.value&Cr.Open)===Cr.Open:i.menuState.value===0);return()=>{var n,s;let c={open:i.menuState.value===0},{...f}=r,p={"aria-activedescendant":i.activeItemIndex.value===null||(n=i.items.value[i.activeItemIndex.value])==null?void 0:n.id,"aria-labelledby":(s=Ut(i.buttonRef))==null?void 0:s.id,id:g,onKeydown:o,onKeyup:h,role:"menu",tabIndex:0,ref:i.itemsRef};return So({ourProps:p,theirProps:f,slot:c,attrs:a,slots:x,features:ti.RenderStrategy|ti.Static,visible:m.value,name:"MenuItems"})}}}),E_=gr({name:"MenuItem",inheritAttrs:!1,props:{as:{type:[Object,String],default:"template"},disabled:{type:Boolean,default:!1},id:{type:String,default:null}},setup(r,{slots:a,attrs:x,expose:t}){var w;let g=(w=r.id)!=null?w:`headlessui-menu-item-${bi()}`,i=xi("MenuItem"),u=mt(null);t({el:u,$el:u});let o=vt(()=>i.activeItemIndex.value!==null?i.items.value[i.activeItemIndex.value].id===g:!1),h=f_(u),y=vt(()=>({disabled:r.disabled,get textValue(){return h()},domRef:u}));Vr(()=>i.registerItem(g,y)),us(()=>i.unregisterItem(g)),Jr(()=>{i.menuState.value===0&&o.value&&i.activationTrigger.value!==0&&Pr(()=>{var d,l;return(l=(d=Ut(u))==null?void 0:d.scrollIntoView)==null?void 0:l.call(d,{block:"nearest"})})});function m(d){if(r.disabled)return d.preventDefault();i.closeMenu(),ch(Ut(i.buttonRef))}function n(){if(r.disabled)return i.goToItem(Or.Nothing);i.goToItem(Or.Specific,g)}let s=h_();function c(d){s.update(d)}function f(d){s.wasMoved(d)&&(r.disabled||o.value||i.goToItem(Or.Specific,g,0))}function p(d){s.wasMoved(d)&&(r.disabled||o.value&&i.goToItem(Or.Nothing))}return()=>{let{disabled:d,...l}=r,b={active:o.value,disabled:d,close:i.closeMenu};return So({ourProps:{id:g,ref:u,role:"menuitem",tabIndex:d===!0?void 0:-1,"aria-disabled":d===!0?!0:void 0,onClick:m,onFocus:n,onPointerenter:c,onMouseenter:c,onPointermove:f,onMousemove:f,onPointerleave:p,onMouseleave:p},theirProps:{...x,...l},slot:b,attrs:x,slots:a,name:"MenuItem"})}}});function T_(r,a){return wr(),jo("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon"},[Et("path",{"fill-rule":"evenodd",d:"M2 4.75A.75.75 0 0 1 2.75 4h14.5a.75.75 0 0 1 0 1.5H2.75A.75.75 0 0 1 2 4.75ZM2 10a.75.75 0 0 1 .75-.75h14.5a.75.75 0 0 1 0 1.5H2.75A.75.75 0 0 1 2 10Zm0 5.25a.75.75 0 0 1 .75-.75h14.5a.75.75 0 0 1 0 1.5H2.75a.75.75 0 0 1-.75-.75Z","clip-rule":"evenodd"})])}const k_={class:"container mx-auto py-6"},M_={class:"flex items-center text-gray-200"},C_={class:"flex items-center"},O_={class:"px-1 py-1"},P_={href:"/articles"},A_={href:"/talks"},R_={href:"/playground"},L_={__name:"Header",setup(r){return hi(),(a,x)=>{const t=U1,w=V1,g=j_,i=E_,u=S_,o=w_;return wr(),jo("nav",k_,[Et("div",M_,[ft(w,{to:"/",class:"flex-1"},{default:Sr(()=>[ft(t,{class:"w-32 md:w-64"})]),_:1}),Et("div",C_,[ft(w,{to:"https://bsky.app/profile/colton.boo"},{default:Sr(()=>x[0]||(x[0]=[Et("svg",{class:"mr-2 inline h-6 w-6 hover:text-orange-300",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 600 530",fill:"currentColor"},[Et("path",{d:"m135.72 44.03c66.496 49.921 138.02 151.14 164.28 205.46 26.262-54.316 97.782-155.54 164.28-205.46 47.98-36.021 125.72-63.892 125.72 24.795 0 17.712-10.155 148.79-16.111 170.07-20.703 73.984-96.144 92.854-163.25 81.433 117.3 19.964 147.14 86.092 82.697 152.22-122.39 125.59-175.91-31.511-189.63-71.766-2.514-7.3797-3.6904-10.832-3.7077-7.8964-0.0174-2.9357-1.1937 0.51669-3.7077 7.8964-13.714 40.255-67.233 197.36-189.63 71.766-64.444-66.128-34.605-132.26 82.697-152.22-67.108 11.421-142.55-7.4491-163.25-81.433-5.9562-21.282-16.111-152.36-16.111-170.07 0-88.687 77.742-60.816 125.72-24.795z"})],-1)])),_:1}),ft(w,{to:"https://github.com/cmpadden"},{default:Sr(()=>x[1]||(x[1]=[Et("svg",{class:"mr-2 inline h-6 w-6 hover:text-orange-300",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},[Et("path",{d:"M12.001 2C6.47598 2 2.00098 6.475 2.00098 12C2.00098 16.425 4.86348 20.1625 8.83848 21.4875C9.33848 21.575 9.52598 21.275 9.52598 21.0125C9.52598 20.775 9.51348 19.9875 9.51348 19.15C7.00098 19.6125 6.35098 18.5375 6.15098 17.975C6.03848 17.6875 5.55098 16.8 5.12598 16.5625C4.77598 16.375 4.27598 15.9125 5.11348 15.9C5.90098 15.8875 6.46348 16.625 6.65098 16.925C7.55098 18.4375 8.98848 18.0125 9.56348 17.75C9.65098 17.1 9.91348 16.6625 10.201 16.4125C7.97598 16.1625 5.65098 15.3 5.65098 11.475C5.65098 10.3875 6.03848 9.4875 6.67598 8.7875C6.57598 8.5375 6.22598 7.5125 6.77598 6.1375C6.77598 6.1375 7.61348 5.875 9.52598 7.1625C10.326 6.9375 11.176 6.825 12.026 6.825C12.876 6.825 13.726 6.9375 14.526 7.1625C16.4385 5.8625 17.276 6.1375 17.276 6.1375C17.826 7.5125 17.476 8.5375 17.376 8.7875C18.0135 9.4875 18.401 10.375 18.401 11.475C18.401 15.3125 16.0635 16.1625 13.8385 16.4125C14.201 16.725 14.5135 17.325 14.5135 18.2625C14.5135 19.6 14.501 20.675 14.501 21.0125C14.501 21.275 14.6885 21.5875 15.1885 21.4875C19.259 20.1133 21.9999 16.2963 22.001 12C22.001 6.475 17.526 2 12.001 2Z"})],-1)])),_:1}),ft(o,{as:"div",class:"relative z-50 inline-block text-left"},{default:Sr(()=>[Et("div",null,[ft(g,{class:"inline-flex w-full justify-center rounded-md bg-black/50 p-2 text-sm font-medium text-white hover:bg-opacity-30 focus:outline-none focus-visible:ring-2 focus-visible:ring-white focus-visible:ring-opacity-75"},{default:Sr(()=>[ft(Nt(T_),{class:"h-5 w-5 text-white hover:text-orange-500","aria-hidden":"true"})]),_:1})]),ft(al,{"enter-active-class":"transition duration-100 ease-out","enter-from-class":"transform scale-95 opacity-0","enter-to-class":"transform scale-100 opacity-100","leave-active-class":"transition duration-75 ease-in","leave-from-class":"transform scale-100 opacity-100","leave-to-class":"transform scale-95 opacity-0"},{default:Sr(()=>[ft(u,{class:"absolute right-0 mt-2 w-56 origin-top-right divide-y divide-gray-100 rounded-md bg-black/80 text-white shadow-lg ring-1 ring-black ring-opacity-5 backdrop-blur-sm focus:outline-none"},{default:Sr(()=>[Et("div",O_,[ft(i,null,{default:Sr(({active:h})=>[Et("a",P_,[Et("button",{class:Vn([h?"bg-slate-700 text-white":"text-white","group flex w-full items-center rounded-md px-2 py-2 text-sm"])},x[2]||(x[2]=[Et("svg",{class:"mr-2 inline h-5 w-5",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},[Et("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M16.862 4.487l1.687-1.688a1.875 1.875 0 112.652 2.652L10.582 16.07a4.5 4.5 0 01-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 011.13-1.897l8.932-8.931zm0 0L19.5 7.125M18 14v4.75A2.25 2.25 0 0115.75 21H5.25A2.25 2.25 0 013 18.75V8.25A2.25 2.25 0 015.25 6H10"})],-1),zo(" Blog ")]),2)])]),_:1}),ft(i,null,{default:Sr(({active:h})=>[Et("a",A_,[Et("button",{class:Vn([h?"bg-slate-700":"","group flex w-full items-center rounded-md px-2 py-2 text-sm"])},x[3]||(x[3]=[Et("svg",{class:"mr-2 inline h-5 w-5",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},[Et("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M3.75 3v11.25A2.25 2.25 0 0 0 6 16.5h2.25M3.75 3h-1.5m1.5 0h16.5m0 0h1.5m-1.5 0v11.25A2.25 2.25 0 0 1 18 16.5h-2.25m-7.5 0h7.5m-7.5 0-1 3m8.5-3 1 3m0 0 .5 1.5m-.5-1.5h-9.5m0 0-.5 1.5M9 11.25v1.5M12 9v3.75m3-6v6"})],-1),zo(" Talks ")]),2)])]),_:1}),ft(i,null,{default:Sr(({active:h})=>[Et("a",R_,[Et("button",{class:Vn([h?"bg-slate-700 text-white":"text-white","group flex w-full items-center rounded-md px-2 py-2 text-sm"])},x[4]||(x[4]=[Et("svg",{class:"mr-2 inline h-5 w-5",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},[Et("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M9.75 3.104v5.714a2.25 2.25 0 01-.659 1.591L5 14.5M9.75 3.104c-.251.023-.501.05-.75.082m.75-.082a24.301 24.301 0 014.5 0m0 0v5.714c0 .597.237 1.17.659 1.591L19.8 15.3M14.25 3.104c.251.023.501.05.75.082M19.8 15.3l-1.57.393A9.065 9.065 0 0112 15a9.065 9.065 0 00-6.23-.693L5 14.5m14.8.8l1.402 1.402c1.232 1.232.65 3.318-1.067 3.611A48.309 48.309 0 0112 21c-2.773 0-5.491-.235-8.135-.687-1.718-.293-2.3-2.379-1.067-3.61L5 14.5"})],-1),zo(" Experiments ")]),2)])]),_:1})])]),_:1})]),_:1})]),_:1})])])])}}};function I_(r){typeof queueMicrotask=="function"?queueMicrotask(r):Promise.resolve().then(r).catch(a=>setTimeout(()=>{throw a}))}function xl(){let r=[],a={addEventListener(x,t,w,g){return x.addEventListener(t,w,g),a.add(()=>x.removeEventListener(t,w,g))},requestAnimationFrame(...x){let t=requestAnimationFrame(...x);a.add(()=>cancelAnimationFrame(t))},nextFrame(...x){a.requestAnimationFrame(()=>{a.requestAnimationFrame(...x)})},setTimeout(...x){let t=setTimeout(...x);a.add(()=>clearTimeout(t))},microTask(...x){let t={current:!0};return I_(()=>{t.current&&x[0]()}),a.add(()=>{t.current=!1})},style(x,t,w){let g=x.style.getPropertyValue(t);return Object.assign(x.style,{[t]:w}),this.add(()=>{Object.assign(x.style,{[t]:g})})},group(x){let t=xl();return x(t),this.add(()=>t.dispose())},add(x){return r.push(x),()=>{let t=r.indexOf(x);if(t>=0)for(let w of r.splice(t,1))w()}},dispose(){for(let x of r.splice(0))x()}};return a}function D_(r){let a={called:!1};return(...x)=>{if(!a.called)return a.called=!0,r(...x)}}function ta(r,...a){r&&a.length>0&&r.classList.add(...a)}function Ps(r,...a){r&&a.length>0&&r.classList.remove(...a)}var Ga=(r=>(r.Finished="finished",r.Cancelled="cancelled",r))(Ga||{});function F_(r,a){let x=xl();if(!r)return x.dispose;let{transitionDuration:t,transitionDelay:w}=getComputedStyle(r),[g,i]=[t,w].map(u=>{let[o=0]=u.split(",").filter(Boolean).map(h=>h.includes("ms")?parseFloat(h):parseFloat(h)*1e3).sort((h,y)=>y-h);return o});return g!==0?x.setTimeout(()=>a("finished"),g+i):a("finished"),x.add(()=>a("cancelled")),x.dispose}function Fc(r,a,x,t,w,g){let i=xl(),u=g!==void 0?D_(g):()=>{};return Ps(r,...w),ta(r,...a,...x),i.nextFrame(()=>{Ps(r,...x),ta(r,...t),i.add(F_(r,o=>(Ps(r,...t,...a),ta(r,...w),u(o))))}),i.add(()=>Ps(r,...a,...x,...t,...w)),i.add(()=>u("cancelled")),i.dispose}function Un(r=""){return r.split(/\s+/).filter(a=>a.length>1)}let wl=Symbol("TransitionContext");var N_=(r=>(r.Visible="visible",r.Hidden="hidden",r))(N_||{});function U_(){return zt(wl,null)!==null}function B_(){let r=zt(wl,null);if(r===null)throw new Error("A is used but it is missing a parent .");return r}function G_(){let r=zt(jl,null);if(r===null)throw new Error("A is used but it is missing a parent .");return r}let jl=Symbol("NestingContext");function wi(r){return"children"in r?wi(r.children):r.value.filter(({state:a})=>a==="visible").length>0}function vh(r){let a=mt([]),x=mt(!1);Vr(()=>x.value=!0),us(()=>x.value=!1);function t(g,i=kn.Hidden){let u=a.value.findIndex(({id:o})=>o===g);u!==-1&&(Yn(i,{[kn.Unmount](){a.value.splice(u,1)},[kn.Hidden](){a.value[u].state="hidden"}}),!wi(a)&&x.value&&(r==null||r()))}function w(g){let i=a.value.find(({id:u})=>u===g);return i?i.state!=="visible"&&(i.state="visible"):a.value.push({id:g,state:"visible"}),()=>t(g,kn.Unmount)}return{children:a,register:w,unregister:t}}let bh=ti.RenderStrategy,V_=gr({props:{as:{type:[Object,String],default:"div"},show:{type:[Boolean],default:null},unmount:{type:[Boolean],default:!0},appear:{type:[Boolean],default:!1},enter:{type:[String],default:""},enterFrom:{type:[String],default:""},enterTo:{type:[String],default:""},entered:{type:[String],default:""},leave:{type:[String],default:""},leaveFrom:{type:[String],default:""},leaveTo:{type:[String],default:""}},emits:{beforeEnter:()=>!0,afterEnter:()=>!0,beforeLeave:()=>!0,afterLeave:()=>!0},setup(r,{emit:a,attrs:x,slots:t,expose:w}){let g=mt(0);function i(){g.value|=Cr.Opening,a("beforeEnter")}function u(){g.value&=~Cr.Opening,a("afterEnter")}function o(){g.value|=Cr.Closing,a("beforeLeave")}function h(){g.value&=~Cr.Closing,a("afterLeave")}if(!U_()&&m_())return()=>Jt(_h,{...r,onBeforeEnter:i,onAfterEnter:u,onBeforeLeave:o,onAfterLeave:h},t);let y=mt(null),m=vt(()=>r.unmount?kn.Unmount:kn.Hidden);w({el:y,$el:y});let{show:n,appear:s}=B_(),{register:c,unregister:f}=G_(),p=mt(n.value?"visible":"hidden"),d={value:!0},l=bi(),b={value:!1},v=vh(()=>{!b.value&&p.value!=="hidden"&&(p.value="hidden",f(l),h())});Vr(()=>{let A=c(l);us(A)}),Jr(()=>{if(m.value===kn.Hidden&&l){if(n.value&&p.value!=="visible"){p.value="visible";return}Yn(p.value,{hidden:()=>f(l),visible:()=>c(l)})}});let j=Un(r.enter),E=Un(r.enterFrom),T=Un(r.enterTo),M=Un(r.entered),P=Un(r.leave),R=Un(r.leaveFrom),C=Un(r.leaveTo);Vr(()=>{Jr(()=>{if(p.value==="visible"){let A=Ut(y);if(A instanceof Comment&&A.data==="")throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")}})});function I(A){let N=d.value&&!s.value,F=Ut(y);!F||!(F instanceof HTMLElement)||N||(b.value=!0,n.value&&i(),n.value||o(),A(n.value?Fc(F,j,E,T,M,U=>{b.value=!1,U===Ga.Finished&&u()}):Fc(F,P,R,C,M,U=>{b.value=!1,U===Ga.Finished&&(wi(v)||(p.value="hidden",f(l),h()))})))}return Vr(()=>{On([n],(A,N,F)=>{I(F),d.value=!1},{immediate:!0})}),Lr(jl,v),hh(vt(()=>Yn(p.value,{visible:Cr.Open,hidden:Cr.Closed})|g.value)),()=>{let{appear:A,show:N,enter:F,enterFrom:U,enterTo:W,entered:V,leave:H,leaveFrom:Q,leaveTo:ee,...ae}=r,k={ref:y},D={...ae,...s.value&&n.value&&_i.isServer?{class:Vn([x.class,ae.class,...j,...E])}:{}};return So({theirProps:D,ourProps:k,slot:{},slots:t,attrs:x,features:bh,visible:p.value==="visible",name:"TransitionChild"})}}}),H_=V_,_h=gr({inheritAttrs:!1,props:{as:{type:[Object,String],default:"div"},show:{type:[Boolean],default:null},unmount:{type:[Boolean],default:!0},appear:{type:[Boolean],default:!1},enter:{type:[String],default:""},enterFrom:{type:[String],default:""},enterTo:{type:[String],default:""},entered:{type:[String],default:""},leave:{type:[String],default:""},leaveFrom:{type:[String],default:""},leaveTo:{type:[String],default:""}},emits:{beforeEnter:()=>!0,afterEnter:()=>!0,beforeLeave:()=>!0,afterLeave:()=>!0},setup(r,{emit:a,attrs:x,slots:t}){let w=_l(),g=vt(()=>r.show===null&&w!==null?(w.value&Cr.Open)===Cr.Open:r.show);Jr(()=>{if(![!0,!1].includes(g.value))throw new Error('A is used but it is missing a `:show="true | false"` prop.')});let i=mt(g.value?"visible":"hidden"),u=vh(()=>{i.value="hidden"}),o=mt(!0),h={show:g,appear:vt(()=>r.appear||!o.value)};return Vr(()=>{Jr(()=>{o.value=!1,g.value?i.value="visible":wi(u)||(i.value="hidden")})}),Lr(jl,u),Lr(wl,h),()=>{let y=yh(r,["show","appear","unmount","onBeforeEnter","onBeforeLeave","onAfterEnter","onAfterLeave"]),m={unmount:r.unmount};return So({ourProps:{...m,as:"template"},theirProps:{},slot:{},slots:{...t,default:()=>[Jt(H_,{onBeforeEnter:()=>a("beforeEnter"),onAfterEnter:()=>a("afterEnter"),onBeforeLeave:()=>a("beforeLeave"),onAfterLeave:()=>a("afterLeave"),...x,...m,...y},t.default)]},attrs:{},features:bh,visible:i.value==="visible",name:"Transition"})}}});const z_={},W_={class:"flex min-h-screen flex-col bg-background font-display"},q_={class:"mt-4 flex-1"},X_={class:"flex justify-center"};function $_(r,a){const x=L_,t=_h;return wr(),jo("body",W_,[ft(x),Et("main",q_,[Et("div",X_,[ft(t,{show:"",appear:"",as:"template",enter:"transition transform duration-300 ease-out","enter-from":"translate-x-8 opacity-0","enter-to":"translate-x-0 opacity-100",leave:"transition transform duration-300 ease-in","leave-from":"opacity-100","leave-to":"-translate-x-8 opacity-0"},{default:Sr(()=>a[0]||(a[0]=[Et("div",{class:"rounded-xl bg-black/50 p-6 text-center shadow-lg"},[Et("div",{class:"text-6xl font-extrabold tracking-widest text-white"}," Yikes! "),Et("div",{class:"text-base text-gray-200"}," Either the page you're looking for doesn't exist, or something has gone terribly wrong. ")],-1)])),_:1})])])])}const Y_=ah(z_,[["render",$_]]),K_={key:0},Nc={__name:"nuxt-root",setup(r){const a=()=>null,x=Dt(),t=x.deferHydration();if(x.isHydrating){const o=x.hooks.hookOnce("app:error",t);jr().beforeEach(o)}const w=!1;Lr(ds,hi()),x.hooks.callHookWith(o=>o.map(h=>h()),"vue:setup");const g=pi(),i=!1;Md((o,h,y)=>{if(x.hooks.callHook("vue:error",o,h,y).catch(m=>console.error("[nuxt] Error in `vue:error` hook",m)),Hg(o)&&(o.fatal||o.unhandled))return x.runWithContext(()=>lo(o)),!1});const u=!1;return(o,h)=>(wr(),En(sl,{onResolve:Nt(t)},{default:Sr(()=>[Nt(i)?(wr(),jo("div",K_)):Nt(g)?(wr(),En(Nt(Y_),{key:1,error:Nt(g)},null,8,["error"])):Nt(u)?(wr(),En(Nt(a),{key:2,context:Nt(u)},null,8,["context"])):Nt(w)?(wr(),En(Kp(Nt(w)),{key:3})):(wr(),En(Nt(I1),{key:4}))]),_:1},8,["onResolve"]))}};let Uc;{let r;Uc=async function(){var i,u;if(r)return r;const t=!!(((i=window.__NUXT__)==null?void 0:i.serverRendered)??((u=document.getElementById("__NUXT_DATA__"))==null?void 0:u.dataset.ssr)==="true")?py(Nc):hy(Nc),w=kg({vueApp:t});async function g(o){await w.callHook("app:error",o),w.payload.error=w.payload.error||mi(o)}t.config.errorHandler=g,w.hook("app:suspense:resolve",()=>{t.config.errorHandler===g&&(t.config.errorHandler=void 0)});try{await Og(w,E1)}catch(o){g(o)}try{await w.hooks.callHook("app:created",t),await w.hooks.callHook("app:beforeMount",t),t.mount(Sg),await w.hooks.callHook("app:mounted",t),await Pr()}catch(o){g(o)}return t},r=Uc().catch(a=>{throw console.error("Error while mounting app:",a),a})}export{mi as $,Ln as A,ux as B,tx as C,ax as D,or as E,cr as F,Pr as G,Uv as H,cs as I,ox as J,$s as K,Jt as L,rt as M,Dt as N,Ep as O,ex as P,Gy as Q,Wu as R,_h as S,al as T,fi as U,di as V,lx as W,Zo as X,Wp as Y,Z_ as Z,V1 as _,Nt as a,Zn as a0,Yc as a1,bt as a2,pu as a3,dt as a4,qn as a5,Kt as a6,qs as a7,J_ as a8,nx as a9,Xa as aa,Kp as ab,L_ as ac,Et as b,jo as c,gr as d,En as e,Sr as f,zo as g,ix as h,ft as i,mt as j,vt as k,Vn as l,ah as m,Gg as n,wr as o,Am as p,Vr as q,rx as r,V_ as s,Qh as t,hi as u,On as v,sx as w,ls as x,us as y,Q_ as z}; +`));let s=ph((i=m.props)!=null?i:{},o,y),c=en(m,s,!0);for(let f in s)f.startsWith("on")&&(c.props||(c.props={}),c.props[f]=s[f]);return c}return Array.isArray(h)&&h.length===1?h[0]:h}return Jt(u,Object.assign({},o,y),{default:()=>h})}function hh(r){return r.flatMap(a=>a.type===cr?hh(a.children):[a])}function ph(...r){if(r.length===0)return{};if(r.length===1)return r[0];let a={},x={};for(let t of r)for(let w in t)w.startsWith("on")&&typeof t[w]=="function"?(x[w]!=null||(x[w]=[]),x[w].push(t[w])):a[w]=t[w];if(a.disabled||a["aria-disabled"])return Object.assign(a,Object.fromEntries(Object.keys(x).map(t=>[t,void 0])));for(let t in x)Object.assign(a,{[t](w,...g){let i=x[t];for(let u of i){if(w instanceof Event&&w.defaultPrevented)return;u(w,...g)}}});return a}function mh(r,a=[]){let x=Object.assign({},r);for(let t of a)t in x&&delete x[t];return x}function f_(r){return r==null?!1:typeof r.type=="string"||typeof r.type=="object"||typeof r.type=="function"}var h_=(r=>(r[r.Open=0]="Open",r[r.Closed=1]="Closed",r))(h_||{}),p_=(r=>(r[r.Pointer=0]="Pointer",r[r.Other=1]="Other",r))(p_||{});function m_(r){requestAnimationFrame(()=>requestAnimationFrame(r))}let yh=Symbol("MenuContext");function xi(r){let a=zt(yh,null);if(a===null){let x=new Error(`<${r} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(x,xi),x}return a}let y_=gr({name:"Menu",props:{as:{type:[Object,String],default:"template"}},setup(r,{slots:a,attrs:x}){let t=mt(1),w=mt(null),g=mt(null),i=mt([]),u=mt(""),o=mt(null),h=mt(1);function y(n=s=>s){let s=o.value!==null?i.value[o.value]:null,c=ch(n(i.value.slice()),p=>Nt(p.dataRef.domRef)),f=s?c.indexOf(s):null;return f===-1&&(f=null),{items:c,activeItemIndex:f}}let m={menuState:t,buttonRef:w,itemsRef:g,items:i,searchQuery:u,activeItemIndex:o,activationTrigger:h,closeMenu:()=>{t.value=1,o.value=null},openMenu:()=>t.value=0,goToItem(n,s,c){let f=y(),p=d_(n===Or.Specific?{focus:Or.Specific,id:s}:{focus:n},{resolveItems:()=>f.items,resolveActiveIndex:()=>f.activeItemIndex,resolveId:d=>d.id,resolveDisabled:d=>d.dataRef.disabled});u.value="",o.value=p,h.value=c??1,i.value=f.items},search(n){let s=u.value!==""?0:1;u.value+=n.toLowerCase();let c=(o.value!==null?i.value.slice(o.value+s).concat(i.value.slice(0,o.value+s)):i.value).find(p=>p.dataRef.textValue.startsWith(u.value)&&!p.dataRef.disabled),f=c?i.value.indexOf(c):-1;f===-1||f===o.value||(o.value=f,h.value=1)},clearSearch(){u.value=""},registerItem(n,s){let c=y(f=>[...f,{id:n,dataRef:s}]);i.value=c.items,o.value=c.activeItemIndex,h.value=1},unregisterItem(n){let s=y(c=>{let f=c.findIndex(p=>p.id===n);return f!==-1&&c.splice(f,1),c});i.value=s.items,o.value=s.activeItemIndex,h.value=1}};return n_([w,g],(n,s)=>{var c;m.closeMenu(),bl(s,vl.Loose)||(n.preventDefault(),(c=Nt(w))==null||c.focus())},bt(()=>t.value===0)),Lr(yh,m),fh(bt(()=>Kn(t.value,{0:Cr.Open,1:Cr.Closed}))),()=>{let n={open:t.value===0,close:m.closeMenu};return So({ourProps:{},theirProps:r,slot:n,slots:a,attrs:x,name:"Menu"})}}}),g_=gr({name:"MenuButton",props:{disabled:{type:Boolean,default:!1},as:{type:[Object,String],default:"button"},id:{type:String,default:null}},setup(r,{attrs:a,slots:x,expose:t}){var w;let g=(w=r.id)!=null?w:`headlessui-menu-button-${bi()}`,i=xi("MenuButton");t({el:i.buttonRef,$el:i.buttonRef});function u(m){switch(m.key){case ur.Space:case ur.Enter:case ur.ArrowDown:m.preventDefault(),m.stopPropagation(),i.openMenu(),Pr(()=>{var n;(n=Nt(i.itemsRef))==null||n.focus({preventScroll:!0}),i.goToItem(Or.First)});break;case ur.ArrowUp:m.preventDefault(),m.stopPropagation(),i.openMenu(),Pr(()=>{var n;(n=Nt(i.itemsRef))==null||n.focus({preventScroll:!0}),i.goToItem(Or.Last)});break}}function o(m){switch(m.key){case ur.Space:m.preventDefault();break}}function h(m){r.disabled||(i.menuState.value===0?(i.closeMenu(),Pr(()=>{var n;return(n=Nt(i.buttonRef))==null?void 0:n.focus({preventScroll:!0})})):(m.preventDefault(),i.openMenu(),m_(()=>{var n;return(n=Nt(i.itemsRef))==null?void 0:n.focus({preventScroll:!0})})))}let y=o_(bt(()=>({as:r.as,type:a.type})),i.buttonRef);return()=>{var m;let n={open:i.menuState.value===0},{...s}=r,c={ref:i.buttonRef,id:g,type:y.value,"aria-haspopup":"menu","aria-controls":(m=Nt(i.itemsRef))==null?void 0:m.id,"aria-expanded":i.menuState.value===0,onKeydown:u,onKeyup:o,onClick:h};return So({ourProps:c,theirProps:s,slot:n,attrs:a,slots:x,name:"MenuButton"})}}}),v_=gr({name:"MenuItems",props:{as:{type:[Object,String],default:"div"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},id:{type:String,default:null}},setup(r,{attrs:a,slots:x,expose:t}){var w;let g=(w=r.id)!=null?w:`headlessui-menu-items-${bi()}`,i=xi("MenuItems"),u=mt(null);t({el:i.itemsRef,$el:i.itemsRef}),l_({container:bt(()=>Nt(i.itemsRef)),enabled:bt(()=>i.menuState.value===0),accept(n){return n.getAttribute("role")==="menuitem"?NodeFilter.FILTER_REJECT:n.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(n){n.setAttribute("role","none")}});function o(n){var s;switch(u.value&&clearTimeout(u.value),n.key){case ur.Space:if(i.searchQuery.value!=="")return n.preventDefault(),n.stopPropagation(),i.search(n.key);case ur.Enter:if(n.preventDefault(),n.stopPropagation(),i.activeItemIndex.value!==null){let c=i.items.value[i.activeItemIndex.value];(s=Nt(c.dataRef.domRef))==null||s.click()}i.closeMenu(),uh(Nt(i.buttonRef));break;case ur.ArrowDown:return n.preventDefault(),n.stopPropagation(),i.goToItem(Or.Next);case ur.ArrowUp:return n.preventDefault(),n.stopPropagation(),i.goToItem(Or.Previous);case ur.Home:case ur.PageUp:return n.preventDefault(),n.stopPropagation(),i.goToItem(Or.First);case ur.End:case ur.PageDown:return n.preventDefault(),n.stopPropagation(),i.goToItem(Or.Last);case ur.Escape:n.preventDefault(),n.stopPropagation(),i.closeMenu(),Pr(()=>{var c;return(c=Nt(i.buttonRef))==null?void 0:c.focus({preventScroll:!0})});break;case ur.Tab:n.preventDefault(),n.stopPropagation(),i.closeMenu(),Pr(()=>Z1(Nt(i.buttonRef),n.shiftKey?Ba.Previous:Ba.Next));break;default:n.key.length===1&&(i.search(n.key),u.value=setTimeout(()=>i.clearSearch(),350));break}}function h(n){switch(n.key){case ur.Space:n.preventDefault();break}}let y=_l(),m=bt(()=>y!==null?(y.value&Cr.Open)===Cr.Open:i.menuState.value===0);return()=>{var n,s;let c={open:i.menuState.value===0},{...f}=r,p={"aria-activedescendant":i.activeItemIndex.value===null||(n=i.items.value[i.activeItemIndex.value])==null?void 0:n.id,"aria-labelledby":(s=Nt(i.buttonRef))==null?void 0:s.id,id:g,onKeydown:o,onKeyup:h,role:"menu",tabIndex:0,ref:i.itemsRef};return So({ourProps:p,theirProps:f,slot:c,attrs:a,slots:x,features:ei.RenderStrategy|ei.Static,visible:m.value,name:"MenuItems"})}}}),b_=gr({name:"MenuItem",inheritAttrs:!1,props:{as:{type:[Object,String],default:"template"},disabled:{type:Boolean,default:!1},id:{type:String,default:null}},setup(r,{slots:a,attrs:x,expose:t}){var w;let g=(w=r.id)!=null?w:`headlessui-menu-item-${bi()}`,i=xi("MenuItem"),u=mt(null);t({el:u,$el:u});let o=bt(()=>i.activeItemIndex.value!==null?i.items.value[i.activeItemIndex.value].id===g:!1),h=i_(u),y=bt(()=>({disabled:r.disabled,get textValue(){return h()},domRef:u}));Vr(()=>i.registerItem(g,y)),ls(()=>i.unregisterItem(g)),Jr(()=>{i.menuState.value===0&&o.value&&i.activationTrigger.value!==0&&Pr(()=>{var d,l;return(l=(d=Nt(u))==null?void 0:d.scrollIntoView)==null?void 0:l.call(d,{block:"nearest"})})});function m(d){if(r.disabled)return d.preventDefault();i.closeMenu(),uh(Nt(i.buttonRef))}function n(){if(r.disabled)return i.goToItem(Or.Nothing);i.goToItem(Or.Specific,g)}let s=a_();function c(d){s.update(d)}function f(d){s.wasMoved(d)&&(r.disabled||o.value||i.goToItem(Or.Specific,g,0))}function p(d){s.wasMoved(d)&&(r.disabled||o.value&&i.goToItem(Or.Nothing))}return()=>{let{disabled:d,...l}=r,b={active:o.value,disabled:d,close:i.closeMenu};return So({ourProps:{id:g,ref:u,role:"menuitem",tabIndex:d===!0?void 0:-1,"aria-disabled":d===!0?!0:void 0,onClick:m,onFocus:n,onPointerenter:c,onMouseenter:c,onPointermove:f,onMousemove:f,onPointerleave:p,onMouseleave:p},theirProps:{...x,...l},slot:b,attrs:x,slots:a,name:"MenuItem"})}}});const __={class:"container mx-auto py-6"},x_={class:"flex items-center text-gray-200"},w_={class:"flex items-center"},j_={class:"px-1 py-1"},S_={href:"https://github.com/cmpadden"},E_={href:"https://bsky.app/profile/colton.boo"},T_={href:"/articles"},k_={href:"/talks"},M_={href:"/playground"},C_={__name:"Header",setup(r){return hi(),(a,x)=>{const t=D1,w=g_,g=b_,i=v_,u=y_;return kr(),ui("nav",__,[vt("div",x_,[ht(t,{to:"/",class:"flex-1"},{default:jr(()=>x[0]||(x[0]=[vt("div",{class:"font-milk text-2xl font-extrabold text-white underline decoration-orange-500 decoration-2"}," Colton's Blog ",-1)])),_:1}),vt("div",w_,[ht(u,{as:"div",class:"relative z-50 inline-block text-left"},{default:jr(()=>[vt("div",null,[ht(w,{class:"text-white hover:text-orange-500"},{default:jr(()=>x[1]||(x[1]=[vt("div",{class:"text-2xl"},"•••",-1)])),_:1})]),ht(al,{"enter-active-class":"transition duration-100 ease-out","enter-from-class":"transform scale-95 opacity-0","enter-to-class":"transform scale-100 opacity-100","leave-active-class":"transition duration-75 ease-in","leave-from-class":"transform scale-100 opacity-100","leave-to-class":"transform scale-95 opacity-0"},{default:jr(()=>[ht(i,{class:"absolute right-0 mt-2 w-56 origin-top-right divide-y divide-gray-100 rounded-md bg-black/80 text-white shadow-lg ring-1 ring-black ring-opacity-5 backdrop-blur-sm focus:outline-none"},{default:jr(()=>[vt("div",j_,[ht(g,null,{default:jr(({active:o})=>[vt("a",S_,[vt("button",{class:un([o?"bg-orange-500/50 text-white":"text-white","group flex w-full items-center rounded-md px-2 py-2 text-sm"])},x[2]||(x[2]=[vt("svg",{class:"mr-2 inline h-5 w-5",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},[vt("path",{d:"M12.001 2C6.47598 2 2.00098 6.475 2.00098 12C2.00098 16.425 4.86348 20.1625 8.83848 21.4875C9.33848 21.575 9.52598 21.275 9.52598 21.0125C9.52598 20.775 9.51348 19.9875 9.51348 19.15C7.00098 19.6125 6.35098 18.5375 6.15098 17.975C6.03848 17.6875 5.55098 16.8 5.12598 16.5625C4.77598 16.375 4.27598 15.9125 5.11348 15.9C5.90098 15.8875 6.46348 16.625 6.65098 16.925C7.55098 18.4375 8.98848 18.0125 9.56348 17.75C9.65098 17.1 9.91348 16.6625 10.201 16.4125C7.97598 16.1625 5.65098 15.3 5.65098 11.475C5.65098 10.3875 6.03848 9.4875 6.67598 8.7875C6.57598 8.5375 6.22598 7.5125 6.77598 6.1375C6.77598 6.1375 7.61348 5.875 9.52598 7.1625C10.326 6.9375 11.176 6.825 12.026 6.825C12.876 6.825 13.726 6.9375 14.526 7.1625C16.4385 5.8625 17.276 6.1375 17.276 6.1375C17.826 7.5125 17.476 8.5375 17.376 8.7875C18.0135 9.4875 18.401 10.375 18.401 11.475C18.401 15.3125 16.0635 16.1625 13.8385 16.4125C14.201 16.725 14.5135 17.325 14.5135 18.2625C14.5135 19.6 14.501 20.675 14.501 21.0125C14.501 21.275 14.6885 21.5875 15.1885 21.4875C19.259 20.1133 21.9999 16.2963 22.001 12C22.001 6.475 17.526 2 12.001 2Z"})],-1),Hn(" GitHub ")]),2)])]),_:1}),ht(g,null,{default:jr(({active:o})=>[vt("a",E_,[vt("button",{class:un([o?"bg-orange-500/50 text-white":"text-white","group flex w-full items-center rounded-md px-2 py-2 text-sm"])},x[3]||(x[3]=[vt("svg",{class:"mr-2 inline h-5 w-5",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 600 530",fill:"currentColor"},[vt("path",{d:"m135.72 44.03c66.496 49.921 138.02 151.14 164.28 205.46 26.262-54.316 97.782-155.54 164.28-205.46 47.98-36.021 125.72-63.892 125.72 24.795 0 17.712-10.155 148.79-16.111 170.07-20.703 73.984-96.144 92.854-163.25 81.433 117.3 19.964 147.14 86.092 82.697 152.22-122.39 125.59-175.91-31.511-189.63-71.766-2.514-7.3797-3.6904-10.832-3.7077-7.8964-0.0174-2.9357-1.1937 0.51669-3.7077 7.8964-13.714 40.255-67.233 197.36-189.63 71.766-64.444-66.128-34.605-132.26 82.697-152.22-67.108 11.421-142.55-7.4491-163.25-81.433-5.9562-21.282-16.111-152.36-16.111-170.07 0-88.687 77.742-60.816 125.72-24.795z"})],-1),Hn(" Bluesky ")]),2)])]),_:1}),ht(g,null,{default:jr(({active:o})=>[vt("a",T_,[vt("button",{class:un([o?"bg-orange-500/50 text-white":"text-white","group flex w-full items-center rounded-md px-2 py-2 text-sm"])},x[4]||(x[4]=[vt("svg",{class:"mr-2 inline h-5 w-5",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},[vt("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M16.862 4.487l1.687-1.688a1.875 1.875 0 112.652 2.652L10.582 16.07a4.5 4.5 0 01-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 011.13-1.897l8.932-8.931zm0 0L19.5 7.125M18 14v4.75A2.25 2.25 0 0115.75 21H5.25A2.25 2.25 0 013 18.75V8.25A2.25 2.25 0 015.25 6H10"})],-1),Hn(" Blog ")]),2)])]),_:1}),ht(g,null,{default:jr(({active:o})=>[vt("a",k_,[vt("button",{class:un([o?"bg-orange-500/50":"","group flex w-full items-center rounded-md px-2 py-2 text-sm"])},x[5]||(x[5]=[vt("svg",{class:"mr-2 inline h-5 w-5",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},[vt("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M3.75 3v11.25A2.25 2.25 0 0 0 6 16.5h2.25M3.75 3h-1.5m1.5 0h16.5m0 0h1.5m-1.5 0v11.25A2.25 2.25 0 0 1 18 16.5h-2.25m-7.5 0h7.5m-7.5 0-1 3m8.5-3 1 3m0 0 .5 1.5m-.5-1.5h-9.5m0 0-.5 1.5M9 11.25v1.5M12 9v3.75m3-6v6"})],-1),Hn(" Talks ")]),2)])]),_:1}),ht(g,null,{default:jr(({active:o})=>[vt("a",M_,[vt("button",{class:un([o?"bg-orange-500/50 text-white":"text-white","group flex w-full items-center rounded-md px-2 py-2 text-sm"])},x[6]||(x[6]=[vt("svg",{class:"mr-2 inline h-5 w-5",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},[vt("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M9.75 3.104v5.714a2.25 2.25 0 01-.659 1.591L5 14.5M9.75 3.104c-.251.023-.501.05-.75.082m.75-.082a24.301 24.301 0 014.5 0m0 0v5.714c0 .597.237 1.17.659 1.591L19.8 15.3M14.25 3.104c.251.023.501.05.75.082M19.8 15.3l-1.57.393A9.065 9.065 0 0112 15a9.065 9.065 0 00-6.23-.693L5 14.5m14.8.8l1.402 1.402c1.232 1.232.65 3.318-1.067 3.611A48.309 48.309 0 0112 21c-2.773 0-5.491-.235-8.135-.687-1.718-.293-2.3-2.379-1.067-3.61L5 14.5"})],-1),Hn(" Experiments ")]),2)])]),_:1})])]),_:1})]),_:1})]),_:1})])])])}}};function O_(r){typeof queueMicrotask=="function"?queueMicrotask(r):Promise.resolve().then(r).catch(a=>setTimeout(()=>{throw a}))}function xl(){let r=[],a={addEventListener(x,t,w,g){return x.addEventListener(t,w,g),a.add(()=>x.removeEventListener(t,w,g))},requestAnimationFrame(...x){let t=requestAnimationFrame(...x);a.add(()=>cancelAnimationFrame(t))},nextFrame(...x){a.requestAnimationFrame(()=>{a.requestAnimationFrame(...x)})},setTimeout(...x){let t=setTimeout(...x);a.add(()=>clearTimeout(t))},microTask(...x){let t={current:!0};return O_(()=>{t.current&&x[0]()}),a.add(()=>{t.current=!1})},style(x,t,w){let g=x.style.getPropertyValue(t);return Object.assign(x.style,{[t]:w}),this.add(()=>{Object.assign(x.style,{[t]:g})})},group(x){let t=xl();return x(t),this.add(()=>t.dispose())},add(x){return r.push(x),()=>{let t=r.indexOf(x);if(t>=0)for(let w of r.splice(t,1))w()}},dispose(){for(let x of r.splice(0))x()}};return a}function P_(r){let a={called:!1};return(...x)=>{if(!a.called)return a.called=!0,r(...x)}}function ta(r,...a){r&&a.length>0&&r.classList.add(...a)}function Os(r,...a){r&&a.length>0&&r.classList.remove(...a)}var Ga=(r=>(r.Finished="finished",r.Cancelled="cancelled",r))(Ga||{});function A_(r,a){let x=xl();if(!r)return x.dispose;let{transitionDuration:t,transitionDelay:w}=getComputedStyle(r),[g,i]=[t,w].map(u=>{let[o=0]=u.split(",").filter(Boolean).map(h=>h.includes("ms")?parseFloat(h):parseFloat(h)*1e3).sort((h,y)=>y-h);return o});return g!==0?x.setTimeout(()=>a("finished"),g+i):a("finished"),x.add(()=>a("cancelled")),x.dispose}function Fc(r,a,x,t,w,g){let i=xl(),u=g!==void 0?P_(g):()=>{};return Os(r,...w),ta(r,...a,...x),i.nextFrame(()=>{Os(r,...x),ta(r,...t),i.add(A_(r,o=>(Os(r,...t,...a),ta(r,...w),u(o))))}),i.add(()=>Os(r,...a,...x,...t,...w)),i.add(()=>u("cancelled")),i.dispose}function Bn(r=""){return r.split(/\s+/).filter(a=>a.length>1)}let wl=Symbol("TransitionContext");var R_=(r=>(r.Visible="visible",r.Hidden="hidden",r))(R_||{});function L_(){return zt(wl,null)!==null}function I_(){let r=zt(wl,null);if(r===null)throw new Error("A is used but it is missing a parent .");return r}function D_(){let r=zt(jl,null);if(r===null)throw new Error("A is used but it is missing a parent .");return r}let jl=Symbol("NestingContext");function wi(r){return"children"in r?wi(r.children):r.value.filter(({state:a})=>a==="visible").length>0}function gh(r){let a=mt([]),x=mt(!1);Vr(()=>x.value=!0),ls(()=>x.value=!1);function t(g,i=Mn.Hidden){let u=a.value.findIndex(({id:o})=>o===g);u!==-1&&(Kn(i,{[Mn.Unmount](){a.value.splice(u,1)},[Mn.Hidden](){a.value[u].state="hidden"}}),!wi(a)&&x.value&&(r==null||r()))}function w(g){let i=a.value.find(({id:u})=>u===g);return i?i.state!=="visible"&&(i.state="visible"):a.value.push({id:g,state:"visible"}),()=>t(g,Mn.Unmount)}return{children:a,register:w,unregister:t}}let vh=ei.RenderStrategy,F_=gr({props:{as:{type:[Object,String],default:"div"},show:{type:[Boolean],default:null},unmount:{type:[Boolean],default:!0},appear:{type:[Boolean],default:!1},enter:{type:[String],default:""},enterFrom:{type:[String],default:""},enterTo:{type:[String],default:""},entered:{type:[String],default:""},leave:{type:[String],default:""},leaveFrom:{type:[String],default:""},leaveTo:{type:[String],default:""}},emits:{beforeEnter:()=>!0,afterEnter:()=>!0,beforeLeave:()=>!0,afterLeave:()=>!0},setup(r,{emit:a,attrs:x,slots:t,expose:w}){let g=mt(0);function i(){g.value|=Cr.Opening,a("beforeEnter")}function u(){g.value&=~Cr.Opening,a("afterEnter")}function o(){g.value|=Cr.Closing,a("beforeLeave")}function h(){g.value&=~Cr.Closing,a("afterLeave")}if(!L_()&&u_())return()=>Jt(bh,{...r,onBeforeEnter:i,onAfterEnter:u,onBeforeLeave:o,onAfterLeave:h},t);let y=mt(null),m=bt(()=>r.unmount?Mn.Unmount:Mn.Hidden);w({el:y,$el:y});let{show:n,appear:s}=I_(),{register:c,unregister:f}=D_(),p=mt(n.value?"visible":"hidden"),d={value:!0},l=bi(),b={value:!1},v=gh(()=>{!b.value&&p.value!=="hidden"&&(p.value="hidden",f(l),h())});Vr(()=>{let A=c(l);ls(A)}),Jr(()=>{if(m.value===Mn.Hidden&&l){if(n.value&&p.value!=="visible"){p.value="visible";return}Kn(p.value,{hidden:()=>f(l),visible:()=>c(l)})}});let j=Bn(r.enter),E=Bn(r.enterFrom),T=Bn(r.enterTo),M=Bn(r.entered),P=Bn(r.leave),R=Bn(r.leaveFrom),C=Bn(r.leaveTo);Vr(()=>{Jr(()=>{if(p.value==="visible"){let A=Nt(y);if(A instanceof Comment&&A.data==="")throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")}})});function I(A){let N=d.value&&!s.value,F=Nt(y);!F||!(F instanceof HTMLElement)||N||(b.value=!0,n.value&&i(),n.value||o(),A(n.value?Fc(F,j,E,T,M,U=>{b.value=!1,U===Ga.Finished&&u()}):Fc(F,P,R,C,M,U=>{b.value=!1,U===Ga.Finished&&(wi(v)||(p.value="hidden",f(l),h()))})))}return Vr(()=>{Pn([n],(A,N,F)=>{I(F),d.value=!1},{immediate:!0})}),Lr(jl,v),fh(bt(()=>Kn(p.value,{visible:Cr.Open,hidden:Cr.Closed})|g.value)),()=>{let{appear:A,show:N,enter:F,enterFrom:U,enterTo:W,entered:V,leave:H,leaveFrom:Q,leaveTo:ee,...ae}=r,k={ref:y},D={...ae,...s.value&&n.value&&_i.isServer?{class:un([x.class,ae.class,...j,...E])}:{}};return So({theirProps:D,ourProps:k,slot:{},slots:t,attrs:x,features:vh,visible:p.value==="visible",name:"TransitionChild"})}}}),N_=F_,bh=gr({inheritAttrs:!1,props:{as:{type:[Object,String],default:"div"},show:{type:[Boolean],default:null},unmount:{type:[Boolean],default:!0},appear:{type:[Boolean],default:!1},enter:{type:[String],default:""},enterFrom:{type:[String],default:""},enterTo:{type:[String],default:""},entered:{type:[String],default:""},leave:{type:[String],default:""},leaveFrom:{type:[String],default:""},leaveTo:{type:[String],default:""}},emits:{beforeEnter:()=>!0,afterEnter:()=>!0,beforeLeave:()=>!0,afterLeave:()=>!0},setup(r,{emit:a,attrs:x,slots:t}){let w=_l(),g=bt(()=>r.show===null&&w!==null?(w.value&Cr.Open)===Cr.Open:r.show);Jr(()=>{if(![!0,!1].includes(g.value))throw new Error('A is used but it is missing a `:show="true | false"` prop.')});let i=mt(g.value?"visible":"hidden"),u=gh(()=>{i.value="hidden"}),o=mt(!0),h={show:g,appear:bt(()=>r.appear||!o.value)};return Vr(()=>{Jr(()=>{o.value=!1,g.value?i.value="visible":wi(u)||(i.value="hidden")})}),Lr(jl,u),Lr(wl,h),()=>{let y=mh(r,["show","appear","unmount","onBeforeEnter","onBeforeLeave","onAfterEnter","onAfterLeave"]),m={unmount:r.unmount};return So({ourProps:{...m,as:"template"},theirProps:{},slot:{},slots:{...t,default:()=>[Jt(N_,{onBeforeEnter:()=>a("beforeEnter"),onAfterEnter:()=>a("afterEnter"),onBeforeLeave:()=>a("beforeLeave"),onAfterLeave:()=>a("afterLeave"),...x,...m,...y},t.default)]},attrs:{},features:vh,visible:i.value==="visible",name:"Transition"})}}});const U_=(r,a)=>{const x=r.__vccOpts||r;for(const[t,w]of a)x[t]=w;return x},B_={},G_={class:"flex min-h-screen flex-col bg-background font-display"},V_={class:"mt-4 flex-1"},H_={class:"flex justify-center"};function z_(r,a){const x=C_,t=bh;return kr(),ui("body",G_,[ht(x),vt("main",V_,[vt("div",H_,[ht(t,{show:"",appear:"",as:"template",enter:"transition transform duration-300 ease-out","enter-from":"translate-x-8 opacity-0","enter-to":"translate-x-0 opacity-100",leave:"transition transform duration-300 ease-in","leave-from":"opacity-100","leave-to":"-translate-x-8 opacity-0"},{default:jr(()=>a[0]||(a[0]=[vt("div",{class:"rounded-xl bg-black/50 p-6 text-center shadow-lg"},[vt("div",{class:"text-6xl font-extrabold tracking-widest text-white"}," Yikes! "),vt("div",{class:"text-base text-gray-200"}," Either the page you're looking for doesn't exist, or something has gone terribly wrong. ")],-1)])),_:1})])])])}const W_=U_(B_,[["render",z_]]),q_={key:0},Nc={__name:"nuxt-root",setup(r){const a=()=>null,x=Dt(),t=x.deferHydration();if(x.isHydrating){const o=x.hooks.hookOnce("app:error",t);wr().beforeEach(o)}const w=!1;Lr(cs,hi()),x.hooks.callHookWith(o=>o.map(h=>h()),"vue:setup");const g=pi(),i=!1;Md((o,h,y)=>{if(x.hooks.callHook("vue:error",o,h,y).catch(m=>console.error("[nuxt] Error in `vue:error` hook",m)),Gg(o)&&(o.fatal||o.unhandled))return x.runWithContext(()=>uo(o)),!1});const u=!1;return(o,h)=>(kr(),Tn(sl,{onResolve:Vt(t)},{default:jr(()=>[Vt(i)?(kr(),ui("div",q_)):Vt(g)?(kr(),Tn(Vt(W_),{key:1,error:Vt(g)},null,8,["error"])):Vt(u)?(kr(),Tn(Vt(a),{key:2,context:Vt(u)},null,8,["context"])):Vt(w)?(kr(),Tn(Yp(Vt(w)),{key:3})):(kr(),Tn(Vt(R1),{key:4}))]),_:1},8,["onResolve"]))}};let Uc;{let r;Uc=async function(){var i,u;if(r)return r;const t=!!(((i=window.__NUXT__)==null?void 0:i.serverRendered)??((u=document.getElementById("__NUXT_DATA__"))==null?void 0:u.dataset.ssr)==="true")?fy(Nc):dy(Nc),w=Eg({vueApp:t});async function g(o){await w.callHook("app:error",o),w.payload.error=w.payload.error||mi(o)}t.config.errorHandler=g,w.hook("app:suspense:resolve",()=>{t.config.errorHandler===g&&(t.config.errorHandler=void 0)});try{await Mg(w,j1)}catch(o){g(o)}try{await w.hooks.callHook("app:created",t),await w.hooks.callHook("app:beforeMount",t),t.mount(wg),await w.hooks.callHook("app:mounted",t),await Pr()}catch(o){g(o)}return t},r=Uc().catch(a=>{throw console.error("Error while mounting app:",a),a})}export{mi as $,In as A,ix as B,Z_ as C,ox as D,or as E,cr as F,Pr as G,Fv as H,us as I,ex as J,Xs as K,Jt as L,rt as M,Dt as N,Sp as O,K_ as P,Uy as Q,Wu as R,bh as S,al as T,fi as U,di as V,sx as W,Ko as X,zp as Y,X_ as Z,D1 as _,Vt as a,Qn as a0,Yc as a1,_t as a2,pu as a3,dt as a4,Xn as a5,Kt as a6,Ws as a7,Y_ as a8,J_ as a9,Xa as aa,Yp as ab,C_ as ac,vt as b,ui as c,gr as d,Tn as e,jr as f,Hn as g,nx as h,ht as i,mt as j,bt as k,un as l,U_ as m,Ug as n,kr as o,rx as p,Vr as q,Q_ as r,F_ as s,Zh as t,hi as u,Pn as v,tx as w,as as x,ls as y,$_ as z}; diff --git a/_nuxt/Bq6TICzc.js b/_nuxt/BOWXzEfp.js similarity index 99% rename from _nuxt/Bq6TICzc.js rename to _nuxt/BOWXzEfp.js index a68f55de..4b900ec4 100644 --- a/_nuxt/Bq6TICzc.js +++ b/_nuxt/BOWXzEfp.js @@ -1 +1 @@ -import{q,v as D,x as T,o as b,c as p,b as t,d as E,j as W,y as R,i as C,a as _,F as A,r as F,t as h}from"./nJJO8dFm.js";const M={id:"waveform-canvas-container",class:"bg-green h-full w-full"},N=["width","height"],P={__name:"Waveform",props:{timeDomainBufferHistory:{type:Array},canvasWidth:{type:Number},canvasHeight:{type:Number},fillStyle:{type:String,default:"rgba(0,0,0)"},strokeStyle:{type:String,default:"rgb(255, 255, 255)"}},setup(f){const l=f;return q(()=>{const d=document.getElementById("waveformCanvas2"),e=d.getContext("2d"),s=document.getElementById("waveform-canvas-container"),c=l.canvasHeight?l.canvasHeight:s.clientHeight,o=l.canvasWidth?l.canvasWidth:s.clientWidth;d.height=c,d.width=o,e.fillRect(0,0,o,c),D(l.timeDomainBufferHistory,a=>{e.fillStyle=l.fillStyle,e.fillRect(0,0,o,c),e.lineWidth=2,e.strokeStyle=l.strokeStyle,e.beginPath();const u=a.slice(-1)[0],v=u.length,m=o/v;let g=0;for(let i=0;i{}),(d,e)=>(b(),p("div",M,[t("canvas",{id:"waveformCanvas2",width:f.canvasWidth,height:f.canvasHeight},null,8,N)]))}},U={id:"spectrogram-canvas-container",class:"h-full w-full"},O=["width","height"],k=36,G={__name:"Spectrogram",props:{frequencyDomainBufferHistory:{type:Array},canvasWidth:{type:Number},canvasHeight:{type:Number},fillStyle:{type:String,default:"rgba(0,0,0)"}},setup(f){const l=f,d=(e,s,c,o,a)=>(e-s)*(a-s)/(c-s)+o;return q(()=>{const e=document.getElementById("spectrogramCanvas"),s=e.getContext("2d"),c=document.getElementById("spectrogram-canvas-container"),o=l.canvasHeight?l.canvasHeight:c.clientHeight,a=l.canvasWidth?l.canvasWidth:c.clientWidth;e.height=o,e.width=a,s.fillRect(0,0,a,o),D(l.frequencyDomainBufferHistory,u=>{s.fillStyle=l.fillStyle,s.fillRect(0,0,a,o);const v=u.slice(-k),m=a/128,g=o/k;for(let i=0;i<128;i++)for(let n=0;n(b(),p("div",null,[t("div",U,[t("canvas",{id:"spectrogramCanvas",width:f.canvasWidth,height:f.canvasHeight},null,8,O)])]))}},L={id:"bar-graph-container",class:"h-full w-full"},V=["width","height"],I=2,Y={__name:"FrequencyBarGraph",props:{audioBufferHistory:{type:Array},canvasWidth:{type:Number},canvasHeight:{type:Number},fillStyle:{type:String,default:"rgba(0,0,0)"},strokeStyle:{type:String,default:"rgb(255, 255, 255)"}},setup(f){const l=f,d=(e,s,c,o,a)=>(e-s)*(a-s)/(c-s)+o;return q(()=>{const e=document.getElementById("frequencyBarGraphCanvas"),s=e.getContext("2d"),c=document.getElementById("bar-graph-container"),o=l.canvasHeight?l.canvasHeight:c.clientHeight,a=l.canvasWidth?l.canvasWidth:c.clientWidth;e.height=o,e.width=a,s.fillRect(0,0,a,o),D(l.audioBufferHistory,u=>{s.fillStyle=l.fillStyle,s.fillRect(0,0,a,o);const v=u.slice(-1)[0],m=a/v.length-I;let g=0;for(let i=0;i(b(),p("div",null,[t("div",L,[t("canvas",{id:"frequencyBarGraphCanvas",width:f.canvasWidth,height:f.canvasHeight},null,8,V)])]))}},j={class:"container mx-auto font-mono"},z={class:"bg-background text-white"},K={class:"grid grid-cols-3 gap-4"},X={class:"col-span-3 rounded-xl bg-black/75 p-4 lg:col-span-1"},Z={class:"col-span-3 rounded-xl bg-black/75 p-4 lg:col-span-1"},J={class:"col-span-3 rounded-xl bg-black/75 p-4 lg:col-span-1"},Q={class:"col-span-3 rounded-xl bg-black/75 p-4"},tt={class:"w-full table-fixed"},et={class:"text-left font-bold"},nt={class:"text-left"},st={class:"text-left"},lt={class:"text-left"},ot={class:"text-left"},at={class:"truncate text-right"},it={class:"col-span-3 rounded-xl bg-black/75 p-4"},ct={class:"w-full table-fixed"},rt={class:"text-left font-bold"},dt={class:"text-left"},ut={class:"text-left"},ht={class:"text-left"},ft={class:"text-left"},gt={class:"truncate text-right"},B=256,yt=E({__name:"index",setup(f){let l=null,d=null,e=null,s=null,c=null,o=W([]),a=null,u=W([]);W(!1);const v=()=>{requestAnimationFrame(v),e.getByteTimeDomainData(c),c!==null&&(o.value.push(c.slice()),o.value.length>B&&o.value.shift()),e.getByteFrequencyData(a),a!==null&&(u.value.push(a.slice()),u.value.length>B&&u.value.shift())},m=()=>{navigator.mediaDevices.getUserMedia({audio:!0}).then(i=>{l=i,d=new(window.AudioContext||window.webkitAudioContext),e=d.createAnalyser(),s=d.createMediaStreamSource(l),s.connect(e),e.fftSize=2048,c=new Uint8Array(e.frequencyBinCount),a=new Uint8Array(e.frequencyBinCount);for(let n=0;n{l!==null&&l.active&&l.getAudioTracks().forEach(i=>{i.stop()})};return R(()=>{console.log("disabling"),g()}),(i,n)=>{const y=P,w=G,$=Y;return b(),p("div",j,[t("div",z,[t("div",K,[t("div",{class:"col-span-3 space-x-2"},[t("div",{class:"inline-block rounded-lg bg-black px-6 py-2 text-sm font-bold uppercase text-white shadow-lg shadow-green-400/25 transition duration-150 ease-in-out hover:cursor-pointer hover:shadow-white/25",onClick:m}," Enable "),t("div",{class:"inline-block rounded-lg bg-black px-6 py-2 text-sm font-bold uppercase text-white shadow-lg shadow-red-400/25 transition duration-150 ease-in-out hover:cursor-pointer hover:shadow-white/25",onClick:g}," Disable ")]),t("div",X,[n[0]||(n[0]=t("div",{class:"mb-2 text-xl font-bold"},"Time Domain Waveform",-1)),C(y,{timeDomainBufferHistory:_(o),strokeStyle:"rgb(255, 0, 255)",class:"h-72 border-2 border-gray-400"},null,8,["timeDomainBufferHistory"])]),t("div",Z,[n[1]||(n[1]=t("div",{class:"mb-2 text-xl font-bold"},"Frequency Spectrogram",-1)),C(w,{frequencyDomainBufferHistory:_(u),class:"h-72 border-2 border-gray-400"},null,8,["frequencyDomainBufferHistory"])]),t("div",J,[n[2]||(n[2]=t("div",{class:"mb-2 text-xl font-bold"},"Frequency Bar Chart",-1)),C($,{audioBufferHistory:_(u),class:"h-72 border-2 border-gray-400"},null,8,["audioBufferHistory"])]),t("div",Q,[n[4]||(n[4]=t("div",{class:"mb-2 text-xl font-bold"},"Frequency Buffer History",-1)),t("div",null,[t("table",tt,[n[3]||(n[3]=t("thead",{class:"collapse border-b-2 md:visible"},[t("tr",null,[t("th",{class:"text-left"},"Index"),t("th",{class:"text-left"},"Mean"),t("th",{class:"text-left"},"Min"),t("th",{class:"text-left"},"Max"),t("th",{class:"text-left"},"FFT"),t("th",{class:"text-right"},"Buffer")])],-1)),t("tbody",null,[(b(!0),p(A,null,F(_(u).slice(-10),(r,x)=>(b(),p("tr",{key:x},[t("td",et,h(x),1),t("td",nt,h((r.reduce((H,S)=>H+S)/r.length).toFixed(2)),1),t("td",st,h(Math.min(...r)),1),t("td",lt,h(Math.max(...r)),1),t("td",ot,h(r.length),1),t("td",at,h(r.slice(0,4))+" ... "+h(r.slice(-4)),1)]))),128))])])])]),t("div",it,[n[6]||(n[6]=t("div",{class:"mb-2 text-xl font-bold"},"Time Domain Buffer History",-1)),t("div",null,[t("table",ct,[n[5]||(n[5]=t("thead",{class:"collapse border-b-2 md:visible"},[t("tr",null,[t("th",{class:"text-left"},"Index"),t("th",{class:"text-left"},"Mean"),t("th",{class:"text-left"},"Min"),t("th",{class:"text-left"},"Max"),t("th",{class:"text-left"},"FFT"),t("th",{class:"text-right"},"Buffer")])],-1)),t("tbody",null,[(b(!0),p(A,null,F(_(o).slice(-10),(r,x)=>(b(),p("tr",{key:x},[t("td",rt,h(x),1),t("td",dt,h((r.reduce((H,S)=>H+S)/r.length).toFixed(2)),1),t("td",ut,h(Math.min(...r)),1),t("td",ht,h(Math.max(...r)),1),t("td",ft,h(r.length),1),t("td",gt,h(r.slice(0,4))+" ... "+h(r.slice(-4)),1)]))),128))])])])])])])])}}});export{yt as default}; +import{q,v as D,x as T,o as b,c as p,b as t,d as E,j as W,y as R,i as C,a as _,F as A,r as F,t as h}from"./BK37JMLf.js";const M={id:"waveform-canvas-container",class:"bg-green h-full w-full"},N=["width","height"],P={__name:"Waveform",props:{timeDomainBufferHistory:{type:Array},canvasWidth:{type:Number},canvasHeight:{type:Number},fillStyle:{type:String,default:"rgba(0,0,0)"},strokeStyle:{type:String,default:"rgb(255, 255, 255)"}},setup(f){const l=f;return q(()=>{const d=document.getElementById("waveformCanvas2"),e=d.getContext("2d"),s=document.getElementById("waveform-canvas-container"),c=l.canvasHeight?l.canvasHeight:s.clientHeight,o=l.canvasWidth?l.canvasWidth:s.clientWidth;d.height=c,d.width=o,e.fillRect(0,0,o,c),D(l.timeDomainBufferHistory,a=>{e.fillStyle=l.fillStyle,e.fillRect(0,0,o,c),e.lineWidth=2,e.strokeStyle=l.strokeStyle,e.beginPath();const u=a.slice(-1)[0],v=u.length,m=o/v;let g=0;for(let i=0;i{}),(d,e)=>(b(),p("div",M,[t("canvas",{id:"waveformCanvas2",width:f.canvasWidth,height:f.canvasHeight},null,8,N)]))}},U={id:"spectrogram-canvas-container",class:"h-full w-full"},O=["width","height"],k=36,G={__name:"Spectrogram",props:{frequencyDomainBufferHistory:{type:Array},canvasWidth:{type:Number},canvasHeight:{type:Number},fillStyle:{type:String,default:"rgba(0,0,0)"}},setup(f){const l=f,d=(e,s,c,o,a)=>(e-s)*(a-s)/(c-s)+o;return q(()=>{const e=document.getElementById("spectrogramCanvas"),s=e.getContext("2d"),c=document.getElementById("spectrogram-canvas-container"),o=l.canvasHeight?l.canvasHeight:c.clientHeight,a=l.canvasWidth?l.canvasWidth:c.clientWidth;e.height=o,e.width=a,s.fillRect(0,0,a,o),D(l.frequencyDomainBufferHistory,u=>{s.fillStyle=l.fillStyle,s.fillRect(0,0,a,o);const v=u.slice(-k),m=a/128,g=o/k;for(let i=0;i<128;i++)for(let n=0;n(b(),p("div",null,[t("div",U,[t("canvas",{id:"spectrogramCanvas",width:f.canvasWidth,height:f.canvasHeight},null,8,O)])]))}},L={id:"bar-graph-container",class:"h-full w-full"},V=["width","height"],I=2,Y={__name:"FrequencyBarGraph",props:{audioBufferHistory:{type:Array},canvasWidth:{type:Number},canvasHeight:{type:Number},fillStyle:{type:String,default:"rgba(0,0,0)"},strokeStyle:{type:String,default:"rgb(255, 255, 255)"}},setup(f){const l=f,d=(e,s,c,o,a)=>(e-s)*(a-s)/(c-s)+o;return q(()=>{const e=document.getElementById("frequencyBarGraphCanvas"),s=e.getContext("2d"),c=document.getElementById("bar-graph-container"),o=l.canvasHeight?l.canvasHeight:c.clientHeight,a=l.canvasWidth?l.canvasWidth:c.clientWidth;e.height=o,e.width=a,s.fillRect(0,0,a,o),D(l.audioBufferHistory,u=>{s.fillStyle=l.fillStyle,s.fillRect(0,0,a,o);const v=u.slice(-1)[0],m=a/v.length-I;let g=0;for(let i=0;i(b(),p("div",null,[t("div",L,[t("canvas",{id:"frequencyBarGraphCanvas",width:f.canvasWidth,height:f.canvasHeight},null,8,V)])]))}},j={class:"container mx-auto font-mono"},z={class:"bg-background text-white"},K={class:"grid grid-cols-3 gap-4"},X={class:"col-span-3 rounded-xl bg-black/75 p-4 lg:col-span-1"},Z={class:"col-span-3 rounded-xl bg-black/75 p-4 lg:col-span-1"},J={class:"col-span-3 rounded-xl bg-black/75 p-4 lg:col-span-1"},Q={class:"col-span-3 rounded-xl bg-black/75 p-4"},tt={class:"w-full table-fixed"},et={class:"text-left font-bold"},nt={class:"text-left"},st={class:"text-left"},lt={class:"text-left"},ot={class:"text-left"},at={class:"truncate text-right"},it={class:"col-span-3 rounded-xl bg-black/75 p-4"},ct={class:"w-full table-fixed"},rt={class:"text-left font-bold"},dt={class:"text-left"},ut={class:"text-left"},ht={class:"text-left"},ft={class:"text-left"},gt={class:"truncate text-right"},B=256,yt=E({__name:"index",setup(f){let l=null,d=null,e=null,s=null,c=null,o=W([]),a=null,u=W([]);W(!1);const v=()=>{requestAnimationFrame(v),e.getByteTimeDomainData(c),c!==null&&(o.value.push(c.slice()),o.value.length>B&&o.value.shift()),e.getByteFrequencyData(a),a!==null&&(u.value.push(a.slice()),u.value.length>B&&u.value.shift())},m=()=>{navigator.mediaDevices.getUserMedia({audio:!0}).then(i=>{l=i,d=new(window.AudioContext||window.webkitAudioContext),e=d.createAnalyser(),s=d.createMediaStreamSource(l),s.connect(e),e.fftSize=2048,c=new Uint8Array(e.frequencyBinCount),a=new Uint8Array(e.frequencyBinCount);for(let n=0;n{l!==null&&l.active&&l.getAudioTracks().forEach(i=>{i.stop()})};return R(()=>{console.log("disabling"),g()}),(i,n)=>{const y=P,w=G,$=Y;return b(),p("div",j,[t("div",z,[t("div",K,[t("div",{class:"col-span-3 space-x-2"},[t("div",{class:"inline-block rounded-lg bg-black px-6 py-2 text-sm font-bold uppercase text-white shadow-lg shadow-green-400/25 transition duration-150 ease-in-out hover:cursor-pointer hover:shadow-white/25",onClick:m}," Enable "),t("div",{class:"inline-block rounded-lg bg-black px-6 py-2 text-sm font-bold uppercase text-white shadow-lg shadow-red-400/25 transition duration-150 ease-in-out hover:cursor-pointer hover:shadow-white/25",onClick:g}," Disable ")]),t("div",X,[n[0]||(n[0]=t("div",{class:"mb-2 text-xl font-bold"},"Time Domain Waveform",-1)),C(y,{timeDomainBufferHistory:_(o),strokeStyle:"rgb(255, 0, 255)",class:"h-72 border-2 border-gray-400"},null,8,["timeDomainBufferHistory"])]),t("div",Z,[n[1]||(n[1]=t("div",{class:"mb-2 text-xl font-bold"},"Frequency Spectrogram",-1)),C(w,{frequencyDomainBufferHistory:_(u),class:"h-72 border-2 border-gray-400"},null,8,["frequencyDomainBufferHistory"])]),t("div",J,[n[2]||(n[2]=t("div",{class:"mb-2 text-xl font-bold"},"Frequency Bar Chart",-1)),C($,{audioBufferHistory:_(u),class:"h-72 border-2 border-gray-400"},null,8,["audioBufferHistory"])]),t("div",Q,[n[4]||(n[4]=t("div",{class:"mb-2 text-xl font-bold"},"Frequency Buffer History",-1)),t("div",null,[t("table",tt,[n[3]||(n[3]=t("thead",{class:"collapse border-b-2 md:visible"},[t("tr",null,[t("th",{class:"text-left"},"Index"),t("th",{class:"text-left"},"Mean"),t("th",{class:"text-left"},"Min"),t("th",{class:"text-left"},"Max"),t("th",{class:"text-left"},"FFT"),t("th",{class:"text-right"},"Buffer")])],-1)),t("tbody",null,[(b(!0),p(A,null,F(_(u).slice(-10),(r,x)=>(b(),p("tr",{key:x},[t("td",et,h(x),1),t("td",nt,h((r.reduce((H,S)=>H+S)/r.length).toFixed(2)),1),t("td",st,h(Math.min(...r)),1),t("td",lt,h(Math.max(...r)),1),t("td",ot,h(r.length),1),t("td",at,h(r.slice(0,4))+" ... "+h(r.slice(-4)),1)]))),128))])])])]),t("div",it,[n[6]||(n[6]=t("div",{class:"mb-2 text-xl font-bold"},"Time Domain Buffer History",-1)),t("div",null,[t("table",ct,[n[5]||(n[5]=t("thead",{class:"collapse border-b-2 md:visible"},[t("tr",null,[t("th",{class:"text-left"},"Index"),t("th",{class:"text-left"},"Mean"),t("th",{class:"text-left"},"Min"),t("th",{class:"text-left"},"Max"),t("th",{class:"text-left"},"FFT"),t("th",{class:"text-right"},"Buffer")])],-1)),t("tbody",null,[(b(!0),p(A,null,F(_(o).slice(-10),(r,x)=>(b(),p("tr",{key:x},[t("td",rt,h(x),1),t("td",dt,h((r.reduce((H,S)=>H+S)/r.length).toFixed(2)),1),t("td",ut,h(Math.min(...r)),1),t("td",ht,h(Math.max(...r)),1),t("td",ft,h(r.length),1),t("td",gt,h(r.slice(0,4))+" ... "+h(r.slice(-4)),1)]))),128))])])])])])])])}}});export{yt as default}; diff --git a/_nuxt/ClDFPAdk.js b/_nuxt/BOZf4djk.js similarity index 94% rename from _nuxt/ClDFPAdk.js rename to _nuxt/BOZf4djk.js index 0cb1651c..b6ee62b3 100644 --- a/_nuxt/ClDFPAdk.js +++ b/_nuxt/BOZf4djk.js @@ -1 +1 @@ -import{c as s,b as t,F as c,r as u,o,t as r,h as a}from"./nJJO8dFm.js";const _={class:"container mx-auto font-mono text-white"},p={class:"grid grid-cols-10 gap-y-6"},g={class:"col-span-2"},m={class:"col-span-8"},f={class:"flex-col space-y-2"},v={class:"text-orange-500"},b={class:"flex"},x=["href"],y=["href"],D=["href"],M={__name:"talks",setup(w){const h=[{title:"Dagster Deep Dive",subtitle:"Orchestrating ML Workloads with Dagster & Modal",date:new Date("2024-9-24"),href_slides:"https://github.com/dagster-io/talks/blob/main/slides/deep-dive-dagster-modal-demo.pdf",href_code:"https://github.com/dagster-io/dagster-modal-demo"},{title:"Dagster Deep Dive",subtitle:"Data Quality: Building Reliable Data Platforms",date:new Date("2024-08-06"),href_slides:"https://github.com/dagster-io/talks/blob/main/slides/deep-dive-data-quality.pdf",href_video:"https://www.youtube.com/watch?v=vT0sSKEPE3A"},{title:"MotherDuck and Dagster",subtitle:"From local development to production",date:new Date("2024-04-18"),href_slides:"https://github.com/dagster-io/talks/blob/main/slides/motherduck-dagster-evidence-hybrid-compute.pdf",href_video:"https://www.youtube.com/watch?v=cOSiMMb_rjk",href_code:"https://github.com/dagster-io/talks/tree/main/motherduck-dagster-hybrid-compute"},{title:"Dagster Deep Dive",subtitle:"Configurations and Resources",date:new Date("2024-03-05"),href_slides:"https://github.com/dagster-io/talks/blob/main/slides/02-deep-dive-resources.pdf",href_video:"https://www.youtube.com/watch?v=i6m7k16W-yg",href_code:"https://github.com/dagster-io/talks/tree/main/dagster-deep-dives/dagster_deep_dives/resources_and_configurations"}],n=function(i){return i.toLocaleDateString("en-US",{month:"short",day:"2-digit",year:"numeric"})};return(i,d)=>(o(),s("div",_,[d[0]||(d[0]=t("h1",{class:"my-6 text-2xl font-extrabold"},"Talks",-1)),t("div",p,[(o(),s(c,null,u(h,(e,l)=>(o(),s(c,{key:l},[t("div",g,r(n(e.date)),1),t("div",m,[t("div",f,[t("div",v,r(e.title),1),t("div",null,r(e.subtitle),1),t("div",b,[e.href_slides?(o(),s("a",{key:0,class:"text-xs uppercase text-gray-400 hover:cursor-pointer hover:text-orange-500",href:e.href_slides}," [slide_deck] ",8,x)):a("",!0),e.href_video?(o(),s("a",{key:1,class:"text-xs uppercase text-gray-400 hover:cursor-pointer hover:text-orange-500",href:e.href_video}," [video] ",8,y)):a("",!0),e.href_code?(o(),s("a",{key:2,class:"text-xs uppercase text-gray-400 hover:cursor-pointer hover:text-orange-500",href:e.href_code}," [source_code] ",8,D)):a("",!0)])])])],64))),64))])]))}};export{M as default}; +import{c as s,b as t,F as c,r as u,o,t as r,h as a}from"./BK37JMLf.js";const _={class:"container mx-auto font-mono text-white"},p={class:"grid grid-cols-10 gap-y-6"},g={class:"col-span-2"},m={class:"col-span-8"},f={class:"flex-col space-y-2"},v={class:"text-orange-500"},b={class:"flex"},x=["href"],y=["href"],D=["href"],M={__name:"talks",setup(w){const h=[{title:"Dagster Deep Dive",subtitle:"Orchestrating ML Workloads with Dagster & Modal",date:new Date("2024-9-24"),href_slides:"https://github.com/dagster-io/talks/blob/main/slides/deep-dive-dagster-modal-demo.pdf",href_code:"https://github.com/dagster-io/dagster-modal-demo"},{title:"Dagster Deep Dive",subtitle:"Data Quality: Building Reliable Data Platforms",date:new Date("2024-08-06"),href_slides:"https://github.com/dagster-io/talks/blob/main/slides/deep-dive-data-quality.pdf",href_video:"https://www.youtube.com/watch?v=vT0sSKEPE3A"},{title:"MotherDuck and Dagster",subtitle:"From local development to production",date:new Date("2024-04-18"),href_slides:"https://github.com/dagster-io/talks/blob/main/slides/motherduck-dagster-evidence-hybrid-compute.pdf",href_video:"https://www.youtube.com/watch?v=cOSiMMb_rjk",href_code:"https://github.com/dagster-io/talks/tree/main/motherduck-dagster-hybrid-compute"},{title:"Dagster Deep Dive",subtitle:"Configurations and Resources",date:new Date("2024-03-05"),href_slides:"https://github.com/dagster-io/talks/blob/main/slides/02-deep-dive-resources.pdf",href_video:"https://www.youtube.com/watch?v=i6m7k16W-yg",href_code:"https://github.com/dagster-io/talks/tree/main/dagster-deep-dives/dagster_deep_dives/resources_and_configurations"}],n=function(i){return i.toLocaleDateString("en-US",{month:"short",day:"2-digit",year:"numeric"})};return(i,d)=>(o(),s("div",_,[d[0]||(d[0]=t("h1",{class:"my-6 text-2xl font-extrabold"},"Talks",-1)),t("div",p,[(o(),s(c,null,u(h,(e,l)=>(o(),s(c,{key:l},[t("div",g,r(n(e.date)),1),t("div",m,[t("div",f,[t("div",v,r(e.title),1),t("div",null,r(e.subtitle),1),t("div",b,[e.href_slides?(o(),s("a",{key:0,class:"text-xs uppercase text-gray-400 hover:cursor-pointer hover:text-orange-500",href:e.href_slides}," [slide_deck] ",8,x)):a("",!0),e.href_video?(o(),s("a",{key:1,class:"text-xs uppercase text-gray-400 hover:cursor-pointer hover:text-orange-500",href:e.href_video}," [video] ",8,y)):a("",!0),e.href_code?(o(),s("a",{key:2,class:"text-xs uppercase text-gray-400 hover:cursor-pointer hover:text-orange-500",href:e.href_code}," [source_code] ",8,D)):a("",!0)])])])],64))),64))])]))}};export{M as default}; diff --git a/_nuxt/BpPcz_md.js b/_nuxt/BPuIfGRI.js similarity index 88% rename from _nuxt/BpPcz_md.js rename to _nuxt/BPuIfGRI.js index 184ba3fd..711b7795 100644 --- a/_nuxt/BpPcz_md.js +++ b/_nuxt/BPuIfGRI.js @@ -1 +1 @@ -import{d as p,I as f,k as i,o as s,c as n,a as u,a9 as r}from"./nJJO8dFm.js";const l=["id"],d=["href"],_=p({__name:"ProseH4",props:{id:{}},setup(c){const t=c,{headings:o}=f().public.mdc,a=i(()=>{var e;return t.id&&(typeof(o==null?void 0:o.anchorLinks)=="boolean"&&(o==null?void 0:o.anchorLinks)===!0||typeof(o==null?void 0:o.anchorLinks)=="object"&&((e=o==null?void 0:o.anchorLinks)==null?void 0:e.h4))});return(e,k)=>(s(),n("h4",{id:t.id},[t.id&&u(a)?(s(),n("a",{key:0,href:`#${t.id}`},[r(e.$slots,"default")],8,d)):r(e.$slots,"default",{key:1})],8,l))}});export{_ as default}; +import{d as p,I as f,k as i,o as s,c as n,a as u,a9 as r}from"./BK37JMLf.js";const l=["id"],d=["href"],_=p({__name:"ProseH4",props:{id:{}},setup(c){const t=c,{headings:o}=f().public.mdc,a=i(()=>{var e;return t.id&&(typeof(o==null?void 0:o.anchorLinks)=="boolean"&&(o==null?void 0:o.anchorLinks)===!0||typeof(o==null?void 0:o.anchorLinks)=="object"&&((e=o==null?void 0:o.anchorLinks)==null?void 0:e.h4))});return(e,k)=>(s(),n("h4",{id:t.id},[t.id&&u(a)?(s(),n("a",{key:0,href:`#${t.id}`},[r(e.$slots,"default")],8,d)):r(e.$slots,"default",{key:1})],8,l))}});export{_ as default}; diff --git a/_nuxt/axEFYTs9.js b/_nuxt/BUUEBr-A.js similarity index 91% rename from _nuxt/axEFYTs9.js rename to _nuxt/BUUEBr-A.js index 89b0cb32..2076814c 100644 --- a/_nuxt/axEFYTs9.js +++ b/_nuxt/BUUEBr-A.js @@ -1,2 +1,2 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./D3LDyA07.js","./nJJO8dFm.js","./C-v3KzvZ.js","./DFIm0aE1.js","./IShi1APO.js"])))=>i.map(i=>d[i]); -import{Q as $,I as h,R as P,U as b,V as C,M as E}from"./nJJO8dFm.js";import{h as l}from"./IShi1APO.js";import{u as m}from"./DFIm0aE1.js";const d=(t,r)=>r.split(".").reduce((n,i)=>n&&n[i],t),p=(t,r)=>Object.keys(t).filter(r).reduce((n,i)=>Object.assign(n,{[i]:t[i]}),{}),B=t=>r=>t&&t.length?p(r,n=>!t.includes(n)):r,j=t=>r=>Array.isArray(r)?r.map(n=>t(n)):t(r),w=t=>{const r=[],n=[];for(const i of t)["$","_"].includes(i)?r.push(i):n.push(i);return{prefixes:r,properties:n}},q=(t=[])=>r=>{if(t.length===0||!r)return r;const{prefixes:n,properties:i}=w(t);return p(r,o=>!i.includes(o)&&!n.includes(o[0]))},I=(t=[])=>r=>{if(t.length===0||!r)return r;const{prefixes:n,properties:i}=w(t);return p(r,o=>i.includes(o)||n.includes(o[0]))},Q=(t,r)=>{const n=new Intl.Collator(r.$locale,{numeric:r.$numeric,caseFirst:r.$caseFirst,sensitivity:r.$sensitivity}),i=Object.keys(r).filter(o=>!o.startsWith("$"));for(const o of i)t=t.sort((a,e)=>{const s=[d(a,o),d(e,o)].map(c=>{if(c!==null)return c instanceof Date?c.toISOString():c});return r[o]===-1&&s.reverse(),n.compare(s[0],s[1])});return t},F=(t,r="Expected an array")=>{if(!Array.isArray(t))throw new TypeError(r)},u=t=>Array.isArray(t)?t:[void 0,null].includes(t)?[]:[t],S=["sort","where","only","without"];function x(t,r={}){const n={};for(const e of Object.keys(r.initialParams||{}))n[e]=S.includes(e)?u(r.initialParams[e]):r.initialParams[e];const i=(e,s=c=>c)=>(...c)=>(n[e]=s(...c),a),o=e=>{var s;return r.legacy?e!=null&&e.surround?e.surround:e&&(e!=null&&e.dirConfig&&(e.result={_path:(s=e.dirConfig)==null?void 0:s._path,...e.result,_dir:e.dirConfig}),e!=null&&e._path||Array.isArray(e)||!Object.prototype.hasOwnProperty.call(e,"result")?e:e==null?void 0:e.result):e},a={params:()=>({...n,...n.where?{where:[...u(n.where)]}:{},...n.sort?{sort:[...u(n.sort)]}:{}}),only:i("only",u),without:i("without",u),where:i("where",e=>[...u(n.where),...u(e)]),sort:i("sort",e=>[...u(n.sort),...u(e)]),limit:i("limit",e=>parseInt(String(e),10)),skip:i("skip",e=>parseInt(String(e),10)),find:()=>t(a).then(o),findOne:()=>t(i("first")(!0)).then(o),count:()=>t(i("count")(!0)).then(o),locale:e=>a.where({_locale:e}),withSurround:i("surround",(e,s)=>({query:e,...s})),withDirConfig:()=>i("dirConfig")(!0)};return r.legacy&&(a.findSurround=(e,s)=>a.withSurround(e,s).find().then(o)),a}function g(t){return JSON.stringify(t,A)}function A(t,r){return r instanceof RegExp?`--REGEX ${r.toString()}`:r}const O=t=>{let r=g(t);return r=typeof Buffer<"u"?Buffer.from(r).toString("base64"):btoa(r),r=r.replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,""),(r.match(/.{1,100}/g)||[]).join("/")},y=t=>$(t,h().public.content.api.baseURL),U=()=>{throw console.warn("useContent is only accessible when you are using `documentDriven` mode."),console.warn("Learn more by visiting: https://content.nuxt.com/document-driven"),new Error("useContent is only accessible when you are using `documentDriven` mode.")},D=()=>{const{experimental:t}=h().public.content;return t.clientDB?!0:m().isEnabled()},R=()=>async t=>{const{content:r}=h().public,n=t.params(),i=r.experimental.stripQueryParameters?y(`/query/${`${l(n)}.${r.integrity}`}/${O(n)}.json`):y(`/query/${l(n)}.${r.integrity}.json`);if(D())return(await E(()=>import("./D3LDyA07.js"),__vite__mapDeps([0,1,2,3,4]),import.meta.url).then(e=>e.useContentDatabase())).fetch(t);const o=await $fetch(i,{method:"GET",responseType:"json",params:r.experimental.stripQueryParameters?void 0:{_params:g(n),previewToken:m().getPreviewToken()}});if(typeof o=="string"&&o.startsWith(""))throw new Error("Not found");return o};function G(t,...r){const{content:n}=h().public,i=x(R(),{initialParams:typeof t!="string"?t:{},legacy:!0});let o;typeof t=="string"&&(o=P(b(t,...r)));const a=i.params;return i.params=()=>{var s,c,f;const e=a();return o&&(e.where=e.where||[],e.first&&(e.where||[]).length===0?e.where.push({_path:C(o)}):e.where.push({_path:new RegExp(`^${o.replace(/[-[\]{}()*+.,^$\s/]/g,"\\$&")}`)})),(s=e.sort)!=null&&s.length||(e.sort=[{_stem:1,$numeric:!0}]),n.locales.length&&((f=(c=e.where)==null?void 0:c.find(_=>_._locale))!=null&&f._locale||(e.where=e.where||[],e.where.push({_locale:n.defaultLocale}))),e},i}export{F as a,u as b,Q as c,j as d,O as e,q as f,d as g,I as h,x as i,g as j,B as o,G as q,D as s,U as u,y as w}; +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./Dp1_NO-z.js","./BK37JMLf.js","./C-v3KzvZ.js","./DmH48LNN.js","./IShi1APO.js"])))=>i.map(i=>d[i]); +import{Q as $,I as h,R as P,U as b,V as C,M as E}from"./BK37JMLf.js";import{h as l}from"./IShi1APO.js";import{u as m}from"./DmH48LNN.js";const d=(t,r)=>r.split(".").reduce((n,i)=>n&&n[i],t),p=(t,r)=>Object.keys(t).filter(r).reduce((n,i)=>Object.assign(n,{[i]:t[i]}),{}),B=t=>r=>t&&t.length?p(r,n=>!t.includes(n)):r,j=t=>r=>Array.isArray(r)?r.map(n=>t(n)):t(r),w=t=>{const r=[],n=[];for(const i of t)["$","_"].includes(i)?r.push(i):n.push(i);return{prefixes:r,properties:n}},q=(t=[])=>r=>{if(t.length===0||!r)return r;const{prefixes:n,properties:i}=w(t);return p(r,o=>!i.includes(o)&&!n.includes(o[0]))},I=(t=[])=>r=>{if(t.length===0||!r)return r;const{prefixes:n,properties:i}=w(t);return p(r,o=>i.includes(o)||n.includes(o[0]))},Q=(t,r)=>{const n=new Intl.Collator(r.$locale,{numeric:r.$numeric,caseFirst:r.$caseFirst,sensitivity:r.$sensitivity}),i=Object.keys(r).filter(o=>!o.startsWith("$"));for(const o of i)t=t.sort((a,e)=>{const s=[d(a,o),d(e,o)].map(c=>{if(c!==null)return c instanceof Date?c.toISOString():c});return r[o]===-1&&s.reverse(),n.compare(s[0],s[1])});return t},F=(t,r="Expected an array")=>{if(!Array.isArray(t))throw new TypeError(r)},u=t=>Array.isArray(t)?t:[void 0,null].includes(t)?[]:[t],S=["sort","where","only","without"];function x(t,r={}){const n={};for(const e of Object.keys(r.initialParams||{}))n[e]=S.includes(e)?u(r.initialParams[e]):r.initialParams[e];const i=(e,s=c=>c)=>(...c)=>(n[e]=s(...c),a),o=e=>{var s;return r.legacy?e!=null&&e.surround?e.surround:e&&(e!=null&&e.dirConfig&&(e.result={_path:(s=e.dirConfig)==null?void 0:s._path,...e.result,_dir:e.dirConfig}),e!=null&&e._path||Array.isArray(e)||!Object.prototype.hasOwnProperty.call(e,"result")?e:e==null?void 0:e.result):e},a={params:()=>({...n,...n.where?{where:[...u(n.where)]}:{},...n.sort?{sort:[...u(n.sort)]}:{}}),only:i("only",u),without:i("without",u),where:i("where",e=>[...u(n.where),...u(e)]),sort:i("sort",e=>[...u(n.sort),...u(e)]),limit:i("limit",e=>parseInt(String(e),10)),skip:i("skip",e=>parseInt(String(e),10)),find:()=>t(a).then(o),findOne:()=>t(i("first")(!0)).then(o),count:()=>t(i("count")(!0)).then(o),locale:e=>a.where({_locale:e}),withSurround:i("surround",(e,s)=>({query:e,...s})),withDirConfig:()=>i("dirConfig")(!0)};return r.legacy&&(a.findSurround=(e,s)=>a.withSurround(e,s).find().then(o)),a}function g(t){return JSON.stringify(t,A)}function A(t,r){return r instanceof RegExp?`--REGEX ${r.toString()}`:r}const O=t=>{let r=g(t);return r=typeof Buffer<"u"?Buffer.from(r).toString("base64"):btoa(r),r=r.replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,""),(r.match(/.{1,100}/g)||[]).join("/")},y=t=>$(t,h().public.content.api.baseURL),U=()=>{throw console.warn("useContent is only accessible when you are using `documentDriven` mode."),console.warn("Learn more by visiting: https://content.nuxt.com/document-driven"),new Error("useContent is only accessible when you are using `documentDriven` mode.")},D=()=>{const{experimental:t}=h().public.content;return t.clientDB?!0:m().isEnabled()},R=()=>async t=>{const{content:r}=h().public,n=t.params(),i=r.experimental.stripQueryParameters?y(`/query/${`${l(n)}.${r.integrity}`}/${O(n)}.json`):y(`/query/${l(n)}.${r.integrity}.json`);if(D())return(await E(()=>import("./Dp1_NO-z.js"),__vite__mapDeps([0,1,2,3,4]),import.meta.url).then(e=>e.useContentDatabase())).fetch(t);const o=await $fetch(i,{method:"GET",responseType:"json",params:r.experimental.stripQueryParameters?void 0:{_params:g(n),previewToken:m().getPreviewToken()}});if(typeof o=="string"&&o.startsWith(""))throw new Error("Not found");return o};function G(t,...r){const{content:n}=h().public,i=x(R(),{initialParams:typeof t!="string"?t:{},legacy:!0});let o;typeof t=="string"&&(o=P(b(t,...r)));const a=i.params;return i.params=()=>{var s,c,f;const e=a();return o&&(e.where=e.where||[],e.first&&(e.where||[]).length===0?e.where.push({_path:C(o)}):e.where.push({_path:new RegExp(`^${o.replace(/[-[\]{}()*+.,^$\s/]/g,"\\$&")}`)})),(s=e.sort)!=null&&s.length||(e.sort=[{_stem:1,$numeric:!0}]),n.locales.length&&((f=(c=e.where)==null?void 0:c.find(_=>_._locale))!=null&&f._locale||(e.where=e.where||[],e.where.push({_locale:n.defaultLocale}))),e},i}export{F as a,u as b,Q as c,j as d,O as e,q as f,d as g,I as h,x as i,g as j,B as o,G as q,D as s,U as u,y as w}; diff --git a/_nuxt/S6IGJMqS.js b/_nuxt/BhE0-UjD.js similarity index 53% rename from _nuxt/S6IGJMqS.js rename to _nuxt/BhE0-UjD.js index 4842b74f..077a45be 100644 --- a/_nuxt/S6IGJMqS.js +++ b/_nuxt/BhE0-UjD.js @@ -1 +1 @@ -import{m as e,o as r,c}from"./nJJO8dFm.js";const o={};function t(n,s){return r(),c("hr")}const _=e(o,[["render",t]]);export{_ as default}; +import{m as e,o as r,c}from"./BK37JMLf.js";const o={};function t(n,s){return r(),c("hr")}const _=e(o,[["render",t]]);export{_ as default}; diff --git a/_nuxt/ClXDwuF5.js b/_nuxt/BicH1kzm.js similarity index 97% rename from _nuxt/ClXDwuF5.js rename to _nuxt/BicH1kzm.js index 8a7aadaa..d08004d8 100644 --- a/_nuxt/ClXDwuF5.js +++ b/_nuxt/BicH1kzm.js @@ -1 +1 @@ -import{m as s,c as h,p as c,o as l}from"./nJJO8dFm.js";const a=["#FFBA08","#FAA307","#F48C06","#E85D04","#DC2F02","#D00000","#9D0208","#6A040F","#370617","#03071E"];class o{constructor(){this.parent=void 0,this.children=[],this.orientation="h",this.x=0,this.y=0,this.w=500,this.h=500}add(i){i.parent=this,this.children.push(i),this.children.forEach((n,r)=>{if(this.orientation==="h"){const e=this.w/this.children.length,t=this.x+e*r;n.x=t,n.y=this.y,n.w=e,n.h=this.h}else if(this.orientation==="v"){const e=this.h/this.children.length,t=this.y+e*r;n.x=this.x,n.y=t,n.w=this.w,n.h=e}})}render(i){i.rect(this.x,this.y,this.w,this.h),this.children.forEach((n,r)=>{i.fill(a[r%9]),n.render(i)})}traverseForPoint(i,n){if(this.children.length===0)return this;for(let r=0;r=e.x&&i<=e.x+e.w&&n>=e.y&&n<=e.y+e.h)return e.children.length===0?e:e.traverseForPoint(i,n)}}}const f={data(){return{}},mounted(){const d=i=>{const e=new o;for(let t=0;t<5;t++)e.add(new o);e.children[0].orientation="v";for(let t=0;t<3;t++)e.children[0].add(new o);e.children[0].children[2].orientation="v";for(let t=0;t<4;t++)e.children[0].children[2].add(new o);e.children[1].orientation="v";for(let t=0;t<3;t++)e.children[1].add(new o);for(let t=0;t<9;t++)e.children[1].children[0].add(new o);e.children[3].orientation="v";for(let t=0;t<3;t++)e.children[3].add(new o);e.children[3].children[2].orientation="v";for(let t=0;t<9;t++)e.children[3].children[2].add(new o);i.setup=()=>{i.createCanvas(500,500),i.noLoop(),i.stroke(255),i.strokeWeight(2),e.render(i)},i.mouseClicked=()=>{const t=e.traverseForPoint(i.mouseX,i.mouseY);t&&(t.add(new o),t.add(new o),t.render(i))}};new this.$p5(d,"canvas")}},v={class:"select-none bg-gradient-to-b from-green-800 to-gray-800"};function w(d,i,n,r,e,t){return l(),h("div",v,i[0]||(i[0]=[c('
            m-ary tree based tiling
            ',1)]))}const m=s(f,[["render",w]]);export{m as default}; +import{m as s,c as h,p as c,o as l}from"./BK37JMLf.js";const a=["#FFBA08","#FAA307","#F48C06","#E85D04","#DC2F02","#D00000","#9D0208","#6A040F","#370617","#03071E"];class o{constructor(){this.parent=void 0,this.children=[],this.orientation="h",this.x=0,this.y=0,this.w=500,this.h=500}add(i){i.parent=this,this.children.push(i),this.children.forEach((n,r)=>{if(this.orientation==="h"){const e=this.w/this.children.length,t=this.x+e*r;n.x=t,n.y=this.y,n.w=e,n.h=this.h}else if(this.orientation==="v"){const e=this.h/this.children.length,t=this.y+e*r;n.x=this.x,n.y=t,n.w=this.w,n.h=e}})}render(i){i.rect(this.x,this.y,this.w,this.h),this.children.forEach((n,r)=>{i.fill(a[r%9]),n.render(i)})}traverseForPoint(i,n){if(this.children.length===0)return this;for(let r=0;r=e.x&&i<=e.x+e.w&&n>=e.y&&n<=e.y+e.h)return e.children.length===0?e:e.traverseForPoint(i,n)}}}const f={data(){return{}},mounted(){const d=i=>{const e=new o;for(let t=0;t<5;t++)e.add(new o);e.children[0].orientation="v";for(let t=0;t<3;t++)e.children[0].add(new o);e.children[0].children[2].orientation="v";for(let t=0;t<4;t++)e.children[0].children[2].add(new o);e.children[1].orientation="v";for(let t=0;t<3;t++)e.children[1].add(new o);for(let t=0;t<9;t++)e.children[1].children[0].add(new o);e.children[3].orientation="v";for(let t=0;t<3;t++)e.children[3].add(new o);e.children[3].children[2].orientation="v";for(let t=0;t<9;t++)e.children[3].children[2].add(new o);i.setup=()=>{i.createCanvas(500,500),i.noLoop(),i.stroke(255),i.strokeWeight(2),e.render(i)},i.mouseClicked=()=>{const t=e.traverseForPoint(i.mouseX,i.mouseY);t&&(t.add(new o),t.add(new o),t.render(i))}};new this.$p5(d,"canvas")}},v={class:"select-none bg-gradient-to-b from-green-800 to-gray-800"};function w(d,i,n,r,e,t){return l(),h("div",v,i[0]||(i[0]=[c('
            m-ary tree based tiling
            ',1)]))}const m=s(f,[["render",w]]);export{m as default}; diff --git a/_nuxt/CTor07BM.js b/_nuxt/BjS-v8yJ.js similarity index 81% rename from _nuxt/CTor07BM.js rename to _nuxt/BjS-v8yJ.js index e0ac8288..6b1d3bbe 100644 --- a/_nuxt/CTor07BM.js +++ b/_nuxt/BjS-v8yJ.js @@ -1 +1 @@ -import{d as o,o as n,e as s,f,a9 as p,_}from"./nJJO8dFm.js";const d=o({__name:"ProseA",props:{href:{type:String,default:""},target:{type:String,default:void 0,required:!1}},setup(t){const e=t;return(r,c)=>{const a=_;return n(),s(a,{href:e.href,target:e.target},{default:f(()=>[p(r.$slots,"default")]),_:3},8,["href","target"])}}});export{d as default}; +import{d as o,o as n,e as s,f,a9 as p,_}from"./BK37JMLf.js";const d=o({__name:"ProseA",props:{href:{type:String,default:""},target:{type:String,default:void 0,required:!1}},setup(t){const e=t;return(r,c)=>{const a=_;return n(),s(a,{href:e.href,target:e.target},{default:f(()=>[p(r.$slots,"default")]),_:3},8,["href","target"])}}});export{d as default}; diff --git a/_nuxt/Bj1tkoTK.js b/_nuxt/BtbynY4z.js similarity index 65% rename from _nuxt/Bj1tkoTK.js rename to _nuxt/BtbynY4z.js index 68b0bd0a..b721641b 100644 --- a/_nuxt/Bj1tkoTK.js +++ b/_nuxt/BtbynY4z.js @@ -1 +1 @@ -import{m as o,o as r,c as t,a9 as a}from"./nJJO8dFm.js";const s={};function c(e,n){return r(),t("table",null,[a(e.$slots,"default")])}const f=o(s,[["render",c]]);export{f as default}; +import{m as o,o as r,c as t,a9 as a}from"./BK37JMLf.js";const s={};function c(e,n){return r(),t("table",null,[a(e.$slots,"default")])}const f=o(s,[["render",c]]);export{f as default}; diff --git a/_nuxt/TehJYBZc.js b/_nuxt/Bv4zO08n.js similarity index 92% rename from _nuxt/TehJYBZc.js rename to _nuxt/Bv4zO08n.js index 99a00d01..97d1f4a0 100644 --- a/_nuxt/TehJYBZc.js +++ b/_nuxt/Bv4zO08n.js @@ -1 +1 @@ -import{f as i}from"./CxYJgpPD.js";import{d as u,J as f,k as c,L as a,a0 as d}from"./nJJO8dFm.js";const p=u({name:"MDCSlot",functional:!0,props:{name:{type:String,default:"default"},unwrap:{type:[Boolean,String],default:!1},use:{type:Function,default:void 0}},setup(t){const{parent:s}=d(),{default:n}=f(),r=c(()=>typeof t.unwrap=="string"?t.unwrap.split(" "):["*"]);return{fallbackSlot:n,tags:r,parent:s}},render({use:t,unwrap:s,fallbackSlot:n,tags:r,parent:e}){var l;try{let o=t;return typeof t=="string"&&(o=(e==null?void 0:e.slots[t])||((l=e==null?void 0:e.parent)==null?void 0:l.slots[t]),console.warn(`Please set :use="$slots.${t}" in component to enable reactivity`)),o?s?i(o(),r):[o()]:n?n():a("div")}catch{return a("div")}}}),g=u({props:{use:{type:Function,default:void 0},unwrap:{type:[Boolean,String],default:!1}},render(t){return a(p,t)}});export{g as default}; +import{f as i}from"./CxYJgpPD.js";import{d as u,J as f,k as c,L as a,a0 as d}from"./BK37JMLf.js";const p=u({name:"MDCSlot",functional:!0,props:{name:{type:String,default:"default"},unwrap:{type:[Boolean,String],default:!1},use:{type:Function,default:void 0}},setup(t){const{parent:s}=d(),{default:n}=f(),r=c(()=>typeof t.unwrap=="string"?t.unwrap.split(" "):["*"]);return{fallbackSlot:n,tags:r,parent:s}},render({use:t,unwrap:s,fallbackSlot:n,tags:r,parent:e}){var l;try{let o=t;return typeof t=="string"&&(o=(e==null?void 0:e.slots[t])||((l=e==null?void 0:e.parent)==null?void 0:l.slots[t]),console.warn(`Please set :use="$slots.${t}" in component to enable reactivity`)),o?s?i(o(),r):[o()]:n?n():a("div")}catch{return a("div")}}}),g=u({props:{use:{type:Function,default:void 0},unwrap:{type:[Boolean,String],default:!1}},render(t){return a(p,t)}});export{g as default}; diff --git a/_nuxt/BvrzO_PE.js b/_nuxt/BvrzO_PE.js new file mode 100644 index 00000000..8b95e100 --- /dev/null +++ b/_nuxt/BvrzO_PE.js @@ -0,0 +1 @@ +import{d as f,o as n,c as a,b as t,h as g,g as o,i as r,f as m,F as x,r as b,t as _,_ as v,w,a as y}from"./BK37JMLf.js";import{_ as k,a as $}from"./Dm2eZEft.js";import{q as B}from"./BUUEBr-A.js";import"./IShi1APO.js";import"./DmH48LNN.js";const C={class:"container mx-auto pb-8"},D={class:"flex flex-wrap rounded-lg bg-white/20 p-4"},P={class:"w-full"},S={class:"lg:text-normal space-y-4 text-justify text-white sm:text-base"},A=f({__name:"AboutMe",setup(d){return(s,e)=>(n(),a("section",C,[t("div",D,[t("div",P,[t("div",S,[g("",!0),e[1]||(e[1]=t("div",null,[o(" I help educate data engineers while building the future of data orchestration at "),t("a",{class:"border-b-2 border-orange-500",target:"_blank",rel:"noopener noreferrer",href:"https://dagster.io/"},"Dagster"),o(". ")],-1)),e[2]||(e[2]=t("div",null,[o(" Previously, I worked at "),t("a",{class:"border-b-2 border-orange-500",target:"_blank",rel:"noopener noreferrer",href:"https://www.gemini.com/"},"Gemini"),o(" building the data platform that provided company-wide insights into the exchange and business. At Georgetown University's "),t("a",{class:"border-b-2 border-orange-500",target:"_blank",rel:"noopener noreferrer",href:"https://mccourt.georgetown.edu/research/the-massive-data-institute/"},"Massive Data Institute"),o(" building data warehousing, processing solutions, and portals to aid social scientists and researchers to leverage large-scale organic data. And previously I provided consulting for financial institutions and government agencies in the D.C. area around data practices, and identity and access management. ")],-1))])])])]))}}),I={class:"bg-gradient-to-b from-background to-transparent"},N={class:"container mx-auto space-y-4"},L={class:"mb-4 grid grid-cols-1 gap-4 md:grid-cols-2"},M={class:"h-full space-y-4 rounded-lg bg-white/20 p-4 text-white drop-shadow-lg hover:ring-1 hover:ring-white"},V={class:"flex-1 text-lg font-bold md:text-xl"},j={key:0,class:"text-sm font-light text-gray-400"},q={class:"line-clamp-3 text-sm text-gray-300"},F={__name:"BlogPosts",props:{articles:Object,show_dates:!1},setup(d){return(s,e)=>{const l=v,u=k;return n(),a("section",I,[t("div",N,[r(l,{to:"/articles",class:"font-milk text-2xl text-white underline decoration-orange-500 decoration-2"},{default:m(()=>e[0]||(e[0]=[o(" Blog Posts ")])),_:1}),t("div",L,[(n(!0),a(x,null,b(d.articles,(i,c)=>(n(),a("div",{key:c},[r(l,{to:i._path,external:""},{default:m(()=>[t("div",M,[t("div",null,[t("div",V,_(i.title),1),d.show_dates?(n(),a("div",j,_(new Date(i.date).toLocaleDateString("en-US",{month:"long",day:"numeric",year:"numeric"})),1)):g("",!0)]),t("div",q,_(i.description),1)])]),_:2},1032,["to"])]))),128))]),t("div",null,[r(u,{to:"/articles"})])])])}}},G={class:"bg-emerald-950 bg-[url('/images/noise.svg')]"},H={__name:"index",async setup(d){let s,e;const l=([s,e]=w(()=>B().only(["_id","_path","title","description","date","img","author","tags"]).sort({date:-1}).limit(4).find()),s=await s,e(),s);return(u,i)=>{const c=A,p=F,h=$;return n(),a("div",null,[r(c),t("div",G,[g("",!0),r(p,{articles:y(l),show_dates:!0},null,8,["articles"]),r(h,{limit:9,showImages:"",linkToPlayground:""})])])}}};export{H as default}; diff --git a/_nuxt/B34PTUJ1.js b/_nuxt/BzA2FW_d.js similarity index 99% rename from _nuxt/B34PTUJ1.js rename to _nuxt/BzA2FW_d.js index 15b1cffa..e925c015 100644 --- a/_nuxt/B34PTUJ1.js +++ b/_nuxt/BzA2FW_d.js @@ -1 +1 @@ -import{m as w,o as c,c as f,p as y,j as n,q as v,a as s,l as p,i as u,h as x,b as t,t as i,F as _}from"./nJJO8dFm.js";const V={},k={version:"1.1",id:"Layer_1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 1160 1160","enable-background":"new 0 0 1160 1160","xml:space":"preserve"};function H(o,e){return c(),f("svg",k,e[0]||(e[0]=[y('',2)]))}const M=w(V,[["render",H]]),S=window.setInterval,C={class:"bg-slate-800"},P={class:"flex h-screen items-center justify-center"},z={class:"mb-4 space-y-2 text-sm"},B={class:"flex items-center"},j={class:"flex-none pl-2"},F={class:"flex items-center"},N={class:"flex-none pl-2"},W="TL;DR",$={__name:"card",setup(o){const e=n(!1),l=n(0),a=n(0),h=(g,r)=>g[r%g.length];v(()=>{S(function(){l.value>a.value?a.value+=1:l.value+=1},1500)});const m=["Skydiving","Bungee jumping","Rock climbing","White water rafting","Paragliding","Scuba diving","Base jumping","Mountain biking","Surfing","Snowboarding","Wakeboarding","Motorsports","Parkour","Zip-lining","Off-roading","Cave diving","Kiteboarding","Hang gliding","Free solo climbing","Bull riding","Ice climbing","Wing suit flying","Extreme skiing","Cliff jumping","Cave exploring"],d=["Astronaut","Archaeologist","Professional athlete","Chef","Fashion designer","Film director","Investigative journalist","Marine biologist","Musician","Photographer","Pilot","Professional gamer","Professor","Sculptor","Spy","Stand-up comedian","Surfing instructor","Travel writer","Wildlife photographer","Wine connoisseur","Yacht captain","Yoga instructor","Zookeeper","Adventure tour guide","Art curator"];return(g,r)=>{const b=M;return c(),f(_,null,[s(e)?(c(),f("div",{key:0,class:p(["absolute bottom-2 right-2 h-24 w-24",g.dynamic_bg])},[u(b)],2)):x("",!0),t("main",C,[t("div",P,[t("div",{id:"_card",onClick:r[0]||(r[0]=A=>e.value=!s(e)),class:"md:w-512px w-[350px] border border-white bg-black p-4 font-mono uppercase text-white shadow-xl shadow-yellow-950 transition-all hover:scale-102 hover:cursor-pointer"},[t("div",{class:"mb-2 font-extrabold tracking-wide"},i(W)),t("div",z,[r[5]||(r[5]=t("div",{class:"flex items-center"},[t("div",{class:"flex-none pr-2"},"Name"),t("div",{class:"flex-grow border-b border-dotted"}),t("div",{class:"flex-none pl-2"},"Colton")],-1)),t("div",B,[r[1]||(r[1]=t("div",{class:"flex-none pr-2"},"Profession",-1)),r[2]||(r[2]=t("div",{class:"flex-grow border-b border-dotted"},null,-1)),t("div",j,i(h(d,s(l))),1)]),t("div",F,[r[3]||(r[3]=t("div",{class:"flex-none pr-2"},"Hobby",-1)),r[4]||(r[4]=t("div",{class:"flex-grow border-b border-dotted"},null,-1)),t("div",N,i(h(m,s(a))),1)])])])])])],64)}}};export{$ as default}; +import{m as w,o as c,c as f,p as y,j as n,q as v,a as s,l as p,i as u,h as x,b as t,t as i,F as _}from"./BK37JMLf.js";const V={},k={version:"1.1",id:"Layer_1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 1160 1160","enable-background":"new 0 0 1160 1160","xml:space":"preserve"};function H(o,e){return c(),f("svg",k,e[0]||(e[0]=[y('',2)]))}const M=w(V,[["render",H]]),S=window.setInterval,C={class:"bg-slate-800"},P={class:"flex h-screen items-center justify-center"},z={class:"mb-4 space-y-2 text-sm"},B={class:"flex items-center"},j={class:"flex-none pl-2"},F={class:"flex items-center"},N={class:"flex-none pl-2"},W="TL;DR",$={__name:"card",setup(o){const e=n(!1),l=n(0),a=n(0),h=(g,r)=>g[r%g.length];v(()=>{S(function(){l.value>a.value?a.value+=1:l.value+=1},1500)});const m=["Skydiving","Bungee jumping","Rock climbing","White water rafting","Paragliding","Scuba diving","Base jumping","Mountain biking","Surfing","Snowboarding","Wakeboarding","Motorsports","Parkour","Zip-lining","Off-roading","Cave diving","Kiteboarding","Hang gliding","Free solo climbing","Bull riding","Ice climbing","Wing suit flying","Extreme skiing","Cliff jumping","Cave exploring"],d=["Astronaut","Archaeologist","Professional athlete","Chef","Fashion designer","Film director","Investigative journalist","Marine biologist","Musician","Photographer","Pilot","Professional gamer","Professor","Sculptor","Spy","Stand-up comedian","Surfing instructor","Travel writer","Wildlife photographer","Wine connoisseur","Yacht captain","Yoga instructor","Zookeeper","Adventure tour guide","Art curator"];return(g,r)=>{const b=M;return c(),f(_,null,[s(e)?(c(),f("div",{key:0,class:p(["absolute bottom-2 right-2 h-24 w-24",g.dynamic_bg])},[u(b)],2)):x("",!0),t("main",C,[t("div",P,[t("div",{id:"_card",onClick:r[0]||(r[0]=A=>e.value=!s(e)),class:"md:w-512px w-[350px] border border-white bg-black p-4 font-mono uppercase text-white shadow-xl shadow-yellow-950 transition-all hover:scale-102 hover:cursor-pointer"},[t("div",{class:"mb-2 font-extrabold tracking-wide"},i(W)),t("div",z,[r[5]||(r[5]=t("div",{class:"flex items-center"},[t("div",{class:"flex-none pr-2"},"Name"),t("div",{class:"flex-grow border-b border-dotted"}),t("div",{class:"flex-none pl-2"},"Colton")],-1)),t("div",B,[r[1]||(r[1]=t("div",{class:"flex-none pr-2"},"Profession",-1)),r[2]||(r[2]=t("div",{class:"flex-grow border-b border-dotted"},null,-1)),t("div",j,i(h(d,s(l))),1)]),t("div",F,[r[3]||(r[3]=t("div",{class:"flex-none pr-2"},"Hobby",-1)),r[4]||(r[4]=t("div",{class:"flex-grow border-b border-dotted"},null,-1)),t("div",N,i(h(m,s(a))),1)])])])])])],64)}}};export{$ as default}; diff --git a/_nuxt/COAihTe6.js b/_nuxt/C4nPnnlt.js similarity index 97% rename from _nuxt/COAihTe6.js rename to _nuxt/C4nPnnlt.js index ac8430f4..7ec490b7 100644 --- a/_nuxt/COAihTe6.js +++ b/_nuxt/C4nPnnlt.js @@ -1 +1 @@ -import{k as C,z as g,A as N,B as z,d as B,j as O,w as U,v as V,o as n,c as l,b as o,a,F as w,C as I,D as M,E as K,r as k,g as q,t as x,h as S}from"./nJJO8dFm.js";import{h as W}from"./IShi1APO.js";import{u as G}from"./BBOrgyAk.js";function H(v,i,p){const[e={},c]=typeof i=="string"?[{},i]:[i,p],s=C(()=>g(v)),t=e.key||W([c,typeof s.value=="string"?s.value:"",...P(e)]);if(!t||typeof t!="string")throw new TypeError("[nuxt] [useFetch] key must be a string: "+t);const h=t===c?"$f"+t:t;if(!e.baseURL&&typeof s.value=="string"&&s.value[0]==="/"&&s.value[1]==="/")throw new Error('[nuxt] [useFetch] the request URL must not start with "//".');const{server:y,lazy:b,default:D,transform:j,pick:E,watch:d,immediate:r,getCachedData:u,deep:m,dedupe:F,...A}=e,_=N({...z,...A,cache:typeof e.cache=="boolean"?void 0:e.cache}),T={server:y,lazy:b,default:D,transform:j,pick:E,immediate:r,getCachedData:u,deep:m,dedupe:F,watch:d===!1?[]:[_,s,...d||[]]};let f;return G(h,()=>{var $;($=f==null?void 0:f.abort)==null||$.call(f,new DOMException("Request aborted as another request to the same endpoint was initiated.","AbortError")),f=typeof AbortController<"u"?new AbortController:{};const R=g(e.timeout);let L;return R&&(L=setTimeout(()=>f.abort(new DOMException("Request aborted due to timeout.","AbortError")),R),f.signal.onabort=()=>clearTimeout(L)),(e.$fetch||globalThis.$fetch)(s.value,{signal:f.signal,..._}).finally(()=>{clearTimeout(L)})},T)}function P(v){var p;const i=[((p=g(v.method))==null?void 0:p.toUpperCase())||"GET",g(v.baseURL)];for(const e of[v.params||v.query]){const c=g(e);if(!c)continue;const s={};for(const[t,h]of Object.entries(c))s[g(t)]=g(h);i.push(s)}return i}const Q={class:"flex h-screen flex-col font-mono"},J={class:"flex flex-1 overflow-hidden"},X={class:"flex flex-1 flex-col overflow-y-auto bg-amber-100 p-8"},Y={class:"inline-flex flex-col justify-center py-4 text-gray-600"},Z={key:0,class:"mt-2 w-full border border-gray-100 bg-white"},ee=["onClick"],te={class:"flex p-4"},oe={class:"text-cyan-600 flex-1 text-center text-3xl font-bold"},se={class:"text-amber-500"},re={class:"grid grid-cols-1 gap-8 md:grid-cols-3 xl:grid-cols-4 xl:gap-12"},ae={class:"border-cyan-600 h-full space-y-3 rounded-md border-2 bg-white p-4 shadow shadow-amber-500"},ne={class:"text-2xl font-semibold capitalize text-gray-700"},le={class:"text-gray-500"},ie={key:1,class:"italic"},ve=B({__name:"index",async setup(v){let i,p;const e=O(0),c=O(""),s=O([]),{data:t}=([i,p]=U(()=>H("/1000_french_conjugations.json",{transform:d=>d},"$lRKQKt9Al2")),i=await i,p(),i),h=C(()=>{if(t.value)return t.value[e.value]}),y=C(()=>{if(t.value!==null)return e.value===0?void 0:t.value[e.value-1]}),b=C(()=>{if(t.value!==null)return e.value+1===t.value.length?void 0:t.value[e.value+1]});V(c,d=>{if(s.value=[],!d)return;let r=0;s.value=t.value.filter(u=>u.word.normalize("NFD").replace(new RegExp("\\p{Diacritic}","gu"),"").includes(d)&&r<=5?(r++,!0):!1)});const D=()=>{t.value&&e.value{e.value>0&&(e.value-=1)},E=d=>{c.value="",s.value=[],e.value=d.word_popularity-1};return(d,r)=>(n(),l("div",Q,[o("div",J,[r[3]||(r[3]=o("div",{class:"flex w-20 bg-amber-500"},[o("div",{class:"absolute bottom-10 w-20 -rotate-90 transform whitespace-nowrap"},[o("div",{class:"text-4xl font-bold text-white"}," 1000 French Conjugations ")])],-1)),o("div",X,[a(t)&&a(t).length>0&&a(h)?(n(),l(w,{key:0},[r[2]||(r[2]=o("div",{class:"flex rounded-xl bg-amber-500 p-4"},[o("div",{class:"text-center text-xl italic text-white"}," Click a word to the left or right to cycle through the 1000 most popular French verb conjugations! ")],-1)),o("div",Y,[I(o("input",{"onUpdate:modelValue":r[0]||(r[0]=u=>K(c)?c.value=u:null),class:"rounded-xl border border-2 border-gray-400 p-2 pl-8 focus:border-amber-500 focus:outline-none",type:"search",autocomplete:"off",placeholder:"Search Words"},null,512),[[M,a(c)]]),a(s).length>0?(n(),l("ul",Z,[(n(!0),l(w,null,k(a(s),u=>(n(),l("li",{key:u.word,class:"relative cursor-pointer py-1 pl-8 pr-2 hover:bg-yellow-50 hover:text-gray-900",onClick:m=>E(u)},[r[1]||(r[1]=o("svg",{class:"absolute left-2 top-2 h-4 w-4",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"},[o("path",{d:"M12.293 5.293a1 1 0 011.414 0l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414-1.414L14.586 11H3a1 1 0 110-2h11.586l-2.293-2.293a1 1 0 010-1.414z"})],-1)),q(" "+x(u.word),1)],8,ee))),128))])):S("",!0)]),o("div",te,[o("div",{class:"flex-1 cursor-pointer select-none text-center text-2xl text-gray-400",onClick:j},x(a(y)?a(y).word:"-"),1),o("div",oe,[o("span",se," #"+x(a(h).word_popularity),1),q(" "+x(a(h).word),1)]),o("div",{class:"flex-1 cursor-pointer select-none text-center text-2xl text-gray-400",onClick:D},x(a(b)?a(b).word:"-"),1)]),o("div",re,[(n(!0),l(w,null,k(a(h).conjugations,(u,m)=>(n(),l("div",{key:m},[o("div",ae,[o("h1",ne,x(m),1),o("div",le,[(n(!0),l(w,null,k(u,(F,A)=>(n(),l("p",{key:A},[(n(!0),l(w,null,k(F,(_,T)=>(n(),l("i",{key:T},x(_.text),1))),128))]))),128))])])]))),128))])],64)):(n(),l("div",ie,"Loading..."))])])]))}});export{ve as default}; +import{k as C,z as g,A as N,B as z,d as B,j as O,w as U,v as V,o as n,c as l,b as o,a,F as w,C as I,D as M,E as K,r as k,g as q,t as x,h as S}from"./BK37JMLf.js";import{h as W}from"./IShi1APO.js";import{u as G}from"./Dl5rqmmJ.js";function H(v,i,p){const[e={},c]=typeof i=="string"?[{},i]:[i,p],s=C(()=>g(v)),t=e.key||W([c,typeof s.value=="string"?s.value:"",...P(e)]);if(!t||typeof t!="string")throw new TypeError("[nuxt] [useFetch] key must be a string: "+t);const h=t===c?"$f"+t:t;if(!e.baseURL&&typeof s.value=="string"&&s.value[0]==="/"&&s.value[1]==="/")throw new Error('[nuxt] [useFetch] the request URL must not start with "//".');const{server:y,lazy:b,default:D,transform:j,pick:E,watch:d,immediate:r,getCachedData:u,deep:m,dedupe:F,...A}=e,_=N({...z,...A,cache:typeof e.cache=="boolean"?void 0:e.cache}),T={server:y,lazy:b,default:D,transform:j,pick:E,immediate:r,getCachedData:u,deep:m,dedupe:F,watch:d===!1?[]:[_,s,...d||[]]};let f;return G(h,()=>{var $;($=f==null?void 0:f.abort)==null||$.call(f,new DOMException("Request aborted as another request to the same endpoint was initiated.","AbortError")),f=typeof AbortController<"u"?new AbortController:{};const R=g(e.timeout);let L;return R&&(L=setTimeout(()=>f.abort(new DOMException("Request aborted due to timeout.","AbortError")),R),f.signal.onabort=()=>clearTimeout(L)),(e.$fetch||globalThis.$fetch)(s.value,{signal:f.signal,..._}).finally(()=>{clearTimeout(L)})},T)}function P(v){var p;const i=[((p=g(v.method))==null?void 0:p.toUpperCase())||"GET",g(v.baseURL)];for(const e of[v.params||v.query]){const c=g(e);if(!c)continue;const s={};for(const[t,h]of Object.entries(c))s[g(t)]=g(h);i.push(s)}return i}const Q={class:"flex h-screen flex-col font-mono"},J={class:"flex flex-1 overflow-hidden"},X={class:"flex flex-1 flex-col overflow-y-auto bg-amber-100 p-8"},Y={class:"inline-flex flex-col justify-center py-4 text-gray-600"},Z={key:0,class:"mt-2 w-full border border-gray-100 bg-white"},ee=["onClick"],te={class:"flex p-4"},oe={class:"text-cyan-600 flex-1 text-center text-3xl font-bold"},se={class:"text-amber-500"},re={class:"grid grid-cols-1 gap-8 md:grid-cols-3 xl:grid-cols-4 xl:gap-12"},ae={class:"border-cyan-600 h-full space-y-3 rounded-md border-2 bg-white p-4 shadow shadow-amber-500"},ne={class:"text-2xl font-semibold capitalize text-gray-700"},le={class:"text-gray-500"},ie={key:1,class:"italic"},ve=B({__name:"index",async setup(v){let i,p;const e=O(0),c=O(""),s=O([]),{data:t}=([i,p]=U(()=>H("/1000_french_conjugations.json",{transform:d=>d},"$lRKQKt9Al2")),i=await i,p(),i),h=C(()=>{if(t.value)return t.value[e.value]}),y=C(()=>{if(t.value!==null)return e.value===0?void 0:t.value[e.value-1]}),b=C(()=>{if(t.value!==null)return e.value+1===t.value.length?void 0:t.value[e.value+1]});V(c,d=>{if(s.value=[],!d)return;let r=0;s.value=t.value.filter(u=>u.word.normalize("NFD").replace(new RegExp("\\p{Diacritic}","gu"),"").includes(d)&&r<=5?(r++,!0):!1)});const D=()=>{t.value&&e.value{e.value>0&&(e.value-=1)},E=d=>{c.value="",s.value=[],e.value=d.word_popularity-1};return(d,r)=>(n(),l("div",Q,[o("div",J,[r[3]||(r[3]=o("div",{class:"flex w-20 bg-amber-500"},[o("div",{class:"absolute bottom-10 w-20 -rotate-90 transform whitespace-nowrap"},[o("div",{class:"text-4xl font-bold text-white"}," 1000 French Conjugations ")])],-1)),o("div",X,[a(t)&&a(t).length>0&&a(h)?(n(),l(w,{key:0},[r[2]||(r[2]=o("div",{class:"flex rounded-xl bg-amber-500 p-4"},[o("div",{class:"text-center text-xl italic text-white"}," Click a word to the left or right to cycle through the 1000 most popular French verb conjugations! ")],-1)),o("div",Y,[I(o("input",{"onUpdate:modelValue":r[0]||(r[0]=u=>K(c)?c.value=u:null),class:"rounded-xl border border-2 border-gray-400 p-2 pl-8 focus:border-amber-500 focus:outline-none",type:"search",autocomplete:"off",placeholder:"Search Words"},null,512),[[M,a(c)]]),a(s).length>0?(n(),l("ul",Z,[(n(!0),l(w,null,k(a(s),u=>(n(),l("li",{key:u.word,class:"relative cursor-pointer py-1 pl-8 pr-2 hover:bg-yellow-50 hover:text-gray-900",onClick:m=>E(u)},[r[1]||(r[1]=o("svg",{class:"absolute left-2 top-2 h-4 w-4",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"},[o("path",{d:"M12.293 5.293a1 1 0 011.414 0l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414-1.414L14.586 11H3a1 1 0 110-2h11.586l-2.293-2.293a1 1 0 010-1.414z"})],-1)),q(" "+x(u.word),1)],8,ee))),128))])):S("",!0)]),o("div",te,[o("div",{class:"flex-1 cursor-pointer select-none text-center text-2xl text-gray-400",onClick:j},x(a(y)?a(y).word:"-"),1),o("div",oe,[o("span",se," #"+x(a(h).word_popularity),1),q(" "+x(a(h).word),1)]),o("div",{class:"flex-1 cursor-pointer select-none text-center text-2xl text-gray-400",onClick:D},x(a(b)?a(b).word:"-"),1)]),o("div",re,[(n(!0),l(w,null,k(a(h).conjugations,(u,m)=>(n(),l("div",{key:m},[o("div",ae,[o("h1",ne,x(m),1),o("div",le,[(n(!0),l(w,null,k(u,(F,A)=>(n(),l("p",{key:A},[(n(!0),l(w,null,k(F,(_,T)=>(n(),l("i",{key:T},x(_.text),1))),128))]))),128))])])]))),128))])],64)):(n(),l("div",ie,"Loading..."))])])]))}});export{ve as default}; diff --git a/_nuxt/C5GwGpip.js b/_nuxt/C5GwGpip.js deleted file mode 100644 index cd3eddfd..00000000 --- a/_nuxt/C5GwGpip.js +++ /dev/null @@ -1 +0,0 @@ -import{d as f,o as n,c as a,b as t,h as u,g as s,i as r,f as m,F as b,r as x,t as _,_ as v,w,a as y}from"./nJJO8dFm.js";import{_ as k,a as $}from"./CFm_cf98.js";import{q as C}from"./axEFYTs9.js";import"./IShi1APO.js";import"./DFIm0aE1.js";const D={class:"container mx-auto pb-8"},S={class:"flex flex-wrap"},A={class:"w-full"},B={class:"lg:text-normal space-y-4 text-justify font-medium tracking-wide text-white sm:text-base"},I=f({__name:"AboutMe",setup(d){return(o,e)=>(n(),a("section",D,[t("div",S,[t("div",A,[t("div",B,[u("",!0),e[1]||(e[1]=t("div",null,[s(" I help educate data engineers while building the future of data orchestration at "),t("a",{class:"border-b-2 border-orange-500",target:"_blank",rel:"noopener noreferrer",href:"https://dagster.io/"},"Dagster"),s(". ")],-1)),e[2]||(e[2]=t("div",null,[s(" Previously, I worked at "),t("a",{class:"border-b-2 border-orange-500",target:"_blank",rel:"noopener noreferrer",href:"https://www.gemini.com/"},"Gemini"),s(" building the data platform that provided company-wide insights into the exchange and business. At Georgetown University's "),t("a",{class:"border-b-2 border-orange-500",target:"_blank",rel:"noopener noreferrer",href:"https://mccourt.georgetown.edu/research/the-massive-data-institute/"},"Massive Data Institute"),s(" building data warehousing, processing solutions, and portals to aid social scientists and researchers to leverage large-scale organic data. And previously I provided consulting for financial institutions and government agencies in the D.C. area around data practices, and identity and access management. ")],-1))])])])]))}}),N={class:"bg-gradient-to-b from-background to-transparent"},P={class:"container mx-auto space-y-4"},L={class:"mb-4 grid grid-cols-1 gap-4 md:grid-cols-2"},M={class:"h-full space-y-4 bg-black/70 p-4 text-white drop-shadow-lg hover:ring-1 hover:ring-white"},V={class:"flex-1 text-lg font-bold md:text-xl"},j={key:0,class:"text-sm font-light text-gray-400"},q={class:"line-clamp-3 text-sm text-gray-300"},F={__name:"BlogPosts",props:{articles:Object,show_dates:!1},setup(d){return(o,e)=>{const l=v,g=k;return n(),a("section",N,[t("div",P,[r(l,{to:"/articles",class:"font-mono text-3xl font-semibold text-white underline decoration-orange-500 underline-offset-4 hover:text-orange-500"},{default:m(()=>e[0]||(e[0]=[s(" blog posts ")])),_:1}),t("div",L,[(n(!0),a(b,null,x(d.articles,(i,c)=>(n(),a("div",{key:c},[r(l,{to:i._path,external:""},{default:m(()=>[t("div",M,[t("div",null,[t("div",V,_(i.title),1),d.show_dates?(n(),a("div",j,_(new Date(i.date).toLocaleDateString("en-US",{month:"long",day:"numeric",year:"numeric"})),1)):u("",!0)]),t("div",q,_(i.description),1)])]),_:2},1032,["to"])]))),128))]),t("div",null,[r(g,{to:"/articles"})])])])}}},G={class:"bg-emerald-950 bg-[url('/images/noise.svg')]"},H={__name:"index",async setup(d){let o,e;const l=([o,e]=w(()=>C().only(["_id","_path","title","description","date","img","author","tags"]).sort({date:-1}).limit(4).find()),o=await o,e(),o);return(g,i)=>{const c=I,p=F,h=$;return n(),a("div",null,[r(c),t("div",G,[u("",!0),r(p,{articles:y(l),show_dates:!0},null,8,["articles"]),r(h,{limit:9,showImages:"",linkToPlayground:""})])])}}};export{H as default}; diff --git a/_nuxt/D9TPJ0pj.js b/_nuxt/C828-xgJ.js similarity index 65% rename from _nuxt/D9TPJ0pj.js rename to _nuxt/C828-xgJ.js index e532c4bc..cac6a182 100644 --- a/_nuxt/D9TPJ0pj.js +++ b/_nuxt/C828-xgJ.js @@ -1 +1 @@ -import{m as o,o as t,c,a9 as r}from"./nJJO8dFm.js";const s={};function n(e,a){return t(),c("blockquote",null,[r(e.$slots,"default")])}const f=o(s,[["render",n]]);export{f as default}; +import{m as o,o as t,c,a9 as r}from"./BK37JMLf.js";const s={};function n(e,a){return t(),c("blockquote",null,[r(e.$slots,"default")])}const f=o(s,[["render",n]]);export{f as default}; diff --git a/_nuxt/C9FT_e57.js b/_nuxt/C9FT_e57.js new file mode 100644 index 00000000..aca8e81e --- /dev/null +++ b/_nuxt/C9FT_e57.js @@ -0,0 +1 @@ +import{_ as o}from"./CWkD7dT7.js";import"./BK37JMLf.js";import"./C-v3KzvZ.js";import"./CxYJgpPD.js";import"./DmH48LNN.js";import"./IShi1APO.js";export{o as default}; diff --git a/_nuxt/CCnUho6I.js b/_nuxt/CCnUho6I.js new file mode 100644 index 00000000..31b79ba3 --- /dev/null +++ b/_nuxt/CCnUho6I.js @@ -0,0 +1 @@ +import{_ as m}from"./ChvBJXEt.js";import"./BK37JMLf.js";export{m as default}; diff --git a/_nuxt/CFm_cf98.js b/_nuxt/CFm_cf98.js deleted file mode 100644 index 7f89cf13..00000000 --- a/_nuxt/CFm_cf98.js +++ /dev/null @@ -1 +0,0 @@ -import{o as i,c as s,b as e,i as a,f as c,g as m,a as u,_ as d,k as w,t as g,F as v,r as y,e as x,h as k}from"./nJJO8dFm.js";function b(o,t){return i(),s("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true","data-slot":"icon"},[e("path",{"fill-rule":"evenodd",d:"M8.914 6.025a.75.75 0 0 1 1.06 0 3.5 3.5 0 0 1 0 4.95l-2 2a3.5 3.5 0 0 1-5.396-4.402.75.75 0 0 1 1.251.827 2 2 0 0 0 3.085 2.514l2-2a2 2 0 0 0 0-2.828.75.75 0 0 1 0-1.06Z","clip-rule":"evenodd"}),e("path",{"fill-rule":"evenodd",d:"M7.086 9.975a.75.75 0 0 1-1.06 0 3.5 3.5 0 0 1 0-4.95l2-2a3.5 3.5 0 0 1 5.396 4.402.75.75 0 0 1-1.251-.827 2 2 0 0 0-3.085-2.514l-2 2a2 2 0 0 0 0 2.828.75.75 0 0 1 0 1.06Z","clip-rule":"evenodd"})])}const M={class:"flex justify-end"},I={__name:"MoreLink",props:{to:{type:String,required:!0}},setup(o){const t=o;return(l,r)=>{const p=d;return i(),s("div",M,[a(p,{to:t.to,class:"flex items-center text-sm font-bold text-white hover:text-orange-500"},{default:c(()=>[r[0]||(r[0]=m(" More ")),a(u(b),{class:"ml-1 h-5 w-5","aria-hidden":"true"})]),_:1},8,["to"])])}}},j={class:"bg-gradient-to-b from-transparent to-background text-white"},D={class:"container mx-auto space-y-4 py-8 text-white"},L={class:"mb-4 grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3"},P=["src"],V={class:"absolute top-0 flex h-full w-full items-center justify-center bg-gray-500/50"},B={class:"m-2 bg-black/70 p-2"},C={class:"text-xl font-bold text-orange-500"},N=["innerHTML"],S={key:0},T="Experiments",E={__name:"Playground",props:{showImages:{type:Boolean,default:!1},limit:{type:Number,default:null},linkToPlayground:{type:Boolean,default:!1}},setup(o){const t=o,l=[{title:"Conway",description:"Conway's game of life written in vanilla Javascript",link:"/playground/conway",img:"/images/previews/conway.png"},{title:"wm.spoon",description:"Window manager for Hammer Spoon written in Lua",link:"https://github.com/cmpadden/wm.spoon",img:"/images/previews/wm.spoon.png"},{title:"Metronome",description:"A simple metronome for tracking tempo in the browser",link:"/playground/metronome",img:"/images/previews/metronome.png"},{title:"Conjugations",description:"Search and explore the conjugations of 1000 French verbs",link:"/playground/french",img:"/images/previews/french-conjugations.png"},{title:"Mountains",description:"Visualize a gradient of colored waves generated with Perlin noise",link:"/playground/palettes/mountains",img:"/images/previews/noise.png"},{title:"Spectrogram",description:"Visualize the audio from your microphone as a waveform, frequency bars, and a spectrogram",link:"/playground/audio",img:"/images/previews/microphone.png"},{title:"Waves",description:"Demonstration of using p5.js within Vue.js to visualize trigonometric functions",link:"/playground/waves",img:"/images/previews/waves.png"},{title:"MIDI Chords",description:"Identify the chords being played by your attached MIDI device",link:"/playground/chords",img:"/images/previews/chord-identifier.png"},{title:"MIDI Events",description:"View the MIDI events triggered by a MIDI-controller through the Web MIDI API",link:"/playground/midi",img:"/images/previews/midi-events.png"},{title:"Matrix Multiplication",description:"Step through the process of matrix multiplication",link:"/playground/matrix",img:"/images/previews/matrix-multiplication.png"},{title:"Sequence Plotter",description:"Plot the fist 10,000 digits of Pi, or any sequence of digits, in 2-dimensional space",link:"/playground/plotter",img:"/images/previews/plotter.png"}],r=w(()=>t.limit===null||t.limit<=0?l:l.slice(0,t.limit));return(p,q)=>{const h=d,f=d,_=I;return i(),s("section",j,[e("div",D,[a(h,{to:"/playground",class:"font-mono text-3xl font-semibold lowercase underline decoration-orange-500 underline-offset-4 hover:text-orange-500"},{default:c(()=>[m(g(T))]),_:1}),e("div",L,[(i(!0),s(v,null,y(u(r),n=>(i(),x(f,{class:"relative drop-shadow-lg hover:ring-1 hover:ring-white",key:n.title,to:n.link},{default:c(()=>[e("img",{class:"grayscale-1 h-full w-full object-cover",src:n.img||"images/placeholder.png"},null,8,P),e("div",V,[e("div",B,[e("h3",C,g(n.title),1),e("div",{class:"line-clamp-2 text-sm text-gray-300",innerHTML:n.description},null,8,N)])])]),_:2},1032,["to"]))),128))]),o.linkToPlayground?(i(),s("div",S,[a(_,{to:"/playground"})])):k("",!0)])])}}};export{I as _,E as a}; diff --git a/_nuxt/CFcRRafH.js b/_nuxt/CIDd0oDf.js similarity index 88% rename from _nuxt/CFcRRafH.js rename to _nuxt/CIDd0oDf.js index bfe78b06..c4af0e36 100644 --- a/_nuxt/CFcRRafH.js +++ b/_nuxt/CIDd0oDf.js @@ -1 +1 @@ -import{d as p,I as f,k as i,o as s,c as n,a as u,a9 as r}from"./nJJO8dFm.js";const l=["id"],d=["href"],_=p({__name:"ProseH2",props:{id:{}},setup(c){const t=c,{headings:o}=f().public.mdc,a=i(()=>{var e;return t.id&&(typeof(o==null?void 0:o.anchorLinks)=="boolean"&&(o==null?void 0:o.anchorLinks)===!0||typeof(o==null?void 0:o.anchorLinks)=="object"&&((e=o==null?void 0:o.anchorLinks)==null?void 0:e.h2))});return(e,k)=>(s(),n("h2",{id:t.id},[t.id&&u(a)?(s(),n("a",{key:0,href:`#${t.id}`},[r(e.$slots,"default")],8,d)):r(e.$slots,"default",{key:1})],8,l))}});export{_ as default}; +import{d as p,I as f,k as i,o as s,c as n,a as u,a9 as r}from"./BK37JMLf.js";const l=["id"],d=["href"],_=p({__name:"ProseH2",props:{id:{}},setup(c){const t=c,{headings:o}=f().public.mdc,a=i(()=>{var e;return t.id&&(typeof(o==null?void 0:o.anchorLinks)=="boolean"&&(o==null?void 0:o.anchorLinks)===!0||typeof(o==null?void 0:o.anchorLinks)=="object"&&((e=o==null?void 0:o.anchorLinks)==null?void 0:e.h2))});return(e,k)=>(s(),n("h2",{id:t.id},[t.id&&u(a)?(s(),n("a",{key:0,href:`#${t.id}`},[r(e.$slots,"default")],8,d)):r(e.$slots,"default",{key:1})],8,l))}});export{_ as default}; diff --git a/_nuxt/CSdKj_mO.js b/_nuxt/CNr5x1ND.js similarity index 56% rename from _nuxt/CSdKj_mO.js rename to _nuxt/CNr5x1ND.js index e8b8ce53..01c3f2ce 100644 --- a/_nuxt/CSdKj_mO.js +++ b/_nuxt/CNr5x1ND.js @@ -1 +1 @@ -import{m as r,a9 as t}from"./nJJO8dFm.js";const s={};function n(e,o){return t(e.$slots,"default")}const c=r(s,[["render",n]]);export{c as default}; +import{m as r,a9 as t}from"./BK37JMLf.js";const s={};function n(e,o){return t(e.$slots,"default")}const c=r(s,[["render",n]]);export{c as default}; diff --git a/_nuxt/BkbDttfB.js b/_nuxt/CTW-W71u.js similarity index 61% rename from _nuxt/BkbDttfB.js rename to _nuxt/CTW-W71u.js index 6dea300c..65e71b58 100644 --- a/_nuxt/BkbDttfB.js +++ b/_nuxt/CTW-W71u.js @@ -1 +1 @@ -import s from"./TehJYBZc.js";import{d as o,J as u,k as f,a0 as m}from"./nJJO8dFm.js";import"./CxYJgpPD.js";const d=o({name:"Markdown",extends:s,setup(t){const{parent:e}=m(),{between:n,default:a}=u(),r=f(()=>typeof t.unwrap=="string"?t.unwrap.split(" "):["*"]);return{fallbackSlot:a,tags:r,between:n,parent:e}}});export{d as default}; +import s from"./Bv4zO08n.js";import{d as o,J as u,k as f,a0 as m}from"./BK37JMLf.js";import"./CxYJgpPD.js";const d=o({name:"Markdown",extends:s,setup(t){const{parent:e}=m(),{between:n,default:a}=u(),r=f(()=>typeof t.unwrap=="string"?t.unwrap.split(" "):["*"]);return{fallbackSlot:a,tags:r,between:n,parent:e}}});export{d as default}; diff --git a/_nuxt/DwMZCMB-.js b/_nuxt/CVSgz9-b.js similarity index 72% rename from _nuxt/DwMZCMB-.js rename to _nuxt/CVSgz9-b.js index cd4248c3..93d43b23 100644 --- a/_nuxt/DwMZCMB-.js +++ b/_nuxt/CVSgz9-b.js @@ -1 +1 @@ -import{d as r,a as n,o as s,c as a,g as e,b as o,h as i}from"./nJJO8dFm.js";const d={key:0},u=r({__name:"ProseScript",props:{src:{type:String,default:""}},setup(c){return(p,t)=>n(!1)?(s(),a("div",d,t[0]||(t[0]=[e(" Rendering the "),o("code",null,"script",-1),e(" element is dangerous and is disabled by default. Consider implementing your own "),o("code",null,"ProseScript",-1),e(" element to have control over script rendering. ")]))):i("",!0)}});export{u as default}; +import{d as r,a as n,o as s,c as a,g as e,b as o,h as i}from"./BK37JMLf.js";const d={key:0},u=r({__name:"ProseScript",props:{src:{type:String,default:""}},setup(c){return(p,t)=>n(!1)?(s(),a("div",d,t[0]||(t[0]=[e(" Rendering the "),o("code",null,"script",-1),e(" element is dangerous and is disabled by default. Consider implementing your own "),o("code",null,"ProseScript",-1),e(" element to have control over script rendering. ")]))):i("",!0)}});export{u as default}; diff --git a/_nuxt/DAyK0gv0.js b/_nuxt/CW9x3cwD.js similarity index 84% rename from _nuxt/DAyK0gv0.js rename to _nuxt/CW9x3cwD.js index a84162f6..e0948dfc 100644 --- a/_nuxt/DAyK0gv0.js +++ b/_nuxt/CW9x3cwD.js @@ -1 +1 @@ -import{_ as f}from"./RZ_1G7Mx.js";import{d as l,v as s,J as d,L as c}from"./nJJO8dFm.js";import"./C-v3KzvZ.js";import"./CxYJgpPD.js";import"./DFIm0aE1.js";import"./IShi1APO.js";const $=l({name:"ContentRenderer",props:{value:{type:Object,required:!1,default:()=>({})},excerpt:{type:Boolean,default:!1},tag:{type:String,default:"div"}},setup(t){s(()=>t.excerpt,n=>{var e,i,a;n&&!((e=t.value)!=null&&e.excerpt)&&(console.warn(`No excerpt found for document content/${(i=t==null?void 0:t.value)==null?void 0:i._path}.${(a=t==null?void 0:t.value)==null?void 0:a._extension}!`),console.warn("Make sure to use in your content if you want to use excerpt feature."))},{immediate:!0})},render(t){var u,o;const n=d(),{value:e,excerpt:i,tag:a}=t,r=i?e==null?void 0:e.excerpt:e==null?void 0:e.body;return!((u=r==null?void 0:r.children)!=null&&u.length)&&(n!=null&&n.empty)?n.empty({value:e,excerpt:i,tag:a,...this.$attrs}):n!=null&&n.default?n.default({value:e,excerpt:i,tag:a,...this.$attrs}):(r==null?void 0:r.type)==="root"&&((o=r==null?void 0:r.children)!=null&&o.length)?c(f,{value:e,excerpt:i,tag:a,...this.$attrs}):c("pre",null,JSON.stringify({message:"You should use slots with ",value:e,excerpt:i,tag:a},null,2))}});export{$ as default}; +import{_ as f}from"./CWkD7dT7.js";import{d as l,v as s,J as d,L as c}from"./BK37JMLf.js";import"./C-v3KzvZ.js";import"./CxYJgpPD.js";import"./DmH48LNN.js";import"./IShi1APO.js";const $=l({name:"ContentRenderer",props:{value:{type:Object,required:!1,default:()=>({})},excerpt:{type:Boolean,default:!1},tag:{type:String,default:"div"}},setup(t){s(()=>t.excerpt,n=>{var e,i,a;n&&!((e=t.value)!=null&&e.excerpt)&&(console.warn(`No excerpt found for document content/${(i=t==null?void 0:t.value)==null?void 0:i._path}.${(a=t==null?void 0:t.value)==null?void 0:a._extension}!`),console.warn("Make sure to use in your content if you want to use excerpt feature."))},{immediate:!0})},render(t){var u,o;const n=d(),{value:e,excerpt:i,tag:a}=t,r=i?e==null?void 0:e.excerpt:e==null?void 0:e.body;return!((u=r==null?void 0:r.children)!=null&&u.length)&&(n!=null&&n.empty)?n.empty({value:e,excerpt:i,tag:a,...this.$attrs}):n!=null&&n.default?n.default({value:e,excerpt:i,tag:a,...this.$attrs}):(r==null?void 0:r.type)==="root"&&((o=r==null?void 0:r.children)!=null&&o.length)?c(f,{value:e,excerpt:i,tag:a,...this.$attrs}):c("pre",null,JSON.stringify({message:"You should use slots with ",value:e,excerpt:i,tag:a},null,2))}});export{$ as default}; diff --git a/_nuxt/RZ_1G7Mx.js b/_nuxt/CWkD7dT7.js similarity index 99% rename from _nuxt/RZ_1G7Mx.js rename to _nuxt/CWkD7dT7.js index b29d8388..d7dc9b23 100644 --- a/_nuxt/RZ_1G7Mx.js +++ b/_nuxt/CWkD7dT7.js @@ -1 +1 @@ -import{d as W,a0 as rn,a2 as an,k as M,A as un,v as sn,L as E,a3 as cn,a4 as pn,a5 as R,a6 as dn,a7 as gn,o as hn,e as fn,a as mn}from"./nJJO8dFm.js";import{p as K,k as yn}from"./C-v3KzvZ.js";import{f as vn}from"./CxYJgpPD.js";import{u as bn}from"./DFIm0aE1.js";class O{constructor(l,o,t){this.property=l,this.normal=o,t&&(this.space=t)}}O.prototype.property={};O.prototype.normal={};O.prototype.space=null;function X(n,l){const o={},t={};let r=-1;for(;++r4&&o.slice(0,4)==="data"&&wn.test(l)){if(l.charAt(4)==="-"){const a=l.slice(5).replace(q,Ln);t="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=l.slice(4);if(!q.test(a)){let i=a.replace(Pn,On);i.charAt(0)!=="-"&&(i="-"+i),l="data"+i}}r=_}return new r(t,l)}function On(n){return"-"+n.toLowerCase()}function Ln(n){return n.charAt(1).toUpperCase()}const Mn=X([Z,$,Q,nn,Sn],"html");X([Z,$,Q,nn,xn],"svg");const H=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","link","main","map","mark","math","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rb","rp","rt","rtc","ruby","s","samp","script","section","select","slot","small","source","span","strong","style","sub","summary","sup","svg","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr"],I="default",ln=/^@|^v-on:/,en=/^:|^v-bind:/,Rn=/^v-model/,Tn=["select","textarea","input"],An=Object.fromEntries(["p","a","blockquote","code","pre","code","em","h1","h2","h3","h4","h5","h6","hr","img","ul","ol","li","strong","table","thead","tbody","td","th","tr","script"].map(n=>[n,`prose-${n}`])),En=W({name:"MDCRenderer",props:{body:{type:Object,required:!0},data:{type:Object,default:()=>({})},class:{type:[String,Object],default:void 0},tag:{type:[String,Boolean],default:void 0},prose:{type:Boolean,default:void 0},components:{type:Object,default:()=>({})},unwrap:{type:[Boolean,String],default:!1}},async setup(n){var c,g,h,f,y,w,P,V;const l=(h=(g=(c=rn())==null?void 0:c.appContext)==null?void 0:g.app)==null?void 0:h.$nuxt,o=(l==null?void 0:l.$route)||(l==null?void 0:l._route),{mdc:t}=((f=l==null?void 0:l.$config)==null?void 0:f.public)||{},r={...(y=t==null?void 0:t.components)!=null&&y.prose&&n.prose!==!1?An:{},...((w=t==null?void 0:t.components)==null?void 0:w.map)||{},...an(((V=(P=n.data)==null?void 0:P.mdc)==null?void 0:V.components)||{}),...n.components},a=M(()=>{var L;const k=(((L=n.body)==null?void 0:L.children)||[]).map(C=>C.tag||C.type).filter(C=>!H.includes(C));return Array.from(new Set(k)).sort().join(".")}),i=un({...n.data});sn(()=>n.data,k=>{Object.assign(i,k)}),await qn(n.body,{tags:r});function s(k,L){const C=k.split(".").length-1;return k.split(".").reduce((D,A,tn)=>tn==C&&D?(D[A]=L,D[A]):typeof D=="object"?D[A]:void 0,i)}return{tags:r,contentKey:a,route:o,runtimeData:i,updateRuntimeData:s}},render(n){var w,P;const{tags:l,tag:o,body:t,data:r,contentKey:a,route:i,unwrap:s,runtimeData:c,updateRuntimeData:g}=n;if(!t)return null;const h={...r,tags:l,$route:i,runtimeData:c,updateRuntimeData:g},f=o!==!1?F(o||((w=h.component)==null?void 0:w.name)||h.component||"div"):void 0;return f?E(f,{...(P=h.component)==null?void 0:P.props,class:n.class,...this.$attrs,key:a},{default:y}):y==null?void 0:y();function y(){return s?vn(j(t,E,h,h).default(),typeof s=="string"?s.split(" "):["*"]):j(t,E,h,h).default()}}});function Un(n,l,o,t={}){if(n.type==="text")return l(R,n.value);if(n.type==="comment")return l(dn,null,n.value);const r=n.tag,a=on(n,o.tags);if(n.tag==="binding")return Bn(n,l,o,t);const i=F(a);typeof i=="object"&&(i.tag=r);const s=zn(n,o);return l(i,s,j(n,l,o,{...t,...s}))}function Bn(n,l,o,t={}){var g,h;const r={...o.runtimeData,...t,$document:o,$doc:o},a=/\.|\[(\d+)\]/,s=((g=n.props)==null?void 0:g.value.trim().split(a).filter(Boolean)).reduce((f,y)=>{if(f&&y in f)return typeof f[y]=="function"?f[y]():f[y]},r),c=(h=n.props)==null?void 0:h.defaultValue;return l(R,s??c??"")}function j(n,l,o,t){const a=(n.children||[]).reduce((s,c)=>{if(!Vn(c))return s[I].push(c),s;const g=Fn(c);return s[g]=s[g]||[],c.type==="element"&&s[g].push(...c.children||[]),s},{[I]:[]});return Object.entries(a).reduce((s,[c,g])=>(g.length&&(s[c]=()=>{const h=g.map(f=>Un(f,l,o,t));return Nn(h)}),s),{})}function zn(n,l){const{tag:o="",props:t={}}=n;return Object.keys(t).reduce(function(r,a){if(a==="__ignoreMap")return r;const i=t[a];if(Rn.test(a))return In(a,i,r,l,{native:Tn.includes(o)});if(a==="v-bind")return jn(a,i,r,l);if(ln.test(a))return _n(a,i,r,l);if(en.test(a))return Hn(a,i,r,l);const{attribute:s}=Dn(Mn,a);return Array.isArray(i)&&i.every(c=>typeof c=="string")?(r[s]=i.join(" "),r):(r[s]=i,r)},{})}function In(n,l,o,t,{native:r}){var c;const a=((c=n.match(/^v-model:([^=]+)/))==null?void 0:c[1])||"modelValue",i=r?"value":a,s=r?"onInput":`onUpdate:${a}`;return o[i]=T(l,t.runtimeData),o[s]=g=>{var h;t.updateRuntimeData(l,r?(h=g.target)==null?void 0:h.value:g)},o}function jn(n,l,o,t){const r=T(l,t);return o=Object.assign(o,r),o}function _n(n,l,o,t){return n=n.replace(ln,""),o.on=o.on||{},o.on[n]=()=>T(l,t),o}function Hn(n,l,o,t){return n=n.replace(en,""),o[n]=T(l,t),o}const F=n=>{if(typeof n=="string"){if(H.includes(n))return n;const l=cn(K(n),!1);return!n||(l==null?void 0:l.name)==="AsyncComponentWrapper"||typeof l=="string"?l:"setup"in l?pn(()=>new Promise(o=>o(l))):l}return n};function T(n,l){const o=n.split(".").reduce((t,r)=>typeof t=="object"?t[r]:void 0,l);return typeof o>"u"?gn(n):o}function Fn(n){let l="";for(const o of Object.keys(n.props||{}))if(!(!o.startsWith("#")&&!o.startsWith("v-slot:"))){l=o.split(/[:#]/,2)[1];break}return l||I}function Vn(n){return n.tag==="template"}function Nn(n){const l=[];for(const o of n){const t=l[l.length-1];o.type===R&&(t==null?void 0:t.type)===R?t.children=t.children+o.children:l.push(o)}return l}async function qn(n,l){if(!n)return;const o=Array.from(new Set(t(n,l)));await Promise.all(o.map(async r=>{if(r!=null&&r.render||r!=null&&r.ssrRender||r!=null&&r.__ssrInlineRender)return;const a=F(r);a!=null&&a.__asyncLoader&&!a.__asyncResolved&&await a.__asyncLoader()}));function t(r,a){const i=r.tag;if(r.type==="text"||i==="binding"||r.type==="comment")return[];const s=on(r,a.tags),c=[];r.type!=="root"&&!H.includes(s)&&c.push(s);for(const g of r.children||[])c.push(...t(g,a));return c}}function on(n,l){var t;const o=n.tag;return!o||typeof((t=n.props)==null?void 0:t.__ignoreMap)<"u"?o:l[o]||l[K(o)]||l[yn(n.tag)]||o}const $n=W({__name:"ContentRendererMarkdown",props:{value:{type:Object,required:!0},excerpt:{type:Boolean,default:!1},tag:{type:String,default:"div"},components:{type:Object,default:()=>({})},data:{type:Object,default:()=>({})}},setup(n){const l=n,o=bn().isEnabled(),t=M(()=>{let i=l.value.body||l.value;return l.excerpt&&l.value.excerpt&&(i=l.value.excerpt),i}),r=M(()=>{const{body:i,excerpt:s,...c}=l.value;return{...c,...l.data}}),a=M(()=>({...l.components,...r.value._components||{}}));return(i,s)=>{const c=En;return hn(),fn(c,{body:t.value,data:r.value,tag:n.tag,components:a.value,"data-content-id":mn(o)?n.value._id:void 0},null,8,["body","data","tag","components","data-content-id"])}}});export{$n as _}; +import{d as W,a0 as rn,a2 as an,k as M,A as un,v as sn,L as E,a3 as cn,a4 as pn,a5 as R,a6 as dn,a7 as gn,o as hn,e as fn,a as mn}from"./BK37JMLf.js";import{p as K,k as yn}from"./C-v3KzvZ.js";import{f as vn}from"./CxYJgpPD.js";import{u as bn}from"./DmH48LNN.js";class O{constructor(l,o,t){this.property=l,this.normal=o,t&&(this.space=t)}}O.prototype.property={};O.prototype.normal={};O.prototype.space=null;function X(n,l){const o={},t={};let r=-1;for(;++r4&&o.slice(0,4)==="data"&&wn.test(l)){if(l.charAt(4)==="-"){const a=l.slice(5).replace(q,Ln);t="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=l.slice(4);if(!q.test(a)){let i=a.replace(Pn,On);i.charAt(0)!=="-"&&(i="-"+i),l="data"+i}}r=_}return new r(t,l)}function On(n){return"-"+n.toLowerCase()}function Ln(n){return n.charAt(1).toUpperCase()}const Mn=X([Z,$,Q,nn,Sn],"html");X([Z,$,Q,nn,xn],"svg");const H=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","link","main","map","mark","math","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rb","rp","rt","rtc","ruby","s","samp","script","section","select","slot","small","source","span","strong","style","sub","summary","sup","svg","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr"],I="default",ln=/^@|^v-on:/,en=/^:|^v-bind:/,Rn=/^v-model/,Tn=["select","textarea","input"],An=Object.fromEntries(["p","a","blockquote","code","pre","code","em","h1","h2","h3","h4","h5","h6","hr","img","ul","ol","li","strong","table","thead","tbody","td","th","tr","script"].map(n=>[n,`prose-${n}`])),En=W({name:"MDCRenderer",props:{body:{type:Object,required:!0},data:{type:Object,default:()=>({})},class:{type:[String,Object],default:void 0},tag:{type:[String,Boolean],default:void 0},prose:{type:Boolean,default:void 0},components:{type:Object,default:()=>({})},unwrap:{type:[Boolean,String],default:!1}},async setup(n){var c,g,h,f,y,w,P,V;const l=(h=(g=(c=rn())==null?void 0:c.appContext)==null?void 0:g.app)==null?void 0:h.$nuxt,o=(l==null?void 0:l.$route)||(l==null?void 0:l._route),{mdc:t}=((f=l==null?void 0:l.$config)==null?void 0:f.public)||{},r={...(y=t==null?void 0:t.components)!=null&&y.prose&&n.prose!==!1?An:{},...((w=t==null?void 0:t.components)==null?void 0:w.map)||{},...an(((V=(P=n.data)==null?void 0:P.mdc)==null?void 0:V.components)||{}),...n.components},a=M(()=>{var L;const k=(((L=n.body)==null?void 0:L.children)||[]).map(C=>C.tag||C.type).filter(C=>!H.includes(C));return Array.from(new Set(k)).sort().join(".")}),i=un({...n.data});sn(()=>n.data,k=>{Object.assign(i,k)}),await qn(n.body,{tags:r});function s(k,L){const C=k.split(".").length-1;return k.split(".").reduce((D,A,tn)=>tn==C&&D?(D[A]=L,D[A]):typeof D=="object"?D[A]:void 0,i)}return{tags:r,contentKey:a,route:o,runtimeData:i,updateRuntimeData:s}},render(n){var w,P;const{tags:l,tag:o,body:t,data:r,contentKey:a,route:i,unwrap:s,runtimeData:c,updateRuntimeData:g}=n;if(!t)return null;const h={...r,tags:l,$route:i,runtimeData:c,updateRuntimeData:g},f=o!==!1?F(o||((w=h.component)==null?void 0:w.name)||h.component||"div"):void 0;return f?E(f,{...(P=h.component)==null?void 0:P.props,class:n.class,...this.$attrs,key:a},{default:y}):y==null?void 0:y();function y(){return s?vn(j(t,E,h,h).default(),typeof s=="string"?s.split(" "):["*"]):j(t,E,h,h).default()}}});function Un(n,l,o,t={}){if(n.type==="text")return l(R,n.value);if(n.type==="comment")return l(dn,null,n.value);const r=n.tag,a=on(n,o.tags);if(n.tag==="binding")return Bn(n,l,o,t);const i=F(a);typeof i=="object"&&(i.tag=r);const s=zn(n,o);return l(i,s,j(n,l,o,{...t,...s}))}function Bn(n,l,o,t={}){var g,h;const r={...o.runtimeData,...t,$document:o,$doc:o},a=/\.|\[(\d+)\]/,s=((g=n.props)==null?void 0:g.value.trim().split(a).filter(Boolean)).reduce((f,y)=>{if(f&&y in f)return typeof f[y]=="function"?f[y]():f[y]},r),c=(h=n.props)==null?void 0:h.defaultValue;return l(R,s??c??"")}function j(n,l,o,t){const a=(n.children||[]).reduce((s,c)=>{if(!Vn(c))return s[I].push(c),s;const g=Fn(c);return s[g]=s[g]||[],c.type==="element"&&s[g].push(...c.children||[]),s},{[I]:[]});return Object.entries(a).reduce((s,[c,g])=>(g.length&&(s[c]=()=>{const h=g.map(f=>Un(f,l,o,t));return Nn(h)}),s),{})}function zn(n,l){const{tag:o="",props:t={}}=n;return Object.keys(t).reduce(function(r,a){if(a==="__ignoreMap")return r;const i=t[a];if(Rn.test(a))return In(a,i,r,l,{native:Tn.includes(o)});if(a==="v-bind")return jn(a,i,r,l);if(ln.test(a))return _n(a,i,r,l);if(en.test(a))return Hn(a,i,r,l);const{attribute:s}=Dn(Mn,a);return Array.isArray(i)&&i.every(c=>typeof c=="string")?(r[s]=i.join(" "),r):(r[s]=i,r)},{})}function In(n,l,o,t,{native:r}){var c;const a=((c=n.match(/^v-model:([^=]+)/))==null?void 0:c[1])||"modelValue",i=r?"value":a,s=r?"onInput":`onUpdate:${a}`;return o[i]=T(l,t.runtimeData),o[s]=g=>{var h;t.updateRuntimeData(l,r?(h=g.target)==null?void 0:h.value:g)},o}function jn(n,l,o,t){const r=T(l,t);return o=Object.assign(o,r),o}function _n(n,l,o,t){return n=n.replace(ln,""),o.on=o.on||{},o.on[n]=()=>T(l,t),o}function Hn(n,l,o,t){return n=n.replace(en,""),o[n]=T(l,t),o}const F=n=>{if(typeof n=="string"){if(H.includes(n))return n;const l=cn(K(n),!1);return!n||(l==null?void 0:l.name)==="AsyncComponentWrapper"||typeof l=="string"?l:"setup"in l?pn(()=>new Promise(o=>o(l))):l}return n};function T(n,l){const o=n.split(".").reduce((t,r)=>typeof t=="object"?t[r]:void 0,l);return typeof o>"u"?gn(n):o}function Fn(n){let l="";for(const o of Object.keys(n.props||{}))if(!(!o.startsWith("#")&&!o.startsWith("v-slot:"))){l=o.split(/[:#]/,2)[1];break}return l||I}function Vn(n){return n.tag==="template"}function Nn(n){const l=[];for(const o of n){const t=l[l.length-1];o.type===R&&(t==null?void 0:t.type)===R?t.children=t.children+o.children:l.push(o)}return l}async function qn(n,l){if(!n)return;const o=Array.from(new Set(t(n,l)));await Promise.all(o.map(async r=>{if(r!=null&&r.render||r!=null&&r.ssrRender||r!=null&&r.__ssrInlineRender)return;const a=F(r);a!=null&&a.__asyncLoader&&!a.__asyncResolved&&await a.__asyncLoader()}));function t(r,a){const i=r.tag;if(r.type==="text"||i==="binding"||r.type==="comment")return[];const s=on(r,a.tags),c=[];r.type!=="root"&&!H.includes(s)&&c.push(s);for(const g of r.children||[])c.push(...t(g,a));return c}}function on(n,l){var t;const o=n.tag;return!o||typeof((t=n.props)==null?void 0:t.__ignoreMap)<"u"?o:l[o]||l[K(o)]||l[yn(n.tag)]||o}const $n=W({__name:"ContentRendererMarkdown",props:{value:{type:Object,required:!0},excerpt:{type:Boolean,default:!1},tag:{type:String,default:"div"},components:{type:Object,default:()=>({})},data:{type:Object,default:()=>({})}},setup(n){const l=n,o=bn().isEnabled(),t=M(()=>{let i=l.value.body||l.value;return l.excerpt&&l.value.excerpt&&(i=l.value.excerpt),i}),r=M(()=>{const{body:i,excerpt:s,...c}=l.value;return{...c,...l.data}}),a=M(()=>({...l.components,...r.value._components||{}}));return(i,s)=>{const c=En;return hn(),fn(c,{body:t.value,data:r.value,tag:n.tag,components:a.value,"data-content-id":mn(o)?n.value._id:void 0},null,8,["body","data","tag","components","data-content-id"])}}});export{$n as _}; diff --git a/_nuxt/BbQsVLx8.js b/_nuxt/CXAQy6Gj.js similarity index 88% rename from _nuxt/BbQsVLx8.js rename to _nuxt/CXAQy6Gj.js index b4a2169e..59559674 100644 --- a/_nuxt/BbQsVLx8.js +++ b/_nuxt/CXAQy6Gj.js @@ -1 +1 @@ -import{d as p,I as f,k as u,o as s,c as n,a as i,a9 as r}from"./nJJO8dFm.js";const l=["id"],d=["href"],_=p({__name:"ProseH1",props:{id:{}},setup(c){const t=c,{headings:o}=f().public.mdc,a=u(()=>{var e;return t.id&&(typeof(o==null?void 0:o.anchorLinks)=="boolean"&&(o==null?void 0:o.anchorLinks)===!0||typeof(o==null?void 0:o.anchorLinks)=="object"&&((e=o==null?void 0:o.anchorLinks)==null?void 0:e.h1))});return(e,k)=>(s(),n("h1",{id:t.id},[i(a)?(s(),n("a",{key:0,href:`#${t.id}`},[r(e.$slots,"default")],8,d)):r(e.$slots,"default",{key:1})],8,l))}});export{_ as default}; +import{d as p,I as f,k as u,o as s,c as n,a as i,a9 as r}from"./BK37JMLf.js";const l=["id"],d=["href"],_=p({__name:"ProseH1",props:{id:{}},setup(c){const t=c,{headings:o}=f().public.mdc,a=u(()=>{var e;return t.id&&(typeof(o==null?void 0:o.anchorLinks)=="boolean"&&(o==null?void 0:o.anchorLinks)===!0||typeof(o==null?void 0:o.anchorLinks)=="object"&&((e=o==null?void 0:o.anchorLinks)==null?void 0:e.h1))});return(e,k)=>(s(),n("h1",{id:t.id},[i(a)?(s(),n("a",{key:0,href:`#${t.id}`},[r(e.$slots,"default")],8,d)):r(e.$slots,"default",{key:1})],8,l))}});export{_ as default}; diff --git a/_nuxt/BhgXj1kf.js b/_nuxt/CgYWpv8r.js similarity index 58% rename from _nuxt/BhgXj1kf.js rename to _nuxt/CgYWpv8r.js index 72571df3..76dff7cf 100644 --- a/_nuxt/BhgXj1kf.js +++ b/_nuxt/CgYWpv8r.js @@ -1 +1 @@ -import{d as n,L as e}from"./nJJO8dFm.js";const t=n({name:"DocumentDrivenNotFound",render(){return e("div","Document not found")}});export{t as default}; +import{d as n,L as e}from"./BK37JMLf.js";const t=n({name:"DocumentDrivenNotFound",render(){return e("div","Document not found")}});export{t as default}; diff --git a/_nuxt/D9bwbETQ.js b/_nuxt/ChvBJXEt.js similarity index 79% rename from _nuxt/D9bwbETQ.js rename to _nuxt/ChvBJXEt.js index 644a8a8d..7afedd9e 100644 --- a/_nuxt/D9bwbETQ.js +++ b/_nuxt/ChvBJXEt.js @@ -1 +1 @@ -import{d as t,a9 as a}from"./nJJO8dFm.js";const o=t({__name:"ProseCode",props:{code:{type:String,default:""},language:{type:String,default:null},filename:{type:String,default:null},highlights:{type:Array,default:()=>[]},meta:{type:String,default:null}},setup(n){return(e,r)=>a(e.$slots,"default")}});export{o as _}; +import{d as t,a9 as a}from"./BK37JMLf.js";const o=t({__name:"ProseCode",props:{code:{type:String,default:""},language:{type:String,default:null},filename:{type:String,default:null},highlights:{type:Array,default:()=>[]},meta:{type:String,default:null}},setup(n){return(e,r)=>a(e.$slots,"default")}});export{o as _}; diff --git a/_nuxt/Bmp1QHsv.js b/_nuxt/CkFsoPVF.js similarity index 92% rename from _nuxt/Bmp1QHsv.js rename to _nuxt/CkFsoPVF.js index ab991914..a1c93ee4 100644 --- a/_nuxt/Bmp1QHsv.js +++ b/_nuxt/CkFsoPVF.js @@ -1 +1 @@ -import{h as g}from"./IShi1APO.js";import{u as C}from"./BBOrgyAk.js";import{q as m}from"./axEFYTs9.js";import{d as S,P as b,k,I as _,v as A,J as N,L as O}from"./nJJO8dFm.js";import"./DFIm0aE1.js";const Q=S({name:"ContentQuery",props:{path:{type:String,required:!1,default:void 0},only:{type:Array,required:!1,default:void 0},without:{type:Array,required:!1,default:void 0},where:{type:Object,required:!1,default:void 0},sort:{type:Object,required:!1,default:void 0},limit:{type:Number,required:!1,default:void 0},skip:{type:Number,required:!1,default:void 0},locale:{type:String,required:!1,default:void 0},find:{type:String,required:!1,default:void 0}},async setup(u){const{path:t,only:r,without:o,where:a,sort:f,limit:l,skip:d,locale:s,find:p}=b(u),y=k(()=>{var e;return(e=t.value)==null?void 0:e.includes("/_")}),h=!_().public.content.experimental.advanceQuery;A(()=>u,()=>n(),{deep:!0});const i=e=>h?e!=null&&e.surround?e.surround:e!=null&&e._id||Array.isArray(e)?e:e==null?void 0:e.result:e.result,{data:v,refresh:n}=await C(`content-query-${g(u)}`,()=>{let e;return t.value?e=m(t.value):e=m(),r.value&&(e=e.only(r.value)),o.value&&(e=e.without(o.value)),a.value&&(e=e.where(a.value)),f.value&&(e=e.sort(f.value)),l.value&&(e=e.limit(l.value)),d.value&&(e=e.skip(d.value)),s.value&&(e=e.where({_locale:s.value})),p.value==="one"?e.findOne().then(i):p.value==="surround"?t.value?h?e.findSurround(t.value):e.withSurround(t.value).findOne().then(i):(console.warn("[Content] Surround queries requires `path` prop to be set."),console.warn("[Content] Query without `path` will return regular `find()` results."),e.find().then(i)):e.find().then(i)});return{isPartial:y,data:v,refresh:n}},render(u){var c;const t=N(),{data:r,refresh:o,isPartial:a,path:f,only:l,without:d,where:s,sort:p,limit:y,skip:h,locale:i,find:v}=u,n={path:f,only:l,without:d,where:s,sort:p,limit:y,skip:h,locale:i,find:v};if(n.find==="one"){if(!r&&(t!=null&&t["not-found"]))return t["not-found"]({props:n,...this.$attrs});if(t!=null&&t.empty&&(r==null?void 0:r._type)==="markdown"&&!((c=r==null?void 0:r.body)!=null&&c.children.length))return t.empty({props:n,...this.$attrs})}else if((!r||!r.length)&&t!=null&&t["not-found"])return t["not-found"]({props:n,...this.$attrs});return t!=null&&t.default?t.default({data:r,refresh:o,isPartial:a,props:n,...this.$attrs}):((w,q)=>O("pre",null,JSON.stringify({message:"You should use slots with !",slot:w,data:q},null,2)))("default",{data:r,props:n,isPartial:a})}}),J=Q;export{J as default}; +import{h as g}from"./IShi1APO.js";import{u as C}from"./Dl5rqmmJ.js";import{q as m}from"./BUUEBr-A.js";import{d as S,P as b,k,I as _,v as A,J as N,L as O}from"./BK37JMLf.js";import"./DmH48LNN.js";const Q=S({name:"ContentQuery",props:{path:{type:String,required:!1,default:void 0},only:{type:Array,required:!1,default:void 0},without:{type:Array,required:!1,default:void 0},where:{type:Object,required:!1,default:void 0},sort:{type:Object,required:!1,default:void 0},limit:{type:Number,required:!1,default:void 0},skip:{type:Number,required:!1,default:void 0},locale:{type:String,required:!1,default:void 0},find:{type:String,required:!1,default:void 0}},async setup(u){const{path:t,only:r,without:o,where:a,sort:f,limit:l,skip:d,locale:s,find:p}=b(u),y=k(()=>{var e;return(e=t.value)==null?void 0:e.includes("/_")}),h=!_().public.content.experimental.advanceQuery;A(()=>u,()=>n(),{deep:!0});const i=e=>h?e!=null&&e.surround?e.surround:e!=null&&e._id||Array.isArray(e)?e:e==null?void 0:e.result:e.result,{data:v,refresh:n}=await C(`content-query-${g(u)}`,()=>{let e;return t.value?e=m(t.value):e=m(),r.value&&(e=e.only(r.value)),o.value&&(e=e.without(o.value)),a.value&&(e=e.where(a.value)),f.value&&(e=e.sort(f.value)),l.value&&(e=e.limit(l.value)),d.value&&(e=e.skip(d.value)),s.value&&(e=e.where({_locale:s.value})),p.value==="one"?e.findOne().then(i):p.value==="surround"?t.value?h?e.findSurround(t.value):e.withSurround(t.value).findOne().then(i):(console.warn("[Content] Surround queries requires `path` prop to be set."),console.warn("[Content] Query without `path` will return regular `find()` results."),e.find().then(i)):e.find().then(i)});return{isPartial:y,data:v,refresh:n}},render(u){var c;const t=N(),{data:r,refresh:o,isPartial:a,path:f,only:l,without:d,where:s,sort:p,limit:y,skip:h,locale:i,find:v}=u,n={path:f,only:l,without:d,where:s,sort:p,limit:y,skip:h,locale:i,find:v};if(n.find==="one"){if(!r&&(t!=null&&t["not-found"]))return t["not-found"]({props:n,...this.$attrs});if(t!=null&&t.empty&&(r==null?void 0:r._type)==="markdown"&&!((c=r==null?void 0:r.body)!=null&&c.children.length))return t.empty({props:n,...this.$attrs})}else if((!r||!r.length)&&t!=null&&t["not-found"])return t["not-found"]({props:n,...this.$attrs});return t!=null&&t.default?t.default({data:r,refresh:o,isPartial:a,props:n,...this.$attrs}):((w,q)=>O("pre",null,JSON.stringify({message:"You should use slots with !",slot:w,data:q},null,2)))("default",{data:r,props:n,isPartial:a})}}),J=Q;export{J as default}; diff --git a/_nuxt/Cj8D-8E-.js b/_nuxt/ClIt1Nvm.js similarity index 87% rename from _nuxt/Cj8D-8E-.js rename to _nuxt/ClIt1Nvm.js index 44646a3f..d645b566 100644 --- a/_nuxt/Cj8D-8E-.js +++ b/_nuxt/ClIt1Nvm.js @@ -1 +1 @@ -import{a as d,v as w,u as y,G as D,H,I as g,d as S,J as _,K as b,L as p}from"./nJJO8dFm.js";import q from"./DAyK0gv0.js";import x from"./Bmp1QHsv.js";import"./RZ_1G7Mx.js";import"./C-v3KzvZ.js";import"./CxYJgpPD.js";import"./DFIm0aE1.js";import"./IShi1APO.js";import"./BBOrgyAk.js";import"./axEFYTs9.js";const a=(u,s=y())=>{const e=d(u),m=g();w(()=>d(u),(n=e)=>{if(!s.path||!n)return;const t=Object.assign({},(n==null?void 0:n.head)||{});t.meta=[...t.meta||[]],t.link=[...t.link||[]];const r=t.title||(n==null?void 0:n.title);r&&(t.title=r),m.public.content.host;const c=(t==null?void 0:t.description)||(n==null?void 0:n.description);c&&t.meta.filter(l=>l.name==="description").length===0&&t.meta.push({name:"description",content:c}),t!=null&&t.image||(n==null||n.image),D(()=>H(t))},{immediate:!0})},$=S({name:"ContentDoc",props:{tag:{type:String,required:!1,default:"div"},excerpt:{type:Boolean,default:!1},path:{type:String,required:!1,default:void 0},query:{type:Object,required:!1,default:void 0},head:{type:Boolean,required:!1,default:void 0}},render(u){const{contentHead:s}=g().public.content,e=_(),{tag:m,excerpt:f,path:n,query:t,head:r}=u,c=r===void 0?s:r,l={...t||{},path:n||(t==null?void 0:t.path)||b(y().path),find:"one"},v=(o,i)=>p("pre",null,JSON.stringify({message:"You should use slots with ",slot:o,data:i},null,2));return p(x,l,{default:e!=null&&e.default?({data:o,refresh:i,isPartial:C})=>{var h;return c&&a(o),(h=e.default)==null?void 0:h.call(e,{doc:o,refresh:i,isPartial:C,excerpt:f,...this.$attrs})}:({data:o})=>(c&&a(o),p(q,{value:o,excerpt:f,tag:m,...this.$attrs},{empty:i=>e!=null&&e.empty?e.empty(i):v("default",o)})),empty:o=>{var i;return((i=e==null?void 0:e.empty)==null?void 0:i.call(e,o))||p("p",null,"Document is empty, overwrite this content with #empty slot in .")},"not-found":o=>{var i;return((i=e==null?void 0:e["not-found"])==null?void 0:i.call(e,o))||p("p",null,"Document not found, overwrite this content with #not-found slot in .")}})}}),K=$;export{K as default}; +import{a as d,v as w,u as y,G as D,H,I as g,d as S,J as _,K as b,L as p}from"./BK37JMLf.js";import q from"./CW9x3cwD.js";import x from"./CkFsoPVF.js";import"./CWkD7dT7.js";import"./C-v3KzvZ.js";import"./CxYJgpPD.js";import"./DmH48LNN.js";import"./IShi1APO.js";import"./Dl5rqmmJ.js";import"./BUUEBr-A.js";const a=(u,s=y())=>{const e=d(u),m=g();w(()=>d(u),(n=e)=>{if(!s.path||!n)return;const t=Object.assign({},(n==null?void 0:n.head)||{});t.meta=[...t.meta||[]],t.link=[...t.link||[]];const r=t.title||(n==null?void 0:n.title);r&&(t.title=r),m.public.content.host;const c=(t==null?void 0:t.description)||(n==null?void 0:n.description);c&&t.meta.filter(l=>l.name==="description").length===0&&t.meta.push({name:"description",content:c}),t!=null&&t.image||(n==null||n.image),D(()=>H(t))},{immediate:!0})},$=S({name:"ContentDoc",props:{tag:{type:String,required:!1,default:"div"},excerpt:{type:Boolean,default:!1},path:{type:String,required:!1,default:void 0},query:{type:Object,required:!1,default:void 0},head:{type:Boolean,required:!1,default:void 0}},render(u){const{contentHead:s}=g().public.content,e=_(),{tag:m,excerpt:f,path:n,query:t,head:r}=u,c=r===void 0?s:r,l={...t||{},path:n||(t==null?void 0:t.path)||b(y().path),find:"one"},v=(o,i)=>p("pre",null,JSON.stringify({message:"You should use slots with ",slot:o,data:i},null,2));return p(x,l,{default:e!=null&&e.default?({data:o,refresh:i,isPartial:C})=>{var h;return c&&a(o),(h=e.default)==null?void 0:h.call(e,{doc:o,refresh:i,isPartial:C,excerpt:f,...this.$attrs})}:({data:o})=>(c&&a(o),p(q,{value:o,excerpt:f,tag:m,...this.$attrs},{empty:i=>e!=null&&e.empty?e.empty(i):v("default",o)})),empty:o=>{var i;return((i=e==null?void 0:e.empty)==null?void 0:i.call(e,o))||p("p",null,"Document is empty, overwrite this content with #empty slot in .")},"not-found":o=>{var i;return((i=e==null?void 0:e["not-found"])==null?void 0:i.call(e,o))||p("p",null,"Document not found, overwrite this content with #not-found slot in .")}})}}),K=$;export{K as default}; diff --git a/_nuxt/BmBAb7Zb.js b/_nuxt/Crie1bW-.js similarity index 93% rename from _nuxt/BmBAb7Zb.js rename to _nuxt/Crie1bW-.js index ee6926fe..2f76a96c 100644 --- a/_nuxt/BmBAb7Zb.js +++ b/_nuxt/Crie1bW-.js @@ -1 +1 @@ -import{m as s,o as l,c as a,b as t,a9 as r,i as c,f as i,_ as d}from"./nJJO8dFm.js";const _={},u={class:"container mx-auto my-12 h-screen bg-background font-display lg:my-16"},f={class:"flex flex-col border-2 bg-white"},m={class:"absolute left-2 top-2"};function h(o,e){const n=d;return l(),a("main",null,[t("div",u,[t("div",f,[r(o.$slots,"default")])]),t("div",m,[c(n,{as:"button",to:"/playground",class:"inline-flex items-center rounded px-4 py-2 font-bold text-white hover:text-cyan"},{default:i(()=>e[0]||(e[0]=[t("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"mr-2 h-6 w-6"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M15.75 9V5.25A2.25 2.25 0 0013.5 3h-6a2.25 2.25 0 00-2.25 2.25v13.5A2.25 2.25 0 007.5 21h6a2.25 2.25 0 002.25-2.25V15M12 9l-3 3m0 0l3 3m-3-3h12.75"})],-1),t("span",null,"Back",-1)])),_:1})])])}const x=s(_,[["render",h]]);export{x as default}; +import{m as s,o as l,c as a,b as t,a9 as r,i as c,f as i,_ as d}from"./BK37JMLf.js";const _={},u={class:"container mx-auto my-12 h-screen bg-background font-display lg:my-16"},f={class:"flex flex-col border-2 bg-white"},m={class:"absolute left-2 top-2"};function h(o,e){const n=d;return l(),a("main",null,[t("div",u,[t("div",f,[r(o.$slots,"default")])]),t("div",m,[c(n,{as:"button",to:"/playground",class:"inline-flex items-center rounded px-4 py-2 font-bold text-white hover:text-cyan"},{default:i(()=>e[0]||(e[0]=[t("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"mr-2 h-6 w-6"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M15.75 9V5.25A2.25 2.25 0 0013.5 3h-6a2.25 2.25 0 00-2.25 2.25v13.5A2.25 2.25 0 007.5 21h6a2.25 2.25 0 002.25-2.25V15M12 9l-3 3m0 0l3 3m-3-3h12.75"})],-1),t("span",null,"Back",-1)])),_:1})])])}const x=s(_,[["render",h]]);export{x as default}; diff --git a/_nuxt/YC6j4shX.js b/_nuxt/D1pfiUWe.js similarity index 96% rename from _nuxt/YC6j4shX.js rename to _nuxt/D1pfiUWe.js index ca25865a..63b21c0c 100644 --- a/_nuxt/YC6j4shX.js +++ b/_nuxt/D1pfiUWe.js @@ -1 +1 @@ -import{m as p,o as b,c,b as i,C as r,D as m,i as u}from"./nJJO8dFm.js";const w={props:{id:{type:String,default:"canvas"},canvasHeight:{type:Number,default:250},type:{type:String,default:"sin"},diameter:{type:Number,default:15},amplitude:{type:Number,default:75},lambda:{type:Number,default:266}},mounted(){const o=e=>{const a=e.windowWidth>=450?this.canvasHeight:200,s=e.windowWidth>=450?800:300;let t=0,d=a/2,n=0;const l=100,v=125;e.setup=()=>{e.createCanvas(s,a),t=-this.diameter},e.draw=()=>{this.type==="sin"?d=this.amplitude*e.sin(t*(e.TWO_PI/this.lambda))+a/2:this.type==="cos"?d=this.amplitude*e.cos(t*(e.TWO_PI/this.lambda))+a/2:this.type==="tan"?d=this.amplitude*e.tan(t*(e.TWO_PI/this.lambda))+a/2:d=a/2,n=Math.round(e.map(d,-this.amplitude+a/2,this.amplitude+a/2,0,255)),t=t>=s+this.diameter?-this.diameter:t+1,e.noStroke(),e.fill(e.color(n,l,v)),e.ellipse(t,d,this.diameter,this.diameter)},e.mousePressed=()=>{e.clear()}};new this.$p5(o,this.id)},data(){return{}}},f=["id"];function h(o,e,a,s,t,d){return b(),c("div",{id:a.id},null,8,f)}const y=p(w,[["render",h]]),_={data(){return{wave:{amplitude:75,lambda:266,diameter:15}}}},x={class:"bg-gradient-to-b from-green-800 to-gray-800"},g={class:"grid h-screen place-items-center"},I={class:"font-mono text-white"},k={class:"my-2 items-end md:flex"},W={class:"hidden md:block"},N={class:"mb-2 border-2 border-white"},T={class:"mb-2 border-2 border-white"},H={class:"border-2 border-white"};function P(o,e,a,s,t,d){const n=y;return b(),c("div",x,[i("div",g,[i("div",I,[i("div",k,[e[6]||(e[6]=i("div",{class:"flex-none md:flex-1"},"y(x) = A sin((2π / λ) x)",-1)),i("div",W,[e[3]||(e[3]=i("label",{for:"aInput",class:"form-label inline-block"},"A",-1)),r(i("input",{id:"aInput","onUpdate:modelValue":e[0]||(e[0]=l=>t.wave.amplitude=l),type:"number",class:"w-16 border-2 border-white bg-transparent p-2 focus:outline-none"},null,512),[[m,t.wave.amplitude,void 0,{number:!0}]]),e[4]||(e[4]=i("label",{for:"lInput",class:"form-label inline-block"},"λ",-1)),r(i("input",{id:"lInput","onUpdate:modelValue":e[1]||(e[1]=l=>t.wave.lambda=l),type:"number",class:"w-16 border-2 border-white bg-transparent p-2 focus:outline-none"},null,512),[[m,t.wave.lambda,void 0,{number:!0}]]),e[5]||(e[5]=i("label",{for:"dInput",class:"form-label inline-block"},"◒",-1)),r(i("input",{id:"dInput","onUpdate:modelValue":e[2]||(e[2]=l=>t.wave.diameter=l),type:"number",class:"w-16 border-2 border-white bg-transparent p-2 focus:outline-none"},null,512),[[m,t.wave.diameter,void 0,{number:!0}]])])]),i("div",N,[u(n,{id:"canvas1",type:"sin",diameter:t.wave.diameter,amplitude:t.wave.amplitude,lambda:t.wave.lambda},null,8,["diameter","amplitude","lambda"])]),e[7]||(e[7]=i("div",null,"y(x) = A cos((2π / λ) x)",-1)),i("div",T,[u(n,{id:"canvas2",type:"cos",diameter:t.wave.diameter,amplitude:t.wave.amplitude,lambda:t.wave.lambda},null,8,["diameter","amplitude","lambda"])]),e[8]||(e[8]=i("div",null,"y(x) = A tan((2π / λ) x)",-1)),i("div",H,[u(n,{id:"canvas3",type:"tan",diameter:t.wave.diameter,amplitude:t.wave.amplitude,lambda:t.wave.lambda},null,8,["diameter","amplitude","lambda"])]),e[9]||(e[9]=i("div",{class:"my-2 w-48 md:w-full"}," Click or tap anywhere to clear the canvas! ",-1))])])])}const A=p(_,[["render",P]]);export{A as default}; +import{m as p,o as b,c,b as i,C as r,D as m,i as u}from"./BK37JMLf.js";const w={props:{id:{type:String,default:"canvas"},canvasHeight:{type:Number,default:250},type:{type:String,default:"sin"},diameter:{type:Number,default:15},amplitude:{type:Number,default:75},lambda:{type:Number,default:266}},mounted(){const o=e=>{const a=e.windowWidth>=450?this.canvasHeight:200,s=e.windowWidth>=450?800:300;let t=0,d=a/2,n=0;const l=100,v=125;e.setup=()=>{e.createCanvas(s,a),t=-this.diameter},e.draw=()=>{this.type==="sin"?d=this.amplitude*e.sin(t*(e.TWO_PI/this.lambda))+a/2:this.type==="cos"?d=this.amplitude*e.cos(t*(e.TWO_PI/this.lambda))+a/2:this.type==="tan"?d=this.amplitude*e.tan(t*(e.TWO_PI/this.lambda))+a/2:d=a/2,n=Math.round(e.map(d,-this.amplitude+a/2,this.amplitude+a/2,0,255)),t=t>=s+this.diameter?-this.diameter:t+1,e.noStroke(),e.fill(e.color(n,l,v)),e.ellipse(t,d,this.diameter,this.diameter)},e.mousePressed=()=>{e.clear()}};new this.$p5(o,this.id)},data(){return{}}},f=["id"];function h(o,e,a,s,t,d){return b(),c("div",{id:a.id},null,8,f)}const y=p(w,[["render",h]]),_={data(){return{wave:{amplitude:75,lambda:266,diameter:15}}}},x={class:"bg-gradient-to-b from-green-800 to-gray-800"},g={class:"grid h-screen place-items-center"},I={class:"font-mono text-white"},k={class:"my-2 items-end md:flex"},W={class:"hidden md:block"},N={class:"mb-2 border-2 border-white"},T={class:"mb-2 border-2 border-white"},H={class:"border-2 border-white"};function P(o,e,a,s,t,d){const n=y;return b(),c("div",x,[i("div",g,[i("div",I,[i("div",k,[e[6]||(e[6]=i("div",{class:"flex-none md:flex-1"},"y(x) = A sin((2π / λ) x)",-1)),i("div",W,[e[3]||(e[3]=i("label",{for:"aInput",class:"form-label inline-block"},"A",-1)),r(i("input",{id:"aInput","onUpdate:modelValue":e[0]||(e[0]=l=>t.wave.amplitude=l),type:"number",class:"w-16 border-2 border-white bg-transparent p-2 focus:outline-none"},null,512),[[m,t.wave.amplitude,void 0,{number:!0}]]),e[4]||(e[4]=i("label",{for:"lInput",class:"form-label inline-block"},"λ",-1)),r(i("input",{id:"lInput","onUpdate:modelValue":e[1]||(e[1]=l=>t.wave.lambda=l),type:"number",class:"w-16 border-2 border-white bg-transparent p-2 focus:outline-none"},null,512),[[m,t.wave.lambda,void 0,{number:!0}]]),e[5]||(e[5]=i("label",{for:"dInput",class:"form-label inline-block"},"◒",-1)),r(i("input",{id:"dInput","onUpdate:modelValue":e[2]||(e[2]=l=>t.wave.diameter=l),type:"number",class:"w-16 border-2 border-white bg-transparent p-2 focus:outline-none"},null,512),[[m,t.wave.diameter,void 0,{number:!0}]])])]),i("div",N,[u(n,{id:"canvas1",type:"sin",diameter:t.wave.diameter,amplitude:t.wave.amplitude,lambda:t.wave.lambda},null,8,["diameter","amplitude","lambda"])]),e[7]||(e[7]=i("div",null,"y(x) = A cos((2π / λ) x)",-1)),i("div",T,[u(n,{id:"canvas2",type:"cos",diameter:t.wave.diameter,amplitude:t.wave.amplitude,lambda:t.wave.lambda},null,8,["diameter","amplitude","lambda"])]),e[8]||(e[8]=i("div",null,"y(x) = A tan((2π / λ) x)",-1)),i("div",H,[u(n,{id:"canvas3",type:"tan",diameter:t.wave.diameter,amplitude:t.wave.amplitude,lambda:t.wave.lambda},null,8,["diameter","amplitude","lambda"])]),e[9]||(e[9]=i("div",{class:"my-2 w-48 md:w-full"}," Click or tap anywhere to clear the canvas! ",-1))])])])}const A=p(_,[["render",P]]);export{A as default}; diff --git a/_nuxt/CMz-STw3.js b/_nuxt/DA-iSWSz.js similarity index 65% rename from _nuxt/CMz-STw3.js rename to _nuxt/DA-iSWSz.js index 0521e890..11924c9e 100644 --- a/_nuxt/CMz-STw3.js +++ b/_nuxt/DA-iSWSz.js @@ -1 +1 @@ -import{m as o,o as n,c as r,a9 as c}from"./nJJO8dFm.js";const s={};function t(e,a){return n(),r("code",null,[c(e.$slots,"default")])}const d=o(s,[["render",t]]);export{d as default}; +import{m as o,o as n,c as r,a9 as c}from"./BK37JMLf.js";const s={};function t(e,a){return n(),r("code",null,[c(e.$slots,"default")])}const d=o(s,[["render",t]]);export{d as default}; diff --git a/_nuxt/rioP87fJ.js b/_nuxt/DAGTk_Eg.js similarity index 98% rename from _nuxt/rioP87fJ.js rename to _nuxt/DAGTk_Eg.js index 44542a6f..729f9719 100644 --- a/_nuxt/rioP87fJ.js +++ b/_nuxt/DAGTk_Eg.js @@ -1 +1 @@ -import{m as _,c as l,b as s,g as y,l as p,h as g,F as b,r as m,o as n,t as f}from"./nJJO8dFm.js";const v={data(){return{ix:0,a:[],b:[],timeline:[]}},computed:{step(){return this.timeline.length>0?this.timeline[this.ix]:{}},done(){return this.timeline.length-1===this.ix},started(){return this.timeline.length>0}},mounted(){this.generateRandomMatrices()},created(){typeof window>"u"||window.addEventListener("keydown",o=>{o.key===" "?this.incStep():o.key==="Escape"&&(this.ix=0)})},methods:{randomMatrix(o,t){const c=[];for(let h=0;hMath.round(Math.random()*10)));return c},generateRandomMatrices(){this.a=this.randomMatrix(3,4),this.b=this.randomMatrix(4,3),this.timeline=[],this.ix=0},matmul(o,t){this.timeline=[];const c=[];for(let i=0;i{t[e].forEach((a,r)=>{const x=[];o[e].forEach((d,u)=>{x.push(`${o[r][u]}*${t[u][e]}`),c[r][e]+=o[r][u]*t[u][e],h[e*o.length+r]=`${x.join(" + ")} = ${c[r][e]}`;const w=JSON.parse(JSON.stringify(c));this.timeline.push({row_a:r,col_a:u,row_b:u,col_b:e,row_c:r,col_c:e,cur_a:o[r][u],cur_b:t[u][e],cur_c:c[r][e],c:w,all_steps:h.slice()})})})})},incStep(){this.ix!==this.timeline.length-1&&(this.ix+=1)},decStep(){this.ix>0&&(this.ix-=1)}}},k={class:"m-4 space-y-4"},M={class:"m-2 inline-flex space-x-2"},S=["disabled"],C=["disabled"],B={class:"flex flex-wrap"},E={class:"w-34 m-2 border border-gray-400 sm:w-min"},A={class:"flex items-center justify-center p-4"},N={class:"text-center"},R={class:"w-34 m-2 border border-gray-400 sm:w-min"},V={class:"flex items-center justify-center p-4"},D={class:"text-center"},F={class:"flex items-center justify-center p-4"},J={class:"text-center"},L={key:1,class:"m-2 w-72 border border-gray-400 bg-gray-100 p-2"},O={class:"font-mono"},z={key:0,class:"italic text-green-600"};function P(o,t,c,h,i,e){return n(),l("div",k,[t[10]||(t[10]=s("div",{class:"m-2 w-4/5"},[y(" Walk through the steps of matrix multiplication with randomly generated matrices. Press the "),s("em",null,"Spacebar"),y(" or click the "),s("em",{class:"bg-blue-200 text-blue-800"},"buttons"),y(" to iterate through the steps. ")],-1)),s("div",M,[s("button",{class:p(["bg-blue-200 px-4 py-2 font-bold text-blue-800 hover:bg-blue-800 hover:text-blue-200",{"cursor-not-allowed opacity-25":!e.started}]),disabled:!e.started,onClick:t[0]||(t[0]=(...a)=>e.decStep&&e.decStep(...a))},t[4]||(t[4]=[s("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[s("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M11 19l-7-7 7-7m8 14l-7-7 7-7"})],-1)]),10,S),e.done?g("",!0):(n(),l("button",{key:0,class:"bg-blue-200 px-4 py-2 font-bold text-blue-800 hover:bg-blue-800 hover:text-blue-200",onClick:t[1]||(t[1]=a=>e.matmul(i.a,i.b))}," Start ")),e.done?(n(),l("button",{key:1,class:"bg-orange-200 px-4 py-2 font-bold text-orange-800 hover:bg-blue-800 hover:text-blue-200",onClick:t[2]||(t[2]=(...a)=>e.generateRandomMatrices&&e.generateRandomMatrices(...a))}," Again! ")):g("",!0),s("button",{class:p(["bg-blue-200 px-4 py-2 font-bold text-blue-800 hover:bg-blue-800 hover:text-blue-200",{"cursor-not-allowed opacity-25":!e.started}]),disabled:!e.started,onClick:t[3]||(t[3]=(...a)=>e.incStep&&e.incStep(...a))},t[5]||(t[5]=[s("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[s("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M13 5l7 7-7 7M5 5l7 7-7 7"})],-1)]),10,C)]),s("div",B,[s("div",E,[t[6]||(t[6]=s("div",{class:"bg-gray-200 p-4 text-center font-bold"},"Matrix A",-1)),s("div",A,[s("table",N,[(n(!0),l(b,null,m(i.a,(a,r)=>(n(),l("tr",{key:r},[(n(!0),l(b,null,m(i.a[r],(x,d)=>(n(),l("td",{key:d,class:p([{"text-green-600":e.step&&r==e.step.row_a&&d==e.step.col_a,"bg-orange-100":e.step&&r==e.step.row_a},"p-2"])},f(i.a[r][d]),3))),128))]))),128))])])]),s("div",R,[t[7]||(t[7]=s("div",{class:"bg-gray-200 p-4 text-center font-bold"},"Matrix B",-1)),s("div",V,[s("table",D,[(n(!0),l(b,null,m(i.b,(a,r)=>(n(),l("tr",{key:r},[(n(!0),l(b,null,m(i.b[r],(x,d)=>(n(),l("td",{key:d,class:p([{"text-green-600":e.step&&r==e.step.row_b&&d==e.step.col_b,"bg-orange-100":e.step&&d==e.step.col_b},"p-2"])},f(i.b[r][d]),3))),128))]))),128))])])]),e.started?(n(),l("div",{key:0,class:p(["m-2 w-72 border border-gray-400 sm:w-min",{"bg-green-200":e.done}])},[t[8]||(t[8]=s("div",{class:"bg-gray-200 p-4 text-center font-bold"},"Result",-1)),s("div",F,[s("table",J,[(n(!0),l(b,null,m(e.step.c,(a,r)=>(n(),l("tr",{key:r},[(n(!0),l(b,null,m(e.step.c[r],(x,d)=>(n(),l("td",{key:d,class:"p-2"},f(e.step.c[r][d]),1))),128))]))),128))])])],2)):g("",!0),e.started?(n(),l("div",L,[t[9]||(t[9]=s("div",{class:"text-center font-bold"},"Steps",-1)),s("div",O,[(n(!0),l(b,null,m(e.step.all_steps,(a,r)=>(n(),l("div",{key:r},f(a),1))),128)),e.done?(n(),l("div",z,"Done!")):g("",!0)])])):g("",!0)]),g("",!0)])}const W=_(v,[["render",P]]);export{W as default}; +import{m as _,c as l,b as s,g as y,l as p,h as g,F as b,r as m,o as n,t as f}from"./BK37JMLf.js";const v={data(){return{ix:0,a:[],b:[],timeline:[]}},computed:{step(){return this.timeline.length>0?this.timeline[this.ix]:{}},done(){return this.timeline.length-1===this.ix},started(){return this.timeline.length>0}},mounted(){this.generateRandomMatrices()},created(){typeof window>"u"||window.addEventListener("keydown",o=>{o.key===" "?this.incStep():o.key==="Escape"&&(this.ix=0)})},methods:{randomMatrix(o,t){const c=[];for(let h=0;hMath.round(Math.random()*10)));return c},generateRandomMatrices(){this.a=this.randomMatrix(3,4),this.b=this.randomMatrix(4,3),this.timeline=[],this.ix=0},matmul(o,t){this.timeline=[];const c=[];for(let i=0;i{t[e].forEach((a,r)=>{const x=[];o[e].forEach((d,u)=>{x.push(`${o[r][u]}*${t[u][e]}`),c[r][e]+=o[r][u]*t[u][e],h[e*o.length+r]=`${x.join(" + ")} = ${c[r][e]}`;const w=JSON.parse(JSON.stringify(c));this.timeline.push({row_a:r,col_a:u,row_b:u,col_b:e,row_c:r,col_c:e,cur_a:o[r][u],cur_b:t[u][e],cur_c:c[r][e],c:w,all_steps:h.slice()})})})})},incStep(){this.ix!==this.timeline.length-1&&(this.ix+=1)},decStep(){this.ix>0&&(this.ix-=1)}}},k={class:"m-4 space-y-4"},M={class:"m-2 inline-flex space-x-2"},S=["disabled"],C=["disabled"],B={class:"flex flex-wrap"},E={class:"w-34 m-2 border border-gray-400 sm:w-min"},A={class:"flex items-center justify-center p-4"},N={class:"text-center"},R={class:"w-34 m-2 border border-gray-400 sm:w-min"},V={class:"flex items-center justify-center p-4"},D={class:"text-center"},F={class:"flex items-center justify-center p-4"},J={class:"text-center"},L={key:1,class:"m-2 w-72 border border-gray-400 bg-gray-100 p-2"},O={class:"font-mono"},z={key:0,class:"italic text-green-600"};function P(o,t,c,h,i,e){return n(),l("div",k,[t[10]||(t[10]=s("div",{class:"m-2 w-4/5"},[y(" Walk through the steps of matrix multiplication with randomly generated matrices. Press the "),s("em",null,"Spacebar"),y(" or click the "),s("em",{class:"bg-blue-200 text-blue-800"},"buttons"),y(" to iterate through the steps. ")],-1)),s("div",M,[s("button",{class:p(["bg-blue-200 px-4 py-2 font-bold text-blue-800 hover:bg-blue-800 hover:text-blue-200",{"cursor-not-allowed opacity-25":!e.started}]),disabled:!e.started,onClick:t[0]||(t[0]=(...a)=>e.decStep&&e.decStep(...a))},t[4]||(t[4]=[s("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[s("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M11 19l-7-7 7-7m8 14l-7-7 7-7"})],-1)]),10,S),e.done?g("",!0):(n(),l("button",{key:0,class:"bg-blue-200 px-4 py-2 font-bold text-blue-800 hover:bg-blue-800 hover:text-blue-200",onClick:t[1]||(t[1]=a=>e.matmul(i.a,i.b))}," Start ")),e.done?(n(),l("button",{key:1,class:"bg-orange-200 px-4 py-2 font-bold text-orange-800 hover:bg-blue-800 hover:text-blue-200",onClick:t[2]||(t[2]=(...a)=>e.generateRandomMatrices&&e.generateRandomMatrices(...a))}," Again! ")):g("",!0),s("button",{class:p(["bg-blue-200 px-4 py-2 font-bold text-blue-800 hover:bg-blue-800 hover:text-blue-200",{"cursor-not-allowed opacity-25":!e.started}]),disabled:!e.started,onClick:t[3]||(t[3]=(...a)=>e.incStep&&e.incStep(...a))},t[5]||(t[5]=[s("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[s("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M13 5l7 7-7 7M5 5l7 7-7 7"})],-1)]),10,C)]),s("div",B,[s("div",E,[t[6]||(t[6]=s("div",{class:"bg-gray-200 p-4 text-center font-bold"},"Matrix A",-1)),s("div",A,[s("table",N,[(n(!0),l(b,null,m(i.a,(a,r)=>(n(),l("tr",{key:r},[(n(!0),l(b,null,m(i.a[r],(x,d)=>(n(),l("td",{key:d,class:p([{"text-green-600":e.step&&r==e.step.row_a&&d==e.step.col_a,"bg-orange-100":e.step&&r==e.step.row_a},"p-2"])},f(i.a[r][d]),3))),128))]))),128))])])]),s("div",R,[t[7]||(t[7]=s("div",{class:"bg-gray-200 p-4 text-center font-bold"},"Matrix B",-1)),s("div",V,[s("table",D,[(n(!0),l(b,null,m(i.b,(a,r)=>(n(),l("tr",{key:r},[(n(!0),l(b,null,m(i.b[r],(x,d)=>(n(),l("td",{key:d,class:p([{"text-green-600":e.step&&r==e.step.row_b&&d==e.step.col_b,"bg-orange-100":e.step&&d==e.step.col_b},"p-2"])},f(i.b[r][d]),3))),128))]))),128))])])]),e.started?(n(),l("div",{key:0,class:p(["m-2 w-72 border border-gray-400 sm:w-min",{"bg-green-200":e.done}])},[t[8]||(t[8]=s("div",{class:"bg-gray-200 p-4 text-center font-bold"},"Result",-1)),s("div",F,[s("table",J,[(n(!0),l(b,null,m(e.step.c,(a,r)=>(n(),l("tr",{key:r},[(n(!0),l(b,null,m(e.step.c[r],(x,d)=>(n(),l("td",{key:d,class:"p-2"},f(e.step.c[r][d]),1))),128))]))),128))])])],2)):g("",!0),e.started?(n(),l("div",L,[t[9]||(t[9]=s("div",{class:"text-center font-bold"},"Steps",-1)),s("div",O,[(n(!0),l(b,null,m(e.step.all_steps,(a,r)=>(n(),l("div",{key:r},f(a),1))),128)),e.done?(n(),l("div",z,"Done!")):g("",!0)])])):g("",!0)]),g("",!0)])}const W=_(v,[["render",P]]);export{W as default}; diff --git a/_nuxt/Bmi1Nzyj.js b/_nuxt/DCC38KAX.js similarity index 78% rename from _nuxt/Bmi1Nzyj.js rename to _nuxt/DCC38KAX.js index 9a7c702a..31f4b71f 100644 --- a/_nuxt/Bmi1Nzyj.js +++ b/_nuxt/DCC38KAX.js @@ -1 +1 @@ -import n from"./Bmp1QHsv.js";import{d as c,J as l,L as u}from"./nJJO8dFm.js";import"./IShi1APO.js";import"./BBOrgyAk.js";import"./axEFYTs9.js";import"./DFIm0aE1.js";const p=(r,t)=>u("pre",null,JSON.stringify({message:"You should use slots with ",slot:r,data:t},null,2)),h=c({name:"ContentList",props:{path:{type:String,required:!1,default:void 0},query:{type:Object,required:!1,default:void 0}},render(r){const t=l(),{path:f,query:a}=r,m={...a||{},path:f||(a==null?void 0:a.path)||"/"};return u(n,m,{default:t!=null&&t.default?({data:e,refresh:o,isPartial:d})=>t.default({list:e,refresh:o,isPartial:d,...this.$attrs}):e=>p("default",e.data),empty:e=>t!=null&&t.empty?t.empty(e):p("default",e==null?void 0:e.data),"not-found":e=>{var o;return t!=null&&t["not-found"]?(o=t==null?void 0:t["not-found"])==null?void 0:o.call(t,e):p("not-found",e==null?void 0:e.data)}})}}),i=h;export{i as default}; +import n from"./CkFsoPVF.js";import{d as c,J as l,L as u}from"./BK37JMLf.js";import"./IShi1APO.js";import"./Dl5rqmmJ.js";import"./BUUEBr-A.js";import"./DmH48LNN.js";const p=(r,t)=>u("pre",null,JSON.stringify({message:"You should use slots with ",slot:r,data:t},null,2)),h=c({name:"ContentList",props:{path:{type:String,required:!1,default:void 0},query:{type:Object,required:!1,default:void 0}},render(r){const t=l(),{path:f,query:a}=r,m={...a||{},path:f||(a==null?void 0:a.path)||"/"};return u(n,m,{default:t!=null&&t.default?({data:e,refresh:o,isPartial:d})=>t.default({list:e,refresh:o,isPartial:d,...this.$attrs}):e=>p("default",e.data),empty:e=>t!=null&&t.empty?t.empty(e):p("default",e==null?void 0:e.data),"not-found":e=>{var o;return t!=null&&t["not-found"]?(o=t==null?void 0:t["not-found"])==null?void 0:o.call(t,e):p("not-found",e==null?void 0:e.data)}})}}),i=h;export{i as default}; diff --git a/_nuxt/g3vSkNzf.js b/_nuxt/DCo587Oy.js similarity index 89% rename from _nuxt/g3vSkNzf.js rename to _nuxt/DCo587Oy.js index e2d77c3b..48866992 100644 --- a/_nuxt/g3vSkNzf.js +++ b/_nuxt/DCo587Oy.js @@ -1 +1 @@ -import{d as n,k as o,R as c,K as h,I as p,U as l,o as u,e as d,a,ab as m}from"./nJJO8dFm.js";const g="img",S=n({__name:"ProseImg",props:{src:{type:String,default:""},alt:{type:String,default:""},width:{type:[String,Number],default:void 0},height:{type:[String,Number],default:void 0}},setup(r){const t=r,i=o(()=>{var s;if((s=t.src)!=null&&s.startsWith("/")&&!t.src.startsWith("//")){const e=c(h(p().app.baseURL));if(e!=="/"&&!t.src.startsWith(e))return l(e,t.src)}return t.src});return(s,e)=>(u(),d(m(a(g)),{src:a(i),alt:t.alt,width:t.width,height:t.height},null,8,["src","alt","width","height"]))}});export{S as default}; +import{d as n,k as o,R as c,K as h,I as p,U as l,o as u,e as d,a,ab as m}from"./BK37JMLf.js";const g="img",S=n({__name:"ProseImg",props:{src:{type:String,default:""},alt:{type:String,default:""},width:{type:[String,Number],default:void 0},height:{type:[String,Number],default:void 0}},setup(r){const t=r,i=o(()=>{var s;if((s=t.src)!=null&&s.startsWith("/")&&!t.src.startsWith("//")){const e=c(h(p().app.baseURL));if(e!=="/"&&!t.src.startsWith(e))return l(e,t.src)}return t.src});return(s,e)=>(u(),d(m(a(g)),{src:a(i),alt:t.alt,width:t.width,height:t.height},null,8,["src","alt","width","height"]))}});export{S as default}; diff --git a/_nuxt/BPM8Blb7.js b/_nuxt/DEIA3vjx.js similarity index 99% rename from _nuxt/BPM8Blb7.js rename to _nuxt/DEIA3vjx.js index 08581c19..2cb6eb0c 100644 --- a/_nuxt/BPM8Blb7.js +++ b/_nuxt/DEIA3vjx.js @@ -1 +1 @@ -import{m as g,c as u,b as n,C as d,D as a,t as c,o as h}from"./nJJO8dFm.js";const p={data(){return{height:0,width:0,distance:3,strokeWidth:1,startingX:125,startingY:150,startingAngle:0,sequence:"3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632788659361533818279682303019520353018529689957736225994138912497217752834791315155748572424541506959508295331168617278558890750983817546374649393192550604009277016711390098488240128583616035637076601047101819429555961989467678374494482553797747268471040475346462080466842590694912933136770289891521047521620569660240580381501935112533824300355876402474964732639141992726042699227967823547816360093417216412199245863150302861829745557067498385054945885869269956909272107975093029553211653449872027559602364806654991198818347977535663698074265425278625518184175746728909777727938000816470600161452491921732172147723501414419735685481613611573525521334757418494684385233239073941433345477624168625189835694855620992192221842725502542568876717904946016534668049886272327917860857843838279679766814541009538837863609506800642251252051173929848960841284886269456042419652850222106611863067442786220391949450471237137869609563643719172874677646575739624138908658326459958133904780275900994657640789512694683983525957098258226205224894077267194782684826014769909026401363944374553050682034962524517493996514314298091906592509372216964615157098583874105978859597729754989301617539284681382686838689427741559918559252459539594310499725246808459872736446958486538367362226260991246080512438843904512441365497627807977156914359977001296160894416948685558484063534220722258284886481584560285060168427394522674676788952521385225499546667278239864565961163548862305774564980355936345681743241125150760694794510965960940252288797108931456691368672287489405601015033086179286809208747609178249385890097149096759852613655497818931297848216829989487226588048575640142704775551323796414515237462343645428584447952658678210511413547357395231134271661021359695362314429524849371871101457654035902799344037420073105785390621983874478084784896833214457138687519435064302184531910484810053706146806749192781911979399520614196634287544406437451237181921799983910159195618146751426912397489409071864942319615679452080951465502252316038819301420937621378559566389377870830390697920773467221825625996615014215030680384477345492026054146659252014974428507325186660021324340881907104863317346496514539057962685610055081066587969981635747363840525714591028970641401109712062804390397595156771577004203378699360072305587631763594218731251471205329281918261861258673215791984148488291644706095752706957220917567116722910981690915280173506712748583222871835209353965725121083579151369882091444210067510334671103141267111369908658516398315019701651511685171437657618351556508849099898599823873455283316355076479185358932261854896321329330898570642046752590709154814165498594616371802709819943099244889575712828905923233260972997120844335732654893823911932597463667305836041428138830320382490375898524374417029132765618093773444030707469211201913020330380197621101100449293215160842444859637669838952286847831235526582131449576857262433441893039686426243410773226978028073189154411010446823252716201052652272111660396665573092547110557853763466820653109896526918620564769312570586356620185581007293606598764861179104533488503461136576867532494416680396265797877185560845529654126654085306143444318586769751456614068007002378776591344017127494704205622305389945613140711270004078547332699390814546646458807972708266830634328587856983052358089330657574067954571637752542021149557615814002501262285941302164715509792592309907965473761255176567513575178296664547791745011299614890304639947132962107340437518957359614589019389713111790429782856475032031986915140287080859904801094121472213179476477726224142548545403321571853061422881375850430633217518297986622371721591607716692547487389866549494501146540628433663937900397692656721463853067360965712091807638327166416274888800786925602902284721040317211860820419000422966171196377921337575114959501566049631862947265473642523081770367515906735023507283540567040386743513622224771589150495309844489333096340878076932599397805419341447377441842631298608099888687413260472156951623965864573021631598193195167353812974167729478672422924654366800980676928238280689964004824354037014163149658979409243237896907069779422362508221688957383798623001593776471651228935786015881617557829735233446042815126272037343146531977774160319906655418763979293344195215413418994854447345673831624993419131814809277771038638773431772075456545322077709212019051660962804909263601975988281613323166636528619326686336062735676303544776280350450777235547105859548702790814356240145171806246436267945612753181340783303362542327839449753824372058353114771199260638133467768796959703098339130771098704085913374641442822772634659470474587847787201927715280731767907707157213444730605700733492436931138350493163128404251219256517980694113528013147013047816437885185290928545201165839341965621349143415956258658655705526904965209858033850722426482939728584783163057777560688876446248246857926039535277348030480290058760758251047470916439613626760449256274204208320856611906254543372131535958450687724602901618766795240616342522577195429162991930645537799140373404328752628889639958794757291746426357455254079091451357111369410911939325191076020825202618798531887705842972591677813149699009019211697173727847684726860849003377024242916513005005168323364350389517029893922334517220138128069650117844087451960121228599371623130171144484640903890644954440061986907548516026327505298349187407866808818338510228334508504860825039302133219715518430635455007668282949304137765527939751754613953984683393638304746119966538581538420568533862186725233402830871123282789212507712629463229563989898935821167456270102183564622013496715188190973038119800497340723961036854066431939509790190699639552453005450580685501956730229219139339185680344903982059551002263535361920419947455385938102343955449597783779023742161727111723643435439478221818528624085140066604433258885698670543154706965747458550332323342107301545940516553790686627333799585115625784322988273723198987571415957811196358330059408730681216028764962867446047746491599505497374256269010490377819868359381465741268049256487985561453723478673303904688383436346553794986419270563872931748723320837601123029911367938627089438799362016295154133714248928307220126901475466847653576164773794675200490757155527819653621323926406160136358155907422020203187277605277219005561484255518792530343513984425322341576233610642506390497500865627109535919465897514131034822769306247435363256916078154781811528436679570611086153315044521274739245449454236828860613408414863776700961207151249140430272538607648236341433462351897576645216413767969031495019108575984423919862916421939949072362346468441173940326591840443780513338945257423995082965912285085558215725031071257012668302402929525220118726767562204154205161841634847565169998116141010029960783869092916030288400269104140792886215078424516709087000699282120660418371806535567252532567532861291042487761825829765157959847035622262934860034158722980534989650226291748788202734209222245339856264766914905562842503912757710284027998066365825488926488025456610172967026640765590429099456815065265305371829412703369313785178609040708667114965583434347693385781711386455873678123014587687126603489139095620099393610310291616152881384379099042317473363948045759314931405297634757481193567091101377517210080315590248530906692037671922033229094334676851422144773793937517034436619910403375111735471918550464490263655128162288244625759163330391072253837421821408835086573917715096828874782656995995744906617583441375223970968340800535598491754173818839994469748676265516582765848358845314277568790029095170283529716344562129640435231176006651012412006597558512761785838292041974844236080071930457618932349229279650198751872127267507981255470958904556357921221033346697499235630254947802490114195212382815309114079073860251522742995818072471625916685451333123948049470791191532673430282441860414263639548000448002670496248201792896476697583183271314251702969234889627668440323260927524960357996469256504936818360900323809293459588970695365349406034021665443755890045632882250545255640564482465151875471196218443965825337543885690941130315095261793780029741207665147939425902989695946995565761218656196733786236256125216320862869222103274889218654364802296780705765615144632046927906821207388377814233562823608963208068222468012248261177185896381409183903673672220888321513755600372798394004152970028783076670944474560134556417254370906979396122571429894671543578468788614445812314593571984922528471605049221242470141214780573455105008019086996033027634787081081754501193071412233908663938339529425786905076431006383519834389341596131854347546495569781038293097164651438407007073604112373599843452251610507027056235266012764848308407611830130527932054274628654036036745328651057065874882256981579367897669742205750596834408697350201410206723585020072452256326513410559240190274216248439140359989535394590944070469120914093870012645600162374288021092764579310657922955249887275846101264836999892256959688159205600101655256375678",sketch:void 0}},methods:{render(i){const e="0123456789",o=["#FFBA08","#FAA307","#F48C06","#E85D04","#DC2F02","#D00000","#9D0208","#6A040F","#370617","#03071E"],r={x:this.startingX,y:this.startingY,a:this.startingAngle};i.strokeWeight(this.strokeWidth),i.clear(),i.background(o[9]),i.beginShape(),i.vertex(r.x,r.y);for(let t=0;t{o.setup=()=>{o.createCanvas(this.width,this.height),o.noLoop(),o.noFill(),o.stroke(255),this.sketch=o,this.render(this.sketch)}};new this.$p5(e,"canvas")}},m={class:"select-none bg-gradient-to-b from-green-800 to-gray-800"},x={class:"m-8 grid place-items-center"},b={class:"font-mono text-white"},f={class:"my-2 md:w-full"},v={class:"grid-rows-auto my-2 grid grid-cols-2 gap-4 border-2 border-white p-2 md:grid-rows-1"},k={class:"flex flex-col"},y={for:"distanceInput",class:"text-right"},w={class:"flex flex-col"},A={for:"strokeInput",class:"text-right"},_={class:"flex flex-col"},I={for:"startingXInput",class:"text-right"},C={class:"flex flex-col"},D={for:"startingYInput",class:"text-right"},V={class:"flex flex-col"},W={for:"startingAngleInput",class:"text-right"};function X(i,e,o,r,t,l){return h(),u("div",m,[n("div",x,[n("div",b,[e[11]||(e[11]=n("div",{id:"canvas-container",class:"mb-2 h-96 border-2 border-white"},[n("div",{id:"canvas"})],-1)),n("div",f,[d(n("textarea",{readonly:"","onUpdate:modelValue":e[0]||(e[0]=s=>t.sequence=s),class:"block h-24 w-full border-2 border-white bg-black p-2 text-white placeholder:italic placeholder:text-slate-400 focus:border-2 focus:border-yellow-500 focus:outline-none sm:text-sm",placeholder:"Enter a sequence of numbers...",type:"text"},null,512),[[a,t.sequence]])]),n("div",v,[n("div",k,[n("label",y,"Segment Length ["+c(t.distance)+"]",1),d(n("input",{id:"distanceInput","onUpdate:modelValue":e[1]||(e[1]=s=>t.distance=s),onChange:e[2]||(e[2]=s=>l.render(t.sketch)),type:"range",min:"1",max:"25",class:"accent-black"},null,544),[[a,t.distance,void 0,{number:!0}]])]),n("div",w,[n("label",A,"Stroke Width ["+c(t.strokeWidth)+"]",1),d(n("input",{id:"strokeInput","onUpdate:modelValue":e[3]||(e[3]=s=>t.strokeWidth=s),onChange:e[4]||(e[4]=s=>l.render(t.sketch)),type:"range",min:"1",max:"10",class:"accent-black"},null,544),[[a,t.strokeWidth,void 0,{number:!0}]])]),n("div",_,[n("label",I,"X Position ["+c(t.startingX)+"]",1),d(n("input",{id:"startingXInput","onUpdate:modelValue":e[5]||(e[5]=s=>t.startingX=s),onChange:e[6]||(e[6]=s=>l.render(t.sketch)),type:"range",min:"0",max:"500",class:"accent-black"},null,544),[[a,t.startingX,void 0,{number:!0}]])]),n("div",C,[n("label",D,"Y Position ["+c(t.startingY)+"]",1),d(n("input",{id:"startingYInput","onUpdate:modelValue":e[7]||(e[7]=s=>t.startingY=s),onChange:e[8]||(e[8]=s=>l.render(t.sketch)),type:"range",min:"0",max:"500",class:"accent-black"},null,544),[[a,t.startingY,void 0,{number:!0}]])]),n("div",V,[n("label",W,"Angle ["+c(t.startingAngle)+"]",1),d(n("input",{id:"startingAngleInput","onUpdate:modelValue":e[9]||(e[9]=s=>t.startingAngle=s),onChange:e[10]||(e[10]=s=>l.render(t.sketch)),type:"range",min:"-180",max:"180",class:"accent-black"},null,544),[[a,t.startingAngle,void 0,{number:!0}]])])])])])])}const E=g(p,[["render",X]]);export{E as default}; +import{m as g,c as u,b as n,C as d,D as a,t as c,o as h}from"./BK37JMLf.js";const p={data(){return{height:0,width:0,distance:3,strokeWidth:1,startingX:125,startingY:150,startingAngle:0,sequence:"3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632788659361533818279682303019520353018529689957736225994138912497217752834791315155748572424541506959508295331168617278558890750983817546374649393192550604009277016711390098488240128583616035637076601047101819429555961989467678374494482553797747268471040475346462080466842590694912933136770289891521047521620569660240580381501935112533824300355876402474964732639141992726042699227967823547816360093417216412199245863150302861829745557067498385054945885869269956909272107975093029553211653449872027559602364806654991198818347977535663698074265425278625518184175746728909777727938000816470600161452491921732172147723501414419735685481613611573525521334757418494684385233239073941433345477624168625189835694855620992192221842725502542568876717904946016534668049886272327917860857843838279679766814541009538837863609506800642251252051173929848960841284886269456042419652850222106611863067442786220391949450471237137869609563643719172874677646575739624138908658326459958133904780275900994657640789512694683983525957098258226205224894077267194782684826014769909026401363944374553050682034962524517493996514314298091906592509372216964615157098583874105978859597729754989301617539284681382686838689427741559918559252459539594310499725246808459872736446958486538367362226260991246080512438843904512441365497627807977156914359977001296160894416948685558484063534220722258284886481584560285060168427394522674676788952521385225499546667278239864565961163548862305774564980355936345681743241125150760694794510965960940252288797108931456691368672287489405601015033086179286809208747609178249385890097149096759852613655497818931297848216829989487226588048575640142704775551323796414515237462343645428584447952658678210511413547357395231134271661021359695362314429524849371871101457654035902799344037420073105785390621983874478084784896833214457138687519435064302184531910484810053706146806749192781911979399520614196634287544406437451237181921799983910159195618146751426912397489409071864942319615679452080951465502252316038819301420937621378559566389377870830390697920773467221825625996615014215030680384477345492026054146659252014974428507325186660021324340881907104863317346496514539057962685610055081066587969981635747363840525714591028970641401109712062804390397595156771577004203378699360072305587631763594218731251471205329281918261861258673215791984148488291644706095752706957220917567116722910981690915280173506712748583222871835209353965725121083579151369882091444210067510334671103141267111369908658516398315019701651511685171437657618351556508849099898599823873455283316355076479185358932261854896321329330898570642046752590709154814165498594616371802709819943099244889575712828905923233260972997120844335732654893823911932597463667305836041428138830320382490375898524374417029132765618093773444030707469211201913020330380197621101100449293215160842444859637669838952286847831235526582131449576857262433441893039686426243410773226978028073189154411010446823252716201052652272111660396665573092547110557853763466820653109896526918620564769312570586356620185581007293606598764861179104533488503461136576867532494416680396265797877185560845529654126654085306143444318586769751456614068007002378776591344017127494704205622305389945613140711270004078547332699390814546646458807972708266830634328587856983052358089330657574067954571637752542021149557615814002501262285941302164715509792592309907965473761255176567513575178296664547791745011299614890304639947132962107340437518957359614589019389713111790429782856475032031986915140287080859904801094121472213179476477726224142548545403321571853061422881375850430633217518297986622371721591607716692547487389866549494501146540628433663937900397692656721463853067360965712091807638327166416274888800786925602902284721040317211860820419000422966171196377921337575114959501566049631862947265473642523081770367515906735023507283540567040386743513622224771589150495309844489333096340878076932599397805419341447377441842631298608099888687413260472156951623965864573021631598193195167353812974167729478672422924654366800980676928238280689964004824354037014163149658979409243237896907069779422362508221688957383798623001593776471651228935786015881617557829735233446042815126272037343146531977774160319906655418763979293344195215413418994854447345673831624993419131814809277771038638773431772075456545322077709212019051660962804909263601975988281613323166636528619326686336062735676303544776280350450777235547105859548702790814356240145171806246436267945612753181340783303362542327839449753824372058353114771199260638133467768796959703098339130771098704085913374641442822772634659470474587847787201927715280731767907707157213444730605700733492436931138350493163128404251219256517980694113528013147013047816437885185290928545201165839341965621349143415956258658655705526904965209858033850722426482939728584783163057777560688876446248246857926039535277348030480290058760758251047470916439613626760449256274204208320856611906254543372131535958450687724602901618766795240616342522577195429162991930645537799140373404328752628889639958794757291746426357455254079091451357111369410911939325191076020825202618798531887705842972591677813149699009019211697173727847684726860849003377024242916513005005168323364350389517029893922334517220138128069650117844087451960121228599371623130171144484640903890644954440061986907548516026327505298349187407866808818338510228334508504860825039302133219715518430635455007668282949304137765527939751754613953984683393638304746119966538581538420568533862186725233402830871123282789212507712629463229563989898935821167456270102183564622013496715188190973038119800497340723961036854066431939509790190699639552453005450580685501956730229219139339185680344903982059551002263535361920419947455385938102343955449597783779023742161727111723643435439478221818528624085140066604433258885698670543154706965747458550332323342107301545940516553790686627333799585115625784322988273723198987571415957811196358330059408730681216028764962867446047746491599505497374256269010490377819868359381465741268049256487985561453723478673303904688383436346553794986419270563872931748723320837601123029911367938627089438799362016295154133714248928307220126901475466847653576164773794675200490757155527819653621323926406160136358155907422020203187277605277219005561484255518792530343513984425322341576233610642506390497500865627109535919465897514131034822769306247435363256916078154781811528436679570611086153315044521274739245449454236828860613408414863776700961207151249140430272538607648236341433462351897576645216413767969031495019108575984423919862916421939949072362346468441173940326591840443780513338945257423995082965912285085558215725031071257012668302402929525220118726767562204154205161841634847565169998116141010029960783869092916030288400269104140792886215078424516709087000699282120660418371806535567252532567532861291042487761825829765157959847035622262934860034158722980534989650226291748788202734209222245339856264766914905562842503912757710284027998066365825488926488025456610172967026640765590429099456815065265305371829412703369313785178609040708667114965583434347693385781711386455873678123014587687126603489139095620099393610310291616152881384379099042317473363948045759314931405297634757481193567091101377517210080315590248530906692037671922033229094334676851422144773793937517034436619910403375111735471918550464490263655128162288244625759163330391072253837421821408835086573917715096828874782656995995744906617583441375223970968340800535598491754173818839994469748676265516582765848358845314277568790029095170283529716344562129640435231176006651012412006597558512761785838292041974844236080071930457618932349229279650198751872127267507981255470958904556357921221033346697499235630254947802490114195212382815309114079073860251522742995818072471625916685451333123948049470791191532673430282441860414263639548000448002670496248201792896476697583183271314251702969234889627668440323260927524960357996469256504936818360900323809293459588970695365349406034021665443755890045632882250545255640564482465151875471196218443965825337543885690941130315095261793780029741207665147939425902989695946995565761218656196733786236256125216320862869222103274889218654364802296780705765615144632046927906821207388377814233562823608963208068222468012248261177185896381409183903673672220888321513755600372798394004152970028783076670944474560134556417254370906979396122571429894671543578468788614445812314593571984922528471605049221242470141214780573455105008019086996033027634787081081754501193071412233908663938339529425786905076431006383519834389341596131854347546495569781038293097164651438407007073604112373599843452251610507027056235266012764848308407611830130527932054274628654036036745328651057065874882256981579367897669742205750596834408697350201410206723585020072452256326513410559240190274216248439140359989535394590944070469120914093870012645600162374288021092764579310657922955249887275846101264836999892256959688159205600101655256375678",sketch:void 0}},methods:{render(i){const e="0123456789",o=["#FFBA08","#FAA307","#F48C06","#E85D04","#DC2F02","#D00000","#9D0208","#6A040F","#370617","#03071E"],r={x:this.startingX,y:this.startingY,a:this.startingAngle};i.strokeWeight(this.strokeWidth),i.clear(),i.background(o[9]),i.beginShape(),i.vertex(r.x,r.y);for(let t=0;t{o.setup=()=>{o.createCanvas(this.width,this.height),o.noLoop(),o.noFill(),o.stroke(255),this.sketch=o,this.render(this.sketch)}};new this.$p5(e,"canvas")}},m={class:"select-none bg-gradient-to-b from-green-800 to-gray-800"},x={class:"m-8 grid place-items-center"},b={class:"font-mono text-white"},f={class:"my-2 md:w-full"},v={class:"grid-rows-auto my-2 grid grid-cols-2 gap-4 border-2 border-white p-2 md:grid-rows-1"},k={class:"flex flex-col"},y={for:"distanceInput",class:"text-right"},w={class:"flex flex-col"},A={for:"strokeInput",class:"text-right"},_={class:"flex flex-col"},I={for:"startingXInput",class:"text-right"},C={class:"flex flex-col"},D={for:"startingYInput",class:"text-right"},V={class:"flex flex-col"},W={for:"startingAngleInput",class:"text-right"};function X(i,e,o,r,t,l){return h(),u("div",m,[n("div",x,[n("div",b,[e[11]||(e[11]=n("div",{id:"canvas-container",class:"mb-2 h-96 border-2 border-white"},[n("div",{id:"canvas"})],-1)),n("div",f,[d(n("textarea",{readonly:"","onUpdate:modelValue":e[0]||(e[0]=s=>t.sequence=s),class:"block h-24 w-full border-2 border-white bg-black p-2 text-white placeholder:italic placeholder:text-slate-400 focus:border-2 focus:border-yellow-500 focus:outline-none sm:text-sm",placeholder:"Enter a sequence of numbers...",type:"text"},null,512),[[a,t.sequence]])]),n("div",v,[n("div",k,[n("label",y,"Segment Length ["+c(t.distance)+"]",1),d(n("input",{id:"distanceInput","onUpdate:modelValue":e[1]||(e[1]=s=>t.distance=s),onChange:e[2]||(e[2]=s=>l.render(t.sketch)),type:"range",min:"1",max:"25",class:"accent-black"},null,544),[[a,t.distance,void 0,{number:!0}]])]),n("div",w,[n("label",A,"Stroke Width ["+c(t.strokeWidth)+"]",1),d(n("input",{id:"strokeInput","onUpdate:modelValue":e[3]||(e[3]=s=>t.strokeWidth=s),onChange:e[4]||(e[4]=s=>l.render(t.sketch)),type:"range",min:"1",max:"10",class:"accent-black"},null,544),[[a,t.strokeWidth,void 0,{number:!0}]])]),n("div",_,[n("label",I,"X Position ["+c(t.startingX)+"]",1),d(n("input",{id:"startingXInput","onUpdate:modelValue":e[5]||(e[5]=s=>t.startingX=s),onChange:e[6]||(e[6]=s=>l.render(t.sketch)),type:"range",min:"0",max:"500",class:"accent-black"},null,544),[[a,t.startingX,void 0,{number:!0}]])]),n("div",C,[n("label",D,"Y Position ["+c(t.startingY)+"]",1),d(n("input",{id:"startingYInput","onUpdate:modelValue":e[7]||(e[7]=s=>t.startingY=s),onChange:e[8]||(e[8]=s=>l.render(t.sketch)),type:"range",min:"0",max:"500",class:"accent-black"},null,544),[[a,t.startingY,void 0,{number:!0}]])]),n("div",V,[n("label",W,"Angle ["+c(t.startingAngle)+"]",1),d(n("input",{id:"startingAngleInput","onUpdate:modelValue":e[9]||(e[9]=s=>t.startingAngle=s),onChange:e[10]||(e[10]=s=>l.render(t.sketch)),type:"range",min:"-180",max:"180",class:"accent-black"},null,544),[[a,t.startingAngle,void 0,{number:!0}]])])])])])])}const E=g(p,[["render",X]]);export{E as default}; diff --git a/_nuxt/fN7CqnJV.js b/_nuxt/DGfbSuI8.js similarity index 90% rename from _nuxt/fN7CqnJV.js rename to _nuxt/DGfbSuI8.js index 4f10ff9a..4d601032 100644 --- a/_nuxt/fN7CqnJV.js +++ b/_nuxt/DGfbSuI8.js @@ -1 +1 @@ -import{u as A,j as g,w as R,k as m,c as r,b as o,F as d,r as v,a as i,h as S,o as l,t as p,i as f,f as h,g as D,l as C,_ as F}from"./nJJO8dFm.js";import{_ as L}from"./RZ_1G7Mx.js";import j from"./DAyK0gv0.js";import{u as z}from"./BBOrgyAk.js";import{q as E}from"./axEFYTs9.js";import"./C-v3KzvZ.js";import"./CxYJgpPD.js";import"./DFIm0aE1.js";import"./IShi1APO.js";const M={class:"container mx-auto font-mono text-white"},G={class:"grid grid-cols-4 gap-4"},H={class:"col-span-4 lg:col-span-3"},I={class:"grid grid-cols-10 gap-y-4 lg:gap-y-6"},J={class:"col-span-10 lg:col-span-2"},K={class:"col-span-10 lg:col-span-8"},O={class:"flex-col space-y-2"},P={class:"col-span-4 border-l border-gray-700 pl-4 lg:col-span-1"},Q={class:"my-2 space-y-2"},U=["onClick"],W={key:0,class:"my-2 space-y-2"},X=["onClick"],ce={__name:"index",async setup(Y){let c,x;const u=A(),a=g([]);u.query.category&&(a.value=[u.query.category]);const n=g([]);u.query.tag&&(n.value=[u.query.tag]);const k=g(!0),{data:_}=([c,x]=R(()=>z("articles",()=>E().only(["_id","_path","title","description","date","img","author","tags","categories","img","excerpt","summary"]).sort({date:-1}).find())),c=await c,x(),c),w=m(()=>[...new Set(_.value.map(e=>e.categories).flat().sort())]),b=m(()=>[...new Set(_.value.map(e=>e.tags).flat().sort())]),q=m(()=>_.value.filter(e=>!(a.value.length>0&&!a.value.every(s=>e.categories.includes(s))||n.value.length>0&&!n.value.every(s=>e.tags.includes(s)))));function N(e){n.value.includes(e)?n.value=n.value.filter(s=>s!==e):n.value.push(e)}function T(e){a.value.includes(e)?a.value=a.value.filter(s=>s!==e):a.value.push(e)}return(e,s)=>{const B=F,V=L,$=j;return l(),r("section",M,[s[2]||(s[2]=o("h1",{class:"my-6 text-2xl font-extrabold"},"Blog",-1)),o("div",G,[o("div",H,[o("div",I,[(l(!0),r(d,null,v(i(q),t=>(l(),r(d,{key:t._id},[o("div",J,p(t.date),1),o("div",K,[o("div",O,[f(B,{class:"text-orange-500",to:t._path},{default:h(()=>[D(p(t.title),1)]),_:2},1032,["to"]),f($,{value:t},{default:h(()=>[f(V,{class:"line-clamp-5 text-xs text-gray-400",value:{body:t.excerpt}},null,8,["value"])]),_:2},1032,["value"])])])],64))),128))])]),o("div",P,[o("div",Q,[s[0]||(s[0]=o("p",{class:"text-xl font-bold"},"Categories",-1)),(l(!0),r(d,null,v(i(w),t=>(l(),r("div",{key:t,class:C([{"bg-orange-500rtext-white":i(a).includes(t)},"cursor-pointer p-1 text-sm text-gray-400 hover:bg-orange-500 hover:text-white"]),onClick:y=>T(t)},p(t),11,U))),128))]),i(k)?(l(),r("div",W,[s[1]||(s[1]=o("p",{class:"text-xl font-bold"},"Tags",-1)),(l(!0),r(d,null,v(i(b),(t,y)=>(l(),r("div",{key:y,class:C([{"bg-orange-500 text-white":i(n).includes(t)},"cursor-pointer select-none p-1 text-sm text-gray-400 hover:bg-orange-500 hover:text-white"]),onClick:Z=>N(t)},p(t),11,X))),128))])):S("",!0)])])])}}};export{ce as default}; +import{u as A,j as g,w as R,k as m,c as r,b as o,F as d,r as v,a as i,h as S,o as l,t as p,i as f,f as h,g as D,l as C,_ as F}from"./BK37JMLf.js";import{_ as L}from"./CWkD7dT7.js";import j from"./CW9x3cwD.js";import{u as z}from"./Dl5rqmmJ.js";import{q as E}from"./BUUEBr-A.js";import"./C-v3KzvZ.js";import"./CxYJgpPD.js";import"./DmH48LNN.js";import"./IShi1APO.js";const M={class:"container mx-auto font-mono text-white"},G={class:"grid grid-cols-4 gap-4"},H={class:"col-span-4 lg:col-span-3"},I={class:"grid grid-cols-10 gap-y-4 lg:gap-y-6"},J={class:"col-span-10 lg:col-span-2"},K={class:"col-span-10 lg:col-span-8"},O={class:"flex-col space-y-2"},P={class:"col-span-4 border-l border-gray-700 pl-4 lg:col-span-1"},Q={class:"my-2 space-y-2"},U=["onClick"],W={key:0,class:"my-2 space-y-2"},X=["onClick"],ce={__name:"index",async setup(Y){let c,x;const u=A(),a=g([]);u.query.category&&(a.value=[u.query.category]);const n=g([]);u.query.tag&&(n.value=[u.query.tag]);const k=g(!0),{data:_}=([c,x]=R(()=>z("articles",()=>E().only(["_id","_path","title","description","date","img","author","tags","categories","img","excerpt","summary"]).sort({date:-1}).find())),c=await c,x(),c),w=m(()=>[...new Set(_.value.map(e=>e.categories).flat().sort())]),b=m(()=>[...new Set(_.value.map(e=>e.tags).flat().sort())]),q=m(()=>_.value.filter(e=>!(a.value.length>0&&!a.value.every(s=>e.categories.includes(s))||n.value.length>0&&!n.value.every(s=>e.tags.includes(s)))));function N(e){n.value.includes(e)?n.value=n.value.filter(s=>s!==e):n.value.push(e)}function T(e){a.value.includes(e)?a.value=a.value.filter(s=>s!==e):a.value.push(e)}return(e,s)=>{const B=F,V=L,$=j;return l(),r("section",M,[s[2]||(s[2]=o("h1",{class:"my-6 text-2xl font-extrabold"},"Blog",-1)),o("div",G,[o("div",H,[o("div",I,[(l(!0),r(d,null,v(i(q),t=>(l(),r(d,{key:t._id},[o("div",J,p(t.date),1),o("div",K,[o("div",O,[f(B,{class:"text-orange-500",to:t._path},{default:h(()=>[D(p(t.title),1)]),_:2},1032,["to"]),f($,{value:t},{default:h(()=>[f(V,{class:"line-clamp-5 text-xs text-gray-400",value:{body:t.excerpt}},null,8,["value"])]),_:2},1032,["value"])])])],64))),128))])]),o("div",P,[o("div",Q,[s[0]||(s[0]=o("p",{class:"text-xl font-bold"},"Categories",-1)),(l(!0),r(d,null,v(i(w),t=>(l(),r("div",{key:t,class:C([{"bg-orange-500rtext-white":i(a).includes(t)},"cursor-pointer p-1 text-sm text-gray-400 hover:bg-orange-500 hover:text-white"]),onClick:y=>T(t)},p(t),11,U))),128))]),i(k)?(l(),r("div",W,[s[1]||(s[1]=o("p",{class:"text-xl font-bold"},"Tags",-1)),(l(!0),r(d,null,v(i(b),(t,y)=>(l(),r("div",{key:y,class:C([{"bg-orange-500 text-white":i(n).includes(t)},"cursor-pointer select-none p-1 text-sm text-gray-400 hover:bg-orange-500 hover:text-white"]),onClick:Z=>N(t)},p(t),11,X))),128))])):S("",!0)])])])}}};export{ce as default}; diff --git a/_nuxt/DM953cT8.js b/_nuxt/DM953cT8.js deleted file mode 100644 index dac283e5..00000000 --- a/_nuxt/DM953cT8.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as m}from"./D9bwbETQ.js";import"./nJJO8dFm.js";export{m as default}; diff --git a/_nuxt/DUIBMrHd.js b/_nuxt/DNMAzUIu.js similarity index 77% rename from _nuxt/DUIBMrHd.js rename to _nuxt/DNMAzUIu.js index ccbae4a4..67eed110 100644 --- a/_nuxt/DUIBMrHd.js +++ b/_nuxt/DNMAzUIu.js @@ -1 +1 @@ -import{d as n,L as e}from"./nJJO8dFm.js";const r=n({name:"DocumentDrivenEmpty",props:{value:{type:Object,required:!0}},render({value:t}){return e("div",void 0,[e("p","Document is empty"),e("p",`Add content to it by opening ${t._source}/${t._file} file.`)])}});export{r as default}; +import{d as n,L as e}from"./BK37JMLf.js";const r=n({name:"DocumentDrivenEmpty",props:{value:{type:Object,required:!0}},render({value:t}){return e("div",void 0,[e("p","Document is empty"),e("p",`Add content to it by opening ${t._source}/${t._file} file.`)])}});export{r as default}; diff --git a/_nuxt/BpMTv8gi.js b/_nuxt/DPuhoZ66.js similarity index 64% rename from _nuxt/BpMTv8gi.js rename to _nuxt/DPuhoZ66.js index 90ac7f19..f53935f6 100644 --- a/_nuxt/BpMTv8gi.js +++ b/_nuxt/DPuhoZ66.js @@ -1 +1 @@ -import{m as o,o as r,c as s,a9 as t}from"./nJJO8dFm.js";const c={};function n(e,a){return r(),s("em",null,[t(e.$slots,"default")])}const f=o(c,[["render",n]]);export{f as default}; +import{m as o,o as r,c as s,a9 as t}from"./BK37JMLf.js";const c={};function n(e,a){return r(),s("em",null,[t(e.$slots,"default")])}const f=o(c,[["render",n]]);export{f as default}; diff --git a/_nuxt/DSmS9R0l.js b/_nuxt/DSmS9R0l.js new file mode 100644 index 00000000..95b7ac64 --- /dev/null +++ b/_nuxt/DSmS9R0l.js @@ -0,0 +1 @@ +import{a as o}from"./Dm2eZEft.js";import{m as c,c as n,i as t,o as a}from"./BK37JMLf.js";const r={};function s(_,m){const e=o;return a(),n("div",null,[t(e,{showImages:""})])}const d=c(r,[["render",s]]);export{d as default}; diff --git a/_nuxt/BrSph-fG.js b/_nuxt/DTjsV1Wj.js similarity index 86% rename from _nuxt/BrSph-fG.js rename to _nuxt/DTjsV1Wj.js index 5ac83e43..82782fc0 100644 --- a/_nuxt/BrSph-fG.js +++ b/_nuxt/DTjsV1Wj.js @@ -1 +1 @@ -import{m as n,o as r,c,b as e,i as s,a9 as d,ac as _}from"./nJJO8dFm.js";const i={},f={class:"pin-b w-full p-4 text-xs font-bold text-white"};function u(t,o){return r(),c("footer",f,o[0]||(o[0]=[e("div",{class:"flex justify-center space-x-2"},[e("a",{class:"hover:cursor-pointer hover:text-blue-200",href:"https://github.com/cmpadden/cmpadden.github.io"}," © Colton Padden"),e("span",null,"•"),e("a",{class:"hover:cursor-pointer hover:text-blue-200",href:"/sitemap.xml"},"Sitemap"),e("span",null,"•"),e("a",{class:"hover:cursor-pointer hover:text-blue-200",href:"/atom"},"RSS")],-1)]))}const p=n(i,[["render",u]]),m={},h={class:"bg-orange-500"},x={class:"rounded-3xl border-[10px] border-orange-500"},b={class:"flex min-h-screen flex-col rounded-3xl bg-background font-display"},v={class:"flex-1"};function g(t,o){const a=_,l=p;return r(),c("div",h,[e("div",x,[e("main",b,[s(a),e("main",v,[d(t.$slots,"default")]),s(l)])])])}const S=n(m,[["render",g]]);export{S as default}; +import{m as n,o as r,c,b as e,i as s,a9 as d,ac as _}from"./BK37JMLf.js";const i={},f={class:"pin-b w-full p-4 text-xs font-bold text-white"};function u(t,o){return r(),c("footer",f,o[0]||(o[0]=[e("div",{class:"flex justify-center space-x-2"},[e("a",{class:"hover:cursor-pointer hover:text-blue-200",href:"https://github.com/cmpadden/cmpadden.github.io"}," © Colton Padden"),e("span",null,"•"),e("a",{class:"hover:cursor-pointer hover:text-blue-200",href:"/sitemap.xml"},"Sitemap"),e("span",null,"•"),e("a",{class:"hover:cursor-pointer hover:text-blue-200",href:"/atom"},"RSS")],-1)]))}const p=n(i,[["render",u]]),m={},h={class:"bg-orange-500"},x={class:"rounded-3xl border-[10px] border-orange-500"},b={class:"flex min-h-screen flex-col rounded-3xl bg-background font-display"},v={class:"flex-1"};function g(t,o){const a=_,l=p;return r(),c("div",h,[e("div",x,[e("main",b,[s(a),e("main",v,[d(t.$slots,"default")]),s(l)])])])}const S=n(m,[["render",g]]);export{S as default}; diff --git a/_nuxt/CveZ9Rrq.js b/_nuxt/D_FI_Dju.js similarity index 64% rename from _nuxt/CveZ9Rrq.js rename to _nuxt/D_FI_Dju.js index ccb7c152..dd4a2aaf 100644 --- a/_nuxt/CveZ9Rrq.js +++ b/_nuxt/D_FI_Dju.js @@ -1 +1 @@ -import{m as o,o as r,c as s,a9 as t}from"./nJJO8dFm.js";const c={};function n(e,a){return r(),s("ul",null,[t(e.$slots,"default")])}const f=o(c,[["render",n]]);export{f as default}; +import{m as o,o as r,c as s,a9 as t}from"./BK37JMLf.js";const c={};function n(e,a){return r(),s("ul",null,[t(e.$slots,"default")])}const f=o(c,[["render",n]]);export{f as default}; diff --git a/_nuxt/D0Jts58Y.js b/_nuxt/DahmjARO.js similarity index 96% rename from _nuxt/D0Jts58Y.js rename to _nuxt/DahmjARO.js index 5613a1b0..77a97662 100644 --- a/_nuxt/D0Jts58Y.js +++ b/_nuxt/DahmjARO.js @@ -1 +1 @@ -import{m as l,j as c,c as d,i as a,f as n,b as e,t as f,S as m,o as p,s as u}from"./nJJO8dFm.js";const y={setup(){return{show:c(!1)}}},g={class:"bg-gradeint-to-r flex min-h-screen items-center justify-center from-blue-400 to-indigo-500"},h={class:"flex w-96 items-center space-x-4 rounded-2xl bg-white p-4 shadow-xl"},x={class:"absolute inset-x-0 top-0 my-4 flex w-full items-center justify-center"};function _(r,t,v,o,w,b){const s=u,i=m;return p(),d("div",g,[a(i,{as:"template",show:o.show,enter:"transition transform duration-300 ease-out","enter-from":"translate-x-4 opacity-0","enter-to":"translate-x-0 opacity-100",leave:"transition transform duration-300 ease-in","leave-from":"opacity-100","leave-to":"opacity-0"},{default:n(()=>[e("div",h,[a(s,{as:"img",enter:"transition transform duration-300 ease-out","enter-from":"rotate-90 scale-50 opacity-0","enter-to":"rotate-0 scale-100 opacity-100",leave:"transition transform duration-300 ease-in","leave-from":"opacity-100","leave-to":"opacity-0",class:"h-16 w-16 rounded-full ring ring-indigo-500 ring-opacity-50 ring-offset-2",src:"/images/placeholder.png"}),a(s,{enter:"transition transform duration-300 ease-out","enter-from":"translate-x-12 opacity-0","enter-to":"translate-x-0 opacity-100",leave:"transition transform duration-300 ease-in","leave-from":"opacity-100","leave-to":"opacity-0"},{default:n(()=>t[1]||(t[1]=[e("h1",{class:"font-medium text-gray-900"},"Floofy McFloof",-1),e("p",{class:"mt-0.5 text-gray-500"}," Hey! I'm McFloof and I have been a very good boi this year. ",-1)])),_:1})])]),_:1},8,["show"]),e("div",x,[e("button",{class:"rounded-lg bg-blue-200 px-4 py-1.5 text-sm font-medium text-indigo-900 hover:bg-blue-100 focus:outline-none focus:ring-2 focus:ring-indigo-600",onClick:t[0]||(t[0]=H=>o.show=!o.show)},f(o.show?"Hide":"Show")+" profile ",1)])])}const j=l(y,[["render",_]]);export{j as default}; +import{m as l,j as c,c as d,i as a,f as n,b as e,t as f,S as m,o as p,s as u}from"./BK37JMLf.js";const y={setup(){return{show:c(!1)}}},g={class:"bg-gradeint-to-r flex min-h-screen items-center justify-center from-blue-400 to-indigo-500"},h={class:"flex w-96 items-center space-x-4 rounded-2xl bg-white p-4 shadow-xl"},x={class:"absolute inset-x-0 top-0 my-4 flex w-full items-center justify-center"};function _(r,t,v,o,w,b){const s=u,i=m;return p(),d("div",g,[a(i,{as:"template",show:o.show,enter:"transition transform duration-300 ease-out","enter-from":"translate-x-4 opacity-0","enter-to":"translate-x-0 opacity-100",leave:"transition transform duration-300 ease-in","leave-from":"opacity-100","leave-to":"opacity-0"},{default:n(()=>[e("div",h,[a(s,{as:"img",enter:"transition transform duration-300 ease-out","enter-from":"rotate-90 scale-50 opacity-0","enter-to":"rotate-0 scale-100 opacity-100",leave:"transition transform duration-300 ease-in","leave-from":"opacity-100","leave-to":"opacity-0",class:"h-16 w-16 rounded-full ring ring-indigo-500 ring-opacity-50 ring-offset-2",src:"/images/placeholder.png"}),a(s,{enter:"transition transform duration-300 ease-out","enter-from":"translate-x-12 opacity-0","enter-to":"translate-x-0 opacity-100",leave:"transition transform duration-300 ease-in","leave-from":"opacity-100","leave-to":"opacity-0"},{default:n(()=>t[1]||(t[1]=[e("h1",{class:"font-medium text-gray-900"},"Floofy McFloof",-1),e("p",{class:"mt-0.5 text-gray-500"}," Hey! I'm McFloof and I have been a very good boi this year. ",-1)])),_:1})])]),_:1},8,["show"]),e("div",x,[e("button",{class:"rounded-lg bg-blue-200 px-4 py-1.5 text-sm font-medium text-indigo-900 hover:bg-blue-100 focus:outline-none focus:ring-2 focus:ring-indigo-600",onClick:t[0]||(t[0]=H=>o.show=!o.show)},f(o.show?"Hide":"Show")+" profile ",1)])])}const j=l(y,[["render",_]]);export{j as default}; diff --git a/_nuxt/BNGAfUEf.js b/_nuxt/DbHcoyzM.js similarity index 98% rename from _nuxt/BNGAfUEf.js rename to _nuxt/DbHcoyzM.js index ba13b1c9..99b68719 100644 --- a/_nuxt/BNGAfUEf.js +++ b/_nuxt/DbHcoyzM.js @@ -1 +1 @@ -import{m,c as o,g as a,b as t,l as h,t as d,F as c,r as p,h as v,o as i}from"./nJJO8dFm.js";const b={mounted(){typeof navigator.requestMIDIAccess<"u"&&navigator.requestMIDIAccess().then(n=>{this.midi=n,this.midi.inputs.forEach(e=>{e.onmidimessage=u=>{this.events.push(u),this.events.length>15&&this.events.shift()}})},n=>{console.error(n)})},data(){return{tooltip:!1,midi:void 0,events:[]}},computed:{inputs(){if(typeof this.midi<"u")return Array.from(this.midi.inputs.values())},outputs(){if(typeof this.midi<"u")return Array.from(this.midi.outputs.values())}},filters:{midiCommand:n=>{switch(n){case 144:return"Note On";case 128:return"Note Off";default:return n}},midiNote:n=>`${["C","C# / Db","D","D# / Eb","E","F","F# / Bb","G","G# / Ab","A","A# / Bb","B"][n%12]} (${Math.floor(n/12)-2})`}},g={class:"h-2/3 bg-gradient-to-b from-green-100 to-green-50"},x={key:0,class:"p-4 text-center font-light tracking-wide"},_={key:1},y={class:"flex flex-wrap"},w={class:"absolute bottom-16 right-2"},k={class:"p-3 font-mono text-orange-900"},I={class:"mb-2 font-bold"},M={class:"mb-2"},N={key:0,class:"p-4 text-center italic"},D={key:1},C={class:"flex-1"},A={class:"flex-1"},z={class:"mb-2"},E={key:0,class:"p-4 text-center italic"},V={key:1},B={class:"flex-1"},F={class:"flex-1"},S={class:"absolute bottom-2 right-2"},O={class:"container mx-auto p-8"},P={class:"w-full table-auto border-2 border-green-800 bg-green-50 text-sm"},q={class:"divide-y divide-gray-100"},G={key:0},T={class:"p-2 text-left"},U={class:"p-2 text-left"},W={class:"p-2 text-left"},H={class:"p-2 text-left"},L={key:0,class:"p-2 text-left"},R={key:1,class:"p-2 text-left"},Y={class:"p-2 text-left"},j={class:"p-2 text-right"};function J(n,e,u,K,l,r){return i(),o("div",g,[typeof l.midi>"u"?(i(),o("div",x,e[1]||(e[1]=[a(" Unfortunately, the Web MIDI API is "),t("a",{class:"text-blue-500 underline",href:"https://developer.mozilla.org/en-US/docs/Web/API/MIDIMessageEvent#browser_compatibility"},"not supported",-1),a(" in all browsers... ")]))):(i(),o("div",_,[t("div",y,[t("div",w,[t("div",{class:h([{hidden:!l.tooltip,block:l.tooltip},"z-50 max-w-md break-words rounded-lg border-2 border-green-800 bg-yellow-200 text-sm font-normal leading-normal"])},[t("div",null,[e[5]||(e[5]=t("div",{class:"mb-0 rounded-t-lg border-b border-solid bg-green-600 p-3 font-semibold uppercase text-white opacity-75"}," MIDI Status ",-1)),t("div",k,[t("div",I,[e[2]||(e[2]=a(" Enabled: ")),t("span",null,d(typeof l.midi<"u"?"Yep!":"Nope"),1)]),t("div",M,[e[3]||(e[3]=t("div",{class:"font-bold"},"Inputs:",-1)),r.inputs.length===0?(i(),o("div",N," No input devices detected :( ")):(i(),o("div",D,[(i(!0),o(c,null,p(r.inputs,s=>(i(),o("div",{key:s.id,class:"flex"},[t("div",C,d(s.manufacturer),1),t("div",A,d(s.name),1)]))),128))]))]),t("div",z,[e[4]||(e[4]=t("div",{class:"font-bold"},"Outputs:",-1)),r.outputs.length===0?(i(),o("div",E," No output devices detected :( ")):(i(),o("div",V,[(i(!0),o(c,null,p(r.outputs,s=>(i(),o("div",{key:s.id,class:"flex"},[t("div",B,d(s.manufacturer),1),t("div",F,d(s.name),1)]))),128))]))])])])],2)]),t("div",S,[t("button",{ref:"btnRef",onClick:e[0]||(e[0]=s=>l.tooltip=!l.tooltip),class:"rounded-lg bg-green-800 px-2 py-1 text-white shadow hover:text-yellow-200 hover:shadow-lg",type:"button"},e[6]||(e[6]=[t("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 20 20",class:"h-10 w-10"},[t("g",{fill:"none"},[t("path",{d:"M2.5 4a.5.5 0 0 0-.5.5v11a.5.5 0 0 0 .5.5h15a.5.5 0 0 0 .5-.5v-11a.5.5 0 0 0-.5-.5h-15zm.5 6h2v3.5a.5.5 0 0 0 1 0V10h2v3.5a.5.5 0 0 0 1 0V10h2v3.5a.5.5 0 0 0 1 0V10h2v3.5a.5.5 0 0 0 1 0V10h2v5H3v-5zm2.75-2.5a.75.75 0 1 1 0-1.5a.75.75 0 0 1 0 1.5zm6.25-1a.5.5 0 0 1 .5-.5h2a.5.5 0 0 1 0 1h-2a.5.5 0 0 1-.5-.5zm-3 .251a.75.75 0 1 1-1.5 0a.75.75 0 0 1 1.5 0z",fill:"currentColor"})])],-1)]),512)])]),t("div",O,[e[9]||(e[9]=t("div",{class:"font-display text-4xl font-light tracking-wide"}," MIDI Events ",-1)),t("table",P,[e[8]||(e[8]=t("thead",{class:"bg-green-800 font-semibold uppercase text-white"},[t("tr",null,[t("th",{class:"p-2 text-left"},"Timestamp"),t("th",{class:"p-2 text-left"},"Command #"),t("th",{class:"p-2 text-left"},"Command"),t("th",{class:"p-2 text-left"},"Note #"),t("th",{class:"p-2 text-left"},"Note"),t("th",{class:"p-2 text-left"},"Velocity"),t("th",{class:"p-2 text-right"},"MIDI Source")])],-1)),t("tbody",q,[l.events.length===0?(i(),o("tr",G,e[7]||(e[7]=[t("td",{class:"p-4 text-center italic",colspan:"7"}," Press a key, or turn a knob! ",-1)]))):v("",!0),(i(!0),o(c,null,p(l.events,(s,f)=>(i(),o("tr",{key:f},[t("td",T,d(s.timeStamp.toFixed(2)),1),t("td",U,d(s.data[0]),1),t("td",W,d(s.data[0]|n.midiCommand),1),t("td",H,d(s.data[1]),1),s.data[0]===144||s.data[0]==128?(i(),o("td",L,d(s.data[1]|n.midiNote),1)):(i(),o("td",R,"-")),t("td",Y,d(s.data[2]),1),t("td",j,d(s.srcElement.name),1)]))),128))])])])]))])}const X=m(b,[["render",J]]);export{X as default}; +import{m,c as o,g as a,b as t,l as h,t as d,F as c,r as p,h as v,o as i}from"./BK37JMLf.js";const b={mounted(){typeof navigator.requestMIDIAccess<"u"&&navigator.requestMIDIAccess().then(n=>{this.midi=n,this.midi.inputs.forEach(e=>{e.onmidimessage=u=>{this.events.push(u),this.events.length>15&&this.events.shift()}})},n=>{console.error(n)})},data(){return{tooltip:!1,midi:void 0,events:[]}},computed:{inputs(){if(typeof this.midi<"u")return Array.from(this.midi.inputs.values())},outputs(){if(typeof this.midi<"u")return Array.from(this.midi.outputs.values())}},filters:{midiCommand:n=>{switch(n){case 144:return"Note On";case 128:return"Note Off";default:return n}},midiNote:n=>`${["C","C# / Db","D","D# / Eb","E","F","F# / Bb","G","G# / Ab","A","A# / Bb","B"][n%12]} (${Math.floor(n/12)-2})`}},g={class:"h-2/3 bg-gradient-to-b from-green-100 to-green-50"},x={key:0,class:"p-4 text-center font-light tracking-wide"},_={key:1},y={class:"flex flex-wrap"},w={class:"absolute bottom-16 right-2"},k={class:"p-3 font-mono text-orange-900"},I={class:"mb-2 font-bold"},M={class:"mb-2"},N={key:0,class:"p-4 text-center italic"},D={key:1},C={class:"flex-1"},A={class:"flex-1"},z={class:"mb-2"},E={key:0,class:"p-4 text-center italic"},V={key:1},B={class:"flex-1"},F={class:"flex-1"},S={class:"absolute bottom-2 right-2"},O={class:"container mx-auto p-8"},P={class:"w-full table-auto border-2 border-green-800 bg-green-50 text-sm"},q={class:"divide-y divide-gray-100"},G={key:0},T={class:"p-2 text-left"},U={class:"p-2 text-left"},W={class:"p-2 text-left"},H={class:"p-2 text-left"},L={key:0,class:"p-2 text-left"},R={key:1,class:"p-2 text-left"},Y={class:"p-2 text-left"},j={class:"p-2 text-right"};function J(n,e,u,K,l,r){return i(),o("div",g,[typeof l.midi>"u"?(i(),o("div",x,e[1]||(e[1]=[a(" Unfortunately, the Web MIDI API is "),t("a",{class:"text-blue-500 underline",href:"https://developer.mozilla.org/en-US/docs/Web/API/MIDIMessageEvent#browser_compatibility"},"not supported",-1),a(" in all browsers... ")]))):(i(),o("div",_,[t("div",y,[t("div",w,[t("div",{class:h([{hidden:!l.tooltip,block:l.tooltip},"z-50 max-w-md break-words rounded-lg border-2 border-green-800 bg-yellow-200 text-sm font-normal leading-normal"])},[t("div",null,[e[5]||(e[5]=t("div",{class:"mb-0 rounded-t-lg border-b border-solid bg-green-600 p-3 font-semibold uppercase text-white opacity-75"}," MIDI Status ",-1)),t("div",k,[t("div",I,[e[2]||(e[2]=a(" Enabled: ")),t("span",null,d(typeof l.midi<"u"?"Yep!":"Nope"),1)]),t("div",M,[e[3]||(e[3]=t("div",{class:"font-bold"},"Inputs:",-1)),r.inputs.length===0?(i(),o("div",N," No input devices detected :( ")):(i(),o("div",D,[(i(!0),o(c,null,p(r.inputs,s=>(i(),o("div",{key:s.id,class:"flex"},[t("div",C,d(s.manufacturer),1),t("div",A,d(s.name),1)]))),128))]))]),t("div",z,[e[4]||(e[4]=t("div",{class:"font-bold"},"Outputs:",-1)),r.outputs.length===0?(i(),o("div",E," No output devices detected :( ")):(i(),o("div",V,[(i(!0),o(c,null,p(r.outputs,s=>(i(),o("div",{key:s.id,class:"flex"},[t("div",B,d(s.manufacturer),1),t("div",F,d(s.name),1)]))),128))]))])])])],2)]),t("div",S,[t("button",{ref:"btnRef",onClick:e[0]||(e[0]=s=>l.tooltip=!l.tooltip),class:"rounded-lg bg-green-800 px-2 py-1 text-white shadow hover:text-yellow-200 hover:shadow-lg",type:"button"},e[6]||(e[6]=[t("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 20 20",class:"h-10 w-10"},[t("g",{fill:"none"},[t("path",{d:"M2.5 4a.5.5 0 0 0-.5.5v11a.5.5 0 0 0 .5.5h15a.5.5 0 0 0 .5-.5v-11a.5.5 0 0 0-.5-.5h-15zm.5 6h2v3.5a.5.5 0 0 0 1 0V10h2v3.5a.5.5 0 0 0 1 0V10h2v3.5a.5.5 0 0 0 1 0V10h2v3.5a.5.5 0 0 0 1 0V10h2v5H3v-5zm2.75-2.5a.75.75 0 1 1 0-1.5a.75.75 0 0 1 0 1.5zm6.25-1a.5.5 0 0 1 .5-.5h2a.5.5 0 0 1 0 1h-2a.5.5 0 0 1-.5-.5zm-3 .251a.75.75 0 1 1-1.5 0a.75.75 0 0 1 1.5 0z",fill:"currentColor"})])],-1)]),512)])]),t("div",O,[e[9]||(e[9]=t("div",{class:"font-display text-4xl font-light tracking-wide"}," MIDI Events ",-1)),t("table",P,[e[8]||(e[8]=t("thead",{class:"bg-green-800 font-semibold uppercase text-white"},[t("tr",null,[t("th",{class:"p-2 text-left"},"Timestamp"),t("th",{class:"p-2 text-left"},"Command #"),t("th",{class:"p-2 text-left"},"Command"),t("th",{class:"p-2 text-left"},"Note #"),t("th",{class:"p-2 text-left"},"Note"),t("th",{class:"p-2 text-left"},"Velocity"),t("th",{class:"p-2 text-right"},"MIDI Source")])],-1)),t("tbody",q,[l.events.length===0?(i(),o("tr",G,e[7]||(e[7]=[t("td",{class:"p-4 text-center italic",colspan:"7"}," Press a key, or turn a knob! ",-1)]))):v("",!0),(i(!0),o(c,null,p(l.events,(s,f)=>(i(),o("tr",{key:f},[t("td",T,d(s.timeStamp.toFixed(2)),1),t("td",U,d(s.data[0]),1),t("td",W,d(s.data[0]|n.midiCommand),1),t("td",H,d(s.data[1]),1),s.data[0]===144||s.data[0]==128?(i(),o("td",L,d(s.data[1]|n.midiNote),1)):(i(),o("td",R,"-")),t("td",Y,d(s.data[2]),1),t("td",j,d(s.srcElement.name),1)]))),128))])])])]))])}const X=m(b,[["render",J]]);export{X as default}; diff --git a/_nuxt/CwMQLHqL.js b/_nuxt/DgtYBS7b.js similarity index 88% rename from _nuxt/CwMQLHqL.js rename to _nuxt/DgtYBS7b.js index 245b6a7d..0b35e2c7 100644 --- a/_nuxt/CwMQLHqL.js +++ b/_nuxt/DgtYBS7b.js @@ -1 +1 @@ -import{d as N,u as R,w as g,n as B,a as o,o as r,c,b as e,F as f,r as h,e as v,f as m,g as b,t as _,h as y,i as w,_ as T}from"./nJJO8dFm.js";import{_ as V}from"./RZ_1G7Mx.js";import $ from"./DAyK0gv0.js";import{u as D}from"./BBOrgyAk.js";import{q as E}from"./axEFYTs9.js";import"./C-v3KzvZ.js";import"./CxYJgpPD.js";import"./DFIm0aE1.js";import"./IShi1APO.js";const q={key:0,class:"container mx-auto"},A={class:"mb-10 bg-gray-200 p-10 shadow-lg"},F={class:"space-y-6"},L={class:"flex space-x-2"},S={class:"flex flex-col space-y-2 md:flex md:flex-row md:space-x-2 md:space-y-0"},I={class:"flex flex-col space-y-2 md:flex md:flex-row md:space-x-2 md:space-y-0"},M={class:"flex"},O=["src"],j={class:"text-xl font-bold text-gray-700 md:text-3xl"},z={class:"prose max-w-none prose-a:font-bold prose-a:no-underline hover:prose-a:text-orange-500 prose-pre:bg-white prose-pre:text-black"},Z=N({__name:"[...slug]",async setup(G){let s,l;const d=R(),{data:t}=([s,l]=g(()=>D("page-data",()=>E(d.path).findOne())),s=await s,l(),s),u={};if(t.value===null||d.path in u){const i=u[d.path]||"/";console.log(i),[s,l]=g(()=>B({path:i})),await s,l()}return(i,a)=>{const x=T,k=V,C=$;return o(t)?(r(),c("div",q,[e("article",A,[e("div",F,[e("div",L,[e("div",null,[a[0]||(a[0]=e("div",{class:"text-xs uppercase text-gray-400"},"Category",-1)),e("div",S,[(r(!0),c(f,null,h(o(t).categories,(n,p)=>(r(),v(x,{class:"w-min rounded-md bg-background px-2 text-sm font-bold text-white hover:cursor-pointer hover:bg-orange-500",key:p,to:`/articles?category=${n}`},{default:m(()=>[b(_(n),1)]),_:2},1032,["to"]))),128))])]),a[2]||(a[2]=e("div",{class:"border-r border-gray-400"},null,-1)),e("div",null,[a[1]||(a[1]=e("div",{class:"text-xs uppercase text-gray-400"},"Tags",-1)),e("div",I,[(r(!0),c(f,null,h(o(t).tags,(n,p)=>(r(),v(x,{class:"w-min rounded-md bg-background px-2 text-sm font-bold text-white hover:cursor-pointer hover:bg-orange-500",key:p,to:`/articles?tag=${n}`},{default:m(()=>[b(_(n),1)]),_:2},1032,["to"]))),128))])])]),e("div",M,[o(t).cover_image?(r(),c("img",{key:0,class:"mr-4 h-16 border-2 border-black",src:o(t).cover_image},null,8,O)):y("",!0),e("h1",j,_(o(t).title),1)])]),e("article",z,[w(C,null,{default:m(()=>[w(k,{value:o(t)},null,8,["value"])]),_:1})])])])):y("",!0)}}});export{Z as default}; +import{d as N,u as R,w as g,n as B,a as o,o as r,c,b as e,F as f,r as h,e as v,f as m,g as b,t as _,h as y,i as w,_ as T}from"./BK37JMLf.js";import{_ as V}from"./CWkD7dT7.js";import $ from"./CW9x3cwD.js";import{u as D}from"./Dl5rqmmJ.js";import{q as E}from"./BUUEBr-A.js";import"./C-v3KzvZ.js";import"./CxYJgpPD.js";import"./DmH48LNN.js";import"./IShi1APO.js";const q={key:0,class:"container mx-auto"},A={class:"mb-10 bg-gray-200 p-10 shadow-lg"},F={class:"space-y-6"},L={class:"flex space-x-2"},S={class:"flex flex-col space-y-2 md:flex md:flex-row md:space-x-2 md:space-y-0"},I={class:"flex flex-col space-y-2 md:flex md:flex-row md:space-x-2 md:space-y-0"},M={class:"flex"},O=["src"],j={class:"text-xl font-bold text-gray-700 md:text-3xl"},z={class:"prose max-w-none prose-a:font-bold prose-a:no-underline hover:prose-a:text-orange-500 prose-pre:bg-white prose-pre:text-black"},Z=N({__name:"[...slug]",async setup(G){let s,l;const d=R(),{data:t}=([s,l]=g(()=>D("page-data",()=>E(d.path).findOne())),s=await s,l(),s),u={};if(t.value===null||d.path in u){const i=u[d.path]||"/";console.log(i),[s,l]=g(()=>B({path:i})),await s,l()}return(i,a)=>{const x=T,k=V,C=$;return o(t)?(r(),c("div",q,[e("article",A,[e("div",F,[e("div",L,[e("div",null,[a[0]||(a[0]=e("div",{class:"text-xs uppercase text-gray-400"},"Category",-1)),e("div",S,[(r(!0),c(f,null,h(o(t).categories,(n,p)=>(r(),v(x,{class:"w-min rounded-md bg-background px-2 text-sm font-bold text-white hover:cursor-pointer hover:bg-orange-500",key:p,to:`/articles?category=${n}`},{default:m(()=>[b(_(n),1)]),_:2},1032,["to"]))),128))])]),a[2]||(a[2]=e("div",{class:"border-r border-gray-400"},null,-1)),e("div",null,[a[1]||(a[1]=e("div",{class:"text-xs uppercase text-gray-400"},"Tags",-1)),e("div",I,[(r(!0),c(f,null,h(o(t).tags,(n,p)=>(r(),v(x,{class:"w-min rounded-md bg-background px-2 text-sm font-bold text-white hover:cursor-pointer hover:bg-orange-500",key:p,to:`/articles?tag=${n}`},{default:m(()=>[b(_(n),1)]),_:2},1032,["to"]))),128))])])]),e("div",M,[o(t).cover_image?(r(),c("img",{key:0,class:"mr-4 h-16 border-2 border-black",src:o(t).cover_image},null,8,O)):y("",!0),e("h1",j,_(o(t).title),1)])]),e("article",z,[w(C,null,{default:m(()=>[w(k,{value:o(t)},null,8,["value"])]),_:1})])])])):y("",!0)}}});export{Z as default}; diff --git a/_nuxt/BBOrgyAk.js b/_nuxt/Dl5rqmmJ.js similarity index 97% rename from _nuxt/BBOrgyAk.js rename to _nuxt/Dl5rqmmJ.js index 4c454003..46d2819c 100644 --- a/_nuxt/BBOrgyAk.js +++ b/_nuxt/Dl5rqmmJ.js @@ -1 +1 @@ -import{N as b,W as d,j as D,X as O,O as B,Y as M,y as E,v as H,Z as g,$ as R,a as S,a0 as V,a1 as j}from"./nJJO8dFm.js";const z=s=>s==="defer"||s===!1;function F(...s){var p;const i=typeof s[s.length-1]=="string"?s.pop():void 0;typeof s[0]!="string"&&s.unshift(i);let[t,u,a={}]=s;if(typeof t!="string")throw new TypeError("[nuxt] [asyncData] key must be a string.");if(typeof u!="function")throw new TypeError("[nuxt] [asyncData] handler must be a function.");const e=b(),P=u,C=()=>d.value,w=()=>e.isHydrating?e.payload.data[t]:e.static.data[t];a.server=a.server??!0,a.default=a.default??C,a.getCachedData=a.getCachedData??w,a.lazy=a.lazy??!1,a.immediate=a.immediate??!0,a.deep=a.deep??d.deep,a.dedupe=a.dedupe??"cancel";const f=a.getCachedData(t,e),h=f!=null;if(!e._asyncData[t]||!a.immediate){(p=e.payload._errors)[t]??(p[t]=d.errorValue);const o=a.deep?D:O;e._asyncData[t]={data:o(h?f:a.default()),pending:D(!h),error:B(e.payload._errors,t),status:D("idle"),_default:a.default}}const r={...e._asyncData[t]};delete r._default,r.refresh=r.execute=(o={})=>{if(e._asyncDataPromises[t]){if(z(o.dedupe??a.dedupe))return e._asyncDataPromises[t];e._asyncDataPromises[t].cancelled=!0}if(o._initial||e.isHydrating&&o._initial!==!1){const c=o._initial?f:a.getCachedData(t,e);if(c!=null)return Promise.resolve(c)}r.pending.value=!0,r.status.value="pending";const l=new Promise((c,n)=>{try{c(P(e))}catch(y){n(y)}}).then(async c=>{if(l.cancelled)return e._asyncDataPromises[t];let n=c;a.transform&&(n=await a.transform(c)),a.pick&&(n=K(n,a.pick)),e.payload.data[t]=n,r.data.value=n,r.error.value=d.errorValue,r.status.value="success"}).catch(c=>{if(l.cancelled)return e._asyncDataPromises[t];r.error.value=R(c),r.data.value=S(a.default()),r.status.value="error"}).finally(()=>{l.cancelled||(r.pending.value=!1,delete e._asyncDataPromises[t])});return e._asyncDataPromises[t]=l,e._asyncDataPromises[t]},r.clear=()=>N(e,t);const m=()=>r.refresh({_initial:!0}),_=a.server!==!1&&e.payload.serverRendered;{const o=V();if(o&&_&&a.immediate&&!o.sp&&(o.sp=[]),o&&!o._nuxtOnBeforeMountCbs){o._nuxtOnBeforeMountCbs=[];const n=o._nuxtOnBeforeMountCbs;M(()=>{n.forEach(y=>{y()}),n.splice(0,n.length)}),E(()=>n.splice(0,n.length))}_&&e.isHydrating&&(r.error.value||f!=null)?(r.pending.value=!1,r.status.value=r.error.value?"error":"success"):o&&(e.payload.serverRendered&&e.isHydrating||a.lazy)&&a.immediate?o._nuxtOnBeforeMountCbs.push(m):a.immediate&&m();const l=j();if(a.watch){const n=H(a.watch,()=>r.refresh());l&&g(n)}const c=e.hook("app:data:refresh",async n=>{(!n||n.includes(t))&&await r.refresh()});l&&g(c)}const v=Promise.resolve(e._asyncDataPromises[t]).then(()=>r);return Object.assign(v,r),v}function N(s,i){i in s.payload.data&&(s.payload.data[i]=void 0),i in s.payload._errors&&(s.payload._errors[i]=d.errorValue),s._asyncData[i]&&(s._asyncData[i].data.value=void 0,s._asyncData[i].error.value=d.errorValue,s._asyncData[i].pending.value=!1,s._asyncData[i].status.value="idle"),i in s._asyncDataPromises&&(s._asyncDataPromises[i]&&(s._asyncDataPromises[i].cancelled=!0),s._asyncDataPromises[i]=void 0)}function K(s,i){const t={};for(const u of i)t[u]=s[u];return t}export{F as u}; +import{N as b,W as d,j as D,X as O,O as B,Y as M,y as E,v as H,Z as g,$ as R,a as S,a0 as V,a1 as j}from"./BK37JMLf.js";const z=s=>s==="defer"||s===!1;function F(...s){var p;const i=typeof s[s.length-1]=="string"?s.pop():void 0;typeof s[0]!="string"&&s.unshift(i);let[t,u,a={}]=s;if(typeof t!="string")throw new TypeError("[nuxt] [asyncData] key must be a string.");if(typeof u!="function")throw new TypeError("[nuxt] [asyncData] handler must be a function.");const e=b(),P=u,C=()=>d.value,w=()=>e.isHydrating?e.payload.data[t]:e.static.data[t];a.server=a.server??!0,a.default=a.default??C,a.getCachedData=a.getCachedData??w,a.lazy=a.lazy??!1,a.immediate=a.immediate??!0,a.deep=a.deep??d.deep,a.dedupe=a.dedupe??"cancel";const f=a.getCachedData(t,e),h=f!=null;if(!e._asyncData[t]||!a.immediate){(p=e.payload._errors)[t]??(p[t]=d.errorValue);const o=a.deep?D:O;e._asyncData[t]={data:o(h?f:a.default()),pending:D(!h),error:B(e.payload._errors,t),status:D("idle"),_default:a.default}}const r={...e._asyncData[t]};delete r._default,r.refresh=r.execute=(o={})=>{if(e._asyncDataPromises[t]){if(z(o.dedupe??a.dedupe))return e._asyncDataPromises[t];e._asyncDataPromises[t].cancelled=!0}if(o._initial||e.isHydrating&&o._initial!==!1){const c=o._initial?f:a.getCachedData(t,e);if(c!=null)return Promise.resolve(c)}r.pending.value=!0,r.status.value="pending";const l=new Promise((c,n)=>{try{c(P(e))}catch(y){n(y)}}).then(async c=>{if(l.cancelled)return e._asyncDataPromises[t];let n=c;a.transform&&(n=await a.transform(c)),a.pick&&(n=K(n,a.pick)),e.payload.data[t]=n,r.data.value=n,r.error.value=d.errorValue,r.status.value="success"}).catch(c=>{if(l.cancelled)return e._asyncDataPromises[t];r.error.value=R(c),r.data.value=S(a.default()),r.status.value="error"}).finally(()=>{l.cancelled||(r.pending.value=!1,delete e._asyncDataPromises[t])});return e._asyncDataPromises[t]=l,e._asyncDataPromises[t]},r.clear=()=>N(e,t);const m=()=>r.refresh({_initial:!0}),_=a.server!==!1&&e.payload.serverRendered;{const o=V();if(o&&_&&a.immediate&&!o.sp&&(o.sp=[]),o&&!o._nuxtOnBeforeMountCbs){o._nuxtOnBeforeMountCbs=[];const n=o._nuxtOnBeforeMountCbs;M(()=>{n.forEach(y=>{y()}),n.splice(0,n.length)}),E(()=>n.splice(0,n.length))}_&&e.isHydrating&&(r.error.value||f!=null)?(r.pending.value=!1,r.status.value=r.error.value?"error":"success"):o&&(e.payload.serverRendered&&e.isHydrating||a.lazy)&&a.immediate?o._nuxtOnBeforeMountCbs.push(m):a.immediate&&m();const l=j();if(a.watch){const n=H(a.watch,()=>r.refresh());l&&g(n)}const c=e.hook("app:data:refresh",async n=>{(!n||n.includes(t))&&await r.refresh()});l&&g(c)}const v=Promise.resolve(e._asyncDataPromises[t]).then(()=>r);return Object.assign(v,r),v}function N(s,i){i in s.payload.data&&(s.payload.data[i]=void 0),i in s.payload._errors&&(s.payload._errors[i]=d.errorValue),s._asyncData[i]&&(s._asyncData[i].data.value=void 0,s._asyncData[i].error.value=d.errorValue,s._asyncData[i].pending.value=!1,s._asyncData[i].status.value="idle"),i in s._asyncDataPromises&&(s._asyncDataPromises[i]&&(s._asyncDataPromises[i].cancelled=!0),s._asyncDataPromises[i]=void 0)}function K(s,i){const t={};for(const u of i)t[u]=s[u];return t}export{F as u}; diff --git a/_nuxt/Dm2eZEft.js b/_nuxt/Dm2eZEft.js new file mode 100644 index 00000000..eef116a4 --- /dev/null +++ b/_nuxt/Dm2eZEft.js @@ -0,0 +1 @@ +import{o as i,c as s,b as e,i as a,f as c,g as m,a as u,_ as d,k as w,F as v,r as y,e as x,t as k,h as b}from"./BK37JMLf.js";function M(o,t){return i(),s("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true","data-slot":"icon"},[e("path",{"fill-rule":"evenodd",d:"M8.914 6.025a.75.75 0 0 1 1.06 0 3.5 3.5 0 0 1 0 4.95l-2 2a3.5 3.5 0 0 1-5.396-4.402.75.75 0 0 1 1.251.827 2 2 0 0 0 3.085 2.514l2-2a2 2 0 0 0 0-2.828.75.75 0 0 1 0-1.06Z","clip-rule":"evenodd"}),e("path",{"fill-rule":"evenodd",d:"M7.086 9.975a.75.75 0 0 1-1.06 0 3.5 3.5 0 0 1 0-4.95l2-2a3.5 3.5 0 0 1 5.396 4.402.75.75 0 0 1-1.251-.827 2 2 0 0 0-3.085-2.514l-2 2a2 2 0 0 0 0 2.828.75.75 0 0 1 0 1.06Z","clip-rule":"evenodd"})])}const I={class:"flex justify-end"},j={__name:"MoreLink",props:{to:{type:String,required:!0}},setup(o){const t=o;return(l,r)=>{const p=d;return i(),s("div",I,[a(p,{to:t.to,class:"flex items-center text-sm font-bold text-white hover:text-orange-500"},{default:c(()=>[r[0]||(r[0]=m(" More ")),a(u(M),{class:"ml-1 h-5 w-5","aria-hidden":"true"})]),_:1},8,["to"])])}}},D={class:"bg-gradient-to-b from-transparent to-background text-white"},L={class:"container mx-auto space-y-4 py-8 text-white"},P={class:"mb-4 grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3"},V=["src"],B={class:"absolute top-0 flex h-full w-full items-center justify-center bg-gray-500/50"},C={class:"m-2 bg-black/70 p-2"},N={class:"text-xl font-bold text-orange-500"},S=["innerHTML"],T={key:0},z={__name:"Playground",props:{showImages:{type:Boolean,default:!1},limit:{type:Number,default:null},linkToPlayground:{type:Boolean,default:!1}},setup(o){const t=o,l=[{title:"Conway",description:"Conway's game of life written in vanilla Javascript",link:"/playground/conway",img:"/images/previews/conway.png"},{title:"wm.spoon",description:"Window manager for Hammer Spoon written in Lua",link:"https://github.com/cmpadden/wm.spoon",img:"/images/previews/wm.spoon.png"},{title:"Metronome",description:"A simple metronome for tracking tempo in the browser",link:"/playground/metronome",img:"/images/previews/metronome.png"},{title:"Conjugations",description:"Search and explore the conjugations of 1000 French verbs",link:"/playground/french",img:"/images/previews/french-conjugations.png"},{title:"Mountains",description:"Visualize a gradient of colored waves generated with Perlin noise",link:"/playground/palettes/mountains",img:"/images/previews/noise.png"},{title:"Spectrogram",description:"Visualize the audio from your microphone as a waveform, frequency bars, and a spectrogram",link:"/playground/audio",img:"/images/previews/microphone.png"},{title:"Waves",description:"Demonstration of using p5.js within Vue.js to visualize trigonometric functions",link:"/playground/waves",img:"/images/previews/waves.png"},{title:"MIDI Chords",description:"Identify the chords being played by your attached MIDI device",link:"/playground/chords",img:"/images/previews/chord-identifier.png"},{title:"MIDI Events",description:"View the MIDI events triggered by a MIDI-controller through the Web MIDI API",link:"/playground/midi",img:"/images/previews/midi-events.png"},{title:"Matrix Multiplication",description:"Step through the process of matrix multiplication",link:"/playground/matrix",img:"/images/previews/matrix-multiplication.png"},{title:"Sequence Plotter",description:"Plot the fist 10,000 digits of Pi, or any sequence of digits, in 2-dimensional space",link:"/playground/plotter",img:"/images/previews/plotter.png"}],r=w(()=>t.limit===null||t.limit<=0?l:l.slice(0,t.limit));return(p,g)=>{const h=d,f=d,_=j;return i(),s("section",D,[e("div",L,[a(h,{to:"/playground",class:"font-milk text-2xl text-white underline decoration-orange-500 decoration-2"},{default:c(()=>g[0]||(g[0]=[m(" Experiments ")])),_:1}),e("div",P,[(i(!0),s(v,null,y(u(r),n=>(i(),x(f,{class:"relative drop-shadow-lg hover:ring-1 hover:ring-white",key:n.title,to:n.link},{default:c(()=>[e("img",{class:"grayscale-1 h-full w-full object-cover",src:n.img||"images/placeholder.png"},null,8,V),e("div",B,[e("div",C,[e("h3",N,k(n.title),1),e("div",{class:"line-clamp-2 text-sm text-gray-300",innerHTML:n.description},null,8,S)])])]),_:2},1032,["to"]))),128))]),o.linkToPlayground?(i(),s("div",T,[a(_,{to:"/playground"})])):b("",!0)])])}}};export{j as _,z as a}; diff --git a/_nuxt/DFIm0aE1.js b/_nuxt/DmH48LNN.js similarity index 98% rename from _nuxt/DFIm0aE1.js rename to _nuxt/DmH48LNN.js index e3a956c6..aa5af216 100644 --- a/_nuxt/DFIm0aE1.js +++ b/_nuxt/DmH48LNN.js @@ -1 +1 @@ -import{j as A,Z as b,v as O,a1 as P,a8 as R,a7 as D,G as x,u as T}from"./nJJO8dFm.js";import{i as N}from"./IShi1APO.js";function L(e,o){if(typeof e!="string")throw new TypeError("argument str must be a string");const i={},t=o||{},s=t.decode||M;let a=0;for(;aD(decodeURIComponent(e)),encode:e=>encodeURIComponent(typeof e=="string"?e:JSON.stringify(e))},y=window.cookieStore;function k(e,o){var f;const i={...q,...o};i.filter??(i.filter=c=>c===e);const t=C(i)||{};let s;i.maxAge!==void 0?s=i.maxAge*1e3:i.expires&&(s=i.expires.getTime()-Date.now());const a=s!==void 0&&s<=0,r=u(a?void 0:t[e]??((f=i.default)==null?void 0:f.call(i))),n=s&&!a?H(r,s,i.watch&&i.watch!=="shallow"):A(r);{let c=null;try{!y&&typeof BroadcastChannel<"u"&&(c=new BroadcastChannel(`nuxt:cookies:${e}`))}catch{}const l=()=>{i.readonly||N(n.value,t[e])||(F(e,n.value,i),t[e]=u(n.value),c==null||c.postMessage({value:i.encode(n.value)}))},p=d=>{var m;const w=d.refresh?(m=C(i))==null?void 0:m[e]:i.decode(d.value);v=!0,n.value=w,t[e]=u(w),x(()=>{v=!1})};let v=!1;const S=!!P();if(S&&b(()=>{v=!0,l(),c==null||c.close()}),y){const d=w=>{const m=w.changed.find(g=>g.name===e),I=w.deleted.find(g=>g.name===e);m&&p({value:m.value}),I&&p({value:null})};y.addEventListener("change",d),S&&b(()=>y.removeEventListener("change",d))}else c&&(c.onmessage=({data:d})=>p(d));i.watch?O(n,()=>{v||l()},{deep:i.watch!=="shallow"}):l()}return n}function C(e={}){return L(document.cookie,e)}function B(e,o,i={}){return o==null?E(e,o,{...i,maxAge:-1}):E(e,o,i)}function F(e,o,i={}){document.cookie=B(e,o,i)}const j=2147483647;function H(e,o,i){let t,s,a=0;const r=i?A(e):{value:e};return P()&&b(()=>{s==null||s(),clearTimeout(t)}),R((n,f)=>{i&&(s=O(r,f));function c(){a=0,clearTimeout(t);const l=o-a,p=l{if(a+=p,a({isEnabled:()=>{const t=T().query;return Object.prototype.hasOwnProperty.call(t,"preview")&&!t.preview?!1:!!(t.preview||k("previewToken").value||sessionStorage.getItem("previewToken"))},getPreviewToken:()=>k("previewToken").value||sessionStorage.getItem("previewToken")||void 0,setPreviewToken:t=>{k("previewToken").value=t,T().query.preview=t||"",t?sessionStorage.setItem("previewToken",t):sessionStorage.removeItem("previewToken"),window.location.reload()}});export{$ as u}; +import{j as A,Z as b,v as O,a1 as P,a8 as R,a7 as D,G as x,u as T}from"./BK37JMLf.js";import{i as N}from"./IShi1APO.js";function L(e,o){if(typeof e!="string")throw new TypeError("argument str must be a string");const i={},t=o||{},s=t.decode||M;let a=0;for(;aD(decodeURIComponent(e)),encode:e=>encodeURIComponent(typeof e=="string"?e:JSON.stringify(e))},y=window.cookieStore;function k(e,o){var f;const i={...q,...o};i.filter??(i.filter=c=>c===e);const t=C(i)||{};let s;i.maxAge!==void 0?s=i.maxAge*1e3:i.expires&&(s=i.expires.getTime()-Date.now());const a=s!==void 0&&s<=0,r=u(a?void 0:t[e]??((f=i.default)==null?void 0:f.call(i))),n=s&&!a?H(r,s,i.watch&&i.watch!=="shallow"):A(r);{let c=null;try{!y&&typeof BroadcastChannel<"u"&&(c=new BroadcastChannel(`nuxt:cookies:${e}`))}catch{}const l=()=>{i.readonly||N(n.value,t[e])||(F(e,n.value,i),t[e]=u(n.value),c==null||c.postMessage({value:i.encode(n.value)}))},p=d=>{var m;const w=d.refresh?(m=C(i))==null?void 0:m[e]:i.decode(d.value);v=!0,n.value=w,t[e]=u(w),x(()=>{v=!1})};let v=!1;const S=!!P();if(S&&b(()=>{v=!0,l(),c==null||c.close()}),y){const d=w=>{const m=w.changed.find(g=>g.name===e),I=w.deleted.find(g=>g.name===e);m&&p({value:m.value}),I&&p({value:null})};y.addEventListener("change",d),S&&b(()=>y.removeEventListener("change",d))}else c&&(c.onmessage=({data:d})=>p(d));i.watch?O(n,()=>{v||l()},{deep:i.watch!=="shallow"}):l()}return n}function C(e={}){return L(document.cookie,e)}function B(e,o,i={}){return o==null?E(e,o,{...i,maxAge:-1}):E(e,o,i)}function F(e,o,i={}){document.cookie=B(e,o,i)}const j=2147483647;function H(e,o,i){let t,s,a=0;const r=i?A(e):{value:e};return P()&&b(()=>{s==null||s(),clearTimeout(t)}),R((n,f)=>{i&&(s=O(r,f));function c(){a=0,clearTimeout(t);const l=o-a,p=l{if(a+=p,a({isEnabled:()=>{const t=T().query;return Object.prototype.hasOwnProperty.call(t,"preview")&&!t.preview?!1:!!(t.preview||k("previewToken").value||sessionStorage.getItem("previewToken"))},getPreviewToken:()=>k("previewToken").value||sessionStorage.getItem("previewToken")||void 0,setPreviewToken:t=>{k("previewToken").value=t,T().query.preview=t||"",t?sessionStorage.setItem("previewToken",t):sessionStorage.removeItem("previewToken"),window.location.reload()}});export{$ as u}; diff --git a/_nuxt/D3LDyA07.js b/_nuxt/Dp1_NO-z.js similarity index 99% rename from _nuxt/D3LDyA07.js rename to _nuxt/Dp1_NO-z.js index b9d68d42..3e01538c 100644 --- a/_nuxt/D3LDyA07.js +++ b/_nuxt/Dp1_NO-z.js @@ -1 +1 @@ -import{a7 as _,U as B,I as D,N as W,Q as J}from"./nJJO8dFm.js";import{g as H,a as j,b as O,o as k,c as q,d as $,f as C,h as M,i as G}from"./axEFYTs9.js";import{p as Z}from"./C-v3KzvZ.js";import{u as Y}from"./DFIm0aE1.js";import"./IShi1APO.js";const F="memory",V=()=>{const t=new Map;return{name:F,getInstance:()=>t,hasItem(r){return t.has(r)},getItem(r){return t.get(r)??null},getItemRaw(r){return t.get(r)??null},setItem(r,n){t.set(r,n)},setItemRaw(r,n){t.set(r,n)},removeItem(r){t.delete(r)},getKeys(){return[...t.keys()]},clear(){t.clear()},dispose(){t.clear()}}};function Q(t){return!t||typeof t.then!="function"?Promise.resolve(t):t}function p(t,...r){try{return Q(t(...r))}catch(n){return Promise.reject(n)}}function X(t){const r=typeof t;return t===null||r!=="object"&&r!=="function"}function ee(t){const r=Object.getPrototypeOf(t);return!r||r.isPrototypeOf(Object)}function K(t){if(X(t))return String(t);if(ee(t)||Array.isArray(t))return JSON.stringify(t);if(typeof t.toJSON=="function")return K(t.toJSON());throw new Error("[unstorage] Cannot stringify value!")}const x="base64:";function te(t){return typeof t=="string"?t:x+ie(t)}function re(t){return typeof t!="string"||!t.startsWith(x)?t:ne(t.slice(x.length))}function ne(t){return globalThis.Buffer?Buffer.from(t,"base64"):Uint8Array.from(globalThis.atob(t),r=>r.codePointAt(0))}function ie(t){return globalThis.Buffer?Buffer.from(t).toString("base64"):globalThis.btoa(String.fromCodePoint(...t))}const ae=["hasItem","getItem","getItemRaw","setItem","setItemRaw","removeItem","getMeta","setMeta","removeMeta","getKeys","clear","mount","unmount"];function se(t,r){if(r=E(r),!r)return t;const n={...t};for(const a of ae)n[a]=(c="",...l)=>t[a](r+c,...l);return n.getKeys=(a="",...c)=>t.getKeys(r+a,...c).then(l=>l.map(o=>o.slice(r.length))),n}function y(t){var r;return t&&((r=t.split("?")[0])==null?void 0:r.replace(/[/\\]/g,":").replace(/:+/g,":").replace(/^:|:$/g,""))||""}function oe(...t){return y(t.join(":"))}function E(t){return t=y(t),t?t+":":""}const ue="memory",ce=()=>{const t=new Map;return{name:ue,getInstance:()=>t,hasItem(r){return t.has(r)},getItem(r){return t.get(r)??null},getItemRaw(r){return t.get(r)??null},setItem(r,n){t.set(r,n)},setItemRaw(r,n){t.set(r,n)},removeItem(r){t.delete(r)},getKeys(){return[...t.keys()]},clear(){t.clear()},dispose(){t.clear()}}};function le(t={}){const r={mounts:{"":t.driver||ce()},mountpoints:[""],watching:!1,watchListeners:[],unwatch:{}},n=e=>{for(const i of r.mountpoints)if(e.startsWith(i))return{base:i,relativeKey:e.slice(i.length),driver:r.mounts[i]};return{base:"",relativeKey:e,driver:r.mounts[""]}},a=(e,i)=>r.mountpoints.filter(s=>s.startsWith(e)||i&&e.startsWith(s)).map(s=>({relativeBase:e.length>s.length?e.slice(s.length):void 0,mountpoint:s,driver:r.mounts[s]})),c=(e,i)=>{if(r.watching){i=y(i);for(const s of r.watchListeners)s(e,i)}},l=async()=>{if(!r.watching){r.watching=!0;for(const e in r.mounts)r.unwatch[e]=await L(r.mounts[e],c,e)}},o=async()=>{if(r.watching){for(const e in r.unwatch)await r.unwatch[e]();r.unwatch={},r.watching=!1}},h=(e,i,s)=>{const u=new Map,m=f=>{let d=u.get(f.base);return d||(d={driver:f.driver,base:f.base,items:[]},u.set(f.base,d)),d};for(const f of e){const d=typeof f=="string",v=y(d?f:f.key),I=d?void 0:f.value,w=d||!f.options?i:{...i,...f.options},A=n(v);m(A).items.push({key:v,value:I,relativeKey:A.relativeKey,options:w})}return Promise.all([...u.values()].map(f=>s(f))).then(f=>f.flat())},g={hasItem(e,i={}){e=y(e);const{relativeKey:s,driver:u}=n(e);return p(u.hasItem,s,i)},getItem(e,i={}){e=y(e);const{relativeKey:s,driver:u}=n(e);return p(u.getItem,s,i).then(m=>_(m))},getItems(e,i={}){return h(e,i,s=>s.driver.getItems?p(s.driver.getItems,s.items.map(u=>({key:u.relativeKey,options:u.options})),i).then(u=>u.map(m=>({key:oe(s.base,m.key),value:_(m.value)}))):Promise.all(s.items.map(u=>p(s.driver.getItem,u.relativeKey,u.options).then(m=>({key:u.key,value:_(m)})))))},getItemRaw(e,i={}){e=y(e);const{relativeKey:s,driver:u}=n(e);return u.getItemRaw?p(u.getItemRaw,s,i):p(u.getItem,s,i).then(m=>re(m))},async setItem(e,i,s={}){if(i===void 0)return g.removeItem(e);e=y(e);const{relativeKey:u,driver:m}=n(e);m.setItem&&(await p(m.setItem,u,K(i),s),m.watch||c("update",e))},async setItems(e,i){await h(e,i,async s=>{if(s.driver.setItems)return p(s.driver.setItems,s.items.map(u=>({key:u.relativeKey,value:K(u.value),options:u.options})),i);s.driver.setItem&&await Promise.all(s.items.map(u=>p(s.driver.setItem,u.relativeKey,K(u.value),u.options)))})},async setItemRaw(e,i,s={}){if(i===void 0)return g.removeItem(e,s);e=y(e);const{relativeKey:u,driver:m}=n(e);if(m.setItemRaw)await p(m.setItemRaw,u,i,s);else if(m.setItem)await p(m.setItem,u,te(i),s);else return;m.watch||c("update",e)},async removeItem(e,i={}){typeof i=="boolean"&&(i={removeMeta:i}),e=y(e);const{relativeKey:s,driver:u}=n(e);u.removeItem&&(await p(u.removeItem,s,i),(i.removeMeta||i.removeMata)&&await p(u.removeItem,s+"$",i),u.watch||c("remove",e))},async getMeta(e,i={}){typeof i=="boolean"&&(i={nativeOnly:i}),e=y(e);const{relativeKey:s,driver:u}=n(e),m=Object.create(null);if(u.getMeta&&Object.assign(m,await p(u.getMeta,s,i)),!i.nativeOnly){const f=await p(u.getItem,s+"$",i).then(d=>_(d));f&&typeof f=="object"&&(typeof f.atime=="string"&&(f.atime=new Date(f.atime)),typeof f.mtime=="string"&&(f.mtime=new Date(f.mtime)),Object.assign(m,f))}return m},setMeta(e,i,s={}){return this.setItem(e+"$",i,s)},removeMeta(e,i={}){return this.removeItem(e+"$",i)},async getKeys(e,i={}){e=E(e);const s=a(e,!0);let u=[];const m=[];for(const f of s){const d=await p(f.driver.getKeys,f.relativeBase,i);for(const v of d){const I=f.mountpoint+y(v);u.some(w=>I.startsWith(w))||m.push(I)}u=[f.mountpoint,...u.filter(v=>!v.startsWith(f.mountpoint))]}return e?m.filter(f=>f.startsWith(e)&&f[f.length-1]!=="$"):m.filter(f=>f[f.length-1]!=="$")},async clear(e,i={}){e=E(e),await Promise.all(a(e,!1).map(async s=>{if(s.driver.clear)return p(s.driver.clear,s.relativeBase,i);if(s.driver.removeItem){const u=await s.driver.getKeys(s.relativeBase||"",i);return Promise.all(u.map(m=>s.driver.removeItem(m,i)))}}))},async dispose(){await Promise.all(Object.values(r.mounts).map(e=>U(e)))},async watch(e){return await l(),r.watchListeners.push(e),async()=>{r.watchListeners=r.watchListeners.filter(i=>i!==e),r.watchListeners.length===0&&await o()}},async unwatch(){r.watchListeners=[],await o()},mount(e,i){if(e=E(e),e&&r.mounts[e])throw new Error(`already mounted at ${e}`);return e&&(r.mountpoints.push(e),r.mountpoints.sort((s,u)=>u.length-s.length)),r.mounts[e]=i,r.watching&&Promise.resolve(L(i,c,e)).then(s=>{r.unwatch[e]=s}).catch(console.error),g},async unmount(e,i=!0){var s,u;e=E(e),!(!e||!r.mounts[e])&&(r.watching&&e in r.unwatch&&((u=(s=r.unwatch)[e])==null||u.call(s),delete r.unwatch[e]),i&&await U(r.mounts[e]),r.mountpoints=r.mountpoints.filter(m=>m!==e),delete r.mounts[e])},getMount(e=""){e=y(e)+":";const i=n(e);return{driver:i.driver,base:i.base}},getMounts(e="",i={}){return e=y(e),a(e,i.parents).map(u=>({driver:u.driver,base:u.mountpoint}))},keys:(e,i={})=>g.getKeys(e,i),get:(e,i={})=>g.getItem(e,i),set:(e,i,s={})=>g.setItem(e,i,s),has:(e,i={})=>g.hasItem(e,i),del:(e,i={})=>g.removeItem(e,i),remove:(e,i={})=>g.removeItem(e,i)};return g}function L(t,r,n){return t.watch?t.watch((a,c)=>r(a,n+c)):()=>{}}async function U(t){typeof t.dispose=="function"&&await p(t.dispose)}function fe(t={}){const r=me(n,t.operators);function n(a,c){return typeof c!="object"||c instanceof RegExp?r.$eq(a,c):Object.keys(c||{}).every(l=>{const o=c[l];if(l.startsWith("$")&&r[l]){const h=r[l];return typeof h=="function"?h(a,o):!1}return n(H(a,l),o)})}return n}function me(t,r={}){return{$match:(n,a)=>t(n,a),$eq:(n,a)=>a instanceof RegExp?a.test(n):n===a,$ne:(n,a)=>a instanceof RegExp?!a.test(n):n!==a,$not:(n,a)=>!t(n,a),$and:(n,a)=>(j(a,"$and requires an array as condition"),a.every(c=>t(n,c))),$or:(n,a)=>(j(a,"$or requires an array as condition"),a.some(c=>t(n,c))),$in:(n,a)=>O(a).some(c=>Array.isArray(n)?t(n,{$contains:c}):t(n,c)),$contains:(n,a)=>(n=Array.isArray(n)?n:String(n),O(a).every(c=>n.includes(c))),$icontains:(n,a)=>{if(typeof a!="string")throw new TypeError("$icontains requires a string, use $contains instead");return n=String(n).toLocaleLowerCase(),O(a).every(c=>n.includes(c.toLocaleLowerCase()))},$containsAny:(n,a)=>(j(a,"$containsAny requires an array as condition"),n=Array.isArray(n)?n:String(n),a.some(c=>n.includes(c))),$exists:(n,a)=>a?typeof n<"u":typeof n>"u",$type:(n,a)=>typeof n===String(a),$regex:(n,a)=>{if(!(a instanceof RegExp)){const c=String(a).match(/\/(.*)\/([dgimsuy]*)$/);a=c!=null&&c[1]?new RegExp(c[1],c[2]||""):new RegExp(a)}return a.test(String(n||""))},$lt:(n,a)=>nn<=a,$gt:(n,a)=>n>a,$gte:(n,a)=>n>=a,...r||{}}}function ge(t){const r=fe(),n=(l,{query:o,before:h,after:g})=>{const e=typeof o=="string"?{_path:o}:o,i=l.findIndex(u=>r(u,e));h=h??1,g=g??1;const s=new Array(h+g).fill(null,0);return i===-1?s:s.map((u,m)=>l[i-h+m+ +(m>=h)]||null)},a=[(l,o)=>{const h=l.result.filter(g=>O(o.where).every(e=>r(g,e)));return{...l,result:h,total:h.length}},(l,o)=>O(o.sort).forEach(h=>q(l.result,h)),function(o,h,g){var e;if(h.surround){let i=n(((e=o.result)==null?void 0:e.length)===1?g:o.result,h.surround);i=$(C(h.without))(i),i=$(M(h.only))(i),o.surround=i}return o}],c=[(l,o)=>{if(o.skip)return{...l,result:l.result.slice(o.skip),skip:o.skip}},(l,o)=>{if(o.limit)return{...l,result:l.result.slice(0,o.limit),limit:o.limit}},function(o,h,g){var e,i,s;if(h.dirConfig){const u=((e=o.result[0])==null?void 0:e._path)||((s=(i=h.where)==null?void 0:i.find(m=>m._path))==null?void 0:s._path);if(typeof u=="string"){const m=g.find(f=>f._path===B(u,"_dir"));m&&(o.dirConfig={_path:m._path,...C(["_"])(m)})}}return o},(l,o)=>({...l,result:$(C(o.without))(l.result)}),(l,o)=>({...l,result:$(M(o.only))(l.result)})];return async l=>{const o=await t(),h=l.params(),g={result:o,limit:0,skip:0,total:o.length},e=a.reduce((s,u)=>u(s,h,o)||s,g);if(h.count)return{result:e.result.length};const i=c.reduce((s,u)=>u(s,h,o)||s,e);return h.first?{...k(["skip","limit","total"])(i),result:i.result[0]}:i}}function N(t){const r=ge(t);return async n=>{var l;n.params().first&&n.withDirConfig();const a=n.params(),c=await r(n);return a.surround?c==null?void 0:c.surround:(c!=null&&c.dirConfig&&(c.result={_path:(l=c.dirConfig)==null?void 0:l._path,...c.result,_dir:c.dirConfig}),c==null?void 0:c.result)}}var P={exports:{}},he=P.exports,z;function pe(){return z||(z=1,function(t,r){(function(n,a,c){t.exports=c(),t.exports.default=c()})("slugify",he,function(){var n=JSON.parse(`{"$":"dollar","%":"percent","&":"and","<":"less",">":"greater","|":"or","¢":"cent","£":"pound","¤":"currency","¥":"yen","©":"(c)","ª":"a","®":"(r)","º":"o","À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","Æ":"AE","Ç":"C","È":"E","É":"E","Ê":"E","Ë":"E","Ì":"I","Í":"I","Î":"I","Ï":"I","Ð":"D","Ñ":"N","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","Ù":"U","Ú":"U","Û":"U","Ü":"U","Ý":"Y","Þ":"TH","ß":"ss","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","æ":"ae","ç":"c","è":"e","é":"e","ê":"e","ë":"e","ì":"i","í":"i","î":"i","ï":"i","ð":"d","ñ":"n","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","ù":"u","ú":"u","û":"u","ü":"u","ý":"y","þ":"th","ÿ":"y","Ā":"A","ā":"a","Ă":"A","ă":"a","Ą":"A","ą":"a","Ć":"C","ć":"c","Č":"C","č":"c","Ď":"D","ď":"d","Đ":"DJ","đ":"dj","Ē":"E","ē":"e","Ė":"E","ė":"e","Ę":"e","ę":"e","Ě":"E","ě":"e","Ğ":"G","ğ":"g","Ģ":"G","ģ":"g","Ĩ":"I","ĩ":"i","Ī":"i","ī":"i","Į":"I","į":"i","İ":"I","ı":"i","Ķ":"k","ķ":"k","Ļ":"L","ļ":"l","Ľ":"L","ľ":"l","Ł":"L","ł":"l","Ń":"N","ń":"n","Ņ":"N","ņ":"n","Ň":"N","ň":"n","Ō":"O","ō":"o","Ő":"O","ő":"o","Œ":"OE","œ":"oe","Ŕ":"R","ŕ":"r","Ř":"R","ř":"r","Ś":"S","ś":"s","Ş":"S","ş":"s","Š":"S","š":"s","Ţ":"T","ţ":"t","Ť":"T","ť":"t","Ũ":"U","ũ":"u","Ū":"u","ū":"u","Ů":"U","ů":"u","Ű":"U","ű":"u","Ų":"U","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","ź":"z","Ż":"Z","ż":"z","Ž":"Z","ž":"z","Ə":"E","ƒ":"f","Ơ":"O","ơ":"o","Ư":"U","ư":"u","Lj":"LJ","lj":"lj","Nj":"NJ","nj":"nj","Ș":"S","ș":"s","Ț":"T","ț":"t","ə":"e","˚":"o","Ά":"A","Έ":"E","Ή":"H","Ί":"I","Ό":"O","Ύ":"Y","Ώ":"W","ΐ":"i","Α":"A","Β":"B","Γ":"G","Δ":"D","Ε":"E","Ζ":"Z","Η":"H","Θ":"8","Ι":"I","Κ":"K","Λ":"L","Μ":"M","Ν":"N","Ξ":"3","Ο":"O","Π":"P","Ρ":"R","Σ":"S","Τ":"T","Υ":"Y","Φ":"F","Χ":"X","Ψ":"PS","Ω":"W","Ϊ":"I","Ϋ":"Y","ά":"a","έ":"e","ή":"h","ί":"i","ΰ":"y","α":"a","β":"b","γ":"g","δ":"d","ε":"e","ζ":"z","η":"h","θ":"8","ι":"i","κ":"k","λ":"l","μ":"m","ν":"n","ξ":"3","ο":"o","π":"p","ρ":"r","ς":"s","σ":"s","τ":"t","υ":"y","φ":"f","χ":"x","ψ":"ps","ω":"w","ϊ":"i","ϋ":"y","ό":"o","ύ":"y","ώ":"w","Ё":"Yo","Ђ":"DJ","Є":"Ye","І":"I","Ї":"Yi","Ј":"J","Љ":"LJ","Њ":"NJ","Ћ":"C","Џ":"DZ","А":"A","Б":"B","В":"V","Г":"G","Д":"D","Е":"E","Ж":"Zh","З":"Z","И":"I","Й":"J","К":"K","Л":"L","М":"M","Н":"N","О":"O","П":"P","Р":"R","С":"S","Т":"T","У":"U","Ф":"F","Х":"H","Ц":"C","Ч":"Ch","Ш":"Sh","Щ":"Sh","Ъ":"U","Ы":"Y","Ь":"","Э":"E","Ю":"Yu","Я":"Ya","а":"a","б":"b","в":"v","г":"g","д":"d","е":"e","ж":"zh","з":"z","и":"i","й":"j","к":"k","л":"l","м":"m","н":"n","о":"o","п":"p","р":"r","с":"s","т":"t","у":"u","ф":"f","х":"h","ц":"c","ч":"ch","ш":"sh","щ":"sh","ъ":"u","ы":"y","ь":"","э":"e","ю":"yu","я":"ya","ё":"yo","ђ":"dj","є":"ye","і":"i","ї":"yi","ј":"j","љ":"lj","њ":"nj","ћ":"c","ѝ":"u","џ":"dz","Ґ":"G","ґ":"g","Ғ":"GH","ғ":"gh","Қ":"KH","қ":"kh","Ң":"NG","ң":"ng","Ү":"UE","ү":"ue","Ұ":"U","ұ":"u","Һ":"H","һ":"h","Ә":"AE","ә":"ae","Ө":"OE","ө":"oe","Ա":"A","Բ":"B","Գ":"G","Դ":"D","Ե":"E","Զ":"Z","Է":"E'","Ը":"Y'","Թ":"T'","Ժ":"JH","Ի":"I","Լ":"L","Խ":"X","Ծ":"C'","Կ":"K","Հ":"H","Ձ":"D'","Ղ":"GH","Ճ":"TW","Մ":"M","Յ":"Y","Ն":"N","Շ":"SH","Չ":"CH","Պ":"P","Ջ":"J","Ռ":"R'","Ս":"S","Վ":"V","Տ":"T","Ր":"R","Ց":"C","Փ":"P'","Ք":"Q'","Օ":"O''","Ֆ":"F","և":"EV","ء":"a","آ":"aa","أ":"a","ؤ":"u","إ":"i","ئ":"e","ا":"a","ب":"b","ة":"h","ت":"t","ث":"th","ج":"j","ح":"h","خ":"kh","د":"d","ذ":"th","ر":"r","ز":"z","س":"s","ش":"sh","ص":"s","ض":"dh","ط":"t","ظ":"z","ع":"a","غ":"gh","ف":"f","ق":"q","ك":"k","ل":"l","م":"m","ن":"n","ه":"h","و":"w","ى":"a","ي":"y","ً":"an","ٌ":"on","ٍ":"en","َ":"a","ُ":"u","ِ":"e","ْ":"","٠":"0","١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","پ":"p","چ":"ch","ژ":"zh","ک":"k","گ":"g","ی":"y","۰":"0","۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9","฿":"baht","ა":"a","ბ":"b","გ":"g","დ":"d","ე":"e","ვ":"v","ზ":"z","თ":"t","ი":"i","კ":"k","ლ":"l","მ":"m","ნ":"n","ო":"o","პ":"p","ჟ":"zh","რ":"r","ს":"s","ტ":"t","უ":"u","ფ":"f","ქ":"k","ღ":"gh","ყ":"q","შ":"sh","ჩ":"ch","ც":"ts","ძ":"dz","წ":"ts","ჭ":"ch","ხ":"kh","ჯ":"j","ჰ":"h","Ṣ":"S","ṣ":"s","Ẁ":"W","ẁ":"w","Ẃ":"W","ẃ":"w","Ẅ":"W","ẅ":"w","ẞ":"SS","Ạ":"A","ạ":"a","Ả":"A","ả":"a","Ấ":"A","ấ":"a","Ầ":"A","ầ":"a","Ẩ":"A","ẩ":"a","Ẫ":"A","ẫ":"a","Ậ":"A","ậ":"a","Ắ":"A","ắ":"a","Ằ":"A","ằ":"a","Ẳ":"A","ẳ":"a","Ẵ":"A","ẵ":"a","Ặ":"A","ặ":"a","Ẹ":"E","ẹ":"e","Ẻ":"E","ẻ":"e","Ẽ":"E","ẽ":"e","Ế":"E","ế":"e","Ề":"E","ề":"e","Ể":"E","ể":"e","Ễ":"E","ễ":"e","Ệ":"E","ệ":"e","Ỉ":"I","ỉ":"i","Ị":"I","ị":"i","Ọ":"O","ọ":"o","Ỏ":"O","ỏ":"o","Ố":"O","ố":"o","Ồ":"O","ồ":"o","Ổ":"O","ổ":"o","Ỗ":"O","ỗ":"o","Ộ":"O","ộ":"o","Ớ":"O","ớ":"o","Ờ":"O","ờ":"o","Ở":"O","ở":"o","Ỡ":"O","ỡ":"o","Ợ":"O","ợ":"o","Ụ":"U","ụ":"u","Ủ":"U","ủ":"u","Ứ":"U","ứ":"u","Ừ":"U","ừ":"u","Ử":"U","ử":"u","Ữ":"U","ữ":"u","Ự":"U","ự":"u","Ỳ":"Y","ỳ":"y","Ỵ":"Y","ỵ":"y","Ỷ":"Y","ỷ":"y","Ỹ":"Y","ỹ":"y","–":"-","‘":"'","’":"'","“":"\\"","”":"\\"","„":"\\"","†":"+","•":"*","…":"...","₠":"ecu","₢":"cruzeiro","₣":"french franc","₤":"lira","₥":"mill","₦":"naira","₧":"peseta","₨":"rupee","₩":"won","₪":"new shequel","₫":"dong","€":"euro","₭":"kip","₮":"tugrik","₯":"drachma","₰":"penny","₱":"peso","₲":"guarani","₳":"austral","₴":"hryvnia","₵":"cedi","₸":"kazakhstani tenge","₹":"indian rupee","₺":"turkish lira","₽":"russian ruble","₿":"bitcoin","℠":"sm","™":"tm","∂":"d","∆":"delta","∑":"sum","∞":"infinity","♥":"love","元":"yuan","円":"yen","﷼":"rial","ﻵ":"laa","ﻷ":"laa","ﻹ":"lai","ﻻ":"la"}`),a=JSON.parse('{"bg":{"Й":"Y","Ц":"Ts","Щ":"Sht","Ъ":"A","Ь":"Y","й":"y","ц":"ts","щ":"sht","ъ":"a","ь":"y"},"de":{"Ä":"AE","ä":"ae","Ö":"OE","ö":"oe","Ü":"UE","ü":"ue","ß":"ss","%":"prozent","&":"und","|":"oder","∑":"summe","∞":"unendlich","♥":"liebe"},"es":{"%":"por ciento","&":"y","<":"menor que",">":"mayor que","|":"o","¢":"centavos","£":"libras","¤":"moneda","₣":"francos","∑":"suma","∞":"infinito","♥":"amor"},"fr":{"%":"pourcent","&":"et","<":"plus petit",">":"plus grand","|":"ou","¢":"centime","£":"livre","¤":"devise","₣":"franc","∑":"somme","∞":"infini","♥":"amour"},"pt":{"%":"porcento","&":"e","<":"menor",">":"maior","|":"ou","¢":"centavo","∑":"soma","£":"libra","∞":"infinito","♥":"amor"},"uk":{"И":"Y","и":"y","Й":"Y","й":"y","Ц":"Ts","ц":"ts","Х":"Kh","х":"kh","Щ":"Shch","щ":"shch","Г":"H","г":"h"},"vi":{"Đ":"D","đ":"d"},"da":{"Ø":"OE","ø":"oe","Å":"AA","å":"aa","%":"procent","&":"og","|":"eller","$":"dollar","<":"mindre end",">":"større end"},"nb":{"&":"og","Å":"AA","Æ":"AE","Ø":"OE","å":"aa","æ":"ae","ø":"oe"},"it":{"&":"e"},"nl":{"&":"en"},"sv":{"&":"och","Å":"AA","Ä":"AE","Ö":"OE","å":"aa","ä":"ae","ö":"oe"}}');function c(l,o){if(typeof l!="string")throw new Error("slugify: string argument expected");o=typeof o=="string"?{replacement:o}:o||{};var h=a[o.locale]||{},g=o.replacement===void 0?"-":o.replacement,e=o.trim===void 0?!0:o.trim,i=l.normalize().split("").reduce(function(s,u){var m=h[u];return m===void 0&&(m=n[u]),m===void 0&&(m=u),m===g&&(m=" "),s+m.replace(o.remove||/[^\w\s$*_+~.()'"!\-:@]+/g,"")},"");return o.strict&&(i=i.replace(/[^A-Za-z0-9\s]/g,"")),e&&(i=i.trim()),i=i.replace(/\s+/g,g),o.lower&&(i=i.toLowerCase()),i}return c.extend=function(l){Object.assign(n,l)},c})}(P)),P.exports}pe();const de=t=>t.split(/[\s-]/g).map(Z).join(" ");function ye(t,r){const{navigation:n}=D().public.content;if(n===!1)return[];const a=l=>({...ve(["title",...n.fields])(l),...Ie(l==null?void 0:l.navigation)?l.navigation:{}}),c=t.sort((l,o)=>l._path.localeCompare(o._path)).reduce((l,o)=>{var m;const h=o._path.substring(1).split("/"),g=o._id.split(":").slice(1),e=!!((m=g[g.length-1])!=null&&m.match(/([1-9][0-9]*\.)?index.md/g)),i=f=>({title:f.title,_path:f._path,_file:f._file,children:[],...a(f),...f._draft?{_draft:!0}:{}}),s=i(o);if(e){const f=r[s._path];if(typeof(f==null?void 0:f.navigation)<"u"&&!(f!=null&&f.navigation))return l;if(o._path!=="/"){const d=i(o);s.children.push(d)}f&&Object.assign(s,a(f))}return h.length===1?(l.push(s),l):(h.slice(0,-1).reduce((f,d,v)=>{const I="/"+h.slice(0,v+1).join("/"),w=r[I];if(typeof(w==null?void 0:w.navigation)<"u"&&!w.navigation)return[];let A=f.find(b=>b._path===I);return A||(A={title:de(d),_path:I,_file:o._file,children:[],...w&&a(w)},f.push(A)),A.children},l).push(s),l)},[]);return T(c)}const we=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"});function T(t){var n;t.forEach(a=>{a._file=a._file.split(".").slice(0,-1).join(".")});const r=t.sort((a,c)=>we.compare(a._file,c._file));for(const a of r)(n=a.children)!=null&&n.length?T(a.children):delete a.children,delete a._file;return t}function ve(t){return r=>(r=r||{},t.length?t.filter(n=>typeof r[n]<"u").reduce((n,a)=>Object.assign(n,{[a]:r[a]}),{}):r)}function Ie(t){return Object.prototype.toString.call(t)==="[object Object]"}const Ae=t=>J(t,D().public.content.api.baseURL),Ee=se(le({driver:V()}),"@content");function Oe(t){async function r(){const n=new Set(await t.getKeys("cache:")),a=Y().getPreviewToken();if(a){const l=await t.getItem(`${a}$`).then(g=>g||{});if(Array.isArray(l.ignoreSources)){const g=l.ignoreSources.map(e=>`cache:${e.trim()}:`);for(const e of n)g.some(i=>e.startsWith(i))&&n.delete(e)}const o=await t.getKeys(`${a}:`),h=await Promise.all(o.map(g=>t.getItem(g)));for(const g of h)n.delete(`cache:${g._id}`),g.__deleted||n.add(`${a}:${g._id}`)}return await Promise.all(Array.from(n).map(l=>t.getItem(l)))}return{storage:t,fetch:N(r),query:n=>G(N(r),{initialParams:n,legacy:!0})}}let R=null,S=null;async function _e(){return S?await S:R||(S=$e(),R=await S),R}async function $e(){const t=W(),{content:r}=D().public,n=Oe(Ee),a=await n.storage.getItem("integrity");if(r.integrity!==+(a||0)){const{contents:c,navigation:l}=await $fetch(Ae(r.integrity?`cache.${r.integrity}.json`:"cache.json"));await Promise.all(c.map(o=>n.storage.setItem(`cache:${o._id}`,o))),await n.storage.setItem("navigation",l),await n.storage.setItem("integrity",r.integrity)}return await t.callHook("content:storage",n.storage),n}async function Re(t){const r=await _e();if(!Y().getPreviewToken()&&Object.keys(t||{}).length===0)return r.storage.getItem("navigation");const n=await r.query(t).where({_partial:!1,navigation:{$ne:!1}}).find(),c=(await r.query().where({_path:/\/_dir$/i,_partial:!0}).find()).reduce((l,o)=>{var g;((g=o.title)==null?void 0:g.toLowerCase())==="dir"&&(o.title=void 0);const h=o._path.split("/").slice(0,-1).join("/")||"/";return l[h]={...o,...o.body},l},{});return ye(n,c)}export{Ee as contentStorage,Oe as createDB,Re as generateNavigation,_e as useContentDatabase}; +import{a7 as _,U as B,I as D,N as W,Q as J}from"./BK37JMLf.js";import{g as H,a as j,b as O,o as k,c as q,d as $,f as C,h as M,i as G}from"./BUUEBr-A.js";import{p as Z}from"./C-v3KzvZ.js";import{u as Y}from"./DmH48LNN.js";import"./IShi1APO.js";const F="memory",V=()=>{const t=new Map;return{name:F,getInstance:()=>t,hasItem(r){return t.has(r)},getItem(r){return t.get(r)??null},getItemRaw(r){return t.get(r)??null},setItem(r,n){t.set(r,n)},setItemRaw(r,n){t.set(r,n)},removeItem(r){t.delete(r)},getKeys(){return[...t.keys()]},clear(){t.clear()},dispose(){t.clear()}}};function Q(t){return!t||typeof t.then!="function"?Promise.resolve(t):t}function p(t,...r){try{return Q(t(...r))}catch(n){return Promise.reject(n)}}function X(t){const r=typeof t;return t===null||r!=="object"&&r!=="function"}function ee(t){const r=Object.getPrototypeOf(t);return!r||r.isPrototypeOf(Object)}function K(t){if(X(t))return String(t);if(ee(t)||Array.isArray(t))return JSON.stringify(t);if(typeof t.toJSON=="function")return K(t.toJSON());throw new Error("[unstorage] Cannot stringify value!")}const x="base64:";function te(t){return typeof t=="string"?t:x+ie(t)}function re(t){return typeof t!="string"||!t.startsWith(x)?t:ne(t.slice(x.length))}function ne(t){return globalThis.Buffer?Buffer.from(t,"base64"):Uint8Array.from(globalThis.atob(t),r=>r.codePointAt(0))}function ie(t){return globalThis.Buffer?Buffer.from(t).toString("base64"):globalThis.btoa(String.fromCodePoint(...t))}const ae=["hasItem","getItem","getItemRaw","setItem","setItemRaw","removeItem","getMeta","setMeta","removeMeta","getKeys","clear","mount","unmount"];function se(t,r){if(r=E(r),!r)return t;const n={...t};for(const a of ae)n[a]=(c="",...l)=>t[a](r+c,...l);return n.getKeys=(a="",...c)=>t.getKeys(r+a,...c).then(l=>l.map(o=>o.slice(r.length))),n}function y(t){var r;return t&&((r=t.split("?")[0])==null?void 0:r.replace(/[/\\]/g,":").replace(/:+/g,":").replace(/^:|:$/g,""))||""}function oe(...t){return y(t.join(":"))}function E(t){return t=y(t),t?t+":":""}const ue="memory",ce=()=>{const t=new Map;return{name:ue,getInstance:()=>t,hasItem(r){return t.has(r)},getItem(r){return t.get(r)??null},getItemRaw(r){return t.get(r)??null},setItem(r,n){t.set(r,n)},setItemRaw(r,n){t.set(r,n)},removeItem(r){t.delete(r)},getKeys(){return[...t.keys()]},clear(){t.clear()},dispose(){t.clear()}}};function le(t={}){const r={mounts:{"":t.driver||ce()},mountpoints:[""],watching:!1,watchListeners:[],unwatch:{}},n=e=>{for(const i of r.mountpoints)if(e.startsWith(i))return{base:i,relativeKey:e.slice(i.length),driver:r.mounts[i]};return{base:"",relativeKey:e,driver:r.mounts[""]}},a=(e,i)=>r.mountpoints.filter(s=>s.startsWith(e)||i&&e.startsWith(s)).map(s=>({relativeBase:e.length>s.length?e.slice(s.length):void 0,mountpoint:s,driver:r.mounts[s]})),c=(e,i)=>{if(r.watching){i=y(i);for(const s of r.watchListeners)s(e,i)}},l=async()=>{if(!r.watching){r.watching=!0;for(const e in r.mounts)r.unwatch[e]=await L(r.mounts[e],c,e)}},o=async()=>{if(r.watching){for(const e in r.unwatch)await r.unwatch[e]();r.unwatch={},r.watching=!1}},h=(e,i,s)=>{const u=new Map,m=f=>{let d=u.get(f.base);return d||(d={driver:f.driver,base:f.base,items:[]},u.set(f.base,d)),d};for(const f of e){const d=typeof f=="string",v=y(d?f:f.key),I=d?void 0:f.value,w=d||!f.options?i:{...i,...f.options},A=n(v);m(A).items.push({key:v,value:I,relativeKey:A.relativeKey,options:w})}return Promise.all([...u.values()].map(f=>s(f))).then(f=>f.flat())},g={hasItem(e,i={}){e=y(e);const{relativeKey:s,driver:u}=n(e);return p(u.hasItem,s,i)},getItem(e,i={}){e=y(e);const{relativeKey:s,driver:u}=n(e);return p(u.getItem,s,i).then(m=>_(m))},getItems(e,i={}){return h(e,i,s=>s.driver.getItems?p(s.driver.getItems,s.items.map(u=>({key:u.relativeKey,options:u.options})),i).then(u=>u.map(m=>({key:oe(s.base,m.key),value:_(m.value)}))):Promise.all(s.items.map(u=>p(s.driver.getItem,u.relativeKey,u.options).then(m=>({key:u.key,value:_(m)})))))},getItemRaw(e,i={}){e=y(e);const{relativeKey:s,driver:u}=n(e);return u.getItemRaw?p(u.getItemRaw,s,i):p(u.getItem,s,i).then(m=>re(m))},async setItem(e,i,s={}){if(i===void 0)return g.removeItem(e);e=y(e);const{relativeKey:u,driver:m}=n(e);m.setItem&&(await p(m.setItem,u,K(i),s),m.watch||c("update",e))},async setItems(e,i){await h(e,i,async s=>{if(s.driver.setItems)return p(s.driver.setItems,s.items.map(u=>({key:u.relativeKey,value:K(u.value),options:u.options})),i);s.driver.setItem&&await Promise.all(s.items.map(u=>p(s.driver.setItem,u.relativeKey,K(u.value),u.options)))})},async setItemRaw(e,i,s={}){if(i===void 0)return g.removeItem(e,s);e=y(e);const{relativeKey:u,driver:m}=n(e);if(m.setItemRaw)await p(m.setItemRaw,u,i,s);else if(m.setItem)await p(m.setItem,u,te(i),s);else return;m.watch||c("update",e)},async removeItem(e,i={}){typeof i=="boolean"&&(i={removeMeta:i}),e=y(e);const{relativeKey:s,driver:u}=n(e);u.removeItem&&(await p(u.removeItem,s,i),(i.removeMeta||i.removeMata)&&await p(u.removeItem,s+"$",i),u.watch||c("remove",e))},async getMeta(e,i={}){typeof i=="boolean"&&(i={nativeOnly:i}),e=y(e);const{relativeKey:s,driver:u}=n(e),m=Object.create(null);if(u.getMeta&&Object.assign(m,await p(u.getMeta,s,i)),!i.nativeOnly){const f=await p(u.getItem,s+"$",i).then(d=>_(d));f&&typeof f=="object"&&(typeof f.atime=="string"&&(f.atime=new Date(f.atime)),typeof f.mtime=="string"&&(f.mtime=new Date(f.mtime)),Object.assign(m,f))}return m},setMeta(e,i,s={}){return this.setItem(e+"$",i,s)},removeMeta(e,i={}){return this.removeItem(e+"$",i)},async getKeys(e,i={}){e=E(e);const s=a(e,!0);let u=[];const m=[];for(const f of s){const d=await p(f.driver.getKeys,f.relativeBase,i);for(const v of d){const I=f.mountpoint+y(v);u.some(w=>I.startsWith(w))||m.push(I)}u=[f.mountpoint,...u.filter(v=>!v.startsWith(f.mountpoint))]}return e?m.filter(f=>f.startsWith(e)&&f[f.length-1]!=="$"):m.filter(f=>f[f.length-1]!=="$")},async clear(e,i={}){e=E(e),await Promise.all(a(e,!1).map(async s=>{if(s.driver.clear)return p(s.driver.clear,s.relativeBase,i);if(s.driver.removeItem){const u=await s.driver.getKeys(s.relativeBase||"",i);return Promise.all(u.map(m=>s.driver.removeItem(m,i)))}}))},async dispose(){await Promise.all(Object.values(r.mounts).map(e=>U(e)))},async watch(e){return await l(),r.watchListeners.push(e),async()=>{r.watchListeners=r.watchListeners.filter(i=>i!==e),r.watchListeners.length===0&&await o()}},async unwatch(){r.watchListeners=[],await o()},mount(e,i){if(e=E(e),e&&r.mounts[e])throw new Error(`already mounted at ${e}`);return e&&(r.mountpoints.push(e),r.mountpoints.sort((s,u)=>u.length-s.length)),r.mounts[e]=i,r.watching&&Promise.resolve(L(i,c,e)).then(s=>{r.unwatch[e]=s}).catch(console.error),g},async unmount(e,i=!0){var s,u;e=E(e),!(!e||!r.mounts[e])&&(r.watching&&e in r.unwatch&&((u=(s=r.unwatch)[e])==null||u.call(s),delete r.unwatch[e]),i&&await U(r.mounts[e]),r.mountpoints=r.mountpoints.filter(m=>m!==e),delete r.mounts[e])},getMount(e=""){e=y(e)+":";const i=n(e);return{driver:i.driver,base:i.base}},getMounts(e="",i={}){return e=y(e),a(e,i.parents).map(u=>({driver:u.driver,base:u.mountpoint}))},keys:(e,i={})=>g.getKeys(e,i),get:(e,i={})=>g.getItem(e,i),set:(e,i,s={})=>g.setItem(e,i,s),has:(e,i={})=>g.hasItem(e,i),del:(e,i={})=>g.removeItem(e,i),remove:(e,i={})=>g.removeItem(e,i)};return g}function L(t,r,n){return t.watch?t.watch((a,c)=>r(a,n+c)):()=>{}}async function U(t){typeof t.dispose=="function"&&await p(t.dispose)}function fe(t={}){const r=me(n,t.operators);function n(a,c){return typeof c!="object"||c instanceof RegExp?r.$eq(a,c):Object.keys(c||{}).every(l=>{const o=c[l];if(l.startsWith("$")&&r[l]){const h=r[l];return typeof h=="function"?h(a,o):!1}return n(H(a,l),o)})}return n}function me(t,r={}){return{$match:(n,a)=>t(n,a),$eq:(n,a)=>a instanceof RegExp?a.test(n):n===a,$ne:(n,a)=>a instanceof RegExp?!a.test(n):n!==a,$not:(n,a)=>!t(n,a),$and:(n,a)=>(j(a,"$and requires an array as condition"),a.every(c=>t(n,c))),$or:(n,a)=>(j(a,"$or requires an array as condition"),a.some(c=>t(n,c))),$in:(n,a)=>O(a).some(c=>Array.isArray(n)?t(n,{$contains:c}):t(n,c)),$contains:(n,a)=>(n=Array.isArray(n)?n:String(n),O(a).every(c=>n.includes(c))),$icontains:(n,a)=>{if(typeof a!="string")throw new TypeError("$icontains requires a string, use $contains instead");return n=String(n).toLocaleLowerCase(),O(a).every(c=>n.includes(c.toLocaleLowerCase()))},$containsAny:(n,a)=>(j(a,"$containsAny requires an array as condition"),n=Array.isArray(n)?n:String(n),a.some(c=>n.includes(c))),$exists:(n,a)=>a?typeof n<"u":typeof n>"u",$type:(n,a)=>typeof n===String(a),$regex:(n,a)=>{if(!(a instanceof RegExp)){const c=String(a).match(/\/(.*)\/([dgimsuy]*)$/);a=c!=null&&c[1]?new RegExp(c[1],c[2]||""):new RegExp(a)}return a.test(String(n||""))},$lt:(n,a)=>nn<=a,$gt:(n,a)=>n>a,$gte:(n,a)=>n>=a,...r||{}}}function ge(t){const r=fe(),n=(l,{query:o,before:h,after:g})=>{const e=typeof o=="string"?{_path:o}:o,i=l.findIndex(u=>r(u,e));h=h??1,g=g??1;const s=new Array(h+g).fill(null,0);return i===-1?s:s.map((u,m)=>l[i-h+m+ +(m>=h)]||null)},a=[(l,o)=>{const h=l.result.filter(g=>O(o.where).every(e=>r(g,e)));return{...l,result:h,total:h.length}},(l,o)=>O(o.sort).forEach(h=>q(l.result,h)),function(o,h,g){var e;if(h.surround){let i=n(((e=o.result)==null?void 0:e.length)===1?g:o.result,h.surround);i=$(C(h.without))(i),i=$(M(h.only))(i),o.surround=i}return o}],c=[(l,o)=>{if(o.skip)return{...l,result:l.result.slice(o.skip),skip:o.skip}},(l,o)=>{if(o.limit)return{...l,result:l.result.slice(0,o.limit),limit:o.limit}},function(o,h,g){var e,i,s;if(h.dirConfig){const u=((e=o.result[0])==null?void 0:e._path)||((s=(i=h.where)==null?void 0:i.find(m=>m._path))==null?void 0:s._path);if(typeof u=="string"){const m=g.find(f=>f._path===B(u,"_dir"));m&&(o.dirConfig={_path:m._path,...C(["_"])(m)})}}return o},(l,o)=>({...l,result:$(C(o.without))(l.result)}),(l,o)=>({...l,result:$(M(o.only))(l.result)})];return async l=>{const o=await t(),h=l.params(),g={result:o,limit:0,skip:0,total:o.length},e=a.reduce((s,u)=>u(s,h,o)||s,g);if(h.count)return{result:e.result.length};const i=c.reduce((s,u)=>u(s,h,o)||s,e);return h.first?{...k(["skip","limit","total"])(i),result:i.result[0]}:i}}function N(t){const r=ge(t);return async n=>{var l;n.params().first&&n.withDirConfig();const a=n.params(),c=await r(n);return a.surround?c==null?void 0:c.surround:(c!=null&&c.dirConfig&&(c.result={_path:(l=c.dirConfig)==null?void 0:l._path,...c.result,_dir:c.dirConfig}),c==null?void 0:c.result)}}var P={exports:{}},he=P.exports,z;function pe(){return z||(z=1,function(t,r){(function(n,a,c){t.exports=c(),t.exports.default=c()})("slugify",he,function(){var n=JSON.parse(`{"$":"dollar","%":"percent","&":"and","<":"less",">":"greater","|":"or","¢":"cent","£":"pound","¤":"currency","¥":"yen","©":"(c)","ª":"a","®":"(r)","º":"o","À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","Æ":"AE","Ç":"C","È":"E","É":"E","Ê":"E","Ë":"E","Ì":"I","Í":"I","Î":"I","Ï":"I","Ð":"D","Ñ":"N","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","Ù":"U","Ú":"U","Û":"U","Ü":"U","Ý":"Y","Þ":"TH","ß":"ss","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","æ":"ae","ç":"c","è":"e","é":"e","ê":"e","ë":"e","ì":"i","í":"i","î":"i","ï":"i","ð":"d","ñ":"n","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","ù":"u","ú":"u","û":"u","ü":"u","ý":"y","þ":"th","ÿ":"y","Ā":"A","ā":"a","Ă":"A","ă":"a","Ą":"A","ą":"a","Ć":"C","ć":"c","Č":"C","č":"c","Ď":"D","ď":"d","Đ":"DJ","đ":"dj","Ē":"E","ē":"e","Ė":"E","ė":"e","Ę":"e","ę":"e","Ě":"E","ě":"e","Ğ":"G","ğ":"g","Ģ":"G","ģ":"g","Ĩ":"I","ĩ":"i","Ī":"i","ī":"i","Į":"I","į":"i","İ":"I","ı":"i","Ķ":"k","ķ":"k","Ļ":"L","ļ":"l","Ľ":"L","ľ":"l","Ł":"L","ł":"l","Ń":"N","ń":"n","Ņ":"N","ņ":"n","Ň":"N","ň":"n","Ō":"O","ō":"o","Ő":"O","ő":"o","Œ":"OE","œ":"oe","Ŕ":"R","ŕ":"r","Ř":"R","ř":"r","Ś":"S","ś":"s","Ş":"S","ş":"s","Š":"S","š":"s","Ţ":"T","ţ":"t","Ť":"T","ť":"t","Ũ":"U","ũ":"u","Ū":"u","ū":"u","Ů":"U","ů":"u","Ű":"U","ű":"u","Ų":"U","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","ź":"z","Ż":"Z","ż":"z","Ž":"Z","ž":"z","Ə":"E","ƒ":"f","Ơ":"O","ơ":"o","Ư":"U","ư":"u","Lj":"LJ","lj":"lj","Nj":"NJ","nj":"nj","Ș":"S","ș":"s","Ț":"T","ț":"t","ə":"e","˚":"o","Ά":"A","Έ":"E","Ή":"H","Ί":"I","Ό":"O","Ύ":"Y","Ώ":"W","ΐ":"i","Α":"A","Β":"B","Γ":"G","Δ":"D","Ε":"E","Ζ":"Z","Η":"H","Θ":"8","Ι":"I","Κ":"K","Λ":"L","Μ":"M","Ν":"N","Ξ":"3","Ο":"O","Π":"P","Ρ":"R","Σ":"S","Τ":"T","Υ":"Y","Φ":"F","Χ":"X","Ψ":"PS","Ω":"W","Ϊ":"I","Ϋ":"Y","ά":"a","έ":"e","ή":"h","ί":"i","ΰ":"y","α":"a","β":"b","γ":"g","δ":"d","ε":"e","ζ":"z","η":"h","θ":"8","ι":"i","κ":"k","λ":"l","μ":"m","ν":"n","ξ":"3","ο":"o","π":"p","ρ":"r","ς":"s","σ":"s","τ":"t","υ":"y","φ":"f","χ":"x","ψ":"ps","ω":"w","ϊ":"i","ϋ":"y","ό":"o","ύ":"y","ώ":"w","Ё":"Yo","Ђ":"DJ","Є":"Ye","І":"I","Ї":"Yi","Ј":"J","Љ":"LJ","Њ":"NJ","Ћ":"C","Џ":"DZ","А":"A","Б":"B","В":"V","Г":"G","Д":"D","Е":"E","Ж":"Zh","З":"Z","И":"I","Й":"J","К":"K","Л":"L","М":"M","Н":"N","О":"O","П":"P","Р":"R","С":"S","Т":"T","У":"U","Ф":"F","Х":"H","Ц":"C","Ч":"Ch","Ш":"Sh","Щ":"Sh","Ъ":"U","Ы":"Y","Ь":"","Э":"E","Ю":"Yu","Я":"Ya","а":"a","б":"b","в":"v","г":"g","д":"d","е":"e","ж":"zh","з":"z","и":"i","й":"j","к":"k","л":"l","м":"m","н":"n","о":"o","п":"p","р":"r","с":"s","т":"t","у":"u","ф":"f","х":"h","ц":"c","ч":"ch","ш":"sh","щ":"sh","ъ":"u","ы":"y","ь":"","э":"e","ю":"yu","я":"ya","ё":"yo","ђ":"dj","є":"ye","і":"i","ї":"yi","ј":"j","љ":"lj","њ":"nj","ћ":"c","ѝ":"u","џ":"dz","Ґ":"G","ґ":"g","Ғ":"GH","ғ":"gh","Қ":"KH","қ":"kh","Ң":"NG","ң":"ng","Ү":"UE","ү":"ue","Ұ":"U","ұ":"u","Һ":"H","һ":"h","Ә":"AE","ә":"ae","Ө":"OE","ө":"oe","Ա":"A","Բ":"B","Գ":"G","Դ":"D","Ե":"E","Զ":"Z","Է":"E'","Ը":"Y'","Թ":"T'","Ժ":"JH","Ի":"I","Լ":"L","Խ":"X","Ծ":"C'","Կ":"K","Հ":"H","Ձ":"D'","Ղ":"GH","Ճ":"TW","Մ":"M","Յ":"Y","Ն":"N","Շ":"SH","Չ":"CH","Պ":"P","Ջ":"J","Ռ":"R'","Ս":"S","Վ":"V","Տ":"T","Ր":"R","Ց":"C","Փ":"P'","Ք":"Q'","Օ":"O''","Ֆ":"F","և":"EV","ء":"a","آ":"aa","أ":"a","ؤ":"u","إ":"i","ئ":"e","ا":"a","ب":"b","ة":"h","ت":"t","ث":"th","ج":"j","ح":"h","خ":"kh","د":"d","ذ":"th","ر":"r","ز":"z","س":"s","ش":"sh","ص":"s","ض":"dh","ط":"t","ظ":"z","ع":"a","غ":"gh","ف":"f","ق":"q","ك":"k","ل":"l","م":"m","ن":"n","ه":"h","و":"w","ى":"a","ي":"y","ً":"an","ٌ":"on","ٍ":"en","َ":"a","ُ":"u","ِ":"e","ْ":"","٠":"0","١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","پ":"p","چ":"ch","ژ":"zh","ک":"k","گ":"g","ی":"y","۰":"0","۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9","฿":"baht","ა":"a","ბ":"b","გ":"g","დ":"d","ე":"e","ვ":"v","ზ":"z","თ":"t","ი":"i","კ":"k","ლ":"l","მ":"m","ნ":"n","ო":"o","პ":"p","ჟ":"zh","რ":"r","ს":"s","ტ":"t","უ":"u","ფ":"f","ქ":"k","ღ":"gh","ყ":"q","შ":"sh","ჩ":"ch","ც":"ts","ძ":"dz","წ":"ts","ჭ":"ch","ხ":"kh","ჯ":"j","ჰ":"h","Ṣ":"S","ṣ":"s","Ẁ":"W","ẁ":"w","Ẃ":"W","ẃ":"w","Ẅ":"W","ẅ":"w","ẞ":"SS","Ạ":"A","ạ":"a","Ả":"A","ả":"a","Ấ":"A","ấ":"a","Ầ":"A","ầ":"a","Ẩ":"A","ẩ":"a","Ẫ":"A","ẫ":"a","Ậ":"A","ậ":"a","Ắ":"A","ắ":"a","Ằ":"A","ằ":"a","Ẳ":"A","ẳ":"a","Ẵ":"A","ẵ":"a","Ặ":"A","ặ":"a","Ẹ":"E","ẹ":"e","Ẻ":"E","ẻ":"e","Ẽ":"E","ẽ":"e","Ế":"E","ế":"e","Ề":"E","ề":"e","Ể":"E","ể":"e","Ễ":"E","ễ":"e","Ệ":"E","ệ":"e","Ỉ":"I","ỉ":"i","Ị":"I","ị":"i","Ọ":"O","ọ":"o","Ỏ":"O","ỏ":"o","Ố":"O","ố":"o","Ồ":"O","ồ":"o","Ổ":"O","ổ":"o","Ỗ":"O","ỗ":"o","Ộ":"O","ộ":"o","Ớ":"O","ớ":"o","Ờ":"O","ờ":"o","Ở":"O","ở":"o","Ỡ":"O","ỡ":"o","Ợ":"O","ợ":"o","Ụ":"U","ụ":"u","Ủ":"U","ủ":"u","Ứ":"U","ứ":"u","Ừ":"U","ừ":"u","Ử":"U","ử":"u","Ữ":"U","ữ":"u","Ự":"U","ự":"u","Ỳ":"Y","ỳ":"y","Ỵ":"Y","ỵ":"y","Ỷ":"Y","ỷ":"y","Ỹ":"Y","ỹ":"y","–":"-","‘":"'","’":"'","“":"\\"","”":"\\"","„":"\\"","†":"+","•":"*","…":"...","₠":"ecu","₢":"cruzeiro","₣":"french franc","₤":"lira","₥":"mill","₦":"naira","₧":"peseta","₨":"rupee","₩":"won","₪":"new shequel","₫":"dong","€":"euro","₭":"kip","₮":"tugrik","₯":"drachma","₰":"penny","₱":"peso","₲":"guarani","₳":"austral","₴":"hryvnia","₵":"cedi","₸":"kazakhstani tenge","₹":"indian rupee","₺":"turkish lira","₽":"russian ruble","₿":"bitcoin","℠":"sm","™":"tm","∂":"d","∆":"delta","∑":"sum","∞":"infinity","♥":"love","元":"yuan","円":"yen","﷼":"rial","ﻵ":"laa","ﻷ":"laa","ﻹ":"lai","ﻻ":"la"}`),a=JSON.parse('{"bg":{"Й":"Y","Ц":"Ts","Щ":"Sht","Ъ":"A","Ь":"Y","й":"y","ц":"ts","щ":"sht","ъ":"a","ь":"y"},"de":{"Ä":"AE","ä":"ae","Ö":"OE","ö":"oe","Ü":"UE","ü":"ue","ß":"ss","%":"prozent","&":"und","|":"oder","∑":"summe","∞":"unendlich","♥":"liebe"},"es":{"%":"por ciento","&":"y","<":"menor que",">":"mayor que","|":"o","¢":"centavos","£":"libras","¤":"moneda","₣":"francos","∑":"suma","∞":"infinito","♥":"amor"},"fr":{"%":"pourcent","&":"et","<":"plus petit",">":"plus grand","|":"ou","¢":"centime","£":"livre","¤":"devise","₣":"franc","∑":"somme","∞":"infini","♥":"amour"},"pt":{"%":"porcento","&":"e","<":"menor",">":"maior","|":"ou","¢":"centavo","∑":"soma","£":"libra","∞":"infinito","♥":"amor"},"uk":{"И":"Y","и":"y","Й":"Y","й":"y","Ц":"Ts","ц":"ts","Х":"Kh","х":"kh","Щ":"Shch","щ":"shch","Г":"H","г":"h"},"vi":{"Đ":"D","đ":"d"},"da":{"Ø":"OE","ø":"oe","Å":"AA","å":"aa","%":"procent","&":"og","|":"eller","$":"dollar","<":"mindre end",">":"større end"},"nb":{"&":"og","Å":"AA","Æ":"AE","Ø":"OE","å":"aa","æ":"ae","ø":"oe"},"it":{"&":"e"},"nl":{"&":"en"},"sv":{"&":"och","Å":"AA","Ä":"AE","Ö":"OE","å":"aa","ä":"ae","ö":"oe"}}');function c(l,o){if(typeof l!="string")throw new Error("slugify: string argument expected");o=typeof o=="string"?{replacement:o}:o||{};var h=a[o.locale]||{},g=o.replacement===void 0?"-":o.replacement,e=o.trim===void 0?!0:o.trim,i=l.normalize().split("").reduce(function(s,u){var m=h[u];return m===void 0&&(m=n[u]),m===void 0&&(m=u),m===g&&(m=" "),s+m.replace(o.remove||/[^\w\s$*_+~.()'"!\-:@]+/g,"")},"");return o.strict&&(i=i.replace(/[^A-Za-z0-9\s]/g,"")),e&&(i=i.trim()),i=i.replace(/\s+/g,g),o.lower&&(i=i.toLowerCase()),i}return c.extend=function(l){Object.assign(n,l)},c})}(P)),P.exports}pe();const de=t=>t.split(/[\s-]/g).map(Z).join(" ");function ye(t,r){const{navigation:n}=D().public.content;if(n===!1)return[];const a=l=>({...ve(["title",...n.fields])(l),...Ie(l==null?void 0:l.navigation)?l.navigation:{}}),c=t.sort((l,o)=>l._path.localeCompare(o._path)).reduce((l,o)=>{var m;const h=o._path.substring(1).split("/"),g=o._id.split(":").slice(1),e=!!((m=g[g.length-1])!=null&&m.match(/([1-9][0-9]*\.)?index.md/g)),i=f=>({title:f.title,_path:f._path,_file:f._file,children:[],...a(f),...f._draft?{_draft:!0}:{}}),s=i(o);if(e){const f=r[s._path];if(typeof(f==null?void 0:f.navigation)<"u"&&!(f!=null&&f.navigation))return l;if(o._path!=="/"){const d=i(o);s.children.push(d)}f&&Object.assign(s,a(f))}return h.length===1?(l.push(s),l):(h.slice(0,-1).reduce((f,d,v)=>{const I="/"+h.slice(0,v+1).join("/"),w=r[I];if(typeof(w==null?void 0:w.navigation)<"u"&&!w.navigation)return[];let A=f.find(b=>b._path===I);return A||(A={title:de(d),_path:I,_file:o._file,children:[],...w&&a(w)},f.push(A)),A.children},l).push(s),l)},[]);return T(c)}const we=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"});function T(t){var n;t.forEach(a=>{a._file=a._file.split(".").slice(0,-1).join(".")});const r=t.sort((a,c)=>we.compare(a._file,c._file));for(const a of r)(n=a.children)!=null&&n.length?T(a.children):delete a.children,delete a._file;return t}function ve(t){return r=>(r=r||{},t.length?t.filter(n=>typeof r[n]<"u").reduce((n,a)=>Object.assign(n,{[a]:r[a]}),{}):r)}function Ie(t){return Object.prototype.toString.call(t)==="[object Object]"}const Ae=t=>J(t,D().public.content.api.baseURL),Ee=se(le({driver:V()}),"@content");function Oe(t){async function r(){const n=new Set(await t.getKeys("cache:")),a=Y().getPreviewToken();if(a){const l=await t.getItem(`${a}$`).then(g=>g||{});if(Array.isArray(l.ignoreSources)){const g=l.ignoreSources.map(e=>`cache:${e.trim()}:`);for(const e of n)g.some(i=>e.startsWith(i))&&n.delete(e)}const o=await t.getKeys(`${a}:`),h=await Promise.all(o.map(g=>t.getItem(g)));for(const g of h)n.delete(`cache:${g._id}`),g.__deleted||n.add(`${a}:${g._id}`)}return await Promise.all(Array.from(n).map(l=>t.getItem(l)))}return{storage:t,fetch:N(r),query:n=>G(N(r),{initialParams:n,legacy:!0})}}let R=null,S=null;async function _e(){return S?await S:R||(S=$e(),R=await S),R}async function $e(){const t=W(),{content:r}=D().public,n=Oe(Ee),a=await n.storage.getItem("integrity");if(r.integrity!==+(a||0)){const{contents:c,navigation:l}=await $fetch(Ae(r.integrity?`cache.${r.integrity}.json`:"cache.json"));await Promise.all(c.map(o=>n.storage.setItem(`cache:${o._id}`,o))),await n.storage.setItem("navigation",l),await n.storage.setItem("integrity",r.integrity)}return await t.callHook("content:storage",n.storage),n}async function Re(t){const r=await _e();if(!Y().getPreviewToken()&&Object.keys(t||{}).length===0)return r.storage.getItem("navigation");const n=await r.query(t).where({_partial:!1,navigation:{$ne:!1}}).find(),c=(await r.query().where({_path:/\/_dir$/i,_partial:!0}).find()).reduce((l,o)=>{var g;((g=o.title)==null?void 0:g.toLowerCase())==="dir"&&(o.title=void 0);const h=o._path.split("/").slice(0,-1).join("/")||"/";return l[h]={...o,...o.body},l},{});return ye(n,c)}export{Ee as contentStorage,Oe as createDB,Re as generateNavigation,_e as useContentDatabase}; diff --git a/_nuxt/D3BMvJkl.js b/_nuxt/DrqmHo5i.js similarity index 82% rename from _nuxt/D3BMvJkl.js rename to _nuxt/DrqmHo5i.js index a4d682e4..47c99504 100644 --- a/_nuxt/D3BMvJkl.js +++ b/_nuxt/DrqmHo5i.js @@ -1 +1 @@ -import{_ as l}from"./D9bwbETQ.js";import{d as n,o as s,e as i,f as o,b as r,l as g,aa as u,a9 as f}from"./nJJO8dFm.js";const h=n({__name:"ProsePre",props:{code:{type:String,default:""},language:{type:String,default:null},filename:{type:String,default:null},highlights:{type:Array,default:()=>[]},meta:{type:String,default:null},class:{type:String,default:null},style:{type:[String,Object],default:null}},setup(e){return(a,d)=>{const t=l;return s(),i(t,{code:e.code,language:e.language,filename:e.filename,highlights:e.highlights,meta:e.meta},{default:o(()=>[r("pre",{class:g(a.$props.class),style:u(e.style)},[f(a.$slots,"default")],6)]),_:3},8,["code","language","filename","highlights","meta"])}}});export{h as default}; +import{_ as l}from"./ChvBJXEt.js";import{d as n,o as s,e as i,f as o,b as r,l as g,aa as u,a9 as f}from"./BK37JMLf.js";const h=n({__name:"ProsePre",props:{code:{type:String,default:""},language:{type:String,default:null},filename:{type:String,default:null},highlights:{type:Array,default:()=>[]},meta:{type:String,default:null},class:{type:String,default:null},style:{type:[String,Object],default:null}},setup(e){return(a,d)=>{const t=l;return s(),i(t,{code:e.code,language:e.language,filename:e.filename,highlights:e.highlights,meta:e.meta},{default:o(()=>[r("pre",{class:g(a.$props.class),style:u(e.style)},[f(a.$slots,"default")],6)]),_:3},8,["code","language","filename","highlights","meta"])}}});export{h as default}; diff --git a/_nuxt/tAX9Dkce.js b/_nuxt/DxcFrhhB.js similarity index 78% rename from _nuxt/tAX9Dkce.js rename to _nuxt/DxcFrhhB.js index e984e4c3..7c782517 100644 --- a/_nuxt/tAX9Dkce.js +++ b/_nuxt/DxcFrhhB.js @@ -1 +1 @@ -import{c as t,b as r,o}from"./nJJO8dFm.js";const s={class:"flex h-[768px] justify-center border-2 border-gray-500"},c={__name:"metronome",setup(a){return(m,e)=>(o(),t("main",s,e[0]||(e[0]=[r("iframe",{src:"https://simple-tempo.com",width:"100%",height:"100%"},null,-1)])))}};export{c as default}; +import{c as t,b as r,o}from"./BK37JMLf.js";const s={class:"flex h-[768px] justify-center border-2 border-gray-500"},c={__name:"metronome",setup(a){return(m,e)=>(o(),t("main",s,e[0]||(e[0]=[r("iframe",{src:"https://simple-tempo.com",width:"100%",height:"100%"},null,-1)])))}};export{c as default}; diff --git a/_nuxt/Bh-AXKej.js b/_nuxt/F-Xgfjj6.js similarity index 64% rename from _nuxt/Bh-AXKej.js rename to _nuxt/F-Xgfjj6.js index 32e2b5d5..b29c4d1c 100644 --- a/_nuxt/Bh-AXKej.js +++ b/_nuxt/F-Xgfjj6.js @@ -1 +1 @@ -import{m as o,o as r,c as s,a9 as t}from"./nJJO8dFm.js";const c={};function n(e,a){return r(),s("p",null,[t(e.$slots,"default")])}const f=o(c,[["render",n]]);export{f as default}; +import{m as o,o as r,c as s,a9 as t}from"./BK37JMLf.js";const c={};function n(e,a){return r(),s("p",null,[t(e.$slots,"default")])}const f=o(c,[["render",n]]);export{f as default}; diff --git a/_nuxt/DDhUQv0b.js b/_nuxt/GEgjpm63.js similarity index 64% rename from _nuxt/DDhUQv0b.js rename to _nuxt/GEgjpm63.js index 077c1d68..0cd24574 100644 --- a/_nuxt/DDhUQv0b.js +++ b/_nuxt/GEgjpm63.js @@ -1 +1 @@ -import{m as o,o as r,c as t,a9 as s}from"./nJJO8dFm.js";const c={};function n(e,a){return r(),t("td",null,[s(e.$slots,"default")])}const d=o(c,[["render",n]]);export{d as default}; +import{m as o,o as r,c as t,a9 as s}from"./BK37JMLf.js";const c={};function n(e,a){return r(),t("td",null,[s(e.$slots,"default")])}const d=o(c,[["render",n]]);export{d as default}; diff --git a/_nuxt/LjYdWEq7.js b/_nuxt/LjYdWEq7.js deleted file mode 100644 index 04f10f6d..00000000 --- a/_nuxt/LjYdWEq7.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as o}from"./RZ_1G7Mx.js";import"./nJJO8dFm.js";import"./C-v3KzvZ.js";import"./CxYJgpPD.js";import"./DFIm0aE1.js";import"./IShi1APO.js";export{o as default}; diff --git a/_nuxt/ccqoGSmZ.js b/_nuxt/MByIxc3u.js similarity index 65% rename from _nuxt/ccqoGSmZ.js rename to _nuxt/MByIxc3u.js index 3425e4b8..fcf093e0 100644 --- a/_nuxt/ccqoGSmZ.js +++ b/_nuxt/MByIxc3u.js @@ -1 +1 @@ -import{m as o,o as r,c as t,a9 as n}from"./nJJO8dFm.js";const s={};function c(e,a){return r(),t("strong",null,[n(e.$slots,"default")])}const f=o(s,[["render",c]]);export{f as default}; +import{m as o,o as r,c as t,a9 as n}from"./BK37JMLf.js";const s={};function c(e,a){return r(),t("strong",null,[n(e.$slots,"default")])}const f=o(s,[["render",c]]);export{f as default}; diff --git a/_nuxt/VVR0hiId.js b/_nuxt/NXtAYMkh.js similarity index 88% rename from _nuxt/VVR0hiId.js rename to _nuxt/NXtAYMkh.js index ec019669..08675256 100644 --- a/_nuxt/VVR0hiId.js +++ b/_nuxt/NXtAYMkh.js @@ -1 +1 @@ -import{d as p,I as f,k as i,o as s,c as n,a as u,a9 as r}from"./nJJO8dFm.js";const l=["id"],d=["href"],_=p({__name:"ProseH3",props:{id:{}},setup(c){const t=c,{headings:o}=f().public.mdc,a=i(()=>{var e;return t.id&&(typeof(o==null?void 0:o.anchorLinks)=="boolean"&&(o==null?void 0:o.anchorLinks)===!0||typeof(o==null?void 0:o.anchorLinks)=="object"&&((e=o==null?void 0:o.anchorLinks)==null?void 0:e.h3))});return(e,k)=>(s(),n("h3",{id:t.id},[t.id&&u(a)?(s(),n("a",{key:0,href:`#${t.id}`},[r(e.$slots,"default")],8,d)):r(e.$slots,"default",{key:1})],8,l))}});export{_ as default}; +import{d as p,I as f,k as i,o as s,c as n,a as u,a9 as r}from"./BK37JMLf.js";const l=["id"],d=["href"],_=p({__name:"ProseH3",props:{id:{}},setup(c){const t=c,{headings:o}=f().public.mdc,a=i(()=>{var e;return t.id&&(typeof(o==null?void 0:o.anchorLinks)=="boolean"&&(o==null?void 0:o.anchorLinks)===!0||typeof(o==null?void 0:o.anchorLinks)=="object"&&((e=o==null?void 0:o.anchorLinks)==null?void 0:e.h3))});return(e,k)=>(s(),n("h3",{id:t.id},[t.id&&u(a)?(s(),n("a",{key:0,href:`#${t.id}`},[r(e.$slots,"default")],8,d)):r(e.$slots,"default",{key:1})],8,l))}});export{_ as default}; diff --git a/_nuxt/B-4UjY5P.js b/_nuxt/Oy3c7nO-.js similarity index 64% rename from _nuxt/B-4UjY5P.js rename to _nuxt/Oy3c7nO-.js index 5790a8f4..a26b0f85 100644 --- a/_nuxt/B-4UjY5P.js +++ b/_nuxt/Oy3c7nO-.js @@ -1 +1 @@ -import{m as o,o as r,c as s,a9 as t}from"./nJJO8dFm.js";const c={};function n(e,a){return r(),s("ol",null,[t(e.$slots,"default")])}const f=o(c,[["render",n]]);export{f as default}; +import{m as o,o as r,c as s,a9 as t}from"./BK37JMLf.js";const c={};function n(e,a){return r(),s("ol",null,[t(e.$slots,"default")])}const f=o(c,[["render",n]]);export{f as default}; diff --git a/_nuxt/BO4M8-0w.js b/_nuxt/Uy2oF-kn.js similarity index 65% rename from _nuxt/BO4M8-0w.js rename to _nuxt/Uy2oF-kn.js index 9b94e5e9..626fc470 100644 --- a/_nuxt/BO4M8-0w.js +++ b/_nuxt/Uy2oF-kn.js @@ -1 +1 @@ -import{m as o,o as r,c as t,a9 as a}from"./nJJO8dFm.js";const s={};function c(e,n){return r(),t("thead",null,[a(e.$slots,"default")])}const d=o(s,[["render",c]]);export{d as default}; +import{m as o,o as r,c as t,a9 as a}from"./BK37JMLf.js";const s={};function c(e,n){return r(),t("thead",null,[a(e.$slots,"default")])}const d=o(s,[["render",c]]);export{d as default}; diff --git a/_nuxt/CEXo1ctw.js b/_nuxt/YtCHaNyK.js similarity index 93% rename from _nuxt/CEXo1ctw.js rename to _nuxt/YtCHaNyK.js index 7f5f7e06..fa623939 100644 --- a/_nuxt/CEXo1ctw.js +++ b/_nuxt/YtCHaNyK.js @@ -1 +1 @@ -import{m as u,c as m,b as c,o as p}from"./nJJO8dFm.js";const v={data(){return{}},mounted(){const a=["#FFBA08","#FAA307","#F48C06","#E85D04","#DC2F02","#D00000","#9D0208","#6A040F","#370617","#03071E"],s=e=>{const i=t=>e.unhex([t.slice(1,3),t.slice(3,5),t.slice(5,7)]),d=(t,o)=>t.map(n=>{const r=e.floor(n+e.random(-o,o));return r<0?0:r>255?255:r});e.setup=()=>{e.createCanvas(400,400),e.frameRate(5)},e.draw=()=>{e.background(0,0,0),e.noStroke(),e.noFill();const t=9,o=400/t;for(let n=0;n<=t;n++)for(let r=0;r<=t;r++){const f=a[r%9];e.fill(d(i(f),15)),e.square(n*o,r*o,o)}}};new this.$p5(s,"canvas")}},I={class:"bg-gradient-to-b from-green-800 to-gray-800"};function b(a,s,e,i,d,l){return p(),m("div",I,s[0]||(s[0]=[c("div",{class:"grid h-screen place-items-center"},[c("div",{class:"font-mono text-white"},[c("div",{class:"mb-2 border-2 border-white"},[c("div",{id:"canvas"})])])],-1)]))}const _=u(v,[["render",b]]);export{_ as default}; +import{m as u,c as m,b as c,o as p}from"./BK37JMLf.js";const v={data(){return{}},mounted(){const a=["#FFBA08","#FAA307","#F48C06","#E85D04","#DC2F02","#D00000","#9D0208","#6A040F","#370617","#03071E"],s=e=>{const i=t=>e.unhex([t.slice(1,3),t.slice(3,5),t.slice(5,7)]),d=(t,o)=>t.map(n=>{const r=e.floor(n+e.random(-o,o));return r<0?0:r>255?255:r});e.setup=()=>{e.createCanvas(400,400),e.frameRate(5)},e.draw=()=>{e.background(0,0,0),e.noStroke(),e.noFill();const t=9,o=400/t;for(let n=0;n<=t;n++)for(let r=0;r<=t;r++){const f=a[r%9];e.fill(d(i(f),15)),e.square(n*o,r*o,o)}}};new this.$p5(s,"canvas")}},I={class:"bg-gradient-to-b from-green-800 to-gray-800"};function b(a,s,e,i,d,l){return p(),m("div",I,s[0]||(s[0]=[c("div",{class:"grid h-screen place-items-center"},[c("div",{class:"font-mono text-white"},[c("div",{class:"mb-2 border-2 border-white"},[c("div",{id:"canvas"})])])],-1)]))}const _=u(v,[["render",b]]);export{_ as default}; diff --git a/_nuxt/BwTjPRNa.js b/_nuxt/ZdspzMIb.js similarity index 65% rename from _nuxt/BwTjPRNa.js rename to _nuxt/ZdspzMIb.js index 1fb25673..9030e5e8 100644 --- a/_nuxt/BwTjPRNa.js +++ b/_nuxt/ZdspzMIb.js @@ -1 +1 @@ -import{m as o,o as r,c as t,a9 as s}from"./nJJO8dFm.js";const c={};function n(e,a){return r(),t("tbody",null,[s(e.$slots,"default")])}const d=o(c,[["render",n]]);export{d as default}; +import{m as o,o as r,c as t,a9 as s}from"./BK37JMLf.js";const c={};function n(e,a){return r(),t("tbody",null,[s(e.$slots,"default")])}const d=o(c,[["render",n]]);export{d as default}; diff --git a/_nuxt/builds/latest.json b/_nuxt/builds/latest.json index d9ed1285..7e3d7200 100644 --- a/_nuxt/builds/latest.json +++ b/_nuxt/builds/latest.json @@ -1 +1 @@ -{"id":"8333855c-1562-4239-a900-e29562dcdda4","timestamp":1735276470885} \ No newline at end of file +{"id":"def0ac76-41f3-44d2-a5f2-1a5d1efc4e29","timestamp":1735327930778} \ No newline at end of file diff --git a/_nuxt/builds/meta/8333855c-1562-4239-a900-e29562dcdda4.json b/_nuxt/builds/meta/8333855c-1562-4239-a900-e29562dcdda4.json deleted file mode 100644 index 2b8c4de5..00000000 --- a/_nuxt/builds/meta/8333855c-1562-4239-a900-e29562dcdda4.json +++ /dev/null @@ -1 +0,0 @@ -{"id":"8333855c-1562-4239-a900-e29562dcdda4","timestamp":1735276470885,"matcher":{"static":{},"wildcard":{},"dynamic":{}},"prerendered":["/playground","/","/playground/audio","/playground/conway","/playground/chords","/playground/metronome","/card","/playground/waves","/playground/midi","/playground/french","/playground/palettes/mountains","/articles","/examples/nested_transitions","/playground/matrix","/playground/palettes/variance","/playground/plotter","/playground/tiling","/talks","/articles/nuxt-v3-migration","/articles/migrate-truenas-from-core-to-scale","/articles/vim-fugitive-gpg-pinentry","/articles/podcast-transcription-whispercpp","/articles/doctl","/articles/nuxt-content-rss-feed","/articles/reset-ipmi-password-from-host-os","/articles/quick-tip-rerunning-bash-commands","/articles/ssh-ed25519-sk-yubikey","/articles/fennel-initial-exploration","/articles/unit-testing-micropython-with-mocks","/articles/apu2-firmware-upgrade","/articles/persistent-archlinux-usb","/articles/docker-selinux-volumes"]} \ No newline at end of file diff --git a/_nuxt/builds/meta/def0ac76-41f3-44d2-a5f2-1a5d1efc4e29.json b/_nuxt/builds/meta/def0ac76-41f3-44d2-a5f2-1a5d1efc4e29.json new file mode 100644 index 00000000..661a0ebe --- /dev/null +++ b/_nuxt/builds/meta/def0ac76-41f3-44d2-a5f2-1a5d1efc4e29.json @@ -0,0 +1 @@ +{"id":"def0ac76-41f3-44d2-a5f2-1a5d1efc4e29","timestamp":1735327930778,"matcher":{"static":{},"wildcard":{},"dynamic":{}},"prerendered":["/","/playground","/playground/audio","/playground/metronome","/playground/conway","/playground/waves","/playground/chords","/playground/midi","/playground/french","/playground/palettes/mountains","/card","/articles","/examples/nested_transitions","/playground/matrix","/playground/plotter","/playground/palettes/variance","/playground/tiling","/talks","/articles/nuxt-v3-migration","/articles/migrate-truenas-from-core-to-scale","/articles/vim-fugitive-gpg-pinentry","/articles/podcast-transcription-whispercpp","/articles/doctl","/articles/nuxt-content-rss-feed","/articles/reset-ipmi-password-from-host-os","/articles/quick-tip-rerunning-bash-commands","/articles/ssh-ed25519-sk-yubikey","/articles/fennel-initial-exploration","/articles/apu2-firmware-upgrade","/articles/unit-testing-micropython-with-mocks","/articles/docker-selinux-volumes","/articles/persistent-archlinux-usb"]} \ No newline at end of file diff --git a/_nuxt/BEa6bnVp.js b/_nuxt/j0WRL_kM.js similarity index 79% rename from _nuxt/BEa6bnVp.js rename to _nuxt/j0WRL_kM.js index ee989ad4..3e1f2f4f 100644 --- a/_nuxt/BEa6bnVp.js +++ b/_nuxt/j0WRL_kM.js @@ -1 +1 @@ -import{c as t,b as r,o}from"./nJJO8dFm.js";const a={class:"flex h-[1024px] justify-center border-2 border-gray-500"},i={__name:"conway",setup(s){return(n,e)=>(o(),t("main",a,e[0]||(e[0]=[r("iframe",{src:"https://cmpadden.github.io/conway/",width:"100%",height:"100%"},null,-1)])))}};export{i as default}; +import{c as t,b as r,o}from"./BK37JMLf.js";const a={class:"flex h-[1024px] justify-center border-2 border-gray-500"},i={__name:"conway",setup(s){return(n,e)=>(o(),t("main",a,e[0]||(e[0]=[r("iframe",{src:"https://cmpadden.github.io/conway/",width:"100%",height:"100%"},null,-1)])))}};export{i as default}; diff --git a/_nuxt/C4aIg6tX.js b/_nuxt/j8GsLxXc.js similarity index 99% rename from _nuxt/C4aIg6tX.js rename to _nuxt/j8GsLxXc.js index 641819a3..84cf3f58 100644 --- a/_nuxt/C4aIg6tX.js +++ b/_nuxt/j8GsLxXc.js @@ -1 +1 @@ -import{m as _,c as r,g as O,b as e,l as y,t as m,F as p,r as h,i as M,f as g,T as x,o as n,h as w}from"./nJJO8dFm.js";var c={},b;function A(){if(b)return c;b=1,Object.defineProperty(c,"__esModule",{value:!0}),c.identify=void 0;const i=["C","C# / Db","D","D# / Eb","E","F","F# / Gb","G","G# / Ab","A","A# / Bb","B"],t={"0 1":{name:"No 3 Major 7",rootOffset:1},"0 2":{name:"No 3 7",rootOffset:2},"0 3":{name:"Minor",rootOffset:0},"0 4":{name:"",rootOffset:0},"0 5":{name:"5",rootOffset:5},"0 6":{name:"7",rootOffset:2},"0 7":{name:"5",rootOffset:0},"0 8":{name:"",rootOffset:8},"0 9":{name:"Minor",rootOffset:9},"0 10":{name:"No 3 7",rootOffset:0},"0 11":{name:"No 3 Major 7",rootOffset:0},"0 2 7":{name:"Suspended 2",rootOffset:0},"0 3 6 10":{name:"Half-diminished 7",rootOffset:0},"0 3 6 9":{name:"Diminished 7",rootOffset:0},"0 3 6":{name:"Diminished",rootOffset:0},"0 3 7 10":{name:"Minor 7",rootOffset:0},"0 3 7 11":{name:"Minor-major 7",rootOffset:0},"0 3 7 9":{name:"Minor 6",rootOffset:0},"0 3 7":{name:"Minor",rootOffset:0},"0 4 10":{name:"7",rootOffset:0},"0 4 11":{name:"Major 7",rootOffset:0},"0 4 5 7":{name:"Add 11",rootOffset:0},"0 4 6":{name:"Flat 5",rootOffset:0},"0 4 7 10":{name:"Dominant 7",rootOffset:0},"0 4 7 11":{name:"Major 7",rootOffset:0},"0 4 7 9":{name:"Major 6",rootOffset:0},"0 4 7":{name:"",rootOffset:0},"0 4 8 10":{name:"Augmented 7",rootOffset:0},"0 4 8":{name:"Augmented",rootOffset:0},"0 5 7":{name:"Suspended 4",rootOffset:0},"0 5 8":{name:"Minor",rootOffset:5},"0 5 9":{name:"",rootOffset:5},"0 4 9":{name:"Minor",rootOffset:9},"0 3 8":{name:"",rootOffset:8},"0 1 5":{name:"Major 7",rootOffset:1},"0 2 6":{name:"Major 7",rootOffset:2},"0 4 5":{name:"5 Major 7",rootOffset:5},"0 1 2":{name:"No 3 7 Major 7",rootOffset:2},"0 1 3":{name:"Minor Add Flat 9",rootOffset:0},"0 1 6":{name:"5 Sharp 11",rootOffset:6},"0 1 7":{name:"5 Add Flat 9",rootOffset:0},"0 1 8":{name:"5 Major 7",rootOffset:1},"0 1 9":{name:"Sharp 9",rootOffset:9},"0 1 10":{name:"Minor Add 9",rootOffset:10},"0 1 11":{name:"No 3 7 Major 7",rootOffset:1},"0 2 10":{name:"Add 9",rootOffset:10},"0 2 11":{name:"Minor Add Flat 9",rootOffset:11},"0 2 3":{name:"Minor Add 9",rootOffset:0},"0 2 4":{name:"Add 9",rootOffset:0},"0 2 5":{name:"Minor 7",rootOffset:2},"0 2 8":{name:"Flat 5",rootOffset:8},"0 2 9":{name:"5 7",rootOffset:2},"0 3 10":{name:"Minor 7",rootOffset:0},"0 3 4":{name:"Sharp 9",rootOffset:0},"0 3 5":{name:"5 7",rootOffset:5},"0 3 9":{name:"Minor 6",rootOffset:0},"0 5 10":{name:"Suspended 2",rootOffset:10},"0 5 11":{name:"5 Sharp 11",rootOffset:5},"0 5 6":{name:"5 Add Flat 9",rootOffset:5},"0 6 10":{name:"Flat 5",rootOffset:6},"0 6 7":{name:"5 Sharp 11",rootOffset:0},"0 6 8":{name:"7",rootOffset:8},"0 6 9":{name:"Minor 6",rootOffset:9},"0 7 10":{name:"5 7",rootOffset:0},"0 7 11":{name:"5 Major 7",rootOffset:0},"0 7 8":{name:"Major 7",rootOffset:8},"0 7 9":{name:"Minor 7",rootOffset:9},"0 8 10":{name:"Add 9",rootOffset:8},"0 8 11":{name:"Sharp 9",rootOffset:8},"0 9 10":{name:"Minor Add Flat 9",rootOffset:9},"0 9 11":{name:"Minor Add 9",rootOffset:9},"0 10 11":{name:"No 3 7 Major 7",rootOffset:0},"0 1 4":{name:"Sharp 9",rootOffset:9},"0 8 9":{name:"Sharp 9",rootOffset:5},"0 6 11":{name:"7/13",rootOffset:2},"0 3 11":{name:"Sharp 9",rootOffset:8}};function d(v){const a=v.map(o=>typeof o=="number"?o:i.indexOf(o));if(a.some(o=>o<0))throw new Error("Unsupported note letter or number provided");if(new Set(a.map(o=>o%12)).size===1)return{name:i[a[0]%12]};const f=a.sort((o,l)=>o-l)[0]%12,s=[...new Set(a.map(o=>(o-f)%12).sort((o,l)=>o-l))],u=t[s.join(" ")];if(u){const o=(f+u.rootOffset)%12,l=i[o];return{name:u.name!==""?`${l} ${u.name}`:l,interval:s,root:o}}else return{name:void 0}}return c.identify=d,c}var k=A();const N={mounted(){typeof navigator.requestMIDIAccess<"u"&&navigator.requestMIDIAccess().then(i=>{this.midi=i,this.midi.inputs.forEach(t=>{t.onmidimessage=d=>{d.data[0]===144&&(this.activeKeys.set(d.data[1],d.data),this.$forceUpdate()),d.data[0]===128&&(this.activeKeys.delete(d.data[1]),this.$forceUpdate())}})},i=>{console.error(i)})},data(){return{tooltip:!1,midi:void 0,activeKeys:new Map}},computed:{inputs(){if(typeof this.midi<"u")return Array.from(this.midi.inputs.values())},outputs(){if(typeof this.midi<"u")return Array.from(this.midi.outputs.values())}},methods:{orderedNotes(){return Array.from(this.activeKeys.keys()).sort()},chord(){const i=Array.from(this.activeKeys.keys());return k.identify(i).name}}},S={class:"h-2/3 bg-gradient-to-b from-green-900 via-purple-900 to-indigo-900 text-white"},j={key:0,class:"p-4 text-center font-light tracking-wide"},I={key:1},D={class:"flex flex-wrap"},E={class:"absolute bottom-16 right-2"},F={class:"p-3 font-mono text-orange-900"},z={class:"mb-2 font-bold"},V={class:"mb-2"},T={key:0,class:"p-4 text-center italic"},C={key:1},B={class:"flex-1"},K={class:"flex-1"},P={class:"mb-2"},U={key:0,class:"p-4 text-center italic"},q={key:1},G={class:"flex-1"},L={class:"flex-1"},R={class:"absolute bottom-2 right-2"},H={class:"absolute bottom-4 left-4"},W={class:"flex"},Y={class:"grid h-screen place-items-center"},J={class:"text-center text-4xl font-semibold tracking-wide"},Q={key:0};function X(i,t,d,v,a,f){return n(),r("div",S,[typeof a.midi>"u"?(n(),r("div",j,t[1]||(t[1]=[O(" Unfortunately, the Web MIDI API is "),e("a",{class:"text-blue-500 underline",href:"https://developer.mozilla.org/en-US/docs/Web/API/MIDIMessageEvent#browser_compatibility"},"not supported",-1),O(" in all browsers... ")]))):(n(),r("div",I,[e("div",D,[e("div",E,[e("div",{class:y([{hidden:!a.tooltip,block:a.tooltip},"z-50 max-w-md break-words rounded-lg border-2 border-green-800 bg-yellow-200 text-sm font-normal leading-normal"])},[e("div",null,[t[5]||(t[5]=e("div",{class:"mb-0 rounded-t-lg border-b border-solid bg-green-600 p-3 font-semibold uppercase text-white opacity-75"}," MIDI Status ",-1)),e("div",F,[e("div",z,[t[2]||(t[2]=O(" Enabled: ")),e("span",null,m(typeof a.midi<"u"?"Yep!":"Nope"),1)]),e("div",V,[t[3]||(t[3]=e("div",{class:"font-bold"},"Inputs:",-1)),f.inputs.length===0?(n(),r("div",T," No input devices detected :( ")):(n(),r("div",C,[(n(!0),r(p,null,h(f.inputs,s=>(n(),r("div",{key:s.id,class:"flex"},[e("div",B,m(s.manufacturer),1),e("div",K,m(s.name),1)]))),128))]))]),e("div",P,[t[4]||(t[4]=e("div",{class:"font-bold"},"Outputs:",-1)),f.outputs.length===0?(n(),r("div",U," No output devices detected :( ")):(n(),r("div",q,[(n(!0),r(p,null,h(f.outputs,s=>(n(),r("div",{key:s.id,class:"flex"},[e("div",G,m(s.manufacturer),1),e("div",L,m(s.name),1)]))),128))]))])])])],2)]),e("div",R,[e("button",{onClick:t[0]||(t[0]=s=>a.tooltip=!a.tooltip),class:"border-3 rounded-lg border-green-600 bg-green-50 px-1 text-green-600 shadow hover:text-green-500 hover:shadow-lg",type:"button"},t[6]||(t[6]=[e("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 20 20",class:"h-10 w-10"},[e("g",{fill:"none"},[e("path",{d:"M2.5 4a.5.5 0 0 0-.5.5v11a.5.5 0 0 0 .5.5h15a.5.5 0 0 0 .5-.5v-11a.5.5 0 0 0-.5-.5h-15zm.5 6h2v3.5a.5.5 0 0 0 1 0V10h2v3.5a.5.5 0 0 0 1 0V10h2v3.5a.5.5 0 0 0 1 0V10h2v3.5a.5.5 0 0 0 1 0V10h2v5H3v-5zm2.75-2.5a.75.75 0 1 1 0-1.5a.75.75 0 0 1 0 1.5zm6.25-1a.5.5 0 0 1 .5-.5h2a.5.5 0 0 1 0 1h-2a.5.5 0 0 1-.5-.5zm-3 .251a.75.75 0 1 1-1.5 0a.75.75 0 0 1 1.5 0z",fill:"currentColor"})])],-1)]))])]),e("div",H,[e("div",W,[(n(!0),r(p,null,h(f.orderedNotes(),s=>(n(),r("div",{key:s,class:"p-4"},m(s),1))),128))])]),e("div",Y,[e("div",null,[e("div",J,[M(x,{"enter-active-class":"duration-500 ease-out","enter-class":"opacity-0 transform","enter-to-class":"opacity-100","leave-active-class":"duration-500","leave-class":"opacity-100","leave-to-class":"opacity-0 transform"},{default:g(()=>[a.activeKeys.size>=1?(n(),r("div",Q,m(f.chord()||"?"),1)):w("",!0)]),_:1})])])])]))])}const $=_(N,[["render",X]]);export{$ as default}; +import{m as _,c as r,g as O,b as e,l as y,t as m,F as p,r as h,i as M,f as g,T as x,o as n,h as w}from"./BK37JMLf.js";var c={},b;function A(){if(b)return c;b=1,Object.defineProperty(c,"__esModule",{value:!0}),c.identify=void 0;const i=["C","C# / Db","D","D# / Eb","E","F","F# / Gb","G","G# / Ab","A","A# / Bb","B"],t={"0 1":{name:"No 3 Major 7",rootOffset:1},"0 2":{name:"No 3 7",rootOffset:2},"0 3":{name:"Minor",rootOffset:0},"0 4":{name:"",rootOffset:0},"0 5":{name:"5",rootOffset:5},"0 6":{name:"7",rootOffset:2},"0 7":{name:"5",rootOffset:0},"0 8":{name:"",rootOffset:8},"0 9":{name:"Minor",rootOffset:9},"0 10":{name:"No 3 7",rootOffset:0},"0 11":{name:"No 3 Major 7",rootOffset:0},"0 2 7":{name:"Suspended 2",rootOffset:0},"0 3 6 10":{name:"Half-diminished 7",rootOffset:0},"0 3 6 9":{name:"Diminished 7",rootOffset:0},"0 3 6":{name:"Diminished",rootOffset:0},"0 3 7 10":{name:"Minor 7",rootOffset:0},"0 3 7 11":{name:"Minor-major 7",rootOffset:0},"0 3 7 9":{name:"Minor 6",rootOffset:0},"0 3 7":{name:"Minor",rootOffset:0},"0 4 10":{name:"7",rootOffset:0},"0 4 11":{name:"Major 7",rootOffset:0},"0 4 5 7":{name:"Add 11",rootOffset:0},"0 4 6":{name:"Flat 5",rootOffset:0},"0 4 7 10":{name:"Dominant 7",rootOffset:0},"0 4 7 11":{name:"Major 7",rootOffset:0},"0 4 7 9":{name:"Major 6",rootOffset:0},"0 4 7":{name:"",rootOffset:0},"0 4 8 10":{name:"Augmented 7",rootOffset:0},"0 4 8":{name:"Augmented",rootOffset:0},"0 5 7":{name:"Suspended 4",rootOffset:0},"0 5 8":{name:"Minor",rootOffset:5},"0 5 9":{name:"",rootOffset:5},"0 4 9":{name:"Minor",rootOffset:9},"0 3 8":{name:"",rootOffset:8},"0 1 5":{name:"Major 7",rootOffset:1},"0 2 6":{name:"Major 7",rootOffset:2},"0 4 5":{name:"5 Major 7",rootOffset:5},"0 1 2":{name:"No 3 7 Major 7",rootOffset:2},"0 1 3":{name:"Minor Add Flat 9",rootOffset:0},"0 1 6":{name:"5 Sharp 11",rootOffset:6},"0 1 7":{name:"5 Add Flat 9",rootOffset:0},"0 1 8":{name:"5 Major 7",rootOffset:1},"0 1 9":{name:"Sharp 9",rootOffset:9},"0 1 10":{name:"Minor Add 9",rootOffset:10},"0 1 11":{name:"No 3 7 Major 7",rootOffset:1},"0 2 10":{name:"Add 9",rootOffset:10},"0 2 11":{name:"Minor Add Flat 9",rootOffset:11},"0 2 3":{name:"Minor Add 9",rootOffset:0},"0 2 4":{name:"Add 9",rootOffset:0},"0 2 5":{name:"Minor 7",rootOffset:2},"0 2 8":{name:"Flat 5",rootOffset:8},"0 2 9":{name:"5 7",rootOffset:2},"0 3 10":{name:"Minor 7",rootOffset:0},"0 3 4":{name:"Sharp 9",rootOffset:0},"0 3 5":{name:"5 7",rootOffset:5},"0 3 9":{name:"Minor 6",rootOffset:0},"0 5 10":{name:"Suspended 2",rootOffset:10},"0 5 11":{name:"5 Sharp 11",rootOffset:5},"0 5 6":{name:"5 Add Flat 9",rootOffset:5},"0 6 10":{name:"Flat 5",rootOffset:6},"0 6 7":{name:"5 Sharp 11",rootOffset:0},"0 6 8":{name:"7",rootOffset:8},"0 6 9":{name:"Minor 6",rootOffset:9},"0 7 10":{name:"5 7",rootOffset:0},"0 7 11":{name:"5 Major 7",rootOffset:0},"0 7 8":{name:"Major 7",rootOffset:8},"0 7 9":{name:"Minor 7",rootOffset:9},"0 8 10":{name:"Add 9",rootOffset:8},"0 8 11":{name:"Sharp 9",rootOffset:8},"0 9 10":{name:"Minor Add Flat 9",rootOffset:9},"0 9 11":{name:"Minor Add 9",rootOffset:9},"0 10 11":{name:"No 3 7 Major 7",rootOffset:0},"0 1 4":{name:"Sharp 9",rootOffset:9},"0 8 9":{name:"Sharp 9",rootOffset:5},"0 6 11":{name:"7/13",rootOffset:2},"0 3 11":{name:"Sharp 9",rootOffset:8}};function d(v){const a=v.map(o=>typeof o=="number"?o:i.indexOf(o));if(a.some(o=>o<0))throw new Error("Unsupported note letter or number provided");if(new Set(a.map(o=>o%12)).size===1)return{name:i[a[0]%12]};const f=a.sort((o,l)=>o-l)[0]%12,s=[...new Set(a.map(o=>(o-f)%12).sort((o,l)=>o-l))],u=t[s.join(" ")];if(u){const o=(f+u.rootOffset)%12,l=i[o];return{name:u.name!==""?`${l} ${u.name}`:l,interval:s,root:o}}else return{name:void 0}}return c.identify=d,c}var k=A();const N={mounted(){typeof navigator.requestMIDIAccess<"u"&&navigator.requestMIDIAccess().then(i=>{this.midi=i,this.midi.inputs.forEach(t=>{t.onmidimessage=d=>{d.data[0]===144&&(this.activeKeys.set(d.data[1],d.data),this.$forceUpdate()),d.data[0]===128&&(this.activeKeys.delete(d.data[1]),this.$forceUpdate())}})},i=>{console.error(i)})},data(){return{tooltip:!1,midi:void 0,activeKeys:new Map}},computed:{inputs(){if(typeof this.midi<"u")return Array.from(this.midi.inputs.values())},outputs(){if(typeof this.midi<"u")return Array.from(this.midi.outputs.values())}},methods:{orderedNotes(){return Array.from(this.activeKeys.keys()).sort()},chord(){const i=Array.from(this.activeKeys.keys());return k.identify(i).name}}},S={class:"h-2/3 bg-gradient-to-b from-green-900 via-purple-900 to-indigo-900 text-white"},j={key:0,class:"p-4 text-center font-light tracking-wide"},I={key:1},D={class:"flex flex-wrap"},E={class:"absolute bottom-16 right-2"},F={class:"p-3 font-mono text-orange-900"},z={class:"mb-2 font-bold"},V={class:"mb-2"},T={key:0,class:"p-4 text-center italic"},C={key:1},B={class:"flex-1"},K={class:"flex-1"},P={class:"mb-2"},U={key:0,class:"p-4 text-center italic"},q={key:1},G={class:"flex-1"},L={class:"flex-1"},R={class:"absolute bottom-2 right-2"},H={class:"absolute bottom-4 left-4"},W={class:"flex"},Y={class:"grid h-screen place-items-center"},J={class:"text-center text-4xl font-semibold tracking-wide"},Q={key:0};function X(i,t,d,v,a,f){return n(),r("div",S,[typeof a.midi>"u"?(n(),r("div",j,t[1]||(t[1]=[O(" Unfortunately, the Web MIDI API is "),e("a",{class:"text-blue-500 underline",href:"https://developer.mozilla.org/en-US/docs/Web/API/MIDIMessageEvent#browser_compatibility"},"not supported",-1),O(" in all browsers... ")]))):(n(),r("div",I,[e("div",D,[e("div",E,[e("div",{class:y([{hidden:!a.tooltip,block:a.tooltip},"z-50 max-w-md break-words rounded-lg border-2 border-green-800 bg-yellow-200 text-sm font-normal leading-normal"])},[e("div",null,[t[5]||(t[5]=e("div",{class:"mb-0 rounded-t-lg border-b border-solid bg-green-600 p-3 font-semibold uppercase text-white opacity-75"}," MIDI Status ",-1)),e("div",F,[e("div",z,[t[2]||(t[2]=O(" Enabled: ")),e("span",null,m(typeof a.midi<"u"?"Yep!":"Nope"),1)]),e("div",V,[t[3]||(t[3]=e("div",{class:"font-bold"},"Inputs:",-1)),f.inputs.length===0?(n(),r("div",T," No input devices detected :( ")):(n(),r("div",C,[(n(!0),r(p,null,h(f.inputs,s=>(n(),r("div",{key:s.id,class:"flex"},[e("div",B,m(s.manufacturer),1),e("div",K,m(s.name),1)]))),128))]))]),e("div",P,[t[4]||(t[4]=e("div",{class:"font-bold"},"Outputs:",-1)),f.outputs.length===0?(n(),r("div",U," No output devices detected :( ")):(n(),r("div",q,[(n(!0),r(p,null,h(f.outputs,s=>(n(),r("div",{key:s.id,class:"flex"},[e("div",G,m(s.manufacturer),1),e("div",L,m(s.name),1)]))),128))]))])])])],2)]),e("div",R,[e("button",{onClick:t[0]||(t[0]=s=>a.tooltip=!a.tooltip),class:"border-3 rounded-lg border-green-600 bg-green-50 px-1 text-green-600 shadow hover:text-green-500 hover:shadow-lg",type:"button"},t[6]||(t[6]=[e("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 20 20",class:"h-10 w-10"},[e("g",{fill:"none"},[e("path",{d:"M2.5 4a.5.5 0 0 0-.5.5v11a.5.5 0 0 0 .5.5h15a.5.5 0 0 0 .5-.5v-11a.5.5 0 0 0-.5-.5h-15zm.5 6h2v3.5a.5.5 0 0 0 1 0V10h2v3.5a.5.5 0 0 0 1 0V10h2v3.5a.5.5 0 0 0 1 0V10h2v3.5a.5.5 0 0 0 1 0V10h2v5H3v-5zm2.75-2.5a.75.75 0 1 1 0-1.5a.75.75 0 0 1 0 1.5zm6.25-1a.5.5 0 0 1 .5-.5h2a.5.5 0 0 1 0 1h-2a.5.5 0 0 1-.5-.5zm-3 .251a.75.75 0 1 1-1.5 0a.75.75 0 0 1 1.5 0z",fill:"currentColor"})])],-1)]))])]),e("div",H,[e("div",W,[(n(!0),r(p,null,h(f.orderedNotes(),s=>(n(),r("div",{key:s,class:"p-4"},m(s),1))),128))])]),e("div",Y,[e("div",null,[e("div",J,[M(x,{"enter-active-class":"duration-500 ease-out","enter-class":"opacity-0 transform","enter-to-class":"opacity-100","leave-active-class":"duration-500","leave-class":"opacity-100","leave-to-class":"opacity-0 transform"},{default:g(()=>[a.activeKeys.size>=1?(n(),r("div",Q,m(f.chord()||"?"),1)):w("",!0)]),_:1})])])])]))])}const $=_(N,[["render",X]]);export{$ as default}; diff --git a/_nuxt/BsbVb7H-.js b/_nuxt/kj563EqX.js similarity index 88% rename from _nuxt/BsbVb7H-.js rename to _nuxt/kj563EqX.js index 4c1e21e6..11d91981 100644 --- a/_nuxt/BsbVb7H-.js +++ b/_nuxt/kj563EqX.js @@ -1 +1 @@ -import{d as p,I as f,k as i,o as s,c as n,a as u,a9 as r}from"./nJJO8dFm.js";const l=["id"],d=["href"],_=p({__name:"ProseH5",props:{id:{}},setup(c){const t=c,{headings:o}=f().public.mdc,a=i(()=>{var e;return t.id&&(typeof(o==null?void 0:o.anchorLinks)=="boolean"&&(o==null?void 0:o.anchorLinks)===!0||typeof(o==null?void 0:o.anchorLinks)=="object"&&((e=o==null?void 0:o.anchorLinks)==null?void 0:e.h5))});return(e,k)=>(s(),n("h5",{id:t.id},[t.id&&u(a)?(s(),n("a",{key:0,href:`#${t.id}`},[r(e.$slots,"default")],8,d)):r(e.$slots,"default",{key:1})],8,l))}});export{_ as default}; +import{d as p,I as f,k as i,o as s,c as n,a as u,a9 as r}from"./BK37JMLf.js";const l=["id"],d=["href"],_=p({__name:"ProseH5",props:{id:{}},setup(c){const t=c,{headings:o}=f().public.mdc,a=i(()=>{var e;return t.id&&(typeof(o==null?void 0:o.anchorLinks)=="boolean"&&(o==null?void 0:o.anchorLinks)===!0||typeof(o==null?void 0:o.anchorLinks)=="object"&&((e=o==null?void 0:o.anchorLinks)==null?void 0:e.h5))});return(e,k)=>(s(),n("h5",{id:t.id},[t.id&&u(a)?(s(),n("a",{key:0,href:`#${t.id}`},[r(e.$slots,"default")],8,d)):r(e.$slots,"default",{key:1})],8,l))}});export{_ as default}; diff --git a/_nuxt/BcwrwQE9.js b/_nuxt/nss6DupJ.js similarity index 63% rename from _nuxt/BcwrwQE9.js rename to _nuxt/nss6DupJ.js index 94976ad7..1bd1cca8 100644 --- a/_nuxt/BcwrwQE9.js +++ b/_nuxt/nss6DupJ.js @@ -1 +1 @@ -import{m as r,o,c as t,a9 as s}from"./nJJO8dFm.js";const c={};function n(e,a){return o(),t("tr",null,[s(e.$slots,"default")])}const f=r(c,[["render",n]]);export{f as default}; +import{m as r,o,c as t,a9 as s}from"./BK37JMLf.js";const c={};function n(e,a){return o(),t("tr",null,[s(e.$slots,"default")])}const f=r(c,[["render",n]]);export{f as default}; diff --git a/_nuxt/W7uQzGHR.js b/_nuxt/ojq642Va.js similarity index 64% rename from _nuxt/W7uQzGHR.js rename to _nuxt/ojq642Va.js index 067fbe28..adb8ce4e 100644 --- a/_nuxt/W7uQzGHR.js +++ b/_nuxt/ojq642Va.js @@ -1 +1 @@ -import{m as o,o as r,c as t,a9 as s}from"./nJJO8dFm.js";const c={};function n(e,a){return r(),t("th",null,[s(e.$slots,"default")])}const f=o(c,[["render",n]]);export{f as default}; +import{m as o,o as r,c as t,a9 as s}from"./BK37JMLf.js";const c={};function n(e,a){return r(),t("th",null,[s(e.$slots,"default")])}const f=o(c,[["render",n]]);export{f as default}; diff --git a/_nuxt/DGRh_ZVz.js b/_nuxt/sTS5Selr.js similarity index 64% rename from _nuxt/DGRh_ZVz.js rename to _nuxt/sTS5Selr.js index 9eb4de47..87a1acba 100644 --- a/_nuxt/DGRh_ZVz.js +++ b/_nuxt/sTS5Selr.js @@ -1 +1 @@ -import{m as o,o as r,c as s,a9 as t}from"./nJJO8dFm.js";const c={};function n(e,a){return r(),s("li",null,[t(e.$slots,"default")])}const f=o(c,[["render",n]]);export{f as default}; +import{m as o,o as r,c as s,a9 as t}from"./BK37JMLf.js";const c={};function n(e,a){return r(),s("li",null,[t(e.$slots,"default")])}const f=o(c,[["render",n]]);export{f as default}; diff --git a/_nuxt/xNjjsTAj.js b/_nuxt/xNjjsTAj.js deleted file mode 100644 index cc633bc4..00000000 --- a/_nuxt/xNjjsTAj.js +++ /dev/null @@ -1 +0,0 @@ -import{a as o}from"./CFm_cf98.js";import{m as c,c as n,i as t,o as a}from"./nJJO8dFm.js";const r={};function s(_,m){const e=o;return a(),n("div",null,[t(e,{showImages:""})])}const d=c(r,[["render",s]]);export{d as default}; diff --git a/_payload.json b/_payload.json index 3c4c6cdd..8a17008d 100644 --- a/_payload.json +++ b/_payload.json @@ -1 +1 @@ -[{"data":1,"prerenderedAt":3},["ShallowReactive",2],{},1735276484109] \ No newline at end of file +[{"data":1,"prerenderedAt":3},["ShallowReactive",2],{},1735327944007] \ No newline at end of file diff --git a/api/_content/cache.1735276470171.json b/api/_content/cache.1735327930064.json similarity index 99% rename from api/_content/cache.1735276470171.json rename to api/_content/cache.1735327930064.json index f54b0db9..b4124484 100644 --- a/api/_content/cache.1735276470171.json +++ b/api/_content/cache.1735327930064.json @@ -1 +1 @@ -{"generatedAt":1735276484083,"generateTime":848,"contents":[{"_path":"/articles/apu2-firmware-upgrade","_dir":"articles","_draft":false,"_partial":false,"_locale":"","title":"Upgrading the Firmware on the PCEngines APU2","description":"I've had a PCEngines APU2 gathering dust for a\nfew years, and have recently decided to dust it off.","date":"2019-12-21","draft":false,"tags":["pcengine","apu"],"categories":["linux"],"excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"I've had a "},{"type":"element","tag":"a","props":{"href":"https://pcengines.ch/apu2.htm","rel":["nofollow"]},"children":[{"type":"text","value":"PCEngines APU2"}]},{"type":"text","value":" gathering dust for a\nfew years, and have recently decided to dust it off."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Since the last time the device has been powered on, there have been many great\nimprovements to the firmware, and it was very-much due for an upgrade. The\nfollowing steps outline how the firmware was upgraded on the APU from the\nalready-installed operating system -- CentOS."}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"I've had a "},{"type":"element","tag":"a","props":{"href":"https://pcengines.ch/apu2.htm","rel":["nofollow"]},"children":[{"type":"text","value":"PCEngines APU2"}]},{"type":"text","value":" gathering dust for a\nfew years, and have recently decided to dust it off."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Since the last time the device has been powered on, there have been many great\nimprovements to the firmware, and it was very-much due for an upgrade. The\nfollowing steps outline how the firmware was upgraded on the APU from the\nalready-installed operating system -- CentOS."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"First, we will connect to the device over the serial port"}]},{"type":"element","tag":"pre","props":{"code":"screen /dev/tty.usbserial 115200\n"},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"screen /dev/tty.usbserial 115200\n"}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Then, we will install the "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"flashrom"}]},{"type":"text","value":" utility that is needed to update the\nfirmware. Because it is not available in the default "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"yum"}]},{"type":"text","value":" repositories, we\nwill enable the "},{"type":"element","tag":"em","props":{},"children":[{"type":"text","value":"Extra Packages for Enterprise Linux"}]},{"type":"text","value":" (EPEL) repository before\ninstallation."}]},{"type":"element","tag":"pre","props":{"code":"sudo yum install epel-release\nsudo yum install flashrom\n","language":"bash","meta":"","className":"language-bash shiki shiki-themes github-light","style":""},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line","line":1},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"sudo"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" yum"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" install"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" epel-release\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":2},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"sudo"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" yum"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" install"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" flashrom\n"}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Next, we will download the latest version of the firmware that is compatible\nwith the APU2 device from the PC Engines release website:\n"},{"type":"element","tag":"a","props":{"href":"https://pcengines.github.io/","rel":["nofollow"]},"children":[{"type":"text","value":"https://pcengines.github.io/"}]},{"type":"text","value":"."}]},{"type":"element","tag":"pre","props":{"code":"curl -O https://3mdeb.com/open-source-firmware/pcengines/apu2/apu2_v4.11.0.1.rom\n","language":"bash","meta":"","className":"language-bash shiki shiki-themes github-light","style":""},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line","line":1},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"curl"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" -O"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" https://3mdeb.com/open-source-firmware/pcengines/apu2/apu2_v4.11.0.1.rom\n"}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"And finally, we will flash the firmware..."}]},{"type":"element","tag":"pre","props":{"code":"sudo flashrom -w apu2_v4.11.0.1.rom -p internal:boardmismatch=force\n","language":"bash","meta":"","className":"language-bash shiki shiki-themes github-light","style":""},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line","line":1},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"sudo"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" flashrom"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" -w"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" apu2_v4.11.0.1.rom"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" -p"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" internal:boardmismatch=force\n"}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"strong","props":{},"children":[{"type":"text","value":"References:"}]}]},{"type":"element","tag":"ul","props":{},"children":[{"type":"element","tag":"li","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://pcengines.ch/apu2.htm","rel":["nofollow"]},"children":[{"type":"text","value":"https://pcengines.ch/apu2.htm"}]}]},{"type":"element","tag":"li","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://pcengines.github.io/","rel":["nofollow"]},"children":[{"type":"text","value":"https://pcengines.github.io/"}]}]},{"type":"element","tag":"li","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://github.com/pcengines/apu2-documentation/blob/master/docs/firmware_flashing.md","rel":["nofollow"]},"children":[{"type":"text","value":"https://github.com/pcengines/apu2-documentation/blob/master/docs/firmware_flashing.md"}]}]},{"type":"element","tag":"li","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://github.com/pcengines/apu2-documentation/blob/master/docs/cold_reset.md","rel":["nofollow"]},"children":[{"type":"text","value":"https://github.com/pcengines/apu2-documentation/blob/master/docs/cold_reset.md"}]}]},{"type":"element","tag":"li","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://github.com/elad/openbsd-apu2","rel":["nofollow"]},"children":[{"type":"text","value":"https://github.com/elad/openbsd-apu2"}]}]}]},{"type":"element","tag":"style","props":{},"children":[{"type":"text","value":"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:articles:apu2-firmware-upgrade.md","_source":"content","_file":"articles/apu2-firmware-upgrade.md","_stem":"articles/apu2-firmware-upgrade","_extension":"md"},{"_path":"/articles/docker-selinux-volumes","_dir":"articles","_draft":false,"_partial":false,"_locale":"","title":"Docker Volume Permissions with SELinux","description":"Unfamiliar with running Docker on a SELinux enabled system, I found myself\nrunning into a bunch of file permission errors while creating volumes.","date":"2019-12-26","draft":false,"tags":["docker","selinux"],"categories":["linux"],"excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Unfamiliar with running Docker on a SELinux enabled system, I found myself\nrunning into a bunch of file permission errors while creating volumes."}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Unfamiliar with running Docker on a SELinux enabled system, I found myself\nrunning into a bunch of file permission errors while creating volumes."}]},{"type":"element","tag":"pre","props":{"code":"mkdir: can't create directory '/data': Permission denied\n","language":"txt","meta":"","className":"language-txt shiki shiki-themes github-light","style":""},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line","line":1},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":"mkdir: can't create directory '/data': Permission denied\n"}]}]}]}]},{"type":"element","tag":"hr","props":{},"children":[]},{"type":"element","tag":"pre","props":{"code":"$ docker info --format '{{json .SecurityOptions}}'\n[\n \"name=seccomp,profile=/etc/docker/seccomp.json\",\n \"name=selinux\"\n]\n","language":"bash","meta":"","className":"language-bash shiki shiki-themes github-light","style":""},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line","line":1},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" docker"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" info"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" --format"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" '{{json .SecurityOptions}}'\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":2},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"[\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":3},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" \"name=seccomp,profile=/etc/docker/seccomp.json\""}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":",\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":4},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" \"name=selinux\"\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":5},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"]\n"}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"It turns out that this can be resolved by appending the "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":":z"}]},{"type":"text","value":" flag to the volume\nmappings in the "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"docker-compose.yml"}]},{"type":"text","value":" file, indicating that the volume content\nis shared."}]},{"type":"element","tag":"pre","props":{"code":"services:\n server:\n volumes:\n - ./data:/data:z\n"},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"services:\n server:\n volumes:\n - ./data:/data:z\n"}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"From the Docker documentation:"}]},{"type":"element","tag":"blockquote","props":{},"children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"The "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"z"}]},{"type":"text","value":" option tells Docker that two containers share the volume content. As\na result, Docker labels the content with a shared content label. Shared\nvolume labels allow all containers to read/write content."}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"strong","props":{},"children":[{"type":"text","value":"References"}]}]},{"type":"element","tag":"ul","props":{},"children":[{"type":"element","tag":"li","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://docs.docker.com/engine/reference/commandline/info/","rel":["nofollow"]},"children":[{"type":"text","value":"Docker Docs: Docker Info"}]}]},{"type":"element","tag":"li","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://docs.docker.com/engine/reference/commandline/run/#mount-volumes-from-container---volumes-from","rel":["nofollow"]},"children":[{"type":"text","value":"Docker Docs: Mounting Volumes"}]}]}]},{"type":"element","tag":"style","props":{},"children":[{"type":"text","value":"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:articles:docker-selinux-volumes.md","_source":"content","_file":"articles/docker-selinux-volumes.md","_stem":"articles/docker-selinux-volumes","_extension":"md"},{"_path":"/articles/doctl","_dir":"articles","_draft":false,"_partial":false,"_locale":"","title":"Exploring the Digital Ocean `doctl` Utility","description":"I recently had the need to spool up a small ephemeral Linux instance, and wanted to try something new by exploring the Digital Ocean doctl command line utility.\nThis proved to be an extremely easy way to configure, create, connect, and destroy a Linux box, and I foresee myself using this service even more in the future.","date":"2023-01-01","tags":["linux","digital-ocean"],"categories":["linux"],"excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"I recently had the need to spool up a small ephemeral Linux instance, and wanted to try something new by exploring the Digital Ocean "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"doctl"}]},{"type":"text","value":" command line utility.\nThis proved to be an "},{"type":"element","tag":"em","props":{},"children":[{"type":"text","value":"extremely"}]},{"type":"text","value":" easy way to configure, create, connect, and destroy a Linux box, and I foresee myself using this service even more in the future."}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"I recently had the need to spool up a small ephemeral Linux instance, and wanted to try something new by exploring the Digital Ocean "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"doctl"}]},{"type":"text","value":" command line utility.\nThis proved to be an "},{"type":"element","tag":"em","props":{},"children":[{"type":"text","value":"extremely"}]},{"type":"text","value":" easy way to configure, create, connect, and destroy a Linux box, and I foresee myself using this service even more in the future."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"To start things off, I had to install and setup authentication to Digital Ocean. Doing\nthis on my Mac machine, I opted to use "},{"type":"element","tag":"a","props":{"href":"https://brew.sh/","rel":["nofollow"]},"children":[{"type":"text","value":"Homebrew"}]},{"type":"text","value":"."}]},{"type":"element","tag":"pre","props":{"className":"language-sh shiki shiki-themes github-light","code":"# install `doctl`\nbrew install doctl\n\n# setup authentication\ndoctl auth init\n","language":"sh","meta":"","style":""},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line","line":1},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6A737D"},"children":[{"type":"text","value":"# install `doctl`\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":2},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"brew"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" install"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" doctl\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":3},"children":[{"type":"element","tag":"span","props":{"emptyLinePlaceholder":true},"children":[{"type":"text","value":"\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":4},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6A737D"},"children":[{"type":"text","value":"# setup authentication\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":5},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"doctl"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" auth"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" init\n"}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"While the online "},{"type":"element","tag":"a","props":{"href":"https://docs.digitalocean.com/reference/doctl/reference/compute/droplet/create/","rel":["nofollow"]},"children":[{"type":"text","value":"documentation"}]},{"type":"text","value":" is fantastic, I instead found myself mostly referencing the outputs of "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"--help"}]},{"type":"text","value":"."}]},{"type":"element","tag":"pre","props":{"className":"language-sh shiki shiki-themes github-light","code":"doctl compute droplet create --help\n","language":"sh","meta":"","style":""},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line","line":1},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"doctl"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" compute"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" droplet"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" create"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" --help\n"}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"I had to find the image name of the version of Ubuntu I wanted to install:"}]},{"type":"element","tag":"pre","props":{"className":"language-sh shiki shiki-themes github-light","code":"doctl compute image list --public | grep ubuntu-22\n\n# 118857366 22.04 (LTS) x64 snapshot Ubuntu ubuntu-22-04-x64 true 7\n# 119383150 22.10 x64 snapshot Ubuntu ubuntu-22-10-x64 true 7\n","language":"sh","meta":"","style":""},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line","line":1},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"doctl"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" compute"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" image"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" list"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" --public"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":" |"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":" grep"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" ubuntu-22\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":2},"children":[{"type":"element","tag":"span","props":{"emptyLinePlaceholder":true},"children":[{"type":"text","value":"\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":3},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6A737D"},"children":[{"type":"text","value":"# 118857366 22.04 (LTS) x64 snapshot Ubuntu ubuntu-22-04-x64 true 7\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":4},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6A737D"},"children":[{"type":"text","value":"# 119383150 22.10 x64 snapshot Ubuntu ubuntu-22-10-x64 true 7\n"}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"And also the slug of the compute size:"}]},{"type":"element","tag":"pre","props":{"className":"language-sh shiki shiki-themes github-light","code":"doctl compute size list\n\n# Slug Description Memory VCPUs Disk Price Monthly Price Hourly\n# s-1vcpu-512mb-10gb Basic 512 1 10 4.00 0.005950\n# s-1vcpu-1gb Basic 1024 1 25 6.00 0.008930\n# s-1vcpu-1gb-amd Basic AMD 1024 1 25 7.00 0.010420\n# s-1vcpu-1gb-intel Basic Intel 1024 1 25 7.00 0.010420\n# s-1vcpu-2gb Basic 2048 1 50 12.00 0.017860\n# s-1vcpu-2gb-amd Basic AMD 2048 1 50 14.00 0.020830\n","language":"sh","meta":"","style":""},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line","line":1},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"doctl"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" compute"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" size"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" list\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":2},"children":[{"type":"element","tag":"span","props":{"emptyLinePlaceholder":true},"children":[{"type":"text","value":"\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":3},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6A737D"},"children":[{"type":"text","value":"# Slug Description Memory VCPUs Disk Price Monthly Price Hourly\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":4},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6A737D"},"children":[{"type":"text","value":"# s-1vcpu-512mb-10gb Basic 512 1 10 4.00 0.005950\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":5},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6A737D"},"children":[{"type":"text","value":"# s-1vcpu-1gb Basic 1024 1 25 6.00 0.008930\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":6},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6A737D"},"children":[{"type":"text","value":"# s-1vcpu-1gb-amd Basic AMD 1024 1 25 7.00 0.010420\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":7},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6A737D"},"children":[{"type":"text","value":"# s-1vcpu-1gb-intel Basic Intel 1024 1 25 7.00 0.010420\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":8},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6A737D"},"children":[{"type":"text","value":"# s-1vcpu-2gb Basic 2048 1 50 12.00 0.017860\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":9},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6A737D"},"children":[{"type":"text","value":"# s-1vcpu-2gb-amd Basic AMD 2048 1 50 14.00 0.020830\n"}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"I've also configured a few SSH keys with Digital Ocean, and I can have the key (specified by ID) provisioned to the machine using the "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"--ssh-keys"}]},{"type":"text","value":" flag."}]},{"type":"element","tag":"pre","props":{"className":"language-sh shiki shiki-themes github-light","code":"doctl compute ssh-key list\n\n# ID Name FingerPrint\n# 1234 mini \n","language":"sh","meta":"","style":""},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line","line":1},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"doctl"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" compute"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" ssh-key"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" list\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":2},"children":[{"type":"element","tag":"span","props":{"emptyLinePlaceholder":true},"children":[{"type":"text","value":"\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":3},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6A737D"},"children":[{"type":"text","value":"# ID Name FingerPrint\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":4},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6A737D"},"children":[{"type":"text","value":"# 1234 mini \n"}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Also, I wanted to install a few packages to the box upon creation, this can be done easily with the "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"--user-data-file"}]},{"type":"text","value":" flag to run an initialization script."}]},{"type":"element","tag":"pre","props":{"className":"language-sh shiki shiki-themes github-light","code":"echo 'apt install -y imagemagick zip' > bootstrap.sh\n","language":"sh","meta":"","style":""},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line","line":1},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":"echo"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" 'apt install -y imagemagick zip'"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":" >"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" bootstrap.sh\n"}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Putting it all together, here is the simple command for creating a small compute instance!"}]},{"type":"element","tag":"pre","props":{"className":"language-sh shiki shiki-themes github-light","code":"doctl compute droplet create \\\n --image ubuntu-22-10-x64 \\\n --size s-1vcpu-512mb-10gb \\\n --region nyc1 \\\n --ssh-keys 1234 \\\n --user-data-file boostrap.sh \\\n ephemeral\n","language":"sh","meta":"","style":""},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line","line":1},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"doctl"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" compute"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" droplet"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" create"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" \\\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":2},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" --image"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" ubuntu-22-10-x64"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" \\\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":3},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" --size"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" s-1vcpu-512mb-10gb"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" \\\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":4},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" --region"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" nyc1"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" \\\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":5},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" --ssh-keys"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" 1234"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" \\\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":6},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" --user-data-file"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" boostrap.sh"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" \\\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":7},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" ephemeral\n"}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Finally, I can connect, do my thing, and destroy the instance."}]},{"type":"element","tag":"pre","props":{"className":"language-sh shiki shiki-themes github-light","code":"doctl compute ssh ephemeral\n","language":"sh","meta":"","style":""},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line","line":1},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"doctl"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" compute"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" ssh"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" ephemeral\n"}]}]}]}]},{"type":"element","tag":"pre","props":{"className":"language-sh shiki shiki-themes github-light","code":"doctl compute droplet delete --force ephemeral\n","language":"sh","meta":"","style":""},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line","line":1},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"doctl"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" compute"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" droplet"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" delete"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" --force"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" ephemeral\n"}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"All-in-all, I was up and running in about 20 minutes. What a handy utility!"}]},{"type":"element","tag":"style","props":{},"children":[{"type":"text","value":"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:articles:doctl.md","_source":"content","_file":"articles/doctl.md","_stem":"articles/doctl","_extension":"md"},{"_path":"/articles/fennel-initial-exploration","_dir":"articles","_draft":false,"_partial":false,"_locale":"","title":"Impressions of Fennel with Hammerspoon","description":"A while back I read an introductory book on Lisp programming titled, \"The Little\nSchemer\". This book opened my mind to new (to me) programming paradigms, and left me\nwith a strong desire to find a way to incorporate Lisp programming into my every day\nlife. It took some time, but I believe I've found what I've been looking for: Fennel.","draft":false,"date":"2023-10-22","tags":["lisp","hammerspoon","fennel"],"categories":["lisp"],"cover_image":"/images/dall-e-fennel-hammer.jpeg","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"A while back I read an introductory book on Lisp programming titled, \"The Little\nSchemer\". This book opened my mind to new (to me) programming paradigms, and left me\nwith a strong desire to find a way to incorporate Lisp programming into my every day\nlife. It took some time, but I believe I've found what I've been looking for: Fennel."}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"A while back I read an introductory book on Lisp programming titled, \"The Little\nSchemer\". This book opened my mind to new (to me) programming paradigms, and left me\nwith a strong desire to find a way to incorporate Lisp programming into my every day\nlife. It took some time, but I believe I've found what I've been looking for: Fennel."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"The "},{"type":"element","tag":"a","props":{"href":"https://fennel-lang.org/","rel":["nofollow"]},"children":[{"type":"text","value":"Fennel"}]},{"type":"text","value":" programming language is a dialect of Lisp that boasts compatibility with\nLua, and it just so happens that two of my favorite applications are configured with\nexactly that language: "},{"type":"element","tag":"a","props":{"href":"https://www.hammerspoon.org/","rel":["nofollow"]},"children":[{"type":"text","value":"Hammerspoon"}]},{"type":"text","value":", and "},{"type":"element","tag":"a","props":{"href":"https://neovim.io/","rel":["nofollow"]},"children":[{"type":"text","value":"Neovim"}]},{"type":"text","value":"."}]},{"type":"element","tag":"h2","props":{"id":"initial-observations"},"children":[{"type":"text","value":"Initial Observations"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"To initially explore Fennel, I wanted to start small. My Hammerspoon configuration\nconsists of 7 "},{"type":"element","tag":"a","props":{"href":"https://github.com/cmpadden/dotfiles/tree/795749fa17e1310bb001bb7deaa22be8689f0027/hammerspoon/.hammerspoon/modules","rel":["nofollow"]},"children":[{"type":"text","value":"modules"}]},{"type":"text","value":" that I use for operations such as: launching applications,\nmanaging windows, keeping my computer from going to sleep, and general operating system\nautomation. So the plan is to translate these modules into Fennel, while maintaining\nwithout breaking the existing functionality. However, at this point, I wasn't even sure\nhow to embed Fennel into my project..."}]},{"type":"element","tag":"h2","props":{"id":"integrating-fennel-with-hammerspoon"},"children":[{"type":"text","value":"Integrating Fennel with Hammerspoon"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"While official documentation exists describing how to "},{"type":"element","tag":"a","props":{"href":"https://fennel-lang.org/setup#embedding-fennel","rel":["nofollow"]},"children":[{"type":"text","value":"embed fennel"}]},{"type":"text","value":" into your\nproject; it didn't provide me with enough clarity to know my next steps on integrating\nit with Hammerspoon. I found a few resources online demonstrating how to extend the\n"},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"package.path"}]},{"type":"text","value":" and "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"package.cpath"}]},{"type":"text","value":" properties in Lua, but I was unable to get this to\nwork."}]},{"type":"element","tag":"ul","props":{},"children":[{"type":"element","tag":"li","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://blog.exupero.org/hammerspoon-with-fennel/","rel":["nofollow"]},"children":[{"type":"text","value":"https://blog.exupero.org/hammerspoon-with-fennel/"}]}]},{"type":"element","tag":"li","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://github.com/Hammerspoon/hammerspoon/issues/2377#issuecomment-636331435","rel":["nofollow"]},"children":[{"type":"text","value":"https://github.com/Hammerspoon/hammerspoon/issues/2377#issuecomment-636331435"}]}]},{"type":"element","tag":"li","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://github.com/agzam/spacehammer/blob/master/init.lua","rel":["nofollow"]},"children":[{"type":"text","value":"https://github.com/agzam/spacehammer/blob/master/init.lua"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Ultimately, I opted to include the "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"fennel.lua"}]},{"type":"text","value":" file to my Hammerspoon configuration,\nand while not ideal, it does make the configuration nicely self-contained. I'll leave it\nas a future task to include the module installed with LuaRocks."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"With Fennel now included in my Hammerspoon configuration, all I need to do is configure\nthe "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"fennel.path"}]},{"type":"text","value":" to point to the "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"*.fnl"}]},{"type":"text","value":" files in the "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":".hammerspoon/"}]},{"type":"text","value":" directory, and\nttranslating these modules can begin!"}]},{"type":"element","tag":"pre","props":{"className":"language-lua shiki shiki-themes github-light","code":"-- init.lua\n\nlocal fennel = require('fennel')\n\nfennel.path = package.path .. \";\" .. os.getenv(\"HOME\") .. \"/.hammerspoon/?.fnl\"\n\ntable.insert(package.loaders or package.searchers, fennel.searcher)\n\nrequire 'main'\n","language":"lua","meta":"","style":""},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line","line":1},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6A737D"},"children":[{"type":"text","value":"-- init.lua\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":2},"children":[{"type":"element","tag":"span","props":{"emptyLinePlaceholder":true},"children":[{"type":"text","value":"\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":3},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":"local"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" fennel "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" require"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":"'fennel'"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":")\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":4},"children":[{"type":"element","tag":"span","props":{"emptyLinePlaceholder":true},"children":[{"type":"text","value":"\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":5},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"fennel."}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"path"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":" ="}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" package.path"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":" .."}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" \";\" "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":".."}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" os.getenv"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":"\"HOME\""}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":".."}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" \"/.hammerspoon/?.fnl\"\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":6},"children":[{"type":"element","tag":"span","props":{"emptyLinePlaceholder":true},"children":[{"type":"text","value":"\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":7},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":"table.insert"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":"package.loaders"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":" or"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" package.searchers"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":", fennel."}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"searcher"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":")\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":8},"children":[{"type":"element","tag":"span","props":{"emptyLinePlaceholder":true},"children":[{"type":"text","value":"\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":9},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":"require"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" 'main'\n"}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"translating-lua-to-fennel"},"children":[{"type":"text","value":"Translating Lua to Fennel"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"As a Fennel novice, I was happy to see that the Fennel project provides an online\ncross-compiler for Lua and Fennel called "},{"type":"element","tag":"a","props":{"href":"https://fennel-lang.org/see","rel":["nofollow"]},"children":[{"type":"text","value":"anti-fennel"}]},{"type":"text","value":", and while it can generate some\nstrange-looking Fennel code, it was an extremely useful tool for me to get\nup-and-running right away. For example, by pasting the simple "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"sleep"}]},{"type":"text","value":" function\nfrom the "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"helpers"}]},{"type":"text","value":" module into the compiler:"}]},{"type":"element","tag":"pre","props":{"className":"language-lua shiki shiki-themes github-light","code":"function sleep(ms)\n os.execute(\"sleep \" .. tonumber(ms) / 1000)\nend\n","language":"lua","meta":"","style":""},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line","line":1},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":"function"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":" sleep"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"(ms)\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":2},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" os.execute"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":"\"sleep \" "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":".."}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" tonumber"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"(ms) "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":"/"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" 1000"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":")\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":3},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":"end\n"}]}]}]}]},{"type":"element","tag":"pre","props":{"className":"language-lisp shiki shiki-themes github-light","code":"(fn sleep [ms]\n (os.execute (.. \"sleep \" (/ (tonumber ms) 1000))))\n","language":"lisp","meta":"","style":""},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line","line":1},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"(fn "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":"sleep"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" [ms]\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":2},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" (os.execute (.. "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":"\"sleep \""}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":"/"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" (tonumber ms) "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":"1000"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"))))\n"}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"As another example, here is the output for my "},{"type":"element","tag":"em","props":{},"children":[{"type":"text","value":"caffeine"}]},{"type":"text","value":" toggle:"}]},{"type":"element","tag":"pre","props":{"className":"language-lua shiki shiki-themes github-light","code":"hs.hotkey.bind(HYPER, \"0\", function()\n hs.caffeinate.toggle(\"displayIdle\")\n if hs.caffeinate.get(\"displayIdle\") then\n helpers:show(\"Caffeine Enabled\", nil, helpers.styles.success, helpers.assets.check)\n else\n helpers:show(\"Caffeine Disabled\", nil, helpers.styles.error, helpers.assets.ban)\n end\nend)\n","language":"lua","meta":"","style":""},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line","line":1},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"hs."}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"hotkey"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":"bind"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"(HYPER, "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":"\"0\""}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":"function"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"()\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":2},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" hs."}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"caffeinate"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":"toggle"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":"\"displayIdle\""}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":")\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":3},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":" if"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" hs."}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"caffeinate"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":"get"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":"\"displayIdle\""}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":"then\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":4},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":" helpers"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":"show"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":"\"Caffeine Enabled\""}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":"nil"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":", helpers."}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"styles"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"success"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":", helpers."}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"assets"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"check"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":")\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":5},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":" else\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":6},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":" helpers"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":"show"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":"\"Caffeine Disabled\""}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":"nil"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":", helpers."}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"styles"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"error"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":", helpers."}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"assets"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"ban"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":")\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":7},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":" end\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":8},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":"end"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":")\n"}]}]}]}]},{"type":"element","tag":"pre","props":{"className":"language-lisp shiki shiki-themes github-light","code":"(hs.hotkey.bind HYPER :0\n (fn [] (hs.caffeinate.toggle :displayIdle)\n (if (hs.caffeinate.get :displayIdle)\n (helpers:show \"Caffeine Enabled\" nil helpers.styles.success helpers.assets.check)\n (helpers:show \"Caffeine Disabled\" nil helpers.styles.error helpers.assets.ban)))) \n","language":"lisp","meta":"","style":""},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line","line":1},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"(hs.hotkey.bind HYPER "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":":0\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":2},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" (fn [] (hs.caffeinate.toggle "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":":displayIdle"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":")\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":3},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":"if"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" (hs.caffeinate.get "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":":displayIdle"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":")\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":4},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":"helpers"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":":show "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":"\"Caffeine Enabled\""}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" nil"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" helpers.styles.success helpers.assets.check)\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":5},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":"helpers"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":":show "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":"\"Caffeine Disabled\""}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" nil"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" helpers.styles.error helpers.assets.ban))))\n"}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This was especially helpful for more gnarly modules like the "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"window"}]},{"type":"text","value":" module used for\nwindow management, and seeing the Lua and Fennel code side-by-side was a kick starter in\nlearning the language!"}]},{"type":"element","tag":"h2","props":{"id":"next-steps"},"children":[{"type":"text","value":"Next Steps"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"While my Fennel Hammerspoon configuration now works with parity to its Lua counterpart,\nI have not yet added new features or modules. I look forward to writing new Fennel code,\nand deepen my understanding of Lisp and the Fennel programming language."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Additionally, before beginning this endeavor, I was already aware of projects like\n"},{"type":"element","tag":"a","props":{"href":"https://github.com/agzam/spacehammer","rel":["nofollow"]},"children":[{"type":"text","value":"spacehammer"}]},{"type":"text","value":"; a wildly impressive Hammerspoon configuration written in Fennel, but,\nI wanted to start small and learn the integration myself. However, with the basics out\nof the way, I hope to explore this project further, and seek lessons-learned for the\nconfiguration of my own."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"The full pull-request for translating my Lua Hammerspoon configuration to Fennel can be\nfound here: "},{"type":"element","tag":"a","props":{"href":"https://github.com/cmpadden/dotfiles/pull/19/files","rel":["nofollow"]},"children":[{"type":"text","value":"https://github.com/cmpadden/dotfiles/pull/19/files"}]}]},{"type":"element","tag":"style","props":{},"children":[{"type":"text","value":"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[{"id":"initial-observations","depth":2,"text":"Initial Observations"},{"id":"integrating-fennel-with-hammerspoon","depth":2,"text":"Integrating Fennel with Hammerspoon"},{"id":"translating-lua-to-fennel","depth":2,"text":"Translating Lua to Fennel"},{"id":"next-steps","depth":2,"text":"Next Steps"}]}},"_type":"markdown","_id":"content:articles:fennel-initial-exploration.md","_source":"content","_file":"articles/fennel-initial-exploration.md","_stem":"articles/fennel-initial-exploration","_extension":"md"},{"_path":"/articles/migrate-truenas-from-core-to-scale","_dir":"articles","_draft":false,"_partial":false,"_locale":"","title":"Migrate to TrueNAS Scale from TrueNAS Core","description":"TrueNAS Scale offers a variety of interesting features that are not supported in its TrueNAS Core counterpart. Most notably, because the base operating system is Debian Linux, opposed to FreeBSD, there is native support for Linux containers via Docker, and Kubernetes Pods! This post walks through the steps required to upgrade from TrueNAS Core to TrueNAS Scale.","date":"2021-12-28","tags":["homelab","supermicro","truenas"],"categories":["homelab"],"excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"TrueNAS Scale offers a variety of interesting features that are not supported in its TrueNAS Core counterpart. Most notably, because the base operating system is Debian Linux, opposed to FreeBSD, there is native support for Linux containers via Docker, and Kubernetes Pods! This post walks through the steps required to upgrade from TrueNAS Core to TrueNAS Scale."}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"TrueNAS Scale offers a variety of interesting features that are not supported in its TrueNAS Core counterpart. Most notably, because the base operating system is Debian Linux, opposed to FreeBSD, there is native support for Linux containers via Docker, and Kubernetes Pods! This post walks through the steps required to upgrade from TrueNAS Core to TrueNAS Scale."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Thankfully, the upgrade procedure to migrate from TrueNAS Core to TrueNAS Scale is relatively straight forward. All it requires is to create a bootable USB of the TrueNAS Scale image, boot the USB, and select "},{"type":"element","tag":"em","props":{},"children":[{"type":"text","value":"Install/Upgrade"}]},{"type":"text","value":" in the installation wizard. But for the sake of being thorough, you can find instructions on how to backup system configurations and install the OS below."}]},{"type":"element","tag":"ol","props":{},"children":[{"type":"element","tag":"li","props":{},"children":[{"type":"text","value":"Make a backup of your system’s configuration\n"},{"type":"element","tag":"ol","props":{},"children":[{"type":"element","tag":"li","props":{},"children":[{"type":"text","value":"Navigate to "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"System > General"}]}]},{"type":"element","tag":"li","props":{},"children":[{"type":"text","value":"Click "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"Save Config"}]},{"type":"text","value":", check the "},{"type":"element","tag":"em","props":{},"children":[{"type":"text","value":"Export Secret Seed"}]},{"type":"text","value":" box, and click "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"Save"}]}]}]}]},{"type":"element","tag":"li","props":{},"children":[{"type":"text","value":"Export dataset keys for the encrypted pools\n"},{"type":"element","tag":"ol","props":{},"children":[{"type":"element","tag":"li","props":{},"children":[{"type":"text","value":"Navigate to "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"Storage > Pools"}]}]},{"type":"element","tag":"li","props":{},"children":[{"type":"text","value":"Click the cog icon, and select "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"Export Dataset Keys"}]}]}]}]},{"type":"element","tag":"li","props":{},"children":[{"type":"text","value":"Insert the TrueNAS Core bootable USB into the NAS"}]},{"type":"element","tag":"li","props":{},"children":[{"type":"text","value":"From the Supermicro IPMI interface select "},{"type":"element","tag":"em","props":{},"children":[{"type":"text","value":"Remote Control"}]},{"type":"text","value":" and "},{"type":"element","tag":"em","props":{},"children":[{"type":"text","value":"iKVM/HTML5"}]},{"type":"text","value":" and select "},{"type":"element","tag":"em","props":{},"children":[{"type":"text","value":"Reboot"}]}]},{"type":"element","tag":"li","props":{},"children":[{"type":"text","value":"Select the bootable USB as the boot device"}]},{"type":"element","tag":"li","props":{},"children":[{"type":"text","value":"From the TrueNAS installation wizard, select "},{"type":"element","tag":"em","props":{},"children":[{"type":"text","value":"Install/Upgrade"}]},{"type":"text","value":", select the drive that contains the TrueNAS installation, and select "},{"type":"element","tag":"em","props":{},"children":[{"type":"text","value":"Upgrade Install"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Reboot the device, and voila — you should be up-and-running! Give the system a quick rundown to validate that your settings and pools have transferred correctly, and then enjoy all the container goodness!"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"For a breakdown of the differences between TrueNAS Core, Enterprise, and Scale, you can reference "},{"type":"element","tag":"a","props":{"href":"https://www.truenas.com/help-me-choose/","rel":["nofollow"]},"children":[{"type":"text","value":"this table"}]},{"type":"text","value":"."}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:articles:migrate-truenas-from-core-to-scale.md","_source":"content","_file":"articles/migrate-truenas-from-core-to-scale.md","_stem":"articles/migrate-truenas-from-core-to-scale","_extension":"md"},{"_path":"/articles/nuxt-content-rss-feed","_dir":"articles","_draft":false,"_partial":false,"_locale":"","title":"How To Add an RSS Feed to a Nuxt Website","description":"If you are a user of Nuxt Content and you wish to configure an RSS feed for your website, it's a surprisingly straight forward process! In this article, we will walk through the code changes required to host an RSS feed for both a statically generated, and Universal Nuxt application.","draft":false,"date":"2024-01-06","tags":["nuxt","rss"],"categories":["programming"],"cover_image":"/images/nuxt-content-rss-feed.jpg","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"If you are a user of "},{"type":"element","tag":"a","props":{"href":"https://content.nuxt.com/","rel":["nofollow"]},"children":[{"type":"text","value":"Nuxt Content"}]},{"type":"text","value":" and you wish to configure an RSS feed for your website, it's a surprisingly straight forward process! In this article, we will walk through the code changes required to host an RSS feed for both a statically generated, and Universal Nuxt application."}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"If you are a user of "},{"type":"element","tag":"a","props":{"href":"https://content.nuxt.com/","rel":["nofollow"]},"children":[{"type":"text","value":"Nuxt Content"}]},{"type":"text","value":" and you wish to configure an RSS feed for your website, it's a surprisingly straight forward process! In this article, we will walk through the code changes required to host an RSS feed for both a statically generated, and Universal Nuxt application."}]},{"type":"element","tag":"h2","props":{"id":"preface"},"children":[{"type":"text","value":"Preface"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"In version 2 of Nuxt, the community module, "},{"type":"element","tag":"a","props":{"href":"https://github.com/nuxt-community/feed-module","rel":["nofollow"]},"children":[{"type":"text","value":"nuxt-community/feed-module"}]},{"type":"text","value":" was a popular choice for adding an RSS feed to your website. However, there has been an unresolved "},{"type":"element","tag":"a","props":{"href":"https://github.com/nuxt-community/feed-module/issues/106","rel":["nofollow"]},"children":[{"type":"text","value":"open issue"}]},{"type":"text","value":" since April 1st, 2022 to add support for Nuxt v3. Thankfully, implementing this feature without a module is relatively straight forward."}]},{"type":"element","tag":"h2","props":{"id":"instructions"},"children":[{"type":"text","value":"Instructions"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"First, install the "},{"type":"element","tag":"a","props":{"href":"https://www.npmjs.com/package/feed","rel":["nofollow"]},"children":[{"type":"text","value":"feed"}]},{"type":"text","value":" library into your project:"}]},{"type":"element","tag":"pre","props":{"className":"language-shell shiki shiki-themes github-light","code":"npm i -D feed\n","language":"shell","meta":"","style":""},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line","line":1},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"npm"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" i"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" -D"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" feed\n"}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Then, create a "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"server/"}]},{"type":"text","value":" folder in your project if it does not already exist, and create a file named "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"server/routes/atom.ts"}]},{"type":"text","value":"."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Here, we will leverage the "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"feed"}]},{"type":"text","value":" library and construct an XML representation of our Nuxt content. As you can see, we first define our "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"feed"}]},{"type":"text","value":" with metadata associated with our RSS feed. This will be used by RSS readers to provide context to the end user. Then, we query our Nuxt content with "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"serverQueryContent"}]},{"type":"text","value":" and append a "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"feed.addItem"}]},{"type":"text","value":" for each article."}]},{"type":"element","tag":"pre","props":{"className":"language-ts shiki shiki-themes github-light","code":"import { serverQueryContent } from '#content/server';\nimport { Feed } from 'feed';\n\nconst BASE_URL = \"https://mywebsite.com\"\nconst AUTHOR_NAME = \"Firstname Lastname\"\n\nexport default defineEventHandler(async (event) => {\n\n const feed = new Feed({\n title: \"My Title\",\n description: \"My Description\",\n id: BASE_URL,\n link: BASE_URL,\n language: \"en\",\n image: `${BASE_URL}/images/placeholder.png`,\n favicon: `${BASE_URL}/favicon.ico`,\n copyright: `All rights reserved ${new Date().getFullYear()}, ${AUTHOR_NAME}`,\n updated: new Date(),\n generator: \"Nuxt static site generation + Feed for Node.js\",\n feedLinks: {\n atom: `${BASE_URL}/atom`\n },\n author: {\n name: AUTHOR_NAME,\n }\n });\n\n const articles = await serverQueryContent(event).find();\n\n articles.forEach((article) => {\n feed.addItem({\n title: article.title ? article.title : \"Missing Title\",\n id: article._path,\n link: `${BASE_URL}${article._path}`,\n description: article.description,\n author: [\n {\n name: AUTHOR_NAME,\n },\n ],\n date: new Date(article.date),\n image: article.cover_image ? `${BASE_URL}/${article.cover_image}` : undefined\n });\n });\n\n return feed.atom1();\n});\n","language":"ts","meta":"","style":""},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line","line":1},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" { serverQueryContent } "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" '#content/server'"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":";\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":2},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" { Feed } "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" 'feed'"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":";\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":3},"children":[{"type":"element","tag":"span","props":{"emptyLinePlaceholder":true},"children":[{"type":"text","value":"\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":4},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" BASE_URL"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":" ="}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" \"https://mywebsite.com\"\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":5},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" AUTHOR_NAME"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":" ="}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" \"Firstname Lastname\"\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":6},"children":[{"type":"element","tag":"span","props":{"emptyLinePlaceholder":true},"children":[{"type":"text","value":"\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":7},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":"export"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":" default"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":" defineEventHandler"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":"async"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#E36209"},"children":[{"type":"text","value":"event"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" {\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":8},"children":[{"type":"element","tag":"span","props":{"emptyLinePlaceholder":true},"children":[{"type":"text","value":"\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":9},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":" const"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" feed"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":" ="}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":" new"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":" Feed"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"({\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":10},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" title: "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":"\"My Title\""}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":",\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":11},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" description: "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":"\"My Description\""}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":",\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":12},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" id: "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":"BASE_URL"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":",\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":13},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" link: "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":"BASE_URL"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":",\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":14},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" language: "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":"\"en\""}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":",\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":15},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" image: "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":"`${"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":"BASE_URL"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":"}/images/placeholder.png`"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":",\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":16},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" favicon: "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":"`${"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":"BASE_URL"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":"}/favicon.ico`"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":",\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":17},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" copyright: "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":"`All rights reserved ${"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":" Date"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":"()."}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"getFullYear"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":"()"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":"}, ${"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":"AUTHOR_NAME"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":"}`"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":",\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":18},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" updated: "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":" Date"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"(),\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":19},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" generator: "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":"\"Nuxt static site generation + Feed for Node.js\""}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":",\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":20},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" feedLinks: {\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":21},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" atom: "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":"`${"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":"BASE_URL"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":"}/atom`\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":22},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" },\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":23},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" author: {\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":24},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" name: "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":"AUTHOR_NAME"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":",\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":25},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" }\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":26},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" });\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":27},"children":[{"type":"element","tag":"span","props":{"emptyLinePlaceholder":true},"children":[{"type":"text","value":"\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":28},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":" const"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" articles"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":" ="}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":" await"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":" serverQueryContent"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"(event)."}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"find"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"();\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":29},"children":[{"type":"element","tag":"span","props":{"emptyLinePlaceholder":true},"children":[{"type":"text","value":"\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":30},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" articles."}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"forEach"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"(("}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#E36209"},"children":[{"type":"text","value":"article"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" {\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":31},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" feed."}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"addItem"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"({\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":32},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" title: article.title "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":"?"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" article.title "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" \"Missing Title\""}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":",\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":33},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" id: article._path,\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":34},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" link: "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":"`${"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":"BASE_URL"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":"}${"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"article"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"_path"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":"}`"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":",\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":35},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" description: article.description,\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":36},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" author: [\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":37},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" {\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":38},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" name: "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":"AUTHOR_NAME"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":",\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":39},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" },\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":40},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" ],\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":41},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" date: "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":" Date"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"(article.date),\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":42},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" image: article.cover_image "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":"?"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" `${"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":"BASE_URL"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":"}/${"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"article"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"cover_image"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":"}`"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":" :"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" undefined\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":43},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" });\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":44},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" });\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":45},"children":[{"type":"element","tag":"span","props":{"emptyLinePlaceholder":true},"children":[{"type":"text","value":"\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":46},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":" return"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" feed."}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"atom1"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"();\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":47},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"});\n"}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"And that's just about it! Except, if you are statically generating your website with the "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"nuxt generate"}]},{"type":"text","value":" command, you will need to configure this server-side route to be pre-rendered on site generation. This is as simple as adding a "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"nitro"}]},{"type":"text","value":" "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"prerender"}]},{"type":"text","value":" definition in your "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"nuxt.config.ts"}]},{"type":"text","value":" file, like so:"}]},{"type":"element","tag":"pre","props":{"className":"language-ts shiki shiki-themes github-light","code":"nitro: {\n prerender: {\n routes: ['/atom']\n }\n}\n","language":"ts","meta":"","style":""},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line","line":1},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"nitro"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":": {\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":2},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":" prerender"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":": {\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":3},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":" routes"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":": ["}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":"'/atom'"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"]\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":4},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" }\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":5},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"}\n"}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"bonus"},"children":[{"type":"text","value":"Bonus"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"You may also be interested in adding a "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"sitemap.xml"}]},{"type":"text","value":" to your website. This can be done in almost an identical fashion!"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Install the dependency:"}]},{"type":"element","tag":"pre","props":{"className":"language-shell shiki shiki-themes github-light","code":"npm i -D sitemap\n","language":"shell","meta":"","style":""},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line","line":1},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"npm"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" i"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" -D"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" sitemap\n"}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Create a route at "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"server/routes/sitemap.xml.ts"}]},{"type":"text","value":":"}]},{"type":"element","tag":"pre","props":{"className":"language-ts shiki shiki-themes github-light","code":"import { serverQueryContent } from '#content/server';\nimport { SitemapStream, streamToPromise } from 'sitemap';\n\nexport default defineEventHandler(async (event) => {\n const articles = await serverQueryContent(event).find();\n\n const sitemap = new SitemapStream({ hostname: 'https://my-website.com/' });\n\n // Add non nuxt content endpoints here\n sitemap.write({ url: '/' });\n sitemap.write({ url: '/articles' });\n\n // Dynamically generate routes for Nuxt markdown content\n articles.forEach((article) => sitemap.write({ url: article._path, changefreq: 'monthly' }));\n sitemap.end();\n\n return (await streamToPromise(sitemap));\n});\n","language":"ts","meta":"","style":""},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line","line":1},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" { serverQueryContent } "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" '#content/server'"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":";\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":2},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" { SitemapStream, streamToPromise } "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" 'sitemap'"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":";\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":3},"children":[{"type":"element","tag":"span","props":{"emptyLinePlaceholder":true},"children":[{"type":"text","value":"\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":4},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":"export"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":" default"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":" defineEventHandler"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":"async"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#E36209"},"children":[{"type":"text","value":"event"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" {\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":5},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":" const"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" articles"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":" ="}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":" await"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":" serverQueryContent"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"(event)."}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"find"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"();\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":6},"children":[{"type":"element","tag":"span","props":{"emptyLinePlaceholder":true},"children":[{"type":"text","value":"\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":7},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":" const"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" sitemap"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":" ="}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":" new"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":" SitemapStream"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"({ hostname: "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":"'https://my-website.com/'"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" });\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":8},"children":[{"type":"element","tag":"span","props":{"emptyLinePlaceholder":true},"children":[{"type":"text","value":"\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":9},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6A737D"},"children":[{"type":"text","value":" // Add non nuxt content endpoints here\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":10},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" sitemap."}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"write"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"({ url: "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":"'/'"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" });\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":11},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" sitemap."}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"write"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"({ url: "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":"'/articles'"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" });\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":12},"children":[{"type":"element","tag":"span","props":{"emptyLinePlaceholder":true},"children":[{"type":"text","value":"\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":13},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6A737D"},"children":[{"type":"text","value":" // Dynamically generate routes for Nuxt markdown content\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":14},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" articles."}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"forEach"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"(("}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#E36209"},"children":[{"type":"text","value":"article"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" sitemap."}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"write"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"({ url: article._path, changefreq: "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":"'monthly'"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" }));\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":15},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" sitemap."}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"end"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"();\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":16},"children":[{"type":"element","tag":"span","props":{"emptyLinePlaceholder":true},"children":[{"type":"text","value":"\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":17},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":" return"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":" streamToPromise"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"(sitemap));\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":18},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"});\n"}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"And add the "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"prerender"}]},{"type":"text","value":" entry in your "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"nuxt.config.ts"}]},{"type":"text","value":":"}]},{"type":"element","tag":"pre","props":{"className":"language-ts shiki shiki-themes github-light","code":"nitro: {\n prerender: {\n routes: ['/sitemap.xml', '/atom']\n }\n}\n","language":"ts","meta":"","style":""},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line","line":1},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"nitro"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":": {\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":2},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":" prerender"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":": {\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":3},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":" routes"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":": ["}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":"'/sitemap.xml'"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":"'/atom'"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"]\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":4},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" }\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":5},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"}\n"}]}]}]}]},{"type":"element","tag":"style","props":{},"children":[{"type":"text","value":"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[{"id":"preface","depth":2,"text":"Preface"},{"id":"instructions","depth":2,"text":"Instructions"},{"id":"bonus","depth":2,"text":"Bonus"}]}},"_type":"markdown","_id":"content:articles:nuxt-content-rss-feed.md","_source":"content","_file":"articles/nuxt-content-rss-feed.md","_stem":"articles/nuxt-content-rss-feed","_extension":"md"},{"_path":"/articles/nuxt-v3-migration","_dir":"articles","_draft":false,"_partial":false,"_locale":"","title":"This Website Has Been Migrated to Nuxt 3 🎉","description":"This website has been migrated to the latest version of the Nuxt web framework, and with it comes all of the exciting goodies that the Vue and Nuxt teams have been concocting over the past few years.\nNot to mention, all of the great plugins in the Vue ecosystem!","date":"2022-12-31","tags":["nuxt"],"categories":["web"],"excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This website has been migrated to the latest version of the Nuxt web framework, and with it comes all of the exciting goodies that the Vue and Nuxt teams have been concocting over the past few years.\nNot to mention, all of the great plugins in the Vue ecosystem!"}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This website has been migrated to the latest version of the Nuxt web framework, and with it comes all of the exciting goodies that the Vue and Nuxt teams have been concocting over the past few years.\nNot to mention, all of the great plugins in the Vue ecosystem!"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"If you're curious what changes were required to make the migration, you can check out "},{"type":"element","tag":"a","props":{"href":"https://github.com/cmpadden/cmpadden.github.io/pull/3","rel":["nofollow"]},"children":[{"type":"text","value":"pull request #3"}]},{"type":"text","value":" in the GitHub repository."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"img","props":{"alt":"Screenshot of Nuxt Migration Pull Request","src":"/images/nuxt-migration-pr.png"},"children":[]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"While the documentation for making this migration is great, there were many breaking changes, and the overall process was quite tedious.\nFor this reason, I opted to generate a new project entirely, and port existing code to this clean slate.\nI believe that this resulted in a project with a bit less cruft."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"The most valuable resources for making these changes include:"}]},{"type":"element","tag":"ul","props":{},"children":[{"type":"element","tag":"li","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://nuxt.com/docs/migration/overview","rel":["nofollow"]},"children":[{"type":"text","value":"The Nuxt Migration Guide"}]}]},{"type":"element","tag":"li","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://nuxt.com/docs/getting-started/introduction","rel":["nofollow"]},"children":[{"type":"text","value":"The Nuxt Framework Guide"}]}]},{"type":"element","tag":"li","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://tailwindcss.nuxt.dev/","rel":["nofollow"]},"children":[{"type":"text","value":"Nuxt Tailwind Module Documentation"}]}]},{"type":"element","tag":"li","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://content.nuxtjs.org/","rel":["nofollow"]},"children":[{"type":"text","value":"Nuxt Content Module Documentation"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Part of the delay for doing this upgrade was in waiting for module developers to support this major release.\nI'm super thankful for all of the hard work they've don, and I'm excited to explore all of the new features available!\nI just hope that the breaking changes in this release don't cause too much fracturing of the community, as it does feel like déjà vu of Python 2 and 3."}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:articles:nuxt-v3-migration.md","_source":"content","_file":"articles/nuxt-v3-migration.md","_stem":"articles/nuxt-v3-migration","_extension":"md"},{"_path":"/articles/persistent-archlinux-usb","_dir":"articles","_draft":false,"_partial":false,"_locale":"","title":"Create a Persistent Arch Linux Bootable USB with Vagrant","description":"When installing a linux distribution, it is common for the instructions to have\nthe user create a bootable USB, boot from the device, and proceed with the\ninstallation procedure from that live medium. However, this blog post will\noutline an alternative approach where a virtual machine created with Vagrant\nwill be used in favor of the live medium.","date":"2020-01-09","draft":false,"tags":["vagrant","archlinux"],"categories":["linux"],"excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"When installing a linux distribution, it is common for the instructions to have\nthe user create a bootable USB, boot from the device, and proceed with the\ninstallation procedure from that live medium. However, this blog post will\noutline an alternative approach where a virtual machine created with Vagrant\nwill be used in favor of the live medium."}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"When installing a linux distribution, it is common for the instructions to have\nthe user create a bootable USB, boot from the device, and proceed with the\ninstallation procedure from that live medium. However, this blog post will\noutline an alternative approach where a virtual machine created with Vagrant\nwill be used in favor of the live medium."}]},{"type":"element","tag":"h1","props":{"id":"preface"},"children":[{"type":"text","value":"Preface"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"The original intention was to use Docker for this process -- leveraging the\n"},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"--device"}]},{"type":"text","value":" flag and mounting the target USB device in the Docker container,\nbut the underlying hypervisor in Docker Desktop for Mac does not support this.\n"},{"type":"element","tag":"sup","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://docs.docker.com/docker-for-mac/docker-toolbox/","rel":["nofollow"]},"children":[{"type":"text","value":"1"}]},{"type":"text","value":" "},{"type":"element","tag":"a","props":{"href":"https://github.com/moby/hyperkit","rel":["nofollow"]},"children":[{"type":"text","value":"2"}]},{"type":"text","value":" "},{"type":"element","tag":"a","props":{"href":"https://github.com/docker/for-mac/issues/900","rel":["nofollow"]},"children":[{"type":"text","value":"3"}]}]},{"type":"text","value":" While there are workarounds using Docker\nMachine, Vagrant felt like the path of least resistance."}]},{"type":"element","tag":"h1","props":{"id":"instructions"},"children":[{"type":"text","value":"Instructions"}]},{"type":"element","tag":"h2","props":{"id":"create-an-arch-linux-virtual-machine-with-vagrant"},"children":[{"type":"text","value":"Create an Arch Linux Virtual Machine with Vagrant"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Get the latest Arch Linux image "},{"type":"element","tag":"sup","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://app.vagrantup.com/archlinux/boxes/archlinux","rel":["nofollow"]},"children":[{"type":"text","value":"4"}]}]},{"type":"text","value":" from the Vagrant Cloud Box\nCatalog."}]},{"type":"element","tag":"pre","props":{"code":"vagrant box add archlinux/archlinux\n","language":"bash","meta":"","className":"language-bash shiki shiki-themes github-light","style":""},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line","line":1},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"vagrant"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" box"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" add"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" archlinux/archlinux\n"}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Determine the USB vendor information for the thumb-drive that we will\npass-through to the virtual machine. Using the "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"VBoxManage"}]},{"type":"text","value":" utility that comes\nwith Virtual Box, list the devices, and make note of the Vendor and Product ID."}]},{"type":"element","tag":"pre","props":{"code":" VBoxManage list usbhost\n","language":"bash","meta":"","className":"language-bash shiki shiki-themes github-light","style":""},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line","line":1},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":" VBoxManage"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" list"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" usbhost\n"}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Create a "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"Vagrantfile"}]},{"type":"text","value":" with "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"archlinx/archlinux"}]},{"type":"text","value":" as the target box, and the USB\ndevice information that is passed through. "},{"type":"element","tag":"sup","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://antonyjepson.wordpress.com/2012/01/26/quickly-attaching-usb-devices-to-virtualbox-guests-using-vboxmanage/","rel":["nofollow"]},"children":[{"type":"text","value":"5"}]},{"type":"text","value":" "},{"type":"element","tag":"a","props":{"href":"https://gist.github.com/dscape/7d829c0c116ef419f963","rel":["nofollow"]},"children":[{"type":"text","value":"6"}]}]},{"type":"text","value":" Vagrant\noffers a handy customization parameter "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"vb.customize"}]},{"type":"text","value":" that calls the\n"},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"VBoxManage"}]},{"type":"text","value":" command under-the-hood, allowing one to enable the guest machine\nto access the host machine's USB devices."}]},{"type":"element","tag":"pre","props":{"code":"# -*- mode: ruby -*-\n# vi: set ft=ruby :\n\nVagrant.configure(\"2\") do |config|\n config.vm.box = \"archlinux/archlinux\"\n config.vm.provider \"virtualbox\" do |vb|\n vb.name = \"archlinux\"\n vb.customize ['modifyvm', :id, '--usb', 'on']\n vb.customize ['usbfilter', 'add', '1', '--target', :id, '--name', 'SanDisk Ultra Fit', '--vendorid', '0x0781', '--productid', '0x5583']\n end\nend\n","language":"txt","meta":"","className":"language-txt shiki shiki-themes github-light","style":""},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line","line":1},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":"# -*- mode: ruby -*-\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":2},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":"# vi: set ft=ruby :\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":3},"children":[{"type":"element","tag":"span","props":{"emptyLinePlaceholder":true},"children":[{"type":"text","value":"\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":4},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":"Vagrant.configure(\"2\") do |config|\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":5},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":" config.vm.box = \"archlinux/archlinux\"\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":6},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":" config.vm.provider \"virtualbox\" do |vb|\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":7},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":" vb.name = \"archlinux\"\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":8},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":" vb.customize ['modifyvm', :id, '--usb', 'on']\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":9},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":" vb.customize ['usbfilter', 'add', '1', '--target', :id, '--name', 'SanDisk Ultra Fit', '--vendorid', '0x0781', '--productid', '0x5583']\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":10},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":" end\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":11},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":"end\n"}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"When virtual machine is brought up, the "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"usbfilter"}]},{"type":"text","value":" is applied, and the guest\nis able to access to the host machine's USB device that was specified in the\nfilter."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Start the machine, "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"ssh"}]},{"type":"text","value":" into the guest, and list the devices to confirm that\nthe USB device is available (see: "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"/dev/sdb"}]},{"type":"text","value":")."}]},{"type":"element","tag":"pre","props":{"code":"$ vagrant up\n$ vagrant ssh\n[vagrant@archlinux ~]$ lsblk\nNAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT\nsda 8:0 0 20G 0 disk\n├─sda1 8:1 0 1.9G 0 part [SWAP]\n└─sda2 8:2 0 18.1G 0 part /\nsdb 8:16 1 28.7G 0 disk\n└─sdb1 8:17 1 8G 0 part\n","language":"bash","meta":"","className":"language-bash shiki shiki-themes github-light","style":""},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line","line":1},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" vagrant"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" up\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":2},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" vagrant"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" ssh\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":3},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"[vagrant@archlinux "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":"~"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"]$ lsblk\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":4},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"NAME"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" MAJ:MIN"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" RM"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" SIZE"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" RO"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" TYPE"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" MOUNTPOINT\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":5},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"sda"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" 8:0"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" 0"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" 20G"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" 0"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" disk\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":6},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"├─sda1"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" 8:1"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" 0"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" 1.9G"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" 0"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" part"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" [SWAP]\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":7},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"└─sda2"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" 8:2"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" 0"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" 18.1G"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" 0"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" part"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" /\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":8},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"sdb"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" 8:16"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" 1"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" 28.7G"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" 0"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" disk\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":9},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"└─sdb1"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" 8:17"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" 1"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" 8G"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" 0"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" part\n"}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"install-arch-linux-on-the-usb-drive"},"children":[{"type":"text","value":"Install Arch Linux on the USB Drive"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"The "},{"type":"element","tag":"a","props":{"href":"https://wiki.archlinux.org/index.php/Installation_guide","rel":["nofollow"]},"children":[{"type":"text","value":"Arch Linux Installation Guide"}]},{"type":"text","value":" outlines the installation procedure in\ngreat detail -- the following steps follow this closely with a few alteration\ndue to installing onto removable media."}]},{"type":"element","tag":"h3","props":{"id":"partition-the-disk-uefi-with-gpt"},"children":[{"type":"text","value":"Partition the Disk (UEFI with GPT)"}]},{"type":"element","tag":"pre","props":{"code":"[root@archlinux ~]# fdisk /dev/sdb\n","language":"bash","meta":"","className":"language-bash shiki shiki-themes github-light","style":""},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line","line":1},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"[root@archlinux "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":"~"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"]# fdisk /dev/sdb\n"}]}]}]}]},{"type":"element","tag":"pre","props":{"code":"Command (m for help): p\nDisk /dev/sdb: 28.66 GiB, 30752636928 bytes, 60063744 sectors\nDisk model: Ultra Fit\nUnits: sectors of 1 * 512 = 512 bytes\nSector size (logical/physical): 512 bytes / 512 bytes\nI/O size (minimum/optimal): 512 bytes / 512 bytes\nDisklabel type: gpt\nDisk identifier: E1D6C445-1B79-AB4D-A442-FA4AD6DF4ECC\n\nDevice Start End Sectors Size Type\n/dev/sdb1 2048 1050623 1048576 512M EFI System\n/dev/sdb2 1050624 60063710 59013087 28.1G Linux filesystem\n\nFilesystem/RAID signature on partition 1 will be wiped.\n","language":"txt","meta":"","className":"language-txt shiki shiki-themes github-light","style":""},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line","line":1},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":"Command (m for help): p\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":2},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":"Disk /dev/sdb: 28.66 GiB, 30752636928 bytes, 60063744 sectors\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":3},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":"Disk model: Ultra Fit\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":4},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":"Units: sectors of 1 * 512 = 512 bytes\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":5},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":"Sector size (logical/physical): 512 bytes / 512 bytes\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":6},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":"I/O size (minimum/optimal): 512 bytes / 512 bytes\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":7},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":"Disklabel type: gpt\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":8},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":"Disk identifier: E1D6C445-1B79-AB4D-A442-FA4AD6DF4ECC\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":9},"children":[{"type":"element","tag":"span","props":{"emptyLinePlaceholder":true},"children":[{"type":"text","value":"\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":10},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":"Device Start End Sectors Size Type\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":11},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":"/dev/sdb1 2048 1050623 1048576 512M EFI System\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":12},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":"/dev/sdb2 1050624 60063710 59013087 28.1G Linux filesystem\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":13},"children":[{"type":"element","tag":"span","props":{"emptyLinePlaceholder":true},"children":[{"type":"text","value":"\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":14},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":"Filesystem/RAID signature on partition 1 will be wiped.\n"}]}]}]}]},{"type":"element","tag":"h3","props":{"id":"format-the-partitions"},"children":[{"type":"text","value":"Format the Partitions"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"The UEFI specification mandates support for FAT file-systems, and FAT32 is\nrecommended for removable media. "},{"type":"element","tag":"sup","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://wiki.archlinux.org/index.php/EFI_system_partition#Format_the_partition","rel":["nofollow"]},"children":[{"type":"text","value":"7"}]}]}]},{"type":"element","tag":"pre","props":{"code":"[root@archlinux ~]# pacman -Sy dosfstools\n[root@archlinux ~]# mkfs.fat -F32 /dev/sdb1\n","language":"bash","meta":"","className":"language-bash shiki shiki-themes github-light","style":""},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line","line":1},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"[root@archlinux "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":"~"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"]# pacman -Sy dosfstools\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":2},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"[root@archlinux "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":"~"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"]# mkfs.fat -F32 /dev/sdb1\n"}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"As for the root partition, it is recommended to use "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"ext4"}]},{"type":"text","value":" without a journal to\nreduce the reads and writes to the file-system as this is detrimental to the\nflash-based USB drive. "},{"type":"element","tag":"sup","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://wiki.archlinux.org/index.php/Install_Arch_Linux_on_a_USB_key#Installation_tweaks","rel":["nofollow"]},"children":[{"type":"text","value":"8"}]}]}]},{"type":"element","tag":"pre","props":{"code":"[root@archlinux ~]# mkfs.ext4 -O \"^has_journal\" /dev/sdb2\n","language":"bash","meta":"","className":"language-bash shiki shiki-themes github-light","style":""},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line","line":1},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"[root@archlinux "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":"~"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"]# mkfs.ext4 -O "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":"\"^has_journal\""}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" /dev/sdb2\n"}]}]}]}]},{"type":"element","tag":"h3","props":{"id":"mount-the-partitions-and-bootstrap-the-environment"},"children":[{"type":"text","value":"Mount the Partitions and Bootstrap the Environment"}]},{"type":"element","tag":"pre","props":{"code":"[root@archlinux ~]# mount /dev/sdb2 /mnt\n[root@archlinux ~]# mkdir -p /mnt/boot/efi\n[root@archlinux ~]# mount /dev/sdb1 /mnt/boot/efi\n","language":"bash","meta":"","className":"language-bash shiki shiki-themes github-light","style":""},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line","line":1},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"[root@archlinux "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":"~"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"]# mount /dev/sdb2 /mnt\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":2},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"[root@archlinux "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":"~"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"]# mkdir -p /mnt/boot/efi\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":3},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"[root@archlinux "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":"~"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"]# mount /dev/sdb1 /mnt/boot/efi\n"}]}]}]}]},{"type":"element","tag":"pre","props":{"code":"[root@archlinux ~]# pacman -S arch-install-scripts\n[root@archlinux ~]# pacstrap /mnt base linux linux-firmware\n[root@archlinux ~]# genfstab -U /mnt >> /mnt/etc/fstab\n","language":"bash","meta":"","className":"language-bash shiki shiki-themes github-light","style":""},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line","line":1},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"[root@archlinux "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":"~"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"]# pacman -S arch-install-scripts\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":2},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"[root@archlinux "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":"~"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"]# pacstrap /mnt base linux linux-firmware\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":3},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"[root@archlinux "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":"~"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"]# genfstab -U /mnt "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":">>"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" /mnt/etc/fstab\n"}]}]}]}]},{"type":"element","tag":"h3","props":{"id":"configure-the-new-environment"},"children":[{"type":"text","value":"Configure the New Environment"}]},{"type":"element","tag":"pre","props":{"code":"[root@archlinux ~]# arch-chroot /mnt\n"},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"[root@archlinux ~]# arch-chroot /mnt\n"}]}]},{"type":"element","tag":"pre","props":{"code":"[root@archlinux /]# ln -sf /usr/share/zoneinfo/US/Eastern /etc/localtime\n[root@archlinux /]# hwclock --systohc\n[root@archlinux /]# sed -i 's/#en_US.UTF-8/en_US.UTF-8/' /etc/locale.gen\n[root@archlinux /]# locale-gen\n[root@archlinux /]# echo \"LANG=en_US.UTF-8\" > /etc/locale.conf\n"},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"[root@archlinux /]# ln -sf /usr/share/zoneinfo/US/Eastern /etc/localtime\n[root@archlinux /]# hwclock --systohc\n[root@archlinux /]# sed -i 's/#en_US.UTF-8/en_US.UTF-8/' /etc/locale.gen\n[root@archlinux /]# locale-gen\n[root@archlinux /]# echo \"LANG=en_US.UTF-8\" > /etc/locale.conf\n"}]}]},{"type":"element","tag":"pre","props":{"code":"[root@archlinux /]# hostnamectl set-hostname usb\n[root@archlinux /]# echo \"127.0.0.1 localhost\" >> /etc/hosts\n[root@archlinux /]# echo \"::1 localhost\" >> /etc/hosts\n"},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"[root@archlinux /]# hostnamectl set-hostname usb\n[root@archlinux /]# echo \"127.0.0.1 localhost\" >> /etc/hosts\n[root@archlinux /]# echo \"::1 localhost\" >> /etc/hosts\n"}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Note, one difference here from a standard installation is that the\n"},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"--removable"}]},{"type":"text","value":" flag is specified when installing the GRUB bootloader.\n"},{"type":"element","tag":"sup","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://wiki.archlinux.org/index.php/GRUB#UEFI_systems","rel":["nofollow"]},"children":[{"type":"text","value":"10"}]}]}]},{"type":"element","tag":"pre","props":{"code":"[root@archlinux /]# pacman -S grub\n[root@archlinux /]# grub-install --target=x86_64-efi --efi-directory=/boot/efi --removable --recheck\n[root@usb /]# grub-mkconfig -o /boot/grub/grub.cfg\n"},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"[root@archlinux /]# pacman -S grub\n[root@archlinux /]# grub-install --target=x86_64-efi --efi-directory=/boot/efi --removable --recheck\n[root@usb /]# grub-mkconfig -o /boot/grub/grub.cfg\n"}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Shutdown the virtual machine, restart the host machine, and boot the newly\ncreated Arch Linux thumb-drive!"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"🎉"}]},{"type":"element","tag":"h2","props":{"id":"side-note"},"children":[{"type":"text","value":"Side-note"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"It was attempted to use the "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"controlvm usbattach"}]},{"type":"text","value":" command to pass the USB\ndevice to the guest machine, but this did not work as it expects the virtual\nmachine to already be running, and the "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"vb.customize"}]},{"type":"text","value":" option runs prior to\nbooting the machine. "},{"type":"element","tag":"sup","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://www.vagrantup.com/docs/virtualbox/configuration.html#vboxmanage-customizations","rel":["nofollow"]},"children":[{"type":"text","value":"11"}]}]}]},{"type":"element","tag":"pre","props":{"code":"Command: [\"controlvm\", \"060a716b-1965-49e2-bc56-12beed5df716\", \"usbattach36fc9e60-c465-11cf-8056-444553540000\"]\n\nStderr: VBoxManage.exe: error: Machine '060a716b-1965-49e2-bc56-12beed5df716' is not currently running.\n","language":"txt","meta":"","className":"language-txt shiki shiki-themes github-light","style":""},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line","line":1},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":"Command: [\"controlvm\", \"060a716b-1965-49e2-bc56-12beed5df716\", \"usbattach36fc9e60-c465-11cf-8056-444553540000\"]\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":2},"children":[{"type":"element","tag":"span","props":{"emptyLinePlaceholder":true},"children":[{"type":"text","value":"\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":3},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":"Stderr: VBoxManage.exe: error: Machine '060a716b-1965-49e2-bc56-12beed5df716' is not currently running.\n"}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"references"},"children":[{"type":"text","value":"References"}]},{"type":"element","tag":"ol","props":{},"children":[{"type":"element","tag":"li","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://docs.docker.com/docker-for-mac/docker-toolbox/","rel":["nofollow"]},"children":[{"type":"text","value":"Docker Desktop on Mac vs. Docker Toolbox"}]}]},{"type":"element","tag":"li","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://github.com/moby/hyperkit","rel":["nofollow"]},"children":[{"type":"text","value":"GitHub - HyperKit"}]}]},{"type":"element","tag":"li","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://github.com/docker/for-mac/issues/900","rel":["nofollow"]},"children":[{"type":"text","value":"GitHub - Docker for Mac - Issue #900"}]}]},{"type":"element","tag":"li","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://app.vagrantup.com/archlinux/boxes/archlinux","rel":["nofollow"]},"children":[{"type":"text","value":"Vagrant Cloud - Arch Linux"}]}]},{"type":"element","tag":"li","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://antonyjepson.wordpress.com/2012/01/26/quickly-attaching-usb-devices-to-virtualbox-guests-using-vboxmanage/","rel":["nofollow"]},"children":[{"type":"text","value":"Attaching USB Devices to VirtualBox Guests using VBoxManage"}]}]},{"type":"element","tag":"li","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://gist.github.com/dscape/7d829c0c116ef419f963","rel":["nofollow"]},"children":[{"type":"text","value":"GitHub Gist - Vagrant USB Filter"}]}]},{"type":"element","tag":"li","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://wiki.archlinux.org/index.php/EFI_system_partition#Format_the_partition","rel":["nofollow"]},"children":[{"type":"text","value":"Arch Linux Wiki - EFI System Partition - Format Partitions"}]}]},{"type":"element","tag":"li","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://wiki.archlinux.org/index.php/Install_Arch_Linux_on_a_USB_key#Installation_tweaks","rel":["nofollow"]},"children":[{"type":"text","value":"Arch Linux Wiki - Arch Linux on USB - Installation Tweaks"}]}]},{"type":"element","tag":"li","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://wiki.archlinux.org/index.php/Installation_guide","rel":["nofollow"]},"children":[{"type":"text","value":"Arch Linux Wiki - Installation Guide"}]}]},{"type":"element","tag":"li","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://wiki.archlinux.org/index.php/GRUB#UEFI_systems","rel":["nofollow"]},"children":[{"type":"text","value":"Arch Linux Wiki - GRUB - UEFI Systems"}]}]},{"type":"element","tag":"li","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://www.vagrantup.com/docs/virtualbox/configuration.html#vboxmanage-customizations","rel":["nofollow"]},"children":[{"type":"text","value":"Vagrant VBoxManage Customizations "}]}]}]},{"type":"element","tag":"style","props":{},"children":[{"type":"text","value":"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[{"id":"create-an-arch-linux-virtual-machine-with-vagrant","depth":2,"text":"Create an Arch Linux Virtual Machine with Vagrant"},{"id":"install-arch-linux-on-the-usb-drive","depth":2,"text":"Install Arch Linux on the USB Drive","children":[{"id":"partition-the-disk-uefi-with-gpt","depth":3,"text":"Partition the Disk (UEFI with GPT)"},{"id":"format-the-partitions","depth":3,"text":"Format the Partitions"},{"id":"mount-the-partitions-and-bootstrap-the-environment","depth":3,"text":"Mount the Partitions and Bootstrap the Environment"},{"id":"configure-the-new-environment","depth":3,"text":"Configure the New Environment"}]},{"id":"side-note","depth":2,"text":"Side-note"},{"id":"references","depth":2,"text":"References"}]}},"_type":"markdown","_id":"content:articles:persistent-archlinux-usb.md","_source":"content","_file":"articles/persistent-archlinux-usb.md","_stem":"articles/persistent-archlinux-usb","_extension":"md"},{"_path":"/articles/podcast-transcription-whispercpp","_dir":"articles","_draft":false,"_partial":false,"_locale":"","title":"Easily Transcribe Podcasts with Whisper.cpp","description":"If you've ever had the need to transcribe a podcast, lecture, or some other audio recording, it turns out it's surprisingly easy with the extremely impressive whisper.cpp project. This high-performance fork of OpenAI's Whisper can run on all sorts of hardware -- including my M1 Mac Mini. Let's walk through an example from start-to-finish of transcribing an episode of the Alter Everything podcast.","draft":false,"date":"2024-01-08","tags":["whisper.cpp","ml"],"categories":["programming"],"excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"If you've ever had the need to transcribe a podcast, lecture, or some other audio recording, it turns out it's surprisingly easy with the extremely impressive "},{"type":"element","tag":"a","props":{"href":"https://github.com/ggerganov/whisper.cpp","rel":["nofollow"]},"children":[{"type":"text","value":"whisper.cpp"}]},{"type":"text","value":" project. This high-performance fork of "},{"type":"element","tag":"a","props":{"href":"https://github.com/openai/whisper","rel":["nofollow"]},"children":[{"type":"text","value":"OpenAI's Whisper"}]},{"type":"text","value":" can run on all sorts of hardware -- including my M1 Mac Mini. Let's walk through an example from start-to-finish of transcribing an episode of the "},{"type":"element","tag":"a","props":{"href":"https://podcasts.apple.com/us/podcast/alter-everything/id1356137854","rel":["nofollow"]},"children":[{"type":"text","value":"Alter Everything"}]},{"type":"text","value":" podcast."}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"If you've ever had the need to transcribe a podcast, lecture, or some other audio recording, it turns out it's surprisingly easy with the extremely impressive "},{"type":"element","tag":"a","props":{"href":"https://github.com/ggerganov/whisper.cpp","rel":["nofollow"]},"children":[{"type":"text","value":"whisper.cpp"}]},{"type":"text","value":" project. This high-performance fork of "},{"type":"element","tag":"a","props":{"href":"https://github.com/openai/whisper","rel":["nofollow"]},"children":[{"type":"text","value":"OpenAI's Whisper"}]},{"type":"text","value":" can run on all sorts of hardware -- including my M1 Mac Mini. Let's walk through an example from start-to-finish of transcribing an episode of the "},{"type":"element","tag":"a","props":{"href":"https://podcasts.apple.com/us/podcast/alter-everything/id1356137854","rel":["nofollow"]},"children":[{"type":"text","value":"Alter Everything"}]},{"type":"text","value":" podcast."}]},{"type":"element","tag":"h2","props":{"id":"obtain-audio-files"},"children":[{"type":"text","value":"Obtain Audio File(s)"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"First, let's get the "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"wav"}]},{"type":"text","value":" file from YouTube using the "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"youtube-dl"}]},{"type":"text","value":" utility. It should be noted that "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"whisper.cpp"}]},{"type":"text","value":" expects "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"wav"}]},{"type":"text","value":" filetypes, and this utility defaults to "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"mp3"}]},{"type":"text","value":"."}]},{"type":"element","tag":"pre","props":{"code":" $ youtube-dl \\\n --extract-audio \\\n --audio-format wav \\\n --output podcast.wav \\\n \"https://www.youtube.com/watch?v=CoUN690wSYQ\"\n","language":"sh","meta":"","className":"language-sh shiki shiki-themes github-light","style":""},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line","line":1},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":" $"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" youtube-dl"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" \\\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":2},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" --extract-audio"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" \\\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":3},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" --audio-format"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" wav"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" \\\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":4},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" --output"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" podcast.wav"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" \\\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":5},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" \"https://www.youtube.com/watch?v=CoUN690wSYQ\"\n"}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This file has a 44.1 kHz sample rate, and "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"whisper.cpp"}]},{"type":"text","value":" expects 16 kHz, so let's go ahead and convert that."}]},{"type":"element","tag":"pre","props":{"code":" $ file podcast.wav\npodcast.wav: RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, stereo 44100 Hz\n\n $ ffmpeg -i podcast.wav -ar 16000 podcast-16khz.wav\n\n $ file podcast-16khz.wav\npodcast-16khz.wav: RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, stereo 16000 Hz\n\n# NOTE: it looks like it's possible to specify this conversion as a post-process as a\n# flag to the `youtube-dl` command -- I will explore this further next time...\n# youtube-dl --extract-audio --audio-quality 0 --audio-format mp3 --postprocessor-args \"-ar 44100\" %dl%\n","language":"sh","meta":"","className":"language-sh shiki shiki-themes github-light","style":""},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line","line":1},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":" $"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" file"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" podcast.wav\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":2},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"podcast.wav:"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" RIFF"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, stereo 44100 Hz\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":3},"children":[{"type":"element","tag":"span","props":{"emptyLinePlaceholder":true},"children":[{"type":"text","value":"\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":4},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":" $"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" ffmpeg"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" -i"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" podcast.wav"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" -ar"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" 16000"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" podcast-16khz.wav\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":5},"children":[{"type":"element","tag":"span","props":{"emptyLinePlaceholder":true},"children":[{"type":"text","value":"\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":6},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":" $"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" file"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" podcast-16khz.wav\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":7},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"podcast-16khz.wav:"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" RIFF"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, stereo 16000 Hz\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":8},"children":[{"type":"element","tag":"span","props":{"emptyLinePlaceholder":true},"children":[{"type":"text","value":"\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":9},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6A737D"},"children":[{"type":"text","value":"# NOTE: it looks like it's possible to specify this conversion as a post-process as a\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":10},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6A737D"},"children":[{"type":"text","value":"# flag to the `youtube-dl` command -- I will explore this further next time...\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":11},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6A737D"},"children":[{"type":"text","value":"# youtube-dl --extract-audio --audio-quality 0 --audio-format mp3 --postprocessor-args \"-ar 44100\" %dl%\n"}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"build-whispercpp-transcribe-audio"},"children":[{"type":"text","value":"Build "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"whisper.cpp"}]},{"type":"text","value":" & Transcribe Audio"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Then, let's get the latest version of "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"whisper.cpp"}]},{"type":"text","value":", download the English Whisper model, and build the example."}]},{"type":"element","tag":"pre","props":{"code":"# Clone the `whisper.cpp` repository\n $ git clone --depth 1 git@github.com:ggerganov/whisper.cpp && cd whisper.cpp\n\n# Download the English Whisper model in `ggml` format\n $ bash ./models/download-ggml-model.sh base.en\n\n# Build the main example\n $ make\n","language":"sh","meta":"","className":"language-sh shiki shiki-themes github-light","style":""},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line","line":1},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6A737D"},"children":[{"type":"text","value":"# Clone the `whisper.cpp` repository\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":2},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":" $"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" git"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" clone"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" --depth"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" 1"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" git@github.com:ggerganov/whisper.cpp"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" && "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":"cd"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" whisper.cpp\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":3},"children":[{"type":"element","tag":"span","props":{"emptyLinePlaceholder":true},"children":[{"type":"text","value":"\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":4},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6A737D"},"children":[{"type":"text","value":"# Download the English Whisper model in `ggml` format\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":5},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":" $"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" bash"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" ./models/download-ggml-model.sh"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" base.en\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":6},"children":[{"type":"element","tag":"span","props":{"emptyLinePlaceholder":true},"children":[{"type":"text","value":"\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":7},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6A737D"},"children":[{"type":"text","value":"# Build the main example\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":8},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":" $"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" make\n"}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"And finally, let's transcribe that podcast!"}]},{"type":"element","tag":"pre","props":{"code":" $ ./main \\\n -m ~/workspace/whisper.cpp/models/ggml-base.en.bin \\\n -f ~/Downloads/podcast-16khz.wav \\\n --output-vtt \\\n --output-file out\n\n# whisper_print_timings: load time = 114.71 ms\n# whisper_print_timings: fallbacks = 0 p / 0 h\n# whisper_print_timings: mel time = 692.20 ms\n# whisper_print_timings: sample time = 22278.10 ms / 27893 runs ( 0.80 ms per run)\n# whisper_print_timings: encode time = 10000.75 ms / 55 runs ( 181.83 ms per run)\n# whisper_print_timings: decode time = 331.77 ms / 54 runs ( 6.14 ms per run)\n# whisper_print_timings: batchd time = 45236.73 ms / 27566 runs ( 1.64 ms per run)\n# whisper_print_timings: prompt time = 1921.90 ms / 11832 runs ( 0.16 ms per run)\n# whisper_print_timings: total time = 80709.54 ms\n","language":"sh","meta":"","className":"language-sh shiki shiki-themes github-light","style":""},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line","line":1},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":" $"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" ./main"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" \\\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":2},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" -m"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" ~/workspace/whisper.cpp/models/ggml-base.en.bin"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" \\\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":3},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" -f"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" ~/Downloads/podcast-16khz.wav"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" \\\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":4},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" --output-vtt"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" \\\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":5},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" --output-file"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" out\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":6},"children":[{"type":"element","tag":"span","props":{"emptyLinePlaceholder":true},"children":[{"type":"text","value":"\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":7},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6A737D"},"children":[{"type":"text","value":"# whisper_print_timings: load time = 114.71 ms\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":8},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6A737D"},"children":[{"type":"text","value":"# whisper_print_timings: fallbacks = 0 p / 0 h\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":9},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6A737D"},"children":[{"type":"text","value":"# whisper_print_timings: mel time = 692.20 ms\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":10},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6A737D"},"children":[{"type":"text","value":"# whisper_print_timings: sample time = 22278.10 ms / 27893 runs ( 0.80 ms per run)\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":11},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6A737D"},"children":[{"type":"text","value":"# whisper_print_timings: encode time = 10000.75 ms / 55 runs ( 181.83 ms per run)\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":12},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6A737D"},"children":[{"type":"text","value":"# whisper_print_timings: decode time = 331.77 ms / 54 runs ( 6.14 ms per run)\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":13},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6A737D"},"children":[{"type":"text","value":"# whisper_print_timings: batchd time = 45236.73 ms / 27566 runs ( 1.64 ms per run)\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":14},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6A737D"},"children":[{"type":"text","value":"# whisper_print_timings: prompt time = 1921.90 ms / 11832 runs ( 0.16 ms per run)\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":15},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6A737D"},"children":[{"type":"text","value":"# whisper_print_timings: total time = 80709.54 ms\n"}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"A full podcast transcribed in ~80 seconds on an M1 Mac Mini -- not too bad!"}]},{"type":"element","tag":"pre","props":{"code":"# out.vtt\n\n00:00:00.000 --> 00:00:06.480\n >> Hi everyone. We recently launched a short engagement feedback survey for the Alter Everything\n\n00:00:06.480 --> 00:00:11.360\n podcast. Click the link in the episode description wherever you're listening to let us know what\n\n00:00:11.360 --> 00:00:16.320\n you think and help us improve our show.\n\n00:00:16.320 --> 00:00:21.200\n Welcome to Alter Everything, a podcast about data science and analytics culture. I'm Megan\n\n00:00:21.200 --> 00:00:26.440\n Dibble and today I'm talking with Nick Schrock, CTO and founder of Dagster Labs. We discussed\n\n00:00:26.440 --> 00:00:31.560\n data engineering trends, challenges in the field, why he started his company, and what\n\n00:00:31.560 --> 00:00:38.960\n makes him excited about the future of data engineering. Let's get started.\n\n00:00:38.960 --> 00:00:42.720\n >> Hi, Nick. It's great to have you on our show today. Thanks for being here.\n\n00:00:42.720 --> 00:00:43.920\n >> Thanks for having me.\n\n00:00:43.920 --> 00:00:48.280\n >> Yeah. Could you start off by giving an introduction to yourself for our listeners?\n\n00:00:48.280 --> 00:00:52.920\n >> Sure. My name is Nick Schrock. I'm the CTO and founder of Dagster Labs. There's the\n\n00:00:52.920 --> 00:00:59.520\n company behind Dagster, which is a data orchestration framework. Prior to doing this, I was an engineer\n\n00:00:59.520 --> 00:01:05.960\n at Facebook from 2009, 2017. While I was there, I found a team called product infrastructure\n\n00:01:05.960 --> 00:01:09.800\n whose goal was to make our application developers more efficient and productive, and a bunch\n\n00:01:09.800 --> 00:01:13.840\n of open source work came out of that actually, one of which was React, which I had nothing\n\n00:01:13.840 --> 00:01:18.040\n to do with, but actually the CEO of Dagster Labs co-created and I personally co-created\n\n00:01:18.040 --> 00:01:22.640\n GraphQL. So as I like to say, Pete and I were present at the creation of the full hipster\n\n00:01:22.640 --> 00:01:28.680\n stack. I moved on to Facebook in 2017, figuring out what to do next, and this data engineering\n\n00:01:28.680 --> 00:01:32.960\n and data orchestration problem really got me hooked actually quite soon after I left,\n\n00:01:32.960 --> 00:01:36.280\n and the rest is history. I'm sure we'll get into that more.\n"},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"# out.vtt\n\n00:00:00.000 --> 00:00:06.480\n >> Hi everyone. We recently launched a short engagement feedback survey for the Alter Everything\n\n00:00:06.480 --> 00:00:11.360\n podcast. Click the link in the episode description wherever you're listening to let us know what\n\n00:00:11.360 --> 00:00:16.320\n you think and help us improve our show.\n\n00:00:16.320 --> 00:00:21.200\n Welcome to Alter Everything, a podcast about data science and analytics culture. I'm Megan\n\n00:00:21.200 --> 00:00:26.440\n Dibble and today I'm talking with Nick Schrock, CTO and founder of Dagster Labs. We discussed\n\n00:00:26.440 --> 00:00:31.560\n data engineering trends, challenges in the field, why he started his company, and what\n\n00:00:31.560 --> 00:00:38.960\n makes him excited about the future of data engineering. Let's get started.\n\n00:00:38.960 --> 00:00:42.720\n >> Hi, Nick. It's great to have you on our show today. Thanks for being here.\n\n00:00:42.720 --> 00:00:43.920\n >> Thanks for having me.\n\n00:00:43.920 --> 00:00:48.280\n >> Yeah. Could you start off by giving an introduction to yourself for our listeners?\n\n00:00:48.280 --> 00:00:52.920\n >> Sure. My name is Nick Schrock. I'm the CTO and founder of Dagster Labs. There's the\n\n00:00:52.920 --> 00:00:59.520\n company behind Dagster, which is a data orchestration framework. Prior to doing this, I was an engineer\n\n00:00:59.520 --> 00:01:05.960\n at Facebook from 2009, 2017. While I was there, I found a team called product infrastructure\n\n00:01:05.960 --> 00:01:09.800\n whose goal was to make our application developers more efficient and productive, and a bunch\n\n00:01:09.800 --> 00:01:13.840\n of open source work came out of that actually, one of which was React, which I had nothing\n\n00:01:13.840 --> 00:01:18.040\n to do with, but actually the CEO of Dagster Labs co-created and I personally co-created\n\n00:01:18.040 --> 00:01:22.640\n GraphQL. So as I like to say, Pete and I were present at the creation of the full hipster\n\n00:01:22.640 --> 00:01:28.680\n stack. I moved on to Facebook in 2017, figuring out what to do next, and this data engineering\n\n00:01:28.680 --> 00:01:32.960\n and data orchestration problem really got me hooked actually quite soon after I left,\n\n00:01:32.960 --> 00:01:36.280\n and the rest is history. I'm sure we'll get into that more.\n"}]}]},{"type":"element","tag":"style","props":{},"children":[{"type":"text","value":"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[{"id":"obtain-audio-files","depth":2,"text":"Obtain Audio File(s)"},{"id":"build-whispercpp-transcribe-audio","depth":2,"text":"Build whisper.cpp & Transcribe Audio"}]}},"_type":"markdown","_id":"content:articles:podcast-transcription-whispercpp.md","_source":"content","_file":"articles/podcast-transcription-whispercpp.md","_stem":"articles/podcast-transcription-whispercpp","_extension":"md"},{"_path":"/articles/quick-tip-rerunning-bash-commands","_dir":"articles","_draft":false,"_partial":false,"_locale":"","title":"Tip: Re-running Bash Commands","description":"Do you ever find yourself having to re-run a Bash command? I often find this\nhappening to myself when I neglect to use sudo for a command that requires\nroot privileges.","date":"2021-09-22","draft":false,"tags":["tip","bash"],"categories":["tips"],"excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Do you ever find yourself having to re-run a Bash command? I often find this\nhappening to myself when I neglect to use "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"sudo"}]},{"type":"text","value":" for a command that requires\nroot privileges."}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Do you ever find yourself having to re-run a Bash command? I often find this\nhappening to myself when I neglect to use "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"sudo"}]},{"type":"text","value":" for a command that requires\nroot privileges."}]},{"type":"element","tag":"pre","props":{"className":"language-bash shiki shiki-themes github-light","code":"$ pacman -Syu\nerror: you cannot perform this operation unless you are root.\n","language":"bash","meta":"","style":""},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line","line":1},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" pacman"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" -Syu\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":2},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"error:"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" you"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" cannot"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" perform"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" this"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" operation"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" unless"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" you"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" are"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" root.\n"}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Well, I have good news for you -- you can easily re-issue a command with the\n"},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"!!"}]},{"type":"text","value":" designator! Simply type "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"sudo"}]},{"type":"text","value":" followed by "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"!!"}]},{"type":"text","value":" and you're good to go."}]},{"type":"element","tag":"pre","props":{"className":"language-bash shiki shiki-themes github-light","code":"$ sudo !!\nsudo pacman -Syu\n[sudo] password for colton:\n:: Synchronizing package databases...\n","language":"bash","meta":"","style":""},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line","line":1},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" sudo"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" !!\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":2},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"sudo"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" pacman"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" -Syu\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":3},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"[sudo] password "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":"for"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" colton:\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":4},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":"::"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" Synchronizing"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" package"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" databases...\n"}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"--"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Commands that are prefixed with a bang, "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"!"}]},{"type":"text","value":", are considered "},{"type":"element","tag":"em","props":{},"children":[{"type":"text","value":"Event\nDesignators,"}]},{"type":"text","value":" and are references to your command-line history. You can take a\nlook at your history with the "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"history"}]},{"type":"text","value":" command."}]},{"type":"element","tag":"pre","props":{"className":"language-bash shiki shiki-themes github-light","code":"$ history\n 1021 touch hello_world.txt\n 1022 ls\n 1023 echo \"Here we go again!\"\n 1024 find . -name *.py\n","language":"bash","meta":"","style":""},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line","line":1},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" history\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":2},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":" 1021"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" touch"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" hello_world.txt\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":3},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":" 1022"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" ls\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":4},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":" 1023"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" echo"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" \"Here we go again!\"\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":5},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":" 1024"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" find"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" ."}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" -name"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" *"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":".py\n"}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"There are many ways to use "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"!"}]},{"type":"text","value":" in your shell. For example, if you wanted to\nre-issue a specific command in your history, you could use "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"!n"}]},{"type":"text","value":" where "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"n"}]},{"type":"text","value":" is\nthe number next to the command in your history."}]},{"type":"element","tag":"pre","props":{"className":"language-bash shiki shiki-themes github-light","code":"$ !1023\necho \"Here we go again!\"\nHere we go again!\n","language":"bash","meta":"","style":""},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line","line":1},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" !1023\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":2},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":"echo"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" \"Here we go again!\"\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":3},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"Here"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" we"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" go"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" again!\n"}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Or... if you wanted to run the command you issued 4-commands ago, you can use\n"},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"!-4"}]},{"type":"text","value":"."}]},{"type":"element","tag":"pre","props":{"className":"language-bash shiki shiki-themes github-light","code":"$ !-4\nls\nhello_world.txt\n","language":"bash","meta":"","style":""},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line","line":1},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" !-4\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":2},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"ls\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":3},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"hello_world.txt\n"}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Or... if you wanted to run the last command that started with the string\n"},{"type":"element","tag":"em","props":{},"children":[{"type":"text","value":"find"}]},{"type":"text","value":", you can use "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"!find"}]},{"type":"text","value":"."}]},{"type":"element","tag":"pre","props":{"className":"language-bash shiki shiki-themes github-light","code":"$ !find\nfind . -name *.py\n","language":"bash","meta":"","style":""},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line","line":1},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" !find\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":2},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"find"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" ."}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" -name"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" *"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":".py\n"}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Be sure to check out the "},{"type":"element","tag":"em","props":{},"children":[{"type":"text","value":"Event Designators"}]},{"type":"text","value":" section of the "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"bash"}]},{"type":"text","value":" "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"man"}]},{"type":"text","value":" pages\nfor more information!"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"--"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"As an aside, for even faster command-line history navigation, be sure to check\nout the excellent "},{"type":"element","tag":"a","props":{"href":"https://github.com/junegunn/fzf","rel":["nofollow"]},"children":[{"type":"text","value":"fzf"}]},{"type":"text","value":" utility by "},{"type":"element","tag":"em","props":{},"children":[{"type":"text","value":"junegunn."}]},{"type":"text","value":"\nOne of the many features of "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"fzf"}]},{"type":"text","value":" is browsing and re-issuing commands from your\ncommand-line history with a fuzzy-finder!"}]},{"type":"element","tag":"style","props":{},"children":[{"type":"text","value":"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:articles:quick-tip-rerunning-bash-commands.md","_source":"content","_file":"articles/quick-tip-rerunning-bash-commands.md","_stem":"articles/quick-tip-rerunning-bash-commands","_extension":"md"},{"_path":"/articles/reset-ipmi-password-from-host-os","_dir":"articles","_draft":false,"_partial":false,"_locale":"","title":"Reset IPMI Credentials from the Host OS","description":"If you ever find yourself locked out of the Intelligent Platform Management Interface (IPMI) of a server, these\ninstructions will guide your through the process of resetting the credentials to their default values from the host\noperating system.","date":"2021-12-27","tags":["homelab","supermicro","truenas"],"categories":["homelab"],"excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"If you ever find yourself locked out of the Intelligent Platform Management Interface (IPMI) of a server, these\ninstructions will guide your through the process of resetting the credentials to their default values from the host\noperating system."}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"If you ever find yourself locked out of the Intelligent Platform Management Interface (IPMI) of a server, these\ninstructions will guide your through the process of resetting the credentials to their default values from the host\noperating system."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"If you are using an operating system like TrueNAS -- good news! It's possible to reset the IPMI password directly from\nthe web interface. This is done by navigating to "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"Network > IPMI"}]},{"type":"text","value":", and simply entering a new value in the "},{"type":"element","tag":"em","props":{},"children":[{"type":"text","value":"IPMI\nPassword Reset"}]},{"type":"text","value":" field."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"If you are using some other OS that doesn't have this feature, you can achieve similar results by using the "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"ipmitool"}]},{"type":"text","value":"\ncommand-line utility."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"First, you'll want to determine the user ID associated with the user for whom you'd like to reset the password."}]},{"type":"element","tag":"pre","props":{"code":"# ipmitool user list\nID Name Callin Link Auth IPMI Msg Channel Priv Limit\n1 true false false Unknown (0x00)\n2 ADMIN true false false Unknown (0x00)\n"},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"# ipmitool user list\nID Name Callin Link Auth IPMI Msg Channel Priv Limit\n1 true false false Unknown (0x00)\n2 ADMIN true false false Unknown (0x00)\n"}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"In this case, we will be resetting the password for "},{"type":"element","tag":"em","props":{},"children":[{"type":"text","value":"ADMIN"}]},{"type":"text","value":" who has a user ID of "},{"type":"element","tag":"em","props":{},"children":[{"type":"text","value":"2"}]},{"type":"text","value":". Then we'll assign the new\npassword like so:"}]},{"type":"element","tag":"pre","props":{"code":"# ipmitool user set password 2 \n"},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"# ipmitool user set password 2 \n"}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"And you should be good to go!"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"..."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Alternatively, if you'd like to factory reset the baseboard management controller (BMC), which will reset the IPMI\ncredentials to their default value, you can issue the following command."}]},{"type":"element","tag":"pre","props":{"code":"# ipmitool raw 0x3c 0x40\n"},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"# ipmitool raw 0x3c 0x40\n"}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Where "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"0x3c"}]},{"type":"text","value":" is the "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":""}]},{"type":"text","value":" argument, a.k.a. the network function code that defines the functional routing for\nmessages, and "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"0x40"}]},{"type":"text","value":" is the "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":""}]},{"type":"text","value":". According to section 5.1 of the "},{"type":"element","tag":"a","props":{"href":"https://www.intel.com/content/dam/www/public/us/en/documents/product-briefs/ipmi-second-gen-interface-spec-v2-rev1-1.pdf","rel":["nofollow"]},"children":[{"type":"text","value":"IPMI interface\nspecification"}]},{"type":"text","value":",\n"},{"type":"element","tag":"em","props":{},"children":[{"type":"text","value":"netfn"}]},{"type":"text","value":" codes ranging from 0x30 to 0x3F are reserved for vendor specific functions. I searched around for some\nSupermicro references on these vendor specific network functions without much luck other than various "},{"type":"element","tag":"a","props":{"href":"https://www.supermicro.com/support/faqs/faq.cfm?faq=15448","rel":["nofollow"]},"children":[{"type":"text","value":"support\nresponses"}]},{"type":"text","value":" on how to reset a device. Bummer!"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:articles:reset-ipmi-password-from-host-os.md","_source":"content","_file":"articles/reset-ipmi-password-from-host-os.md","_stem":"articles/reset-ipmi-password-from-host-os","_extension":"md"},{"_path":"/articles/ssh-ed25519-sk-yubikey","_dir":"articles","_draft":false,"_partial":false,"_locale":"","title":"Configuring a YubiKey for use with OpenSSH","description":"YubiKey's are a convenient way to introduce a physical form of two factor authentication into ones workflow. They support a variety of protocols, but in this guide we will walk through how to configure a YubiKey for use with OpenSSH via the \"new\" ed25519-sk key type that supports FIDO compliant hardware keys.","draft":false,"date":"2024-06-09","tags":["unix","configurations"],"categories":["tooling","tips"],"excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://www.yubico.com/","rel":["nofollow"]},"children":[{"type":"text","value":"YubiKey's"}]},{"type":"text","value":" are a convenient way to introduce a physical form of two factor authentication into ones workflow. They support a variety of protocols, but in this guide we will walk through how to configure a YubiKey for use with OpenSSH via the \"new\" "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"ed25519-sk"}]},{"type":"text","value":" key type that supports FIDO compliant hardware keys."}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://www.yubico.com/","rel":["nofollow"]},"children":[{"type":"text","value":"YubiKey's"}]},{"type":"text","value":" are a convenient way to introduce a physical form of two factor authentication into ones workflow. They support a variety of protocols, but in this guide we will walk through how to configure a YubiKey for use with OpenSSH via the \"new\" "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"ed25519-sk"}]},{"type":"text","value":" key type that supports FIDO compliant hardware keys."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"In "},{"type":"element","tag":"a","props":{"href":"https://www.openssh.com/txt/release-8.2","rel":["nofollow"]},"children":[{"type":"text","value":"release 8.2 of OpenSSH"}]},{"type":"text","value":" support for FIDO devices was added with public key types \"ecdsa-sk\" and \"ed25519-sk\" (-sk standing for \"security key\"). This key type is supported by YubiKey's with firmware version 5.2.3 or higher."}]},{"type":"element","tag":"blockquote","props":{},"children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This release adds support for FIDO/U2F hardware authenticators to OpenSSH. U2F/FIDO are open standards for inexpensive two-factor authentication hardware that are widely used for website authentication. In OpenSSH FIDO devices are supported by new public key types \"ecdsa-sk\" and \"ed25519-sk\", along with corresponding certificate types."}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Let's get started by installing the latest version of OpenSSH via "},{"type":"element","tag":"a","props":{"href":"https://brew.sh/","rel":["nofollow"]},"children":[{"type":"text","value":"Homebrew"}]},{"type":"text","value":", along with the YubiKey Manager (ykman) CLI. The version of OpenSSH included with macOS is not compatible."}]},{"type":"element","tag":"pre","props":{"className":"language-sh shiki shiki-themes github-light","code":"$ brew install openssh ykman\n","language":"sh","meta":"","style":""},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line","line":1},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" brew"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" install"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" openssh"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" ykman\n"}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Then, let's confirm that our YubiKey has a firmware that is greater than 5.2.3:"}]},{"type":"element","tag":"pre","props":{"className":"language-sh shiki shiki-themes github-light","code":"$ ykman list\nYubiKey 5Ci (5.4.3) [OTP+FIDO+CCID]\n","language":"sh","meta":"","style":""},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line","line":1},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" ykman"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" list\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":2},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"YubiKey"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" 5Ci"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" (5.4.3) [OTP+FIDO+CCID]\n"}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Next, we'll go ahead and enable a pin on our device via the "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"change-pin"}]},{"type":"text","value":" command, as this a requirement for our use."}]},{"type":"element","tag":"pre","props":{"className":"language-sh shiki shiki-themes github-light","code":"$ ykman fido access change-pin\n","language":"sh","meta":"","style":""},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line","line":1},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" ykman"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" fido"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" access"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" change-pin\n"}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"And last, we'll generate the key on our device!"}]},{"type":"element","tag":"pre","props":{"className":"language-sh shiki shiki-themes github-light","code":"$ ssh-keygen -t ed25519-sk -O resident\nGenerating public/private ed25519-sk key pair.\nYou may need to touch your authenticator to authorize key generation.\n...\n","language":"sh","meta":"","style":""},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line","line":1},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" ssh-keygen"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" -t"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" ed25519-sk"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" -O"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" resident\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":2},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"Generating"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" public/private"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" ed25519-sk"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" key"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" pair.\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":3},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"You"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" may"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" need"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" to"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" touch"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" your"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" authenticator"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" to"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" authorize"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" key"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" generation.\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":4},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":"...\n"}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"We specify "},{"type":"element","tag":"em","props":{},"children":[{"type":"text","value":"resident"}]},{"type":"text","value":" to indicate that the key handle is to be stored on the YubiKey itself, since we will be using this device with multiple computers."}]},{"type":"element","tag":"pre","props":{"className":"language-txt shiki shiki-themes github-light","code":"resident\n Indicate that the key handle should be stored on the FIDO\n authenticator itself. This makes it easier to use the\n authenticator on multiple computers. Resident keys may be\n supported on FIDO2 authenticators and typically require that a PIN\n be set on the authenticator prior to generation. Resident keys\n may be loaded off the authenticator using ssh-add(1). Storing\n both parts of a key on a FIDO authenticator increases the\n likelihood of an attacker being able to use a stolen authenticator\n device.\n","language":"txt","meta":"","style":""},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line","line":1},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":"resident\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":2},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":" Indicate that the key handle should be stored on the FIDO\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":3},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":" authenticator itself. This makes it easier to use the\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":4},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":" authenticator on multiple computers. Resident keys may be\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":5},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":" supported on FIDO2 authenticators and typically require that a PIN\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":6},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":" be set on the authenticator prior to generation. Resident keys\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":7},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":" may be loaded off the authenticator using ssh-add(1). Storing\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":8},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":" both parts of a key on a FIDO authenticator increases the\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":9},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":" likelihood of an attacker being able to use a stolen authenticator\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":10},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":" device.\n"}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"And that's all it takes -- simple enough. Now, when interacting with "},{"type":"element","tag":"em","props":{},"children":[{"type":"text","value":"ssh"}]},{"type":"text","value":" or "},{"type":"element","tag":"em","props":{},"children":[{"type":"text","value":"git"}]},{"type":"text","value":" you will be prompted to touch the YubiKey to bring that little bit of physical 2FA."}]},{"type":"element","tag":"style","props":{},"children":[{"type":"text","value":"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:articles:ssh-ed25519-sk-yubikey.md","_source":"content","_file":"articles/ssh-ed25519-sk-yubikey.md","_stem":"articles/ssh-ed25519-sk-yubikey","_extension":"md"},{"_path":"/articles/unit-testing-micropython-with-mocks","_dir":"articles","_draft":false,"_partial":false,"_locale":"","title":"Unit Testing in MicroPython with Mocks","description":"Unit testing code for embedded systems can be challenging. While it's possible\nto leverage emulators, write side-effect free code, or run tests on the\nhardware itself, it's often easiest to unit test the code on your personal\ncomputer with mocked hardware functionality.","date":"2020-02-07","draft":false,"tags":["micropython","testing","mocks","tutorial"],"categories":["python","embedded"],"excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Unit testing code for embedded systems can be challenging. While it's possible\nto leverage emulators, write side-effect free code, or run tests on the\nhardware itself, it's often easiest to unit test the code on your personal\ncomputer with mocked hardware functionality."}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Unit testing code for embedded systems can be challenging. While it's possible\nto leverage emulators, write side-effect free code, or run tests on the\nhardware itself, it's often easiest to unit test the code on your personal\ncomputer with mocked hardware functionality."}]},{"type":"element","tag":"h1","props":{"id":"mocking"},"children":[{"type":"text","value":"Mocking"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Mocks allow us to replace the hardware interfacing functionality under-the-hood\nwith predefined results and side-effects. For example, if there is a piece of\nlogic that retrieves values from an accelerometer to get a device's\norientation, it would be possible to mock the returned values of the\naccelerometer -- allowing us to run the unit tests on a device that does not\nhave an accelerometer sensor installed."}]},{"type":"element","tag":"h1","props":{"id":"a-micropython-mocking-example"},"children":[{"type":"text","value":"A MicroPython Mocking Example"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"In this example, we will be unit testing a module named "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"time_logger"}]},{"type":"text","value":", that\ndepends on the MicroPython library "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"utime"}]},{"type":"text","value":" to log the most recent Epoch time to\na file."}]},{"type":"element","tag":"pre","props":{"className":"language-python shiki shiki-themes github-light","code":"# time_logger.py\n\nclass TimeLogger(object):\n\n def save_time(self):\n \"\"\" Overwrite a file with the most recent Epoch timestamp from `utime`\n \"\"\"\n with open(\"LAST_KNOWN_TIME\", \"w+\") as f:\n f.write(str(utime.time()))\n","language":"python","meta":"","style":""},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line","line":1},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6A737D"},"children":[{"type":"text","value":"# time_logger.py\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":2},"children":[{"type":"element","tag":"span","props":{"emptyLinePlaceholder":true},"children":[{"type":"text","value":"\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":3},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":"class"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":" TimeLogger"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":"object"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"):\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":4},"children":[{"type":"element","tag":"span","props":{"emptyLinePlaceholder":true},"children":[{"type":"text","value":"\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":5},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":" def"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":" save_time"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"(self):\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":6},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" \"\"\" Overwrite a file with the most recent Epoch timestamp from `utime`\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":7},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" \"\"\"\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":8},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":" with"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" open"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":"\"LAST_KNOWN_TIME\""}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":"\"w+\""}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":"as"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" f:\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":9},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" f.write("}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":"str"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"(utime.time()))\n"}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"First, because the "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"utime"}]},{"type":"text","value":" module is not installed on the machine that the unit\ntests on, we must mock "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"utime"}]},{"type":"text","value":" module before importing "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"time_logger"}]},{"type":"text","value":" in our\nunit test file."}]},{"type":"element","tag":"pre","props":{"className":"language-python shiki shiki-themes github-light","code":"# test_time_logger.py\n\nimport unittest\n\nfrom unittest.mock import MagicMock\n\nsys.modules['utime'] = MagicMock()\nfrom time_logger import TimeLogger\n","language":"python","meta":"","style":""},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line","line":1},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6A737D"},"children":[{"type":"text","value":"# test_time_logger.py\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":2},"children":[{"type":"element","tag":"span","props":{"emptyLinePlaceholder":true},"children":[{"type":"text","value":"\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":3},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" unittest\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":4},"children":[{"type":"element","tag":"span","props":{"emptyLinePlaceholder":true},"children":[{"type":"text","value":"\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":5},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" unittest.mock "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" MagicMock\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":6},"children":[{"type":"element","tag":"span","props":{"emptyLinePlaceholder":true},"children":[{"type":"text","value":"\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":7},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"sys.modules["}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":"'utime'"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"] "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" MagicMock()\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":8},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" time_logger "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" TimeLogger\n"}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Then, we can write a test that patches the "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"utime.time"}]},{"type":"text","value":" functionality so that\nit returns a value of our choosing -- in this case, "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"1234"}]},{"type":"text","value":"."}]},{"type":"element","tag":"pre","props":{"className":"language-python shiki shiki-themes github-light","code":"class TestTimeLogger(unittest.TestCase):\n\n def test_save_time(self):\n \"\"\" Verify that the Epoch time is written to file\n \"\"\"\n with unittest.mock.patch(\"utime.time\", return_value=1234):\n t = TimeLogger()\n t.save_time()\n with open(\"LAST_KNOWN_TIME\") as f:\n self.assertEqual(\"1234\", f.read())\n","language":"python","meta":"","style":""},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line","line":1},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":"class"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":" TestTimeLogger"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"unittest"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"TestCase"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"):\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":2},"children":[{"type":"element","tag":"span","props":{"emptyLinePlaceholder":true},"children":[{"type":"text","value":"\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":3},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":" def"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":" test_save_time"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"(self):\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":4},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" \"\"\" Verify that the Epoch time is written to file\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":5},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" \"\"\"\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":6},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":" with"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" unittest.mock.patch("}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":"\"utime.time\""}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#E36209"},"children":[{"type":"text","value":"return_value"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":"1234"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"):\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":7},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" t "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" TimeLogger()\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":8},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" t.save_time()\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":9},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":" with"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" open"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":"\"LAST_KNOWN_TIME\""}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":"as"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" f:\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":10},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" self"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":".assertEqual("}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":"\"1234\""}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":", f.read())\n"}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Now, when the "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"save_time"}]},{"type":"text","value":" method gets the latest time from "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"utime.time()"}]},{"type":"text","value":", the\nvalue will be patched to return "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"1234"}]},{"type":"text","value":". That value will be written to a file,\nand our unit test will pass!"}]},{"type":"element","tag":"h2","props":{"id":"references"},"children":[{"type":"text","value":"References"}]},{"type":"element","tag":"ol","props":{},"children":[{"type":"element","tag":"li","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://docs.python.org/3/library/unittest.html","rel":["nofollow"]},"children":[{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"unittest"}]},{"type":"text","value":" — Unit testing framework"}]}]}]},{"type":"element","tag":"style","props":{},"children":[{"type":"text","value":"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[{"id":"references","depth":2,"text":"References"}]}},"_type":"markdown","_id":"content:articles:unit-testing-micropython-with-mocks.md","_source":"content","_file":"articles/unit-testing-micropython-with-mocks.md","_stem":"articles/unit-testing-micropython-with-mocks","_extension":"md"},{"_path":"/articles/vim-fugitive-gpg-pinentry","_dir":"articles","_draft":false,"_partial":false,"_locale":"","title":"Using pinentry-mac to sign commits from vim-fugitive","description":"In order to sign git commits from within Vim using a plugin like tpope/vim-fugitive, it is necessary to configure the gpg-agent to use a GUI based pinentry-program.","draft":false,"date":"2024-05-11","tags":["vim","tip"],"categories":["tooling","tips"],"excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"In order to sign git commits from within Vim using a plugin like "},{"type":"element","tag":"a","props":{"href":"https://github.com/tpope/vim-fugitive","rel":["nofollow"]},"children":[{"type":"text","value":"tpope/vim-fugitive"}]},{"type":"text","value":", it is necessary to configure the "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"gpg-agent"}]},{"type":"text","value":" to use a GUI based "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"pinentry-program"}]},{"type":"text","value":"."}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"In order to sign git commits from within Vim using a plugin like "},{"type":"element","tag":"a","props":{"href":"https://github.com/tpope/vim-fugitive","rel":["nofollow"]},"children":[{"type":"text","value":"tpope/vim-fugitive"}]},{"type":"text","value":", it is necessary to configure the "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"gpg-agent"}]},{"type":"text","value":" to use a GUI based "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"pinentry-program"}]},{"type":"text","value":"."}]},{"type":"element","tag":"h2","props":{"id":"preface"},"children":[{"type":"text","value":"Preface"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"The man, the myth, the legend, Timothy Popallopollis himself "},{"type":"element","tag":"a","props":{"href":"https://github.com/tpope/vim-fugitive/issues/846#issuecomment-253816577","rel":["nofollow"]},"children":[{"type":"text","value":"recommends"}]},{"type":"text","value":" configuring your "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"gpg-agent"}]},{"type":"text","value":" to use a GUI based "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"pinentry-program"}]},{"type":"text","value":". On macOS this can be done quite by simply installing "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"pinentry-mac"}]},{"type":"text","value":", and updating your "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"gpg-agent.conf"}]},{"type":"text","value":"."}]},{"type":"element","tag":"h2","props":{"id":"configuration"},"children":[{"type":"text","value":"Configuration"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"First things first, let's install the pinentry program."}]},{"type":"element","tag":"pre","props":{"code":"$ brew install pinentry-mac\n","language":"bash","meta":"","className":"language-bash shiki shiki-themes github-light","style":""},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line","line":1},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" brew"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" install"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" pinentry-mac\n"}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Then, all we need to do is set the "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"pinentry-program"}]},{"type":"text","value":" option in your "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"~/.gnupg/gpg-agent.conf"}]},{"type":"text","value":" file."}]},{"type":"element","tag":"pre","props":{"code":"default-cache-ttl 600\nmax-cache-ttl 7200\npinentry-program /opt/homebrew/bin/pinentry-mac\n"},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"default-cache-ttl 600\nmax-cache-ttl 7200\npinentry-program /opt/homebrew/bin/pinentry-mac\n"}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"If your don't know the path to your pinentry program, you can throw down a quick "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"which"}]},{"type":"text","value":"."}]},{"type":"element","tag":"pre","props":{"code":"$ which pinentry-mac\n/opt/homebrew/bin/pinentry-mac\n","language":"bash","meta":"","className":"language-bash shiki shiki-themes github-light","style":""},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line","line":1},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" which"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" pinentry-mac\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":2},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"/opt/homebrew/bin/pinentry-mac\n"}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Or use your Homebrew prefix."}]},{"type":"element","tag":"pre","props":{"code":"$ echo $(brew --prefix)/bin/pinentry-mac\n/opt/homebrew/bin/pinentry-mac\n","language":"bash","meta":"","className":"language-bash shiki shiki-themes github-light","style":""},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line","line":1},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" echo"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" $("}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"brew"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" --prefix"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":")"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":"/bin/pinentry-mac\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":2},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"/opt/homebrew/bin/pinentry-mac\n"}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"But that's all it takes. Now, you should be prompted to enter your gpg pin in an external window when signing commits from vim."}]},{"type":"element","tag":"style","props":{},"children":[{"type":"text","value":"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[{"id":"preface","depth":2,"text":"Preface"},{"id":"configuration","depth":2,"text":"Configuration"}]}},"_type":"markdown","_id":"content:articles:vim-fugitive-gpg-pinentry.md","_source":"content","_file":"articles/vim-fugitive-gpg-pinentry.md","_stem":"articles/vim-fugitive-gpg-pinentry","_extension":"md"}],"navigation":[{"title":"Articles","_path":"/articles","children":[{"title":"Upgrading the Firmware on the PCEngines APU2","_path":"/articles/apu2-firmware-upgrade"},{"title":"Docker Volume Permissions with SELinux","_path":"/articles/docker-selinux-volumes"},{"title":"Exploring the Digital Ocean `doctl` Utility","_path":"/articles/doctl"},{"title":"Impressions of Fennel with Hammerspoon","_path":"/articles/fennel-initial-exploration"},{"title":"Migrate to TrueNAS Scale from TrueNAS Core","_path":"/articles/migrate-truenas-from-core-to-scale"},{"title":"How To Add an RSS Feed to a Nuxt Website","_path":"/articles/nuxt-content-rss-feed"},{"title":"This Website Has Been Migrated to Nuxt 3 🎉","_path":"/articles/nuxt-v3-migration"},{"title":"Create a Persistent Arch Linux Bootable USB with Vagrant","_path":"/articles/persistent-archlinux-usb"},{"title":"Easily Transcribe Podcasts with Whisper.cpp","_path":"/articles/podcast-transcription-whispercpp"},{"title":"Tip: Re-running Bash Commands","_path":"/articles/quick-tip-rerunning-bash-commands"},{"title":"Reset IPMI Credentials from the Host OS","_path":"/articles/reset-ipmi-password-from-host-os"},{"title":"Configuring a YubiKey for use with OpenSSH","_path":"/articles/ssh-ed25519-sk-yubikey"},{"title":"Unit Testing in MicroPython with Mocks","_path":"/articles/unit-testing-micropython-with-mocks"},{"title":"Using pinentry-mac to sign commits from vim-fugitive","_path":"/articles/vim-fugitive-gpg-pinentry"}]}]} \ No newline at end of file +{"generatedAt":1735327943981,"generateTime":806,"contents":[{"_path":"/articles/apu2-firmware-upgrade","_dir":"articles","_draft":false,"_partial":false,"_locale":"","title":"Upgrading the Firmware on the PCEngines APU2","description":"I've had a PCEngines APU2 gathering dust for a\nfew years, and have recently decided to dust it off.","date":"2019-12-21","draft":false,"tags":["pcengine","apu"],"categories":["linux"],"excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"I've had a "},{"type":"element","tag":"a","props":{"href":"https://pcengines.ch/apu2.htm","rel":["nofollow"]},"children":[{"type":"text","value":"PCEngines APU2"}]},{"type":"text","value":" gathering dust for a\nfew years, and have recently decided to dust it off."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Since the last time the device has been powered on, there have been many great\nimprovements to the firmware, and it was very-much due for an upgrade. The\nfollowing steps outline how the firmware was upgraded on the APU from the\nalready-installed operating system -- CentOS."}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"I've had a "},{"type":"element","tag":"a","props":{"href":"https://pcengines.ch/apu2.htm","rel":["nofollow"]},"children":[{"type":"text","value":"PCEngines APU2"}]},{"type":"text","value":" gathering dust for a\nfew years, and have recently decided to dust it off."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Since the last time the device has been powered on, there have been many great\nimprovements to the firmware, and it was very-much due for an upgrade. The\nfollowing steps outline how the firmware was upgraded on the APU from the\nalready-installed operating system -- CentOS."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"First, we will connect to the device over the serial port"}]},{"type":"element","tag":"pre","props":{"code":"screen /dev/tty.usbserial 115200\n"},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"screen /dev/tty.usbserial 115200\n"}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Then, we will install the "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"flashrom"}]},{"type":"text","value":" utility that is needed to update the\nfirmware. Because it is not available in the default "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"yum"}]},{"type":"text","value":" repositories, we\nwill enable the "},{"type":"element","tag":"em","props":{},"children":[{"type":"text","value":"Extra Packages for Enterprise Linux"}]},{"type":"text","value":" (EPEL) repository before\ninstallation."}]},{"type":"element","tag":"pre","props":{"code":"sudo yum install epel-release\nsudo yum install flashrom\n","language":"bash","meta":"","className":"language-bash shiki shiki-themes github-light","style":""},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line","line":1},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"sudo"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" yum"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" install"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" epel-release\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":2},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"sudo"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" yum"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" install"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" flashrom\n"}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Next, we will download the latest version of the firmware that is compatible\nwith the APU2 device from the PC Engines release website:\n"},{"type":"element","tag":"a","props":{"href":"https://pcengines.github.io/","rel":["nofollow"]},"children":[{"type":"text","value":"https://pcengines.github.io/"}]},{"type":"text","value":"."}]},{"type":"element","tag":"pre","props":{"code":"curl -O https://3mdeb.com/open-source-firmware/pcengines/apu2/apu2_v4.11.0.1.rom\n","language":"bash","meta":"","className":"language-bash shiki shiki-themes github-light","style":""},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line","line":1},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"curl"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" -O"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" https://3mdeb.com/open-source-firmware/pcengines/apu2/apu2_v4.11.0.1.rom\n"}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"And finally, we will flash the firmware..."}]},{"type":"element","tag":"pre","props":{"code":"sudo flashrom -w apu2_v4.11.0.1.rom -p internal:boardmismatch=force\n","language":"bash","meta":"","className":"language-bash shiki shiki-themes github-light","style":""},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line","line":1},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"sudo"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" flashrom"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" -w"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" apu2_v4.11.0.1.rom"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" -p"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" internal:boardmismatch=force\n"}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"strong","props":{},"children":[{"type":"text","value":"References:"}]}]},{"type":"element","tag":"ul","props":{},"children":[{"type":"element","tag":"li","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://pcengines.ch/apu2.htm","rel":["nofollow"]},"children":[{"type":"text","value":"https://pcengines.ch/apu2.htm"}]}]},{"type":"element","tag":"li","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://pcengines.github.io/","rel":["nofollow"]},"children":[{"type":"text","value":"https://pcengines.github.io/"}]}]},{"type":"element","tag":"li","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://github.com/pcengines/apu2-documentation/blob/master/docs/firmware_flashing.md","rel":["nofollow"]},"children":[{"type":"text","value":"https://github.com/pcengines/apu2-documentation/blob/master/docs/firmware_flashing.md"}]}]},{"type":"element","tag":"li","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://github.com/pcengines/apu2-documentation/blob/master/docs/cold_reset.md","rel":["nofollow"]},"children":[{"type":"text","value":"https://github.com/pcengines/apu2-documentation/blob/master/docs/cold_reset.md"}]}]},{"type":"element","tag":"li","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://github.com/elad/openbsd-apu2","rel":["nofollow"]},"children":[{"type":"text","value":"https://github.com/elad/openbsd-apu2"}]}]}]},{"type":"element","tag":"style","props":{},"children":[{"type":"text","value":"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:articles:apu2-firmware-upgrade.md","_source":"content","_file":"articles/apu2-firmware-upgrade.md","_stem":"articles/apu2-firmware-upgrade","_extension":"md"},{"_path":"/articles/docker-selinux-volumes","_dir":"articles","_draft":false,"_partial":false,"_locale":"","title":"Docker Volume Permissions with SELinux","description":"Unfamiliar with running Docker on a SELinux enabled system, I found myself\nrunning into a bunch of file permission errors while creating volumes.","date":"2019-12-26","draft":false,"tags":["docker","selinux"],"categories":["linux"],"excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Unfamiliar with running Docker on a SELinux enabled system, I found myself\nrunning into a bunch of file permission errors while creating volumes."}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Unfamiliar with running Docker on a SELinux enabled system, I found myself\nrunning into a bunch of file permission errors while creating volumes."}]},{"type":"element","tag":"pre","props":{"code":"mkdir: can't create directory '/data': Permission denied\n","language":"txt","meta":"","className":"language-txt shiki shiki-themes github-light","style":""},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line","line":1},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":"mkdir: can't create directory '/data': Permission denied\n"}]}]}]}]},{"type":"element","tag":"hr","props":{},"children":[]},{"type":"element","tag":"pre","props":{"code":"$ docker info --format '{{json .SecurityOptions}}'\n[\n \"name=seccomp,profile=/etc/docker/seccomp.json\",\n \"name=selinux\"\n]\n","language":"bash","meta":"","className":"language-bash shiki shiki-themes github-light","style":""},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line","line":1},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" docker"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" info"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" --format"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" '{{json .SecurityOptions}}'\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":2},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"[\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":3},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" \"name=seccomp,profile=/etc/docker/seccomp.json\""}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":",\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":4},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" \"name=selinux\"\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":5},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"]\n"}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"It turns out that this can be resolved by appending the "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":":z"}]},{"type":"text","value":" flag to the volume\nmappings in the "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"docker-compose.yml"}]},{"type":"text","value":" file, indicating that the volume content\nis shared."}]},{"type":"element","tag":"pre","props":{"code":"services:\n server:\n volumes:\n - ./data:/data:z\n"},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"services:\n server:\n volumes:\n - ./data:/data:z\n"}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"From the Docker documentation:"}]},{"type":"element","tag":"blockquote","props":{},"children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"The "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"z"}]},{"type":"text","value":" option tells Docker that two containers share the volume content. As\na result, Docker labels the content with a shared content label. Shared\nvolume labels allow all containers to read/write content."}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"strong","props":{},"children":[{"type":"text","value":"References"}]}]},{"type":"element","tag":"ul","props":{},"children":[{"type":"element","tag":"li","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://docs.docker.com/engine/reference/commandline/info/","rel":["nofollow"]},"children":[{"type":"text","value":"Docker Docs: Docker Info"}]}]},{"type":"element","tag":"li","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://docs.docker.com/engine/reference/commandline/run/#mount-volumes-from-container---volumes-from","rel":["nofollow"]},"children":[{"type":"text","value":"Docker Docs: Mounting Volumes"}]}]}]},{"type":"element","tag":"style","props":{},"children":[{"type":"text","value":"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:articles:docker-selinux-volumes.md","_source":"content","_file":"articles/docker-selinux-volumes.md","_stem":"articles/docker-selinux-volumes","_extension":"md"},{"_path":"/articles/doctl","_dir":"articles","_draft":false,"_partial":false,"_locale":"","title":"Exploring the Digital Ocean `doctl` Utility","description":"I recently had the need to spool up a small ephemeral Linux instance, and wanted to try something new by exploring the Digital Ocean doctl command line utility.\nThis proved to be an extremely easy way to configure, create, connect, and destroy a Linux box, and I foresee myself using this service even more in the future.","date":"2023-01-01","tags":["linux","digital-ocean"],"categories":["linux"],"excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"I recently had the need to spool up a small ephemeral Linux instance, and wanted to try something new by exploring the Digital Ocean "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"doctl"}]},{"type":"text","value":" command line utility.\nThis proved to be an "},{"type":"element","tag":"em","props":{},"children":[{"type":"text","value":"extremely"}]},{"type":"text","value":" easy way to configure, create, connect, and destroy a Linux box, and I foresee myself using this service even more in the future."}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"I recently had the need to spool up a small ephemeral Linux instance, and wanted to try something new by exploring the Digital Ocean "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"doctl"}]},{"type":"text","value":" command line utility.\nThis proved to be an "},{"type":"element","tag":"em","props":{},"children":[{"type":"text","value":"extremely"}]},{"type":"text","value":" easy way to configure, create, connect, and destroy a Linux box, and I foresee myself using this service even more in the future."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"To start things off, I had to install and setup authentication to Digital Ocean. Doing\nthis on my Mac machine, I opted to use "},{"type":"element","tag":"a","props":{"href":"https://brew.sh/","rel":["nofollow"]},"children":[{"type":"text","value":"Homebrew"}]},{"type":"text","value":"."}]},{"type":"element","tag":"pre","props":{"className":"language-sh shiki shiki-themes github-light","code":"# install `doctl`\nbrew install doctl\n\n# setup authentication\ndoctl auth init\n","language":"sh","meta":"","style":""},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line","line":1},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6A737D"},"children":[{"type":"text","value":"# install `doctl`\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":2},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"brew"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" install"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" doctl\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":3},"children":[{"type":"element","tag":"span","props":{"emptyLinePlaceholder":true},"children":[{"type":"text","value":"\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":4},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6A737D"},"children":[{"type":"text","value":"# setup authentication\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":5},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"doctl"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" auth"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" init\n"}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"While the online "},{"type":"element","tag":"a","props":{"href":"https://docs.digitalocean.com/reference/doctl/reference/compute/droplet/create/","rel":["nofollow"]},"children":[{"type":"text","value":"documentation"}]},{"type":"text","value":" is fantastic, I instead found myself mostly referencing the outputs of "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"--help"}]},{"type":"text","value":"."}]},{"type":"element","tag":"pre","props":{"className":"language-sh shiki shiki-themes github-light","code":"doctl compute droplet create --help\n","language":"sh","meta":"","style":""},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line","line":1},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"doctl"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" compute"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" droplet"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" create"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" --help\n"}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"I had to find the image name of the version of Ubuntu I wanted to install:"}]},{"type":"element","tag":"pre","props":{"className":"language-sh shiki shiki-themes github-light","code":"doctl compute image list --public | grep ubuntu-22\n\n# 118857366 22.04 (LTS) x64 snapshot Ubuntu ubuntu-22-04-x64 true 7\n# 119383150 22.10 x64 snapshot Ubuntu ubuntu-22-10-x64 true 7\n","language":"sh","meta":"","style":""},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line","line":1},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"doctl"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" compute"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" image"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" list"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" --public"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":" |"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":" grep"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" ubuntu-22\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":2},"children":[{"type":"element","tag":"span","props":{"emptyLinePlaceholder":true},"children":[{"type":"text","value":"\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":3},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6A737D"},"children":[{"type":"text","value":"# 118857366 22.04 (LTS) x64 snapshot Ubuntu ubuntu-22-04-x64 true 7\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":4},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6A737D"},"children":[{"type":"text","value":"# 119383150 22.10 x64 snapshot Ubuntu ubuntu-22-10-x64 true 7\n"}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"And also the slug of the compute size:"}]},{"type":"element","tag":"pre","props":{"className":"language-sh shiki shiki-themes github-light","code":"doctl compute size list\n\n# Slug Description Memory VCPUs Disk Price Monthly Price Hourly\n# s-1vcpu-512mb-10gb Basic 512 1 10 4.00 0.005950\n# s-1vcpu-1gb Basic 1024 1 25 6.00 0.008930\n# s-1vcpu-1gb-amd Basic AMD 1024 1 25 7.00 0.010420\n# s-1vcpu-1gb-intel Basic Intel 1024 1 25 7.00 0.010420\n# s-1vcpu-2gb Basic 2048 1 50 12.00 0.017860\n# s-1vcpu-2gb-amd Basic AMD 2048 1 50 14.00 0.020830\n","language":"sh","meta":"","style":""},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line","line":1},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"doctl"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" compute"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" size"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" list\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":2},"children":[{"type":"element","tag":"span","props":{"emptyLinePlaceholder":true},"children":[{"type":"text","value":"\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":3},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6A737D"},"children":[{"type":"text","value":"# Slug Description Memory VCPUs Disk Price Monthly Price Hourly\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":4},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6A737D"},"children":[{"type":"text","value":"# s-1vcpu-512mb-10gb Basic 512 1 10 4.00 0.005950\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":5},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6A737D"},"children":[{"type":"text","value":"# s-1vcpu-1gb Basic 1024 1 25 6.00 0.008930\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":6},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6A737D"},"children":[{"type":"text","value":"# s-1vcpu-1gb-amd Basic AMD 1024 1 25 7.00 0.010420\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":7},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6A737D"},"children":[{"type":"text","value":"# s-1vcpu-1gb-intel Basic Intel 1024 1 25 7.00 0.010420\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":8},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6A737D"},"children":[{"type":"text","value":"# s-1vcpu-2gb Basic 2048 1 50 12.00 0.017860\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":9},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6A737D"},"children":[{"type":"text","value":"# s-1vcpu-2gb-amd Basic AMD 2048 1 50 14.00 0.020830\n"}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"I've also configured a few SSH keys with Digital Ocean, and I can have the key (specified by ID) provisioned to the machine using the "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"--ssh-keys"}]},{"type":"text","value":" flag."}]},{"type":"element","tag":"pre","props":{"className":"language-sh shiki shiki-themes github-light","code":"doctl compute ssh-key list\n\n# ID Name FingerPrint\n# 1234 mini \n","language":"sh","meta":"","style":""},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line","line":1},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"doctl"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" compute"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" ssh-key"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" list\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":2},"children":[{"type":"element","tag":"span","props":{"emptyLinePlaceholder":true},"children":[{"type":"text","value":"\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":3},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6A737D"},"children":[{"type":"text","value":"# ID Name FingerPrint\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":4},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6A737D"},"children":[{"type":"text","value":"# 1234 mini \n"}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Also, I wanted to install a few packages to the box upon creation, this can be done easily with the "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"--user-data-file"}]},{"type":"text","value":" flag to run an initialization script."}]},{"type":"element","tag":"pre","props":{"className":"language-sh shiki shiki-themes github-light","code":"echo 'apt install -y imagemagick zip' > bootstrap.sh\n","language":"sh","meta":"","style":""},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line","line":1},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":"echo"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" 'apt install -y imagemagick zip'"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":" >"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" bootstrap.sh\n"}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Putting it all together, here is the simple command for creating a small compute instance!"}]},{"type":"element","tag":"pre","props":{"className":"language-sh shiki shiki-themes github-light","code":"doctl compute droplet create \\\n --image ubuntu-22-10-x64 \\\n --size s-1vcpu-512mb-10gb \\\n --region nyc1 \\\n --ssh-keys 1234 \\\n --user-data-file boostrap.sh \\\n ephemeral\n","language":"sh","meta":"","style":""},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line","line":1},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"doctl"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" compute"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" droplet"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" create"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" \\\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":2},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" --image"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" ubuntu-22-10-x64"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" \\\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":3},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" --size"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" s-1vcpu-512mb-10gb"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" \\\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":4},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" --region"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" nyc1"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" \\\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":5},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" --ssh-keys"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" 1234"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" \\\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":6},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" --user-data-file"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" boostrap.sh"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" \\\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":7},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" ephemeral\n"}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Finally, I can connect, do my thing, and destroy the instance."}]},{"type":"element","tag":"pre","props":{"className":"language-sh shiki shiki-themes github-light","code":"doctl compute ssh ephemeral\n","language":"sh","meta":"","style":""},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line","line":1},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"doctl"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" compute"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" ssh"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" ephemeral\n"}]}]}]}]},{"type":"element","tag":"pre","props":{"className":"language-sh shiki shiki-themes github-light","code":"doctl compute droplet delete --force ephemeral\n","language":"sh","meta":"","style":""},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line","line":1},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"doctl"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" compute"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" droplet"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" delete"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" --force"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" ephemeral\n"}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"All-in-all, I was up and running in about 20 minutes. What a handy utility!"}]},{"type":"element","tag":"style","props":{},"children":[{"type":"text","value":"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:articles:doctl.md","_source":"content","_file":"articles/doctl.md","_stem":"articles/doctl","_extension":"md"},{"_path":"/articles/fennel-initial-exploration","_dir":"articles","_draft":false,"_partial":false,"_locale":"","title":"Impressions of Fennel with Hammerspoon","description":"A while back I read an introductory book on Lisp programming titled, \"The Little\nSchemer\". This book opened my mind to new (to me) programming paradigms, and left me\nwith a strong desire to find a way to incorporate Lisp programming into my every day\nlife. It took some time, but I believe I've found what I've been looking for: Fennel.","draft":false,"date":"2023-10-22","tags":["lisp","hammerspoon","fennel"],"categories":["lisp"],"cover_image":"/images/dall-e-fennel-hammer.jpeg","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"A while back I read an introductory book on Lisp programming titled, \"The Little\nSchemer\". This book opened my mind to new (to me) programming paradigms, and left me\nwith a strong desire to find a way to incorporate Lisp programming into my every day\nlife. It took some time, but I believe I've found what I've been looking for: Fennel."}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"A while back I read an introductory book on Lisp programming titled, \"The Little\nSchemer\". This book opened my mind to new (to me) programming paradigms, and left me\nwith a strong desire to find a way to incorporate Lisp programming into my every day\nlife. It took some time, but I believe I've found what I've been looking for: Fennel."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"The "},{"type":"element","tag":"a","props":{"href":"https://fennel-lang.org/","rel":["nofollow"]},"children":[{"type":"text","value":"Fennel"}]},{"type":"text","value":" programming language is a dialect of Lisp that boasts compatibility with\nLua, and it just so happens that two of my favorite applications are configured with\nexactly that language: "},{"type":"element","tag":"a","props":{"href":"https://www.hammerspoon.org/","rel":["nofollow"]},"children":[{"type":"text","value":"Hammerspoon"}]},{"type":"text","value":", and "},{"type":"element","tag":"a","props":{"href":"https://neovim.io/","rel":["nofollow"]},"children":[{"type":"text","value":"Neovim"}]},{"type":"text","value":"."}]},{"type":"element","tag":"h2","props":{"id":"initial-observations"},"children":[{"type":"text","value":"Initial Observations"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"To initially explore Fennel, I wanted to start small. My Hammerspoon configuration\nconsists of 7 "},{"type":"element","tag":"a","props":{"href":"https://github.com/cmpadden/dotfiles/tree/795749fa17e1310bb001bb7deaa22be8689f0027/hammerspoon/.hammerspoon/modules","rel":["nofollow"]},"children":[{"type":"text","value":"modules"}]},{"type":"text","value":" that I use for operations such as: launching applications,\nmanaging windows, keeping my computer from going to sleep, and general operating system\nautomation. So the plan is to translate these modules into Fennel, while maintaining\nwithout breaking the existing functionality. However, at this point, I wasn't even sure\nhow to embed Fennel into my project..."}]},{"type":"element","tag":"h2","props":{"id":"integrating-fennel-with-hammerspoon"},"children":[{"type":"text","value":"Integrating Fennel with Hammerspoon"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"While official documentation exists describing how to "},{"type":"element","tag":"a","props":{"href":"https://fennel-lang.org/setup#embedding-fennel","rel":["nofollow"]},"children":[{"type":"text","value":"embed fennel"}]},{"type":"text","value":" into your\nproject; it didn't provide me with enough clarity to know my next steps on integrating\nit with Hammerspoon. I found a few resources online demonstrating how to extend the\n"},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"package.path"}]},{"type":"text","value":" and "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"package.cpath"}]},{"type":"text","value":" properties in Lua, but I was unable to get this to\nwork."}]},{"type":"element","tag":"ul","props":{},"children":[{"type":"element","tag":"li","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://blog.exupero.org/hammerspoon-with-fennel/","rel":["nofollow"]},"children":[{"type":"text","value":"https://blog.exupero.org/hammerspoon-with-fennel/"}]}]},{"type":"element","tag":"li","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://github.com/Hammerspoon/hammerspoon/issues/2377#issuecomment-636331435","rel":["nofollow"]},"children":[{"type":"text","value":"https://github.com/Hammerspoon/hammerspoon/issues/2377#issuecomment-636331435"}]}]},{"type":"element","tag":"li","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://github.com/agzam/spacehammer/blob/master/init.lua","rel":["nofollow"]},"children":[{"type":"text","value":"https://github.com/agzam/spacehammer/blob/master/init.lua"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Ultimately, I opted to include the "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"fennel.lua"}]},{"type":"text","value":" file to my Hammerspoon configuration,\nand while not ideal, it does make the configuration nicely self-contained. I'll leave it\nas a future task to include the module installed with LuaRocks."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"With Fennel now included in my Hammerspoon configuration, all I need to do is configure\nthe "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"fennel.path"}]},{"type":"text","value":" to point to the "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"*.fnl"}]},{"type":"text","value":" files in the "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":".hammerspoon/"}]},{"type":"text","value":" directory, and\nttranslating these modules can begin!"}]},{"type":"element","tag":"pre","props":{"className":"language-lua shiki shiki-themes github-light","code":"-- init.lua\n\nlocal fennel = require('fennel')\n\nfennel.path = package.path .. \";\" .. os.getenv(\"HOME\") .. \"/.hammerspoon/?.fnl\"\n\ntable.insert(package.loaders or package.searchers, fennel.searcher)\n\nrequire 'main'\n","language":"lua","meta":"","style":""},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line","line":1},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6A737D"},"children":[{"type":"text","value":"-- init.lua\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":2},"children":[{"type":"element","tag":"span","props":{"emptyLinePlaceholder":true},"children":[{"type":"text","value":"\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":3},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":"local"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" fennel "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" require"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":"'fennel'"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":")\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":4},"children":[{"type":"element","tag":"span","props":{"emptyLinePlaceholder":true},"children":[{"type":"text","value":"\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":5},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"fennel."}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"path"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":" ="}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" package.path"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":" .."}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" \";\" "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":".."}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" os.getenv"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":"\"HOME\""}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":".."}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" \"/.hammerspoon/?.fnl\"\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":6},"children":[{"type":"element","tag":"span","props":{"emptyLinePlaceholder":true},"children":[{"type":"text","value":"\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":7},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":"table.insert"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":"package.loaders"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":" or"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" package.searchers"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":", fennel."}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"searcher"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":")\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":8},"children":[{"type":"element","tag":"span","props":{"emptyLinePlaceholder":true},"children":[{"type":"text","value":"\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":9},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":"require"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" 'main'\n"}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"translating-lua-to-fennel"},"children":[{"type":"text","value":"Translating Lua to Fennel"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"As a Fennel novice, I was happy to see that the Fennel project provides an online\ncross-compiler for Lua and Fennel called "},{"type":"element","tag":"a","props":{"href":"https://fennel-lang.org/see","rel":["nofollow"]},"children":[{"type":"text","value":"anti-fennel"}]},{"type":"text","value":", and while it can generate some\nstrange-looking Fennel code, it was an extremely useful tool for me to get\nup-and-running right away. For example, by pasting the simple "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"sleep"}]},{"type":"text","value":" function\nfrom the "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"helpers"}]},{"type":"text","value":" module into the compiler:"}]},{"type":"element","tag":"pre","props":{"className":"language-lua shiki shiki-themes github-light","code":"function sleep(ms)\n os.execute(\"sleep \" .. tonumber(ms) / 1000)\nend\n","language":"lua","meta":"","style":""},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line","line":1},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":"function"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":" sleep"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"(ms)\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":2},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" os.execute"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":"\"sleep \" "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":".."}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" tonumber"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"(ms) "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":"/"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" 1000"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":")\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":3},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":"end\n"}]}]}]}]},{"type":"element","tag":"pre","props":{"className":"language-lisp shiki shiki-themes github-light","code":"(fn sleep [ms]\n (os.execute (.. \"sleep \" (/ (tonumber ms) 1000))))\n","language":"lisp","meta":"","style":""},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line","line":1},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"(fn "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":"sleep"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" [ms]\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":2},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" (os.execute (.. "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":"\"sleep \""}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":"/"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" (tonumber ms) "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":"1000"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"))))\n"}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"As another example, here is the output for my "},{"type":"element","tag":"em","props":{},"children":[{"type":"text","value":"caffeine"}]},{"type":"text","value":" toggle:"}]},{"type":"element","tag":"pre","props":{"className":"language-lua shiki shiki-themes github-light","code":"hs.hotkey.bind(HYPER, \"0\", function()\n hs.caffeinate.toggle(\"displayIdle\")\n if hs.caffeinate.get(\"displayIdle\") then\n helpers:show(\"Caffeine Enabled\", nil, helpers.styles.success, helpers.assets.check)\n else\n helpers:show(\"Caffeine Disabled\", nil, helpers.styles.error, helpers.assets.ban)\n end\nend)\n","language":"lua","meta":"","style":""},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line","line":1},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"hs."}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"hotkey"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":"bind"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"(HYPER, "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":"\"0\""}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":"function"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"()\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":2},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" hs."}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"caffeinate"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":"toggle"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":"\"displayIdle\""}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":")\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":3},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":" if"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" hs."}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"caffeinate"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":"get"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":"\"displayIdle\""}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":"then\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":4},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":" helpers"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":"show"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":"\"Caffeine Enabled\""}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":"nil"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":", helpers."}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"styles"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"success"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":", helpers."}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"assets"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"check"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":")\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":5},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":" else\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":6},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":" helpers"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":"show"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":"\"Caffeine Disabled\""}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":"nil"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":", helpers."}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"styles"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"error"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":", helpers."}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"assets"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"ban"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":")\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":7},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":" end\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":8},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":"end"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":")\n"}]}]}]}]},{"type":"element","tag":"pre","props":{"className":"language-lisp shiki shiki-themes github-light","code":"(hs.hotkey.bind HYPER :0\n (fn [] (hs.caffeinate.toggle :displayIdle)\n (if (hs.caffeinate.get :displayIdle)\n (helpers:show \"Caffeine Enabled\" nil helpers.styles.success helpers.assets.check)\n (helpers:show \"Caffeine Disabled\" nil helpers.styles.error helpers.assets.ban)))) \n","language":"lisp","meta":"","style":""},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line","line":1},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"(hs.hotkey.bind HYPER "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":":0\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":2},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" (fn [] (hs.caffeinate.toggle "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":":displayIdle"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":")\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":3},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":"if"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" (hs.caffeinate.get "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":":displayIdle"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":")\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":4},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":"helpers"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":":show "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":"\"Caffeine Enabled\""}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" nil"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" helpers.styles.success helpers.assets.check)\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":5},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":"helpers"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":":show "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":"\"Caffeine Disabled\""}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" nil"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" helpers.styles.error helpers.assets.ban))))\n"}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This was especially helpful for more gnarly modules like the "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"window"}]},{"type":"text","value":" module used for\nwindow management, and seeing the Lua and Fennel code side-by-side was a kick starter in\nlearning the language!"}]},{"type":"element","tag":"h2","props":{"id":"next-steps"},"children":[{"type":"text","value":"Next Steps"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"While my Fennel Hammerspoon configuration now works with parity to its Lua counterpart,\nI have not yet added new features or modules. I look forward to writing new Fennel code,\nand deepen my understanding of Lisp and the Fennel programming language."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Additionally, before beginning this endeavor, I was already aware of projects like\n"},{"type":"element","tag":"a","props":{"href":"https://github.com/agzam/spacehammer","rel":["nofollow"]},"children":[{"type":"text","value":"spacehammer"}]},{"type":"text","value":"; a wildly impressive Hammerspoon configuration written in Fennel, but,\nI wanted to start small and learn the integration myself. However, with the basics out\nof the way, I hope to explore this project further, and seek lessons-learned for the\nconfiguration of my own."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"The full pull-request for translating my Lua Hammerspoon configuration to Fennel can be\nfound here: "},{"type":"element","tag":"a","props":{"href":"https://github.com/cmpadden/dotfiles/pull/19/files","rel":["nofollow"]},"children":[{"type":"text","value":"https://github.com/cmpadden/dotfiles/pull/19/files"}]}]},{"type":"element","tag":"style","props":{},"children":[{"type":"text","value":"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[{"id":"initial-observations","depth":2,"text":"Initial Observations"},{"id":"integrating-fennel-with-hammerspoon","depth":2,"text":"Integrating Fennel with Hammerspoon"},{"id":"translating-lua-to-fennel","depth":2,"text":"Translating Lua to Fennel"},{"id":"next-steps","depth":2,"text":"Next Steps"}]}},"_type":"markdown","_id":"content:articles:fennel-initial-exploration.md","_source":"content","_file":"articles/fennel-initial-exploration.md","_stem":"articles/fennel-initial-exploration","_extension":"md"},{"_path":"/articles/migrate-truenas-from-core-to-scale","_dir":"articles","_draft":false,"_partial":false,"_locale":"","title":"Migrate to TrueNAS Scale from TrueNAS Core","description":"TrueNAS Scale offers a variety of interesting features that are not supported in its TrueNAS Core counterpart. Most notably, because the base operating system is Debian Linux, opposed to FreeBSD, there is native support for Linux containers via Docker, and Kubernetes Pods! This post walks through the steps required to upgrade from TrueNAS Core to TrueNAS Scale.","date":"2021-12-28","tags":["homelab","supermicro","truenas"],"categories":["homelab"],"excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"TrueNAS Scale offers a variety of interesting features that are not supported in its TrueNAS Core counterpart. Most notably, because the base operating system is Debian Linux, opposed to FreeBSD, there is native support for Linux containers via Docker, and Kubernetes Pods! This post walks through the steps required to upgrade from TrueNAS Core to TrueNAS Scale."}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"TrueNAS Scale offers a variety of interesting features that are not supported in its TrueNAS Core counterpart. Most notably, because the base operating system is Debian Linux, opposed to FreeBSD, there is native support for Linux containers via Docker, and Kubernetes Pods! This post walks through the steps required to upgrade from TrueNAS Core to TrueNAS Scale."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Thankfully, the upgrade procedure to migrate from TrueNAS Core to TrueNAS Scale is relatively straight forward. All it requires is to create a bootable USB of the TrueNAS Scale image, boot the USB, and select "},{"type":"element","tag":"em","props":{},"children":[{"type":"text","value":"Install/Upgrade"}]},{"type":"text","value":" in the installation wizard. But for the sake of being thorough, you can find instructions on how to backup system configurations and install the OS below."}]},{"type":"element","tag":"ol","props":{},"children":[{"type":"element","tag":"li","props":{},"children":[{"type":"text","value":"Make a backup of your system’s configuration\n"},{"type":"element","tag":"ol","props":{},"children":[{"type":"element","tag":"li","props":{},"children":[{"type":"text","value":"Navigate to "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"System > General"}]}]},{"type":"element","tag":"li","props":{},"children":[{"type":"text","value":"Click "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"Save Config"}]},{"type":"text","value":", check the "},{"type":"element","tag":"em","props":{},"children":[{"type":"text","value":"Export Secret Seed"}]},{"type":"text","value":" box, and click "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"Save"}]}]}]}]},{"type":"element","tag":"li","props":{},"children":[{"type":"text","value":"Export dataset keys for the encrypted pools\n"},{"type":"element","tag":"ol","props":{},"children":[{"type":"element","tag":"li","props":{},"children":[{"type":"text","value":"Navigate to "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"Storage > Pools"}]}]},{"type":"element","tag":"li","props":{},"children":[{"type":"text","value":"Click the cog icon, and select "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"Export Dataset Keys"}]}]}]}]},{"type":"element","tag":"li","props":{},"children":[{"type":"text","value":"Insert the TrueNAS Core bootable USB into the NAS"}]},{"type":"element","tag":"li","props":{},"children":[{"type":"text","value":"From the Supermicro IPMI interface select "},{"type":"element","tag":"em","props":{},"children":[{"type":"text","value":"Remote Control"}]},{"type":"text","value":" and "},{"type":"element","tag":"em","props":{},"children":[{"type":"text","value":"iKVM/HTML5"}]},{"type":"text","value":" and select "},{"type":"element","tag":"em","props":{},"children":[{"type":"text","value":"Reboot"}]}]},{"type":"element","tag":"li","props":{},"children":[{"type":"text","value":"Select the bootable USB as the boot device"}]},{"type":"element","tag":"li","props":{},"children":[{"type":"text","value":"From the TrueNAS installation wizard, select "},{"type":"element","tag":"em","props":{},"children":[{"type":"text","value":"Install/Upgrade"}]},{"type":"text","value":", select the drive that contains the TrueNAS installation, and select "},{"type":"element","tag":"em","props":{},"children":[{"type":"text","value":"Upgrade Install"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Reboot the device, and voila — you should be up-and-running! Give the system a quick rundown to validate that your settings and pools have transferred correctly, and then enjoy all the container goodness!"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"For a breakdown of the differences between TrueNAS Core, Enterprise, and Scale, you can reference "},{"type":"element","tag":"a","props":{"href":"https://www.truenas.com/help-me-choose/","rel":["nofollow"]},"children":[{"type":"text","value":"this table"}]},{"type":"text","value":"."}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:articles:migrate-truenas-from-core-to-scale.md","_source":"content","_file":"articles/migrate-truenas-from-core-to-scale.md","_stem":"articles/migrate-truenas-from-core-to-scale","_extension":"md"},{"_path":"/articles/nuxt-content-rss-feed","_dir":"articles","_draft":false,"_partial":false,"_locale":"","title":"How To Add an RSS Feed to a Nuxt Website","description":"If you are a user of Nuxt Content and you wish to configure an RSS feed for your website, it's a surprisingly straight forward process! In this article, we will walk through the code changes required to host an RSS feed for both a statically generated, and Universal Nuxt application.","draft":false,"date":"2024-01-06","tags":["nuxt","rss"],"categories":["programming"],"cover_image":"/images/nuxt-content-rss-feed.jpg","excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"If you are a user of "},{"type":"element","tag":"a","props":{"href":"https://content.nuxt.com/","rel":["nofollow"]},"children":[{"type":"text","value":"Nuxt Content"}]},{"type":"text","value":" and you wish to configure an RSS feed for your website, it's a surprisingly straight forward process! In this article, we will walk through the code changes required to host an RSS feed for both a statically generated, and Universal Nuxt application."}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"If you are a user of "},{"type":"element","tag":"a","props":{"href":"https://content.nuxt.com/","rel":["nofollow"]},"children":[{"type":"text","value":"Nuxt Content"}]},{"type":"text","value":" and you wish to configure an RSS feed for your website, it's a surprisingly straight forward process! In this article, we will walk through the code changes required to host an RSS feed for both a statically generated, and Universal Nuxt application."}]},{"type":"element","tag":"h2","props":{"id":"preface"},"children":[{"type":"text","value":"Preface"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"In version 2 of Nuxt, the community module, "},{"type":"element","tag":"a","props":{"href":"https://github.com/nuxt-community/feed-module","rel":["nofollow"]},"children":[{"type":"text","value":"nuxt-community/feed-module"}]},{"type":"text","value":" was a popular choice for adding an RSS feed to your website. However, there has been an unresolved "},{"type":"element","tag":"a","props":{"href":"https://github.com/nuxt-community/feed-module/issues/106","rel":["nofollow"]},"children":[{"type":"text","value":"open issue"}]},{"type":"text","value":" since April 1st, 2022 to add support for Nuxt v3. Thankfully, implementing this feature without a module is relatively straight forward."}]},{"type":"element","tag":"h2","props":{"id":"instructions"},"children":[{"type":"text","value":"Instructions"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"First, install the "},{"type":"element","tag":"a","props":{"href":"https://www.npmjs.com/package/feed","rel":["nofollow"]},"children":[{"type":"text","value":"feed"}]},{"type":"text","value":" library into your project:"}]},{"type":"element","tag":"pre","props":{"className":"language-shell shiki shiki-themes github-light","code":"npm i -D feed\n","language":"shell","meta":"","style":""},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line","line":1},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"npm"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" i"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" -D"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" feed\n"}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Then, create a "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"server/"}]},{"type":"text","value":" folder in your project if it does not already exist, and create a file named "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"server/routes/atom.ts"}]},{"type":"text","value":"."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Here, we will leverage the "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"feed"}]},{"type":"text","value":" library and construct an XML representation of our Nuxt content. As you can see, we first define our "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"feed"}]},{"type":"text","value":" with metadata associated with our RSS feed. This will be used by RSS readers to provide context to the end user. Then, we query our Nuxt content with "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"serverQueryContent"}]},{"type":"text","value":" and append a "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"feed.addItem"}]},{"type":"text","value":" for each article."}]},{"type":"element","tag":"pre","props":{"className":"language-ts shiki shiki-themes github-light","code":"import { serverQueryContent } from '#content/server';\nimport { Feed } from 'feed';\n\nconst BASE_URL = \"https://mywebsite.com\"\nconst AUTHOR_NAME = \"Firstname Lastname\"\n\nexport default defineEventHandler(async (event) => {\n\n const feed = new Feed({\n title: \"My Title\",\n description: \"My Description\",\n id: BASE_URL,\n link: BASE_URL,\n language: \"en\",\n image: `${BASE_URL}/images/placeholder.png`,\n favicon: `${BASE_URL}/favicon.ico`,\n copyright: `All rights reserved ${new Date().getFullYear()}, ${AUTHOR_NAME}`,\n updated: new Date(),\n generator: \"Nuxt static site generation + Feed for Node.js\",\n feedLinks: {\n atom: `${BASE_URL}/atom`\n },\n author: {\n name: AUTHOR_NAME,\n }\n });\n\n const articles = await serverQueryContent(event).find();\n\n articles.forEach((article) => {\n feed.addItem({\n title: article.title ? article.title : \"Missing Title\",\n id: article._path,\n link: `${BASE_URL}${article._path}`,\n description: article.description,\n author: [\n {\n name: AUTHOR_NAME,\n },\n ],\n date: new Date(article.date),\n image: article.cover_image ? `${BASE_URL}/${article.cover_image}` : undefined\n });\n });\n\n return feed.atom1();\n});\n","language":"ts","meta":"","style":""},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line","line":1},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" { serverQueryContent } "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" '#content/server'"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":";\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":2},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" { Feed } "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" 'feed'"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":";\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":3},"children":[{"type":"element","tag":"span","props":{"emptyLinePlaceholder":true},"children":[{"type":"text","value":"\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":4},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" BASE_URL"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":" ="}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" \"https://mywebsite.com\"\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":5},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":"const"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" AUTHOR_NAME"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":" ="}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" \"Firstname Lastname\"\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":6},"children":[{"type":"element","tag":"span","props":{"emptyLinePlaceholder":true},"children":[{"type":"text","value":"\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":7},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":"export"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":" default"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":" defineEventHandler"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":"async"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#E36209"},"children":[{"type":"text","value":"event"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" {\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":8},"children":[{"type":"element","tag":"span","props":{"emptyLinePlaceholder":true},"children":[{"type":"text","value":"\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":9},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":" const"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" feed"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":" ="}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":" new"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":" Feed"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"({\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":10},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" title: "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":"\"My Title\""}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":",\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":11},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" description: "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":"\"My Description\""}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":",\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":12},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" id: "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":"BASE_URL"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":",\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":13},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" link: "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":"BASE_URL"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":",\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":14},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" language: "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":"\"en\""}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":",\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":15},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" image: "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":"`${"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":"BASE_URL"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":"}/images/placeholder.png`"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":",\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":16},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" favicon: "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":"`${"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":"BASE_URL"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":"}/favicon.ico`"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":",\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":17},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" copyright: "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":"`All rights reserved ${"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":" Date"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":"()."}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"getFullYear"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":"()"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":"}, ${"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":"AUTHOR_NAME"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":"}`"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":",\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":18},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" updated: "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":" Date"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"(),\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":19},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" generator: "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":"\"Nuxt static site generation + Feed for Node.js\""}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":",\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":20},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" feedLinks: {\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":21},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" atom: "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":"`${"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":"BASE_URL"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":"}/atom`\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":22},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" },\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":23},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" author: {\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":24},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" name: "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":"AUTHOR_NAME"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":",\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":25},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" }\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":26},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" });\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":27},"children":[{"type":"element","tag":"span","props":{"emptyLinePlaceholder":true},"children":[{"type":"text","value":"\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":28},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":" const"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" articles"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":" ="}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":" await"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":" serverQueryContent"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"(event)."}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"find"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"();\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":29},"children":[{"type":"element","tag":"span","props":{"emptyLinePlaceholder":true},"children":[{"type":"text","value":"\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":30},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" articles."}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"forEach"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"(("}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#E36209"},"children":[{"type":"text","value":"article"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" {\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":31},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" feed."}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"addItem"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"({\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":32},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" title: article.title "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":"?"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" article.title "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":":"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" \"Missing Title\""}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":",\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":33},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" id: article._path,\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":34},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" link: "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":"`${"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":"BASE_URL"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":"}${"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"article"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"_path"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":"}`"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":",\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":35},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" description: article.description,\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":36},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" author: [\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":37},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" {\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":38},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" name: "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":"AUTHOR_NAME"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":",\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":39},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" },\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":40},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" ],\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":41},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" date: "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":"new"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":" Date"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"(article.date),\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":42},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" image: article.cover_image "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":"?"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" `${"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":"BASE_URL"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":"}/${"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"article"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"cover_image"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":"}`"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":" :"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" undefined\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":43},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" });\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":44},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" });\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":45},"children":[{"type":"element","tag":"span","props":{"emptyLinePlaceholder":true},"children":[{"type":"text","value":"\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":46},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":" return"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" feed."}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"atom1"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"();\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":47},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"});\n"}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"And that's just about it! Except, if you are statically generating your website with the "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"nuxt generate"}]},{"type":"text","value":" command, you will need to configure this server-side route to be pre-rendered on site generation. This is as simple as adding a "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"nitro"}]},{"type":"text","value":" "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"prerender"}]},{"type":"text","value":" definition in your "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"nuxt.config.ts"}]},{"type":"text","value":" file, like so:"}]},{"type":"element","tag":"pre","props":{"className":"language-ts shiki shiki-themes github-light","code":"nitro: {\n prerender: {\n routes: ['/atom']\n }\n}\n","language":"ts","meta":"","style":""},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line","line":1},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"nitro"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":": {\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":2},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":" prerender"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":": {\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":3},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":" routes"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":": ["}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":"'/atom'"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"]\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":4},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" }\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":5},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"}\n"}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"bonus"},"children":[{"type":"text","value":"Bonus"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"You may also be interested in adding a "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"sitemap.xml"}]},{"type":"text","value":" to your website. This can be done in almost an identical fashion!"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Install the dependency:"}]},{"type":"element","tag":"pre","props":{"className":"language-shell shiki shiki-themes github-light","code":"npm i -D sitemap\n","language":"shell","meta":"","style":""},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line","line":1},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"npm"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" i"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" -D"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" sitemap\n"}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Create a route at "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"server/routes/sitemap.xml.ts"}]},{"type":"text","value":":"}]},{"type":"element","tag":"pre","props":{"className":"language-ts shiki shiki-themes github-light","code":"import { serverQueryContent } from '#content/server';\nimport { SitemapStream, streamToPromise } from 'sitemap';\n\nexport default defineEventHandler(async (event) => {\n const articles = await serverQueryContent(event).find();\n\n const sitemap = new SitemapStream({ hostname: 'https://my-website.com/' });\n\n // Add non nuxt content endpoints here\n sitemap.write({ url: '/' });\n sitemap.write({ url: '/articles' });\n\n // Dynamically generate routes for Nuxt markdown content\n articles.forEach((article) => sitemap.write({ url: article._path, changefreq: 'monthly' }));\n sitemap.end();\n\n return (await streamToPromise(sitemap));\n});\n","language":"ts","meta":"","style":""},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line","line":1},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" { serverQueryContent } "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" '#content/server'"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":";\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":2},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" { SitemapStream, streamToPromise } "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" 'sitemap'"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":";\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":3},"children":[{"type":"element","tag":"span","props":{"emptyLinePlaceholder":true},"children":[{"type":"text","value":"\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":4},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":"export"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":" default"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":" defineEventHandler"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":"async"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#E36209"},"children":[{"type":"text","value":"event"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" {\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":5},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":" const"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" articles"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":" ="}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":" await"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":" serverQueryContent"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"(event)."}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"find"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"();\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":6},"children":[{"type":"element","tag":"span","props":{"emptyLinePlaceholder":true},"children":[{"type":"text","value":"\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":7},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":" const"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" sitemap"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":" ="}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":" new"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":" SitemapStream"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"({ hostname: "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":"'https://my-website.com/'"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" });\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":8},"children":[{"type":"element","tag":"span","props":{"emptyLinePlaceholder":true},"children":[{"type":"text","value":"\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":9},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6A737D"},"children":[{"type":"text","value":" // Add non nuxt content endpoints here\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":10},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" sitemap."}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"write"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"({ url: "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":"'/'"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" });\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":11},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" sitemap."}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"write"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"({ url: "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":"'/articles'"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" });\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":12},"children":[{"type":"element","tag":"span","props":{"emptyLinePlaceholder":true},"children":[{"type":"text","value":"\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":13},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6A737D"},"children":[{"type":"text","value":" // Dynamically generate routes for Nuxt markdown content\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":14},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" articles."}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"forEach"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"(("}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#E36209"},"children":[{"type":"text","value":"article"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":"=>"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" sitemap."}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"write"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"({ url: article._path, changefreq: "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":"'monthly'"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" }));\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":15},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" sitemap."}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"end"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"();\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":16},"children":[{"type":"element","tag":"span","props":{"emptyLinePlaceholder":true},"children":[{"type":"text","value":"\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":17},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":" return"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" ("}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":"await"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":" streamToPromise"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"(sitemap));\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":18},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"});\n"}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"And add the "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"prerender"}]},{"type":"text","value":" entry in your "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"nuxt.config.ts"}]},{"type":"text","value":":"}]},{"type":"element","tag":"pre","props":{"className":"language-ts shiki shiki-themes github-light","code":"nitro: {\n prerender: {\n routes: ['/sitemap.xml', '/atom']\n }\n}\n","language":"ts","meta":"","style":""},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line","line":1},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"nitro"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":": {\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":2},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":" prerender"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":": {\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":3},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":" routes"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":": ["}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":"'/sitemap.xml'"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":"'/atom'"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"]\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":4},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" }\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":5},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"}\n"}]}]}]}]},{"type":"element","tag":"style","props":{},"children":[{"type":"text","value":"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[{"id":"preface","depth":2,"text":"Preface"},{"id":"instructions","depth":2,"text":"Instructions"},{"id":"bonus","depth":2,"text":"Bonus"}]}},"_type":"markdown","_id":"content:articles:nuxt-content-rss-feed.md","_source":"content","_file":"articles/nuxt-content-rss-feed.md","_stem":"articles/nuxt-content-rss-feed","_extension":"md"},{"_path":"/articles/nuxt-v3-migration","_dir":"articles","_draft":false,"_partial":false,"_locale":"","title":"This Website Has Been Migrated to Nuxt 3 🎉","description":"This website has been migrated to the latest version of the Nuxt web framework, and with it comes all of the exciting goodies that the Vue and Nuxt teams have been concocting over the past few years.\nNot to mention, all of the great plugins in the Vue ecosystem!","date":"2022-12-31","tags":["nuxt"],"categories":["web"],"excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This website has been migrated to the latest version of the Nuxt web framework, and with it comes all of the exciting goodies that the Vue and Nuxt teams have been concocting over the past few years.\nNot to mention, all of the great plugins in the Vue ecosystem!"}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This website has been migrated to the latest version of the Nuxt web framework, and with it comes all of the exciting goodies that the Vue and Nuxt teams have been concocting over the past few years.\nNot to mention, all of the great plugins in the Vue ecosystem!"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"If you're curious what changes were required to make the migration, you can check out "},{"type":"element","tag":"a","props":{"href":"https://github.com/cmpadden/cmpadden.github.io/pull/3","rel":["nofollow"]},"children":[{"type":"text","value":"pull request #3"}]},{"type":"text","value":" in the GitHub repository."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"img","props":{"alt":"Screenshot of Nuxt Migration Pull Request","src":"/images/nuxt-migration-pr.png"},"children":[]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"While the documentation for making this migration is great, there were many breaking changes, and the overall process was quite tedious.\nFor this reason, I opted to generate a new project entirely, and port existing code to this clean slate.\nI believe that this resulted in a project with a bit less cruft."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"The most valuable resources for making these changes include:"}]},{"type":"element","tag":"ul","props":{},"children":[{"type":"element","tag":"li","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://nuxt.com/docs/migration/overview","rel":["nofollow"]},"children":[{"type":"text","value":"The Nuxt Migration Guide"}]}]},{"type":"element","tag":"li","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://nuxt.com/docs/getting-started/introduction","rel":["nofollow"]},"children":[{"type":"text","value":"The Nuxt Framework Guide"}]}]},{"type":"element","tag":"li","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://tailwindcss.nuxt.dev/","rel":["nofollow"]},"children":[{"type":"text","value":"Nuxt Tailwind Module Documentation"}]}]},{"type":"element","tag":"li","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://content.nuxtjs.org/","rel":["nofollow"]},"children":[{"type":"text","value":"Nuxt Content Module Documentation"}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Part of the delay for doing this upgrade was in waiting for module developers to support this major release.\nI'm super thankful for all of the hard work they've don, and I'm excited to explore all of the new features available!\nI just hope that the breaking changes in this release don't cause too much fracturing of the community, as it does feel like déjà vu of Python 2 and 3."}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:articles:nuxt-v3-migration.md","_source":"content","_file":"articles/nuxt-v3-migration.md","_stem":"articles/nuxt-v3-migration","_extension":"md"},{"_path":"/articles/persistent-archlinux-usb","_dir":"articles","_draft":false,"_partial":false,"_locale":"","title":"Create a Persistent Arch Linux Bootable USB with Vagrant","description":"When installing a linux distribution, it is common for the instructions to have\nthe user create a bootable USB, boot from the device, and proceed with the\ninstallation procedure from that live medium. However, this blog post will\noutline an alternative approach where a virtual machine created with Vagrant\nwill be used in favor of the live medium.","date":"2020-01-09","draft":false,"tags":["vagrant","archlinux"],"categories":["linux"],"excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"When installing a linux distribution, it is common for the instructions to have\nthe user create a bootable USB, boot from the device, and proceed with the\ninstallation procedure from that live medium. However, this blog post will\noutline an alternative approach where a virtual machine created with Vagrant\nwill be used in favor of the live medium."}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"When installing a linux distribution, it is common for the instructions to have\nthe user create a bootable USB, boot from the device, and proceed with the\ninstallation procedure from that live medium. However, this blog post will\noutline an alternative approach where a virtual machine created with Vagrant\nwill be used in favor of the live medium."}]},{"type":"element","tag":"h1","props":{"id":"preface"},"children":[{"type":"text","value":"Preface"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"The original intention was to use Docker for this process -- leveraging the\n"},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"--device"}]},{"type":"text","value":" flag and mounting the target USB device in the Docker container,\nbut the underlying hypervisor in Docker Desktop for Mac does not support this.\n"},{"type":"element","tag":"sup","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://docs.docker.com/docker-for-mac/docker-toolbox/","rel":["nofollow"]},"children":[{"type":"text","value":"1"}]},{"type":"text","value":" "},{"type":"element","tag":"a","props":{"href":"https://github.com/moby/hyperkit","rel":["nofollow"]},"children":[{"type":"text","value":"2"}]},{"type":"text","value":" "},{"type":"element","tag":"a","props":{"href":"https://github.com/docker/for-mac/issues/900","rel":["nofollow"]},"children":[{"type":"text","value":"3"}]}]},{"type":"text","value":" While there are workarounds using Docker\nMachine, Vagrant felt like the path of least resistance."}]},{"type":"element","tag":"h1","props":{"id":"instructions"},"children":[{"type":"text","value":"Instructions"}]},{"type":"element","tag":"h2","props":{"id":"create-an-arch-linux-virtual-machine-with-vagrant"},"children":[{"type":"text","value":"Create an Arch Linux Virtual Machine with Vagrant"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Get the latest Arch Linux image "},{"type":"element","tag":"sup","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://app.vagrantup.com/archlinux/boxes/archlinux","rel":["nofollow"]},"children":[{"type":"text","value":"4"}]}]},{"type":"text","value":" from the Vagrant Cloud Box\nCatalog."}]},{"type":"element","tag":"pre","props":{"code":"vagrant box add archlinux/archlinux\n","language":"bash","meta":"","className":"language-bash shiki shiki-themes github-light","style":""},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line","line":1},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"vagrant"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" box"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" add"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" archlinux/archlinux\n"}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Determine the USB vendor information for the thumb-drive that we will\npass-through to the virtual machine. Using the "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"VBoxManage"}]},{"type":"text","value":" utility that comes\nwith Virtual Box, list the devices, and make note of the Vendor and Product ID."}]},{"type":"element","tag":"pre","props":{"code":" VBoxManage list usbhost\n","language":"bash","meta":"","className":"language-bash shiki shiki-themes github-light","style":""},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line","line":1},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":" VBoxManage"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" list"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" usbhost\n"}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Create a "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"Vagrantfile"}]},{"type":"text","value":" with "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"archlinx/archlinux"}]},{"type":"text","value":" as the target box, and the USB\ndevice information that is passed through. "},{"type":"element","tag":"sup","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://antonyjepson.wordpress.com/2012/01/26/quickly-attaching-usb-devices-to-virtualbox-guests-using-vboxmanage/","rel":["nofollow"]},"children":[{"type":"text","value":"5"}]},{"type":"text","value":" "},{"type":"element","tag":"a","props":{"href":"https://gist.github.com/dscape/7d829c0c116ef419f963","rel":["nofollow"]},"children":[{"type":"text","value":"6"}]}]},{"type":"text","value":" Vagrant\noffers a handy customization parameter "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"vb.customize"}]},{"type":"text","value":" that calls the\n"},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"VBoxManage"}]},{"type":"text","value":" command under-the-hood, allowing one to enable the guest machine\nto access the host machine's USB devices."}]},{"type":"element","tag":"pre","props":{"code":"# -*- mode: ruby -*-\n# vi: set ft=ruby :\n\nVagrant.configure(\"2\") do |config|\n config.vm.box = \"archlinux/archlinux\"\n config.vm.provider \"virtualbox\" do |vb|\n vb.name = \"archlinux\"\n vb.customize ['modifyvm', :id, '--usb', 'on']\n vb.customize ['usbfilter', 'add', '1', '--target', :id, '--name', 'SanDisk Ultra Fit', '--vendorid', '0x0781', '--productid', '0x5583']\n end\nend\n","language":"txt","meta":"","className":"language-txt shiki shiki-themes github-light","style":""},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line","line":1},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":"# -*- mode: ruby -*-\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":2},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":"# vi: set ft=ruby :\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":3},"children":[{"type":"element","tag":"span","props":{"emptyLinePlaceholder":true},"children":[{"type":"text","value":"\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":4},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":"Vagrant.configure(\"2\") do |config|\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":5},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":" config.vm.box = \"archlinux/archlinux\"\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":6},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":" config.vm.provider \"virtualbox\" do |vb|\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":7},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":" vb.name = \"archlinux\"\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":8},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":" vb.customize ['modifyvm', :id, '--usb', 'on']\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":9},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":" vb.customize ['usbfilter', 'add', '1', '--target', :id, '--name', 'SanDisk Ultra Fit', '--vendorid', '0x0781', '--productid', '0x5583']\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":10},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":" end\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":11},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":"end\n"}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"When virtual machine is brought up, the "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"usbfilter"}]},{"type":"text","value":" is applied, and the guest\nis able to access to the host machine's USB device that was specified in the\nfilter."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Start the machine, "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"ssh"}]},{"type":"text","value":" into the guest, and list the devices to confirm that\nthe USB device is available (see: "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"/dev/sdb"}]},{"type":"text","value":")."}]},{"type":"element","tag":"pre","props":{"code":"$ vagrant up\n$ vagrant ssh\n[vagrant@archlinux ~]$ lsblk\nNAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT\nsda 8:0 0 20G 0 disk\n├─sda1 8:1 0 1.9G 0 part [SWAP]\n└─sda2 8:2 0 18.1G 0 part /\nsdb 8:16 1 28.7G 0 disk\n└─sdb1 8:17 1 8G 0 part\n","language":"bash","meta":"","className":"language-bash shiki shiki-themes github-light","style":""},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line","line":1},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" vagrant"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" up\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":2},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" vagrant"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" ssh\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":3},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"[vagrant@archlinux "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":"~"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"]$ lsblk\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":4},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"NAME"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" MAJ:MIN"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" RM"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" SIZE"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" RO"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" TYPE"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" MOUNTPOINT\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":5},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"sda"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" 8:0"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" 0"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" 20G"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" 0"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" disk\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":6},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"├─sda1"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" 8:1"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" 0"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" 1.9G"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" 0"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" part"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" [SWAP]\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":7},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"└─sda2"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" 8:2"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" 0"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" 18.1G"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" 0"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" part"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" /\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":8},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"sdb"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" 8:16"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" 1"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" 28.7G"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" 0"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" disk\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":9},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"└─sdb1"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" 8:17"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" 1"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" 8G"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" 0"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" part\n"}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"install-arch-linux-on-the-usb-drive"},"children":[{"type":"text","value":"Install Arch Linux on the USB Drive"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"The "},{"type":"element","tag":"a","props":{"href":"https://wiki.archlinux.org/index.php/Installation_guide","rel":["nofollow"]},"children":[{"type":"text","value":"Arch Linux Installation Guide"}]},{"type":"text","value":" outlines the installation procedure in\ngreat detail -- the following steps follow this closely with a few alteration\ndue to installing onto removable media."}]},{"type":"element","tag":"h3","props":{"id":"partition-the-disk-uefi-with-gpt"},"children":[{"type":"text","value":"Partition the Disk (UEFI with GPT)"}]},{"type":"element","tag":"pre","props":{"code":"[root@archlinux ~]# fdisk /dev/sdb\n","language":"bash","meta":"","className":"language-bash shiki shiki-themes github-light","style":""},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line","line":1},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"[root@archlinux "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":"~"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"]# fdisk /dev/sdb\n"}]}]}]}]},{"type":"element","tag":"pre","props":{"code":"Command (m for help): p\nDisk /dev/sdb: 28.66 GiB, 30752636928 bytes, 60063744 sectors\nDisk model: Ultra Fit\nUnits: sectors of 1 * 512 = 512 bytes\nSector size (logical/physical): 512 bytes / 512 bytes\nI/O size (minimum/optimal): 512 bytes / 512 bytes\nDisklabel type: gpt\nDisk identifier: E1D6C445-1B79-AB4D-A442-FA4AD6DF4ECC\n\nDevice Start End Sectors Size Type\n/dev/sdb1 2048 1050623 1048576 512M EFI System\n/dev/sdb2 1050624 60063710 59013087 28.1G Linux filesystem\n\nFilesystem/RAID signature on partition 1 will be wiped.\n","language":"txt","meta":"","className":"language-txt shiki shiki-themes github-light","style":""},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line","line":1},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":"Command (m for help): p\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":2},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":"Disk /dev/sdb: 28.66 GiB, 30752636928 bytes, 60063744 sectors\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":3},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":"Disk model: Ultra Fit\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":4},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":"Units: sectors of 1 * 512 = 512 bytes\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":5},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":"Sector size (logical/physical): 512 bytes / 512 bytes\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":6},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":"I/O size (minimum/optimal): 512 bytes / 512 bytes\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":7},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":"Disklabel type: gpt\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":8},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":"Disk identifier: E1D6C445-1B79-AB4D-A442-FA4AD6DF4ECC\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":9},"children":[{"type":"element","tag":"span","props":{"emptyLinePlaceholder":true},"children":[{"type":"text","value":"\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":10},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":"Device Start End Sectors Size Type\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":11},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":"/dev/sdb1 2048 1050623 1048576 512M EFI System\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":12},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":"/dev/sdb2 1050624 60063710 59013087 28.1G Linux filesystem\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":13},"children":[{"type":"element","tag":"span","props":{"emptyLinePlaceholder":true},"children":[{"type":"text","value":"\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":14},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":"Filesystem/RAID signature on partition 1 will be wiped.\n"}]}]}]}]},{"type":"element","tag":"h3","props":{"id":"format-the-partitions"},"children":[{"type":"text","value":"Format the Partitions"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"The UEFI specification mandates support for FAT file-systems, and FAT32 is\nrecommended for removable media. "},{"type":"element","tag":"sup","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://wiki.archlinux.org/index.php/EFI_system_partition#Format_the_partition","rel":["nofollow"]},"children":[{"type":"text","value":"7"}]}]}]},{"type":"element","tag":"pre","props":{"code":"[root@archlinux ~]# pacman -Sy dosfstools\n[root@archlinux ~]# mkfs.fat -F32 /dev/sdb1\n","language":"bash","meta":"","className":"language-bash shiki shiki-themes github-light","style":""},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line","line":1},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"[root@archlinux "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":"~"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"]# pacman -Sy dosfstools\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":2},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"[root@archlinux "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":"~"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"]# mkfs.fat -F32 /dev/sdb1\n"}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"As for the root partition, it is recommended to use "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"ext4"}]},{"type":"text","value":" without a journal to\nreduce the reads and writes to the file-system as this is detrimental to the\nflash-based USB drive. "},{"type":"element","tag":"sup","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://wiki.archlinux.org/index.php/Install_Arch_Linux_on_a_USB_key#Installation_tweaks","rel":["nofollow"]},"children":[{"type":"text","value":"8"}]}]}]},{"type":"element","tag":"pre","props":{"code":"[root@archlinux ~]# mkfs.ext4 -O \"^has_journal\" /dev/sdb2\n","language":"bash","meta":"","className":"language-bash shiki shiki-themes github-light","style":""},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line","line":1},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"[root@archlinux "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":"~"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"]# mkfs.ext4 -O "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":"\"^has_journal\""}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" /dev/sdb2\n"}]}]}]}]},{"type":"element","tag":"h3","props":{"id":"mount-the-partitions-and-bootstrap-the-environment"},"children":[{"type":"text","value":"Mount the Partitions and Bootstrap the Environment"}]},{"type":"element","tag":"pre","props":{"code":"[root@archlinux ~]# mount /dev/sdb2 /mnt\n[root@archlinux ~]# mkdir -p /mnt/boot/efi\n[root@archlinux ~]# mount /dev/sdb1 /mnt/boot/efi\n","language":"bash","meta":"","className":"language-bash shiki shiki-themes github-light","style":""},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line","line":1},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"[root@archlinux "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":"~"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"]# mount /dev/sdb2 /mnt\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":2},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"[root@archlinux "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":"~"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"]# mkdir -p /mnt/boot/efi\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":3},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"[root@archlinux "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":"~"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"]# mount /dev/sdb1 /mnt/boot/efi\n"}]}]}]}]},{"type":"element","tag":"pre","props":{"code":"[root@archlinux ~]# pacman -S arch-install-scripts\n[root@archlinux ~]# pacstrap /mnt base linux linux-firmware\n[root@archlinux ~]# genfstab -U /mnt >> /mnt/etc/fstab\n","language":"bash","meta":"","className":"language-bash shiki shiki-themes github-light","style":""},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line","line":1},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"[root@archlinux "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":"~"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"]# pacman -S arch-install-scripts\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":2},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"[root@archlinux "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":"~"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"]# pacstrap /mnt base linux linux-firmware\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":3},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"[root@archlinux "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":"~"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"]# genfstab -U /mnt "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":">>"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" /mnt/etc/fstab\n"}]}]}]}]},{"type":"element","tag":"h3","props":{"id":"configure-the-new-environment"},"children":[{"type":"text","value":"Configure the New Environment"}]},{"type":"element","tag":"pre","props":{"code":"[root@archlinux ~]# arch-chroot /mnt\n"},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"[root@archlinux ~]# arch-chroot /mnt\n"}]}]},{"type":"element","tag":"pre","props":{"code":"[root@archlinux /]# ln -sf /usr/share/zoneinfo/US/Eastern /etc/localtime\n[root@archlinux /]# hwclock --systohc\n[root@archlinux /]# sed -i 's/#en_US.UTF-8/en_US.UTF-8/' /etc/locale.gen\n[root@archlinux /]# locale-gen\n[root@archlinux /]# echo \"LANG=en_US.UTF-8\" > /etc/locale.conf\n"},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"[root@archlinux /]# ln -sf /usr/share/zoneinfo/US/Eastern /etc/localtime\n[root@archlinux /]# hwclock --systohc\n[root@archlinux /]# sed -i 's/#en_US.UTF-8/en_US.UTF-8/' /etc/locale.gen\n[root@archlinux /]# locale-gen\n[root@archlinux /]# echo \"LANG=en_US.UTF-8\" > /etc/locale.conf\n"}]}]},{"type":"element","tag":"pre","props":{"code":"[root@archlinux /]# hostnamectl set-hostname usb\n[root@archlinux /]# echo \"127.0.0.1 localhost\" >> /etc/hosts\n[root@archlinux /]# echo \"::1 localhost\" >> /etc/hosts\n"},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"[root@archlinux /]# hostnamectl set-hostname usb\n[root@archlinux /]# echo \"127.0.0.1 localhost\" >> /etc/hosts\n[root@archlinux /]# echo \"::1 localhost\" >> /etc/hosts\n"}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Note, one difference here from a standard installation is that the\n"},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"--removable"}]},{"type":"text","value":" flag is specified when installing the GRUB bootloader.\n"},{"type":"element","tag":"sup","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://wiki.archlinux.org/index.php/GRUB#UEFI_systems","rel":["nofollow"]},"children":[{"type":"text","value":"10"}]}]}]},{"type":"element","tag":"pre","props":{"code":"[root@archlinux /]# pacman -S grub\n[root@archlinux /]# grub-install --target=x86_64-efi --efi-directory=/boot/efi --removable --recheck\n[root@usb /]# grub-mkconfig -o /boot/grub/grub.cfg\n"},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"[root@archlinux /]# pacman -S grub\n[root@archlinux /]# grub-install --target=x86_64-efi --efi-directory=/boot/efi --removable --recheck\n[root@usb /]# grub-mkconfig -o /boot/grub/grub.cfg\n"}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Shutdown the virtual machine, restart the host machine, and boot the newly\ncreated Arch Linux thumb-drive!"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"🎉"}]},{"type":"element","tag":"h2","props":{"id":"side-note"},"children":[{"type":"text","value":"Side-note"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"It was attempted to use the "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"controlvm usbattach"}]},{"type":"text","value":" command to pass the USB\ndevice to the guest machine, but this did not work as it expects the virtual\nmachine to already be running, and the "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"vb.customize"}]},{"type":"text","value":" option runs prior to\nbooting the machine. "},{"type":"element","tag":"sup","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://www.vagrantup.com/docs/virtualbox/configuration.html#vboxmanage-customizations","rel":["nofollow"]},"children":[{"type":"text","value":"11"}]}]}]},{"type":"element","tag":"pre","props":{"code":"Command: [\"controlvm\", \"060a716b-1965-49e2-bc56-12beed5df716\", \"usbattach36fc9e60-c465-11cf-8056-444553540000\"]\n\nStderr: VBoxManage.exe: error: Machine '060a716b-1965-49e2-bc56-12beed5df716' is not currently running.\n","language":"txt","meta":"","className":"language-txt shiki shiki-themes github-light","style":""},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line","line":1},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":"Command: [\"controlvm\", \"060a716b-1965-49e2-bc56-12beed5df716\", \"usbattach36fc9e60-c465-11cf-8056-444553540000\"]\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":2},"children":[{"type":"element","tag":"span","props":{"emptyLinePlaceholder":true},"children":[{"type":"text","value":"\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":3},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":"Stderr: VBoxManage.exe: error: Machine '060a716b-1965-49e2-bc56-12beed5df716' is not currently running.\n"}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"references"},"children":[{"type":"text","value":"References"}]},{"type":"element","tag":"ol","props":{},"children":[{"type":"element","tag":"li","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://docs.docker.com/docker-for-mac/docker-toolbox/","rel":["nofollow"]},"children":[{"type":"text","value":"Docker Desktop on Mac vs. Docker Toolbox"}]}]},{"type":"element","tag":"li","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://github.com/moby/hyperkit","rel":["nofollow"]},"children":[{"type":"text","value":"GitHub - HyperKit"}]}]},{"type":"element","tag":"li","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://github.com/docker/for-mac/issues/900","rel":["nofollow"]},"children":[{"type":"text","value":"GitHub - Docker for Mac - Issue #900"}]}]},{"type":"element","tag":"li","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://app.vagrantup.com/archlinux/boxes/archlinux","rel":["nofollow"]},"children":[{"type":"text","value":"Vagrant Cloud - Arch Linux"}]}]},{"type":"element","tag":"li","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://antonyjepson.wordpress.com/2012/01/26/quickly-attaching-usb-devices-to-virtualbox-guests-using-vboxmanage/","rel":["nofollow"]},"children":[{"type":"text","value":"Attaching USB Devices to VirtualBox Guests using VBoxManage"}]}]},{"type":"element","tag":"li","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://gist.github.com/dscape/7d829c0c116ef419f963","rel":["nofollow"]},"children":[{"type":"text","value":"GitHub Gist - Vagrant USB Filter"}]}]},{"type":"element","tag":"li","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://wiki.archlinux.org/index.php/EFI_system_partition#Format_the_partition","rel":["nofollow"]},"children":[{"type":"text","value":"Arch Linux Wiki - EFI System Partition - Format Partitions"}]}]},{"type":"element","tag":"li","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://wiki.archlinux.org/index.php/Install_Arch_Linux_on_a_USB_key#Installation_tweaks","rel":["nofollow"]},"children":[{"type":"text","value":"Arch Linux Wiki - Arch Linux on USB - Installation Tweaks"}]}]},{"type":"element","tag":"li","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://wiki.archlinux.org/index.php/Installation_guide","rel":["nofollow"]},"children":[{"type":"text","value":"Arch Linux Wiki - Installation Guide"}]}]},{"type":"element","tag":"li","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://wiki.archlinux.org/index.php/GRUB#UEFI_systems","rel":["nofollow"]},"children":[{"type":"text","value":"Arch Linux Wiki - GRUB - UEFI Systems"}]}]},{"type":"element","tag":"li","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://www.vagrantup.com/docs/virtualbox/configuration.html#vboxmanage-customizations","rel":["nofollow"]},"children":[{"type":"text","value":"Vagrant VBoxManage Customizations "}]}]}]},{"type":"element","tag":"style","props":{},"children":[{"type":"text","value":"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[{"id":"create-an-arch-linux-virtual-machine-with-vagrant","depth":2,"text":"Create an Arch Linux Virtual Machine with Vagrant"},{"id":"install-arch-linux-on-the-usb-drive","depth":2,"text":"Install Arch Linux on the USB Drive","children":[{"id":"partition-the-disk-uefi-with-gpt","depth":3,"text":"Partition the Disk (UEFI with GPT)"},{"id":"format-the-partitions","depth":3,"text":"Format the Partitions"},{"id":"mount-the-partitions-and-bootstrap-the-environment","depth":3,"text":"Mount the Partitions and Bootstrap the Environment"},{"id":"configure-the-new-environment","depth":3,"text":"Configure the New Environment"}]},{"id":"side-note","depth":2,"text":"Side-note"},{"id":"references","depth":2,"text":"References"}]}},"_type":"markdown","_id":"content:articles:persistent-archlinux-usb.md","_source":"content","_file":"articles/persistent-archlinux-usb.md","_stem":"articles/persistent-archlinux-usb","_extension":"md"},{"_path":"/articles/podcast-transcription-whispercpp","_dir":"articles","_draft":false,"_partial":false,"_locale":"","title":"Easily Transcribe Podcasts with Whisper.cpp","description":"If you've ever had the need to transcribe a podcast, lecture, or some other audio recording, it turns out it's surprisingly easy with the extremely impressive whisper.cpp project. This high-performance fork of OpenAI's Whisper can run on all sorts of hardware -- including my M1 Mac Mini. Let's walk through an example from start-to-finish of transcribing an episode of the Alter Everything podcast.","draft":false,"date":"2024-01-08","tags":["whisper.cpp","ml"],"categories":["programming"],"excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"If you've ever had the need to transcribe a podcast, lecture, or some other audio recording, it turns out it's surprisingly easy with the extremely impressive "},{"type":"element","tag":"a","props":{"href":"https://github.com/ggerganov/whisper.cpp","rel":["nofollow"]},"children":[{"type":"text","value":"whisper.cpp"}]},{"type":"text","value":" project. This high-performance fork of "},{"type":"element","tag":"a","props":{"href":"https://github.com/openai/whisper","rel":["nofollow"]},"children":[{"type":"text","value":"OpenAI's Whisper"}]},{"type":"text","value":" can run on all sorts of hardware -- including my M1 Mac Mini. Let's walk through an example from start-to-finish of transcribing an episode of the "},{"type":"element","tag":"a","props":{"href":"https://podcasts.apple.com/us/podcast/alter-everything/id1356137854","rel":["nofollow"]},"children":[{"type":"text","value":"Alter Everything"}]},{"type":"text","value":" podcast."}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"If you've ever had the need to transcribe a podcast, lecture, or some other audio recording, it turns out it's surprisingly easy with the extremely impressive "},{"type":"element","tag":"a","props":{"href":"https://github.com/ggerganov/whisper.cpp","rel":["nofollow"]},"children":[{"type":"text","value":"whisper.cpp"}]},{"type":"text","value":" project. This high-performance fork of "},{"type":"element","tag":"a","props":{"href":"https://github.com/openai/whisper","rel":["nofollow"]},"children":[{"type":"text","value":"OpenAI's Whisper"}]},{"type":"text","value":" can run on all sorts of hardware -- including my M1 Mac Mini. Let's walk through an example from start-to-finish of transcribing an episode of the "},{"type":"element","tag":"a","props":{"href":"https://podcasts.apple.com/us/podcast/alter-everything/id1356137854","rel":["nofollow"]},"children":[{"type":"text","value":"Alter Everything"}]},{"type":"text","value":" podcast."}]},{"type":"element","tag":"h2","props":{"id":"obtain-audio-files"},"children":[{"type":"text","value":"Obtain Audio File(s)"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"First, let's get the "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"wav"}]},{"type":"text","value":" file from YouTube using the "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"youtube-dl"}]},{"type":"text","value":" utility. It should be noted that "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"whisper.cpp"}]},{"type":"text","value":" expects "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"wav"}]},{"type":"text","value":" filetypes, and this utility defaults to "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"mp3"}]},{"type":"text","value":"."}]},{"type":"element","tag":"pre","props":{"code":" $ youtube-dl \\\n --extract-audio \\\n --audio-format wav \\\n --output podcast.wav \\\n \"https://www.youtube.com/watch?v=CoUN690wSYQ\"\n","language":"sh","meta":"","className":"language-sh shiki shiki-themes github-light","style":""},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line","line":1},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":" $"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" youtube-dl"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" \\\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":2},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" --extract-audio"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" \\\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":3},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" --audio-format"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" wav"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" \\\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":4},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" --output"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" podcast.wav"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" \\\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":5},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" \"https://www.youtube.com/watch?v=CoUN690wSYQ\"\n"}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This file has a 44.1 kHz sample rate, and "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"whisper.cpp"}]},{"type":"text","value":" expects 16 kHz, so let's go ahead and convert that."}]},{"type":"element","tag":"pre","props":{"code":" $ file podcast.wav\npodcast.wav: RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, stereo 44100 Hz\n\n $ ffmpeg -i podcast.wav -ar 16000 podcast-16khz.wav\n\n $ file podcast-16khz.wav\npodcast-16khz.wav: RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, stereo 16000 Hz\n\n# NOTE: it looks like it's possible to specify this conversion as a post-process as a\n# flag to the `youtube-dl` command -- I will explore this further next time...\n# youtube-dl --extract-audio --audio-quality 0 --audio-format mp3 --postprocessor-args \"-ar 44100\" %dl%\n","language":"sh","meta":"","className":"language-sh shiki shiki-themes github-light","style":""},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line","line":1},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":" $"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" file"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" podcast.wav\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":2},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"podcast.wav:"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" RIFF"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, stereo 44100 Hz\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":3},"children":[{"type":"element","tag":"span","props":{"emptyLinePlaceholder":true},"children":[{"type":"text","value":"\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":4},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":" $"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" ffmpeg"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" -i"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" podcast.wav"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" -ar"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" 16000"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" podcast-16khz.wav\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":5},"children":[{"type":"element","tag":"span","props":{"emptyLinePlaceholder":true},"children":[{"type":"text","value":"\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":6},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":" $"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" file"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" podcast-16khz.wav\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":7},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"podcast-16khz.wav:"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" RIFF"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, stereo 16000 Hz\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":8},"children":[{"type":"element","tag":"span","props":{"emptyLinePlaceholder":true},"children":[{"type":"text","value":"\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":9},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6A737D"},"children":[{"type":"text","value":"# NOTE: it looks like it's possible to specify this conversion as a post-process as a\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":10},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6A737D"},"children":[{"type":"text","value":"# flag to the `youtube-dl` command -- I will explore this further next time...\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":11},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6A737D"},"children":[{"type":"text","value":"# youtube-dl --extract-audio --audio-quality 0 --audio-format mp3 --postprocessor-args \"-ar 44100\" %dl%\n"}]}]}]}]},{"type":"element","tag":"h2","props":{"id":"build-whispercpp-transcribe-audio"},"children":[{"type":"text","value":"Build "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"whisper.cpp"}]},{"type":"text","value":" & Transcribe Audio"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Then, let's get the latest version of "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"whisper.cpp"}]},{"type":"text","value":", download the English Whisper model, and build the example."}]},{"type":"element","tag":"pre","props":{"code":"# Clone the `whisper.cpp` repository\n $ git clone --depth 1 git@github.com:ggerganov/whisper.cpp && cd whisper.cpp\n\n# Download the English Whisper model in `ggml` format\n $ bash ./models/download-ggml-model.sh base.en\n\n# Build the main example\n $ make\n","language":"sh","meta":"","className":"language-sh shiki shiki-themes github-light","style":""},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line","line":1},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6A737D"},"children":[{"type":"text","value":"# Clone the `whisper.cpp` repository\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":2},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":" $"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" git"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" clone"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" --depth"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" 1"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" git@github.com:ggerganov/whisper.cpp"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" && "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":"cd"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" whisper.cpp\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":3},"children":[{"type":"element","tag":"span","props":{"emptyLinePlaceholder":true},"children":[{"type":"text","value":"\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":4},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6A737D"},"children":[{"type":"text","value":"# Download the English Whisper model in `ggml` format\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":5},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":" $"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" bash"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" ./models/download-ggml-model.sh"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" base.en\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":6},"children":[{"type":"element","tag":"span","props":{"emptyLinePlaceholder":true},"children":[{"type":"text","value":"\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":7},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6A737D"},"children":[{"type":"text","value":"# Build the main example\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":8},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":" $"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" make\n"}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"And finally, let's transcribe that podcast!"}]},{"type":"element","tag":"pre","props":{"code":" $ ./main \\\n -m ~/workspace/whisper.cpp/models/ggml-base.en.bin \\\n -f ~/Downloads/podcast-16khz.wav \\\n --output-vtt \\\n --output-file out\n\n# whisper_print_timings: load time = 114.71 ms\n# whisper_print_timings: fallbacks = 0 p / 0 h\n# whisper_print_timings: mel time = 692.20 ms\n# whisper_print_timings: sample time = 22278.10 ms / 27893 runs ( 0.80 ms per run)\n# whisper_print_timings: encode time = 10000.75 ms / 55 runs ( 181.83 ms per run)\n# whisper_print_timings: decode time = 331.77 ms / 54 runs ( 6.14 ms per run)\n# whisper_print_timings: batchd time = 45236.73 ms / 27566 runs ( 1.64 ms per run)\n# whisper_print_timings: prompt time = 1921.90 ms / 11832 runs ( 0.16 ms per run)\n# whisper_print_timings: total time = 80709.54 ms\n","language":"sh","meta":"","className":"language-sh shiki shiki-themes github-light","style":""},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line","line":1},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":" $"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" ./main"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" \\\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":2},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" -m"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" ~/workspace/whisper.cpp/models/ggml-base.en.bin"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" \\\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":3},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" -f"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" ~/Downloads/podcast-16khz.wav"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" \\\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":4},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" --output-vtt"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" \\\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":5},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" --output-file"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" out\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":6},"children":[{"type":"element","tag":"span","props":{"emptyLinePlaceholder":true},"children":[{"type":"text","value":"\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":7},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6A737D"},"children":[{"type":"text","value":"# whisper_print_timings: load time = 114.71 ms\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":8},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6A737D"},"children":[{"type":"text","value":"# whisper_print_timings: fallbacks = 0 p / 0 h\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":9},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6A737D"},"children":[{"type":"text","value":"# whisper_print_timings: mel time = 692.20 ms\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":10},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6A737D"},"children":[{"type":"text","value":"# whisper_print_timings: sample time = 22278.10 ms / 27893 runs ( 0.80 ms per run)\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":11},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6A737D"},"children":[{"type":"text","value":"# whisper_print_timings: encode time = 10000.75 ms / 55 runs ( 181.83 ms per run)\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":12},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6A737D"},"children":[{"type":"text","value":"# whisper_print_timings: decode time = 331.77 ms / 54 runs ( 6.14 ms per run)\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":13},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6A737D"},"children":[{"type":"text","value":"# whisper_print_timings: batchd time = 45236.73 ms / 27566 runs ( 1.64 ms per run)\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":14},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6A737D"},"children":[{"type":"text","value":"# whisper_print_timings: prompt time = 1921.90 ms / 11832 runs ( 0.16 ms per run)\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":15},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6A737D"},"children":[{"type":"text","value":"# whisper_print_timings: total time = 80709.54 ms\n"}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"A full podcast transcribed in ~80 seconds on an M1 Mac Mini -- not too bad!"}]},{"type":"element","tag":"pre","props":{"code":"# out.vtt\n\n00:00:00.000 --> 00:00:06.480\n >> Hi everyone. We recently launched a short engagement feedback survey for the Alter Everything\n\n00:00:06.480 --> 00:00:11.360\n podcast. Click the link in the episode description wherever you're listening to let us know what\n\n00:00:11.360 --> 00:00:16.320\n you think and help us improve our show.\n\n00:00:16.320 --> 00:00:21.200\n Welcome to Alter Everything, a podcast about data science and analytics culture. I'm Megan\n\n00:00:21.200 --> 00:00:26.440\n Dibble and today I'm talking with Nick Schrock, CTO and founder of Dagster Labs. We discussed\n\n00:00:26.440 --> 00:00:31.560\n data engineering trends, challenges in the field, why he started his company, and what\n\n00:00:31.560 --> 00:00:38.960\n makes him excited about the future of data engineering. Let's get started.\n\n00:00:38.960 --> 00:00:42.720\n >> Hi, Nick. It's great to have you on our show today. Thanks for being here.\n\n00:00:42.720 --> 00:00:43.920\n >> Thanks for having me.\n\n00:00:43.920 --> 00:00:48.280\n >> Yeah. Could you start off by giving an introduction to yourself for our listeners?\n\n00:00:48.280 --> 00:00:52.920\n >> Sure. My name is Nick Schrock. I'm the CTO and founder of Dagster Labs. There's the\n\n00:00:52.920 --> 00:00:59.520\n company behind Dagster, which is a data orchestration framework. Prior to doing this, I was an engineer\n\n00:00:59.520 --> 00:01:05.960\n at Facebook from 2009, 2017. While I was there, I found a team called product infrastructure\n\n00:01:05.960 --> 00:01:09.800\n whose goal was to make our application developers more efficient and productive, and a bunch\n\n00:01:09.800 --> 00:01:13.840\n of open source work came out of that actually, one of which was React, which I had nothing\n\n00:01:13.840 --> 00:01:18.040\n to do with, but actually the CEO of Dagster Labs co-created and I personally co-created\n\n00:01:18.040 --> 00:01:22.640\n GraphQL. So as I like to say, Pete and I were present at the creation of the full hipster\n\n00:01:22.640 --> 00:01:28.680\n stack. I moved on to Facebook in 2017, figuring out what to do next, and this data engineering\n\n00:01:28.680 --> 00:01:32.960\n and data orchestration problem really got me hooked actually quite soon after I left,\n\n00:01:32.960 --> 00:01:36.280\n and the rest is history. I'm sure we'll get into that more.\n"},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"# out.vtt\n\n00:00:00.000 --> 00:00:06.480\n >> Hi everyone. We recently launched a short engagement feedback survey for the Alter Everything\n\n00:00:06.480 --> 00:00:11.360\n podcast. Click the link in the episode description wherever you're listening to let us know what\n\n00:00:11.360 --> 00:00:16.320\n you think and help us improve our show.\n\n00:00:16.320 --> 00:00:21.200\n Welcome to Alter Everything, a podcast about data science and analytics culture. I'm Megan\n\n00:00:21.200 --> 00:00:26.440\n Dibble and today I'm talking with Nick Schrock, CTO and founder of Dagster Labs. We discussed\n\n00:00:26.440 --> 00:00:31.560\n data engineering trends, challenges in the field, why he started his company, and what\n\n00:00:31.560 --> 00:00:38.960\n makes him excited about the future of data engineering. Let's get started.\n\n00:00:38.960 --> 00:00:42.720\n >> Hi, Nick. It's great to have you on our show today. Thanks for being here.\n\n00:00:42.720 --> 00:00:43.920\n >> Thanks for having me.\n\n00:00:43.920 --> 00:00:48.280\n >> Yeah. Could you start off by giving an introduction to yourself for our listeners?\n\n00:00:48.280 --> 00:00:52.920\n >> Sure. My name is Nick Schrock. I'm the CTO and founder of Dagster Labs. There's the\n\n00:00:52.920 --> 00:00:59.520\n company behind Dagster, which is a data orchestration framework. Prior to doing this, I was an engineer\n\n00:00:59.520 --> 00:01:05.960\n at Facebook from 2009, 2017. While I was there, I found a team called product infrastructure\n\n00:01:05.960 --> 00:01:09.800\n whose goal was to make our application developers more efficient and productive, and a bunch\n\n00:01:09.800 --> 00:01:13.840\n of open source work came out of that actually, one of which was React, which I had nothing\n\n00:01:13.840 --> 00:01:18.040\n to do with, but actually the CEO of Dagster Labs co-created and I personally co-created\n\n00:01:18.040 --> 00:01:22.640\n GraphQL. So as I like to say, Pete and I were present at the creation of the full hipster\n\n00:01:22.640 --> 00:01:28.680\n stack. I moved on to Facebook in 2017, figuring out what to do next, and this data engineering\n\n00:01:28.680 --> 00:01:32.960\n and data orchestration problem really got me hooked actually quite soon after I left,\n\n00:01:32.960 --> 00:01:36.280\n and the rest is history. I'm sure we'll get into that more.\n"}]}]},{"type":"element","tag":"style","props":{},"children":[{"type":"text","value":"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[{"id":"obtain-audio-files","depth":2,"text":"Obtain Audio File(s)"},{"id":"build-whispercpp-transcribe-audio","depth":2,"text":"Build whisper.cpp & Transcribe Audio"}]}},"_type":"markdown","_id":"content:articles:podcast-transcription-whispercpp.md","_source":"content","_file":"articles/podcast-transcription-whispercpp.md","_stem":"articles/podcast-transcription-whispercpp","_extension":"md"},{"_path":"/articles/quick-tip-rerunning-bash-commands","_dir":"articles","_draft":false,"_partial":false,"_locale":"","title":"Tip: Re-running Bash Commands","description":"Do you ever find yourself having to re-run a Bash command? I often find this\nhappening to myself when I neglect to use sudo for a command that requires\nroot privileges.","date":"2021-09-22","draft":false,"tags":["tip","bash"],"categories":["tips"],"excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Do you ever find yourself having to re-run a Bash command? I often find this\nhappening to myself when I neglect to use "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"sudo"}]},{"type":"text","value":" for a command that requires\nroot privileges."}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Do you ever find yourself having to re-run a Bash command? I often find this\nhappening to myself when I neglect to use "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"sudo"}]},{"type":"text","value":" for a command that requires\nroot privileges."}]},{"type":"element","tag":"pre","props":{"className":"language-bash shiki shiki-themes github-light","code":"$ pacman -Syu\nerror: you cannot perform this operation unless you are root.\n","language":"bash","meta":"","style":""},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line","line":1},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" pacman"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" -Syu\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":2},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"error:"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" you"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" cannot"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" perform"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" this"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" operation"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" unless"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" you"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" are"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" root.\n"}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Well, I have good news for you -- you can easily re-issue a command with the\n"},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"!!"}]},{"type":"text","value":" designator! Simply type "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"sudo"}]},{"type":"text","value":" followed by "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"!!"}]},{"type":"text","value":" and you're good to go."}]},{"type":"element","tag":"pre","props":{"className":"language-bash shiki shiki-themes github-light","code":"$ sudo !!\nsudo pacman -Syu\n[sudo] password for colton:\n:: Synchronizing package databases...\n","language":"bash","meta":"","style":""},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line","line":1},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" sudo"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" !!\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":2},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"sudo"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" pacman"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" -Syu\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":3},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"[sudo] password "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":"for"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" colton:\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":4},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":"::"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" Synchronizing"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" package"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" databases...\n"}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"--"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Commands that are prefixed with a bang, "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"!"}]},{"type":"text","value":", are considered "},{"type":"element","tag":"em","props":{},"children":[{"type":"text","value":"Event\nDesignators,"}]},{"type":"text","value":" and are references to your command-line history. You can take a\nlook at your history with the "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"history"}]},{"type":"text","value":" command."}]},{"type":"element","tag":"pre","props":{"className":"language-bash shiki shiki-themes github-light","code":"$ history\n 1021 touch hello_world.txt\n 1022 ls\n 1023 echo \"Here we go again!\"\n 1024 find . -name *.py\n","language":"bash","meta":"","style":""},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line","line":1},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" history\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":2},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":" 1021"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" touch"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" hello_world.txt\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":3},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":" 1022"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" ls\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":4},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":" 1023"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" echo"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" \"Here we go again!\"\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":5},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":" 1024"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" find"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" ."}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" -name"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" *"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":".py\n"}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"There are many ways to use "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"!"}]},{"type":"text","value":" in your shell. For example, if you wanted to\nre-issue a specific command in your history, you could use "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"!n"}]},{"type":"text","value":" where "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"n"}]},{"type":"text","value":" is\nthe number next to the command in your history."}]},{"type":"element","tag":"pre","props":{"className":"language-bash shiki shiki-themes github-light","code":"$ !1023\necho \"Here we go again!\"\nHere we go again!\n","language":"bash","meta":"","style":""},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line","line":1},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" !1023\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":2},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":"echo"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" \"Here we go again!\"\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":3},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"Here"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" we"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" go"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" again!\n"}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Or... if you wanted to run the command you issued 4-commands ago, you can use\n"},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"!-4"}]},{"type":"text","value":"."}]},{"type":"element","tag":"pre","props":{"className":"language-bash shiki shiki-themes github-light","code":"$ !-4\nls\nhello_world.txt\n","language":"bash","meta":"","style":""},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line","line":1},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" !-4\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":2},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"ls\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":3},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"hello_world.txt\n"}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Or... if you wanted to run the last command that started with the string\n"},{"type":"element","tag":"em","props":{},"children":[{"type":"text","value":"find"}]},{"type":"text","value":", you can use "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"!find"}]},{"type":"text","value":"."}]},{"type":"element","tag":"pre","props":{"className":"language-bash shiki shiki-themes github-light","code":"$ !find\nfind . -name *.py\n","language":"bash","meta":"","style":""},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line","line":1},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" !find\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":2},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"find"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" ."}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" -name"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" *"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":".py\n"}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Be sure to check out the "},{"type":"element","tag":"em","props":{},"children":[{"type":"text","value":"Event Designators"}]},{"type":"text","value":" section of the "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"bash"}]},{"type":"text","value":" "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"man"}]},{"type":"text","value":" pages\nfor more information!"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"--"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"As an aside, for even faster command-line history navigation, be sure to check\nout the excellent "},{"type":"element","tag":"a","props":{"href":"https://github.com/junegunn/fzf","rel":["nofollow"]},"children":[{"type":"text","value":"fzf"}]},{"type":"text","value":" utility by "},{"type":"element","tag":"em","props":{},"children":[{"type":"text","value":"junegunn."}]},{"type":"text","value":"\nOne of the many features of "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"fzf"}]},{"type":"text","value":" is browsing and re-issuing commands from your\ncommand-line history with a fuzzy-finder!"}]},{"type":"element","tag":"style","props":{},"children":[{"type":"text","value":"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:articles:quick-tip-rerunning-bash-commands.md","_source":"content","_file":"articles/quick-tip-rerunning-bash-commands.md","_stem":"articles/quick-tip-rerunning-bash-commands","_extension":"md"},{"_path":"/articles/reset-ipmi-password-from-host-os","_dir":"articles","_draft":false,"_partial":false,"_locale":"","title":"Reset IPMI Credentials from the Host OS","description":"If you ever find yourself locked out of the Intelligent Platform Management Interface (IPMI) of a server, these\ninstructions will guide your through the process of resetting the credentials to their default values from the host\noperating system.","date":"2021-12-27","tags":["homelab","supermicro","truenas"],"categories":["homelab"],"excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"If you ever find yourself locked out of the Intelligent Platform Management Interface (IPMI) of a server, these\ninstructions will guide your through the process of resetting the credentials to their default values from the host\noperating system."}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"If you ever find yourself locked out of the Intelligent Platform Management Interface (IPMI) of a server, these\ninstructions will guide your through the process of resetting the credentials to their default values from the host\noperating system."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"If you are using an operating system like TrueNAS -- good news! It's possible to reset the IPMI password directly from\nthe web interface. This is done by navigating to "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"Network > IPMI"}]},{"type":"text","value":", and simply entering a new value in the "},{"type":"element","tag":"em","props":{},"children":[{"type":"text","value":"IPMI\nPassword Reset"}]},{"type":"text","value":" field."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"If you are using some other OS that doesn't have this feature, you can achieve similar results by using the "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"ipmitool"}]},{"type":"text","value":"\ncommand-line utility."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"First, you'll want to determine the user ID associated with the user for whom you'd like to reset the password."}]},{"type":"element","tag":"pre","props":{"code":"# ipmitool user list\nID Name Callin Link Auth IPMI Msg Channel Priv Limit\n1 true false false Unknown (0x00)\n2 ADMIN true false false Unknown (0x00)\n"},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"# ipmitool user list\nID Name Callin Link Auth IPMI Msg Channel Priv Limit\n1 true false false Unknown (0x00)\n2 ADMIN true false false Unknown (0x00)\n"}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"In this case, we will be resetting the password for "},{"type":"element","tag":"em","props":{},"children":[{"type":"text","value":"ADMIN"}]},{"type":"text","value":" who has a user ID of "},{"type":"element","tag":"em","props":{},"children":[{"type":"text","value":"2"}]},{"type":"text","value":". Then we'll assign the new\npassword like so:"}]},{"type":"element","tag":"pre","props":{"code":"# ipmitool user set password 2 \n"},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"# ipmitool user set password 2 \n"}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"And you should be good to go!"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"..."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Alternatively, if you'd like to factory reset the baseboard management controller (BMC), which will reset the IPMI\ncredentials to their default value, you can issue the following command."}]},{"type":"element","tag":"pre","props":{"code":"# ipmitool raw 0x3c 0x40\n"},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"# ipmitool raw 0x3c 0x40\n"}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Where "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"0x3c"}]},{"type":"text","value":" is the "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":""}]},{"type":"text","value":" argument, a.k.a. the network function code that defines the functional routing for\nmessages, and "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"0x40"}]},{"type":"text","value":" is the "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":""}]},{"type":"text","value":". According to section 5.1 of the "},{"type":"element","tag":"a","props":{"href":"https://www.intel.com/content/dam/www/public/us/en/documents/product-briefs/ipmi-second-gen-interface-spec-v2-rev1-1.pdf","rel":["nofollow"]},"children":[{"type":"text","value":"IPMI interface\nspecification"}]},{"type":"text","value":",\n"},{"type":"element","tag":"em","props":{},"children":[{"type":"text","value":"netfn"}]},{"type":"text","value":" codes ranging from 0x30 to 0x3F are reserved for vendor specific functions. I searched around for some\nSupermicro references on these vendor specific network functions without much luck other than various "},{"type":"element","tag":"a","props":{"href":"https://www.supermicro.com/support/faqs/faq.cfm?faq=15448","rel":["nofollow"]},"children":[{"type":"text","value":"support\nresponses"}]},{"type":"text","value":" on how to reset a device. Bummer!"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:articles:reset-ipmi-password-from-host-os.md","_source":"content","_file":"articles/reset-ipmi-password-from-host-os.md","_stem":"articles/reset-ipmi-password-from-host-os","_extension":"md"},{"_path":"/articles/ssh-ed25519-sk-yubikey","_dir":"articles","_draft":false,"_partial":false,"_locale":"","title":"Configuring a YubiKey for use with OpenSSH","description":"YubiKey's are a convenient way to introduce a physical form of two factor authentication into ones workflow. They support a variety of protocols, but in this guide we will walk through how to configure a YubiKey for use with OpenSSH via the \"new\" ed25519-sk key type that supports FIDO compliant hardware keys.","draft":false,"date":"2024-06-09","tags":["unix","configurations"],"categories":["tooling","tips"],"excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://www.yubico.com/","rel":["nofollow"]},"children":[{"type":"text","value":"YubiKey's"}]},{"type":"text","value":" are a convenient way to introduce a physical form of two factor authentication into ones workflow. They support a variety of protocols, but in this guide we will walk through how to configure a YubiKey for use with OpenSSH via the \"new\" "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"ed25519-sk"}]},{"type":"text","value":" key type that supports FIDO compliant hardware keys."}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://www.yubico.com/","rel":["nofollow"]},"children":[{"type":"text","value":"YubiKey's"}]},{"type":"text","value":" are a convenient way to introduce a physical form of two factor authentication into ones workflow. They support a variety of protocols, but in this guide we will walk through how to configure a YubiKey for use with OpenSSH via the \"new\" "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"ed25519-sk"}]},{"type":"text","value":" key type that supports FIDO compliant hardware keys."}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"In "},{"type":"element","tag":"a","props":{"href":"https://www.openssh.com/txt/release-8.2","rel":["nofollow"]},"children":[{"type":"text","value":"release 8.2 of OpenSSH"}]},{"type":"text","value":" support for FIDO devices was added with public key types \"ecdsa-sk\" and \"ed25519-sk\" (-sk standing for \"security key\"). This key type is supported by YubiKey's with firmware version 5.2.3 or higher."}]},{"type":"element","tag":"blockquote","props":{},"children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"This release adds support for FIDO/U2F hardware authenticators to OpenSSH. U2F/FIDO are open standards for inexpensive two-factor authentication hardware that are widely used for website authentication. In OpenSSH FIDO devices are supported by new public key types \"ecdsa-sk\" and \"ed25519-sk\", along with corresponding certificate types."}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Let's get started by installing the latest version of OpenSSH via "},{"type":"element","tag":"a","props":{"href":"https://brew.sh/","rel":["nofollow"]},"children":[{"type":"text","value":"Homebrew"}]},{"type":"text","value":", along with the YubiKey Manager (ykman) CLI. The version of OpenSSH included with macOS is not compatible."}]},{"type":"element","tag":"pre","props":{"className":"language-sh shiki shiki-themes github-light","code":"$ brew install openssh ykman\n","language":"sh","meta":"","style":""},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line","line":1},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" brew"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" install"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" openssh"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" ykman\n"}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Then, let's confirm that our YubiKey has a firmware that is greater than 5.2.3:"}]},{"type":"element","tag":"pre","props":{"className":"language-sh shiki shiki-themes github-light","code":"$ ykman list\nYubiKey 5Ci (5.4.3) [OTP+FIDO+CCID]\n","language":"sh","meta":"","style":""},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line","line":1},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" ykman"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" list\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":2},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"YubiKey"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" 5Ci"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" (5.4.3) [OTP+FIDO+CCID]\n"}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Next, we'll go ahead and enable a pin on our device via the "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"change-pin"}]},{"type":"text","value":" command, as this a requirement for our use."}]},{"type":"element","tag":"pre","props":{"className":"language-sh shiki shiki-themes github-light","code":"$ ykman fido access change-pin\n","language":"sh","meta":"","style":""},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line","line":1},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" ykman"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" fido"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" access"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" change-pin\n"}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"And last, we'll generate the key on our device!"}]},{"type":"element","tag":"pre","props":{"className":"language-sh shiki shiki-themes github-light","code":"$ ssh-keygen -t ed25519-sk -O resident\nGenerating public/private ed25519-sk key pair.\nYou may need to touch your authenticator to authorize key generation.\n...\n","language":"sh","meta":"","style":""},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line","line":1},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" ssh-keygen"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" -t"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" ed25519-sk"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" -O"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" resident\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":2},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"Generating"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" public/private"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" ed25519-sk"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" key"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" pair.\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":3},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"You"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" may"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" need"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" to"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" touch"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" your"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" authenticator"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" to"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" authorize"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" key"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" generation.\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":4},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":"...\n"}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"We specify "},{"type":"element","tag":"em","props":{},"children":[{"type":"text","value":"resident"}]},{"type":"text","value":" to indicate that the key handle is to be stored on the YubiKey itself, since we will be using this device with multiple computers."}]},{"type":"element","tag":"pre","props":{"className":"language-txt shiki shiki-themes github-light","code":"resident\n Indicate that the key handle should be stored on the FIDO\n authenticator itself. This makes it easier to use the\n authenticator on multiple computers. Resident keys may be\n supported on FIDO2 authenticators and typically require that a PIN\n be set on the authenticator prior to generation. Resident keys\n may be loaded off the authenticator using ssh-add(1). Storing\n both parts of a key on a FIDO authenticator increases the\n likelihood of an attacker being able to use a stolen authenticator\n device.\n","language":"txt","meta":"","style":""},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line","line":1},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":"resident\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":2},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":" Indicate that the key handle should be stored on the FIDO\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":3},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":" authenticator itself. This makes it easier to use the\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":4},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":" authenticator on multiple computers. Resident keys may be\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":5},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":" supported on FIDO2 authenticators and typically require that a PIN\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":6},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":" be set on the authenticator prior to generation. Resident keys\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":7},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":" may be loaded off the authenticator using ssh-add(1). Storing\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":8},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":" both parts of a key on a FIDO authenticator increases the\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":9},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":" likelihood of an attacker being able to use a stolen authenticator\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":10},"children":[{"type":"element","tag":"span","props":{},"children":[{"type":"text","value":" device.\n"}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"And that's all it takes -- simple enough. Now, when interacting with "},{"type":"element","tag":"em","props":{},"children":[{"type":"text","value":"ssh"}]},{"type":"text","value":" or "},{"type":"element","tag":"em","props":{},"children":[{"type":"text","value":"git"}]},{"type":"text","value":" you will be prompted to touch the YubiKey to bring that little bit of physical 2FA."}]},{"type":"element","tag":"style","props":{},"children":[{"type":"text","value":"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:articles:ssh-ed25519-sk-yubikey.md","_source":"content","_file":"articles/ssh-ed25519-sk-yubikey.md","_stem":"articles/ssh-ed25519-sk-yubikey","_extension":"md"},{"_path":"/articles/unit-testing-micropython-with-mocks","_dir":"articles","_draft":false,"_partial":false,"_locale":"","title":"Unit Testing in MicroPython with Mocks","description":"Unit testing code for embedded systems can be challenging. While it's possible\nto leverage emulators, write side-effect free code, or run tests on the\nhardware itself, it's often easiest to unit test the code on your personal\ncomputer with mocked hardware functionality.","date":"2020-02-07","draft":false,"tags":["micropython","testing","mocks","tutorial"],"categories":["python","embedded"],"excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Unit testing code for embedded systems can be challenging. While it's possible\nto leverage emulators, write side-effect free code, or run tests on the\nhardware itself, it's often easiest to unit test the code on your personal\ncomputer with mocked hardware functionality."}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Unit testing code for embedded systems can be challenging. While it's possible\nto leverage emulators, write side-effect free code, or run tests on the\nhardware itself, it's often easiest to unit test the code on your personal\ncomputer with mocked hardware functionality."}]},{"type":"element","tag":"h1","props":{"id":"mocking"},"children":[{"type":"text","value":"Mocking"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Mocks allow us to replace the hardware interfacing functionality under-the-hood\nwith predefined results and side-effects. For example, if there is a piece of\nlogic that retrieves values from an accelerometer to get a device's\norientation, it would be possible to mock the returned values of the\naccelerometer -- allowing us to run the unit tests on a device that does not\nhave an accelerometer sensor installed."}]},{"type":"element","tag":"h1","props":{"id":"a-micropython-mocking-example"},"children":[{"type":"text","value":"A MicroPython Mocking Example"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"In this example, we will be unit testing a module named "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"time_logger"}]},{"type":"text","value":", that\ndepends on the MicroPython library "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"utime"}]},{"type":"text","value":" to log the most recent Epoch time to\na file."}]},{"type":"element","tag":"pre","props":{"className":"language-python shiki shiki-themes github-light","code":"# time_logger.py\n\nclass TimeLogger(object):\n\n def save_time(self):\n \"\"\" Overwrite a file with the most recent Epoch timestamp from `utime`\n \"\"\"\n with open(\"LAST_KNOWN_TIME\", \"w+\") as f:\n f.write(str(utime.time()))\n","language":"python","meta":"","style":""},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line","line":1},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6A737D"},"children":[{"type":"text","value":"# time_logger.py\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":2},"children":[{"type":"element","tag":"span","props":{"emptyLinePlaceholder":true},"children":[{"type":"text","value":"\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":3},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":"class"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":" TimeLogger"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":"object"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"):\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":4},"children":[{"type":"element","tag":"span","props":{"emptyLinePlaceholder":true},"children":[{"type":"text","value":"\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":5},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":" def"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":" save_time"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"(self):\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":6},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" \"\"\" Overwrite a file with the most recent Epoch timestamp from `utime`\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":7},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" \"\"\"\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":8},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":" with"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" open"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":"\"LAST_KNOWN_TIME\""}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":"\"w+\""}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":"as"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" f:\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":9},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" f.write("}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":"str"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"(utime.time()))\n"}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"First, because the "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"utime"}]},{"type":"text","value":" module is not installed on the machine that the unit\ntests on, we must mock "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"utime"}]},{"type":"text","value":" module before importing "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"time_logger"}]},{"type":"text","value":" in our\nunit test file."}]},{"type":"element","tag":"pre","props":{"className":"language-python shiki shiki-themes github-light","code":"# test_time_logger.py\n\nimport unittest\n\nfrom unittest.mock import MagicMock\n\nsys.modules['utime'] = MagicMock()\nfrom time_logger import TimeLogger\n","language":"python","meta":"","style":""},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line","line":1},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6A737D"},"children":[{"type":"text","value":"# test_time_logger.py\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":2},"children":[{"type":"element","tag":"span","props":{"emptyLinePlaceholder":true},"children":[{"type":"text","value":"\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":3},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" unittest\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":4},"children":[{"type":"element","tag":"span","props":{"emptyLinePlaceholder":true},"children":[{"type":"text","value":"\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":5},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" unittest.mock "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" MagicMock\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":6},"children":[{"type":"element","tag":"span","props":{"emptyLinePlaceholder":true},"children":[{"type":"text","value":"\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":7},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"sys.modules["}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":"'utime'"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"] "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" MagicMock()\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":8},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":"from"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" time_logger "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":"import"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" TimeLogger\n"}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Then, we can write a test that patches the "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"utime.time"}]},{"type":"text","value":" functionality so that\nit returns a value of our choosing -- in this case, "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"1234"}]},{"type":"text","value":"."}]},{"type":"element","tag":"pre","props":{"className":"language-python shiki shiki-themes github-light","code":"class TestTimeLogger(unittest.TestCase):\n\n def test_save_time(self):\n \"\"\" Verify that the Epoch time is written to file\n \"\"\"\n with unittest.mock.patch(\"utime.time\", return_value=1234):\n t = TimeLogger()\n t.save_time()\n with open(\"LAST_KNOWN_TIME\") as f:\n self.assertEqual(\"1234\", f.read())\n","language":"python","meta":"","style":""},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line","line":1},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":"class"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":" TestTimeLogger"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"unittest"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"."}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"TestCase"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"):\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":2},"children":[{"type":"element","tag":"span","props":{"emptyLinePlaceholder":true},"children":[{"type":"text","value":"\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":3},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":" def"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":" test_save_time"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"(self):\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":4},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" \"\"\" Verify that the Epoch time is written to file\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":5},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" \"\"\"\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":6},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":" with"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" unittest.mock.patch("}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":"\"utime.time\""}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":", "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#E36209"},"children":[{"type":"text","value":"return_value"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":"1234"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"):\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":7},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" t "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":"="}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" TimeLogger()\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":8},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" t.save_time()\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":9},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":" with"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" open"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":"("}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":"\"LAST_KNOWN_TIME\""}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":") "}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#D73A49"},"children":[{"type":"text","value":"as"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" f:\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":10},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" self"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":".assertEqual("}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":"\"1234\""}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":", f.read())\n"}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Now, when the "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"save_time"}]},{"type":"text","value":" method gets the latest time from "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"utime.time()"}]},{"type":"text","value":", the\nvalue will be patched to return "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"1234"}]},{"type":"text","value":". That value will be written to a file,\nand our unit test will pass!"}]},{"type":"element","tag":"h2","props":{"id":"references"},"children":[{"type":"text","value":"References"}]},{"type":"element","tag":"ol","props":{},"children":[{"type":"element","tag":"li","props":{},"children":[{"type":"element","tag":"a","props":{"href":"https://docs.python.org/3/library/unittest.html","rel":["nofollow"]},"children":[{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"unittest"}]},{"type":"text","value":" — Unit testing framework"}]}]}]},{"type":"element","tag":"style","props":{},"children":[{"type":"text","value":"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[{"id":"references","depth":2,"text":"References"}]}},"_type":"markdown","_id":"content:articles:unit-testing-micropython-with-mocks.md","_source":"content","_file":"articles/unit-testing-micropython-with-mocks.md","_stem":"articles/unit-testing-micropython-with-mocks","_extension":"md"},{"_path":"/articles/vim-fugitive-gpg-pinentry","_dir":"articles","_draft":false,"_partial":false,"_locale":"","title":"Using pinentry-mac to sign commits from vim-fugitive","description":"In order to sign git commits from within Vim using a plugin like tpope/vim-fugitive, it is necessary to configure the gpg-agent to use a GUI based pinentry-program.","draft":false,"date":"2024-05-11","tags":["vim","tip"],"categories":["tooling","tips"],"excerpt":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"In order to sign git commits from within Vim using a plugin like "},{"type":"element","tag":"a","props":{"href":"https://github.com/tpope/vim-fugitive","rel":["nofollow"]},"children":[{"type":"text","value":"tpope/vim-fugitive"}]},{"type":"text","value":", it is necessary to configure the "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"gpg-agent"}]},{"type":"text","value":" to use a GUI based "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"pinentry-program"}]},{"type":"text","value":"."}]}]},"body":{"type":"root","children":[{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"In order to sign git commits from within Vim using a plugin like "},{"type":"element","tag":"a","props":{"href":"https://github.com/tpope/vim-fugitive","rel":["nofollow"]},"children":[{"type":"text","value":"tpope/vim-fugitive"}]},{"type":"text","value":", it is necessary to configure the "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"gpg-agent"}]},{"type":"text","value":" to use a GUI based "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"pinentry-program"}]},{"type":"text","value":"."}]},{"type":"element","tag":"h2","props":{"id":"preface"},"children":[{"type":"text","value":"Preface"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"The man, the myth, the legend, Timothy Popallopollis himself "},{"type":"element","tag":"a","props":{"href":"https://github.com/tpope/vim-fugitive/issues/846#issuecomment-253816577","rel":["nofollow"]},"children":[{"type":"text","value":"recommends"}]},{"type":"text","value":" configuring your "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"gpg-agent"}]},{"type":"text","value":" to use a GUI based "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"pinentry-program"}]},{"type":"text","value":". On macOS this can be done quite by simply installing "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"pinentry-mac"}]},{"type":"text","value":", and updating your "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"gpg-agent.conf"}]},{"type":"text","value":"."}]},{"type":"element","tag":"h2","props":{"id":"configuration"},"children":[{"type":"text","value":"Configuration"}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"First things first, let's install the pinentry program."}]},{"type":"element","tag":"pre","props":{"code":"$ brew install pinentry-mac\n","language":"bash","meta":"","className":"language-bash shiki shiki-themes github-light","style":""},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line","line":1},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" brew"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" install"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" pinentry-mac\n"}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Then, all we need to do is set the "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"pinentry-program"}]},{"type":"text","value":" option in your "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"~/.gnupg/gpg-agent.conf"}]},{"type":"text","value":" file."}]},{"type":"element","tag":"pre","props":{"code":"default-cache-ttl 600\nmax-cache-ttl 7200\npinentry-program /opt/homebrew/bin/pinentry-mac\n"},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"default-cache-ttl 600\nmax-cache-ttl 7200\npinentry-program /opt/homebrew/bin/pinentry-mac\n"}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"If your don't know the path to your pinentry program, you can throw down a quick "},{"type":"element","tag":"code","props":{"className":[]},"children":[{"type":"text","value":"which"}]},{"type":"text","value":"."}]},{"type":"element","tag":"pre","props":{"code":"$ which pinentry-mac\n/opt/homebrew/bin/pinentry-mac\n","language":"bash","meta":"","className":"language-bash shiki shiki-themes github-light","style":""},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line","line":1},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" which"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" pinentry-mac\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":2},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"/opt/homebrew/bin/pinentry-mac\n"}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"Or use your Homebrew prefix."}]},{"type":"element","tag":"pre","props":{"code":"$ echo $(brew --prefix)/bin/pinentry-mac\n/opt/homebrew/bin/pinentry-mac\n","language":"bash","meta":"","className":"language-bash shiki shiki-themes github-light","style":""},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line","line":1},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"$"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":" echo"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":" $("}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"brew"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#005CC5"},"children":[{"type":"text","value":" --prefix"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#24292E"},"children":[{"type":"text","value":")"}]},{"type":"element","tag":"span","props":{"style":"--shiki-default:#032F62"},"children":[{"type":"text","value":"/bin/pinentry-mac\n"}]}]},{"type":"element","tag":"span","props":{"class":"line","line":2},"children":[{"type":"element","tag":"span","props":{"style":"--shiki-default:#6F42C1"},"children":[{"type":"text","value":"/opt/homebrew/bin/pinentry-mac\n"}]}]}]}]},{"type":"element","tag":"p","props":{},"children":[{"type":"text","value":"But that's all it takes. Now, you should be prompted to enter your gpg pin in an external window when signing commits from vim."}]},{"type":"element","tag":"style","props":{},"children":[{"type":"text","value":"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[{"id":"preface","depth":2,"text":"Preface"},{"id":"configuration","depth":2,"text":"Configuration"}]}},"_type":"markdown","_id":"content:articles:vim-fugitive-gpg-pinentry.md","_source":"content","_file":"articles/vim-fugitive-gpg-pinentry.md","_stem":"articles/vim-fugitive-gpg-pinentry","_extension":"md"}],"navigation":[{"title":"Articles","_path":"/articles","children":[{"title":"Upgrading the Firmware on the PCEngines APU2","_path":"/articles/apu2-firmware-upgrade"},{"title":"Docker Volume Permissions with SELinux","_path":"/articles/docker-selinux-volumes"},{"title":"Exploring the Digital Ocean `doctl` Utility","_path":"/articles/doctl"},{"title":"Impressions of Fennel with Hammerspoon","_path":"/articles/fennel-initial-exploration"},{"title":"Migrate to TrueNAS Scale from TrueNAS Core","_path":"/articles/migrate-truenas-from-core-to-scale"},{"title":"How To Add an RSS Feed to a Nuxt Website","_path":"/articles/nuxt-content-rss-feed"},{"title":"This Website Has Been Migrated to Nuxt 3 🎉","_path":"/articles/nuxt-v3-migration"},{"title":"Create a Persistent Arch Linux Bootable USB with Vagrant","_path":"/articles/persistent-archlinux-usb"},{"title":"Easily Transcribe Podcasts with Whisper.cpp","_path":"/articles/podcast-transcription-whispercpp"},{"title":"Tip: Re-running Bash Commands","_path":"/articles/quick-tip-rerunning-bash-commands"},{"title":"Reset IPMI Credentials from the Host OS","_path":"/articles/reset-ipmi-password-from-host-os"},{"title":"Configuring a YubiKey for use with OpenSSH","_path":"/articles/ssh-ed25519-sk-yubikey"},{"title":"Unit Testing in MicroPython with Mocks","_path":"/articles/unit-testing-micropython-with-mocks"},{"title":"Using pinentry-mac to sign commits from vim-fugitive","_path":"/articles/vim-fugitive-gpg-pinentry"}]}]} \ No newline at end of file diff --git a/api/_content/query/6WfgQ5T9tH.1735276470171.json b/api/_content/query/6WfgQ5T9tH.1735327930064.json similarity index 100% rename from api/_content/query/6WfgQ5T9tH.1735276470171.json rename to api/_content/query/6WfgQ5T9tH.1735327930064.json diff --git a/api/_content/query/7TfxHWYxZH.1735276470171.json b/api/_content/query/7TfxHWYxZH.1735327930064.json similarity index 100% rename from api/_content/query/7TfxHWYxZH.1735276470171.json rename to api/_content/query/7TfxHWYxZH.1735327930064.json diff --git a/api/_content/query/98CVAb0zLR.1735276470171.json b/api/_content/query/98CVAb0zLR.1735327930064.json similarity index 100% rename from api/_content/query/98CVAb0zLR.1735276470171.json rename to api/_content/query/98CVAb0zLR.1735327930064.json diff --git a/api/_content/query/DIau8q3IMV.1735276470171.json b/api/_content/query/DIau8q3IMV.1735327930064.json similarity index 100% rename from api/_content/query/DIau8q3IMV.1735276470171.json rename to api/_content/query/DIau8q3IMV.1735327930064.json diff --git a/api/_content/query/LcWrOc5HNX.1735276470171.json b/api/_content/query/LcWrOc5HNX.1735327930064.json similarity index 100% rename from api/_content/query/LcWrOc5HNX.1735276470171.json rename to api/_content/query/LcWrOc5HNX.1735327930064.json diff --git a/api/_content/query/Nr5UObwduV.1735276470171.json b/api/_content/query/Nr5UObwduV.1735327930064.json similarity index 100% rename from api/_content/query/Nr5UObwduV.1735276470171.json rename to api/_content/query/Nr5UObwduV.1735327930064.json diff --git a/api/_content/query/QmL7G3Pk7i.1735276470171.json b/api/_content/query/QmL7G3Pk7i.1735327930064.json similarity index 100% rename from api/_content/query/QmL7G3Pk7i.1735276470171.json rename to api/_content/query/QmL7G3Pk7i.1735327930064.json diff --git a/api/_content/query/TDaCLaQ73L.1735276470171.json b/api/_content/query/TDaCLaQ73L.1735327930064.json similarity index 100% rename from api/_content/query/TDaCLaQ73L.1735276470171.json rename to api/_content/query/TDaCLaQ73L.1735327930064.json diff --git a/api/_content/query/XgcK3x9EBy.1735276470171.json b/api/_content/query/XgcK3x9EBy.1735327930064.json similarity index 100% rename from api/_content/query/XgcK3x9EBy.1735276470171.json rename to api/_content/query/XgcK3x9EBy.1735327930064.json diff --git a/api/_content/query/ZzD9WRl1Uk.1735276470171.json b/api/_content/query/ZzD9WRl1Uk.1735327930064.json similarity index 100% rename from api/_content/query/ZzD9WRl1Uk.1735276470171.json rename to api/_content/query/ZzD9WRl1Uk.1735327930064.json diff --git a/api/_content/query/bXj5vj6Ts0.1735276470171.json b/api/_content/query/bXj5vj6Ts0.1735327930064.json similarity index 100% rename from api/_content/query/bXj5vj6Ts0.1735276470171.json rename to api/_content/query/bXj5vj6Ts0.1735327930064.json diff --git a/api/_content/query/d7v45RMayO.1735276470171.json b/api/_content/query/d7v45RMayO.1735327930064.json similarity index 100% rename from api/_content/query/d7v45RMayO.1735276470171.json rename to api/_content/query/d7v45RMayO.1735327930064.json diff --git a/api/_content/query/pfbAdBSC9a.1735276470171.json b/api/_content/query/pfbAdBSC9a.1735327930064.json similarity index 100% rename from api/_content/query/pfbAdBSC9a.1735276470171.json rename to api/_content/query/pfbAdBSC9a.1735327930064.json diff --git a/api/_content/query/tGrf8kFZOz.1735276470171.json b/api/_content/query/tGrf8kFZOz.1735327930064.json similarity index 100% rename from api/_content/query/tGrf8kFZOz.1735276470171.json rename to api/_content/query/tGrf8kFZOz.1735327930064.json diff --git a/api/_content/query/ucEXmLbw2Z.1735276470171.json b/api/_content/query/ucEXmLbw2Z.1735327930064.json similarity index 100% rename from api/_content/query/ucEXmLbw2Z.1735276470171.json rename to api/_content/query/ucEXmLbw2Z.1735327930064.json diff --git a/api/_content/query/v3HQ7aAWkW.1735276470171.json b/api/_content/query/v3HQ7aAWkW.1735327930064.json similarity index 100% rename from api/_content/query/v3HQ7aAWkW.1735276470171.json rename to api/_content/query/v3HQ7aAWkW.1735327930064.json diff --git a/articles/_payload.json b/articles/_payload.json index 734a98c8..a5e285cf 100644 --- a/articles/_payload.json +++ b/articles/_payload.json @@ -1 +1 @@ -[{"data":1,"prerenderedAt":360},["ShallowReactive",2],{"articles":3},[4,45,87,131,157,174,207,222,239,253,277,297,313,329],{"_path":5,"title":6,"description":7,"date":8,"tags":9,"categories":12,"excerpt":15,"_id":44},"/articles/ssh-ed25519-sk-yubikey","Configuring a YubiKey for use with OpenSSH","YubiKey's are a convenient way to introduce a physical form of two factor authentication into ones workflow. They support a variety of protocols, but in this guide we will walk through how to configure a YubiKey for use with OpenSSH via the \"new\" ed25519-sk key type that supports FIDO compliant hardware keys.","2024-06-09",[10,11],"unix","configurations",[13,14],"tooling","tips",{"type":16,"children":17},"root",[18],{"type":19,"tag":20,"props":21,"children":22},"element","p",{},[23,33,35,42],{"type":19,"tag":24,"props":25,"children":29},"a",{"href":26,"rel":27},"https://www.yubico.com/",[28],"nofollow",[30],{"type":31,"value":32},"text","YubiKey's",{"type":31,"value":34}," are a convenient way to introduce a physical form of two factor authentication into ones workflow. They support a variety of protocols, but in this guide we will walk through how to configure a YubiKey for use with OpenSSH via the \"new\" ",{"type":19,"tag":36,"props":37,"children":39},"code",{"className":38},[],[40],{"type":31,"value":41},"ed25519-sk",{"type":31,"value":43}," key type that supports FIDO compliant hardware keys.","content:articles:ssh-ed25519-sk-yubikey.md",{"_path":46,"title":47,"description":48,"date":49,"tags":50,"categories":53,"excerpt":54,"_id":86},"/articles/vim-fugitive-gpg-pinentry","Using pinentry-mac to sign commits from vim-fugitive","In order to sign git commits from within Vim using a plugin like tpope/vim-fugitive, it is necessary to configure the gpg-agent to use a GUI based pinentry-program.","2024-05-11",[51,52],"vim","tip",[13,14],{"type":16,"children":55},[56],{"type":19,"tag":20,"props":57,"children":58},{},[59,61,68,70,76,78,84],{"type":31,"value":60},"In order to sign git commits from within Vim using a plugin like ",{"type":19,"tag":24,"props":62,"children":65},{"href":63,"rel":64},"https://github.com/tpope/vim-fugitive",[28],[66],{"type":31,"value":67},"tpope/vim-fugitive",{"type":31,"value":69},", it is necessary to configure the ",{"type":19,"tag":36,"props":71,"children":73},{"className":72},[],[74],{"type":31,"value":75},"gpg-agent",{"type":31,"value":77}," to use a GUI based ",{"type":19,"tag":36,"props":79,"children":81},{"className":80},[],[82],{"type":31,"value":83},"pinentry-program",{"type":31,"value":85},".","content:articles:vim-fugitive-gpg-pinentry.md",{"_path":88,"title":89,"description":90,"date":91,"tags":92,"categories":95,"excerpt":97,"_id":130},"/articles/podcast-transcription-whispercpp","Easily Transcribe Podcasts with Whisper.cpp","If you've ever had the need to transcribe a podcast, lecture, or some other audio recording, it turns out it's surprisingly easy with the extremely impressive whisper.cpp project. This high-performance fork of OpenAI's Whisper can run on all sorts of hardware -- including my M1 Mac Mini. Let's walk through an example from start-to-finish of transcribing an episode of the Alter Everything podcast.","2024-01-08",[93,94],"whisper.cpp","ml",[96],"programming",{"type":16,"children":98},[99],{"type":19,"tag":20,"props":100,"children":101},{},[102,104,110,112,119,121,128],{"type":31,"value":103},"If you've ever had the need to transcribe a podcast, lecture, or some other audio recording, it turns out it's surprisingly easy with the extremely impressive ",{"type":19,"tag":24,"props":105,"children":108},{"href":106,"rel":107},"https://github.com/ggerganov/whisper.cpp",[28],[109],{"type":31,"value":93},{"type":31,"value":111}," project. This high-performance fork of ",{"type":19,"tag":24,"props":113,"children":116},{"href":114,"rel":115},"https://github.com/openai/whisper",[28],[117],{"type":31,"value":118},"OpenAI's Whisper",{"type":31,"value":120}," can run on all sorts of hardware -- including my M1 Mac Mini. Let's walk through an example from start-to-finish of transcribing an episode of the ",{"type":19,"tag":24,"props":122,"children":125},{"href":123,"rel":124},"https://podcasts.apple.com/us/podcast/alter-everything/id1356137854",[28],[126],{"type":31,"value":127},"Alter Everything",{"type":31,"value":129}," podcast.","content:articles:podcast-transcription-whispercpp.md",{"_path":132,"title":133,"description":134,"date":135,"tags":136,"categories":139,"excerpt":140,"_id":156},"/articles/nuxt-content-rss-feed","How To Add an RSS Feed to a Nuxt Website","If you are a user of Nuxt Content and you wish to configure an RSS feed for your website, it's a surprisingly straight forward process! In this article, we will walk through the code changes required to host an RSS feed for both a statically generated, and Universal Nuxt application.","2024-01-06",[137,138],"nuxt","rss",[96],{"type":16,"children":141},[142],{"type":19,"tag":20,"props":143,"children":144},{},[145,147,154],{"type":31,"value":146},"If you are a user of ",{"type":19,"tag":24,"props":148,"children":151},{"href":149,"rel":150},"https://content.nuxt.com/",[28],[152],{"type":31,"value":153},"Nuxt Content",{"type":31,"value":155}," and you wish to configure an RSS feed for your website, it's a surprisingly straight forward process! In this article, we will walk through the code changes required to host an RSS feed for both a statically generated, and Universal Nuxt application.","content:articles:nuxt-content-rss-feed.md",{"_path":158,"title":159,"description":160,"date":161,"tags":162,"categories":166,"excerpt":167,"_id":173},"/articles/fennel-initial-exploration","Impressions of Fennel with Hammerspoon","A while back I read an introductory book on Lisp programming titled, \"The Little\nSchemer\". This book opened my mind to new (to me) programming paradigms, and left me\nwith a strong desire to find a way to incorporate Lisp programming into my every day\nlife. It took some time, but I believe I've found what I've been looking for: Fennel.","2023-10-22",[163,164,165],"lisp","hammerspoon","fennel",[163],{"type":16,"children":168},[169],{"type":19,"tag":20,"props":170,"children":171},{},[172],{"type":31,"value":160},"content:articles:fennel-initial-exploration.md",{"_path":175,"title":176,"description":177,"date":178,"tags":179,"categories":182,"excerpt":183,"_id":206},"/articles/doctl","Exploring the Digital Ocean `doctl` Utility","I recently had the need to spool up a small ephemeral Linux instance, and wanted to try something new by exploring the Digital Ocean doctl command line utility.\nThis proved to be an extremely easy way to configure, create, connect, and destroy a Linux box, and I foresee myself using this service even more in the future.","2023-01-01",[180,181],"linux","digital-ocean",[180],{"type":16,"children":184},[185],{"type":19,"tag":20,"props":186,"children":187},{},[188,190,196,198,204],{"type":31,"value":189},"I recently had the need to spool up a small ephemeral Linux instance, and wanted to try something new by exploring the Digital Ocean ",{"type":19,"tag":36,"props":191,"children":193},{"className":192},[],[194],{"type":31,"value":195},"doctl",{"type":31,"value":197}," command line utility.\nThis proved to be an ",{"type":19,"tag":199,"props":200,"children":201},"em",{},[202],{"type":31,"value":203},"extremely",{"type":31,"value":205}," easy way to configure, create, connect, and destroy a Linux box, and I foresee myself using this service even more in the future.","content:articles:doctl.md",{"_path":208,"title":209,"description":210,"date":211,"tags":212,"categories":213,"excerpt":215,"_id":221},"/articles/nuxt-v3-migration","This Website Has Been Migrated to Nuxt 3 🎉","This website has been migrated to the latest version of the Nuxt web framework, and with it comes all of the exciting goodies that the Vue and Nuxt teams have been concocting over the past few years.\nNot to mention, all of the great plugins in the Vue ecosystem!","2022-12-31",[137],[214],"web",{"type":16,"children":216},[217],{"type":19,"tag":20,"props":218,"children":219},{},[220],{"type":31,"value":210},"content:articles:nuxt-v3-migration.md",{"_path":223,"title":224,"description":225,"date":226,"tags":227,"categories":231,"excerpt":232,"_id":238},"/articles/migrate-truenas-from-core-to-scale","Migrate to TrueNAS Scale from TrueNAS Core","TrueNAS Scale offers a variety of interesting features that are not supported in its TrueNAS Core counterpart. Most notably, because the base operating system is Debian Linux, opposed to FreeBSD, there is native support for Linux containers via Docker, and Kubernetes Pods! This post walks through the steps required to upgrade from TrueNAS Core to TrueNAS Scale.","2021-12-28",[228,229,230],"homelab","supermicro","truenas",[228],{"type":16,"children":233},[234],{"type":19,"tag":20,"props":235,"children":236},{},[237],{"type":31,"value":225},"content:articles:migrate-truenas-from-core-to-scale.md",{"_path":240,"title":241,"description":242,"date":243,"tags":244,"categories":245,"excerpt":246,"_id":252},"/articles/reset-ipmi-password-from-host-os","Reset IPMI Credentials from the Host OS","If you ever find yourself locked out of the Intelligent Platform Management Interface (IPMI) of a server, these\ninstructions will guide your through the process of resetting the credentials to their default values from the host\noperating system.","2021-12-27",[228,229,230],[228],{"type":16,"children":247},[248],{"type":19,"tag":20,"props":249,"children":250},{},[251],{"type":31,"value":242},"content:articles:reset-ipmi-password-from-host-os.md",{"_path":254,"title":255,"description":256,"date":257,"tags":258,"categories":260,"excerpt":261,"_id":276},"/articles/quick-tip-rerunning-bash-commands","Tip: Re-running Bash Commands","Do you ever find yourself having to re-run a Bash command? I often find this\nhappening to myself when I neglect to use sudo for a command that requires\nroot privileges.","2021-09-22",[52,259],"bash",[14],{"type":16,"children":262},[263],{"type":19,"tag":20,"props":264,"children":265},{},[266,268,274],{"type":31,"value":267},"Do you ever find yourself having to re-run a Bash command? I often find this\nhappening to myself when I neglect to use ",{"type":19,"tag":36,"props":269,"children":271},{"className":270},[],[272],{"type":31,"value":273},"sudo",{"type":31,"value":275}," for a command that requires\nroot privileges.","content:articles:quick-tip-rerunning-bash-commands.md",{"_path":278,"title":279,"description":280,"date":281,"tags":282,"categories":287,"excerpt":290,"_id":296},"/articles/unit-testing-micropython-with-mocks","Unit Testing in MicroPython with Mocks","Unit testing code for embedded systems can be challenging. While it's possible\nto leverage emulators, write side-effect free code, or run tests on the\nhardware itself, it's often easiest to unit test the code on your personal\ncomputer with mocked hardware functionality.","2020-02-07",[283,284,285,286],"micropython","testing","mocks","tutorial",[288,289],"python","embedded",{"type":16,"children":291},[292],{"type":19,"tag":20,"props":293,"children":294},{},[295],{"type":31,"value":280},"content:articles:unit-testing-micropython-with-mocks.md",{"_path":298,"title":299,"description":300,"date":301,"tags":302,"categories":305,"excerpt":306,"_id":312},"/articles/persistent-archlinux-usb","Create a Persistent Arch Linux Bootable USB with Vagrant","When installing a linux distribution, it is common for the instructions to have\nthe user create a bootable USB, boot from the device, and proceed with the\ninstallation procedure from that live medium. However, this blog post will\noutline an alternative approach where a virtual machine created with Vagrant\nwill be used in favor of the live medium.","2020-01-09",[303,304],"vagrant","archlinux",[180],{"type":16,"children":307},[308],{"type":19,"tag":20,"props":309,"children":310},{},[311],{"type":31,"value":300},"content:articles:persistent-archlinux-usb.md",{"_path":314,"title":315,"description":316,"date":317,"tags":318,"categories":321,"excerpt":322,"_id":328},"/articles/docker-selinux-volumes","Docker Volume Permissions with SELinux","Unfamiliar with running Docker on a SELinux enabled system, I found myself\nrunning into a bunch of file permission errors while creating volumes.","2019-12-26",[319,320],"docker","selinux",[180],{"type":16,"children":323},[324],{"type":19,"tag":20,"props":325,"children":326},{},[327],{"type":31,"value":316},"content:articles:docker-selinux-volumes.md",{"_path":330,"title":331,"description":332,"date":333,"tags":334,"categories":337,"excerpt":338,"_id":359},"/articles/apu2-firmware-upgrade","Upgrading the Firmware on the PCEngines APU2","I've had a PCEngines APU2 gathering dust for a\nfew years, and have recently decided to dust it off.","2019-12-21",[335,336],"pcengine","apu",[180],{"type":16,"children":339},[340,354],{"type":19,"tag":20,"props":341,"children":342},{},[343,345,352],{"type":31,"value":344},"I've had a ",{"type":19,"tag":24,"props":346,"children":349},{"href":347,"rel":348},"https://pcengines.ch/apu2.htm",[28],[350],{"type":31,"value":351},"PCEngines APU2",{"type":31,"value":353}," gathering dust for a\nfew years, and have recently decided to dust it off.",{"type":19,"tag":20,"props":355,"children":356},{},[357],{"type":31,"value":358},"Since the last time the device has been powered on, there have been many great\nimprovements to the firmware, and it was very-much due for an upgrade. The\nfollowing steps outline how the firmware was upgraded on the APU from the\nalready-installed operating system -- CentOS.","content:articles:apu2-firmware-upgrade.md",1735276484937] \ No newline at end of file +[{"data":1,"prerenderedAt":360},["ShallowReactive",2],{"articles":3},[4,45,87,131,157,174,207,222,239,253,277,297,313,329],{"_path":5,"title":6,"description":7,"date":8,"tags":9,"categories":12,"excerpt":15,"_id":44},"/articles/ssh-ed25519-sk-yubikey","Configuring a YubiKey for use with OpenSSH","YubiKey's are a convenient way to introduce a physical form of two factor authentication into ones workflow. They support a variety of protocols, but in this guide we will walk through how to configure a YubiKey for use with OpenSSH via the \"new\" ed25519-sk key type that supports FIDO compliant hardware keys.","2024-06-09",[10,11],"unix","configurations",[13,14],"tooling","tips",{"type":16,"children":17},"root",[18],{"type":19,"tag":20,"props":21,"children":22},"element","p",{},[23,33,35,42],{"type":19,"tag":24,"props":25,"children":29},"a",{"href":26,"rel":27},"https://www.yubico.com/",[28],"nofollow",[30],{"type":31,"value":32},"text","YubiKey's",{"type":31,"value":34}," are a convenient way to introduce a physical form of two factor authentication into ones workflow. They support a variety of protocols, but in this guide we will walk through how to configure a YubiKey for use with OpenSSH via the \"new\" ",{"type":19,"tag":36,"props":37,"children":39},"code",{"className":38},[],[40],{"type":31,"value":41},"ed25519-sk",{"type":31,"value":43}," key type that supports FIDO compliant hardware keys.","content:articles:ssh-ed25519-sk-yubikey.md",{"_path":46,"title":47,"description":48,"date":49,"tags":50,"categories":53,"excerpt":54,"_id":86},"/articles/vim-fugitive-gpg-pinentry","Using pinentry-mac to sign commits from vim-fugitive","In order to sign git commits from within Vim using a plugin like tpope/vim-fugitive, it is necessary to configure the gpg-agent to use a GUI based pinentry-program.","2024-05-11",[51,52],"vim","tip",[13,14],{"type":16,"children":55},[56],{"type":19,"tag":20,"props":57,"children":58},{},[59,61,68,70,76,78,84],{"type":31,"value":60},"In order to sign git commits from within Vim using a plugin like ",{"type":19,"tag":24,"props":62,"children":65},{"href":63,"rel":64},"https://github.com/tpope/vim-fugitive",[28],[66],{"type":31,"value":67},"tpope/vim-fugitive",{"type":31,"value":69},", it is necessary to configure the ",{"type":19,"tag":36,"props":71,"children":73},{"className":72},[],[74],{"type":31,"value":75},"gpg-agent",{"type":31,"value":77}," to use a GUI based ",{"type":19,"tag":36,"props":79,"children":81},{"className":80},[],[82],{"type":31,"value":83},"pinentry-program",{"type":31,"value":85},".","content:articles:vim-fugitive-gpg-pinentry.md",{"_path":88,"title":89,"description":90,"date":91,"tags":92,"categories":95,"excerpt":97,"_id":130},"/articles/podcast-transcription-whispercpp","Easily Transcribe Podcasts with Whisper.cpp","If you've ever had the need to transcribe a podcast, lecture, or some other audio recording, it turns out it's surprisingly easy with the extremely impressive whisper.cpp project. This high-performance fork of OpenAI's Whisper can run on all sorts of hardware -- including my M1 Mac Mini. Let's walk through an example from start-to-finish of transcribing an episode of the Alter Everything podcast.","2024-01-08",[93,94],"whisper.cpp","ml",[96],"programming",{"type":16,"children":98},[99],{"type":19,"tag":20,"props":100,"children":101},{},[102,104,110,112,119,121,128],{"type":31,"value":103},"If you've ever had the need to transcribe a podcast, lecture, or some other audio recording, it turns out it's surprisingly easy with the extremely impressive ",{"type":19,"tag":24,"props":105,"children":108},{"href":106,"rel":107},"https://github.com/ggerganov/whisper.cpp",[28],[109],{"type":31,"value":93},{"type":31,"value":111}," project. This high-performance fork of ",{"type":19,"tag":24,"props":113,"children":116},{"href":114,"rel":115},"https://github.com/openai/whisper",[28],[117],{"type":31,"value":118},"OpenAI's Whisper",{"type":31,"value":120}," can run on all sorts of hardware -- including my M1 Mac Mini. Let's walk through an example from start-to-finish of transcribing an episode of the ",{"type":19,"tag":24,"props":122,"children":125},{"href":123,"rel":124},"https://podcasts.apple.com/us/podcast/alter-everything/id1356137854",[28],[126],{"type":31,"value":127},"Alter Everything",{"type":31,"value":129}," podcast.","content:articles:podcast-transcription-whispercpp.md",{"_path":132,"title":133,"description":134,"date":135,"tags":136,"categories":139,"excerpt":140,"_id":156},"/articles/nuxt-content-rss-feed","How To Add an RSS Feed to a Nuxt Website","If you are a user of Nuxt Content and you wish to configure an RSS feed for your website, it's a surprisingly straight forward process! In this article, we will walk through the code changes required to host an RSS feed for both a statically generated, and Universal Nuxt application.","2024-01-06",[137,138],"nuxt","rss",[96],{"type":16,"children":141},[142],{"type":19,"tag":20,"props":143,"children":144},{},[145,147,154],{"type":31,"value":146},"If you are a user of ",{"type":19,"tag":24,"props":148,"children":151},{"href":149,"rel":150},"https://content.nuxt.com/",[28],[152],{"type":31,"value":153},"Nuxt Content",{"type":31,"value":155}," and you wish to configure an RSS feed for your website, it's a surprisingly straight forward process! In this article, we will walk through the code changes required to host an RSS feed for both a statically generated, and Universal Nuxt application.","content:articles:nuxt-content-rss-feed.md",{"_path":158,"title":159,"description":160,"date":161,"tags":162,"categories":166,"excerpt":167,"_id":173},"/articles/fennel-initial-exploration","Impressions of Fennel with Hammerspoon","A while back I read an introductory book on Lisp programming titled, \"The Little\nSchemer\". This book opened my mind to new (to me) programming paradigms, and left me\nwith a strong desire to find a way to incorporate Lisp programming into my every day\nlife. It took some time, but I believe I've found what I've been looking for: Fennel.","2023-10-22",[163,164,165],"lisp","hammerspoon","fennel",[163],{"type":16,"children":168},[169],{"type":19,"tag":20,"props":170,"children":171},{},[172],{"type":31,"value":160},"content:articles:fennel-initial-exploration.md",{"_path":175,"title":176,"description":177,"date":178,"tags":179,"categories":182,"excerpt":183,"_id":206},"/articles/doctl","Exploring the Digital Ocean `doctl` Utility","I recently had the need to spool up a small ephemeral Linux instance, and wanted to try something new by exploring the Digital Ocean doctl command line utility.\nThis proved to be an extremely easy way to configure, create, connect, and destroy a Linux box, and I foresee myself using this service even more in the future.","2023-01-01",[180,181],"linux","digital-ocean",[180],{"type":16,"children":184},[185],{"type":19,"tag":20,"props":186,"children":187},{},[188,190,196,198,204],{"type":31,"value":189},"I recently had the need to spool up a small ephemeral Linux instance, and wanted to try something new by exploring the Digital Ocean ",{"type":19,"tag":36,"props":191,"children":193},{"className":192},[],[194],{"type":31,"value":195},"doctl",{"type":31,"value":197}," command line utility.\nThis proved to be an ",{"type":19,"tag":199,"props":200,"children":201},"em",{},[202],{"type":31,"value":203},"extremely",{"type":31,"value":205}," easy way to configure, create, connect, and destroy a Linux box, and I foresee myself using this service even more in the future.","content:articles:doctl.md",{"_path":208,"title":209,"description":210,"date":211,"tags":212,"categories":213,"excerpt":215,"_id":221},"/articles/nuxt-v3-migration","This Website Has Been Migrated to Nuxt 3 🎉","This website has been migrated to the latest version of the Nuxt web framework, and with it comes all of the exciting goodies that the Vue and Nuxt teams have been concocting over the past few years.\nNot to mention, all of the great plugins in the Vue ecosystem!","2022-12-31",[137],[214],"web",{"type":16,"children":216},[217],{"type":19,"tag":20,"props":218,"children":219},{},[220],{"type":31,"value":210},"content:articles:nuxt-v3-migration.md",{"_path":223,"title":224,"description":225,"date":226,"tags":227,"categories":231,"excerpt":232,"_id":238},"/articles/migrate-truenas-from-core-to-scale","Migrate to TrueNAS Scale from TrueNAS Core","TrueNAS Scale offers a variety of interesting features that are not supported in its TrueNAS Core counterpart. Most notably, because the base operating system is Debian Linux, opposed to FreeBSD, there is native support for Linux containers via Docker, and Kubernetes Pods! This post walks through the steps required to upgrade from TrueNAS Core to TrueNAS Scale.","2021-12-28",[228,229,230],"homelab","supermicro","truenas",[228],{"type":16,"children":233},[234],{"type":19,"tag":20,"props":235,"children":236},{},[237],{"type":31,"value":225},"content:articles:migrate-truenas-from-core-to-scale.md",{"_path":240,"title":241,"description":242,"date":243,"tags":244,"categories":245,"excerpt":246,"_id":252},"/articles/reset-ipmi-password-from-host-os","Reset IPMI Credentials from the Host OS","If you ever find yourself locked out of the Intelligent Platform Management Interface (IPMI) of a server, these\ninstructions will guide your through the process of resetting the credentials to their default values from the host\noperating system.","2021-12-27",[228,229,230],[228],{"type":16,"children":247},[248],{"type":19,"tag":20,"props":249,"children":250},{},[251],{"type":31,"value":242},"content:articles:reset-ipmi-password-from-host-os.md",{"_path":254,"title":255,"description":256,"date":257,"tags":258,"categories":260,"excerpt":261,"_id":276},"/articles/quick-tip-rerunning-bash-commands","Tip: Re-running Bash Commands","Do you ever find yourself having to re-run a Bash command? I often find this\nhappening to myself when I neglect to use sudo for a command that requires\nroot privileges.","2021-09-22",[52,259],"bash",[14],{"type":16,"children":262},[263],{"type":19,"tag":20,"props":264,"children":265},{},[266,268,274],{"type":31,"value":267},"Do you ever find yourself having to re-run a Bash command? I often find this\nhappening to myself when I neglect to use ",{"type":19,"tag":36,"props":269,"children":271},{"className":270},[],[272],{"type":31,"value":273},"sudo",{"type":31,"value":275}," for a command that requires\nroot privileges.","content:articles:quick-tip-rerunning-bash-commands.md",{"_path":278,"title":279,"description":280,"date":281,"tags":282,"categories":287,"excerpt":290,"_id":296},"/articles/unit-testing-micropython-with-mocks","Unit Testing in MicroPython with Mocks","Unit testing code for embedded systems can be challenging. While it's possible\nto leverage emulators, write side-effect free code, or run tests on the\nhardware itself, it's often easiest to unit test the code on your personal\ncomputer with mocked hardware functionality.","2020-02-07",[283,284,285,286],"micropython","testing","mocks","tutorial",[288,289],"python","embedded",{"type":16,"children":291},[292],{"type":19,"tag":20,"props":293,"children":294},{},[295],{"type":31,"value":280},"content:articles:unit-testing-micropython-with-mocks.md",{"_path":298,"title":299,"description":300,"date":301,"tags":302,"categories":305,"excerpt":306,"_id":312},"/articles/persistent-archlinux-usb","Create a Persistent Arch Linux Bootable USB with Vagrant","When installing a linux distribution, it is common for the instructions to have\nthe user create a bootable USB, boot from the device, and proceed with the\ninstallation procedure from that live medium. However, this blog post will\noutline an alternative approach where a virtual machine created with Vagrant\nwill be used in favor of the live medium.","2020-01-09",[303,304],"vagrant","archlinux",[180],{"type":16,"children":307},[308],{"type":19,"tag":20,"props":309,"children":310},{},[311],{"type":31,"value":300},"content:articles:persistent-archlinux-usb.md",{"_path":314,"title":315,"description":316,"date":317,"tags":318,"categories":321,"excerpt":322,"_id":328},"/articles/docker-selinux-volumes","Docker Volume Permissions with SELinux","Unfamiliar with running Docker on a SELinux enabled system, I found myself\nrunning into a bunch of file permission errors while creating volumes.","2019-12-26",[319,320],"docker","selinux",[180],{"type":16,"children":323},[324],{"type":19,"tag":20,"props":325,"children":326},{},[327],{"type":31,"value":316},"content:articles:docker-selinux-volumes.md",{"_path":330,"title":331,"description":332,"date":333,"tags":334,"categories":337,"excerpt":338,"_id":359},"/articles/apu2-firmware-upgrade","Upgrading the Firmware on the PCEngines APU2","I've had a PCEngines APU2 gathering dust for a\nfew years, and have recently decided to dust it off.","2019-12-21",[335,336],"pcengine","apu",[180],{"type":16,"children":339},[340,354],{"type":19,"tag":20,"props":341,"children":342},{},[343,345,352],{"type":31,"value":344},"I've had a ",{"type":19,"tag":24,"props":346,"children":349},{"href":347,"rel":348},"https://pcengines.ch/apu2.htm",[28],[350],{"type":31,"value":351},"PCEngines APU2",{"type":31,"value":353}," gathering dust for a\nfew years, and have recently decided to dust it off.",{"type":19,"tag":20,"props":355,"children":356},{},[357],{"type":31,"value":358},"Since the last time the device has been powered on, there have been many great\nimprovements to the firmware, and it was very-much due for an upgrade. The\nfollowing steps outline how the firmware was upgraded on the APU from the\nalready-installed operating system -- CentOS.","content:articles:apu2-firmware-upgrade.md",1735327944757] \ No newline at end of file diff --git a/articles/apu2-firmware-upgrade/_payload.json b/articles/apu2-firmware-upgrade/_payload.json index a9cdcb4a..3b90bf31 100644 --- a/articles/apu2-firmware-upgrade/_payload.json +++ b/articles/apu2-firmware-upgrade/_payload.json @@ -1 +1 @@ -[{"data":1,"prerenderedAt":315},["ShallowReactive",2],{"page-data":3},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"date":10,"draft":6,"tags":11,"categories":14,"excerpt":16,"body":43,"_type":309,"_id":310,"_source":311,"_file":312,"_stem":313,"_extension":314},"/articles/apu2-firmware-upgrade","articles",false,"","Upgrading the Firmware on the PCEngines APU2","I've had a PCEngines APU2 gathering dust for a\nfew years, and have recently decided to dust it off.","2019-12-21",[12,13],"pcengine","apu",[15],"linux",{"type":17,"children":18},"root",[19,38],{"type":20,"tag":21,"props":22,"children":23},"element","p",{},[24,27,36],{"type":25,"value":26},"text","I've had a ",{"type":20,"tag":28,"props":29,"children":33},"a",{"href":30,"rel":31},"https://pcengines.ch/apu2.htm",[32],"nofollow",[34],{"type":25,"value":35},"PCEngines APU2",{"type":25,"value":37}," gathering dust for a\nfew years, and have recently decided to dust it off.",{"type":20,"tag":21,"props":39,"children":40},{},[41],{"type":25,"value":42},"Since the last time the device has been powered on, there have been many great\nimprovements to the firmware, and it was very-much due for an upgrade. The\nfollowing steps outline how the firmware was upgraded on the APU from the\nalready-installed operating system -- CentOS.",{"type":17,"children":44,"toc":307},[45,55,59,64,74,103,161,174,200,205,244,253,301],{"type":20,"tag":21,"props":46,"children":47},{},[48,49,54],{"type":25,"value":26},{"type":20,"tag":28,"props":50,"children":52},{"href":30,"rel":51},[32],[53],{"type":25,"value":35},{"type":25,"value":37},{"type":20,"tag":21,"props":56,"children":57},{},[58],{"type":25,"value":42},{"type":20,"tag":21,"props":60,"children":61},{},[62],{"type":25,"value":63},"First, we will connect to the device over the serial port",{"type":20,"tag":65,"props":66,"children":68},"pre",{"code":67},"screen /dev/tty.usbserial 115200\n",[69],{"type":20,"tag":70,"props":71,"children":72},"code",{"__ignoreMap":7},[73],{"type":25,"value":67},{"type":20,"tag":21,"props":75,"children":76},{},[77,79,85,87,93,95,101],{"type":25,"value":78},"Then, we will install the ",{"type":20,"tag":70,"props":80,"children":82},{"className":81},[],[83],{"type":25,"value":84},"flashrom",{"type":25,"value":86}," utility that is needed to update the\nfirmware. Because it is not available in the default ",{"type":20,"tag":70,"props":88,"children":90},{"className":89},[],[91],{"type":25,"value":92},"yum",{"type":25,"value":94}," repositories, we\nwill enable the ",{"type":20,"tag":96,"props":97,"children":98},"em",{},[99],{"type":25,"value":100},"Extra Packages for Enterprise Linux",{"type":25,"value":102}," (EPEL) repository before\ninstallation.",{"type":20,"tag":65,"props":104,"children":108},{"code":105,"language":106,"meta":7,"className":107,"style":7},"sudo yum install epel-release\nsudo yum install flashrom\n","bash","language-bash shiki shiki-themes github-light",[109],{"type":20,"tag":70,"props":110,"children":111},{"__ignoreMap":7},[112,140],{"type":20,"tag":113,"props":114,"children":117},"span",{"class":115,"line":116},"line",1,[118,124,130,135],{"type":20,"tag":113,"props":119,"children":121},{"style":120},"--shiki-default:#6F42C1",[122],{"type":25,"value":123},"sudo",{"type":20,"tag":113,"props":125,"children":127},{"style":126},"--shiki-default:#032F62",[128],{"type":25,"value":129}," yum",{"type":20,"tag":113,"props":131,"children":132},{"style":126},[133],{"type":25,"value":134}," install",{"type":20,"tag":113,"props":136,"children":137},{"style":126},[138],{"type":25,"value":139}," epel-release\n",{"type":20,"tag":113,"props":141,"children":143},{"class":115,"line":142},2,[144,148,152,156],{"type":20,"tag":113,"props":145,"children":146},{"style":120},[147],{"type":25,"value":123},{"type":20,"tag":113,"props":149,"children":150},{"style":126},[151],{"type":25,"value":129},{"type":20,"tag":113,"props":153,"children":154},{"style":126},[155],{"type":25,"value":134},{"type":20,"tag":113,"props":157,"children":158},{"style":126},[159],{"type":25,"value":160}," flashrom\n",{"type":20,"tag":21,"props":162,"children":163},{},[164,166,172],{"type":25,"value":165},"Next, we will download the latest version of the firmware that is compatible\nwith the APU2 device from the PC Engines release website:\n",{"type":20,"tag":28,"props":167,"children":170},{"href":168,"rel":169},"https://pcengines.github.io/",[32],[171],{"type":25,"value":168},{"type":25,"value":173},".",{"type":20,"tag":65,"props":175,"children":177},{"code":176,"language":106,"meta":7,"className":107,"style":7},"curl -O https://3mdeb.com/open-source-firmware/pcengines/apu2/apu2_v4.11.0.1.rom\n",[178],{"type":20,"tag":70,"props":179,"children":180},{"__ignoreMap":7},[181],{"type":20,"tag":113,"props":182,"children":183},{"class":115,"line":116},[184,189,195],{"type":20,"tag":113,"props":185,"children":186},{"style":120},[187],{"type":25,"value":188},"curl",{"type":20,"tag":113,"props":190,"children":192},{"style":191},"--shiki-default:#005CC5",[193],{"type":25,"value":194}," -O",{"type":20,"tag":113,"props":196,"children":197},{"style":126},[198],{"type":25,"value":199}," https://3mdeb.com/open-source-firmware/pcengines/apu2/apu2_v4.11.0.1.rom\n",{"type":20,"tag":21,"props":201,"children":202},{},[203],{"type":25,"value":204},"And finally, we will flash the firmware...",{"type":20,"tag":65,"props":206,"children":208},{"code":207,"language":106,"meta":7,"className":107,"style":7},"sudo flashrom -w apu2_v4.11.0.1.rom -p internal:boardmismatch=force\n",[209],{"type":20,"tag":70,"props":210,"children":211},{"__ignoreMap":7},[212],{"type":20,"tag":113,"props":213,"children":214},{"class":115,"line":116},[215,219,224,229,234,239],{"type":20,"tag":113,"props":216,"children":217},{"style":120},[218],{"type":25,"value":123},{"type":20,"tag":113,"props":220,"children":221},{"style":126},[222],{"type":25,"value":223}," flashrom",{"type":20,"tag":113,"props":225,"children":226},{"style":191},[227],{"type":25,"value":228}," -w",{"type":20,"tag":113,"props":230,"children":231},{"style":126},[232],{"type":25,"value":233}," apu2_v4.11.0.1.rom",{"type":20,"tag":113,"props":235,"children":236},{"style":191},[237],{"type":25,"value":238}," -p",{"type":20,"tag":113,"props":240,"children":241},{"style":126},[242],{"type":25,"value":243}," internal:boardmismatch=force\n",{"type":20,"tag":21,"props":245,"children":246},{},[247],{"type":20,"tag":248,"props":249,"children":250},"strong",{},[251],{"type":25,"value":252},"References:",{"type":20,"tag":254,"props":255,"children":256},"ul",{},[257,266,274,283,292],{"type":20,"tag":258,"props":259,"children":260},"li",{},[261],{"type":20,"tag":28,"props":262,"children":264},{"href":30,"rel":263},[32],[265],{"type":25,"value":30},{"type":20,"tag":258,"props":267,"children":268},{},[269],{"type":20,"tag":28,"props":270,"children":272},{"href":168,"rel":271},[32],[273],{"type":25,"value":168},{"type":20,"tag":258,"props":275,"children":276},{},[277],{"type":20,"tag":28,"props":278,"children":281},{"href":279,"rel":280},"https://github.com/pcengines/apu2-documentation/blob/master/docs/firmware_flashing.md",[32],[282],{"type":25,"value":279},{"type":20,"tag":258,"props":284,"children":285},{},[286],{"type":20,"tag":28,"props":287,"children":290},{"href":288,"rel":289},"https://github.com/pcengines/apu2-documentation/blob/master/docs/cold_reset.md",[32],[291],{"type":25,"value":288},{"type":20,"tag":258,"props":293,"children":294},{},[295],{"type":20,"tag":28,"props":296,"children":299},{"href":297,"rel":298},"https://github.com/elad/openbsd-apu2",[32],[300],{"type":25,"value":297},{"type":20,"tag":302,"props":303,"children":304},"style",{},[305],{"type":25,"value":306},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}",{"title":7,"searchDepth":142,"depth":142,"links":308},[],"markdown","content:articles:apu2-firmware-upgrade.md","content","articles/apu2-firmware-upgrade.md","articles/apu2-firmware-upgrade","md",1735276485263] \ No newline at end of file +[{"data":1,"prerenderedAt":315},["ShallowReactive",2],{"page-data":3},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"date":10,"draft":6,"tags":11,"categories":14,"excerpt":16,"body":43,"_type":309,"_id":310,"_source":311,"_file":312,"_stem":313,"_extension":314},"/articles/apu2-firmware-upgrade","articles",false,"","Upgrading the Firmware on the PCEngines APU2","I've had a PCEngines APU2 gathering dust for a\nfew years, and have recently decided to dust it off.","2019-12-21",[12,13],"pcengine","apu",[15],"linux",{"type":17,"children":18},"root",[19,38],{"type":20,"tag":21,"props":22,"children":23},"element","p",{},[24,27,36],{"type":25,"value":26},"text","I've had a ",{"type":20,"tag":28,"props":29,"children":33},"a",{"href":30,"rel":31},"https://pcengines.ch/apu2.htm",[32],"nofollow",[34],{"type":25,"value":35},"PCEngines APU2",{"type":25,"value":37}," gathering dust for a\nfew years, and have recently decided to dust it off.",{"type":20,"tag":21,"props":39,"children":40},{},[41],{"type":25,"value":42},"Since the last time the device has been powered on, there have been many great\nimprovements to the firmware, and it was very-much due for an upgrade. The\nfollowing steps outline how the firmware was upgraded on the APU from the\nalready-installed operating system -- CentOS.",{"type":17,"children":44,"toc":307},[45,55,59,64,74,103,161,174,200,205,244,253,301],{"type":20,"tag":21,"props":46,"children":47},{},[48,49,54],{"type":25,"value":26},{"type":20,"tag":28,"props":50,"children":52},{"href":30,"rel":51},[32],[53],{"type":25,"value":35},{"type":25,"value":37},{"type":20,"tag":21,"props":56,"children":57},{},[58],{"type":25,"value":42},{"type":20,"tag":21,"props":60,"children":61},{},[62],{"type":25,"value":63},"First, we will connect to the device over the serial port",{"type":20,"tag":65,"props":66,"children":68},"pre",{"code":67},"screen /dev/tty.usbserial 115200\n",[69],{"type":20,"tag":70,"props":71,"children":72},"code",{"__ignoreMap":7},[73],{"type":25,"value":67},{"type":20,"tag":21,"props":75,"children":76},{},[77,79,85,87,93,95,101],{"type":25,"value":78},"Then, we will install the ",{"type":20,"tag":70,"props":80,"children":82},{"className":81},[],[83],{"type":25,"value":84},"flashrom",{"type":25,"value":86}," utility that is needed to update the\nfirmware. Because it is not available in the default ",{"type":20,"tag":70,"props":88,"children":90},{"className":89},[],[91],{"type":25,"value":92},"yum",{"type":25,"value":94}," repositories, we\nwill enable the ",{"type":20,"tag":96,"props":97,"children":98},"em",{},[99],{"type":25,"value":100},"Extra Packages for Enterprise Linux",{"type":25,"value":102}," (EPEL) repository before\ninstallation.",{"type":20,"tag":65,"props":104,"children":108},{"code":105,"language":106,"meta":7,"className":107,"style":7},"sudo yum install epel-release\nsudo yum install flashrom\n","bash","language-bash shiki shiki-themes github-light",[109],{"type":20,"tag":70,"props":110,"children":111},{"__ignoreMap":7},[112,140],{"type":20,"tag":113,"props":114,"children":117},"span",{"class":115,"line":116},"line",1,[118,124,130,135],{"type":20,"tag":113,"props":119,"children":121},{"style":120},"--shiki-default:#6F42C1",[122],{"type":25,"value":123},"sudo",{"type":20,"tag":113,"props":125,"children":127},{"style":126},"--shiki-default:#032F62",[128],{"type":25,"value":129}," yum",{"type":20,"tag":113,"props":131,"children":132},{"style":126},[133],{"type":25,"value":134}," install",{"type":20,"tag":113,"props":136,"children":137},{"style":126},[138],{"type":25,"value":139}," epel-release\n",{"type":20,"tag":113,"props":141,"children":143},{"class":115,"line":142},2,[144,148,152,156],{"type":20,"tag":113,"props":145,"children":146},{"style":120},[147],{"type":25,"value":123},{"type":20,"tag":113,"props":149,"children":150},{"style":126},[151],{"type":25,"value":129},{"type":20,"tag":113,"props":153,"children":154},{"style":126},[155],{"type":25,"value":134},{"type":20,"tag":113,"props":157,"children":158},{"style":126},[159],{"type":25,"value":160}," flashrom\n",{"type":20,"tag":21,"props":162,"children":163},{},[164,166,172],{"type":25,"value":165},"Next, we will download the latest version of the firmware that is compatible\nwith the APU2 device from the PC Engines release website:\n",{"type":20,"tag":28,"props":167,"children":170},{"href":168,"rel":169},"https://pcengines.github.io/",[32],[171],{"type":25,"value":168},{"type":25,"value":173},".",{"type":20,"tag":65,"props":175,"children":177},{"code":176,"language":106,"meta":7,"className":107,"style":7},"curl -O https://3mdeb.com/open-source-firmware/pcengines/apu2/apu2_v4.11.0.1.rom\n",[178],{"type":20,"tag":70,"props":179,"children":180},{"__ignoreMap":7},[181],{"type":20,"tag":113,"props":182,"children":183},{"class":115,"line":116},[184,189,195],{"type":20,"tag":113,"props":185,"children":186},{"style":120},[187],{"type":25,"value":188},"curl",{"type":20,"tag":113,"props":190,"children":192},{"style":191},"--shiki-default:#005CC5",[193],{"type":25,"value":194}," -O",{"type":20,"tag":113,"props":196,"children":197},{"style":126},[198],{"type":25,"value":199}," https://3mdeb.com/open-source-firmware/pcengines/apu2/apu2_v4.11.0.1.rom\n",{"type":20,"tag":21,"props":201,"children":202},{},[203],{"type":25,"value":204},"And finally, we will flash the firmware...",{"type":20,"tag":65,"props":206,"children":208},{"code":207,"language":106,"meta":7,"className":107,"style":7},"sudo flashrom -w apu2_v4.11.0.1.rom -p internal:boardmismatch=force\n",[209],{"type":20,"tag":70,"props":210,"children":211},{"__ignoreMap":7},[212],{"type":20,"tag":113,"props":213,"children":214},{"class":115,"line":116},[215,219,224,229,234,239],{"type":20,"tag":113,"props":216,"children":217},{"style":120},[218],{"type":25,"value":123},{"type":20,"tag":113,"props":220,"children":221},{"style":126},[222],{"type":25,"value":223}," flashrom",{"type":20,"tag":113,"props":225,"children":226},{"style":191},[227],{"type":25,"value":228}," -w",{"type":20,"tag":113,"props":230,"children":231},{"style":126},[232],{"type":25,"value":233}," apu2_v4.11.0.1.rom",{"type":20,"tag":113,"props":235,"children":236},{"style":191},[237],{"type":25,"value":238}," -p",{"type":20,"tag":113,"props":240,"children":241},{"style":126},[242],{"type":25,"value":243}," internal:boardmismatch=force\n",{"type":20,"tag":21,"props":245,"children":246},{},[247],{"type":20,"tag":248,"props":249,"children":250},"strong",{},[251],{"type":25,"value":252},"References:",{"type":20,"tag":254,"props":255,"children":256},"ul",{},[257,266,274,283,292],{"type":20,"tag":258,"props":259,"children":260},"li",{},[261],{"type":20,"tag":28,"props":262,"children":264},{"href":30,"rel":263},[32],[265],{"type":25,"value":30},{"type":20,"tag":258,"props":267,"children":268},{},[269],{"type":20,"tag":28,"props":270,"children":272},{"href":168,"rel":271},[32],[273],{"type":25,"value":168},{"type":20,"tag":258,"props":275,"children":276},{},[277],{"type":20,"tag":28,"props":278,"children":281},{"href":279,"rel":280},"https://github.com/pcengines/apu2-documentation/blob/master/docs/firmware_flashing.md",[32],[282],{"type":25,"value":279},{"type":20,"tag":258,"props":284,"children":285},{},[286],{"type":20,"tag":28,"props":287,"children":290},{"href":288,"rel":289},"https://github.com/pcengines/apu2-documentation/blob/master/docs/cold_reset.md",[32],[291],{"type":25,"value":288},{"type":20,"tag":258,"props":293,"children":294},{},[295],{"type":20,"tag":28,"props":296,"children":299},{"href":297,"rel":298},"https://github.com/elad/openbsd-apu2",[32],[300],{"type":25,"value":297},{"type":20,"tag":302,"props":303,"children":304},"style",{},[305],{"type":25,"value":306},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}",{"title":7,"searchDepth":142,"depth":142,"links":308},[],"markdown","content:articles:apu2-firmware-upgrade.md","content","articles/apu2-firmware-upgrade.md","articles/apu2-firmware-upgrade","md",1735327945088] \ No newline at end of file diff --git a/articles/apu2-firmware-upgrade/index.html b/articles/apu2-firmware-upgrade/index.html index 2cafa613..7c67bdd4 100644 --- a/articles/apu2-firmware-upgrade/index.html +++ b/articles/apu2-firmware-upgrade/index.html @@ -1,40 +1,40 @@ Colton Padden - + - - - - - + + + + + - + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - -
            Category

            Upgrading the Firmware on the PCEngines APU2

            I've had a PCEngines APU2 gathering dust for a + +

            Category

            Upgrading the Firmware on the PCEngines APU2

            I've had a PCEngines APU2 gathering dust for a few years, and have recently decided to dust it off.

            Since the last time the device has been powered on, there have been many great improvements to the firmware, and it was very-much due for an upgrade. The following steps outline how the firmware was upgraded on the APU from the @@ -48,5 +48,5 @@ with the APU2 device from the PC Engines release website: https://pcengines.github.io/.

            curl -O https://3mdeb.com/open-source-firmware/pcengines/apu2/apu2_v4.11.0.1.rom
             

            And finally, we will flash the firmware...

            sudo flashrom -w apu2_v4.11.0.1.rom -p internal:boardmismatch=force
            -

            References:

            - \ No newline at end of file +

            References:

            + \ No newline at end of file diff --git a/articles/docker-selinux-volumes/_payload.json b/articles/docker-selinux-volumes/_payload.json index 48af7aae..950231a0 100644 --- a/articles/docker-selinux-volumes/_payload.json +++ b/articles/docker-selinux-volumes/_payload.json @@ -1 +1 @@ -[{"data":1,"prerenderedAt":240},["ShallowReactive",2],{"page-data":3},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"date":10,"draft":6,"tags":11,"categories":14,"excerpt":16,"body":26,"_type":234,"_id":235,"_source":236,"_file":237,"_stem":238,"_extension":239},"/articles/docker-selinux-volumes","articles",false,"","Docker Volume Permissions with SELinux","Unfamiliar with running Docker on a SELinux enabled system, I found myself\nrunning into a bunch of file permission errors while creating volumes.","2019-12-26",[12,13],"docker","selinux",[15],"linux",{"type":17,"children":18},"root",[19],{"type":20,"tag":21,"props":22,"children":23},"element","p",{},[24],{"type":25,"value":9},"text",{"type":17,"children":27,"toc":232},[28,32,53,57,139,160,168,173,190,199,226],{"type":20,"tag":21,"props":29,"children":30},{},[31],{"type":25,"value":9},{"type":20,"tag":33,"props":34,"children":38},"pre",{"code":35,"language":36,"meta":7,"className":37,"style":7},"mkdir: can't create directory '/data': Permission denied\n","txt","language-txt shiki shiki-themes github-light",[39],{"type":20,"tag":40,"props":41,"children":42},"code",{"__ignoreMap":7},[43],{"type":20,"tag":44,"props":45,"children":48},"span",{"class":46,"line":47},"line",1,[49],{"type":20,"tag":44,"props":50,"children":51},{},[52],{"type":25,"value":35},{"type":20,"tag":54,"props":55,"children":56},"hr",{},[],{"type":20,"tag":33,"props":58,"children":62},{"code":59,"language":60,"meta":7,"className":61,"style":7},"$ docker info --format '{{json .SecurityOptions}}'\n[\n \"name=seccomp,profile=/etc/docker/seccomp.json\",\n \"name=selinux\"\n]\n","bash","language-bash shiki shiki-themes github-light",[63],{"type":20,"tag":40,"props":64,"children":65},{"__ignoreMap":7},[66,97,107,121,130],{"type":20,"tag":44,"props":67,"children":68},{"class":46,"line":47},[69,75,81,86,92],{"type":20,"tag":44,"props":70,"children":72},{"style":71},"--shiki-default:#6F42C1",[73],{"type":25,"value":74},"$",{"type":20,"tag":44,"props":76,"children":78},{"style":77},"--shiki-default:#032F62",[79],{"type":25,"value":80}," docker",{"type":20,"tag":44,"props":82,"children":83},{"style":77},[84],{"type":25,"value":85}," info",{"type":20,"tag":44,"props":87,"children":89},{"style":88},"--shiki-default:#005CC5",[90],{"type":25,"value":91}," --format",{"type":20,"tag":44,"props":93,"children":94},{"style":77},[95],{"type":25,"value":96}," '{{json .SecurityOptions}}'\n",{"type":20,"tag":44,"props":98,"children":100},{"class":46,"line":99},2,[101],{"type":20,"tag":44,"props":102,"children":104},{"style":103},"--shiki-default:#24292E",[105],{"type":25,"value":106},"[\n",{"type":20,"tag":44,"props":108,"children":110},{"class":46,"line":109},3,[111,116],{"type":20,"tag":44,"props":112,"children":113},{"style":77},[114],{"type":25,"value":115}," \"name=seccomp,profile=/etc/docker/seccomp.json\"",{"type":20,"tag":44,"props":117,"children":118},{"style":103},[119],{"type":25,"value":120},",\n",{"type":20,"tag":44,"props":122,"children":124},{"class":46,"line":123},4,[125],{"type":20,"tag":44,"props":126,"children":127},{"style":77},[128],{"type":25,"value":129}," \"name=selinux\"\n",{"type":20,"tag":44,"props":131,"children":133},{"class":46,"line":132},5,[134],{"type":20,"tag":44,"props":135,"children":136},{"style":103},[137],{"type":25,"value":138},"]\n",{"type":20,"tag":21,"props":140,"children":141},{},[142,144,150,152,158],{"type":25,"value":143},"It turns out that this can be resolved by appending the ",{"type":20,"tag":40,"props":145,"children":147},{"className":146},[],[148],{"type":25,"value":149},":z",{"type":25,"value":151}," flag to the volume\nmappings in the ",{"type":20,"tag":40,"props":153,"children":155},{"className":154},[],[156],{"type":25,"value":157},"docker-compose.yml",{"type":25,"value":159}," file, indicating that the volume content\nis shared.",{"type":20,"tag":33,"props":161,"children":163},{"code":162},"services:\n server:\n volumes:\n - ./data:/data:z\n",[164],{"type":20,"tag":40,"props":165,"children":166},{"__ignoreMap":7},[167],{"type":25,"value":162},{"type":20,"tag":21,"props":169,"children":170},{},[171],{"type":25,"value":172},"From the Docker documentation:",{"type":20,"tag":174,"props":175,"children":176},"blockquote",{},[177],{"type":20,"tag":21,"props":178,"children":179},{},[180,182,188],{"type":25,"value":181},"The ",{"type":20,"tag":40,"props":183,"children":185},{"className":184},[],[186],{"type":25,"value":187},"z",{"type":25,"value":189}," option tells Docker that two containers share the volume content. As\na result, Docker labels the content with a shared content label. Shared\nvolume labels allow all containers to read/write content.",{"type":20,"tag":21,"props":191,"children":192},{},[193],{"type":20,"tag":194,"props":195,"children":196},"strong",{},[197],{"type":25,"value":198},"References",{"type":20,"tag":200,"props":201,"children":202},"ul",{},[203,216],{"type":20,"tag":204,"props":205,"children":206},"li",{},[207],{"type":20,"tag":208,"props":209,"children":213},"a",{"href":210,"rel":211},"https://docs.docker.com/engine/reference/commandline/info/",[212],"nofollow",[214],{"type":25,"value":215},"Docker Docs: Docker Info",{"type":20,"tag":204,"props":217,"children":218},{},[219],{"type":20,"tag":208,"props":220,"children":223},{"href":221,"rel":222},"https://docs.docker.com/engine/reference/commandline/run/#mount-volumes-from-container---volumes-from",[212],[224],{"type":25,"value":225},"Docker Docs: Mounting Volumes",{"type":20,"tag":227,"props":228,"children":229},"style",{},[230],{"type":25,"value":231},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}",{"title":7,"searchDepth":99,"depth":99,"links":233},[],"markdown","content:articles:docker-selinux-volumes.md","content","articles/docker-selinux-volumes.md","articles/docker-selinux-volumes","md",1735276485259] \ No newline at end of file +[{"data":1,"prerenderedAt":240},["ShallowReactive",2],{"page-data":3},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"date":10,"draft":6,"tags":11,"categories":14,"excerpt":16,"body":26,"_type":234,"_id":235,"_source":236,"_file":237,"_stem":238,"_extension":239},"/articles/docker-selinux-volumes","articles",false,"","Docker Volume Permissions with SELinux","Unfamiliar with running Docker on a SELinux enabled system, I found myself\nrunning into a bunch of file permission errors while creating volumes.","2019-12-26",[12,13],"docker","selinux",[15],"linux",{"type":17,"children":18},"root",[19],{"type":20,"tag":21,"props":22,"children":23},"element","p",{},[24],{"type":25,"value":9},"text",{"type":17,"children":27,"toc":232},[28,32,53,57,139,160,168,173,190,199,226],{"type":20,"tag":21,"props":29,"children":30},{},[31],{"type":25,"value":9},{"type":20,"tag":33,"props":34,"children":38},"pre",{"code":35,"language":36,"meta":7,"className":37,"style":7},"mkdir: can't create directory '/data': Permission denied\n","txt","language-txt shiki shiki-themes github-light",[39],{"type":20,"tag":40,"props":41,"children":42},"code",{"__ignoreMap":7},[43],{"type":20,"tag":44,"props":45,"children":48},"span",{"class":46,"line":47},"line",1,[49],{"type":20,"tag":44,"props":50,"children":51},{},[52],{"type":25,"value":35},{"type":20,"tag":54,"props":55,"children":56},"hr",{},[],{"type":20,"tag":33,"props":58,"children":62},{"code":59,"language":60,"meta":7,"className":61,"style":7},"$ docker info --format '{{json .SecurityOptions}}'\n[\n \"name=seccomp,profile=/etc/docker/seccomp.json\",\n \"name=selinux\"\n]\n","bash","language-bash shiki shiki-themes github-light",[63],{"type":20,"tag":40,"props":64,"children":65},{"__ignoreMap":7},[66,97,107,121,130],{"type":20,"tag":44,"props":67,"children":68},{"class":46,"line":47},[69,75,81,86,92],{"type":20,"tag":44,"props":70,"children":72},{"style":71},"--shiki-default:#6F42C1",[73],{"type":25,"value":74},"$",{"type":20,"tag":44,"props":76,"children":78},{"style":77},"--shiki-default:#032F62",[79],{"type":25,"value":80}," docker",{"type":20,"tag":44,"props":82,"children":83},{"style":77},[84],{"type":25,"value":85}," info",{"type":20,"tag":44,"props":87,"children":89},{"style":88},"--shiki-default:#005CC5",[90],{"type":25,"value":91}," --format",{"type":20,"tag":44,"props":93,"children":94},{"style":77},[95],{"type":25,"value":96}," '{{json .SecurityOptions}}'\n",{"type":20,"tag":44,"props":98,"children":100},{"class":46,"line":99},2,[101],{"type":20,"tag":44,"props":102,"children":104},{"style":103},"--shiki-default:#24292E",[105],{"type":25,"value":106},"[\n",{"type":20,"tag":44,"props":108,"children":110},{"class":46,"line":109},3,[111,116],{"type":20,"tag":44,"props":112,"children":113},{"style":77},[114],{"type":25,"value":115}," \"name=seccomp,profile=/etc/docker/seccomp.json\"",{"type":20,"tag":44,"props":117,"children":118},{"style":103},[119],{"type":25,"value":120},",\n",{"type":20,"tag":44,"props":122,"children":124},{"class":46,"line":123},4,[125],{"type":20,"tag":44,"props":126,"children":127},{"style":77},[128],{"type":25,"value":129}," \"name=selinux\"\n",{"type":20,"tag":44,"props":131,"children":133},{"class":46,"line":132},5,[134],{"type":20,"tag":44,"props":135,"children":136},{"style":103},[137],{"type":25,"value":138},"]\n",{"type":20,"tag":21,"props":140,"children":141},{},[142,144,150,152,158],{"type":25,"value":143},"It turns out that this can be resolved by appending the ",{"type":20,"tag":40,"props":145,"children":147},{"className":146},[],[148],{"type":25,"value":149},":z",{"type":25,"value":151}," flag to the volume\nmappings in the ",{"type":20,"tag":40,"props":153,"children":155},{"className":154},[],[156],{"type":25,"value":157},"docker-compose.yml",{"type":25,"value":159}," file, indicating that the volume content\nis shared.",{"type":20,"tag":33,"props":161,"children":163},{"code":162},"services:\n server:\n volumes:\n - ./data:/data:z\n",[164],{"type":20,"tag":40,"props":165,"children":166},{"__ignoreMap":7},[167],{"type":25,"value":162},{"type":20,"tag":21,"props":169,"children":170},{},[171],{"type":25,"value":172},"From the Docker documentation:",{"type":20,"tag":174,"props":175,"children":176},"blockquote",{},[177],{"type":20,"tag":21,"props":178,"children":179},{},[180,182,188],{"type":25,"value":181},"The ",{"type":20,"tag":40,"props":183,"children":185},{"className":184},[],[186],{"type":25,"value":187},"z",{"type":25,"value":189}," option tells Docker that two containers share the volume content. As\na result, Docker labels the content with a shared content label. Shared\nvolume labels allow all containers to read/write content.",{"type":20,"tag":21,"props":191,"children":192},{},[193],{"type":20,"tag":194,"props":195,"children":196},"strong",{},[197],{"type":25,"value":198},"References",{"type":20,"tag":200,"props":201,"children":202},"ul",{},[203,216],{"type":20,"tag":204,"props":205,"children":206},"li",{},[207],{"type":20,"tag":208,"props":209,"children":213},"a",{"href":210,"rel":211},"https://docs.docker.com/engine/reference/commandline/info/",[212],"nofollow",[214],{"type":25,"value":215},"Docker Docs: Docker Info",{"type":20,"tag":204,"props":217,"children":218},{},[219],{"type":20,"tag":208,"props":220,"children":223},{"href":221,"rel":222},"https://docs.docker.com/engine/reference/commandline/run/#mount-volumes-from-container---volumes-from",[212],[224],{"type":25,"value":225},"Docker Docs: Mounting Volumes",{"type":20,"tag":227,"props":228,"children":229},"style",{},[230],{"type":25,"value":231},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}",{"title":7,"searchDepth":99,"depth":99,"links":233},[],"markdown","content:articles:docker-selinux-volumes.md","content","articles/docker-selinux-volumes.md","articles/docker-selinux-volumes","md",1735327945078] \ No newline at end of file diff --git a/articles/docker-selinux-volumes/index.html b/articles/docker-selinux-volumes/index.html index 45b1834c..cfa4d709 100644 --- a/articles/docker-selinux-volumes/index.html +++ b/articles/docker-selinux-volumes/index.html @@ -1,41 +1,41 @@ Colton Padden - + - - - - - + + + + + - + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + - -
            Category

            Docker Volume Permissions with SELinux

            Unfamiliar with running Docker on a SELinux enabled system, I found myself + +

            Category

            Docker Volume Permissions with SELinux

            Unfamiliar with running Docker on a SELinux enabled system, I found myself running into a bunch of file permission errors while creating volumes.

            mkdir: can't create directory '/data': Permission denied
             

            $ docker info --format '{{json .SecurityOptions}}'
             [
            @@ -50,5 +50,5 @@
                   - ./data:/data:z
             

            From the Docker documentation:

            The z option tells Docker that two containers share the volume content. As a result, Docker labels the content with a shared content label. Shared -volume labels allow all containers to read/write content.

            References

            - \ No newline at end of file +volume labels allow all containers to read/write content.

            References

            + \ No newline at end of file diff --git a/articles/doctl/_payload.json b/articles/doctl/_payload.json index 8b23389d..6cdf1dc9 100644 --- a/articles/doctl/_payload.json +++ b/articles/doctl/_payload.json @@ -1 +1 @@ -[{"data":1,"prerenderedAt":712},["ShallowReactive",2],{"page-data":3},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"date":10,"tags":11,"categories":14,"excerpt":15,"body":43,"_type":706,"_id":707,"_source":708,"_file":709,"_stem":710,"_extension":711},"/articles/doctl","articles",false,"","Exploring the Digital Ocean `doctl` Utility","I recently had the need to spool up a small ephemeral Linux instance, and wanted to try something new by exploring the Digital Ocean doctl command line utility.\nThis proved to be an extremely easy way to configure, create, connect, and destroy a Linux box, and I foresee myself using this service even more in the future.","2023-01-01",[12,13],"linux","digital-ocean",[12],{"type":16,"children":17},"root",[18],{"type":19,"tag":20,"props":21,"children":22},"element","p",{},[23,26,33,35,41],{"type":24,"value":25},"text","I recently had the need to spool up a small ephemeral Linux instance, and wanted to try something new by exploring the Digital Ocean ",{"type":19,"tag":27,"props":28,"children":30},"code",{"className":29},[],[31],{"type":24,"value":32},"doctl",{"type":24,"value":34}," command line utility.\nThis proved to be an ",{"type":19,"tag":36,"props":37,"children":38},"em",{},[39],{"type":24,"value":40},"extremely",{"type":24,"value":42}," easy way to configure, create, connect, and destroy a Linux box, and I foresee myself using this service even more in the future.",{"type":16,"children":44,"toc":704},[45,60,76,156,177,212,217,289,294,389,402,452,465,495,500,624,629,657,693,698],{"type":19,"tag":20,"props":46,"children":47},{},[48,49,54,55,59],{"type":24,"value":25},{"type":19,"tag":27,"props":50,"children":52},{"className":51},[],[53],{"type":24,"value":32},{"type":24,"value":34},{"type":19,"tag":36,"props":56,"children":57},{},[58],{"type":24,"value":40},{"type":24,"value":42},{"type":19,"tag":20,"props":61,"children":62},{},[63,65,74],{"type":24,"value":64},"To start things off, I had to install and setup authentication to Digital Ocean. Doing\nthis on my Mac machine, I opted to use ",{"type":19,"tag":66,"props":67,"children":71},"a",{"href":68,"rel":69},"https://brew.sh/",[70],"nofollow",[72],{"type":24,"value":73},"Homebrew",{"type":24,"value":75},".",{"type":19,"tag":77,"props":78,"children":82},"pre",{"className":79,"code":80,"language":81,"meta":7,"style":7},"language-sh shiki shiki-themes github-light","# install `doctl`\nbrew install doctl\n\n# setup authentication\ndoctl auth init\n","sh",[83],{"type":19,"tag":27,"props":84,"children":85},{"__ignoreMap":7},[86,98,119,129,138],{"type":19,"tag":87,"props":88,"children":91},"span",{"class":89,"line":90},"line",1,[92],{"type":19,"tag":87,"props":93,"children":95},{"style":94},"--shiki-default:#6A737D",[96],{"type":24,"value":97},"# install `doctl`\n",{"type":19,"tag":87,"props":99,"children":101},{"class":89,"line":100},2,[102,108,114],{"type":19,"tag":87,"props":103,"children":105},{"style":104},"--shiki-default:#6F42C1",[106],{"type":24,"value":107},"brew",{"type":19,"tag":87,"props":109,"children":111},{"style":110},"--shiki-default:#032F62",[112],{"type":24,"value":113}," install",{"type":19,"tag":87,"props":115,"children":116},{"style":110},[117],{"type":24,"value":118}," doctl\n",{"type":19,"tag":87,"props":120,"children":122},{"class":89,"line":121},3,[123],{"type":19,"tag":87,"props":124,"children":126},{"emptyLinePlaceholder":125},true,[127],{"type":24,"value":128},"\n",{"type":19,"tag":87,"props":130,"children":132},{"class":89,"line":131},4,[133],{"type":19,"tag":87,"props":134,"children":135},{"style":94},[136],{"type":24,"value":137},"# setup authentication\n",{"type":19,"tag":87,"props":139,"children":141},{"class":89,"line":140},5,[142,146,151],{"type":19,"tag":87,"props":143,"children":144},{"style":104},[145],{"type":24,"value":32},{"type":19,"tag":87,"props":147,"children":148},{"style":110},[149],{"type":24,"value":150}," auth",{"type":19,"tag":87,"props":152,"children":153},{"style":110},[154],{"type":24,"value":155}," init\n",{"type":19,"tag":20,"props":157,"children":158},{},[159,161,168,170,176],{"type":24,"value":160},"While the online ",{"type":19,"tag":66,"props":162,"children":165},{"href":163,"rel":164},"https://docs.digitalocean.com/reference/doctl/reference/compute/droplet/create/",[70],[166],{"type":24,"value":167},"documentation",{"type":24,"value":169}," is fantastic, I instead found myself mostly referencing the outputs of ",{"type":19,"tag":27,"props":171,"children":173},{"className":172},[],[174],{"type":24,"value":175},"--help",{"type":24,"value":75},{"type":19,"tag":77,"props":178,"children":180},{"className":79,"code":179,"language":81,"meta":7,"style":7},"doctl compute droplet create --help\n",[181],{"type":19,"tag":27,"props":182,"children":183},{"__ignoreMap":7},[184],{"type":19,"tag":87,"props":185,"children":186},{"class":89,"line":90},[187,191,196,201,206],{"type":19,"tag":87,"props":188,"children":189},{"style":104},[190],{"type":24,"value":32},{"type":19,"tag":87,"props":192,"children":193},{"style":110},[194],{"type":24,"value":195}," compute",{"type":19,"tag":87,"props":197,"children":198},{"style":110},[199],{"type":24,"value":200}," droplet",{"type":19,"tag":87,"props":202,"children":203},{"style":110},[204],{"type":24,"value":205}," create",{"type":19,"tag":87,"props":207,"children":209},{"style":208},"--shiki-default:#005CC5",[210],{"type":24,"value":211}," --help\n",{"type":19,"tag":20,"props":213,"children":214},{},[215],{"type":24,"value":216},"I had to find the image name of the version of Ubuntu I wanted to install:",{"type":19,"tag":77,"props":218,"children":220},{"className":79,"code":219,"language":81,"meta":7,"style":7},"doctl compute image list --public | grep ubuntu-22\n\n# 118857366 22.04 (LTS) x64 snapshot Ubuntu ubuntu-22-04-x64 true 7\n# 119383150 22.10 x64 snapshot Ubuntu ubuntu-22-10-x64 true 7\n",[221],{"type":19,"tag":27,"props":222,"children":223},{"__ignoreMap":7},[224,266,273,281],{"type":19,"tag":87,"props":225,"children":226},{"class":89,"line":90},[227,231,235,240,245,250,256,261],{"type":19,"tag":87,"props":228,"children":229},{"style":104},[230],{"type":24,"value":32},{"type":19,"tag":87,"props":232,"children":233},{"style":110},[234],{"type":24,"value":195},{"type":19,"tag":87,"props":236,"children":237},{"style":110},[238],{"type":24,"value":239}," image",{"type":19,"tag":87,"props":241,"children":242},{"style":110},[243],{"type":24,"value":244}," list",{"type":19,"tag":87,"props":246,"children":247},{"style":208},[248],{"type":24,"value":249}," --public",{"type":19,"tag":87,"props":251,"children":253},{"style":252},"--shiki-default:#D73A49",[254],{"type":24,"value":255}," |",{"type":19,"tag":87,"props":257,"children":258},{"style":104},[259],{"type":24,"value":260}," grep",{"type":19,"tag":87,"props":262,"children":263},{"style":110},[264],{"type":24,"value":265}," ubuntu-22\n",{"type":19,"tag":87,"props":267,"children":268},{"class":89,"line":100},[269],{"type":19,"tag":87,"props":270,"children":271},{"emptyLinePlaceholder":125},[272],{"type":24,"value":128},{"type":19,"tag":87,"props":274,"children":275},{"class":89,"line":121},[276],{"type":19,"tag":87,"props":277,"children":278},{"style":94},[279],{"type":24,"value":280},"# 118857366 22.04 (LTS) x64 snapshot Ubuntu ubuntu-22-04-x64 true 7\n",{"type":19,"tag":87,"props":282,"children":283},{"class":89,"line":131},[284],{"type":19,"tag":87,"props":285,"children":286},{"style":94},[287],{"type":24,"value":288},"# 119383150 22.10 x64 snapshot Ubuntu ubuntu-22-10-x64 true 7\n",{"type":19,"tag":20,"props":290,"children":291},{},[292],{"type":24,"value":293},"And also the slug of the compute size:",{"type":19,"tag":77,"props":295,"children":297},{"className":79,"code":296,"language":81,"meta":7,"style":7},"doctl compute size list\n\n# Slug Description Memory VCPUs Disk Price Monthly Price Hourly\n# s-1vcpu-512mb-10gb Basic 512 1 10 4.00 0.005950\n# s-1vcpu-1gb Basic 1024 1 25 6.00 0.008930\n# s-1vcpu-1gb-amd Basic AMD 1024 1 25 7.00 0.010420\n# s-1vcpu-1gb-intel Basic Intel 1024 1 25 7.00 0.010420\n# s-1vcpu-2gb Basic 2048 1 50 12.00 0.017860\n# s-1vcpu-2gb-amd Basic AMD 2048 1 50 14.00 0.020830\n",[298],{"type":19,"tag":27,"props":299,"children":300},{"__ignoreMap":7},[301,322,329,337,345,353,362,371,380],{"type":19,"tag":87,"props":302,"children":303},{"class":89,"line":90},[304,308,312,317],{"type":19,"tag":87,"props":305,"children":306},{"style":104},[307],{"type":24,"value":32},{"type":19,"tag":87,"props":309,"children":310},{"style":110},[311],{"type":24,"value":195},{"type":19,"tag":87,"props":313,"children":314},{"style":110},[315],{"type":24,"value":316}," size",{"type":19,"tag":87,"props":318,"children":319},{"style":110},[320],{"type":24,"value":321}," list\n",{"type":19,"tag":87,"props":323,"children":324},{"class":89,"line":100},[325],{"type":19,"tag":87,"props":326,"children":327},{"emptyLinePlaceholder":125},[328],{"type":24,"value":128},{"type":19,"tag":87,"props":330,"children":331},{"class":89,"line":121},[332],{"type":19,"tag":87,"props":333,"children":334},{"style":94},[335],{"type":24,"value":336},"# Slug Description Memory VCPUs Disk Price Monthly Price Hourly\n",{"type":19,"tag":87,"props":338,"children":339},{"class":89,"line":131},[340],{"type":19,"tag":87,"props":341,"children":342},{"style":94},[343],{"type":24,"value":344},"# s-1vcpu-512mb-10gb Basic 512 1 10 4.00 0.005950\n",{"type":19,"tag":87,"props":346,"children":347},{"class":89,"line":140},[348],{"type":19,"tag":87,"props":349,"children":350},{"style":94},[351],{"type":24,"value":352},"# s-1vcpu-1gb Basic 1024 1 25 6.00 0.008930\n",{"type":19,"tag":87,"props":354,"children":356},{"class":89,"line":355},6,[357],{"type":19,"tag":87,"props":358,"children":359},{"style":94},[360],{"type":24,"value":361},"# s-1vcpu-1gb-amd Basic AMD 1024 1 25 7.00 0.010420\n",{"type":19,"tag":87,"props":363,"children":365},{"class":89,"line":364},7,[366],{"type":19,"tag":87,"props":367,"children":368},{"style":94},[369],{"type":24,"value":370},"# s-1vcpu-1gb-intel Basic Intel 1024 1 25 7.00 0.010420\n",{"type":19,"tag":87,"props":372,"children":374},{"class":89,"line":373},8,[375],{"type":19,"tag":87,"props":376,"children":377},{"style":94},[378],{"type":24,"value":379},"# s-1vcpu-2gb Basic 2048 1 50 12.00 0.017860\n",{"type":19,"tag":87,"props":381,"children":383},{"class":89,"line":382},9,[384],{"type":19,"tag":87,"props":385,"children":386},{"style":94},[387],{"type":24,"value":388},"# s-1vcpu-2gb-amd Basic AMD 2048 1 50 14.00 0.020830\n",{"type":19,"tag":20,"props":390,"children":391},{},[392,394,400],{"type":24,"value":393},"I've also configured a few SSH keys with Digital Ocean, and I can have the key (specified by ID) provisioned to the machine using the ",{"type":19,"tag":27,"props":395,"children":397},{"className":396},[],[398],{"type":24,"value":399},"--ssh-keys",{"type":24,"value":401}," flag.",{"type":19,"tag":77,"props":403,"children":405},{"className":79,"code":404,"language":81,"meta":7,"style":7},"doctl compute ssh-key list\n\n# ID Name FingerPrint\n# 1234 mini \u003Credacted>\n",[406],{"type":19,"tag":27,"props":407,"children":408},{"__ignoreMap":7},[409,429,436,444],{"type":19,"tag":87,"props":410,"children":411},{"class":89,"line":90},[412,416,420,425],{"type":19,"tag":87,"props":413,"children":414},{"style":104},[415],{"type":24,"value":32},{"type":19,"tag":87,"props":417,"children":418},{"style":110},[419],{"type":24,"value":195},{"type":19,"tag":87,"props":421,"children":422},{"style":110},[423],{"type":24,"value":424}," ssh-key",{"type":19,"tag":87,"props":426,"children":427},{"style":110},[428],{"type":24,"value":321},{"type":19,"tag":87,"props":430,"children":431},{"class":89,"line":100},[432],{"type":19,"tag":87,"props":433,"children":434},{"emptyLinePlaceholder":125},[435],{"type":24,"value":128},{"type":19,"tag":87,"props":437,"children":438},{"class":89,"line":121},[439],{"type":19,"tag":87,"props":440,"children":441},{"style":94},[442],{"type":24,"value":443},"# ID Name FingerPrint\n",{"type":19,"tag":87,"props":445,"children":446},{"class":89,"line":131},[447],{"type":19,"tag":87,"props":448,"children":449},{"style":94},[450],{"type":24,"value":451},"# 1234 mini \u003Credacted>\n",{"type":19,"tag":20,"props":453,"children":454},{},[455,457,463],{"type":24,"value":456},"Also, I wanted to install a few packages to the box upon creation, this can be done easily with the ",{"type":19,"tag":27,"props":458,"children":460},{"className":459},[],[461],{"type":24,"value":462},"--user-data-file",{"type":24,"value":464}," flag to run an initialization script.",{"type":19,"tag":77,"props":466,"children":468},{"className":79,"code":467,"language":81,"meta":7,"style":7},"echo 'apt install -y imagemagick zip' > bootstrap.sh\n",[469],{"type":19,"tag":27,"props":470,"children":471},{"__ignoreMap":7},[472],{"type":19,"tag":87,"props":473,"children":474},{"class":89,"line":90},[475,480,485,490],{"type":19,"tag":87,"props":476,"children":477},{"style":208},[478],{"type":24,"value":479},"echo",{"type":19,"tag":87,"props":481,"children":482},{"style":110},[483],{"type":24,"value":484}," 'apt install -y imagemagick zip'",{"type":19,"tag":87,"props":486,"children":487},{"style":252},[488],{"type":24,"value":489}," >",{"type":19,"tag":87,"props":491,"children":492},{"style":110},[493],{"type":24,"value":494}," bootstrap.sh\n",{"type":19,"tag":20,"props":496,"children":497},{},[498],{"type":24,"value":499},"Putting it all together, here is the simple command for creating a small compute instance!",{"type":19,"tag":77,"props":501,"children":503},{"className":79,"code":502,"language":81,"meta":7,"style":7},"doctl compute droplet create \\\n --image ubuntu-22-10-x64 \\\n --size s-1vcpu-512mb-10gb \\\n --region nyc1 \\\n --ssh-keys 1234 \\\n --user-data-file boostrap.sh \\\n ephemeral\n",[504],{"type":19,"tag":27,"props":505,"children":506},{"__ignoreMap":7},[507,531,548,565,582,599,616],{"type":19,"tag":87,"props":508,"children":509},{"class":89,"line":90},[510,514,518,522,526],{"type":19,"tag":87,"props":511,"children":512},{"style":104},[513],{"type":24,"value":32},{"type":19,"tag":87,"props":515,"children":516},{"style":110},[517],{"type":24,"value":195},{"type":19,"tag":87,"props":519,"children":520},{"style":110},[521],{"type":24,"value":200},{"type":19,"tag":87,"props":523,"children":524},{"style":110},[525],{"type":24,"value":205},{"type":19,"tag":87,"props":527,"children":528},{"style":208},[529],{"type":24,"value":530}," \\\n",{"type":19,"tag":87,"props":532,"children":533},{"class":89,"line":100},[534,539,544],{"type":19,"tag":87,"props":535,"children":536},{"style":208},[537],{"type":24,"value":538}," --image",{"type":19,"tag":87,"props":540,"children":541},{"style":110},[542],{"type":24,"value":543}," ubuntu-22-10-x64",{"type":19,"tag":87,"props":545,"children":546},{"style":208},[547],{"type":24,"value":530},{"type":19,"tag":87,"props":549,"children":550},{"class":89,"line":121},[551,556,561],{"type":19,"tag":87,"props":552,"children":553},{"style":208},[554],{"type":24,"value":555}," --size",{"type":19,"tag":87,"props":557,"children":558},{"style":110},[559],{"type":24,"value":560}," s-1vcpu-512mb-10gb",{"type":19,"tag":87,"props":562,"children":563},{"style":208},[564],{"type":24,"value":530},{"type":19,"tag":87,"props":566,"children":567},{"class":89,"line":131},[568,573,578],{"type":19,"tag":87,"props":569,"children":570},{"style":208},[571],{"type":24,"value":572}," --region",{"type":19,"tag":87,"props":574,"children":575},{"style":110},[576],{"type":24,"value":577}," nyc1",{"type":19,"tag":87,"props":579,"children":580},{"style":208},[581],{"type":24,"value":530},{"type":19,"tag":87,"props":583,"children":584},{"class":89,"line":140},[585,590,595],{"type":19,"tag":87,"props":586,"children":587},{"style":208},[588],{"type":24,"value":589}," --ssh-keys",{"type":19,"tag":87,"props":591,"children":592},{"style":208},[593],{"type":24,"value":594}," 1234",{"type":19,"tag":87,"props":596,"children":597},{"style":208},[598],{"type":24,"value":530},{"type":19,"tag":87,"props":600,"children":601},{"class":89,"line":355},[602,607,612],{"type":19,"tag":87,"props":603,"children":604},{"style":208},[605],{"type":24,"value":606}," --user-data-file",{"type":19,"tag":87,"props":608,"children":609},{"style":110},[610],{"type":24,"value":611}," boostrap.sh",{"type":19,"tag":87,"props":613,"children":614},{"style":208},[615],{"type":24,"value":530},{"type":19,"tag":87,"props":617,"children":618},{"class":89,"line":364},[619],{"type":19,"tag":87,"props":620,"children":621},{"style":110},[622],{"type":24,"value":623}," ephemeral\n",{"type":19,"tag":20,"props":625,"children":626},{},[627],{"type":24,"value":628},"Finally, I can connect, do my thing, and destroy the instance.",{"type":19,"tag":77,"props":630,"children":632},{"className":79,"code":631,"language":81,"meta":7,"style":7},"doctl compute ssh ephemeral\n",[633],{"type":19,"tag":27,"props":634,"children":635},{"__ignoreMap":7},[636],{"type":19,"tag":87,"props":637,"children":638},{"class":89,"line":90},[639,643,647,652],{"type":19,"tag":87,"props":640,"children":641},{"style":104},[642],{"type":24,"value":32},{"type":19,"tag":87,"props":644,"children":645},{"style":110},[646],{"type":24,"value":195},{"type":19,"tag":87,"props":648,"children":649},{"style":110},[650],{"type":24,"value":651}," ssh",{"type":19,"tag":87,"props":653,"children":654},{"style":110},[655],{"type":24,"value":656}," ephemeral\n",{"type":19,"tag":77,"props":658,"children":660},{"className":79,"code":659,"language":81,"meta":7,"style":7},"doctl compute droplet delete --force ephemeral\n",[661],{"type":19,"tag":27,"props":662,"children":663},{"__ignoreMap":7},[664],{"type":19,"tag":87,"props":665,"children":666},{"class":89,"line":90},[667,671,675,679,684,689],{"type":19,"tag":87,"props":668,"children":669},{"style":104},[670],{"type":24,"value":32},{"type":19,"tag":87,"props":672,"children":673},{"style":110},[674],{"type":24,"value":195},{"type":19,"tag":87,"props":676,"children":677},{"style":110},[678],{"type":24,"value":200},{"type":19,"tag":87,"props":680,"children":681},{"style":110},[682],{"type":24,"value":683}," delete",{"type":19,"tag":87,"props":685,"children":686},{"style":208},[687],{"type":24,"value":688}," --force",{"type":19,"tag":87,"props":690,"children":691},{"style":110},[692],{"type":24,"value":656},{"type":19,"tag":20,"props":694,"children":695},{},[696],{"type":24,"value":697},"All-in-all, I was up and running in about 20 minutes. What a handy utility!",{"type":19,"tag":699,"props":700,"children":701},"style",{},[702],{"type":24,"value":703},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}",{"title":7,"searchDepth":100,"depth":100,"links":705},[],"markdown","content:articles:doctl.md","content","articles/doctl.md","articles/doctl","md",1735276485196] \ No newline at end of file +[{"data":1,"prerenderedAt":712},["ShallowReactive",2],{"page-data":3},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"date":10,"tags":11,"categories":14,"excerpt":15,"body":43,"_type":706,"_id":707,"_source":708,"_file":709,"_stem":710,"_extension":711},"/articles/doctl","articles",false,"","Exploring the Digital Ocean `doctl` Utility","I recently had the need to spool up a small ephemeral Linux instance, and wanted to try something new by exploring the Digital Ocean doctl command line utility.\nThis proved to be an extremely easy way to configure, create, connect, and destroy a Linux box, and I foresee myself using this service even more in the future.","2023-01-01",[12,13],"linux","digital-ocean",[12],{"type":16,"children":17},"root",[18],{"type":19,"tag":20,"props":21,"children":22},"element","p",{},[23,26,33,35,41],{"type":24,"value":25},"text","I recently had the need to spool up a small ephemeral Linux instance, and wanted to try something new by exploring the Digital Ocean ",{"type":19,"tag":27,"props":28,"children":30},"code",{"className":29},[],[31],{"type":24,"value":32},"doctl",{"type":24,"value":34}," command line utility.\nThis proved to be an ",{"type":19,"tag":36,"props":37,"children":38},"em",{},[39],{"type":24,"value":40},"extremely",{"type":24,"value":42}," easy way to configure, create, connect, and destroy a Linux box, and I foresee myself using this service even more in the future.",{"type":16,"children":44,"toc":704},[45,60,76,156,177,212,217,289,294,389,402,452,465,495,500,624,629,657,693,698],{"type":19,"tag":20,"props":46,"children":47},{},[48,49,54,55,59],{"type":24,"value":25},{"type":19,"tag":27,"props":50,"children":52},{"className":51},[],[53],{"type":24,"value":32},{"type":24,"value":34},{"type":19,"tag":36,"props":56,"children":57},{},[58],{"type":24,"value":40},{"type":24,"value":42},{"type":19,"tag":20,"props":61,"children":62},{},[63,65,74],{"type":24,"value":64},"To start things off, I had to install and setup authentication to Digital Ocean. Doing\nthis on my Mac machine, I opted to use ",{"type":19,"tag":66,"props":67,"children":71},"a",{"href":68,"rel":69},"https://brew.sh/",[70],"nofollow",[72],{"type":24,"value":73},"Homebrew",{"type":24,"value":75},".",{"type":19,"tag":77,"props":78,"children":82},"pre",{"className":79,"code":80,"language":81,"meta":7,"style":7},"language-sh shiki shiki-themes github-light","# install `doctl`\nbrew install doctl\n\n# setup authentication\ndoctl auth init\n","sh",[83],{"type":19,"tag":27,"props":84,"children":85},{"__ignoreMap":7},[86,98,119,129,138],{"type":19,"tag":87,"props":88,"children":91},"span",{"class":89,"line":90},"line",1,[92],{"type":19,"tag":87,"props":93,"children":95},{"style":94},"--shiki-default:#6A737D",[96],{"type":24,"value":97},"# install `doctl`\n",{"type":19,"tag":87,"props":99,"children":101},{"class":89,"line":100},2,[102,108,114],{"type":19,"tag":87,"props":103,"children":105},{"style":104},"--shiki-default:#6F42C1",[106],{"type":24,"value":107},"brew",{"type":19,"tag":87,"props":109,"children":111},{"style":110},"--shiki-default:#032F62",[112],{"type":24,"value":113}," install",{"type":19,"tag":87,"props":115,"children":116},{"style":110},[117],{"type":24,"value":118}," doctl\n",{"type":19,"tag":87,"props":120,"children":122},{"class":89,"line":121},3,[123],{"type":19,"tag":87,"props":124,"children":126},{"emptyLinePlaceholder":125},true,[127],{"type":24,"value":128},"\n",{"type":19,"tag":87,"props":130,"children":132},{"class":89,"line":131},4,[133],{"type":19,"tag":87,"props":134,"children":135},{"style":94},[136],{"type":24,"value":137},"# setup authentication\n",{"type":19,"tag":87,"props":139,"children":141},{"class":89,"line":140},5,[142,146,151],{"type":19,"tag":87,"props":143,"children":144},{"style":104},[145],{"type":24,"value":32},{"type":19,"tag":87,"props":147,"children":148},{"style":110},[149],{"type":24,"value":150}," auth",{"type":19,"tag":87,"props":152,"children":153},{"style":110},[154],{"type":24,"value":155}," init\n",{"type":19,"tag":20,"props":157,"children":158},{},[159,161,168,170,176],{"type":24,"value":160},"While the online ",{"type":19,"tag":66,"props":162,"children":165},{"href":163,"rel":164},"https://docs.digitalocean.com/reference/doctl/reference/compute/droplet/create/",[70],[166],{"type":24,"value":167},"documentation",{"type":24,"value":169}," is fantastic, I instead found myself mostly referencing the outputs of ",{"type":19,"tag":27,"props":171,"children":173},{"className":172},[],[174],{"type":24,"value":175},"--help",{"type":24,"value":75},{"type":19,"tag":77,"props":178,"children":180},{"className":79,"code":179,"language":81,"meta":7,"style":7},"doctl compute droplet create --help\n",[181],{"type":19,"tag":27,"props":182,"children":183},{"__ignoreMap":7},[184],{"type":19,"tag":87,"props":185,"children":186},{"class":89,"line":90},[187,191,196,201,206],{"type":19,"tag":87,"props":188,"children":189},{"style":104},[190],{"type":24,"value":32},{"type":19,"tag":87,"props":192,"children":193},{"style":110},[194],{"type":24,"value":195}," compute",{"type":19,"tag":87,"props":197,"children":198},{"style":110},[199],{"type":24,"value":200}," droplet",{"type":19,"tag":87,"props":202,"children":203},{"style":110},[204],{"type":24,"value":205}," create",{"type":19,"tag":87,"props":207,"children":209},{"style":208},"--shiki-default:#005CC5",[210],{"type":24,"value":211}," --help\n",{"type":19,"tag":20,"props":213,"children":214},{},[215],{"type":24,"value":216},"I had to find the image name of the version of Ubuntu I wanted to install:",{"type":19,"tag":77,"props":218,"children":220},{"className":79,"code":219,"language":81,"meta":7,"style":7},"doctl compute image list --public | grep ubuntu-22\n\n# 118857366 22.04 (LTS) x64 snapshot Ubuntu ubuntu-22-04-x64 true 7\n# 119383150 22.10 x64 snapshot Ubuntu ubuntu-22-10-x64 true 7\n",[221],{"type":19,"tag":27,"props":222,"children":223},{"__ignoreMap":7},[224,266,273,281],{"type":19,"tag":87,"props":225,"children":226},{"class":89,"line":90},[227,231,235,240,245,250,256,261],{"type":19,"tag":87,"props":228,"children":229},{"style":104},[230],{"type":24,"value":32},{"type":19,"tag":87,"props":232,"children":233},{"style":110},[234],{"type":24,"value":195},{"type":19,"tag":87,"props":236,"children":237},{"style":110},[238],{"type":24,"value":239}," image",{"type":19,"tag":87,"props":241,"children":242},{"style":110},[243],{"type":24,"value":244}," list",{"type":19,"tag":87,"props":246,"children":247},{"style":208},[248],{"type":24,"value":249}," --public",{"type":19,"tag":87,"props":251,"children":253},{"style":252},"--shiki-default:#D73A49",[254],{"type":24,"value":255}," |",{"type":19,"tag":87,"props":257,"children":258},{"style":104},[259],{"type":24,"value":260}," grep",{"type":19,"tag":87,"props":262,"children":263},{"style":110},[264],{"type":24,"value":265}," ubuntu-22\n",{"type":19,"tag":87,"props":267,"children":268},{"class":89,"line":100},[269],{"type":19,"tag":87,"props":270,"children":271},{"emptyLinePlaceholder":125},[272],{"type":24,"value":128},{"type":19,"tag":87,"props":274,"children":275},{"class":89,"line":121},[276],{"type":19,"tag":87,"props":277,"children":278},{"style":94},[279],{"type":24,"value":280},"# 118857366 22.04 (LTS) x64 snapshot Ubuntu ubuntu-22-04-x64 true 7\n",{"type":19,"tag":87,"props":282,"children":283},{"class":89,"line":131},[284],{"type":19,"tag":87,"props":285,"children":286},{"style":94},[287],{"type":24,"value":288},"# 119383150 22.10 x64 snapshot Ubuntu ubuntu-22-10-x64 true 7\n",{"type":19,"tag":20,"props":290,"children":291},{},[292],{"type":24,"value":293},"And also the slug of the compute size:",{"type":19,"tag":77,"props":295,"children":297},{"className":79,"code":296,"language":81,"meta":7,"style":7},"doctl compute size list\n\n# Slug Description Memory VCPUs Disk Price Monthly Price Hourly\n# s-1vcpu-512mb-10gb Basic 512 1 10 4.00 0.005950\n# s-1vcpu-1gb Basic 1024 1 25 6.00 0.008930\n# s-1vcpu-1gb-amd Basic AMD 1024 1 25 7.00 0.010420\n# s-1vcpu-1gb-intel Basic Intel 1024 1 25 7.00 0.010420\n# s-1vcpu-2gb Basic 2048 1 50 12.00 0.017860\n# s-1vcpu-2gb-amd Basic AMD 2048 1 50 14.00 0.020830\n",[298],{"type":19,"tag":27,"props":299,"children":300},{"__ignoreMap":7},[301,322,329,337,345,353,362,371,380],{"type":19,"tag":87,"props":302,"children":303},{"class":89,"line":90},[304,308,312,317],{"type":19,"tag":87,"props":305,"children":306},{"style":104},[307],{"type":24,"value":32},{"type":19,"tag":87,"props":309,"children":310},{"style":110},[311],{"type":24,"value":195},{"type":19,"tag":87,"props":313,"children":314},{"style":110},[315],{"type":24,"value":316}," size",{"type":19,"tag":87,"props":318,"children":319},{"style":110},[320],{"type":24,"value":321}," list\n",{"type":19,"tag":87,"props":323,"children":324},{"class":89,"line":100},[325],{"type":19,"tag":87,"props":326,"children":327},{"emptyLinePlaceholder":125},[328],{"type":24,"value":128},{"type":19,"tag":87,"props":330,"children":331},{"class":89,"line":121},[332],{"type":19,"tag":87,"props":333,"children":334},{"style":94},[335],{"type":24,"value":336},"# Slug Description Memory VCPUs Disk Price Monthly Price Hourly\n",{"type":19,"tag":87,"props":338,"children":339},{"class":89,"line":131},[340],{"type":19,"tag":87,"props":341,"children":342},{"style":94},[343],{"type":24,"value":344},"# s-1vcpu-512mb-10gb Basic 512 1 10 4.00 0.005950\n",{"type":19,"tag":87,"props":346,"children":347},{"class":89,"line":140},[348],{"type":19,"tag":87,"props":349,"children":350},{"style":94},[351],{"type":24,"value":352},"# s-1vcpu-1gb Basic 1024 1 25 6.00 0.008930\n",{"type":19,"tag":87,"props":354,"children":356},{"class":89,"line":355},6,[357],{"type":19,"tag":87,"props":358,"children":359},{"style":94},[360],{"type":24,"value":361},"# s-1vcpu-1gb-amd Basic AMD 1024 1 25 7.00 0.010420\n",{"type":19,"tag":87,"props":363,"children":365},{"class":89,"line":364},7,[366],{"type":19,"tag":87,"props":367,"children":368},{"style":94},[369],{"type":24,"value":370},"# s-1vcpu-1gb-intel Basic Intel 1024 1 25 7.00 0.010420\n",{"type":19,"tag":87,"props":372,"children":374},{"class":89,"line":373},8,[375],{"type":19,"tag":87,"props":376,"children":377},{"style":94},[378],{"type":24,"value":379},"# s-1vcpu-2gb Basic 2048 1 50 12.00 0.017860\n",{"type":19,"tag":87,"props":381,"children":383},{"class":89,"line":382},9,[384],{"type":19,"tag":87,"props":385,"children":386},{"style":94},[387],{"type":24,"value":388},"# s-1vcpu-2gb-amd Basic AMD 2048 1 50 14.00 0.020830\n",{"type":19,"tag":20,"props":390,"children":391},{},[392,394,400],{"type":24,"value":393},"I've also configured a few SSH keys with Digital Ocean, and I can have the key (specified by ID) provisioned to the machine using the ",{"type":19,"tag":27,"props":395,"children":397},{"className":396},[],[398],{"type":24,"value":399},"--ssh-keys",{"type":24,"value":401}," flag.",{"type":19,"tag":77,"props":403,"children":405},{"className":79,"code":404,"language":81,"meta":7,"style":7},"doctl compute ssh-key list\n\n# ID Name FingerPrint\n# 1234 mini \u003Credacted>\n",[406],{"type":19,"tag":27,"props":407,"children":408},{"__ignoreMap":7},[409,429,436,444],{"type":19,"tag":87,"props":410,"children":411},{"class":89,"line":90},[412,416,420,425],{"type":19,"tag":87,"props":413,"children":414},{"style":104},[415],{"type":24,"value":32},{"type":19,"tag":87,"props":417,"children":418},{"style":110},[419],{"type":24,"value":195},{"type":19,"tag":87,"props":421,"children":422},{"style":110},[423],{"type":24,"value":424}," ssh-key",{"type":19,"tag":87,"props":426,"children":427},{"style":110},[428],{"type":24,"value":321},{"type":19,"tag":87,"props":430,"children":431},{"class":89,"line":100},[432],{"type":19,"tag":87,"props":433,"children":434},{"emptyLinePlaceholder":125},[435],{"type":24,"value":128},{"type":19,"tag":87,"props":437,"children":438},{"class":89,"line":121},[439],{"type":19,"tag":87,"props":440,"children":441},{"style":94},[442],{"type":24,"value":443},"# ID Name FingerPrint\n",{"type":19,"tag":87,"props":445,"children":446},{"class":89,"line":131},[447],{"type":19,"tag":87,"props":448,"children":449},{"style":94},[450],{"type":24,"value":451},"# 1234 mini \u003Credacted>\n",{"type":19,"tag":20,"props":453,"children":454},{},[455,457,463],{"type":24,"value":456},"Also, I wanted to install a few packages to the box upon creation, this can be done easily with the ",{"type":19,"tag":27,"props":458,"children":460},{"className":459},[],[461],{"type":24,"value":462},"--user-data-file",{"type":24,"value":464}," flag to run an initialization script.",{"type":19,"tag":77,"props":466,"children":468},{"className":79,"code":467,"language":81,"meta":7,"style":7},"echo 'apt install -y imagemagick zip' > bootstrap.sh\n",[469],{"type":19,"tag":27,"props":470,"children":471},{"__ignoreMap":7},[472],{"type":19,"tag":87,"props":473,"children":474},{"class":89,"line":90},[475,480,485,490],{"type":19,"tag":87,"props":476,"children":477},{"style":208},[478],{"type":24,"value":479},"echo",{"type":19,"tag":87,"props":481,"children":482},{"style":110},[483],{"type":24,"value":484}," 'apt install -y imagemagick zip'",{"type":19,"tag":87,"props":486,"children":487},{"style":252},[488],{"type":24,"value":489}," >",{"type":19,"tag":87,"props":491,"children":492},{"style":110},[493],{"type":24,"value":494}," bootstrap.sh\n",{"type":19,"tag":20,"props":496,"children":497},{},[498],{"type":24,"value":499},"Putting it all together, here is the simple command for creating a small compute instance!",{"type":19,"tag":77,"props":501,"children":503},{"className":79,"code":502,"language":81,"meta":7,"style":7},"doctl compute droplet create \\\n --image ubuntu-22-10-x64 \\\n --size s-1vcpu-512mb-10gb \\\n --region nyc1 \\\n --ssh-keys 1234 \\\n --user-data-file boostrap.sh \\\n ephemeral\n",[504],{"type":19,"tag":27,"props":505,"children":506},{"__ignoreMap":7},[507,531,548,565,582,599,616],{"type":19,"tag":87,"props":508,"children":509},{"class":89,"line":90},[510,514,518,522,526],{"type":19,"tag":87,"props":511,"children":512},{"style":104},[513],{"type":24,"value":32},{"type":19,"tag":87,"props":515,"children":516},{"style":110},[517],{"type":24,"value":195},{"type":19,"tag":87,"props":519,"children":520},{"style":110},[521],{"type":24,"value":200},{"type":19,"tag":87,"props":523,"children":524},{"style":110},[525],{"type":24,"value":205},{"type":19,"tag":87,"props":527,"children":528},{"style":208},[529],{"type":24,"value":530}," \\\n",{"type":19,"tag":87,"props":532,"children":533},{"class":89,"line":100},[534,539,544],{"type":19,"tag":87,"props":535,"children":536},{"style":208},[537],{"type":24,"value":538}," --image",{"type":19,"tag":87,"props":540,"children":541},{"style":110},[542],{"type":24,"value":543}," ubuntu-22-10-x64",{"type":19,"tag":87,"props":545,"children":546},{"style":208},[547],{"type":24,"value":530},{"type":19,"tag":87,"props":549,"children":550},{"class":89,"line":121},[551,556,561],{"type":19,"tag":87,"props":552,"children":553},{"style":208},[554],{"type":24,"value":555}," --size",{"type":19,"tag":87,"props":557,"children":558},{"style":110},[559],{"type":24,"value":560}," s-1vcpu-512mb-10gb",{"type":19,"tag":87,"props":562,"children":563},{"style":208},[564],{"type":24,"value":530},{"type":19,"tag":87,"props":566,"children":567},{"class":89,"line":131},[568,573,578],{"type":19,"tag":87,"props":569,"children":570},{"style":208},[571],{"type":24,"value":572}," --region",{"type":19,"tag":87,"props":574,"children":575},{"style":110},[576],{"type":24,"value":577}," nyc1",{"type":19,"tag":87,"props":579,"children":580},{"style":208},[581],{"type":24,"value":530},{"type":19,"tag":87,"props":583,"children":584},{"class":89,"line":140},[585,590,595],{"type":19,"tag":87,"props":586,"children":587},{"style":208},[588],{"type":24,"value":589}," --ssh-keys",{"type":19,"tag":87,"props":591,"children":592},{"style":208},[593],{"type":24,"value":594}," 1234",{"type":19,"tag":87,"props":596,"children":597},{"style":208},[598],{"type":24,"value":530},{"type":19,"tag":87,"props":600,"children":601},{"class":89,"line":355},[602,607,612],{"type":19,"tag":87,"props":603,"children":604},{"style":208},[605],{"type":24,"value":606}," --user-data-file",{"type":19,"tag":87,"props":608,"children":609},{"style":110},[610],{"type":24,"value":611}," boostrap.sh",{"type":19,"tag":87,"props":613,"children":614},{"style":208},[615],{"type":24,"value":530},{"type":19,"tag":87,"props":617,"children":618},{"class":89,"line":364},[619],{"type":19,"tag":87,"props":620,"children":621},{"style":110},[622],{"type":24,"value":623}," ephemeral\n",{"type":19,"tag":20,"props":625,"children":626},{},[627],{"type":24,"value":628},"Finally, I can connect, do my thing, and destroy the instance.",{"type":19,"tag":77,"props":630,"children":632},{"className":79,"code":631,"language":81,"meta":7,"style":7},"doctl compute ssh ephemeral\n",[633],{"type":19,"tag":27,"props":634,"children":635},{"__ignoreMap":7},[636],{"type":19,"tag":87,"props":637,"children":638},{"class":89,"line":90},[639,643,647,652],{"type":19,"tag":87,"props":640,"children":641},{"style":104},[642],{"type":24,"value":32},{"type":19,"tag":87,"props":644,"children":645},{"style":110},[646],{"type":24,"value":195},{"type":19,"tag":87,"props":648,"children":649},{"style":110},[650],{"type":24,"value":651}," ssh",{"type":19,"tag":87,"props":653,"children":654},{"style":110},[655],{"type":24,"value":656}," ephemeral\n",{"type":19,"tag":77,"props":658,"children":660},{"className":79,"code":659,"language":81,"meta":7,"style":7},"doctl compute droplet delete --force ephemeral\n",[661],{"type":19,"tag":27,"props":662,"children":663},{"__ignoreMap":7},[664],{"type":19,"tag":87,"props":665,"children":666},{"class":89,"line":90},[667,671,675,679,684,689],{"type":19,"tag":87,"props":668,"children":669},{"style":104},[670],{"type":24,"value":32},{"type":19,"tag":87,"props":672,"children":673},{"style":110},[674],{"type":24,"value":195},{"type":19,"tag":87,"props":676,"children":677},{"style":110},[678],{"type":24,"value":200},{"type":19,"tag":87,"props":680,"children":681},{"style":110},[682],{"type":24,"value":683}," delete",{"type":19,"tag":87,"props":685,"children":686},{"style":208},[687],{"type":24,"value":688}," --force",{"type":19,"tag":87,"props":690,"children":691},{"style":110},[692],{"type":24,"value":656},{"type":19,"tag":20,"props":694,"children":695},{},[696],{"type":24,"value":697},"All-in-all, I was up and running in about 20 minutes. What a handy utility!",{"type":19,"tag":699,"props":700,"children":701},"style",{},[702],{"type":24,"value":703},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}",{"title":7,"searchDepth":100,"depth":100,"links":705},[],"markdown","content:articles:doctl.md","content","articles/doctl.md","articles/doctl","md",1735327945019] \ No newline at end of file diff --git a/articles/doctl/index.html b/articles/doctl/index.html index eca4910d..48e50659 100644 --- a/articles/doctl/index.html +++ b/articles/doctl/index.html @@ -1,37 +1,37 @@ Colton Padden - + - - - - - + + + + + - + - - - - - - - - - - - - - + + + + + + + + + + + + + - -

            Exploring the Digital Ocean `doctl` Utility

            I recently had the need to spool up a small ephemeral Linux instance, and wanted to try something new by exploring the Digital Ocean doctl command line utility. + +

            Exploring the Digital Ocean `doctl` Utility

            I recently had the need to spool up a small ephemeral Linux instance, and wanted to try something new by exploring the Digital Ocean doctl command line utility. This proved to be an extremely easy way to configure, create, connect, and destroy a Linux box, and I foresee myself using this service even more in the future.

            To start things off, I had to install and setup authentication to Digital Ocean. Doing this on my Mac machine, I opted to use Homebrew.

            # install `doctl`
             brew install doctl
            @@ -66,5 +66,5 @@
                 ephemeral
             

            Finally, I can connect, do my thing, and destroy the instance.

            doctl compute ssh ephemeral
             
            doctl compute droplet delete --force ephemeral
            -

            All-in-all, I was up and running in about 20 minutes. What a handy utility!

            - \ No newline at end of file +

            All-in-all, I was up and running in about 20 minutes. What a handy utility!

            + \ No newline at end of file diff --git a/articles/fennel-initial-exploration/_payload.json b/articles/fennel-initial-exploration/_payload.json index 34968d8b..6ab18bfb 100644 --- a/articles/fennel-initial-exploration/_payload.json +++ b/articles/fennel-initial-exploration/_payload.json @@ -1 +1 @@ -[{"data":1,"prerenderedAt":1106},["ShallowReactive",2],{"page-data":3},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"draft":6,"date":10,"tags":11,"categories":15,"cover_image":16,"excerpt":17,"body":27,"_type":1100,"_id":1101,"_source":1102,"_file":1103,"_stem":1104,"_extension":1105},"/articles/fennel-initial-exploration","articles",false,"","Impressions of Fennel with Hammerspoon","A while back I read an introductory book on Lisp programming titled, \"The Little\nSchemer\". This book opened my mind to new (to me) programming paradigms, and left me\nwith a strong desire to find a way to incorporate Lisp programming into my every day\nlife. It took some time, but I believe I've found what I've been looking for: Fennel.","2023-10-22",[12,13,14],"lisp","hammerspoon","fennel",[12],"/images/dall-e-fennel-hammer.jpeg",{"type":18,"children":19},"root",[20],{"type":21,"tag":22,"props":23,"children":24},"element","p",{},[25],{"type":26,"value":9},"text",{"type":18,"children":28,"toc":1094},[29,33,67,74,88,94,125,157,170,199,422,428,458,536,598,611,917,1039,1052,1058,1063,1077,1088],{"type":21,"tag":22,"props":30,"children":31},{},[32],{"type":26,"value":9},{"type":21,"tag":22,"props":34,"children":35},{},[36,38,47,49,56,58,65],{"type":26,"value":37},"The ",{"type":21,"tag":39,"props":40,"children":44},"a",{"href":41,"rel":42},"https://fennel-lang.org/",[43],"nofollow",[45],{"type":26,"value":46},"Fennel",{"type":26,"value":48}," programming language is a dialect of Lisp that boasts compatibility with\nLua, and it just so happens that two of my favorite applications are configured with\nexactly that language: ",{"type":21,"tag":39,"props":50,"children":53},{"href":51,"rel":52},"https://www.hammerspoon.org/",[43],[54],{"type":26,"value":55},"Hammerspoon",{"type":26,"value":57},", and ",{"type":21,"tag":39,"props":59,"children":62},{"href":60,"rel":61},"https://neovim.io/",[43],[63],{"type":26,"value":64},"Neovim",{"type":26,"value":66},".",{"type":21,"tag":68,"props":69,"children":71},"h2",{"id":70},"initial-observations",[72],{"type":26,"value":73},"Initial Observations",{"type":21,"tag":22,"props":75,"children":76},{},[77,79,86],{"type":26,"value":78},"To initially explore Fennel, I wanted to start small. My Hammerspoon configuration\nconsists of 7 ",{"type":21,"tag":39,"props":80,"children":83},{"href":81,"rel":82},"https://github.com/cmpadden/dotfiles/tree/795749fa17e1310bb001bb7deaa22be8689f0027/hammerspoon/.hammerspoon/modules",[43],[84],{"type":26,"value":85},"modules",{"type":26,"value":87}," that I use for operations such as: launching applications,\nmanaging windows, keeping my computer from going to sleep, and general operating system\nautomation. So the plan is to translate these modules into Fennel, while maintaining\nwithout breaking the existing functionality. However, at this point, I wasn't even sure\nhow to embed Fennel into my project...",{"type":21,"tag":68,"props":89,"children":91},{"id":90},"integrating-fennel-with-hammerspoon",[92],{"type":26,"value":93},"Integrating Fennel with Hammerspoon",{"type":21,"tag":22,"props":95,"children":96},{},[97,99,106,108,115,117,123],{"type":26,"value":98},"While official documentation exists describing how to ",{"type":21,"tag":39,"props":100,"children":103},{"href":101,"rel":102},"https://fennel-lang.org/setup#embedding-fennel",[43],[104],{"type":26,"value":105},"embed fennel",{"type":26,"value":107}," into your\nproject; it didn't provide me with enough clarity to know my next steps on integrating\nit with Hammerspoon. I found a few resources online demonstrating how to extend the\n",{"type":21,"tag":109,"props":110,"children":112},"code",{"className":111},[],[113],{"type":26,"value":114},"package.path",{"type":26,"value":116}," and ",{"type":21,"tag":109,"props":118,"children":120},{"className":119},[],[121],{"type":26,"value":122},"package.cpath",{"type":26,"value":124}," properties in Lua, but I was unable to get this to\nwork.",{"type":21,"tag":126,"props":127,"children":128},"ul",{},[129,139,148],{"type":21,"tag":130,"props":131,"children":132},"li",{},[133],{"type":21,"tag":39,"props":134,"children":137},{"href":135,"rel":136},"https://blog.exupero.org/hammerspoon-with-fennel/",[43],[138],{"type":26,"value":135},{"type":21,"tag":130,"props":140,"children":141},{},[142],{"type":21,"tag":39,"props":143,"children":146},{"href":144,"rel":145},"https://github.com/Hammerspoon/hammerspoon/issues/2377#issuecomment-636331435",[43],[147],{"type":26,"value":144},{"type":21,"tag":130,"props":149,"children":150},{},[151],{"type":21,"tag":39,"props":152,"children":155},{"href":153,"rel":154},"https://github.com/agzam/spacehammer/blob/master/init.lua",[43],[156],{"type":26,"value":153},{"type":21,"tag":22,"props":158,"children":159},{},[160,162,168],{"type":26,"value":161},"Ultimately, I opted to include the ",{"type":21,"tag":109,"props":163,"children":165},{"className":164},[],[166],{"type":26,"value":167},"fennel.lua",{"type":26,"value":169}," file to my Hammerspoon configuration,\nand while not ideal, it does make the configuration nicely self-contained. I'll leave it\nas a future task to include the module installed with LuaRocks.",{"type":21,"tag":22,"props":171,"children":172},{},[173,175,181,183,189,191,197],{"type":26,"value":174},"With Fennel now included in my Hammerspoon configuration, all I need to do is configure\nthe ",{"type":21,"tag":109,"props":176,"children":178},{"className":177},[],[179],{"type":26,"value":180},"fennel.path",{"type":26,"value":182}," to point to the ",{"type":21,"tag":109,"props":184,"children":186},{"className":185},[],[187],{"type":26,"value":188},"*.fnl",{"type":26,"value":190}," files in the ",{"type":21,"tag":109,"props":192,"children":194},{"className":193},[],[195],{"type":26,"value":196},".hammerspoon/",{"type":26,"value":198}," directory, and\nttranslating these modules can begin!",{"type":21,"tag":200,"props":201,"children":205},"pre",{"className":202,"code":203,"language":204,"meta":7,"style":7},"language-lua shiki shiki-themes github-light","-- init.lua\n\nlocal fennel = require('fennel')\n\nfennel.path = package.path .. \";\" .. os.getenv(\"HOME\") .. \"/.hammerspoon/?.fnl\"\n\ntable.insert(package.loaders or package.searchers, fennel.searcher)\n\nrequire 'main'\n","lua",[206],{"type":21,"tag":109,"props":207,"children":208},{"__ignoreMap":7},[209,221,231,274,282,350,358,400,408],{"type":21,"tag":210,"props":211,"children":214},"span",{"class":212,"line":213},"line",1,[215],{"type":21,"tag":210,"props":216,"children":218},{"style":217},"--shiki-default:#6A737D",[219],{"type":26,"value":220},"-- init.lua\n",{"type":21,"tag":210,"props":222,"children":224},{"class":212,"line":223},2,[225],{"type":21,"tag":210,"props":226,"children":228},{"emptyLinePlaceholder":227},true,[229],{"type":26,"value":230},"\n",{"type":21,"tag":210,"props":232,"children":234},{"class":212,"line":233},3,[235,241,247,252,258,263,269],{"type":21,"tag":210,"props":236,"children":238},{"style":237},"--shiki-default:#D73A49",[239],{"type":26,"value":240},"local",{"type":21,"tag":210,"props":242,"children":244},{"style":243},"--shiki-default:#24292E",[245],{"type":26,"value":246}," fennel ",{"type":21,"tag":210,"props":248,"children":249},{"style":237},[250],{"type":26,"value":251},"=",{"type":21,"tag":210,"props":253,"children":255},{"style":254},"--shiki-default:#005CC5",[256],{"type":26,"value":257}," require",{"type":21,"tag":210,"props":259,"children":260},{"style":243},[261],{"type":26,"value":262},"(",{"type":21,"tag":210,"props":264,"children":266},{"style":265},"--shiki-default:#032F62",[267],{"type":26,"value":268},"'fennel'",{"type":21,"tag":210,"props":270,"children":271},{"style":243},[272],{"type":26,"value":273},")\n",{"type":21,"tag":210,"props":275,"children":277},{"class":212,"line":276},4,[278],{"type":21,"tag":210,"props":279,"children":280},{"emptyLinePlaceholder":227},[281],{"type":26,"value":230},{"type":21,"tag":210,"props":283,"children":285},{"class":212,"line":284},5,[286,291,297,302,307,312,317,322,327,331,336,341,345],{"type":21,"tag":210,"props":287,"children":288},{"style":243},[289],{"type":26,"value":290},"fennel.",{"type":21,"tag":210,"props":292,"children":294},{"style":293},"--shiki-default:#6F42C1",[295],{"type":26,"value":296},"path",{"type":21,"tag":210,"props":298,"children":299},{"style":237},[300],{"type":26,"value":301}," =",{"type":21,"tag":210,"props":303,"children":304},{"style":254},[305],{"type":26,"value":306}," package.path",{"type":21,"tag":210,"props":308,"children":309},{"style":237},[310],{"type":26,"value":311}," ..",{"type":21,"tag":210,"props":313,"children":314},{"style":265},[315],{"type":26,"value":316}," \";\" ",{"type":21,"tag":210,"props":318,"children":319},{"style":237},[320],{"type":26,"value":321},"..",{"type":21,"tag":210,"props":323,"children":324},{"style":254},[325],{"type":26,"value":326}," os.getenv",{"type":21,"tag":210,"props":328,"children":329},{"style":243},[330],{"type":26,"value":262},{"type":21,"tag":210,"props":332,"children":333},{"style":265},[334],{"type":26,"value":335},"\"HOME\"",{"type":21,"tag":210,"props":337,"children":338},{"style":243},[339],{"type":26,"value":340},") ",{"type":21,"tag":210,"props":342,"children":343},{"style":237},[344],{"type":26,"value":321},{"type":21,"tag":210,"props":346,"children":347},{"style":265},[348],{"type":26,"value":349}," \"/.hammerspoon/?.fnl\"\n",{"type":21,"tag":210,"props":351,"children":353},{"class":212,"line":352},6,[354],{"type":21,"tag":210,"props":355,"children":356},{"emptyLinePlaceholder":227},[357],{"type":26,"value":230},{"type":21,"tag":210,"props":359,"children":361},{"class":212,"line":360},7,[362,367,371,376,381,386,391,396],{"type":21,"tag":210,"props":363,"children":364},{"style":254},[365],{"type":26,"value":366},"table.insert",{"type":21,"tag":210,"props":368,"children":369},{"style":243},[370],{"type":26,"value":262},{"type":21,"tag":210,"props":372,"children":373},{"style":254},[374],{"type":26,"value":375},"package.loaders",{"type":21,"tag":210,"props":377,"children":378},{"style":237},[379],{"type":26,"value":380}," or",{"type":21,"tag":210,"props":382,"children":383},{"style":254},[384],{"type":26,"value":385}," package.searchers",{"type":21,"tag":210,"props":387,"children":388},{"style":243},[389],{"type":26,"value":390},", fennel.",{"type":21,"tag":210,"props":392,"children":393},{"style":293},[394],{"type":26,"value":395},"searcher",{"type":21,"tag":210,"props":397,"children":398},{"style":243},[399],{"type":26,"value":273},{"type":21,"tag":210,"props":401,"children":403},{"class":212,"line":402},8,[404],{"type":21,"tag":210,"props":405,"children":406},{"emptyLinePlaceholder":227},[407],{"type":26,"value":230},{"type":21,"tag":210,"props":409,"children":411},{"class":212,"line":410},9,[412,417],{"type":21,"tag":210,"props":413,"children":414},{"style":254},[415],{"type":26,"value":416},"require",{"type":21,"tag":210,"props":418,"children":419},{"style":265},[420],{"type":26,"value":421}," 'main'\n",{"type":21,"tag":68,"props":423,"children":425},{"id":424},"translating-lua-to-fennel",[426],{"type":26,"value":427},"Translating Lua to Fennel",{"type":21,"tag":22,"props":429,"children":430},{},[431,433,440,442,448,450,456],{"type":26,"value":432},"As a Fennel novice, I was happy to see that the Fennel project provides an online\ncross-compiler for Lua and Fennel called ",{"type":21,"tag":39,"props":434,"children":437},{"href":435,"rel":436},"https://fennel-lang.org/see",[43],[438],{"type":26,"value":439},"anti-fennel",{"type":26,"value":441},", and while it can generate some\nstrange-looking Fennel code, it was an extremely useful tool for me to get\nup-and-running right away. For example, by pasting the simple ",{"type":21,"tag":109,"props":443,"children":445},{"className":444},[],[446],{"type":26,"value":447},"sleep",{"type":26,"value":449}," function\nfrom the ",{"type":21,"tag":109,"props":451,"children":453},{"className":452},[],[454],{"type":26,"value":455},"helpers",{"type":26,"value":457}," module into the compiler:",{"type":21,"tag":200,"props":459,"children":461},{"className":202,"code":460,"language":204,"meta":7,"style":7},"function sleep(ms)\n os.execute(\"sleep \" .. tonumber(ms) / 1000)\nend\n",[462],{"type":21,"tag":109,"props":463,"children":464},{"__ignoreMap":7},[465,483,528],{"type":21,"tag":210,"props":466,"children":467},{"class":212,"line":213},[468,473,478],{"type":21,"tag":210,"props":469,"children":470},{"style":237},[471],{"type":26,"value":472},"function",{"type":21,"tag":210,"props":474,"children":475},{"style":293},[476],{"type":26,"value":477}," sleep",{"type":21,"tag":210,"props":479,"children":480},{"style":243},[481],{"type":26,"value":482},"(ms)\n",{"type":21,"tag":210,"props":484,"children":485},{"class":212,"line":223},[486,491,495,500,504,509,514,519,524],{"type":21,"tag":210,"props":487,"children":488},{"style":254},[489],{"type":26,"value":490}," os.execute",{"type":21,"tag":210,"props":492,"children":493},{"style":243},[494],{"type":26,"value":262},{"type":21,"tag":210,"props":496,"children":497},{"style":265},[498],{"type":26,"value":499},"\"sleep \" ",{"type":21,"tag":210,"props":501,"children":502},{"style":237},[503],{"type":26,"value":321},{"type":21,"tag":210,"props":505,"children":506},{"style":254},[507],{"type":26,"value":508}," tonumber",{"type":21,"tag":210,"props":510,"children":511},{"style":243},[512],{"type":26,"value":513},"(ms) ",{"type":21,"tag":210,"props":515,"children":516},{"style":237},[517],{"type":26,"value":518},"/",{"type":21,"tag":210,"props":520,"children":521},{"style":254},[522],{"type":26,"value":523}," 1000",{"type":21,"tag":210,"props":525,"children":526},{"style":243},[527],{"type":26,"value":273},{"type":21,"tag":210,"props":529,"children":530},{"class":212,"line":233},[531],{"type":21,"tag":210,"props":532,"children":533},{"style":237},[534],{"type":26,"value":535},"end\n",{"type":21,"tag":200,"props":537,"children":540},{"className":538,"code":539,"language":12,"meta":7,"style":7},"language-lisp shiki shiki-themes github-light","(fn sleep [ms]\n (os.execute (.. \"sleep \" (/ (tonumber ms) 1000))))\n",[541],{"type":21,"tag":109,"props":542,"children":543},{"__ignoreMap":7},[544,561],{"type":21,"tag":210,"props":545,"children":546},{"class":212,"line":213},[547,552,556],{"type":21,"tag":210,"props":548,"children":549},{"style":243},[550],{"type":26,"value":551},"(fn ",{"type":21,"tag":210,"props":553,"children":554},{"style":254},[555],{"type":26,"value":447},{"type":21,"tag":210,"props":557,"children":558},{"style":243},[559],{"type":26,"value":560}," [ms]\n",{"type":21,"tag":210,"props":562,"children":563},{"class":212,"line":223},[564,569,574,579,583,588,593],{"type":21,"tag":210,"props":565,"children":566},{"style":243},[567],{"type":26,"value":568}," (os.execute (.. ",{"type":21,"tag":210,"props":570,"children":571},{"style":265},[572],{"type":26,"value":573},"\"sleep \"",{"type":21,"tag":210,"props":575,"children":576},{"style":243},[577],{"type":26,"value":578}," (",{"type":21,"tag":210,"props":580,"children":581},{"style":254},[582],{"type":26,"value":518},{"type":21,"tag":210,"props":584,"children":585},{"style":243},[586],{"type":26,"value":587}," (tonumber ms) ",{"type":21,"tag":210,"props":589,"children":590},{"style":254},[591],{"type":26,"value":592},"1000",{"type":21,"tag":210,"props":594,"children":595},{"style":243},[596],{"type":26,"value":597},"))))\n",{"type":21,"tag":22,"props":599,"children":600},{},[601,603,609],{"type":26,"value":602},"As another example, here is the output for my ",{"type":21,"tag":604,"props":605,"children":606},"em",{},[607],{"type":26,"value":608},"caffeine",{"type":26,"value":610}," toggle:",{"type":21,"tag":200,"props":612,"children":614},{"className":202,"code":613,"language":204,"meta":7,"style":7},"hs.hotkey.bind(HYPER, \"0\", function()\n hs.caffeinate.toggle(\"displayIdle\")\n if hs.caffeinate.get(\"displayIdle\") then\n helpers:show(\"Caffeine Enabled\", nil, helpers.styles.success, helpers.assets.check)\n else\n helpers:show(\"Caffeine Disabled\", nil, helpers.styles.error, helpers.assets.ban)\n end\nend)\n",[615],{"type":21,"tag":109,"props":616,"children":617},{"__ignoreMap":7},[618,664,699,742,819,827,897,905],{"type":21,"tag":210,"props":619,"children":620},{"class":212,"line":213},[621,626,631,635,640,645,650,655,659],{"type":21,"tag":210,"props":622,"children":623},{"style":243},[624],{"type":26,"value":625},"hs.",{"type":21,"tag":210,"props":627,"children":628},{"style":293},[629],{"type":26,"value":630},"hotkey",{"type":21,"tag":210,"props":632,"children":633},{"style":243},[634],{"type":26,"value":66},{"type":21,"tag":210,"props":636,"children":637},{"style":254},[638],{"type":26,"value":639},"bind",{"type":21,"tag":210,"props":641,"children":642},{"style":243},[643],{"type":26,"value":644},"(HYPER, ",{"type":21,"tag":210,"props":646,"children":647},{"style":265},[648],{"type":26,"value":649},"\"0\"",{"type":21,"tag":210,"props":651,"children":652},{"style":243},[653],{"type":26,"value":654},", ",{"type":21,"tag":210,"props":656,"children":657},{"style":237},[658],{"type":26,"value":472},{"type":21,"tag":210,"props":660,"children":661},{"style":243},[662],{"type":26,"value":663},"()\n",{"type":21,"tag":210,"props":665,"children":666},{"class":212,"line":223},[667,672,677,681,686,690,695],{"type":21,"tag":210,"props":668,"children":669},{"style":243},[670],{"type":26,"value":671}," hs.",{"type":21,"tag":210,"props":673,"children":674},{"style":293},[675],{"type":26,"value":676},"caffeinate",{"type":21,"tag":210,"props":678,"children":679},{"style":243},[680],{"type":26,"value":66},{"type":21,"tag":210,"props":682,"children":683},{"style":254},[684],{"type":26,"value":685},"toggle",{"type":21,"tag":210,"props":687,"children":688},{"style":243},[689],{"type":26,"value":262},{"type":21,"tag":210,"props":691,"children":692},{"style":265},[693],{"type":26,"value":694},"\"displayIdle\"",{"type":21,"tag":210,"props":696,"children":697},{"style":243},[698],{"type":26,"value":273},{"type":21,"tag":210,"props":700,"children":701},{"class":212,"line":233},[702,707,712,716,720,725,729,733,737],{"type":21,"tag":210,"props":703,"children":704},{"style":237},[705],{"type":26,"value":706}," if",{"type":21,"tag":210,"props":708,"children":709},{"style":243},[710],{"type":26,"value":711}," hs.",{"type":21,"tag":210,"props":713,"children":714},{"style":293},[715],{"type":26,"value":676},{"type":21,"tag":210,"props":717,"children":718},{"style":243},[719],{"type":26,"value":66},{"type":21,"tag":210,"props":721,"children":722},{"style":254},[723],{"type":26,"value":724},"get",{"type":21,"tag":210,"props":726,"children":727},{"style":243},[728],{"type":26,"value":262},{"type":21,"tag":210,"props":730,"children":731},{"style":265},[732],{"type":26,"value":694},{"type":21,"tag":210,"props":734,"children":735},{"style":243},[736],{"type":26,"value":340},{"type":21,"tag":210,"props":738,"children":739},{"style":237},[740],{"type":26,"value":741},"then\n",{"type":21,"tag":210,"props":743,"children":744},{"class":212,"line":276},[745,750,755,760,764,769,773,778,783,788,792,797,801,806,810,815],{"type":21,"tag":210,"props":746,"children":747},{"style":293},[748],{"type":26,"value":749}," helpers",{"type":21,"tag":210,"props":751,"children":752},{"style":243},[753],{"type":26,"value":754},":",{"type":21,"tag":210,"props":756,"children":757},{"style":254},[758],{"type":26,"value":759},"show",{"type":21,"tag":210,"props":761,"children":762},{"style":243},[763],{"type":26,"value":262},{"type":21,"tag":210,"props":765,"children":766},{"style":265},[767],{"type":26,"value":768},"\"Caffeine Enabled\"",{"type":21,"tag":210,"props":770,"children":771},{"style":243},[772],{"type":26,"value":654},{"type":21,"tag":210,"props":774,"children":775},{"style":254},[776],{"type":26,"value":777},"nil",{"type":21,"tag":210,"props":779,"children":780},{"style":243},[781],{"type":26,"value":782},", helpers.",{"type":21,"tag":210,"props":784,"children":785},{"style":293},[786],{"type":26,"value":787},"styles",{"type":21,"tag":210,"props":789,"children":790},{"style":243},[791],{"type":26,"value":66},{"type":21,"tag":210,"props":793,"children":794},{"style":293},[795],{"type":26,"value":796},"success",{"type":21,"tag":210,"props":798,"children":799},{"style":243},[800],{"type":26,"value":782},{"type":21,"tag":210,"props":802,"children":803},{"style":293},[804],{"type":26,"value":805},"assets",{"type":21,"tag":210,"props":807,"children":808},{"style":243},[809],{"type":26,"value":66},{"type":21,"tag":210,"props":811,"children":812},{"style":293},[813],{"type":26,"value":814},"check",{"type":21,"tag":210,"props":816,"children":817},{"style":243},[818],{"type":26,"value":273},{"type":21,"tag":210,"props":820,"children":821},{"class":212,"line":284},[822],{"type":21,"tag":210,"props":823,"children":824},{"style":237},[825],{"type":26,"value":826}," else\n",{"type":21,"tag":210,"props":828,"children":829},{"class":212,"line":352},[830,834,838,842,846,851,855,859,863,867,871,876,880,884,888,893],{"type":21,"tag":210,"props":831,"children":832},{"style":293},[833],{"type":26,"value":749},{"type":21,"tag":210,"props":835,"children":836},{"style":243},[837],{"type":26,"value":754},{"type":21,"tag":210,"props":839,"children":840},{"style":254},[841],{"type":26,"value":759},{"type":21,"tag":210,"props":843,"children":844},{"style":243},[845],{"type":26,"value":262},{"type":21,"tag":210,"props":847,"children":848},{"style":265},[849],{"type":26,"value":850},"\"Caffeine Disabled\"",{"type":21,"tag":210,"props":852,"children":853},{"style":243},[854],{"type":26,"value":654},{"type":21,"tag":210,"props":856,"children":857},{"style":254},[858],{"type":26,"value":777},{"type":21,"tag":210,"props":860,"children":861},{"style":243},[862],{"type":26,"value":782},{"type":21,"tag":210,"props":864,"children":865},{"style":293},[866],{"type":26,"value":787},{"type":21,"tag":210,"props":868,"children":869},{"style":243},[870],{"type":26,"value":66},{"type":21,"tag":210,"props":872,"children":873},{"style":293},[874],{"type":26,"value":875},"error",{"type":21,"tag":210,"props":877,"children":878},{"style":243},[879],{"type":26,"value":782},{"type":21,"tag":210,"props":881,"children":882},{"style":293},[883],{"type":26,"value":805},{"type":21,"tag":210,"props":885,"children":886},{"style":243},[887],{"type":26,"value":66},{"type":21,"tag":210,"props":889,"children":890},{"style":293},[891],{"type":26,"value":892},"ban",{"type":21,"tag":210,"props":894,"children":895},{"style":243},[896],{"type":26,"value":273},{"type":21,"tag":210,"props":898,"children":899},{"class":212,"line":360},[900],{"type":21,"tag":210,"props":901,"children":902},{"style":237},[903],{"type":26,"value":904}," end\n",{"type":21,"tag":210,"props":906,"children":907},{"class":212,"line":402},[908,913],{"type":21,"tag":210,"props":909,"children":910},{"style":237},[911],{"type":26,"value":912},"end",{"type":21,"tag":210,"props":914,"children":915},{"style":243},[916],{"type":26,"value":273},{"type":21,"tag":200,"props":918,"children":920},{"className":538,"code":919,"language":12,"meta":7,"style":7},"(hs.hotkey.bind HYPER :0\n (fn [] (hs.caffeinate.toggle :displayIdle)\n (if (hs.caffeinate.get :displayIdle)\n (helpers:show \"Caffeine Enabled\" nil helpers.styles.success helpers.assets.check)\n (helpers:show \"Caffeine Disabled\" nil helpers.styles.error helpers.assets.ban)))) \n",[921],{"type":21,"tag":109,"props":922,"children":923},{"__ignoreMap":7},[924,937,954,980,1011],{"type":21,"tag":210,"props":925,"children":926},{"class":212,"line":213},[927,932],{"type":21,"tag":210,"props":928,"children":929},{"style":243},[930],{"type":26,"value":931},"(hs.hotkey.bind HYPER ",{"type":21,"tag":210,"props":933,"children":934},{"style":293},[935],{"type":26,"value":936},":0\n",{"type":21,"tag":210,"props":938,"children":939},{"class":212,"line":223},[940,945,950],{"type":21,"tag":210,"props":941,"children":942},{"style":243},[943],{"type":26,"value":944}," (fn [] (hs.caffeinate.toggle ",{"type":21,"tag":210,"props":946,"children":947},{"style":293},[948],{"type":26,"value":949},":displayIdle",{"type":21,"tag":210,"props":951,"children":952},{"style":243},[953],{"type":26,"value":273},{"type":21,"tag":210,"props":955,"children":956},{"class":212,"line":233},[957,962,967,972,976],{"type":21,"tag":210,"props":958,"children":959},{"style":243},[960],{"type":26,"value":961}," (",{"type":21,"tag":210,"props":963,"children":964},{"style":237},[965],{"type":26,"value":966},"if",{"type":21,"tag":210,"props":968,"children":969},{"style":243},[970],{"type":26,"value":971}," (hs.caffeinate.get ",{"type":21,"tag":210,"props":973,"children":974},{"style":293},[975],{"type":26,"value":949},{"type":21,"tag":210,"props":977,"children":978},{"style":243},[979],{"type":26,"value":273},{"type":21,"tag":210,"props":981,"children":982},{"class":212,"line":276},[983,988,992,997,1001,1006],{"type":21,"tag":210,"props":984,"children":985},{"style":243},[986],{"type":26,"value":987}," (",{"type":21,"tag":210,"props":989,"children":990},{"style":254},[991],{"type":26,"value":455},{"type":21,"tag":210,"props":993,"children":994},{"style":243},[995],{"type":26,"value":996},":show ",{"type":21,"tag":210,"props":998,"children":999},{"style":265},[1000],{"type":26,"value":768},{"type":21,"tag":210,"props":1002,"children":1003},{"style":254},[1004],{"type":26,"value":1005}," nil",{"type":21,"tag":210,"props":1007,"children":1008},{"style":243},[1009],{"type":26,"value":1010}," helpers.styles.success helpers.assets.check)\n",{"type":21,"tag":210,"props":1012,"children":1013},{"class":212,"line":284},[1014,1018,1022,1026,1030,1034],{"type":21,"tag":210,"props":1015,"children":1016},{"style":243},[1017],{"type":26,"value":987},{"type":21,"tag":210,"props":1019,"children":1020},{"style":254},[1021],{"type":26,"value":455},{"type":21,"tag":210,"props":1023,"children":1024},{"style":243},[1025],{"type":26,"value":996},{"type":21,"tag":210,"props":1027,"children":1028},{"style":265},[1029],{"type":26,"value":850},{"type":21,"tag":210,"props":1031,"children":1032},{"style":254},[1033],{"type":26,"value":1005},{"type":21,"tag":210,"props":1035,"children":1036},{"style":243},[1037],{"type":26,"value":1038}," helpers.styles.error helpers.assets.ban))))\n",{"type":21,"tag":22,"props":1040,"children":1041},{},[1042,1044,1050],{"type":26,"value":1043},"This was especially helpful for more gnarly modules like the ",{"type":21,"tag":109,"props":1045,"children":1047},{"className":1046},[],[1048],{"type":26,"value":1049},"window",{"type":26,"value":1051}," module used for\nwindow management, and seeing the Lua and Fennel code side-by-side was a kick starter in\nlearning the language!",{"type":21,"tag":68,"props":1053,"children":1055},{"id":1054},"next-steps",[1056],{"type":26,"value":1057},"Next Steps",{"type":21,"tag":22,"props":1059,"children":1060},{},[1061],{"type":26,"value":1062},"While my Fennel Hammerspoon configuration now works with parity to its Lua counterpart,\nI have not yet added new features or modules. I look forward to writing new Fennel code,\nand deepen my understanding of Lisp and the Fennel programming language.",{"type":21,"tag":22,"props":1064,"children":1065},{},[1066,1068,1075],{"type":26,"value":1067},"Additionally, before beginning this endeavor, I was already aware of projects like\n",{"type":21,"tag":39,"props":1069,"children":1072},{"href":1070,"rel":1071},"https://github.com/agzam/spacehammer",[43],[1073],{"type":26,"value":1074},"spacehammer",{"type":26,"value":1076},"; a wildly impressive Hammerspoon configuration written in Fennel, but,\nI wanted to start small and learn the integration myself. However, with the basics out\nof the way, I hope to explore this project further, and seek lessons-learned for the\nconfiguration of my own.",{"type":21,"tag":22,"props":1078,"children":1079},{},[1080,1082],{"type":26,"value":1081},"The full pull-request for translating my Lua Hammerspoon configuration to Fennel can be\nfound here: ",{"type":21,"tag":39,"props":1083,"children":1086},{"href":1084,"rel":1085},"https://github.com/cmpadden/dotfiles/pull/19/files",[43],[1087],{"type":26,"value":1084},{"type":21,"tag":1089,"props":1090,"children":1091},"style",{},[1092],{"type":26,"value":1093},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}",{"title":7,"searchDepth":223,"depth":223,"links":1095},[1096,1097,1098,1099],{"id":70,"depth":223,"text":73},{"id":90,"depth":223,"text":93},{"id":424,"depth":223,"text":427},{"id":1054,"depth":223,"text":1057},"markdown","content:articles:fennel-initial-exploration.md","content","articles/fennel-initial-exploration.md","articles/fennel-initial-exploration","md",1735276485190] \ No newline at end of file +[{"data":1,"prerenderedAt":1106},["ShallowReactive",2],{"page-data":3},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"draft":6,"date":10,"tags":11,"categories":15,"cover_image":16,"excerpt":17,"body":27,"_type":1100,"_id":1101,"_source":1102,"_file":1103,"_stem":1104,"_extension":1105},"/articles/fennel-initial-exploration","articles",false,"","Impressions of Fennel with Hammerspoon","A while back I read an introductory book on Lisp programming titled, \"The Little\nSchemer\". This book opened my mind to new (to me) programming paradigms, and left me\nwith a strong desire to find a way to incorporate Lisp programming into my every day\nlife. It took some time, but I believe I've found what I've been looking for: Fennel.","2023-10-22",[12,13,14],"lisp","hammerspoon","fennel",[12],"/images/dall-e-fennel-hammer.jpeg",{"type":18,"children":19},"root",[20],{"type":21,"tag":22,"props":23,"children":24},"element","p",{},[25],{"type":26,"value":9},"text",{"type":18,"children":28,"toc":1094},[29,33,67,74,88,94,125,157,170,199,422,428,458,536,598,611,917,1039,1052,1058,1063,1077,1088],{"type":21,"tag":22,"props":30,"children":31},{},[32],{"type":26,"value":9},{"type":21,"tag":22,"props":34,"children":35},{},[36,38,47,49,56,58,65],{"type":26,"value":37},"The ",{"type":21,"tag":39,"props":40,"children":44},"a",{"href":41,"rel":42},"https://fennel-lang.org/",[43],"nofollow",[45],{"type":26,"value":46},"Fennel",{"type":26,"value":48}," programming language is a dialect of Lisp that boasts compatibility with\nLua, and it just so happens that two of my favorite applications are configured with\nexactly that language: ",{"type":21,"tag":39,"props":50,"children":53},{"href":51,"rel":52},"https://www.hammerspoon.org/",[43],[54],{"type":26,"value":55},"Hammerspoon",{"type":26,"value":57},", and ",{"type":21,"tag":39,"props":59,"children":62},{"href":60,"rel":61},"https://neovim.io/",[43],[63],{"type":26,"value":64},"Neovim",{"type":26,"value":66},".",{"type":21,"tag":68,"props":69,"children":71},"h2",{"id":70},"initial-observations",[72],{"type":26,"value":73},"Initial Observations",{"type":21,"tag":22,"props":75,"children":76},{},[77,79,86],{"type":26,"value":78},"To initially explore Fennel, I wanted to start small. My Hammerspoon configuration\nconsists of 7 ",{"type":21,"tag":39,"props":80,"children":83},{"href":81,"rel":82},"https://github.com/cmpadden/dotfiles/tree/795749fa17e1310bb001bb7deaa22be8689f0027/hammerspoon/.hammerspoon/modules",[43],[84],{"type":26,"value":85},"modules",{"type":26,"value":87}," that I use for operations such as: launching applications,\nmanaging windows, keeping my computer from going to sleep, and general operating system\nautomation. So the plan is to translate these modules into Fennel, while maintaining\nwithout breaking the existing functionality. However, at this point, I wasn't even sure\nhow to embed Fennel into my project...",{"type":21,"tag":68,"props":89,"children":91},{"id":90},"integrating-fennel-with-hammerspoon",[92],{"type":26,"value":93},"Integrating Fennel with Hammerspoon",{"type":21,"tag":22,"props":95,"children":96},{},[97,99,106,108,115,117,123],{"type":26,"value":98},"While official documentation exists describing how to ",{"type":21,"tag":39,"props":100,"children":103},{"href":101,"rel":102},"https://fennel-lang.org/setup#embedding-fennel",[43],[104],{"type":26,"value":105},"embed fennel",{"type":26,"value":107}," into your\nproject; it didn't provide me with enough clarity to know my next steps on integrating\nit with Hammerspoon. I found a few resources online demonstrating how to extend the\n",{"type":21,"tag":109,"props":110,"children":112},"code",{"className":111},[],[113],{"type":26,"value":114},"package.path",{"type":26,"value":116}," and ",{"type":21,"tag":109,"props":118,"children":120},{"className":119},[],[121],{"type":26,"value":122},"package.cpath",{"type":26,"value":124}," properties in Lua, but I was unable to get this to\nwork.",{"type":21,"tag":126,"props":127,"children":128},"ul",{},[129,139,148],{"type":21,"tag":130,"props":131,"children":132},"li",{},[133],{"type":21,"tag":39,"props":134,"children":137},{"href":135,"rel":136},"https://blog.exupero.org/hammerspoon-with-fennel/",[43],[138],{"type":26,"value":135},{"type":21,"tag":130,"props":140,"children":141},{},[142],{"type":21,"tag":39,"props":143,"children":146},{"href":144,"rel":145},"https://github.com/Hammerspoon/hammerspoon/issues/2377#issuecomment-636331435",[43],[147],{"type":26,"value":144},{"type":21,"tag":130,"props":149,"children":150},{},[151],{"type":21,"tag":39,"props":152,"children":155},{"href":153,"rel":154},"https://github.com/agzam/spacehammer/blob/master/init.lua",[43],[156],{"type":26,"value":153},{"type":21,"tag":22,"props":158,"children":159},{},[160,162,168],{"type":26,"value":161},"Ultimately, I opted to include the ",{"type":21,"tag":109,"props":163,"children":165},{"className":164},[],[166],{"type":26,"value":167},"fennel.lua",{"type":26,"value":169}," file to my Hammerspoon configuration,\nand while not ideal, it does make the configuration nicely self-contained. I'll leave it\nas a future task to include the module installed with LuaRocks.",{"type":21,"tag":22,"props":171,"children":172},{},[173,175,181,183,189,191,197],{"type":26,"value":174},"With Fennel now included in my Hammerspoon configuration, all I need to do is configure\nthe ",{"type":21,"tag":109,"props":176,"children":178},{"className":177},[],[179],{"type":26,"value":180},"fennel.path",{"type":26,"value":182}," to point to the ",{"type":21,"tag":109,"props":184,"children":186},{"className":185},[],[187],{"type":26,"value":188},"*.fnl",{"type":26,"value":190}," files in the ",{"type":21,"tag":109,"props":192,"children":194},{"className":193},[],[195],{"type":26,"value":196},".hammerspoon/",{"type":26,"value":198}," directory, and\nttranslating these modules can begin!",{"type":21,"tag":200,"props":201,"children":205},"pre",{"className":202,"code":203,"language":204,"meta":7,"style":7},"language-lua shiki shiki-themes github-light","-- init.lua\n\nlocal fennel = require('fennel')\n\nfennel.path = package.path .. \";\" .. os.getenv(\"HOME\") .. \"/.hammerspoon/?.fnl\"\n\ntable.insert(package.loaders or package.searchers, fennel.searcher)\n\nrequire 'main'\n","lua",[206],{"type":21,"tag":109,"props":207,"children":208},{"__ignoreMap":7},[209,221,231,274,282,350,358,400,408],{"type":21,"tag":210,"props":211,"children":214},"span",{"class":212,"line":213},"line",1,[215],{"type":21,"tag":210,"props":216,"children":218},{"style":217},"--shiki-default:#6A737D",[219],{"type":26,"value":220},"-- init.lua\n",{"type":21,"tag":210,"props":222,"children":224},{"class":212,"line":223},2,[225],{"type":21,"tag":210,"props":226,"children":228},{"emptyLinePlaceholder":227},true,[229],{"type":26,"value":230},"\n",{"type":21,"tag":210,"props":232,"children":234},{"class":212,"line":233},3,[235,241,247,252,258,263,269],{"type":21,"tag":210,"props":236,"children":238},{"style":237},"--shiki-default:#D73A49",[239],{"type":26,"value":240},"local",{"type":21,"tag":210,"props":242,"children":244},{"style":243},"--shiki-default:#24292E",[245],{"type":26,"value":246}," fennel ",{"type":21,"tag":210,"props":248,"children":249},{"style":237},[250],{"type":26,"value":251},"=",{"type":21,"tag":210,"props":253,"children":255},{"style":254},"--shiki-default:#005CC5",[256],{"type":26,"value":257}," require",{"type":21,"tag":210,"props":259,"children":260},{"style":243},[261],{"type":26,"value":262},"(",{"type":21,"tag":210,"props":264,"children":266},{"style":265},"--shiki-default:#032F62",[267],{"type":26,"value":268},"'fennel'",{"type":21,"tag":210,"props":270,"children":271},{"style":243},[272],{"type":26,"value":273},")\n",{"type":21,"tag":210,"props":275,"children":277},{"class":212,"line":276},4,[278],{"type":21,"tag":210,"props":279,"children":280},{"emptyLinePlaceholder":227},[281],{"type":26,"value":230},{"type":21,"tag":210,"props":283,"children":285},{"class":212,"line":284},5,[286,291,297,302,307,312,317,322,327,331,336,341,345],{"type":21,"tag":210,"props":287,"children":288},{"style":243},[289],{"type":26,"value":290},"fennel.",{"type":21,"tag":210,"props":292,"children":294},{"style":293},"--shiki-default:#6F42C1",[295],{"type":26,"value":296},"path",{"type":21,"tag":210,"props":298,"children":299},{"style":237},[300],{"type":26,"value":301}," =",{"type":21,"tag":210,"props":303,"children":304},{"style":254},[305],{"type":26,"value":306}," package.path",{"type":21,"tag":210,"props":308,"children":309},{"style":237},[310],{"type":26,"value":311}," ..",{"type":21,"tag":210,"props":313,"children":314},{"style":265},[315],{"type":26,"value":316}," \";\" ",{"type":21,"tag":210,"props":318,"children":319},{"style":237},[320],{"type":26,"value":321},"..",{"type":21,"tag":210,"props":323,"children":324},{"style":254},[325],{"type":26,"value":326}," os.getenv",{"type":21,"tag":210,"props":328,"children":329},{"style":243},[330],{"type":26,"value":262},{"type":21,"tag":210,"props":332,"children":333},{"style":265},[334],{"type":26,"value":335},"\"HOME\"",{"type":21,"tag":210,"props":337,"children":338},{"style":243},[339],{"type":26,"value":340},") ",{"type":21,"tag":210,"props":342,"children":343},{"style":237},[344],{"type":26,"value":321},{"type":21,"tag":210,"props":346,"children":347},{"style":265},[348],{"type":26,"value":349}," \"/.hammerspoon/?.fnl\"\n",{"type":21,"tag":210,"props":351,"children":353},{"class":212,"line":352},6,[354],{"type":21,"tag":210,"props":355,"children":356},{"emptyLinePlaceholder":227},[357],{"type":26,"value":230},{"type":21,"tag":210,"props":359,"children":361},{"class":212,"line":360},7,[362,367,371,376,381,386,391,396],{"type":21,"tag":210,"props":363,"children":364},{"style":254},[365],{"type":26,"value":366},"table.insert",{"type":21,"tag":210,"props":368,"children":369},{"style":243},[370],{"type":26,"value":262},{"type":21,"tag":210,"props":372,"children":373},{"style":254},[374],{"type":26,"value":375},"package.loaders",{"type":21,"tag":210,"props":377,"children":378},{"style":237},[379],{"type":26,"value":380}," or",{"type":21,"tag":210,"props":382,"children":383},{"style":254},[384],{"type":26,"value":385}," package.searchers",{"type":21,"tag":210,"props":387,"children":388},{"style":243},[389],{"type":26,"value":390},", fennel.",{"type":21,"tag":210,"props":392,"children":393},{"style":293},[394],{"type":26,"value":395},"searcher",{"type":21,"tag":210,"props":397,"children":398},{"style":243},[399],{"type":26,"value":273},{"type":21,"tag":210,"props":401,"children":403},{"class":212,"line":402},8,[404],{"type":21,"tag":210,"props":405,"children":406},{"emptyLinePlaceholder":227},[407],{"type":26,"value":230},{"type":21,"tag":210,"props":409,"children":411},{"class":212,"line":410},9,[412,417],{"type":21,"tag":210,"props":413,"children":414},{"style":254},[415],{"type":26,"value":416},"require",{"type":21,"tag":210,"props":418,"children":419},{"style":265},[420],{"type":26,"value":421}," 'main'\n",{"type":21,"tag":68,"props":423,"children":425},{"id":424},"translating-lua-to-fennel",[426],{"type":26,"value":427},"Translating Lua to Fennel",{"type":21,"tag":22,"props":429,"children":430},{},[431,433,440,442,448,450,456],{"type":26,"value":432},"As a Fennel novice, I was happy to see that the Fennel project provides an online\ncross-compiler for Lua and Fennel called ",{"type":21,"tag":39,"props":434,"children":437},{"href":435,"rel":436},"https://fennel-lang.org/see",[43],[438],{"type":26,"value":439},"anti-fennel",{"type":26,"value":441},", and while it can generate some\nstrange-looking Fennel code, it was an extremely useful tool for me to get\nup-and-running right away. For example, by pasting the simple ",{"type":21,"tag":109,"props":443,"children":445},{"className":444},[],[446],{"type":26,"value":447},"sleep",{"type":26,"value":449}," function\nfrom the ",{"type":21,"tag":109,"props":451,"children":453},{"className":452},[],[454],{"type":26,"value":455},"helpers",{"type":26,"value":457}," module into the compiler:",{"type":21,"tag":200,"props":459,"children":461},{"className":202,"code":460,"language":204,"meta":7,"style":7},"function sleep(ms)\n os.execute(\"sleep \" .. tonumber(ms) / 1000)\nend\n",[462],{"type":21,"tag":109,"props":463,"children":464},{"__ignoreMap":7},[465,483,528],{"type":21,"tag":210,"props":466,"children":467},{"class":212,"line":213},[468,473,478],{"type":21,"tag":210,"props":469,"children":470},{"style":237},[471],{"type":26,"value":472},"function",{"type":21,"tag":210,"props":474,"children":475},{"style":293},[476],{"type":26,"value":477}," sleep",{"type":21,"tag":210,"props":479,"children":480},{"style":243},[481],{"type":26,"value":482},"(ms)\n",{"type":21,"tag":210,"props":484,"children":485},{"class":212,"line":223},[486,491,495,500,504,509,514,519,524],{"type":21,"tag":210,"props":487,"children":488},{"style":254},[489],{"type":26,"value":490}," os.execute",{"type":21,"tag":210,"props":492,"children":493},{"style":243},[494],{"type":26,"value":262},{"type":21,"tag":210,"props":496,"children":497},{"style":265},[498],{"type":26,"value":499},"\"sleep \" ",{"type":21,"tag":210,"props":501,"children":502},{"style":237},[503],{"type":26,"value":321},{"type":21,"tag":210,"props":505,"children":506},{"style":254},[507],{"type":26,"value":508}," tonumber",{"type":21,"tag":210,"props":510,"children":511},{"style":243},[512],{"type":26,"value":513},"(ms) ",{"type":21,"tag":210,"props":515,"children":516},{"style":237},[517],{"type":26,"value":518},"/",{"type":21,"tag":210,"props":520,"children":521},{"style":254},[522],{"type":26,"value":523}," 1000",{"type":21,"tag":210,"props":525,"children":526},{"style":243},[527],{"type":26,"value":273},{"type":21,"tag":210,"props":529,"children":530},{"class":212,"line":233},[531],{"type":21,"tag":210,"props":532,"children":533},{"style":237},[534],{"type":26,"value":535},"end\n",{"type":21,"tag":200,"props":537,"children":540},{"className":538,"code":539,"language":12,"meta":7,"style":7},"language-lisp shiki shiki-themes github-light","(fn sleep [ms]\n (os.execute (.. \"sleep \" (/ (tonumber ms) 1000))))\n",[541],{"type":21,"tag":109,"props":542,"children":543},{"__ignoreMap":7},[544,561],{"type":21,"tag":210,"props":545,"children":546},{"class":212,"line":213},[547,552,556],{"type":21,"tag":210,"props":548,"children":549},{"style":243},[550],{"type":26,"value":551},"(fn ",{"type":21,"tag":210,"props":553,"children":554},{"style":254},[555],{"type":26,"value":447},{"type":21,"tag":210,"props":557,"children":558},{"style":243},[559],{"type":26,"value":560}," [ms]\n",{"type":21,"tag":210,"props":562,"children":563},{"class":212,"line":223},[564,569,574,579,583,588,593],{"type":21,"tag":210,"props":565,"children":566},{"style":243},[567],{"type":26,"value":568}," (os.execute (.. ",{"type":21,"tag":210,"props":570,"children":571},{"style":265},[572],{"type":26,"value":573},"\"sleep \"",{"type":21,"tag":210,"props":575,"children":576},{"style":243},[577],{"type":26,"value":578}," (",{"type":21,"tag":210,"props":580,"children":581},{"style":254},[582],{"type":26,"value":518},{"type":21,"tag":210,"props":584,"children":585},{"style":243},[586],{"type":26,"value":587}," (tonumber ms) ",{"type":21,"tag":210,"props":589,"children":590},{"style":254},[591],{"type":26,"value":592},"1000",{"type":21,"tag":210,"props":594,"children":595},{"style":243},[596],{"type":26,"value":597},"))))\n",{"type":21,"tag":22,"props":599,"children":600},{},[601,603,609],{"type":26,"value":602},"As another example, here is the output for my ",{"type":21,"tag":604,"props":605,"children":606},"em",{},[607],{"type":26,"value":608},"caffeine",{"type":26,"value":610}," toggle:",{"type":21,"tag":200,"props":612,"children":614},{"className":202,"code":613,"language":204,"meta":7,"style":7},"hs.hotkey.bind(HYPER, \"0\", function()\n hs.caffeinate.toggle(\"displayIdle\")\n if hs.caffeinate.get(\"displayIdle\") then\n helpers:show(\"Caffeine Enabled\", nil, helpers.styles.success, helpers.assets.check)\n else\n helpers:show(\"Caffeine Disabled\", nil, helpers.styles.error, helpers.assets.ban)\n end\nend)\n",[615],{"type":21,"tag":109,"props":616,"children":617},{"__ignoreMap":7},[618,664,699,742,819,827,897,905],{"type":21,"tag":210,"props":619,"children":620},{"class":212,"line":213},[621,626,631,635,640,645,650,655,659],{"type":21,"tag":210,"props":622,"children":623},{"style":243},[624],{"type":26,"value":625},"hs.",{"type":21,"tag":210,"props":627,"children":628},{"style":293},[629],{"type":26,"value":630},"hotkey",{"type":21,"tag":210,"props":632,"children":633},{"style":243},[634],{"type":26,"value":66},{"type":21,"tag":210,"props":636,"children":637},{"style":254},[638],{"type":26,"value":639},"bind",{"type":21,"tag":210,"props":641,"children":642},{"style":243},[643],{"type":26,"value":644},"(HYPER, ",{"type":21,"tag":210,"props":646,"children":647},{"style":265},[648],{"type":26,"value":649},"\"0\"",{"type":21,"tag":210,"props":651,"children":652},{"style":243},[653],{"type":26,"value":654},", ",{"type":21,"tag":210,"props":656,"children":657},{"style":237},[658],{"type":26,"value":472},{"type":21,"tag":210,"props":660,"children":661},{"style":243},[662],{"type":26,"value":663},"()\n",{"type":21,"tag":210,"props":665,"children":666},{"class":212,"line":223},[667,672,677,681,686,690,695],{"type":21,"tag":210,"props":668,"children":669},{"style":243},[670],{"type":26,"value":671}," hs.",{"type":21,"tag":210,"props":673,"children":674},{"style":293},[675],{"type":26,"value":676},"caffeinate",{"type":21,"tag":210,"props":678,"children":679},{"style":243},[680],{"type":26,"value":66},{"type":21,"tag":210,"props":682,"children":683},{"style":254},[684],{"type":26,"value":685},"toggle",{"type":21,"tag":210,"props":687,"children":688},{"style":243},[689],{"type":26,"value":262},{"type":21,"tag":210,"props":691,"children":692},{"style":265},[693],{"type":26,"value":694},"\"displayIdle\"",{"type":21,"tag":210,"props":696,"children":697},{"style":243},[698],{"type":26,"value":273},{"type":21,"tag":210,"props":700,"children":701},{"class":212,"line":233},[702,707,712,716,720,725,729,733,737],{"type":21,"tag":210,"props":703,"children":704},{"style":237},[705],{"type":26,"value":706}," if",{"type":21,"tag":210,"props":708,"children":709},{"style":243},[710],{"type":26,"value":711}," hs.",{"type":21,"tag":210,"props":713,"children":714},{"style":293},[715],{"type":26,"value":676},{"type":21,"tag":210,"props":717,"children":718},{"style":243},[719],{"type":26,"value":66},{"type":21,"tag":210,"props":721,"children":722},{"style":254},[723],{"type":26,"value":724},"get",{"type":21,"tag":210,"props":726,"children":727},{"style":243},[728],{"type":26,"value":262},{"type":21,"tag":210,"props":730,"children":731},{"style":265},[732],{"type":26,"value":694},{"type":21,"tag":210,"props":734,"children":735},{"style":243},[736],{"type":26,"value":340},{"type":21,"tag":210,"props":738,"children":739},{"style":237},[740],{"type":26,"value":741},"then\n",{"type":21,"tag":210,"props":743,"children":744},{"class":212,"line":276},[745,750,755,760,764,769,773,778,783,788,792,797,801,806,810,815],{"type":21,"tag":210,"props":746,"children":747},{"style":293},[748],{"type":26,"value":749}," helpers",{"type":21,"tag":210,"props":751,"children":752},{"style":243},[753],{"type":26,"value":754},":",{"type":21,"tag":210,"props":756,"children":757},{"style":254},[758],{"type":26,"value":759},"show",{"type":21,"tag":210,"props":761,"children":762},{"style":243},[763],{"type":26,"value":262},{"type":21,"tag":210,"props":765,"children":766},{"style":265},[767],{"type":26,"value":768},"\"Caffeine Enabled\"",{"type":21,"tag":210,"props":770,"children":771},{"style":243},[772],{"type":26,"value":654},{"type":21,"tag":210,"props":774,"children":775},{"style":254},[776],{"type":26,"value":777},"nil",{"type":21,"tag":210,"props":779,"children":780},{"style":243},[781],{"type":26,"value":782},", helpers.",{"type":21,"tag":210,"props":784,"children":785},{"style":293},[786],{"type":26,"value":787},"styles",{"type":21,"tag":210,"props":789,"children":790},{"style":243},[791],{"type":26,"value":66},{"type":21,"tag":210,"props":793,"children":794},{"style":293},[795],{"type":26,"value":796},"success",{"type":21,"tag":210,"props":798,"children":799},{"style":243},[800],{"type":26,"value":782},{"type":21,"tag":210,"props":802,"children":803},{"style":293},[804],{"type":26,"value":805},"assets",{"type":21,"tag":210,"props":807,"children":808},{"style":243},[809],{"type":26,"value":66},{"type":21,"tag":210,"props":811,"children":812},{"style":293},[813],{"type":26,"value":814},"check",{"type":21,"tag":210,"props":816,"children":817},{"style":243},[818],{"type":26,"value":273},{"type":21,"tag":210,"props":820,"children":821},{"class":212,"line":284},[822],{"type":21,"tag":210,"props":823,"children":824},{"style":237},[825],{"type":26,"value":826}," else\n",{"type":21,"tag":210,"props":828,"children":829},{"class":212,"line":352},[830,834,838,842,846,851,855,859,863,867,871,876,880,884,888,893],{"type":21,"tag":210,"props":831,"children":832},{"style":293},[833],{"type":26,"value":749},{"type":21,"tag":210,"props":835,"children":836},{"style":243},[837],{"type":26,"value":754},{"type":21,"tag":210,"props":839,"children":840},{"style":254},[841],{"type":26,"value":759},{"type":21,"tag":210,"props":843,"children":844},{"style":243},[845],{"type":26,"value":262},{"type":21,"tag":210,"props":847,"children":848},{"style":265},[849],{"type":26,"value":850},"\"Caffeine Disabled\"",{"type":21,"tag":210,"props":852,"children":853},{"style":243},[854],{"type":26,"value":654},{"type":21,"tag":210,"props":856,"children":857},{"style":254},[858],{"type":26,"value":777},{"type":21,"tag":210,"props":860,"children":861},{"style":243},[862],{"type":26,"value":782},{"type":21,"tag":210,"props":864,"children":865},{"style":293},[866],{"type":26,"value":787},{"type":21,"tag":210,"props":868,"children":869},{"style":243},[870],{"type":26,"value":66},{"type":21,"tag":210,"props":872,"children":873},{"style":293},[874],{"type":26,"value":875},"error",{"type":21,"tag":210,"props":877,"children":878},{"style":243},[879],{"type":26,"value":782},{"type":21,"tag":210,"props":881,"children":882},{"style":293},[883],{"type":26,"value":805},{"type":21,"tag":210,"props":885,"children":886},{"style":243},[887],{"type":26,"value":66},{"type":21,"tag":210,"props":889,"children":890},{"style":293},[891],{"type":26,"value":892},"ban",{"type":21,"tag":210,"props":894,"children":895},{"style":243},[896],{"type":26,"value":273},{"type":21,"tag":210,"props":898,"children":899},{"class":212,"line":360},[900],{"type":21,"tag":210,"props":901,"children":902},{"style":237},[903],{"type":26,"value":904}," end\n",{"type":21,"tag":210,"props":906,"children":907},{"class":212,"line":402},[908,913],{"type":21,"tag":210,"props":909,"children":910},{"style":237},[911],{"type":26,"value":912},"end",{"type":21,"tag":210,"props":914,"children":915},{"style":243},[916],{"type":26,"value":273},{"type":21,"tag":200,"props":918,"children":920},{"className":538,"code":919,"language":12,"meta":7,"style":7},"(hs.hotkey.bind HYPER :0\n (fn [] (hs.caffeinate.toggle :displayIdle)\n (if (hs.caffeinate.get :displayIdle)\n (helpers:show \"Caffeine Enabled\" nil helpers.styles.success helpers.assets.check)\n (helpers:show \"Caffeine Disabled\" nil helpers.styles.error helpers.assets.ban)))) \n",[921],{"type":21,"tag":109,"props":922,"children":923},{"__ignoreMap":7},[924,937,954,980,1011],{"type":21,"tag":210,"props":925,"children":926},{"class":212,"line":213},[927,932],{"type":21,"tag":210,"props":928,"children":929},{"style":243},[930],{"type":26,"value":931},"(hs.hotkey.bind HYPER ",{"type":21,"tag":210,"props":933,"children":934},{"style":293},[935],{"type":26,"value":936},":0\n",{"type":21,"tag":210,"props":938,"children":939},{"class":212,"line":223},[940,945,950],{"type":21,"tag":210,"props":941,"children":942},{"style":243},[943],{"type":26,"value":944}," (fn [] (hs.caffeinate.toggle ",{"type":21,"tag":210,"props":946,"children":947},{"style":293},[948],{"type":26,"value":949},":displayIdle",{"type":21,"tag":210,"props":951,"children":952},{"style":243},[953],{"type":26,"value":273},{"type":21,"tag":210,"props":955,"children":956},{"class":212,"line":233},[957,962,967,972,976],{"type":21,"tag":210,"props":958,"children":959},{"style":243},[960],{"type":26,"value":961}," (",{"type":21,"tag":210,"props":963,"children":964},{"style":237},[965],{"type":26,"value":966},"if",{"type":21,"tag":210,"props":968,"children":969},{"style":243},[970],{"type":26,"value":971}," (hs.caffeinate.get ",{"type":21,"tag":210,"props":973,"children":974},{"style":293},[975],{"type":26,"value":949},{"type":21,"tag":210,"props":977,"children":978},{"style":243},[979],{"type":26,"value":273},{"type":21,"tag":210,"props":981,"children":982},{"class":212,"line":276},[983,988,992,997,1001,1006],{"type":21,"tag":210,"props":984,"children":985},{"style":243},[986],{"type":26,"value":987}," (",{"type":21,"tag":210,"props":989,"children":990},{"style":254},[991],{"type":26,"value":455},{"type":21,"tag":210,"props":993,"children":994},{"style":243},[995],{"type":26,"value":996},":show ",{"type":21,"tag":210,"props":998,"children":999},{"style":265},[1000],{"type":26,"value":768},{"type":21,"tag":210,"props":1002,"children":1003},{"style":254},[1004],{"type":26,"value":1005}," nil",{"type":21,"tag":210,"props":1007,"children":1008},{"style":243},[1009],{"type":26,"value":1010}," helpers.styles.success helpers.assets.check)\n",{"type":21,"tag":210,"props":1012,"children":1013},{"class":212,"line":284},[1014,1018,1022,1026,1030,1034],{"type":21,"tag":210,"props":1015,"children":1016},{"style":243},[1017],{"type":26,"value":987},{"type":21,"tag":210,"props":1019,"children":1020},{"style":254},[1021],{"type":26,"value":455},{"type":21,"tag":210,"props":1023,"children":1024},{"style":243},[1025],{"type":26,"value":996},{"type":21,"tag":210,"props":1027,"children":1028},{"style":265},[1029],{"type":26,"value":850},{"type":21,"tag":210,"props":1031,"children":1032},{"style":254},[1033],{"type":26,"value":1005},{"type":21,"tag":210,"props":1035,"children":1036},{"style":243},[1037],{"type":26,"value":1038}," helpers.styles.error helpers.assets.ban))))\n",{"type":21,"tag":22,"props":1040,"children":1041},{},[1042,1044,1050],{"type":26,"value":1043},"This was especially helpful for more gnarly modules like the ",{"type":21,"tag":109,"props":1045,"children":1047},{"className":1046},[],[1048],{"type":26,"value":1049},"window",{"type":26,"value":1051}," module used for\nwindow management, and seeing the Lua and Fennel code side-by-side was a kick starter in\nlearning the language!",{"type":21,"tag":68,"props":1053,"children":1055},{"id":1054},"next-steps",[1056],{"type":26,"value":1057},"Next Steps",{"type":21,"tag":22,"props":1059,"children":1060},{},[1061],{"type":26,"value":1062},"While my Fennel Hammerspoon configuration now works with parity to its Lua counterpart,\nI have not yet added new features or modules. I look forward to writing new Fennel code,\nand deepen my understanding of Lisp and the Fennel programming language.",{"type":21,"tag":22,"props":1064,"children":1065},{},[1066,1068,1075],{"type":26,"value":1067},"Additionally, before beginning this endeavor, I was already aware of projects like\n",{"type":21,"tag":39,"props":1069,"children":1072},{"href":1070,"rel":1071},"https://github.com/agzam/spacehammer",[43],[1073],{"type":26,"value":1074},"spacehammer",{"type":26,"value":1076},"; a wildly impressive Hammerspoon configuration written in Fennel, but,\nI wanted to start small and learn the integration myself. However, with the basics out\nof the way, I hope to explore this project further, and seek lessons-learned for the\nconfiguration of my own.",{"type":21,"tag":22,"props":1078,"children":1079},{},[1080,1082],{"type":26,"value":1081},"The full pull-request for translating my Lua Hammerspoon configuration to Fennel can be\nfound here: ",{"type":21,"tag":39,"props":1083,"children":1086},{"href":1084,"rel":1085},"https://github.com/cmpadden/dotfiles/pull/19/files",[43],[1087],{"type":26,"value":1084},{"type":21,"tag":1089,"props":1090,"children":1091},"style",{},[1092],{"type":26,"value":1093},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}",{"title":7,"searchDepth":223,"depth":223,"links":1095},[1096,1097,1098,1099],{"id":70,"depth":223,"text":73},{"id":90,"depth":223,"text":93},{"id":424,"depth":223,"text":427},{"id":1054,"depth":223,"text":1057},"markdown","content:articles:fennel-initial-exploration.md","content","articles/fennel-initial-exploration.md","articles/fennel-initial-exploration","md",1735327945013] \ No newline at end of file diff --git a/articles/fennel-initial-exploration/index.html b/articles/fennel-initial-exploration/index.html index 5a5c2280..7d65d78b 100644 --- a/articles/fennel-initial-exploration/index.html +++ b/articles/fennel-initial-exploration/index.html @@ -1,40 +1,40 @@ Colton Padden - + - - - - - + + + + + - + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - -

            Impressions of Fennel with Hammerspoon

            A while back I read an introductory book on Lisp programming titled, "The Little + +

            Impressions of Fennel with Hammerspoon

            A while back I read an introductory book on Lisp programming titled, "The Little Schemer". This book opened my mind to new (to me) programming paradigms, and left me with a strong desire to find a way to incorporate Lisp programming into my every day life. It took some time, but I believe I've found what I've been looking for: Fennel.

            The Fennel programming language is a dialect of Lisp that boasts compatibility with @@ -92,5 +92,5 @@ I wanted to start small and learn the integration myself. However, with the basics out of the way, I hope to explore this project further, and seek lessons-learned for the configuration of my own.

            The full pull-request for translating my Lua Hammerspoon configuration to Fennel can be -found here: https://github.com/cmpadden/dotfiles/pull/19/files

            - \ No newline at end of file +found here: https://github.com/cmpadden/dotfiles/pull/19/files

            + \ No newline at end of file diff --git a/articles/index.html b/articles/index.html index e2a2a68f..2bc77856 100644 --- a/articles/index.html +++ b/articles/index.html @@ -1,31 +1,31 @@ Colton Padden - - - - - - + + + + + + - + - - - - - - - - - - + + + + + + + + + + - -

            Blog

            2024-06-09
            Configuring a YubiKey for use with OpenSSH

            YubiKey's are a convenient way to introduce a physical form of two factor authentication into ones workflow. They support a variety of protocols, but in this guide we will walk through how to configure a YubiKey for use with OpenSSH via the "new" ed25519-sk key type that supports FIDO compliant hardware keys.

            2024-05-11
            Using pinentry-mac to sign commits from vim-fugitive

            In order to sign git commits from within Vim using a plugin like tpope/vim-fugitive, it is necessary to configure the gpg-agent to use a GUI based pinentry-program.

            2024-01-08
            Easily Transcribe Podcasts with Whisper.cpp

            If you've ever had the need to transcribe a podcast, lecture, or some other audio recording, it turns out it's surprisingly easy with the extremely impressive whisper.cpp project. This high-performance fork of OpenAI's Whisper can run on all sorts of hardware -- including my M1 Mac Mini. Let's walk through an example from start-to-finish of transcribing an episode of the Alter Everything podcast.

            2024-01-06
            How To Add an RSS Feed to a Nuxt Website

            If you are a user of Nuxt Content and you wish to configure an RSS feed for your website, it's a surprisingly straight forward process! In this article, we will walk through the code changes required to host an RSS feed for both a statically generated, and Universal Nuxt application.

            2023-10-22
            Impressions of Fennel with Hammerspoon

            A while back I read an introductory book on Lisp programming titled, "The Little + +

            Blog

            2024-06-09
            Configuring a YubiKey for use with OpenSSH

            YubiKey's are a convenient way to introduce a physical form of two factor authentication into ones workflow. They support a variety of protocols, but in this guide we will walk through how to configure a YubiKey for use with OpenSSH via the "new" ed25519-sk key type that supports FIDO compliant hardware keys.

            2024-05-11
            Using pinentry-mac to sign commits from vim-fugitive

            In order to sign git commits from within Vim using a plugin like tpope/vim-fugitive, it is necessary to configure the gpg-agent to use a GUI based pinentry-program.

            2024-01-08
            Easily Transcribe Podcasts with Whisper.cpp

            If you've ever had the need to transcribe a podcast, lecture, or some other audio recording, it turns out it's surprisingly easy with the extremely impressive whisper.cpp project. This high-performance fork of OpenAI's Whisper can run on all sorts of hardware -- including my M1 Mac Mini. Let's walk through an example from start-to-finish of transcribing an episode of the Alter Everything podcast.

            2024-01-06
            How To Add an RSS Feed to a Nuxt Website

            If you are a user of Nuxt Content and you wish to configure an RSS feed for your website, it's a surprisingly straight forward process! In this article, we will walk through the code changes required to host an RSS feed for both a statically generated, and Universal Nuxt application.

            2023-10-22
            Impressions of Fennel with Hammerspoon

            A while back I read an introductory book on Lisp programming titled, "The Little Schemer". This book opened my mind to new (to me) programming paradigms, and left me with a strong desire to find a way to incorporate Lisp programming into my every day life. It took some time, but I believe I've found what I've been looking for: Fennel.

            2023-01-01
            Exploring the Digital Ocean `doctl` Utility

            I recently had the need to spool up a small ephemeral Linux instance, and wanted to try something new by exploring the Digital Ocean doctl command line utility. @@ -46,5 +46,5 @@ few years, and have recently decided to dust it off.

            Since the last time the device has been powered on, there have been many great improvements to the firmware, and it was very-much due for an upgrade. The following steps outline how the firmware was upgraded on the APU from the -already-installed operating system -- CentOS.

            Categories

            embedded
            homelab
            linux
            lisp
            programming
            python
            tips
            tooling
            web

            Tags

            apu
            archlinux
            bash
            configurations
            digital-ocean
            docker
            fennel
            hammerspoon
            homelab
            linux
            lisp
            micropython
            ml
            mocks
            nuxt
            pcengine
            rss
            selinux
            supermicro
            testing
            tip
            truenas
            tutorial
            unix
            vagrant
            vim
            whisper.cpp
            - \ No newline at end of file +already-installed operating system -- CentOS.

            Categories

            embedded
            homelab
            linux
            lisp
            programming
            python
            tips
            tooling
            web

            Tags

            apu
            archlinux
            bash
            configurations
            digital-ocean
            docker
            fennel
            hammerspoon
            homelab
            linux
            lisp
            micropython
            ml
            mocks
            nuxt
            pcengine
            rss
            selinux
            supermicro
            testing
            tip
            truenas
            tutorial
            unix
            vagrant
            vim
            whisper.cpp
            + \ No newline at end of file diff --git a/articles/migrate-truenas-from-core-to-scale/_payload.json b/articles/migrate-truenas-from-core-to-scale/_payload.json index 249344ea..82ace694 100644 --- a/articles/migrate-truenas-from-core-to-scale/_payload.json +++ b/articles/migrate-truenas-from-core-to-scale/_payload.json @@ -1 +1 @@ -[{"data":1,"prerenderedAt":205},["ShallowReactive",2],{"page-data":3},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"date":10,"tags":11,"categories":15,"excerpt":16,"body":26,"_type":199,"_id":200,"_source":201,"_file":202,"_stem":203,"_extension":204},"/articles/migrate-truenas-from-core-to-scale","articles",false,"","Migrate to TrueNAS Scale from TrueNAS Core","TrueNAS Scale offers a variety of interesting features that are not supported in its TrueNAS Core counterpart. Most notably, because the base operating system is Debian Linux, opposed to FreeBSD, there is native support for Linux containers via Docker, and Kubernetes Pods! This post walks through the steps required to upgrade from TrueNAS Core to TrueNAS Scale.","2021-12-28",[12,13,14],"homelab","supermicro","truenas",[12],{"type":17,"children":18},"root",[19],{"type":20,"tag":21,"props":22,"children":23},"element","p",{},[24],{"type":25,"value":9},"text",{"type":17,"children":27,"toc":196},[28,32,45,175,180],{"type":20,"tag":21,"props":29,"children":30},{},[31],{"type":25,"value":9},{"type":20,"tag":21,"props":33,"children":34},{},[35,37,43],{"type":25,"value":36},"Thankfully, the upgrade procedure to migrate from TrueNAS Core to TrueNAS Scale is relatively straight forward. All it requires is to create a bootable USB of the TrueNAS Scale image, boot the USB, and select ",{"type":20,"tag":38,"props":39,"children":40},"em",{},[41],{"type":25,"value":42},"Install/Upgrade",{"type":25,"value":44}," in the installation wizard. But for the sake of being thorough, you can find instructions on how to backup system configurations and install the OS below.",{"type":20,"tag":46,"props":47,"children":48},"ol",{},[49,96,125,130,154,159],{"type":20,"tag":50,"props":51,"children":52},"li",{},[53,55],{"type":25,"value":54},"Make a backup of your system’s configuration\n",{"type":20,"tag":46,"props":56,"children":57},{},[58,70],{"type":20,"tag":50,"props":59,"children":60},{},[61,63],{"type":25,"value":62},"Navigate to ",{"type":20,"tag":64,"props":65,"children":67},"code",{"className":66},[],[68],{"type":25,"value":69},"System > General",{"type":20,"tag":50,"props":71,"children":72},{},[73,75,81,83,88,90],{"type":25,"value":74},"Click ",{"type":20,"tag":64,"props":76,"children":78},{"className":77},[],[79],{"type":25,"value":80},"Save Config",{"type":25,"value":82},", check the ",{"type":20,"tag":38,"props":84,"children":85},{},[86],{"type":25,"value":87},"Export Secret Seed",{"type":25,"value":89}," box, and click ",{"type":20,"tag":64,"props":91,"children":93},{"className":92},[],[94],{"type":25,"value":95},"Save",{"type":20,"tag":50,"props":97,"children":98},{},[99,101],{"type":25,"value":100},"Export dataset keys for the encrypted pools\n",{"type":20,"tag":46,"props":102,"children":103},{},[104,114],{"type":20,"tag":50,"props":105,"children":106},{},[107,108],{"type":25,"value":62},{"type":20,"tag":64,"props":109,"children":111},{"className":110},[],[112],{"type":25,"value":113},"Storage > Pools",{"type":20,"tag":50,"props":115,"children":116},{},[117,119],{"type":25,"value":118},"Click the cog icon, and select ",{"type":20,"tag":64,"props":120,"children":122},{"className":121},[],[123],{"type":25,"value":124},"Export Dataset Keys",{"type":20,"tag":50,"props":126,"children":127},{},[128],{"type":25,"value":129},"Insert the TrueNAS Core bootable USB into the NAS",{"type":20,"tag":50,"props":131,"children":132},{},[133,135,140,142,147,149],{"type":25,"value":134},"From the Supermicro IPMI interface select ",{"type":20,"tag":38,"props":136,"children":137},{},[138],{"type":25,"value":139},"Remote Control",{"type":25,"value":141}," and ",{"type":20,"tag":38,"props":143,"children":144},{},[145],{"type":25,"value":146},"iKVM/HTML5",{"type":25,"value":148}," and select ",{"type":20,"tag":38,"props":150,"children":151},{},[152],{"type":25,"value":153},"Reboot",{"type":20,"tag":50,"props":155,"children":156},{},[157],{"type":25,"value":158},"Select the bootable USB as the boot device",{"type":20,"tag":50,"props":160,"children":161},{},[162,164,168,170],{"type":25,"value":163},"From the TrueNAS installation wizard, select ",{"type":20,"tag":38,"props":165,"children":166},{},[167],{"type":25,"value":42},{"type":25,"value":169},", select the drive that contains the TrueNAS installation, and select ",{"type":20,"tag":38,"props":171,"children":172},{},[173],{"type":25,"value":174},"Upgrade Install",{"type":20,"tag":21,"props":176,"children":177},{},[178],{"type":25,"value":179},"Reboot the device, and voila — you should be up-and-running! Give the system a quick rundown to validate that your settings and pools have transferred correctly, and then enjoy all the container goodness!",{"type":20,"tag":21,"props":181,"children":182},{},[183,185,194],{"type":25,"value":184},"For a breakdown of the differences between TrueNAS Core, Enterprise, and Scale, you can reference ",{"type":20,"tag":186,"props":187,"children":191},"a",{"href":188,"rel":189},"https://www.truenas.com/help-me-choose/",[190],"nofollow",[192],{"type":25,"value":193},"this table",{"type":25,"value":195},".",{"title":7,"searchDepth":197,"depth":197,"links":198},2,[],"markdown","content:articles:migrate-truenas-from-core-to-scale.md","content","articles/migrate-truenas-from-core-to-scale.md","articles/migrate-truenas-from-core-to-scale","md",1735276485216] \ No newline at end of file +[{"data":1,"prerenderedAt":205},["ShallowReactive",2],{"page-data":3},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"date":10,"tags":11,"categories":15,"excerpt":16,"body":26,"_type":199,"_id":200,"_source":201,"_file":202,"_stem":203,"_extension":204},"/articles/migrate-truenas-from-core-to-scale","articles",false,"","Migrate to TrueNAS Scale from TrueNAS Core","TrueNAS Scale offers a variety of interesting features that are not supported in its TrueNAS Core counterpart. Most notably, because the base operating system is Debian Linux, opposed to FreeBSD, there is native support for Linux containers via Docker, and Kubernetes Pods! This post walks through the steps required to upgrade from TrueNAS Core to TrueNAS Scale.","2021-12-28",[12,13,14],"homelab","supermicro","truenas",[12],{"type":17,"children":18},"root",[19],{"type":20,"tag":21,"props":22,"children":23},"element","p",{},[24],{"type":25,"value":9},"text",{"type":17,"children":27,"toc":196},[28,32,45,175,180],{"type":20,"tag":21,"props":29,"children":30},{},[31],{"type":25,"value":9},{"type":20,"tag":21,"props":33,"children":34},{},[35,37,43],{"type":25,"value":36},"Thankfully, the upgrade procedure to migrate from TrueNAS Core to TrueNAS Scale is relatively straight forward. All it requires is to create a bootable USB of the TrueNAS Scale image, boot the USB, and select ",{"type":20,"tag":38,"props":39,"children":40},"em",{},[41],{"type":25,"value":42},"Install/Upgrade",{"type":25,"value":44}," in the installation wizard. But for the sake of being thorough, you can find instructions on how to backup system configurations and install the OS below.",{"type":20,"tag":46,"props":47,"children":48},"ol",{},[49,96,125,130,154,159],{"type":20,"tag":50,"props":51,"children":52},"li",{},[53,55],{"type":25,"value":54},"Make a backup of your system’s configuration\n",{"type":20,"tag":46,"props":56,"children":57},{},[58,70],{"type":20,"tag":50,"props":59,"children":60},{},[61,63],{"type":25,"value":62},"Navigate to ",{"type":20,"tag":64,"props":65,"children":67},"code",{"className":66},[],[68],{"type":25,"value":69},"System > General",{"type":20,"tag":50,"props":71,"children":72},{},[73,75,81,83,88,90],{"type":25,"value":74},"Click ",{"type":20,"tag":64,"props":76,"children":78},{"className":77},[],[79],{"type":25,"value":80},"Save Config",{"type":25,"value":82},", check the ",{"type":20,"tag":38,"props":84,"children":85},{},[86],{"type":25,"value":87},"Export Secret Seed",{"type":25,"value":89}," box, and click ",{"type":20,"tag":64,"props":91,"children":93},{"className":92},[],[94],{"type":25,"value":95},"Save",{"type":20,"tag":50,"props":97,"children":98},{},[99,101],{"type":25,"value":100},"Export dataset keys for the encrypted pools\n",{"type":20,"tag":46,"props":102,"children":103},{},[104,114],{"type":20,"tag":50,"props":105,"children":106},{},[107,108],{"type":25,"value":62},{"type":20,"tag":64,"props":109,"children":111},{"className":110},[],[112],{"type":25,"value":113},"Storage > Pools",{"type":20,"tag":50,"props":115,"children":116},{},[117,119],{"type":25,"value":118},"Click the cog icon, and select ",{"type":20,"tag":64,"props":120,"children":122},{"className":121},[],[123],{"type":25,"value":124},"Export Dataset Keys",{"type":20,"tag":50,"props":126,"children":127},{},[128],{"type":25,"value":129},"Insert the TrueNAS Core bootable USB into the NAS",{"type":20,"tag":50,"props":131,"children":132},{},[133,135,140,142,147,149],{"type":25,"value":134},"From the Supermicro IPMI interface select ",{"type":20,"tag":38,"props":136,"children":137},{},[138],{"type":25,"value":139},"Remote Control",{"type":25,"value":141}," and ",{"type":20,"tag":38,"props":143,"children":144},{},[145],{"type":25,"value":146},"iKVM/HTML5",{"type":25,"value":148}," and select ",{"type":20,"tag":38,"props":150,"children":151},{},[152],{"type":25,"value":153},"Reboot",{"type":20,"tag":50,"props":155,"children":156},{},[157],{"type":25,"value":158},"Select the bootable USB as the boot device",{"type":20,"tag":50,"props":160,"children":161},{},[162,164,168,170],{"type":25,"value":163},"From the TrueNAS installation wizard, select ",{"type":20,"tag":38,"props":165,"children":166},{},[167],{"type":25,"value":42},{"type":25,"value":169},", select the drive that contains the TrueNAS installation, and select ",{"type":20,"tag":38,"props":171,"children":172},{},[173],{"type":25,"value":174},"Upgrade Install",{"type":20,"tag":21,"props":176,"children":177},{},[178],{"type":25,"value":179},"Reboot the device, and voila — you should be up-and-running! Give the system a quick rundown to validate that your settings and pools have transferred correctly, and then enjoy all the container goodness!",{"type":20,"tag":21,"props":181,"children":182},{},[183,185,194],{"type":25,"value":184},"For a breakdown of the differences between TrueNAS Core, Enterprise, and Scale, you can reference ",{"type":20,"tag":186,"props":187,"children":191},"a",{"href":188,"rel":189},"https://www.truenas.com/help-me-choose/",[190],"nofollow",[192],{"type":25,"value":193},"this table",{"type":25,"value":195},".",{"title":7,"searchDepth":197,"depth":197,"links":198},2,[],"markdown","content:articles:migrate-truenas-from-core-to-scale.md","content","articles/migrate-truenas-from-core-to-scale.md","articles/migrate-truenas-from-core-to-scale","md",1735327945029] \ No newline at end of file diff --git a/articles/migrate-truenas-from-core-to-scale/index.html b/articles/migrate-truenas-from-core-to-scale/index.html index f1c965be..bdf832d5 100644 --- a/articles/migrate-truenas-from-core-to-scale/index.html +++ b/articles/migrate-truenas-from-core-to-scale/index.html @@ -1,34 +1,34 @@ Colton Padden - + - - - - - + + + + + - + - - - - - - - - - - - - + + + + + + + + + + + + - -

            Migrate to TrueNAS Scale from TrueNAS Core

            TrueNAS Scale offers a variety of interesting features that are not supported in its TrueNAS Core counterpart. Most notably, because the base operating system is Debian Linux, opposed to FreeBSD, there is native support for Linux containers via Docker, and Kubernetes Pods! This post walks through the steps required to upgrade from TrueNAS Core to TrueNAS Scale.

            Thankfully, the upgrade procedure to migrate from TrueNAS Core to TrueNAS Scale is relatively straight forward. All it requires is to create a bootable USB of the TrueNAS Scale image, boot the USB, and select Install/Upgrade in the installation wizard. But for the sake of being thorough, you can find instructions on how to backup system configurations and install the OS below.

            1. Make a backup of your system’s configuration + +

              Migrate to TrueNAS Scale from TrueNAS Core

              TrueNAS Scale offers a variety of interesting features that are not supported in its TrueNAS Core counterpart. Most notably, because the base operating system is Debian Linux, opposed to FreeBSD, there is native support for Linux containers via Docker, and Kubernetes Pods! This post walks through the steps required to upgrade from TrueNAS Core to TrueNAS Scale.

              Thankfully, the upgrade procedure to migrate from TrueNAS Core to TrueNAS Scale is relatively straight forward. All it requires is to create a bootable USB of the TrueNAS Scale image, boot the USB, and select Install/Upgrade in the installation wizard. But for the sake of being thorough, you can find instructions on how to backup system configurations and install the OS below.

              1. Make a backup of your system’s configuration
                1. Navigate to System > General
                2. Click Save Config, check the Export Secret Seed box, and click Save
              2. Export dataset keys for the encrypted pools -
                1. Navigate to Storage > Pools
                2. Click the cog icon, and select Export Dataset Keys
              3. Insert the TrueNAS Core bootable USB into the NAS
              4. From the Supermicro IPMI interface select Remote Control and iKVM/HTML5 and select Reboot
              5. Select the bootable USB as the boot device
              6. From the TrueNAS installation wizard, select Install/Upgrade, select the drive that contains the TrueNAS installation, and select Upgrade Install

              Reboot the device, and voila — you should be up-and-running! Give the system a quick rundown to validate that your settings and pools have transferred correctly, and then enjoy all the container goodness!

              For a breakdown of the differences between TrueNAS Core, Enterprise, and Scale, you can reference this table.

              - \ No newline at end of file +
              1. Navigate to Storage > Pools
              2. Click the cog icon, and select Export Dataset Keys
            2. Insert the TrueNAS Core bootable USB into the NAS
            3. From the Supermicro IPMI interface select Remote Control and iKVM/HTML5 and select Reboot
            4. Select the bootable USB as the boot device
            5. From the TrueNAS installation wizard, select Install/Upgrade, select the drive that contains the TrueNAS installation, and select Upgrade Install

            Reboot the device, and voila — you should be up-and-running! Give the system a quick rundown to validate that your settings and pools have transferred correctly, and then enjoy all the container goodness!

            For a breakdown of the differences between TrueNAS Core, Enterprise, and Scale, you can reference this table.

            + \ No newline at end of file diff --git a/articles/nuxt-content-rss-feed/_payload.json b/articles/nuxt-content-rss-feed/_payload.json index a540cdf2..f8d05103 100644 --- a/articles/nuxt-content-rss-feed/_payload.json +++ b/articles/nuxt-content-rss-feed/_payload.json @@ -1 +1 @@ -[{"data":1,"prerenderedAt":1792},["ShallowReactive",2],{"page-data":3},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"draft":6,"date":10,"tags":11,"categories":14,"cover_image":16,"excerpt":17,"body":39,"_type":1786,"_id":1787,"_source":1788,"_file":1789,"_stem":1790,"_extension":1791},"/articles/nuxt-content-rss-feed","articles",false,"","How To Add an RSS Feed to a Nuxt Website","If you are a user of Nuxt Content and you wish to configure an RSS feed for your website, it's a surprisingly straight forward process! In this article, we will walk through the code changes required to host an RSS feed for both a statically generated, and Universal Nuxt application.","2024-01-06",[12,13],"nuxt","rss",[15],"programming","/images/nuxt-content-rss-feed.jpg",{"type":18,"children":19},"root",[20],{"type":21,"tag":22,"props":23,"children":24},"element","p",{},[25,28,37],{"type":26,"value":27},"text","If you are a user of ",{"type":21,"tag":29,"props":30,"children":34},"a",{"href":31,"rel":32},"https://content.nuxt.com/",[33],"nofollow",[35],{"type":26,"value":36},"Nuxt Content",{"type":26,"value":38}," and you wish to configure an RSS feed for your website, it's a surprisingly straight forward process! In this article, we will walk through the code changes required to host an RSS feed for both a statically generated, and Universal Nuxt application.",{"type":18,"children":40,"toc":1781},[41,51,58,81,87,101,141,162,197,1139,1176,1246,1252,1265,1270,1297,1309,1685,1703,1775],{"type":21,"tag":22,"props":42,"children":43},{},[44,45,50],{"type":26,"value":27},{"type":21,"tag":29,"props":46,"children":48},{"href":31,"rel":47},[33],[49],{"type":26,"value":36},{"type":26,"value":38},{"type":21,"tag":52,"props":53,"children":55},"h2",{"id":54},"preface",[56],{"type":26,"value":57},"Preface",{"type":21,"tag":22,"props":59,"children":60},{},[61,63,70,72,79],{"type":26,"value":62},"In version 2 of Nuxt, the community module, ",{"type":21,"tag":29,"props":64,"children":67},{"href":65,"rel":66},"https://github.com/nuxt-community/feed-module",[33],[68],{"type":26,"value":69},"nuxt-community/feed-module",{"type":26,"value":71}," was a popular choice for adding an RSS feed to your website. However, there has been an unresolved ",{"type":21,"tag":29,"props":73,"children":76},{"href":74,"rel":75},"https://github.com/nuxt-community/feed-module/issues/106",[33],[77],{"type":26,"value":78},"open issue",{"type":26,"value":80}," since April 1st, 2022 to add support for Nuxt v3. Thankfully, implementing this feature without a module is relatively straight forward.",{"type":21,"tag":52,"props":82,"children":84},{"id":83},"instructions",[85],{"type":26,"value":86},"Instructions",{"type":21,"tag":22,"props":88,"children":89},{},[90,92,99],{"type":26,"value":91},"First, install the ",{"type":21,"tag":29,"props":93,"children":96},{"href":94,"rel":95},"https://www.npmjs.com/package/feed",[33],[97],{"type":26,"value":98},"feed",{"type":26,"value":100}," library into your project:",{"type":21,"tag":102,"props":103,"children":107},"pre",{"className":104,"code":105,"language":106,"meta":7,"style":7},"language-shell shiki shiki-themes github-light","npm i -D feed\n","shell",[108],{"type":21,"tag":109,"props":110,"children":111},"code",{"__ignoreMap":7},[112],{"type":21,"tag":113,"props":114,"children":117},"span",{"class":115,"line":116},"line",1,[118,124,130,136],{"type":21,"tag":113,"props":119,"children":121},{"style":120},"--shiki-default:#6F42C1",[122],{"type":26,"value":123},"npm",{"type":21,"tag":113,"props":125,"children":127},{"style":126},"--shiki-default:#032F62",[128],{"type":26,"value":129}," i",{"type":21,"tag":113,"props":131,"children":133},{"style":132},"--shiki-default:#005CC5",[134],{"type":26,"value":135}," -D",{"type":21,"tag":113,"props":137,"children":138},{"style":126},[139],{"type":26,"value":140}," feed\n",{"type":21,"tag":22,"props":142,"children":143},{},[144,146,152,154,160],{"type":26,"value":145},"Then, create a ",{"type":21,"tag":109,"props":147,"children":149},{"className":148},[],[150],{"type":26,"value":151},"server/",{"type":26,"value":153}," folder in your project if it does not already exist, and create a file named ",{"type":21,"tag":109,"props":155,"children":157},{"className":156},[],[158],{"type":26,"value":159},"server/routes/atom.ts",{"type":26,"value":161},".",{"type":21,"tag":22,"props":163,"children":164},{},[165,167,172,174,179,181,187,189,195],{"type":26,"value":166},"Here, we will leverage the ",{"type":21,"tag":109,"props":168,"children":170},{"className":169},[],[171],{"type":26,"value":98},{"type":26,"value":173}," library and construct an XML representation of our Nuxt content. As you can see, we first define our ",{"type":21,"tag":109,"props":175,"children":177},{"className":176},[],[178],{"type":26,"value":98},{"type":26,"value":180}," with metadata associated with our RSS feed. This will be used by RSS readers to provide context to the end user. Then, we query our Nuxt content with ",{"type":21,"tag":109,"props":182,"children":184},{"className":183},[],[185],{"type":26,"value":186},"serverQueryContent",{"type":26,"value":188}," and append a ",{"type":21,"tag":109,"props":190,"children":192},{"className":191},[],[193],{"type":26,"value":194},"feed.addItem",{"type":26,"value":196}," for each article.",{"type":21,"tag":102,"props":198,"children":202},{"className":199,"code":200,"language":201,"meta":7,"style":7},"language-ts shiki shiki-themes github-light","import { serverQueryContent } from '#content/server';\nimport { Feed } from 'feed';\n\nconst BASE_URL = \"https://mywebsite.com\"\nconst AUTHOR_NAME = \"Firstname Lastname\"\n\nexport default defineEventHandler(async (event) => {\n\n const feed = new Feed({\n title: \"My Title\",\n description: \"My Description\",\n id: BASE_URL,\n link: BASE_URL,\n language: \"en\",\n image: `${BASE_URL}/images/placeholder.png`,\n favicon: `${BASE_URL}/favicon.ico`,\n copyright: `All rights reserved ${new Date().getFullYear()}, ${AUTHOR_NAME}`,\n updated: new Date(),\n generator: \"Nuxt static site generation + Feed for Node.js\",\n feedLinks: {\n atom: `${BASE_URL}/atom`\n },\n author: {\n name: AUTHOR_NAME,\n }\n });\n\n const articles = await serverQueryContent(event).find();\n\n articles.forEach((article) => {\n feed.addItem({\n title: article.title ? article.title : \"Missing Title\",\n id: article._path,\n link: `${BASE_URL}${article._path}`,\n description: article.description,\n author: [\n {\n name: AUTHOR_NAME,\n },\n ],\n date: new Date(article.date),\n image: article.cover_image ? `${BASE_URL}/${article.cover_image}` : undefined\n });\n });\n\n return feed.atom1();\n});\n","ts",[203],{"type":21,"tag":109,"props":204,"children":205},{"__ignoreMap":7},[206,236,262,272,296,318,326,381,389,422,441,459,477,494,512,539,565,623,645,663,672,694,703,712,729,738,747,755,797,805,841,859,892,901,944,953,962,971,988,997,1006,1028,1082,1091,1099,1107,1130],{"type":21,"tag":113,"props":207,"children":208},{"class":115,"line":116},[209,215,221,226,231],{"type":21,"tag":113,"props":210,"children":212},{"style":211},"--shiki-default:#D73A49",[213],{"type":26,"value":214},"import",{"type":21,"tag":113,"props":216,"children":218},{"style":217},"--shiki-default:#24292E",[219],{"type":26,"value":220}," { serverQueryContent } ",{"type":21,"tag":113,"props":222,"children":223},{"style":211},[224],{"type":26,"value":225},"from",{"type":21,"tag":113,"props":227,"children":228},{"style":126},[229],{"type":26,"value":230}," '#content/server'",{"type":21,"tag":113,"props":232,"children":233},{"style":217},[234],{"type":26,"value":235},";\n",{"type":21,"tag":113,"props":237,"children":239},{"class":115,"line":238},2,[240,244,249,253,258],{"type":21,"tag":113,"props":241,"children":242},{"style":211},[243],{"type":26,"value":214},{"type":21,"tag":113,"props":245,"children":246},{"style":217},[247],{"type":26,"value":248}," { Feed } ",{"type":21,"tag":113,"props":250,"children":251},{"style":211},[252],{"type":26,"value":225},{"type":21,"tag":113,"props":254,"children":255},{"style":126},[256],{"type":26,"value":257}," 'feed'",{"type":21,"tag":113,"props":259,"children":260},{"style":217},[261],{"type":26,"value":235},{"type":21,"tag":113,"props":263,"children":265},{"class":115,"line":264},3,[266],{"type":21,"tag":113,"props":267,"children":269},{"emptyLinePlaceholder":268},true,[270],{"type":26,"value":271},"\n",{"type":21,"tag":113,"props":273,"children":275},{"class":115,"line":274},4,[276,281,286,291],{"type":21,"tag":113,"props":277,"children":278},{"style":211},[279],{"type":26,"value":280},"const",{"type":21,"tag":113,"props":282,"children":283},{"style":132},[284],{"type":26,"value":285}," BASE_URL",{"type":21,"tag":113,"props":287,"children":288},{"style":211},[289],{"type":26,"value":290}," =",{"type":21,"tag":113,"props":292,"children":293},{"style":126},[294],{"type":26,"value":295}," \"https://mywebsite.com\"\n",{"type":21,"tag":113,"props":297,"children":299},{"class":115,"line":298},5,[300,304,309,313],{"type":21,"tag":113,"props":301,"children":302},{"style":211},[303],{"type":26,"value":280},{"type":21,"tag":113,"props":305,"children":306},{"style":132},[307],{"type":26,"value":308}," AUTHOR_NAME",{"type":21,"tag":113,"props":310,"children":311},{"style":211},[312],{"type":26,"value":290},{"type":21,"tag":113,"props":314,"children":315},{"style":126},[316],{"type":26,"value":317}," \"Firstname Lastname\"\n",{"type":21,"tag":113,"props":319,"children":321},{"class":115,"line":320},6,[322],{"type":21,"tag":113,"props":323,"children":324},{"emptyLinePlaceholder":268},[325],{"type":26,"value":271},{"type":21,"tag":113,"props":327,"children":329},{"class":115,"line":328},7,[330,335,340,345,350,355,360,366,371,376],{"type":21,"tag":113,"props":331,"children":332},{"style":211},[333],{"type":26,"value":334},"export",{"type":21,"tag":113,"props":336,"children":337},{"style":211},[338],{"type":26,"value":339}," default",{"type":21,"tag":113,"props":341,"children":342},{"style":120},[343],{"type":26,"value":344}," defineEventHandler",{"type":21,"tag":113,"props":346,"children":347},{"style":217},[348],{"type":26,"value":349},"(",{"type":21,"tag":113,"props":351,"children":352},{"style":211},[353],{"type":26,"value":354},"async",{"type":21,"tag":113,"props":356,"children":357},{"style":217},[358],{"type":26,"value":359}," (",{"type":21,"tag":113,"props":361,"children":363},{"style":362},"--shiki-default:#E36209",[364],{"type":26,"value":365},"event",{"type":21,"tag":113,"props":367,"children":368},{"style":217},[369],{"type":26,"value":370},") ",{"type":21,"tag":113,"props":372,"children":373},{"style":211},[374],{"type":26,"value":375},"=>",{"type":21,"tag":113,"props":377,"children":378},{"style":217},[379],{"type":26,"value":380}," {\n",{"type":21,"tag":113,"props":382,"children":384},{"class":115,"line":383},8,[385],{"type":21,"tag":113,"props":386,"children":387},{"emptyLinePlaceholder":268},[388],{"type":26,"value":271},{"type":21,"tag":113,"props":390,"children":392},{"class":115,"line":391},9,[393,398,403,407,412,417],{"type":21,"tag":113,"props":394,"children":395},{"style":211},[396],{"type":26,"value":397}," const",{"type":21,"tag":113,"props":399,"children":400},{"style":132},[401],{"type":26,"value":402}," feed",{"type":21,"tag":113,"props":404,"children":405},{"style":211},[406],{"type":26,"value":290},{"type":21,"tag":113,"props":408,"children":409},{"style":211},[410],{"type":26,"value":411}," new",{"type":21,"tag":113,"props":413,"children":414},{"style":120},[415],{"type":26,"value":416}," Feed",{"type":21,"tag":113,"props":418,"children":419},{"style":217},[420],{"type":26,"value":421},"({\n",{"type":21,"tag":113,"props":423,"children":425},{"class":115,"line":424},10,[426,431,436],{"type":21,"tag":113,"props":427,"children":428},{"style":217},[429],{"type":26,"value":430}," title: ",{"type":21,"tag":113,"props":432,"children":433},{"style":126},[434],{"type":26,"value":435},"\"My Title\"",{"type":21,"tag":113,"props":437,"children":438},{"style":217},[439],{"type":26,"value":440},",\n",{"type":21,"tag":113,"props":442,"children":444},{"class":115,"line":443},11,[445,450,455],{"type":21,"tag":113,"props":446,"children":447},{"style":217},[448],{"type":26,"value":449}," description: ",{"type":21,"tag":113,"props":451,"children":452},{"style":126},[453],{"type":26,"value":454},"\"My Description\"",{"type":21,"tag":113,"props":456,"children":457},{"style":217},[458],{"type":26,"value":440},{"type":21,"tag":113,"props":460,"children":462},{"class":115,"line":461},12,[463,468,473],{"type":21,"tag":113,"props":464,"children":465},{"style":217},[466],{"type":26,"value":467}," id: ",{"type":21,"tag":113,"props":469,"children":470},{"style":132},[471],{"type":26,"value":472},"BASE_URL",{"type":21,"tag":113,"props":474,"children":475},{"style":217},[476],{"type":26,"value":440},{"type":21,"tag":113,"props":478,"children":480},{"class":115,"line":479},13,[481,486,490],{"type":21,"tag":113,"props":482,"children":483},{"style":217},[484],{"type":26,"value":485}," link: ",{"type":21,"tag":113,"props":487,"children":488},{"style":132},[489],{"type":26,"value":472},{"type":21,"tag":113,"props":491,"children":492},{"style":217},[493],{"type":26,"value":440},{"type":21,"tag":113,"props":495,"children":497},{"class":115,"line":496},14,[498,503,508],{"type":21,"tag":113,"props":499,"children":500},{"style":217},[501],{"type":26,"value":502}," language: ",{"type":21,"tag":113,"props":504,"children":505},{"style":126},[506],{"type":26,"value":507},"\"en\"",{"type":21,"tag":113,"props":509,"children":510},{"style":217},[511],{"type":26,"value":440},{"type":21,"tag":113,"props":513,"children":515},{"class":115,"line":514},15,[516,521,526,530,535],{"type":21,"tag":113,"props":517,"children":518},{"style":217},[519],{"type":26,"value":520}," image: ",{"type":21,"tag":113,"props":522,"children":523},{"style":126},[524],{"type":26,"value":525},"`${",{"type":21,"tag":113,"props":527,"children":528},{"style":132},[529],{"type":26,"value":472},{"type":21,"tag":113,"props":531,"children":532},{"style":126},[533],{"type":26,"value":534},"}/images/placeholder.png`",{"type":21,"tag":113,"props":536,"children":537},{"style":217},[538],{"type":26,"value":440},{"type":21,"tag":113,"props":540,"children":542},{"class":115,"line":541},16,[543,548,552,556,561],{"type":21,"tag":113,"props":544,"children":545},{"style":217},[546],{"type":26,"value":547}," favicon: ",{"type":21,"tag":113,"props":549,"children":550},{"style":126},[551],{"type":26,"value":525},{"type":21,"tag":113,"props":553,"children":554},{"style":132},[555],{"type":26,"value":472},{"type":21,"tag":113,"props":557,"children":558},{"style":126},[559],{"type":26,"value":560},"}/favicon.ico`",{"type":21,"tag":113,"props":562,"children":563},{"style":217},[564],{"type":26,"value":440},{"type":21,"tag":113,"props":566,"children":568},{"class":115,"line":567},17,[569,574,579,584,589,594,599,604,609,614,619],{"type":21,"tag":113,"props":570,"children":571},{"style":217},[572],{"type":26,"value":573}," copyright: ",{"type":21,"tag":113,"props":575,"children":576},{"style":126},[577],{"type":26,"value":578},"`All rights reserved ${",{"type":21,"tag":113,"props":580,"children":581},{"style":211},[582],{"type":26,"value":583},"new",{"type":21,"tag":113,"props":585,"children":586},{"style":120},[587],{"type":26,"value":588}," Date",{"type":21,"tag":113,"props":590,"children":591},{"style":126},[592],{"type":26,"value":593},"().",{"type":21,"tag":113,"props":595,"children":596},{"style":120},[597],{"type":26,"value":598},"getFullYear",{"type":21,"tag":113,"props":600,"children":601},{"style":126},[602],{"type":26,"value":603},"()",{"type":21,"tag":113,"props":605,"children":606},{"style":126},[607],{"type":26,"value":608},"}, ${",{"type":21,"tag":113,"props":610,"children":611},{"style":132},[612],{"type":26,"value":613},"AUTHOR_NAME",{"type":21,"tag":113,"props":615,"children":616},{"style":126},[617],{"type":26,"value":618},"}`",{"type":21,"tag":113,"props":620,"children":621},{"style":217},[622],{"type":26,"value":440},{"type":21,"tag":113,"props":624,"children":626},{"class":115,"line":625},18,[627,632,636,640],{"type":21,"tag":113,"props":628,"children":629},{"style":217},[630],{"type":26,"value":631}," updated: ",{"type":21,"tag":113,"props":633,"children":634},{"style":211},[635],{"type":26,"value":583},{"type":21,"tag":113,"props":637,"children":638},{"style":120},[639],{"type":26,"value":588},{"type":21,"tag":113,"props":641,"children":642},{"style":217},[643],{"type":26,"value":644},"(),\n",{"type":21,"tag":113,"props":646,"children":648},{"class":115,"line":647},19,[649,654,659],{"type":21,"tag":113,"props":650,"children":651},{"style":217},[652],{"type":26,"value":653}," generator: ",{"type":21,"tag":113,"props":655,"children":656},{"style":126},[657],{"type":26,"value":658},"\"Nuxt static site generation + Feed for Node.js\"",{"type":21,"tag":113,"props":660,"children":661},{"style":217},[662],{"type":26,"value":440},{"type":21,"tag":113,"props":664,"children":666},{"class":115,"line":665},20,[667],{"type":21,"tag":113,"props":668,"children":669},{"style":217},[670],{"type":26,"value":671}," feedLinks: {\n",{"type":21,"tag":113,"props":673,"children":675},{"class":115,"line":674},21,[676,681,685,689],{"type":21,"tag":113,"props":677,"children":678},{"style":217},[679],{"type":26,"value":680}," atom: ",{"type":21,"tag":113,"props":682,"children":683},{"style":126},[684],{"type":26,"value":525},{"type":21,"tag":113,"props":686,"children":687},{"style":132},[688],{"type":26,"value":472},{"type":21,"tag":113,"props":690,"children":691},{"style":126},[692],{"type":26,"value":693},"}/atom`\n",{"type":21,"tag":113,"props":695,"children":697},{"class":115,"line":696},22,[698],{"type":21,"tag":113,"props":699,"children":700},{"style":217},[701],{"type":26,"value":702}," },\n",{"type":21,"tag":113,"props":704,"children":706},{"class":115,"line":705},23,[707],{"type":21,"tag":113,"props":708,"children":709},{"style":217},[710],{"type":26,"value":711}," author: {\n",{"type":21,"tag":113,"props":713,"children":715},{"class":115,"line":714},24,[716,721,725],{"type":21,"tag":113,"props":717,"children":718},{"style":217},[719],{"type":26,"value":720}," name: ",{"type":21,"tag":113,"props":722,"children":723},{"style":132},[724],{"type":26,"value":613},{"type":21,"tag":113,"props":726,"children":727},{"style":217},[728],{"type":26,"value":440},{"type":21,"tag":113,"props":730,"children":732},{"class":115,"line":731},25,[733],{"type":21,"tag":113,"props":734,"children":735},{"style":217},[736],{"type":26,"value":737}," }\n",{"type":21,"tag":113,"props":739,"children":741},{"class":115,"line":740},26,[742],{"type":21,"tag":113,"props":743,"children":744},{"style":217},[745],{"type":26,"value":746}," });\n",{"type":21,"tag":113,"props":748,"children":750},{"class":115,"line":749},27,[751],{"type":21,"tag":113,"props":752,"children":753},{"emptyLinePlaceholder":268},[754],{"type":26,"value":271},{"type":21,"tag":113,"props":756,"children":758},{"class":115,"line":757},28,[759,763,768,772,777,782,787,792],{"type":21,"tag":113,"props":760,"children":761},{"style":211},[762],{"type":26,"value":397},{"type":21,"tag":113,"props":764,"children":765},{"style":132},[766],{"type":26,"value":767}," articles",{"type":21,"tag":113,"props":769,"children":770},{"style":211},[771],{"type":26,"value":290},{"type":21,"tag":113,"props":773,"children":774},{"style":211},[775],{"type":26,"value":776}," await",{"type":21,"tag":113,"props":778,"children":779},{"style":120},[780],{"type":26,"value":781}," serverQueryContent",{"type":21,"tag":113,"props":783,"children":784},{"style":217},[785],{"type":26,"value":786},"(event).",{"type":21,"tag":113,"props":788,"children":789},{"style":120},[790],{"type":26,"value":791},"find",{"type":21,"tag":113,"props":793,"children":794},{"style":217},[795],{"type":26,"value":796},"();\n",{"type":21,"tag":113,"props":798,"children":800},{"class":115,"line":799},29,[801],{"type":21,"tag":113,"props":802,"children":803},{"emptyLinePlaceholder":268},[804],{"type":26,"value":271},{"type":21,"tag":113,"props":806,"children":808},{"class":115,"line":807},30,[809,814,819,824,829,833,837],{"type":21,"tag":113,"props":810,"children":811},{"style":217},[812],{"type":26,"value":813}," articles.",{"type":21,"tag":113,"props":815,"children":816},{"style":120},[817],{"type":26,"value":818},"forEach",{"type":21,"tag":113,"props":820,"children":821},{"style":217},[822],{"type":26,"value":823},"((",{"type":21,"tag":113,"props":825,"children":826},{"style":362},[827],{"type":26,"value":828},"article",{"type":21,"tag":113,"props":830,"children":831},{"style":217},[832],{"type":26,"value":370},{"type":21,"tag":113,"props":834,"children":835},{"style":211},[836],{"type":26,"value":375},{"type":21,"tag":113,"props":838,"children":839},{"style":217},[840],{"type":26,"value":380},{"type":21,"tag":113,"props":842,"children":844},{"class":115,"line":843},31,[845,850,855],{"type":21,"tag":113,"props":846,"children":847},{"style":217},[848],{"type":26,"value":849}," feed.",{"type":21,"tag":113,"props":851,"children":852},{"style":120},[853],{"type":26,"value":854},"addItem",{"type":21,"tag":113,"props":856,"children":857},{"style":217},[858],{"type":26,"value":421},{"type":21,"tag":113,"props":860,"children":862},{"class":115,"line":861},32,[863,868,873,878,883,888],{"type":21,"tag":113,"props":864,"children":865},{"style":217},[866],{"type":26,"value":867}," title: article.title ",{"type":21,"tag":113,"props":869,"children":870},{"style":211},[871],{"type":26,"value":872},"?",{"type":21,"tag":113,"props":874,"children":875},{"style":217},[876],{"type":26,"value":877}," article.title ",{"type":21,"tag":113,"props":879,"children":880},{"style":211},[881],{"type":26,"value":882},":",{"type":21,"tag":113,"props":884,"children":885},{"style":126},[886],{"type":26,"value":887}," \"Missing Title\"",{"type":21,"tag":113,"props":889,"children":890},{"style":217},[891],{"type":26,"value":440},{"type":21,"tag":113,"props":893,"children":895},{"class":115,"line":894},33,[896],{"type":21,"tag":113,"props":897,"children":898},{"style":217},[899],{"type":26,"value":900}," id: article._path,\n",{"type":21,"tag":113,"props":902,"children":904},{"class":115,"line":903},34,[905,910,914,918,923,927,931,936,940],{"type":21,"tag":113,"props":906,"children":907},{"style":217},[908],{"type":26,"value":909}," link: ",{"type":21,"tag":113,"props":911,"children":912},{"style":126},[913],{"type":26,"value":525},{"type":21,"tag":113,"props":915,"children":916},{"style":132},[917],{"type":26,"value":472},{"type":21,"tag":113,"props":919,"children":920},{"style":126},[921],{"type":26,"value":922},"}${",{"type":21,"tag":113,"props":924,"children":925},{"style":217},[926],{"type":26,"value":828},{"type":21,"tag":113,"props":928,"children":929},{"style":126},[930],{"type":26,"value":161},{"type":21,"tag":113,"props":932,"children":933},{"style":217},[934],{"type":26,"value":935},"_path",{"type":21,"tag":113,"props":937,"children":938},{"style":126},[939],{"type":26,"value":618},{"type":21,"tag":113,"props":941,"children":942},{"style":217},[943],{"type":26,"value":440},{"type":21,"tag":113,"props":945,"children":947},{"class":115,"line":946},35,[948],{"type":21,"tag":113,"props":949,"children":950},{"style":217},[951],{"type":26,"value":952}," description: article.description,\n",{"type":21,"tag":113,"props":954,"children":956},{"class":115,"line":955},36,[957],{"type":21,"tag":113,"props":958,"children":959},{"style":217},[960],{"type":26,"value":961}," author: [\n",{"type":21,"tag":113,"props":963,"children":965},{"class":115,"line":964},37,[966],{"type":21,"tag":113,"props":967,"children":968},{"style":217},[969],{"type":26,"value":970}," {\n",{"type":21,"tag":113,"props":972,"children":974},{"class":115,"line":973},38,[975,980,984],{"type":21,"tag":113,"props":976,"children":977},{"style":217},[978],{"type":26,"value":979}," name: ",{"type":21,"tag":113,"props":981,"children":982},{"style":132},[983],{"type":26,"value":613},{"type":21,"tag":113,"props":985,"children":986},{"style":217},[987],{"type":26,"value":440},{"type":21,"tag":113,"props":989,"children":991},{"class":115,"line":990},39,[992],{"type":21,"tag":113,"props":993,"children":994},{"style":217},[995],{"type":26,"value":996}," },\n",{"type":21,"tag":113,"props":998,"children":1000},{"class":115,"line":999},40,[1001],{"type":21,"tag":113,"props":1002,"children":1003},{"style":217},[1004],{"type":26,"value":1005}," ],\n",{"type":21,"tag":113,"props":1007,"children":1009},{"class":115,"line":1008},41,[1010,1015,1019,1023],{"type":21,"tag":113,"props":1011,"children":1012},{"style":217},[1013],{"type":26,"value":1014}," date: ",{"type":21,"tag":113,"props":1016,"children":1017},{"style":211},[1018],{"type":26,"value":583},{"type":21,"tag":113,"props":1020,"children":1021},{"style":120},[1022],{"type":26,"value":588},{"type":21,"tag":113,"props":1024,"children":1025},{"style":217},[1026],{"type":26,"value":1027},"(article.date),\n",{"type":21,"tag":113,"props":1029,"children":1031},{"class":115,"line":1030},42,[1032,1037,1041,1046,1050,1055,1059,1063,1068,1072,1077],{"type":21,"tag":113,"props":1033,"children":1034},{"style":217},[1035],{"type":26,"value":1036}," image: article.cover_image ",{"type":21,"tag":113,"props":1038,"children":1039},{"style":211},[1040],{"type":26,"value":872},{"type":21,"tag":113,"props":1042,"children":1043},{"style":126},[1044],{"type":26,"value":1045}," `${",{"type":21,"tag":113,"props":1047,"children":1048},{"style":132},[1049],{"type":26,"value":472},{"type":21,"tag":113,"props":1051,"children":1052},{"style":126},[1053],{"type":26,"value":1054},"}/${",{"type":21,"tag":113,"props":1056,"children":1057},{"style":217},[1058],{"type":26,"value":828},{"type":21,"tag":113,"props":1060,"children":1061},{"style":126},[1062],{"type":26,"value":161},{"type":21,"tag":113,"props":1064,"children":1065},{"style":217},[1066],{"type":26,"value":1067},"cover_image",{"type":21,"tag":113,"props":1069,"children":1070},{"style":126},[1071],{"type":26,"value":618},{"type":21,"tag":113,"props":1073,"children":1074},{"style":211},[1075],{"type":26,"value":1076}," :",{"type":21,"tag":113,"props":1078,"children":1079},{"style":132},[1080],{"type":26,"value":1081}," undefined\n",{"type":21,"tag":113,"props":1083,"children":1085},{"class":115,"line":1084},43,[1086],{"type":21,"tag":113,"props":1087,"children":1088},{"style":217},[1089],{"type":26,"value":1090}," });\n",{"type":21,"tag":113,"props":1092,"children":1094},{"class":115,"line":1093},44,[1095],{"type":21,"tag":113,"props":1096,"children":1097},{"style":217},[1098],{"type":26,"value":746},{"type":21,"tag":113,"props":1100,"children":1102},{"class":115,"line":1101},45,[1103],{"type":21,"tag":113,"props":1104,"children":1105},{"emptyLinePlaceholder":268},[1106],{"type":26,"value":271},{"type":21,"tag":113,"props":1108,"children":1110},{"class":115,"line":1109},46,[1111,1116,1121,1126],{"type":21,"tag":113,"props":1112,"children":1113},{"style":211},[1114],{"type":26,"value":1115}," return",{"type":21,"tag":113,"props":1117,"children":1118},{"style":217},[1119],{"type":26,"value":1120}," feed.",{"type":21,"tag":113,"props":1122,"children":1123},{"style":120},[1124],{"type":26,"value":1125},"atom1",{"type":21,"tag":113,"props":1127,"children":1128},{"style":217},[1129],{"type":26,"value":796},{"type":21,"tag":113,"props":1131,"children":1133},{"class":115,"line":1132},47,[1134],{"type":21,"tag":113,"props":1135,"children":1136},{"style":217},[1137],{"type":26,"value":1138},"});\n",{"type":21,"tag":22,"props":1140,"children":1141},{},[1142,1144,1150,1152,1158,1160,1166,1168,1174],{"type":26,"value":1143},"And that's just about it! Except, if you are statically generating your website with the ",{"type":21,"tag":109,"props":1145,"children":1147},{"className":1146},[],[1148],{"type":26,"value":1149},"nuxt generate",{"type":26,"value":1151}," command, you will need to configure this server-side route to be pre-rendered on site generation. This is as simple as adding a ",{"type":21,"tag":109,"props":1153,"children":1155},{"className":1154},[],[1156],{"type":26,"value":1157},"nitro",{"type":26,"value":1159}," ",{"type":21,"tag":109,"props":1161,"children":1163},{"className":1162},[],[1164],{"type":26,"value":1165},"prerender",{"type":26,"value":1167}," definition in your ",{"type":21,"tag":109,"props":1169,"children":1171},{"className":1170},[],[1172],{"type":26,"value":1173},"nuxt.config.ts",{"type":26,"value":1175}," file, like so:",{"type":21,"tag":102,"props":1177,"children":1179},{"className":199,"code":1178,"language":201,"meta":7,"style":7},"nitro: {\n prerender: {\n routes: ['/atom']\n }\n}\n",[1180],{"type":21,"tag":109,"props":1181,"children":1182},{"__ignoreMap":7},[1183,1195,1207,1230,1238],{"type":21,"tag":113,"props":1184,"children":1185},{"class":115,"line":116},[1186,1190],{"type":21,"tag":113,"props":1187,"children":1188},{"style":120},[1189],{"type":26,"value":1157},{"type":21,"tag":113,"props":1191,"children":1192},{"style":217},[1193],{"type":26,"value":1194},": {\n",{"type":21,"tag":113,"props":1196,"children":1197},{"class":115,"line":238},[1198,1203],{"type":21,"tag":113,"props":1199,"children":1200},{"style":120},[1201],{"type":26,"value":1202}," prerender",{"type":21,"tag":113,"props":1204,"children":1205},{"style":217},[1206],{"type":26,"value":1194},{"type":21,"tag":113,"props":1208,"children":1209},{"class":115,"line":264},[1210,1215,1220,1225],{"type":21,"tag":113,"props":1211,"children":1212},{"style":120},[1213],{"type":26,"value":1214}," routes",{"type":21,"tag":113,"props":1216,"children":1217},{"style":217},[1218],{"type":26,"value":1219},": [",{"type":21,"tag":113,"props":1221,"children":1222},{"style":126},[1223],{"type":26,"value":1224},"'/atom'",{"type":21,"tag":113,"props":1226,"children":1227},{"style":217},[1228],{"type":26,"value":1229},"]\n",{"type":21,"tag":113,"props":1231,"children":1232},{"class":115,"line":274},[1233],{"type":21,"tag":113,"props":1234,"children":1235},{"style":217},[1236],{"type":26,"value":1237}," }\n",{"type":21,"tag":113,"props":1239,"children":1240},{"class":115,"line":298},[1241],{"type":21,"tag":113,"props":1242,"children":1243},{"style":217},[1244],{"type":26,"value":1245},"}\n",{"type":21,"tag":52,"props":1247,"children":1249},{"id":1248},"bonus",[1250],{"type":26,"value":1251},"Bonus",{"type":21,"tag":22,"props":1253,"children":1254},{},[1255,1257,1263],{"type":26,"value":1256},"You may also be interested in adding a ",{"type":21,"tag":109,"props":1258,"children":1260},{"className":1259},[],[1261],{"type":26,"value":1262},"sitemap.xml",{"type":26,"value":1264}," to your website. This can be done in almost an identical fashion!",{"type":21,"tag":22,"props":1266,"children":1267},{},[1268],{"type":26,"value":1269},"Install the dependency:",{"type":21,"tag":102,"props":1271,"children":1273},{"className":104,"code":1272,"language":106,"meta":7,"style":7},"npm i -D sitemap\n",[1274],{"type":21,"tag":109,"props":1275,"children":1276},{"__ignoreMap":7},[1277],{"type":21,"tag":113,"props":1278,"children":1279},{"class":115,"line":116},[1280,1284,1288,1292],{"type":21,"tag":113,"props":1281,"children":1282},{"style":120},[1283],{"type":26,"value":123},{"type":21,"tag":113,"props":1285,"children":1286},{"style":126},[1287],{"type":26,"value":129},{"type":21,"tag":113,"props":1289,"children":1290},{"style":132},[1291],{"type":26,"value":135},{"type":21,"tag":113,"props":1293,"children":1294},{"style":126},[1295],{"type":26,"value":1296}," sitemap\n",{"type":21,"tag":22,"props":1298,"children":1299},{},[1300,1302,1308],{"type":26,"value":1301},"Create a route at ",{"type":21,"tag":109,"props":1303,"children":1305},{"className":1304},[],[1306],{"type":26,"value":1307},"server/routes/sitemap.xml.ts",{"type":26,"value":882},{"type":21,"tag":102,"props":1310,"children":1312},{"className":199,"code":1311,"language":201,"meta":7,"style":7},"import { serverQueryContent } from '#content/server';\nimport { SitemapStream, streamToPromise } from 'sitemap';\n\nexport default defineEventHandler(async (event) => {\n const articles = await serverQueryContent(event).find();\n\n const sitemap = new SitemapStream({ hostname: 'https://my-website.com/' });\n\n // Add non nuxt content endpoints here\n sitemap.write({ url: '/' });\n sitemap.write({ url: '/articles' });\n\n // Dynamically generate routes for Nuxt markdown content\n articles.forEach((article) => sitemap.write({ url: article._path, changefreq: 'monthly' }));\n sitemap.end();\n\n return (await streamToPromise(sitemap));\n});\n",[1313],{"type":21,"tag":109,"props":1314,"children":1315},{"__ignoreMap":7},[1316,1339,1364,1371,1414,1449,1456,1496,1503,1512,1539,1563,1570,1578,1629,1645,1652,1678],{"type":21,"tag":113,"props":1317,"children":1318},{"class":115,"line":116},[1319,1323,1327,1331,1335],{"type":21,"tag":113,"props":1320,"children":1321},{"style":211},[1322],{"type":26,"value":214},{"type":21,"tag":113,"props":1324,"children":1325},{"style":217},[1326],{"type":26,"value":220},{"type":21,"tag":113,"props":1328,"children":1329},{"style":211},[1330],{"type":26,"value":225},{"type":21,"tag":113,"props":1332,"children":1333},{"style":126},[1334],{"type":26,"value":230},{"type":21,"tag":113,"props":1336,"children":1337},{"style":217},[1338],{"type":26,"value":235},{"type":21,"tag":113,"props":1340,"children":1341},{"class":115,"line":238},[1342,1346,1351,1355,1360],{"type":21,"tag":113,"props":1343,"children":1344},{"style":211},[1345],{"type":26,"value":214},{"type":21,"tag":113,"props":1347,"children":1348},{"style":217},[1349],{"type":26,"value":1350}," { SitemapStream, streamToPromise } ",{"type":21,"tag":113,"props":1352,"children":1353},{"style":211},[1354],{"type":26,"value":225},{"type":21,"tag":113,"props":1356,"children":1357},{"style":126},[1358],{"type":26,"value":1359}," 'sitemap'",{"type":21,"tag":113,"props":1361,"children":1362},{"style":217},[1363],{"type":26,"value":235},{"type":21,"tag":113,"props":1365,"children":1366},{"class":115,"line":264},[1367],{"type":21,"tag":113,"props":1368,"children":1369},{"emptyLinePlaceholder":268},[1370],{"type":26,"value":271},{"type":21,"tag":113,"props":1372,"children":1373},{"class":115,"line":274},[1374,1378,1382,1386,1390,1394,1398,1402,1406,1410],{"type":21,"tag":113,"props":1375,"children":1376},{"style":211},[1377],{"type":26,"value":334},{"type":21,"tag":113,"props":1379,"children":1380},{"style":211},[1381],{"type":26,"value":339},{"type":21,"tag":113,"props":1383,"children":1384},{"style":120},[1385],{"type":26,"value":344},{"type":21,"tag":113,"props":1387,"children":1388},{"style":217},[1389],{"type":26,"value":349},{"type":21,"tag":113,"props":1391,"children":1392},{"style":211},[1393],{"type":26,"value":354},{"type":21,"tag":113,"props":1395,"children":1396},{"style":217},[1397],{"type":26,"value":359},{"type":21,"tag":113,"props":1399,"children":1400},{"style":362},[1401],{"type":26,"value":365},{"type":21,"tag":113,"props":1403,"children":1404},{"style":217},[1405],{"type":26,"value":370},{"type":21,"tag":113,"props":1407,"children":1408},{"style":211},[1409],{"type":26,"value":375},{"type":21,"tag":113,"props":1411,"children":1412},{"style":217},[1413],{"type":26,"value":380},{"type":21,"tag":113,"props":1415,"children":1416},{"class":115,"line":298},[1417,1421,1425,1429,1433,1437,1441,1445],{"type":21,"tag":113,"props":1418,"children":1419},{"style":211},[1420],{"type":26,"value":397},{"type":21,"tag":113,"props":1422,"children":1423},{"style":132},[1424],{"type":26,"value":767},{"type":21,"tag":113,"props":1426,"children":1427},{"style":211},[1428],{"type":26,"value":290},{"type":21,"tag":113,"props":1430,"children":1431},{"style":211},[1432],{"type":26,"value":776},{"type":21,"tag":113,"props":1434,"children":1435},{"style":120},[1436],{"type":26,"value":781},{"type":21,"tag":113,"props":1438,"children":1439},{"style":217},[1440],{"type":26,"value":786},{"type":21,"tag":113,"props":1442,"children":1443},{"style":120},[1444],{"type":26,"value":791},{"type":21,"tag":113,"props":1446,"children":1447},{"style":217},[1448],{"type":26,"value":796},{"type":21,"tag":113,"props":1450,"children":1451},{"class":115,"line":320},[1452],{"type":21,"tag":113,"props":1453,"children":1454},{"emptyLinePlaceholder":268},[1455],{"type":26,"value":271},{"type":21,"tag":113,"props":1457,"children":1458},{"class":115,"line":328},[1459,1463,1468,1472,1476,1481,1486,1491],{"type":21,"tag":113,"props":1460,"children":1461},{"style":211},[1462],{"type":26,"value":397},{"type":21,"tag":113,"props":1464,"children":1465},{"style":132},[1466],{"type":26,"value":1467}," sitemap",{"type":21,"tag":113,"props":1469,"children":1470},{"style":211},[1471],{"type":26,"value":290},{"type":21,"tag":113,"props":1473,"children":1474},{"style":211},[1475],{"type":26,"value":411},{"type":21,"tag":113,"props":1477,"children":1478},{"style":120},[1479],{"type":26,"value":1480}," SitemapStream",{"type":21,"tag":113,"props":1482,"children":1483},{"style":217},[1484],{"type":26,"value":1485},"({ hostname: ",{"type":21,"tag":113,"props":1487,"children":1488},{"style":126},[1489],{"type":26,"value":1490},"'https://my-website.com/'",{"type":21,"tag":113,"props":1492,"children":1493},{"style":217},[1494],{"type":26,"value":1495}," });\n",{"type":21,"tag":113,"props":1497,"children":1498},{"class":115,"line":383},[1499],{"type":21,"tag":113,"props":1500,"children":1501},{"emptyLinePlaceholder":268},[1502],{"type":26,"value":271},{"type":21,"tag":113,"props":1504,"children":1505},{"class":115,"line":391},[1506],{"type":21,"tag":113,"props":1507,"children":1509},{"style":1508},"--shiki-default:#6A737D",[1510],{"type":26,"value":1511}," // Add non nuxt content endpoints here\n",{"type":21,"tag":113,"props":1513,"children":1514},{"class":115,"line":424},[1515,1520,1525,1530,1535],{"type":21,"tag":113,"props":1516,"children":1517},{"style":217},[1518],{"type":26,"value":1519}," sitemap.",{"type":21,"tag":113,"props":1521,"children":1522},{"style":120},[1523],{"type":26,"value":1524},"write",{"type":21,"tag":113,"props":1526,"children":1527},{"style":217},[1528],{"type":26,"value":1529},"({ url: ",{"type":21,"tag":113,"props":1531,"children":1532},{"style":126},[1533],{"type":26,"value":1534},"'/'",{"type":21,"tag":113,"props":1536,"children":1537},{"style":217},[1538],{"type":26,"value":1495},{"type":21,"tag":113,"props":1540,"children":1541},{"class":115,"line":443},[1542,1546,1550,1554,1559],{"type":21,"tag":113,"props":1543,"children":1544},{"style":217},[1545],{"type":26,"value":1519},{"type":21,"tag":113,"props":1547,"children":1548},{"style":120},[1549],{"type":26,"value":1524},{"type":21,"tag":113,"props":1551,"children":1552},{"style":217},[1553],{"type":26,"value":1529},{"type":21,"tag":113,"props":1555,"children":1556},{"style":126},[1557],{"type":26,"value":1558},"'/articles'",{"type":21,"tag":113,"props":1560,"children":1561},{"style":217},[1562],{"type":26,"value":1495},{"type":21,"tag":113,"props":1564,"children":1565},{"class":115,"line":461},[1566],{"type":21,"tag":113,"props":1567,"children":1568},{"emptyLinePlaceholder":268},[1569],{"type":26,"value":271},{"type":21,"tag":113,"props":1571,"children":1572},{"class":115,"line":479},[1573],{"type":21,"tag":113,"props":1574,"children":1575},{"style":1508},[1576],{"type":26,"value":1577}," // Dynamically generate routes for Nuxt markdown content\n",{"type":21,"tag":113,"props":1579,"children":1580},{"class":115,"line":496},[1581,1585,1589,1593,1597,1601,1605,1610,1614,1619,1624],{"type":21,"tag":113,"props":1582,"children":1583},{"style":217},[1584],{"type":26,"value":813},{"type":21,"tag":113,"props":1586,"children":1587},{"style":120},[1588],{"type":26,"value":818},{"type":21,"tag":113,"props":1590,"children":1591},{"style":217},[1592],{"type":26,"value":823},{"type":21,"tag":113,"props":1594,"children":1595},{"style":362},[1596],{"type":26,"value":828},{"type":21,"tag":113,"props":1598,"children":1599},{"style":217},[1600],{"type":26,"value":370},{"type":21,"tag":113,"props":1602,"children":1603},{"style":211},[1604],{"type":26,"value":375},{"type":21,"tag":113,"props":1606,"children":1607},{"style":217},[1608],{"type":26,"value":1609}," sitemap.",{"type":21,"tag":113,"props":1611,"children":1612},{"style":120},[1613],{"type":26,"value":1524},{"type":21,"tag":113,"props":1615,"children":1616},{"style":217},[1617],{"type":26,"value":1618},"({ url: article._path, changefreq: ",{"type":21,"tag":113,"props":1620,"children":1621},{"style":126},[1622],{"type":26,"value":1623},"'monthly'",{"type":21,"tag":113,"props":1625,"children":1626},{"style":217},[1627],{"type":26,"value":1628}," }));\n",{"type":21,"tag":113,"props":1630,"children":1631},{"class":115,"line":514},[1632,1636,1641],{"type":21,"tag":113,"props":1633,"children":1634},{"style":217},[1635],{"type":26,"value":1519},{"type":21,"tag":113,"props":1637,"children":1638},{"style":120},[1639],{"type":26,"value":1640},"end",{"type":21,"tag":113,"props":1642,"children":1643},{"style":217},[1644],{"type":26,"value":796},{"type":21,"tag":113,"props":1646,"children":1647},{"class":115,"line":541},[1648],{"type":21,"tag":113,"props":1649,"children":1650},{"emptyLinePlaceholder":268},[1651],{"type":26,"value":271},{"type":21,"tag":113,"props":1653,"children":1654},{"class":115,"line":567},[1655,1659,1663,1668,1673],{"type":21,"tag":113,"props":1656,"children":1657},{"style":211},[1658],{"type":26,"value":1115},{"type":21,"tag":113,"props":1660,"children":1661},{"style":217},[1662],{"type":26,"value":359},{"type":21,"tag":113,"props":1664,"children":1665},{"style":211},[1666],{"type":26,"value":1667},"await",{"type":21,"tag":113,"props":1669,"children":1670},{"style":120},[1671],{"type":26,"value":1672}," streamToPromise",{"type":21,"tag":113,"props":1674,"children":1675},{"style":217},[1676],{"type":26,"value":1677},"(sitemap));\n",{"type":21,"tag":113,"props":1679,"children":1680},{"class":115,"line":625},[1681],{"type":21,"tag":113,"props":1682,"children":1683},{"style":217},[1684],{"type":26,"value":1138},{"type":21,"tag":22,"props":1686,"children":1687},{},[1688,1690,1695,1697,1702],{"type":26,"value":1689},"And add the ",{"type":21,"tag":109,"props":1691,"children":1693},{"className":1692},[],[1694],{"type":26,"value":1165},{"type":26,"value":1696}," entry in your ",{"type":21,"tag":109,"props":1698,"children":1700},{"className":1699},[],[1701],{"type":26,"value":1173},{"type":26,"value":882},{"type":21,"tag":102,"props":1704,"children":1706},{"className":199,"code":1705,"language":201,"meta":7,"style":7},"nitro: {\n prerender: {\n routes: ['/sitemap.xml', '/atom']\n }\n}\n",[1707],{"type":21,"tag":109,"props":1708,"children":1709},{"__ignoreMap":7},[1710,1721,1732,1761,1768],{"type":21,"tag":113,"props":1711,"children":1712},{"class":115,"line":116},[1713,1717],{"type":21,"tag":113,"props":1714,"children":1715},{"style":120},[1716],{"type":26,"value":1157},{"type":21,"tag":113,"props":1718,"children":1719},{"style":217},[1720],{"type":26,"value":1194},{"type":21,"tag":113,"props":1722,"children":1723},{"class":115,"line":238},[1724,1728],{"type":21,"tag":113,"props":1725,"children":1726},{"style":120},[1727],{"type":26,"value":1202},{"type":21,"tag":113,"props":1729,"children":1730},{"style":217},[1731],{"type":26,"value":1194},{"type":21,"tag":113,"props":1733,"children":1734},{"class":115,"line":264},[1735,1739,1743,1748,1753,1757],{"type":21,"tag":113,"props":1736,"children":1737},{"style":120},[1738],{"type":26,"value":1214},{"type":21,"tag":113,"props":1740,"children":1741},{"style":217},[1742],{"type":26,"value":1219},{"type":21,"tag":113,"props":1744,"children":1745},{"style":126},[1746],{"type":26,"value":1747},"'/sitemap.xml'",{"type":21,"tag":113,"props":1749,"children":1750},{"style":217},[1751],{"type":26,"value":1752},", ",{"type":21,"tag":113,"props":1754,"children":1755},{"style":126},[1756],{"type":26,"value":1224},{"type":21,"tag":113,"props":1758,"children":1759},{"style":217},[1760],{"type":26,"value":1229},{"type":21,"tag":113,"props":1762,"children":1763},{"class":115,"line":274},[1764],{"type":21,"tag":113,"props":1765,"children":1766},{"style":217},[1767],{"type":26,"value":1237},{"type":21,"tag":113,"props":1769,"children":1770},{"class":115,"line":298},[1771],{"type":21,"tag":113,"props":1772,"children":1773},{"style":217},[1774],{"type":26,"value":1245},{"type":21,"tag":1776,"props":1777,"children":1778},"style",{},[1779],{"type":26,"value":1780},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}",{"title":7,"searchDepth":238,"depth":238,"links":1782},[1783,1784,1785],{"id":54,"depth":238,"text":57},{"id":83,"depth":238,"text":86},{"id":1248,"depth":238,"text":1251},"markdown","content:articles:nuxt-content-rss-feed.md","content","articles/nuxt-content-rss-feed.md","articles/nuxt-content-rss-feed","md",1735276484940] \ No newline at end of file +[{"data":1,"prerenderedAt":1792},["ShallowReactive",2],{"page-data":3},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"draft":6,"date":10,"tags":11,"categories":14,"cover_image":16,"excerpt":17,"body":39,"_type":1786,"_id":1787,"_source":1788,"_file":1789,"_stem":1790,"_extension":1791},"/articles/nuxt-content-rss-feed","articles",false,"","How To Add an RSS Feed to a Nuxt Website","If you are a user of Nuxt Content and you wish to configure an RSS feed for your website, it's a surprisingly straight forward process! In this article, we will walk through the code changes required to host an RSS feed for both a statically generated, and Universal Nuxt application.","2024-01-06",[12,13],"nuxt","rss",[15],"programming","/images/nuxt-content-rss-feed.jpg",{"type":18,"children":19},"root",[20],{"type":21,"tag":22,"props":23,"children":24},"element","p",{},[25,28,37],{"type":26,"value":27},"text","If you are a user of ",{"type":21,"tag":29,"props":30,"children":34},"a",{"href":31,"rel":32},"https://content.nuxt.com/",[33],"nofollow",[35],{"type":26,"value":36},"Nuxt Content",{"type":26,"value":38}," and you wish to configure an RSS feed for your website, it's a surprisingly straight forward process! In this article, we will walk through the code changes required to host an RSS feed for both a statically generated, and Universal Nuxt application.",{"type":18,"children":40,"toc":1781},[41,51,58,81,87,101,141,162,197,1139,1176,1246,1252,1265,1270,1297,1309,1685,1703,1775],{"type":21,"tag":22,"props":42,"children":43},{},[44,45,50],{"type":26,"value":27},{"type":21,"tag":29,"props":46,"children":48},{"href":31,"rel":47},[33],[49],{"type":26,"value":36},{"type":26,"value":38},{"type":21,"tag":52,"props":53,"children":55},"h2",{"id":54},"preface",[56],{"type":26,"value":57},"Preface",{"type":21,"tag":22,"props":59,"children":60},{},[61,63,70,72,79],{"type":26,"value":62},"In version 2 of Nuxt, the community module, ",{"type":21,"tag":29,"props":64,"children":67},{"href":65,"rel":66},"https://github.com/nuxt-community/feed-module",[33],[68],{"type":26,"value":69},"nuxt-community/feed-module",{"type":26,"value":71}," was a popular choice for adding an RSS feed to your website. However, there has been an unresolved ",{"type":21,"tag":29,"props":73,"children":76},{"href":74,"rel":75},"https://github.com/nuxt-community/feed-module/issues/106",[33],[77],{"type":26,"value":78},"open issue",{"type":26,"value":80}," since April 1st, 2022 to add support for Nuxt v3. Thankfully, implementing this feature without a module is relatively straight forward.",{"type":21,"tag":52,"props":82,"children":84},{"id":83},"instructions",[85],{"type":26,"value":86},"Instructions",{"type":21,"tag":22,"props":88,"children":89},{},[90,92,99],{"type":26,"value":91},"First, install the ",{"type":21,"tag":29,"props":93,"children":96},{"href":94,"rel":95},"https://www.npmjs.com/package/feed",[33],[97],{"type":26,"value":98},"feed",{"type":26,"value":100}," library into your project:",{"type":21,"tag":102,"props":103,"children":107},"pre",{"className":104,"code":105,"language":106,"meta":7,"style":7},"language-shell shiki shiki-themes github-light","npm i -D feed\n","shell",[108],{"type":21,"tag":109,"props":110,"children":111},"code",{"__ignoreMap":7},[112],{"type":21,"tag":113,"props":114,"children":117},"span",{"class":115,"line":116},"line",1,[118,124,130,136],{"type":21,"tag":113,"props":119,"children":121},{"style":120},"--shiki-default:#6F42C1",[122],{"type":26,"value":123},"npm",{"type":21,"tag":113,"props":125,"children":127},{"style":126},"--shiki-default:#032F62",[128],{"type":26,"value":129}," i",{"type":21,"tag":113,"props":131,"children":133},{"style":132},"--shiki-default:#005CC5",[134],{"type":26,"value":135}," -D",{"type":21,"tag":113,"props":137,"children":138},{"style":126},[139],{"type":26,"value":140}," feed\n",{"type":21,"tag":22,"props":142,"children":143},{},[144,146,152,154,160],{"type":26,"value":145},"Then, create a ",{"type":21,"tag":109,"props":147,"children":149},{"className":148},[],[150],{"type":26,"value":151},"server/",{"type":26,"value":153}," folder in your project if it does not already exist, and create a file named ",{"type":21,"tag":109,"props":155,"children":157},{"className":156},[],[158],{"type":26,"value":159},"server/routes/atom.ts",{"type":26,"value":161},".",{"type":21,"tag":22,"props":163,"children":164},{},[165,167,172,174,179,181,187,189,195],{"type":26,"value":166},"Here, we will leverage the ",{"type":21,"tag":109,"props":168,"children":170},{"className":169},[],[171],{"type":26,"value":98},{"type":26,"value":173}," library and construct an XML representation of our Nuxt content. As you can see, we first define our ",{"type":21,"tag":109,"props":175,"children":177},{"className":176},[],[178],{"type":26,"value":98},{"type":26,"value":180}," with metadata associated with our RSS feed. This will be used by RSS readers to provide context to the end user. Then, we query our Nuxt content with ",{"type":21,"tag":109,"props":182,"children":184},{"className":183},[],[185],{"type":26,"value":186},"serverQueryContent",{"type":26,"value":188}," and append a ",{"type":21,"tag":109,"props":190,"children":192},{"className":191},[],[193],{"type":26,"value":194},"feed.addItem",{"type":26,"value":196}," for each article.",{"type":21,"tag":102,"props":198,"children":202},{"className":199,"code":200,"language":201,"meta":7,"style":7},"language-ts shiki shiki-themes github-light","import { serverQueryContent } from '#content/server';\nimport { Feed } from 'feed';\n\nconst BASE_URL = \"https://mywebsite.com\"\nconst AUTHOR_NAME = \"Firstname Lastname\"\n\nexport default defineEventHandler(async (event) => {\n\n const feed = new Feed({\n title: \"My Title\",\n description: \"My Description\",\n id: BASE_URL,\n link: BASE_URL,\n language: \"en\",\n image: `${BASE_URL}/images/placeholder.png`,\n favicon: `${BASE_URL}/favicon.ico`,\n copyright: `All rights reserved ${new Date().getFullYear()}, ${AUTHOR_NAME}`,\n updated: new Date(),\n generator: \"Nuxt static site generation + Feed for Node.js\",\n feedLinks: {\n atom: `${BASE_URL}/atom`\n },\n author: {\n name: AUTHOR_NAME,\n }\n });\n\n const articles = await serverQueryContent(event).find();\n\n articles.forEach((article) => {\n feed.addItem({\n title: article.title ? article.title : \"Missing Title\",\n id: article._path,\n link: `${BASE_URL}${article._path}`,\n description: article.description,\n author: [\n {\n name: AUTHOR_NAME,\n },\n ],\n date: new Date(article.date),\n image: article.cover_image ? `${BASE_URL}/${article.cover_image}` : undefined\n });\n });\n\n return feed.atom1();\n});\n","ts",[203],{"type":21,"tag":109,"props":204,"children":205},{"__ignoreMap":7},[206,236,262,272,296,318,326,381,389,422,441,459,477,494,512,539,565,623,645,663,672,694,703,712,729,738,747,755,797,805,841,859,892,901,944,953,962,971,988,997,1006,1028,1082,1091,1099,1107,1130],{"type":21,"tag":113,"props":207,"children":208},{"class":115,"line":116},[209,215,221,226,231],{"type":21,"tag":113,"props":210,"children":212},{"style":211},"--shiki-default:#D73A49",[213],{"type":26,"value":214},"import",{"type":21,"tag":113,"props":216,"children":218},{"style":217},"--shiki-default:#24292E",[219],{"type":26,"value":220}," { serverQueryContent } ",{"type":21,"tag":113,"props":222,"children":223},{"style":211},[224],{"type":26,"value":225},"from",{"type":21,"tag":113,"props":227,"children":228},{"style":126},[229],{"type":26,"value":230}," '#content/server'",{"type":21,"tag":113,"props":232,"children":233},{"style":217},[234],{"type":26,"value":235},";\n",{"type":21,"tag":113,"props":237,"children":239},{"class":115,"line":238},2,[240,244,249,253,258],{"type":21,"tag":113,"props":241,"children":242},{"style":211},[243],{"type":26,"value":214},{"type":21,"tag":113,"props":245,"children":246},{"style":217},[247],{"type":26,"value":248}," { Feed } ",{"type":21,"tag":113,"props":250,"children":251},{"style":211},[252],{"type":26,"value":225},{"type":21,"tag":113,"props":254,"children":255},{"style":126},[256],{"type":26,"value":257}," 'feed'",{"type":21,"tag":113,"props":259,"children":260},{"style":217},[261],{"type":26,"value":235},{"type":21,"tag":113,"props":263,"children":265},{"class":115,"line":264},3,[266],{"type":21,"tag":113,"props":267,"children":269},{"emptyLinePlaceholder":268},true,[270],{"type":26,"value":271},"\n",{"type":21,"tag":113,"props":273,"children":275},{"class":115,"line":274},4,[276,281,286,291],{"type":21,"tag":113,"props":277,"children":278},{"style":211},[279],{"type":26,"value":280},"const",{"type":21,"tag":113,"props":282,"children":283},{"style":132},[284],{"type":26,"value":285}," BASE_URL",{"type":21,"tag":113,"props":287,"children":288},{"style":211},[289],{"type":26,"value":290}," =",{"type":21,"tag":113,"props":292,"children":293},{"style":126},[294],{"type":26,"value":295}," \"https://mywebsite.com\"\n",{"type":21,"tag":113,"props":297,"children":299},{"class":115,"line":298},5,[300,304,309,313],{"type":21,"tag":113,"props":301,"children":302},{"style":211},[303],{"type":26,"value":280},{"type":21,"tag":113,"props":305,"children":306},{"style":132},[307],{"type":26,"value":308}," AUTHOR_NAME",{"type":21,"tag":113,"props":310,"children":311},{"style":211},[312],{"type":26,"value":290},{"type":21,"tag":113,"props":314,"children":315},{"style":126},[316],{"type":26,"value":317}," \"Firstname Lastname\"\n",{"type":21,"tag":113,"props":319,"children":321},{"class":115,"line":320},6,[322],{"type":21,"tag":113,"props":323,"children":324},{"emptyLinePlaceholder":268},[325],{"type":26,"value":271},{"type":21,"tag":113,"props":327,"children":329},{"class":115,"line":328},7,[330,335,340,345,350,355,360,366,371,376],{"type":21,"tag":113,"props":331,"children":332},{"style":211},[333],{"type":26,"value":334},"export",{"type":21,"tag":113,"props":336,"children":337},{"style":211},[338],{"type":26,"value":339}," default",{"type":21,"tag":113,"props":341,"children":342},{"style":120},[343],{"type":26,"value":344}," defineEventHandler",{"type":21,"tag":113,"props":346,"children":347},{"style":217},[348],{"type":26,"value":349},"(",{"type":21,"tag":113,"props":351,"children":352},{"style":211},[353],{"type":26,"value":354},"async",{"type":21,"tag":113,"props":356,"children":357},{"style":217},[358],{"type":26,"value":359}," (",{"type":21,"tag":113,"props":361,"children":363},{"style":362},"--shiki-default:#E36209",[364],{"type":26,"value":365},"event",{"type":21,"tag":113,"props":367,"children":368},{"style":217},[369],{"type":26,"value":370},") ",{"type":21,"tag":113,"props":372,"children":373},{"style":211},[374],{"type":26,"value":375},"=>",{"type":21,"tag":113,"props":377,"children":378},{"style":217},[379],{"type":26,"value":380}," {\n",{"type":21,"tag":113,"props":382,"children":384},{"class":115,"line":383},8,[385],{"type":21,"tag":113,"props":386,"children":387},{"emptyLinePlaceholder":268},[388],{"type":26,"value":271},{"type":21,"tag":113,"props":390,"children":392},{"class":115,"line":391},9,[393,398,403,407,412,417],{"type":21,"tag":113,"props":394,"children":395},{"style":211},[396],{"type":26,"value":397}," const",{"type":21,"tag":113,"props":399,"children":400},{"style":132},[401],{"type":26,"value":402}," feed",{"type":21,"tag":113,"props":404,"children":405},{"style":211},[406],{"type":26,"value":290},{"type":21,"tag":113,"props":408,"children":409},{"style":211},[410],{"type":26,"value":411}," new",{"type":21,"tag":113,"props":413,"children":414},{"style":120},[415],{"type":26,"value":416}," Feed",{"type":21,"tag":113,"props":418,"children":419},{"style":217},[420],{"type":26,"value":421},"({\n",{"type":21,"tag":113,"props":423,"children":425},{"class":115,"line":424},10,[426,431,436],{"type":21,"tag":113,"props":427,"children":428},{"style":217},[429],{"type":26,"value":430}," title: ",{"type":21,"tag":113,"props":432,"children":433},{"style":126},[434],{"type":26,"value":435},"\"My Title\"",{"type":21,"tag":113,"props":437,"children":438},{"style":217},[439],{"type":26,"value":440},",\n",{"type":21,"tag":113,"props":442,"children":444},{"class":115,"line":443},11,[445,450,455],{"type":21,"tag":113,"props":446,"children":447},{"style":217},[448],{"type":26,"value":449}," description: ",{"type":21,"tag":113,"props":451,"children":452},{"style":126},[453],{"type":26,"value":454},"\"My Description\"",{"type":21,"tag":113,"props":456,"children":457},{"style":217},[458],{"type":26,"value":440},{"type":21,"tag":113,"props":460,"children":462},{"class":115,"line":461},12,[463,468,473],{"type":21,"tag":113,"props":464,"children":465},{"style":217},[466],{"type":26,"value":467}," id: ",{"type":21,"tag":113,"props":469,"children":470},{"style":132},[471],{"type":26,"value":472},"BASE_URL",{"type":21,"tag":113,"props":474,"children":475},{"style":217},[476],{"type":26,"value":440},{"type":21,"tag":113,"props":478,"children":480},{"class":115,"line":479},13,[481,486,490],{"type":21,"tag":113,"props":482,"children":483},{"style":217},[484],{"type":26,"value":485}," link: ",{"type":21,"tag":113,"props":487,"children":488},{"style":132},[489],{"type":26,"value":472},{"type":21,"tag":113,"props":491,"children":492},{"style":217},[493],{"type":26,"value":440},{"type":21,"tag":113,"props":495,"children":497},{"class":115,"line":496},14,[498,503,508],{"type":21,"tag":113,"props":499,"children":500},{"style":217},[501],{"type":26,"value":502}," language: ",{"type":21,"tag":113,"props":504,"children":505},{"style":126},[506],{"type":26,"value":507},"\"en\"",{"type":21,"tag":113,"props":509,"children":510},{"style":217},[511],{"type":26,"value":440},{"type":21,"tag":113,"props":513,"children":515},{"class":115,"line":514},15,[516,521,526,530,535],{"type":21,"tag":113,"props":517,"children":518},{"style":217},[519],{"type":26,"value":520}," image: ",{"type":21,"tag":113,"props":522,"children":523},{"style":126},[524],{"type":26,"value":525},"`${",{"type":21,"tag":113,"props":527,"children":528},{"style":132},[529],{"type":26,"value":472},{"type":21,"tag":113,"props":531,"children":532},{"style":126},[533],{"type":26,"value":534},"}/images/placeholder.png`",{"type":21,"tag":113,"props":536,"children":537},{"style":217},[538],{"type":26,"value":440},{"type":21,"tag":113,"props":540,"children":542},{"class":115,"line":541},16,[543,548,552,556,561],{"type":21,"tag":113,"props":544,"children":545},{"style":217},[546],{"type":26,"value":547}," favicon: ",{"type":21,"tag":113,"props":549,"children":550},{"style":126},[551],{"type":26,"value":525},{"type":21,"tag":113,"props":553,"children":554},{"style":132},[555],{"type":26,"value":472},{"type":21,"tag":113,"props":557,"children":558},{"style":126},[559],{"type":26,"value":560},"}/favicon.ico`",{"type":21,"tag":113,"props":562,"children":563},{"style":217},[564],{"type":26,"value":440},{"type":21,"tag":113,"props":566,"children":568},{"class":115,"line":567},17,[569,574,579,584,589,594,599,604,609,614,619],{"type":21,"tag":113,"props":570,"children":571},{"style":217},[572],{"type":26,"value":573}," copyright: ",{"type":21,"tag":113,"props":575,"children":576},{"style":126},[577],{"type":26,"value":578},"`All rights reserved ${",{"type":21,"tag":113,"props":580,"children":581},{"style":211},[582],{"type":26,"value":583},"new",{"type":21,"tag":113,"props":585,"children":586},{"style":120},[587],{"type":26,"value":588}," Date",{"type":21,"tag":113,"props":590,"children":591},{"style":126},[592],{"type":26,"value":593},"().",{"type":21,"tag":113,"props":595,"children":596},{"style":120},[597],{"type":26,"value":598},"getFullYear",{"type":21,"tag":113,"props":600,"children":601},{"style":126},[602],{"type":26,"value":603},"()",{"type":21,"tag":113,"props":605,"children":606},{"style":126},[607],{"type":26,"value":608},"}, ${",{"type":21,"tag":113,"props":610,"children":611},{"style":132},[612],{"type":26,"value":613},"AUTHOR_NAME",{"type":21,"tag":113,"props":615,"children":616},{"style":126},[617],{"type":26,"value":618},"}`",{"type":21,"tag":113,"props":620,"children":621},{"style":217},[622],{"type":26,"value":440},{"type":21,"tag":113,"props":624,"children":626},{"class":115,"line":625},18,[627,632,636,640],{"type":21,"tag":113,"props":628,"children":629},{"style":217},[630],{"type":26,"value":631}," updated: ",{"type":21,"tag":113,"props":633,"children":634},{"style":211},[635],{"type":26,"value":583},{"type":21,"tag":113,"props":637,"children":638},{"style":120},[639],{"type":26,"value":588},{"type":21,"tag":113,"props":641,"children":642},{"style":217},[643],{"type":26,"value":644},"(),\n",{"type":21,"tag":113,"props":646,"children":648},{"class":115,"line":647},19,[649,654,659],{"type":21,"tag":113,"props":650,"children":651},{"style":217},[652],{"type":26,"value":653}," generator: ",{"type":21,"tag":113,"props":655,"children":656},{"style":126},[657],{"type":26,"value":658},"\"Nuxt static site generation + Feed for Node.js\"",{"type":21,"tag":113,"props":660,"children":661},{"style":217},[662],{"type":26,"value":440},{"type":21,"tag":113,"props":664,"children":666},{"class":115,"line":665},20,[667],{"type":21,"tag":113,"props":668,"children":669},{"style":217},[670],{"type":26,"value":671}," feedLinks: {\n",{"type":21,"tag":113,"props":673,"children":675},{"class":115,"line":674},21,[676,681,685,689],{"type":21,"tag":113,"props":677,"children":678},{"style":217},[679],{"type":26,"value":680}," atom: ",{"type":21,"tag":113,"props":682,"children":683},{"style":126},[684],{"type":26,"value":525},{"type":21,"tag":113,"props":686,"children":687},{"style":132},[688],{"type":26,"value":472},{"type":21,"tag":113,"props":690,"children":691},{"style":126},[692],{"type":26,"value":693},"}/atom`\n",{"type":21,"tag":113,"props":695,"children":697},{"class":115,"line":696},22,[698],{"type":21,"tag":113,"props":699,"children":700},{"style":217},[701],{"type":26,"value":702}," },\n",{"type":21,"tag":113,"props":704,"children":706},{"class":115,"line":705},23,[707],{"type":21,"tag":113,"props":708,"children":709},{"style":217},[710],{"type":26,"value":711}," author: {\n",{"type":21,"tag":113,"props":713,"children":715},{"class":115,"line":714},24,[716,721,725],{"type":21,"tag":113,"props":717,"children":718},{"style":217},[719],{"type":26,"value":720}," name: ",{"type":21,"tag":113,"props":722,"children":723},{"style":132},[724],{"type":26,"value":613},{"type":21,"tag":113,"props":726,"children":727},{"style":217},[728],{"type":26,"value":440},{"type":21,"tag":113,"props":730,"children":732},{"class":115,"line":731},25,[733],{"type":21,"tag":113,"props":734,"children":735},{"style":217},[736],{"type":26,"value":737}," }\n",{"type":21,"tag":113,"props":739,"children":741},{"class":115,"line":740},26,[742],{"type":21,"tag":113,"props":743,"children":744},{"style":217},[745],{"type":26,"value":746}," });\n",{"type":21,"tag":113,"props":748,"children":750},{"class":115,"line":749},27,[751],{"type":21,"tag":113,"props":752,"children":753},{"emptyLinePlaceholder":268},[754],{"type":26,"value":271},{"type":21,"tag":113,"props":756,"children":758},{"class":115,"line":757},28,[759,763,768,772,777,782,787,792],{"type":21,"tag":113,"props":760,"children":761},{"style":211},[762],{"type":26,"value":397},{"type":21,"tag":113,"props":764,"children":765},{"style":132},[766],{"type":26,"value":767}," articles",{"type":21,"tag":113,"props":769,"children":770},{"style":211},[771],{"type":26,"value":290},{"type":21,"tag":113,"props":773,"children":774},{"style":211},[775],{"type":26,"value":776}," await",{"type":21,"tag":113,"props":778,"children":779},{"style":120},[780],{"type":26,"value":781}," serverQueryContent",{"type":21,"tag":113,"props":783,"children":784},{"style":217},[785],{"type":26,"value":786},"(event).",{"type":21,"tag":113,"props":788,"children":789},{"style":120},[790],{"type":26,"value":791},"find",{"type":21,"tag":113,"props":793,"children":794},{"style":217},[795],{"type":26,"value":796},"();\n",{"type":21,"tag":113,"props":798,"children":800},{"class":115,"line":799},29,[801],{"type":21,"tag":113,"props":802,"children":803},{"emptyLinePlaceholder":268},[804],{"type":26,"value":271},{"type":21,"tag":113,"props":806,"children":808},{"class":115,"line":807},30,[809,814,819,824,829,833,837],{"type":21,"tag":113,"props":810,"children":811},{"style":217},[812],{"type":26,"value":813}," articles.",{"type":21,"tag":113,"props":815,"children":816},{"style":120},[817],{"type":26,"value":818},"forEach",{"type":21,"tag":113,"props":820,"children":821},{"style":217},[822],{"type":26,"value":823},"((",{"type":21,"tag":113,"props":825,"children":826},{"style":362},[827],{"type":26,"value":828},"article",{"type":21,"tag":113,"props":830,"children":831},{"style":217},[832],{"type":26,"value":370},{"type":21,"tag":113,"props":834,"children":835},{"style":211},[836],{"type":26,"value":375},{"type":21,"tag":113,"props":838,"children":839},{"style":217},[840],{"type":26,"value":380},{"type":21,"tag":113,"props":842,"children":844},{"class":115,"line":843},31,[845,850,855],{"type":21,"tag":113,"props":846,"children":847},{"style":217},[848],{"type":26,"value":849}," feed.",{"type":21,"tag":113,"props":851,"children":852},{"style":120},[853],{"type":26,"value":854},"addItem",{"type":21,"tag":113,"props":856,"children":857},{"style":217},[858],{"type":26,"value":421},{"type":21,"tag":113,"props":860,"children":862},{"class":115,"line":861},32,[863,868,873,878,883,888],{"type":21,"tag":113,"props":864,"children":865},{"style":217},[866],{"type":26,"value":867}," title: article.title ",{"type":21,"tag":113,"props":869,"children":870},{"style":211},[871],{"type":26,"value":872},"?",{"type":21,"tag":113,"props":874,"children":875},{"style":217},[876],{"type":26,"value":877}," article.title ",{"type":21,"tag":113,"props":879,"children":880},{"style":211},[881],{"type":26,"value":882},":",{"type":21,"tag":113,"props":884,"children":885},{"style":126},[886],{"type":26,"value":887}," \"Missing Title\"",{"type":21,"tag":113,"props":889,"children":890},{"style":217},[891],{"type":26,"value":440},{"type":21,"tag":113,"props":893,"children":895},{"class":115,"line":894},33,[896],{"type":21,"tag":113,"props":897,"children":898},{"style":217},[899],{"type":26,"value":900}," id: article._path,\n",{"type":21,"tag":113,"props":902,"children":904},{"class":115,"line":903},34,[905,910,914,918,923,927,931,936,940],{"type":21,"tag":113,"props":906,"children":907},{"style":217},[908],{"type":26,"value":909}," link: ",{"type":21,"tag":113,"props":911,"children":912},{"style":126},[913],{"type":26,"value":525},{"type":21,"tag":113,"props":915,"children":916},{"style":132},[917],{"type":26,"value":472},{"type":21,"tag":113,"props":919,"children":920},{"style":126},[921],{"type":26,"value":922},"}${",{"type":21,"tag":113,"props":924,"children":925},{"style":217},[926],{"type":26,"value":828},{"type":21,"tag":113,"props":928,"children":929},{"style":126},[930],{"type":26,"value":161},{"type":21,"tag":113,"props":932,"children":933},{"style":217},[934],{"type":26,"value":935},"_path",{"type":21,"tag":113,"props":937,"children":938},{"style":126},[939],{"type":26,"value":618},{"type":21,"tag":113,"props":941,"children":942},{"style":217},[943],{"type":26,"value":440},{"type":21,"tag":113,"props":945,"children":947},{"class":115,"line":946},35,[948],{"type":21,"tag":113,"props":949,"children":950},{"style":217},[951],{"type":26,"value":952}," description: article.description,\n",{"type":21,"tag":113,"props":954,"children":956},{"class":115,"line":955},36,[957],{"type":21,"tag":113,"props":958,"children":959},{"style":217},[960],{"type":26,"value":961}," author: [\n",{"type":21,"tag":113,"props":963,"children":965},{"class":115,"line":964},37,[966],{"type":21,"tag":113,"props":967,"children":968},{"style":217},[969],{"type":26,"value":970}," {\n",{"type":21,"tag":113,"props":972,"children":974},{"class":115,"line":973},38,[975,980,984],{"type":21,"tag":113,"props":976,"children":977},{"style":217},[978],{"type":26,"value":979}," name: ",{"type":21,"tag":113,"props":981,"children":982},{"style":132},[983],{"type":26,"value":613},{"type":21,"tag":113,"props":985,"children":986},{"style":217},[987],{"type":26,"value":440},{"type":21,"tag":113,"props":989,"children":991},{"class":115,"line":990},39,[992],{"type":21,"tag":113,"props":993,"children":994},{"style":217},[995],{"type":26,"value":996}," },\n",{"type":21,"tag":113,"props":998,"children":1000},{"class":115,"line":999},40,[1001],{"type":21,"tag":113,"props":1002,"children":1003},{"style":217},[1004],{"type":26,"value":1005}," ],\n",{"type":21,"tag":113,"props":1007,"children":1009},{"class":115,"line":1008},41,[1010,1015,1019,1023],{"type":21,"tag":113,"props":1011,"children":1012},{"style":217},[1013],{"type":26,"value":1014}," date: ",{"type":21,"tag":113,"props":1016,"children":1017},{"style":211},[1018],{"type":26,"value":583},{"type":21,"tag":113,"props":1020,"children":1021},{"style":120},[1022],{"type":26,"value":588},{"type":21,"tag":113,"props":1024,"children":1025},{"style":217},[1026],{"type":26,"value":1027},"(article.date),\n",{"type":21,"tag":113,"props":1029,"children":1031},{"class":115,"line":1030},42,[1032,1037,1041,1046,1050,1055,1059,1063,1068,1072,1077],{"type":21,"tag":113,"props":1033,"children":1034},{"style":217},[1035],{"type":26,"value":1036}," image: article.cover_image ",{"type":21,"tag":113,"props":1038,"children":1039},{"style":211},[1040],{"type":26,"value":872},{"type":21,"tag":113,"props":1042,"children":1043},{"style":126},[1044],{"type":26,"value":1045}," `${",{"type":21,"tag":113,"props":1047,"children":1048},{"style":132},[1049],{"type":26,"value":472},{"type":21,"tag":113,"props":1051,"children":1052},{"style":126},[1053],{"type":26,"value":1054},"}/${",{"type":21,"tag":113,"props":1056,"children":1057},{"style":217},[1058],{"type":26,"value":828},{"type":21,"tag":113,"props":1060,"children":1061},{"style":126},[1062],{"type":26,"value":161},{"type":21,"tag":113,"props":1064,"children":1065},{"style":217},[1066],{"type":26,"value":1067},"cover_image",{"type":21,"tag":113,"props":1069,"children":1070},{"style":126},[1071],{"type":26,"value":618},{"type":21,"tag":113,"props":1073,"children":1074},{"style":211},[1075],{"type":26,"value":1076}," :",{"type":21,"tag":113,"props":1078,"children":1079},{"style":132},[1080],{"type":26,"value":1081}," undefined\n",{"type":21,"tag":113,"props":1083,"children":1085},{"class":115,"line":1084},43,[1086],{"type":21,"tag":113,"props":1087,"children":1088},{"style":217},[1089],{"type":26,"value":1090}," });\n",{"type":21,"tag":113,"props":1092,"children":1094},{"class":115,"line":1093},44,[1095],{"type":21,"tag":113,"props":1096,"children":1097},{"style":217},[1098],{"type":26,"value":746},{"type":21,"tag":113,"props":1100,"children":1102},{"class":115,"line":1101},45,[1103],{"type":21,"tag":113,"props":1104,"children":1105},{"emptyLinePlaceholder":268},[1106],{"type":26,"value":271},{"type":21,"tag":113,"props":1108,"children":1110},{"class":115,"line":1109},46,[1111,1116,1121,1126],{"type":21,"tag":113,"props":1112,"children":1113},{"style":211},[1114],{"type":26,"value":1115}," return",{"type":21,"tag":113,"props":1117,"children":1118},{"style":217},[1119],{"type":26,"value":1120}," feed.",{"type":21,"tag":113,"props":1122,"children":1123},{"style":120},[1124],{"type":26,"value":1125},"atom1",{"type":21,"tag":113,"props":1127,"children":1128},{"style":217},[1129],{"type":26,"value":796},{"type":21,"tag":113,"props":1131,"children":1133},{"class":115,"line":1132},47,[1134],{"type":21,"tag":113,"props":1135,"children":1136},{"style":217},[1137],{"type":26,"value":1138},"});\n",{"type":21,"tag":22,"props":1140,"children":1141},{},[1142,1144,1150,1152,1158,1160,1166,1168,1174],{"type":26,"value":1143},"And that's just about it! Except, if you are statically generating your website with the ",{"type":21,"tag":109,"props":1145,"children":1147},{"className":1146},[],[1148],{"type":26,"value":1149},"nuxt generate",{"type":26,"value":1151}," command, you will need to configure this server-side route to be pre-rendered on site generation. This is as simple as adding a ",{"type":21,"tag":109,"props":1153,"children":1155},{"className":1154},[],[1156],{"type":26,"value":1157},"nitro",{"type":26,"value":1159}," ",{"type":21,"tag":109,"props":1161,"children":1163},{"className":1162},[],[1164],{"type":26,"value":1165},"prerender",{"type":26,"value":1167}," definition in your ",{"type":21,"tag":109,"props":1169,"children":1171},{"className":1170},[],[1172],{"type":26,"value":1173},"nuxt.config.ts",{"type":26,"value":1175}," file, like so:",{"type":21,"tag":102,"props":1177,"children":1179},{"className":199,"code":1178,"language":201,"meta":7,"style":7},"nitro: {\n prerender: {\n routes: ['/atom']\n }\n}\n",[1180],{"type":21,"tag":109,"props":1181,"children":1182},{"__ignoreMap":7},[1183,1195,1207,1230,1238],{"type":21,"tag":113,"props":1184,"children":1185},{"class":115,"line":116},[1186,1190],{"type":21,"tag":113,"props":1187,"children":1188},{"style":120},[1189],{"type":26,"value":1157},{"type":21,"tag":113,"props":1191,"children":1192},{"style":217},[1193],{"type":26,"value":1194},": {\n",{"type":21,"tag":113,"props":1196,"children":1197},{"class":115,"line":238},[1198,1203],{"type":21,"tag":113,"props":1199,"children":1200},{"style":120},[1201],{"type":26,"value":1202}," prerender",{"type":21,"tag":113,"props":1204,"children":1205},{"style":217},[1206],{"type":26,"value":1194},{"type":21,"tag":113,"props":1208,"children":1209},{"class":115,"line":264},[1210,1215,1220,1225],{"type":21,"tag":113,"props":1211,"children":1212},{"style":120},[1213],{"type":26,"value":1214}," routes",{"type":21,"tag":113,"props":1216,"children":1217},{"style":217},[1218],{"type":26,"value":1219},": [",{"type":21,"tag":113,"props":1221,"children":1222},{"style":126},[1223],{"type":26,"value":1224},"'/atom'",{"type":21,"tag":113,"props":1226,"children":1227},{"style":217},[1228],{"type":26,"value":1229},"]\n",{"type":21,"tag":113,"props":1231,"children":1232},{"class":115,"line":274},[1233],{"type":21,"tag":113,"props":1234,"children":1235},{"style":217},[1236],{"type":26,"value":1237}," }\n",{"type":21,"tag":113,"props":1239,"children":1240},{"class":115,"line":298},[1241],{"type":21,"tag":113,"props":1242,"children":1243},{"style":217},[1244],{"type":26,"value":1245},"}\n",{"type":21,"tag":52,"props":1247,"children":1249},{"id":1248},"bonus",[1250],{"type":26,"value":1251},"Bonus",{"type":21,"tag":22,"props":1253,"children":1254},{},[1255,1257,1263],{"type":26,"value":1256},"You may also be interested in adding a ",{"type":21,"tag":109,"props":1258,"children":1260},{"className":1259},[],[1261],{"type":26,"value":1262},"sitemap.xml",{"type":26,"value":1264}," to your website. This can be done in almost an identical fashion!",{"type":21,"tag":22,"props":1266,"children":1267},{},[1268],{"type":26,"value":1269},"Install the dependency:",{"type":21,"tag":102,"props":1271,"children":1273},{"className":104,"code":1272,"language":106,"meta":7,"style":7},"npm i -D sitemap\n",[1274],{"type":21,"tag":109,"props":1275,"children":1276},{"__ignoreMap":7},[1277],{"type":21,"tag":113,"props":1278,"children":1279},{"class":115,"line":116},[1280,1284,1288,1292],{"type":21,"tag":113,"props":1281,"children":1282},{"style":120},[1283],{"type":26,"value":123},{"type":21,"tag":113,"props":1285,"children":1286},{"style":126},[1287],{"type":26,"value":129},{"type":21,"tag":113,"props":1289,"children":1290},{"style":132},[1291],{"type":26,"value":135},{"type":21,"tag":113,"props":1293,"children":1294},{"style":126},[1295],{"type":26,"value":1296}," sitemap\n",{"type":21,"tag":22,"props":1298,"children":1299},{},[1300,1302,1308],{"type":26,"value":1301},"Create a route at ",{"type":21,"tag":109,"props":1303,"children":1305},{"className":1304},[],[1306],{"type":26,"value":1307},"server/routes/sitemap.xml.ts",{"type":26,"value":882},{"type":21,"tag":102,"props":1310,"children":1312},{"className":199,"code":1311,"language":201,"meta":7,"style":7},"import { serverQueryContent } from '#content/server';\nimport { SitemapStream, streamToPromise } from 'sitemap';\n\nexport default defineEventHandler(async (event) => {\n const articles = await serverQueryContent(event).find();\n\n const sitemap = new SitemapStream({ hostname: 'https://my-website.com/' });\n\n // Add non nuxt content endpoints here\n sitemap.write({ url: '/' });\n sitemap.write({ url: '/articles' });\n\n // Dynamically generate routes for Nuxt markdown content\n articles.forEach((article) => sitemap.write({ url: article._path, changefreq: 'monthly' }));\n sitemap.end();\n\n return (await streamToPromise(sitemap));\n});\n",[1313],{"type":21,"tag":109,"props":1314,"children":1315},{"__ignoreMap":7},[1316,1339,1364,1371,1414,1449,1456,1496,1503,1512,1539,1563,1570,1578,1629,1645,1652,1678],{"type":21,"tag":113,"props":1317,"children":1318},{"class":115,"line":116},[1319,1323,1327,1331,1335],{"type":21,"tag":113,"props":1320,"children":1321},{"style":211},[1322],{"type":26,"value":214},{"type":21,"tag":113,"props":1324,"children":1325},{"style":217},[1326],{"type":26,"value":220},{"type":21,"tag":113,"props":1328,"children":1329},{"style":211},[1330],{"type":26,"value":225},{"type":21,"tag":113,"props":1332,"children":1333},{"style":126},[1334],{"type":26,"value":230},{"type":21,"tag":113,"props":1336,"children":1337},{"style":217},[1338],{"type":26,"value":235},{"type":21,"tag":113,"props":1340,"children":1341},{"class":115,"line":238},[1342,1346,1351,1355,1360],{"type":21,"tag":113,"props":1343,"children":1344},{"style":211},[1345],{"type":26,"value":214},{"type":21,"tag":113,"props":1347,"children":1348},{"style":217},[1349],{"type":26,"value":1350}," { SitemapStream, streamToPromise } ",{"type":21,"tag":113,"props":1352,"children":1353},{"style":211},[1354],{"type":26,"value":225},{"type":21,"tag":113,"props":1356,"children":1357},{"style":126},[1358],{"type":26,"value":1359}," 'sitemap'",{"type":21,"tag":113,"props":1361,"children":1362},{"style":217},[1363],{"type":26,"value":235},{"type":21,"tag":113,"props":1365,"children":1366},{"class":115,"line":264},[1367],{"type":21,"tag":113,"props":1368,"children":1369},{"emptyLinePlaceholder":268},[1370],{"type":26,"value":271},{"type":21,"tag":113,"props":1372,"children":1373},{"class":115,"line":274},[1374,1378,1382,1386,1390,1394,1398,1402,1406,1410],{"type":21,"tag":113,"props":1375,"children":1376},{"style":211},[1377],{"type":26,"value":334},{"type":21,"tag":113,"props":1379,"children":1380},{"style":211},[1381],{"type":26,"value":339},{"type":21,"tag":113,"props":1383,"children":1384},{"style":120},[1385],{"type":26,"value":344},{"type":21,"tag":113,"props":1387,"children":1388},{"style":217},[1389],{"type":26,"value":349},{"type":21,"tag":113,"props":1391,"children":1392},{"style":211},[1393],{"type":26,"value":354},{"type":21,"tag":113,"props":1395,"children":1396},{"style":217},[1397],{"type":26,"value":359},{"type":21,"tag":113,"props":1399,"children":1400},{"style":362},[1401],{"type":26,"value":365},{"type":21,"tag":113,"props":1403,"children":1404},{"style":217},[1405],{"type":26,"value":370},{"type":21,"tag":113,"props":1407,"children":1408},{"style":211},[1409],{"type":26,"value":375},{"type":21,"tag":113,"props":1411,"children":1412},{"style":217},[1413],{"type":26,"value":380},{"type":21,"tag":113,"props":1415,"children":1416},{"class":115,"line":298},[1417,1421,1425,1429,1433,1437,1441,1445],{"type":21,"tag":113,"props":1418,"children":1419},{"style":211},[1420],{"type":26,"value":397},{"type":21,"tag":113,"props":1422,"children":1423},{"style":132},[1424],{"type":26,"value":767},{"type":21,"tag":113,"props":1426,"children":1427},{"style":211},[1428],{"type":26,"value":290},{"type":21,"tag":113,"props":1430,"children":1431},{"style":211},[1432],{"type":26,"value":776},{"type":21,"tag":113,"props":1434,"children":1435},{"style":120},[1436],{"type":26,"value":781},{"type":21,"tag":113,"props":1438,"children":1439},{"style":217},[1440],{"type":26,"value":786},{"type":21,"tag":113,"props":1442,"children":1443},{"style":120},[1444],{"type":26,"value":791},{"type":21,"tag":113,"props":1446,"children":1447},{"style":217},[1448],{"type":26,"value":796},{"type":21,"tag":113,"props":1450,"children":1451},{"class":115,"line":320},[1452],{"type":21,"tag":113,"props":1453,"children":1454},{"emptyLinePlaceholder":268},[1455],{"type":26,"value":271},{"type":21,"tag":113,"props":1457,"children":1458},{"class":115,"line":328},[1459,1463,1468,1472,1476,1481,1486,1491],{"type":21,"tag":113,"props":1460,"children":1461},{"style":211},[1462],{"type":26,"value":397},{"type":21,"tag":113,"props":1464,"children":1465},{"style":132},[1466],{"type":26,"value":1467}," sitemap",{"type":21,"tag":113,"props":1469,"children":1470},{"style":211},[1471],{"type":26,"value":290},{"type":21,"tag":113,"props":1473,"children":1474},{"style":211},[1475],{"type":26,"value":411},{"type":21,"tag":113,"props":1477,"children":1478},{"style":120},[1479],{"type":26,"value":1480}," SitemapStream",{"type":21,"tag":113,"props":1482,"children":1483},{"style":217},[1484],{"type":26,"value":1485},"({ hostname: ",{"type":21,"tag":113,"props":1487,"children":1488},{"style":126},[1489],{"type":26,"value":1490},"'https://my-website.com/'",{"type":21,"tag":113,"props":1492,"children":1493},{"style":217},[1494],{"type":26,"value":1495}," });\n",{"type":21,"tag":113,"props":1497,"children":1498},{"class":115,"line":383},[1499],{"type":21,"tag":113,"props":1500,"children":1501},{"emptyLinePlaceholder":268},[1502],{"type":26,"value":271},{"type":21,"tag":113,"props":1504,"children":1505},{"class":115,"line":391},[1506],{"type":21,"tag":113,"props":1507,"children":1509},{"style":1508},"--shiki-default:#6A737D",[1510],{"type":26,"value":1511}," // Add non nuxt content endpoints here\n",{"type":21,"tag":113,"props":1513,"children":1514},{"class":115,"line":424},[1515,1520,1525,1530,1535],{"type":21,"tag":113,"props":1516,"children":1517},{"style":217},[1518],{"type":26,"value":1519}," sitemap.",{"type":21,"tag":113,"props":1521,"children":1522},{"style":120},[1523],{"type":26,"value":1524},"write",{"type":21,"tag":113,"props":1526,"children":1527},{"style":217},[1528],{"type":26,"value":1529},"({ url: ",{"type":21,"tag":113,"props":1531,"children":1532},{"style":126},[1533],{"type":26,"value":1534},"'/'",{"type":21,"tag":113,"props":1536,"children":1537},{"style":217},[1538],{"type":26,"value":1495},{"type":21,"tag":113,"props":1540,"children":1541},{"class":115,"line":443},[1542,1546,1550,1554,1559],{"type":21,"tag":113,"props":1543,"children":1544},{"style":217},[1545],{"type":26,"value":1519},{"type":21,"tag":113,"props":1547,"children":1548},{"style":120},[1549],{"type":26,"value":1524},{"type":21,"tag":113,"props":1551,"children":1552},{"style":217},[1553],{"type":26,"value":1529},{"type":21,"tag":113,"props":1555,"children":1556},{"style":126},[1557],{"type":26,"value":1558},"'/articles'",{"type":21,"tag":113,"props":1560,"children":1561},{"style":217},[1562],{"type":26,"value":1495},{"type":21,"tag":113,"props":1564,"children":1565},{"class":115,"line":461},[1566],{"type":21,"tag":113,"props":1567,"children":1568},{"emptyLinePlaceholder":268},[1569],{"type":26,"value":271},{"type":21,"tag":113,"props":1571,"children":1572},{"class":115,"line":479},[1573],{"type":21,"tag":113,"props":1574,"children":1575},{"style":1508},[1576],{"type":26,"value":1577}," // Dynamically generate routes for Nuxt markdown content\n",{"type":21,"tag":113,"props":1579,"children":1580},{"class":115,"line":496},[1581,1585,1589,1593,1597,1601,1605,1610,1614,1619,1624],{"type":21,"tag":113,"props":1582,"children":1583},{"style":217},[1584],{"type":26,"value":813},{"type":21,"tag":113,"props":1586,"children":1587},{"style":120},[1588],{"type":26,"value":818},{"type":21,"tag":113,"props":1590,"children":1591},{"style":217},[1592],{"type":26,"value":823},{"type":21,"tag":113,"props":1594,"children":1595},{"style":362},[1596],{"type":26,"value":828},{"type":21,"tag":113,"props":1598,"children":1599},{"style":217},[1600],{"type":26,"value":370},{"type":21,"tag":113,"props":1602,"children":1603},{"style":211},[1604],{"type":26,"value":375},{"type":21,"tag":113,"props":1606,"children":1607},{"style":217},[1608],{"type":26,"value":1609}," sitemap.",{"type":21,"tag":113,"props":1611,"children":1612},{"style":120},[1613],{"type":26,"value":1524},{"type":21,"tag":113,"props":1615,"children":1616},{"style":217},[1617],{"type":26,"value":1618},"({ url: article._path, changefreq: ",{"type":21,"tag":113,"props":1620,"children":1621},{"style":126},[1622],{"type":26,"value":1623},"'monthly'",{"type":21,"tag":113,"props":1625,"children":1626},{"style":217},[1627],{"type":26,"value":1628}," }));\n",{"type":21,"tag":113,"props":1630,"children":1631},{"class":115,"line":514},[1632,1636,1641],{"type":21,"tag":113,"props":1633,"children":1634},{"style":217},[1635],{"type":26,"value":1519},{"type":21,"tag":113,"props":1637,"children":1638},{"style":120},[1639],{"type":26,"value":1640},"end",{"type":21,"tag":113,"props":1642,"children":1643},{"style":217},[1644],{"type":26,"value":796},{"type":21,"tag":113,"props":1646,"children":1647},{"class":115,"line":541},[1648],{"type":21,"tag":113,"props":1649,"children":1650},{"emptyLinePlaceholder":268},[1651],{"type":26,"value":271},{"type":21,"tag":113,"props":1653,"children":1654},{"class":115,"line":567},[1655,1659,1663,1668,1673],{"type":21,"tag":113,"props":1656,"children":1657},{"style":211},[1658],{"type":26,"value":1115},{"type":21,"tag":113,"props":1660,"children":1661},{"style":217},[1662],{"type":26,"value":359},{"type":21,"tag":113,"props":1664,"children":1665},{"style":211},[1666],{"type":26,"value":1667},"await",{"type":21,"tag":113,"props":1669,"children":1670},{"style":120},[1671],{"type":26,"value":1672}," streamToPromise",{"type":21,"tag":113,"props":1674,"children":1675},{"style":217},[1676],{"type":26,"value":1677},"(sitemap));\n",{"type":21,"tag":113,"props":1679,"children":1680},{"class":115,"line":625},[1681],{"type":21,"tag":113,"props":1682,"children":1683},{"style":217},[1684],{"type":26,"value":1138},{"type":21,"tag":22,"props":1686,"children":1687},{},[1688,1690,1695,1697,1702],{"type":26,"value":1689},"And add the ",{"type":21,"tag":109,"props":1691,"children":1693},{"className":1692},[],[1694],{"type":26,"value":1165},{"type":26,"value":1696}," entry in your ",{"type":21,"tag":109,"props":1698,"children":1700},{"className":1699},[],[1701],{"type":26,"value":1173},{"type":26,"value":882},{"type":21,"tag":102,"props":1704,"children":1706},{"className":199,"code":1705,"language":201,"meta":7,"style":7},"nitro: {\n prerender: {\n routes: ['/sitemap.xml', '/atom']\n }\n}\n",[1707],{"type":21,"tag":109,"props":1708,"children":1709},{"__ignoreMap":7},[1710,1721,1732,1761,1768],{"type":21,"tag":113,"props":1711,"children":1712},{"class":115,"line":116},[1713,1717],{"type":21,"tag":113,"props":1714,"children":1715},{"style":120},[1716],{"type":26,"value":1157},{"type":21,"tag":113,"props":1718,"children":1719},{"style":217},[1720],{"type":26,"value":1194},{"type":21,"tag":113,"props":1722,"children":1723},{"class":115,"line":238},[1724,1728],{"type":21,"tag":113,"props":1725,"children":1726},{"style":120},[1727],{"type":26,"value":1202},{"type":21,"tag":113,"props":1729,"children":1730},{"style":217},[1731],{"type":26,"value":1194},{"type":21,"tag":113,"props":1733,"children":1734},{"class":115,"line":264},[1735,1739,1743,1748,1753,1757],{"type":21,"tag":113,"props":1736,"children":1737},{"style":120},[1738],{"type":26,"value":1214},{"type":21,"tag":113,"props":1740,"children":1741},{"style":217},[1742],{"type":26,"value":1219},{"type":21,"tag":113,"props":1744,"children":1745},{"style":126},[1746],{"type":26,"value":1747},"'/sitemap.xml'",{"type":21,"tag":113,"props":1749,"children":1750},{"style":217},[1751],{"type":26,"value":1752},", ",{"type":21,"tag":113,"props":1754,"children":1755},{"style":126},[1756],{"type":26,"value":1224},{"type":21,"tag":113,"props":1758,"children":1759},{"style":217},[1760],{"type":26,"value":1229},{"type":21,"tag":113,"props":1762,"children":1763},{"class":115,"line":274},[1764],{"type":21,"tag":113,"props":1765,"children":1766},{"style":217},[1767],{"type":26,"value":1237},{"type":21,"tag":113,"props":1769,"children":1770},{"class":115,"line":298},[1771],{"type":21,"tag":113,"props":1772,"children":1773},{"style":217},[1774],{"type":26,"value":1245},{"type":21,"tag":1776,"props":1777,"children":1778},"style",{},[1779],{"type":26,"value":1780},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}",{"title":7,"searchDepth":238,"depth":238,"links":1782},[1783,1784,1785],{"id":54,"depth":238,"text":57},{"id":83,"depth":238,"text":86},{"id":1248,"depth":238,"text":1251},"markdown","content:articles:nuxt-content-rss-feed.md","content","articles/nuxt-content-rss-feed.md","articles/nuxt-content-rss-feed","md",1735327944762] \ No newline at end of file diff --git a/articles/nuxt-content-rss-feed/index.html b/articles/nuxt-content-rss-feed/index.html index bab96ec0..21a3f020 100644 --- a/articles/nuxt-content-rss-feed/index.html +++ b/articles/nuxt-content-rss-feed/index.html @@ -1,37 +1,37 @@ Colton Padden - + - - - - - + + + + + - + - - - - - - - - - - - - - + + + + + + + + + + + + + - -
            Category

            How To Add an RSS Feed to a Nuxt Website

            If you are a user of Nuxt Content and you wish to configure an RSS feed for your website, it's a surprisingly straight forward process! In this article, we will walk through the code changes required to host an RSS feed for both a statically generated, and Universal Nuxt application.

            Preface

            In version 2 of Nuxt, the community module, nuxt-community/feed-module was a popular choice for adding an RSS feed to your website. However, there has been an unresolved open issue since April 1st, 2022 to add support for Nuxt v3. Thankfully, implementing this feature without a module is relatively straight forward.

            Instructions

            First, install the feed library into your project:

            npm i -D feed
            +
            +
            Category

            How To Add an RSS Feed to a Nuxt Website

            If you are a user of Nuxt Content and you wish to configure an RSS feed for your website, it's a surprisingly straight forward process! In this article, we will walk through the code changes required to host an RSS feed for both a statically generated, and Universal Nuxt application.

            Preface

            In version 2 of Nuxt, the community module, nuxt-community/feed-module was a popular choice for adding an RSS feed to your website. However, there has been an unresolved open issue since April 1st, 2022 to add support for Nuxt v3. Thankfully, implementing this feature without a module is relatively straight forward.

            Instructions

            First, install the feed library into your project:

            npm i -D feed
             

            Then, create a server/ folder in your project if it does not already exist, and create a file named server/routes/atom.ts.

            Here, we will leverage the feed library and construct an XML representation of our Nuxt content. As you can see, we first define our feed with metadata associated with our RSS feed. This will be used by RSS readers to provide context to the end user. Then, we query our Nuxt content with serverQueryContent and append a feed.addItem for each article.

            import { serverQueryContent } from '#content/server';
             import { Feed } from 'feed';
             
            @@ -108,5 +108,5 @@
                 routes: ['/sitemap.xml', '/atom']
               }
             }
            -
            - \ No newline at end of file +
            + \ No newline at end of file diff --git a/articles/nuxt-v3-migration/_payload.json b/articles/nuxt-v3-migration/_payload.json index bd668461..8b6e48d2 100644 --- a/articles/nuxt-v3-migration/_payload.json +++ b/articles/nuxt-v3-migration/_payload.json @@ -1 +1 @@ -[{"data":1,"prerenderedAt":125},["ShallowReactive",2],{"page-data":3},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"date":10,"tags":11,"categories":13,"excerpt":15,"body":25,"_type":119,"_id":120,"_source":121,"_file":122,"_stem":123,"_extension":124},"/articles/nuxt-v3-migration","articles",false,"","This Website Has Been Migrated to Nuxt 3 🎉","This website has been migrated to the latest version of the Nuxt web framework, and with it comes all of the exciting goodies that the Vue and Nuxt teams have been concocting over the past few years.\nNot to mention, all of the great plugins in the Vue ecosystem!","2022-12-31",[12],"nuxt",[14],"web",{"type":16,"children":17},"root",[18],{"type":19,"tag":20,"props":21,"children":22},"element","p",{},[23],{"type":24,"value":9},"text",{"type":16,"children":26,"toc":116},[27,31,47,56,61,66,111],{"type":19,"tag":20,"props":28,"children":29},{},[30],{"type":24,"value":9},{"type":19,"tag":20,"props":32,"children":33},{},[34,36,45],{"type":24,"value":35},"If you're curious what changes were required to make the migration, you can check out ",{"type":19,"tag":37,"props":38,"children":42},"a",{"href":39,"rel":40},"https://github.com/cmpadden/cmpadden.github.io/pull/3",[41],"nofollow",[43],{"type":24,"value":44},"pull request #3",{"type":24,"value":46}," in the GitHub repository.",{"type":19,"tag":20,"props":48,"children":49},{},[50],{"type":19,"tag":51,"props":52,"children":55},"img",{"alt":53,"src":54},"Screenshot of Nuxt Migration Pull Request","/images/nuxt-migration-pr.png",[],{"type":19,"tag":20,"props":57,"children":58},{},[59],{"type":24,"value":60},"While the documentation for making this migration is great, there were many breaking changes, and the overall process was quite tedious.\nFor this reason, I opted to generate a new project entirely, and port existing code to this clean slate.\nI believe that this resulted in a project with a bit less cruft.",{"type":19,"tag":20,"props":62,"children":63},{},[64],{"type":24,"value":65},"The most valuable resources for making these changes include:",{"type":19,"tag":67,"props":68,"children":69},"ul",{},[70,81,91,101],{"type":19,"tag":71,"props":72,"children":73},"li",{},[74],{"type":19,"tag":37,"props":75,"children":78},{"href":76,"rel":77},"https://nuxt.com/docs/migration/overview",[41],[79],{"type":24,"value":80},"The Nuxt Migration Guide",{"type":19,"tag":71,"props":82,"children":83},{},[84],{"type":19,"tag":37,"props":85,"children":88},{"href":86,"rel":87},"https://nuxt.com/docs/getting-started/introduction",[41],[89],{"type":24,"value":90},"The Nuxt Framework Guide",{"type":19,"tag":71,"props":92,"children":93},{},[94],{"type":19,"tag":37,"props":95,"children":98},{"href":96,"rel":97},"https://tailwindcss.nuxt.dev/",[41],[99],{"type":24,"value":100},"Nuxt Tailwind Module Documentation",{"type":19,"tag":71,"props":102,"children":103},{},[104],{"type":19,"tag":37,"props":105,"children":108},{"href":106,"rel":107},"https://content.nuxtjs.org/",[41],[109],{"type":24,"value":110},"Nuxt Content Module Documentation",{"type":19,"tag":20,"props":112,"children":113},{},[114],{"type":24,"value":115},"Part of the delay for doing this upgrade was in waiting for module developers to support this major release.\nI'm super thankful for all of the hard work they've don, and I'm excited to explore all of the new features available!\nI just hope that the breaking changes in this release don't cause too much fracturing of the community, as it does feel like déjà vu of Python 2 and 3.",{"title":7,"searchDepth":117,"depth":117,"links":118},2,[],"markdown","content:articles:nuxt-v3-migration.md","content","articles/nuxt-v3-migration.md","articles/nuxt-v3-migration","md",1735276485213] \ No newline at end of file +[{"data":1,"prerenderedAt":125},["ShallowReactive",2],{"page-data":3},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"date":10,"tags":11,"categories":13,"excerpt":15,"body":25,"_type":119,"_id":120,"_source":121,"_file":122,"_stem":123,"_extension":124},"/articles/nuxt-v3-migration","articles",false,"","This Website Has Been Migrated to Nuxt 3 🎉","This website has been migrated to the latest version of the Nuxt web framework, and with it comes all of the exciting goodies that the Vue and Nuxt teams have been concocting over the past few years.\nNot to mention, all of the great plugins in the Vue ecosystem!","2022-12-31",[12],"nuxt",[14],"web",{"type":16,"children":17},"root",[18],{"type":19,"tag":20,"props":21,"children":22},"element","p",{},[23],{"type":24,"value":9},"text",{"type":16,"children":26,"toc":116},[27,31,47,56,61,66,111],{"type":19,"tag":20,"props":28,"children":29},{},[30],{"type":24,"value":9},{"type":19,"tag":20,"props":32,"children":33},{},[34,36,45],{"type":24,"value":35},"If you're curious what changes were required to make the migration, you can check out ",{"type":19,"tag":37,"props":38,"children":42},"a",{"href":39,"rel":40},"https://github.com/cmpadden/cmpadden.github.io/pull/3",[41],"nofollow",[43],{"type":24,"value":44},"pull request #3",{"type":24,"value":46}," in the GitHub repository.",{"type":19,"tag":20,"props":48,"children":49},{},[50],{"type":19,"tag":51,"props":52,"children":55},"img",{"alt":53,"src":54},"Screenshot of Nuxt Migration Pull Request","/images/nuxt-migration-pr.png",[],{"type":19,"tag":20,"props":57,"children":58},{},[59],{"type":24,"value":60},"While the documentation for making this migration is great, there were many breaking changes, and the overall process was quite tedious.\nFor this reason, I opted to generate a new project entirely, and port existing code to this clean slate.\nI believe that this resulted in a project with a bit less cruft.",{"type":19,"tag":20,"props":62,"children":63},{},[64],{"type":24,"value":65},"The most valuable resources for making these changes include:",{"type":19,"tag":67,"props":68,"children":69},"ul",{},[70,81,91,101],{"type":19,"tag":71,"props":72,"children":73},"li",{},[74],{"type":19,"tag":37,"props":75,"children":78},{"href":76,"rel":77},"https://nuxt.com/docs/migration/overview",[41],[79],{"type":24,"value":80},"The Nuxt Migration Guide",{"type":19,"tag":71,"props":82,"children":83},{},[84],{"type":19,"tag":37,"props":85,"children":88},{"href":86,"rel":87},"https://nuxt.com/docs/getting-started/introduction",[41],[89],{"type":24,"value":90},"The Nuxt Framework Guide",{"type":19,"tag":71,"props":92,"children":93},{},[94],{"type":19,"tag":37,"props":95,"children":98},{"href":96,"rel":97},"https://tailwindcss.nuxt.dev/",[41],[99],{"type":24,"value":100},"Nuxt Tailwind Module Documentation",{"type":19,"tag":71,"props":102,"children":103},{},[104],{"type":19,"tag":37,"props":105,"children":108},{"href":106,"rel":107},"https://content.nuxtjs.org/",[41],[109],{"type":24,"value":110},"Nuxt Content Module Documentation",{"type":19,"tag":20,"props":112,"children":113},{},[114],{"type":24,"value":115},"Part of the delay for doing this upgrade was in waiting for module developers to support this major release.\nI'm super thankful for all of the hard work they've don, and I'm excited to explore all of the new features available!\nI just hope that the breaking changes in this release don't cause too much fracturing of the community, as it does feel like déjà vu of Python 2 and 3.",{"title":7,"searchDepth":117,"depth":117,"links":118},2,[],"markdown","content:articles:nuxt-v3-migration.md","content","articles/nuxt-v3-migration.md","articles/nuxt-v3-migration","md",1735327945026] \ No newline at end of file diff --git a/articles/nuxt-v3-migration/index.html b/articles/nuxt-v3-migration/index.html index 2f152911..e818fa7c 100644 --- a/articles/nuxt-v3-migration/index.html +++ b/articles/nuxt-v3-migration/index.html @@ -1,36 +1,36 @@ Colton Padden - + - - - - - + + + + + - + - - - - - - - - - - - + + + + + + + + + + + - -
            Category
            Tags

            This Website Has Been Migrated to Nuxt 3 🎉

            This website has been migrated to the latest version of the Nuxt web framework, and with it comes all of the exciting goodies that the Vue and Nuxt teams have been concocting over the past few years. + +

            Category
            Tags

            This Website Has Been Migrated to Nuxt 3 🎉

            This website has been migrated to the latest version of the Nuxt web framework, and with it comes all of the exciting goodies that the Vue and Nuxt teams have been concocting over the past few years. Not to mention, all of the great plugins in the Vue ecosystem!

            If you're curious what changes were required to make the migration, you can check out pull request #3 in the GitHub repository.

            Screenshot of Nuxt Migration Pull Request

            While the documentation for making this migration is great, there were many breaking changes, and the overall process was quite tedious. For this reason, I opted to generate a new project entirely, and port existing code to this clean slate. I believe that this resulted in a project with a bit less cruft.

            The most valuable resources for making these changes include:

            Part of the delay for doing this upgrade was in waiting for module developers to support this major release. I'm super thankful for all of the hard work they've don, and I'm excited to explore all of the new features available! -I just hope that the breaking changes in this release don't cause too much fracturing of the community, as it does feel like déjà vu of Python 2 and 3.

            - \ No newline at end of file +I just hope that the breaking changes in this release don't cause too much fracturing of the community, as it does feel like déjà vu of Python 2 and 3.

            + \ No newline at end of file diff --git a/articles/persistent-archlinux-usb/_payload.json b/articles/persistent-archlinux-usb/_payload.json index 0bb1f4dd..0df805ae 100644 --- a/articles/persistent-archlinux-usb/_payload.json +++ b/articles/persistent-archlinux-usb/_payload.json @@ -1 +1 @@ -[{"data":1,"prerenderedAt":1337},["ShallowReactive",2],{"page-data":3},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"date":10,"draft":6,"tags":11,"categories":14,"excerpt":16,"body":26,"_type":1331,"_id":1332,"_source":1333,"_file":1334,"_stem":1335,"_extension":1336},"/articles/persistent-archlinux-usb","articles",false,"","Create a Persistent Arch Linux Bootable USB with Vagrant","When installing a linux distribution, it is common for the instructions to have\nthe user create a bootable USB, boot from the device, and proceed with the\ninstallation procedure from that live medium. However, this blog post will\noutline an alternative approach where a virtual machine created with Vagrant\nwill be used in favor of the live medium.","2020-01-09",[12,13],"vagrant","archlinux",[15],"linux",{"type":17,"children":18},"root",[19],{"type":20,"tag":21,"props":22,"children":23},"element","p",{},[24],{"type":25,"value":9},"text",{"type":17,"children":27,"toc":1320},[28,32,39,85,91,98,115,152,165,190,246,354,367,388,654,660,674,681,705,825,831,846,885,908,941,947,1002,1067,1073,1081,1089,1097,1120,1128,1133,1138,1144,1174,1204,1210,1314],{"type":20,"tag":21,"props":29,"children":30},{},[31],{"type":25,"value":9},{"type":20,"tag":33,"props":34,"children":36},"h1",{"id":35},"preface",[37],{"type":25,"value":38},"Preface",{"type":20,"tag":21,"props":40,"children":41},{},[42,44,51,53,83],{"type":25,"value":43},"The original intention was to use Docker for this process -- leveraging the\n",{"type":20,"tag":45,"props":46,"children":48},"code",{"className":47},[],[49],{"type":25,"value":50},"--device",{"type":25,"value":52}," flag and mounting the target USB device in the Docker container,\nbut the underlying hypervisor in Docker Desktop for Mac does not support this.\n",{"type":20,"tag":54,"props":55,"children":56},"sup",{},[57,66,68,75,76],{"type":20,"tag":58,"props":59,"children":63},"a",{"href":60,"rel":61},"https://docs.docker.com/docker-for-mac/docker-toolbox/",[62],"nofollow",[64],{"type":25,"value":65},"1",{"type":25,"value":67}," ",{"type":20,"tag":58,"props":69,"children":72},{"href":70,"rel":71},"https://github.com/moby/hyperkit",[62],[73],{"type":25,"value":74},"2",{"type":25,"value":67},{"type":20,"tag":58,"props":77,"children":80},{"href":78,"rel":79},"https://github.com/docker/for-mac/issues/900",[62],[81],{"type":25,"value":82},"3",{"type":25,"value":84}," While there are workarounds using Docker\nMachine, Vagrant felt like the path of least resistance.",{"type":20,"tag":33,"props":86,"children":88},{"id":87},"instructions",[89],{"type":25,"value":90},"Instructions",{"type":20,"tag":92,"props":93,"children":95},"h2",{"id":94},"create-an-arch-linux-virtual-machine-with-vagrant",[96],{"type":25,"value":97},"Create an Arch Linux Virtual Machine with Vagrant",{"type":20,"tag":21,"props":99,"children":100},{},[101,103,113],{"type":25,"value":102},"Get the latest Arch Linux image ",{"type":20,"tag":54,"props":104,"children":105},{},[106],{"type":20,"tag":58,"props":107,"children":110},{"href":108,"rel":109},"https://app.vagrantup.com/archlinux/boxes/archlinux",[62],[111],{"type":25,"value":112},"4",{"type":25,"value":114}," from the Vagrant Cloud Box\nCatalog.",{"type":20,"tag":116,"props":117,"children":121},"pre",{"code":118,"language":119,"meta":7,"className":120,"style":7},"vagrant box add archlinux/archlinux\n","bash","language-bash shiki shiki-themes github-light",[122],{"type":20,"tag":45,"props":123,"children":124},{"__ignoreMap":7},[125],{"type":20,"tag":126,"props":127,"children":130},"span",{"class":128,"line":129},"line",1,[131,136,142,147],{"type":20,"tag":126,"props":132,"children":134},{"style":133},"--shiki-default:#6F42C1",[135],{"type":25,"value":12},{"type":20,"tag":126,"props":137,"children":139},{"style":138},"--shiki-default:#032F62",[140],{"type":25,"value":141}," box",{"type":20,"tag":126,"props":143,"children":144},{"style":138},[145],{"type":25,"value":146}," add",{"type":20,"tag":126,"props":148,"children":149},{"style":138},[150],{"type":25,"value":151}," archlinux/archlinux\n",{"type":20,"tag":21,"props":153,"children":154},{},[155,157,163],{"type":25,"value":156},"Determine the USB vendor information for the thumb-drive that we will\npass-through to the virtual machine. Using the ",{"type":20,"tag":45,"props":158,"children":160},{"className":159},[],[161],{"type":25,"value":162},"VBoxManage",{"type":25,"value":164}," utility that comes\nwith Virtual Box, list the devices, and make note of the Vendor and Product ID.",{"type":20,"tag":116,"props":166,"children":168},{"code":167,"language":119,"meta":7,"className":120,"style":7}," VBoxManage list usbhost\n",[169],{"type":20,"tag":45,"props":170,"children":171},{"__ignoreMap":7},[172],{"type":20,"tag":126,"props":173,"children":174},{"class":128,"line":129},[175,180,185],{"type":20,"tag":126,"props":176,"children":177},{"style":133},[178],{"type":25,"value":179}," VBoxManage",{"type":20,"tag":126,"props":181,"children":182},{"style":138},[183],{"type":25,"value":184}," list",{"type":20,"tag":126,"props":186,"children":187},{"style":138},[188],{"type":25,"value":189}," usbhost\n",{"type":20,"tag":21,"props":191,"children":192},{},[193,195,201,203,209,211,229,231,237,239,244],{"type":25,"value":194},"Create a ",{"type":20,"tag":45,"props":196,"children":198},{"className":197},[],[199],{"type":25,"value":200},"Vagrantfile",{"type":25,"value":202}," with ",{"type":20,"tag":45,"props":204,"children":206},{"className":205},[],[207],{"type":25,"value":208},"archlinx/archlinux",{"type":25,"value":210}," as the target box, and the USB\ndevice information that is passed through. ",{"type":20,"tag":54,"props":212,"children":213},{},[214,221,222],{"type":20,"tag":58,"props":215,"children":218},{"href":216,"rel":217},"https://antonyjepson.wordpress.com/2012/01/26/quickly-attaching-usb-devices-to-virtualbox-guests-using-vboxmanage/",[62],[219],{"type":25,"value":220},"5",{"type":25,"value":67},{"type":20,"tag":58,"props":223,"children":226},{"href":224,"rel":225},"https://gist.github.com/dscape/7d829c0c116ef419f963",[62],[227],{"type":25,"value":228},"6",{"type":25,"value":230}," Vagrant\noffers a handy customization parameter ",{"type":20,"tag":45,"props":232,"children":234},{"className":233},[],[235],{"type":25,"value":236},"vb.customize",{"type":25,"value":238}," that calls the\n",{"type":20,"tag":45,"props":240,"children":242},{"className":241},[],[243],{"type":25,"value":162},{"type":25,"value":245}," command under-the-hood, allowing one to enable the guest machine\nto access the host machine's USB devices.",{"type":20,"tag":116,"props":247,"children":251},{"code":248,"language":249,"meta":7,"className":250,"style":7},"# -*- mode: ruby -*-\n# vi: set ft=ruby :\n\nVagrant.configure(\"2\") do |config|\n config.vm.box = \"archlinux/archlinux\"\n config.vm.provider \"virtualbox\" do |vb|\n vb.name = \"archlinux\"\n vb.customize ['modifyvm', :id, '--usb', 'on']\n vb.customize ['usbfilter', 'add', '1', '--target', :id, '--name', 'SanDisk Ultra Fit', '--vendorid', '0x0781', '--productid', '0x5583']\n end\nend\n","txt","language-txt shiki shiki-themes github-light",[252],{"type":20,"tag":45,"props":253,"children":254},{"__ignoreMap":7},[255,263,272,282,291,300,309,318,327,336,345],{"type":20,"tag":126,"props":256,"children":257},{"class":128,"line":129},[258],{"type":20,"tag":126,"props":259,"children":260},{},[261],{"type":25,"value":262},"# -*- mode: ruby -*-\n",{"type":20,"tag":126,"props":264,"children":266},{"class":128,"line":265},2,[267],{"type":20,"tag":126,"props":268,"children":269},{},[270],{"type":25,"value":271},"# vi: set ft=ruby :\n",{"type":20,"tag":126,"props":273,"children":275},{"class":128,"line":274},3,[276],{"type":20,"tag":126,"props":277,"children":279},{"emptyLinePlaceholder":278},true,[280],{"type":25,"value":281},"\n",{"type":20,"tag":126,"props":283,"children":285},{"class":128,"line":284},4,[286],{"type":20,"tag":126,"props":287,"children":288},{},[289],{"type":25,"value":290},"Vagrant.configure(\"2\") do |config|\n",{"type":20,"tag":126,"props":292,"children":294},{"class":128,"line":293},5,[295],{"type":20,"tag":126,"props":296,"children":297},{},[298],{"type":25,"value":299}," config.vm.box = \"archlinux/archlinux\"\n",{"type":20,"tag":126,"props":301,"children":303},{"class":128,"line":302},6,[304],{"type":20,"tag":126,"props":305,"children":306},{},[307],{"type":25,"value":308}," config.vm.provider \"virtualbox\" do |vb|\n",{"type":20,"tag":126,"props":310,"children":312},{"class":128,"line":311},7,[313],{"type":20,"tag":126,"props":314,"children":315},{},[316],{"type":25,"value":317}," vb.name = \"archlinux\"\n",{"type":20,"tag":126,"props":319,"children":321},{"class":128,"line":320},8,[322],{"type":20,"tag":126,"props":323,"children":324},{},[325],{"type":25,"value":326}," vb.customize ['modifyvm', :id, '--usb', 'on']\n",{"type":20,"tag":126,"props":328,"children":330},{"class":128,"line":329},9,[331],{"type":20,"tag":126,"props":332,"children":333},{},[334],{"type":25,"value":335}," vb.customize ['usbfilter', 'add', '1', '--target', :id, '--name', 'SanDisk Ultra Fit', '--vendorid', '0x0781', '--productid', '0x5583']\n",{"type":20,"tag":126,"props":337,"children":339},{"class":128,"line":338},10,[340],{"type":20,"tag":126,"props":341,"children":342},{},[343],{"type":25,"value":344}," end\n",{"type":20,"tag":126,"props":346,"children":348},{"class":128,"line":347},11,[349],{"type":20,"tag":126,"props":350,"children":351},{},[352],{"type":25,"value":353},"end\n",{"type":20,"tag":21,"props":355,"children":356},{},[357,359,365],{"type":25,"value":358},"When virtual machine is brought up, the ",{"type":20,"tag":45,"props":360,"children":362},{"className":361},[],[363],{"type":25,"value":364},"usbfilter",{"type":25,"value":366}," is applied, and the guest\nis able to access to the host machine's USB device that was specified in the\nfilter.",{"type":20,"tag":21,"props":368,"children":369},{},[370,372,378,380,386],{"type":25,"value":371},"Start the machine, ",{"type":20,"tag":45,"props":373,"children":375},{"className":374},[],[376],{"type":25,"value":377},"ssh",{"type":25,"value":379}," into the guest, and list the devices to confirm that\nthe USB device is available (see: ",{"type":20,"tag":45,"props":381,"children":383},{"className":382},[],[384],{"type":25,"value":385},"/dev/sdb",{"type":25,"value":387},").",{"type":20,"tag":116,"props":389,"children":391},{"code":390,"language":119,"meta":7,"className":120,"style":7},"$ vagrant up\n$ vagrant ssh\n[vagrant@archlinux ~]$ lsblk\nNAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT\nsda 8:0 0 20G 0 disk\n├─sda1 8:1 0 1.9G 0 part [SWAP]\n└─sda2 8:2 0 18.1G 0 part /\nsdb 8:16 1 28.7G 0 disk\n└─sdb1 8:17 1 8G 0 part\n",[392],{"type":20,"tag":45,"props":393,"children":394},{"__ignoreMap":7},[395,413,429,449,487,521,557,592,623],{"type":20,"tag":126,"props":396,"children":397},{"class":128,"line":129},[398,403,408],{"type":20,"tag":126,"props":399,"children":400},{"style":133},[401],{"type":25,"value":402},"$",{"type":20,"tag":126,"props":404,"children":405},{"style":138},[406],{"type":25,"value":407}," vagrant",{"type":20,"tag":126,"props":409,"children":410},{"style":138},[411],{"type":25,"value":412}," up\n",{"type":20,"tag":126,"props":414,"children":415},{"class":128,"line":265},[416,420,424],{"type":20,"tag":126,"props":417,"children":418},{"style":133},[419],{"type":25,"value":402},{"type":20,"tag":126,"props":421,"children":422},{"style":138},[423],{"type":25,"value":407},{"type":20,"tag":126,"props":425,"children":426},{"style":138},[427],{"type":25,"value":428}," ssh\n",{"type":20,"tag":126,"props":430,"children":431},{"class":128,"line":274},[432,438,444],{"type":20,"tag":126,"props":433,"children":435},{"style":434},"--shiki-default:#24292E",[436],{"type":25,"value":437},"[vagrant@archlinux ",{"type":20,"tag":126,"props":439,"children":441},{"style":440},"--shiki-default:#D73A49",[442],{"type":25,"value":443},"~",{"type":20,"tag":126,"props":445,"children":446},{"style":434},[447],{"type":25,"value":448},"]$ lsblk\n",{"type":20,"tag":126,"props":450,"children":451},{"class":128,"line":284},[452,457,462,467,472,477,482],{"type":20,"tag":126,"props":453,"children":454},{"style":133},[455],{"type":25,"value":456},"NAME",{"type":20,"tag":126,"props":458,"children":459},{"style":138},[460],{"type":25,"value":461}," MAJ:MIN",{"type":20,"tag":126,"props":463,"children":464},{"style":138},[465],{"type":25,"value":466}," RM",{"type":20,"tag":126,"props":468,"children":469},{"style":138},[470],{"type":25,"value":471}," SIZE",{"type":20,"tag":126,"props":473,"children":474},{"style":138},[475],{"type":25,"value":476}," RO",{"type":20,"tag":126,"props":478,"children":479},{"style":138},[480],{"type":25,"value":481}," TYPE",{"type":20,"tag":126,"props":483,"children":484},{"style":138},[485],{"type":25,"value":486}," MOUNTPOINT\n",{"type":20,"tag":126,"props":488,"children":489},{"class":128,"line":293},[490,495,500,506,511,516],{"type":20,"tag":126,"props":491,"children":492},{"style":133},[493],{"type":25,"value":494},"sda",{"type":20,"tag":126,"props":496,"children":497},{"style":138},[498],{"type":25,"value":499}," 8:0",{"type":20,"tag":126,"props":501,"children":503},{"style":502},"--shiki-default:#005CC5",[504],{"type":25,"value":505}," 0",{"type":20,"tag":126,"props":507,"children":508},{"style":138},[509],{"type":25,"value":510}," 20G",{"type":20,"tag":126,"props":512,"children":513},{"style":502},[514],{"type":25,"value":515}," 0",{"type":20,"tag":126,"props":517,"children":518},{"style":138},[519],{"type":25,"value":520}," disk\n",{"type":20,"tag":126,"props":522,"children":523},{"class":128,"line":302},[524,529,534,538,543,547,552],{"type":20,"tag":126,"props":525,"children":526},{"style":133},[527],{"type":25,"value":528},"├─sda1",{"type":20,"tag":126,"props":530,"children":531},{"style":138},[532],{"type":25,"value":533}," 8:1",{"type":20,"tag":126,"props":535,"children":536},{"style":502},[537],{"type":25,"value":505},{"type":20,"tag":126,"props":539,"children":540},{"style":138},[541],{"type":25,"value":542}," 1.9G",{"type":20,"tag":126,"props":544,"children":545},{"style":502},[546],{"type":25,"value":515},{"type":20,"tag":126,"props":548,"children":549},{"style":138},[550],{"type":25,"value":551}," part",{"type":20,"tag":126,"props":553,"children":554},{"style":434},[555],{"type":25,"value":556}," [SWAP]\n",{"type":20,"tag":126,"props":558,"children":559},{"class":128,"line":311},[560,565,570,574,579,583,587],{"type":20,"tag":126,"props":561,"children":562},{"style":133},[563],{"type":25,"value":564},"└─sda2",{"type":20,"tag":126,"props":566,"children":567},{"style":138},[568],{"type":25,"value":569}," 8:2",{"type":20,"tag":126,"props":571,"children":572},{"style":502},[573],{"type":25,"value":505},{"type":20,"tag":126,"props":575,"children":576},{"style":138},[577],{"type":25,"value":578}," 18.1G",{"type":20,"tag":126,"props":580,"children":581},{"style":502},[582],{"type":25,"value":515},{"type":20,"tag":126,"props":584,"children":585},{"style":138},[586],{"type":25,"value":551},{"type":20,"tag":126,"props":588,"children":589},{"style":138},[590],{"type":25,"value":591}," /\n",{"type":20,"tag":126,"props":593,"children":594},{"class":128,"line":320},[595,600,605,610,615,619],{"type":20,"tag":126,"props":596,"children":597},{"style":133},[598],{"type":25,"value":599},"sdb",{"type":20,"tag":126,"props":601,"children":602},{"style":138},[603],{"type":25,"value":604}," 8:16",{"type":20,"tag":126,"props":606,"children":607},{"style":502},[608],{"type":25,"value":609}," 1",{"type":20,"tag":126,"props":611,"children":612},{"style":138},[613],{"type":25,"value":614}," 28.7G",{"type":20,"tag":126,"props":616,"children":617},{"style":502},[618],{"type":25,"value":515},{"type":20,"tag":126,"props":620,"children":621},{"style":138},[622],{"type":25,"value":520},{"type":20,"tag":126,"props":624,"children":625},{"class":128,"line":329},[626,631,636,640,645,649],{"type":20,"tag":126,"props":627,"children":628},{"style":133},[629],{"type":25,"value":630},"└─sdb1",{"type":20,"tag":126,"props":632,"children":633},{"style":138},[634],{"type":25,"value":635}," 8:17",{"type":20,"tag":126,"props":637,"children":638},{"style":502},[639],{"type":25,"value":609},{"type":20,"tag":126,"props":641,"children":642},{"style":138},[643],{"type":25,"value":644}," 8G",{"type":20,"tag":126,"props":646,"children":647},{"style":502},[648],{"type":25,"value":515},{"type":20,"tag":126,"props":650,"children":651},{"style":138},[652],{"type":25,"value":653}," part\n",{"type":20,"tag":92,"props":655,"children":657},{"id":656},"install-arch-linux-on-the-usb-drive",[658],{"type":25,"value":659},"Install Arch Linux on the USB Drive",{"type":20,"tag":21,"props":661,"children":662},{},[663,665,672],{"type":25,"value":664},"The ",{"type":20,"tag":58,"props":666,"children":669},{"href":667,"rel":668},"https://wiki.archlinux.org/index.php/Installation_guide",[62],[670],{"type":25,"value":671},"Arch Linux Installation Guide",{"type":25,"value":673}," outlines the installation procedure in\ngreat detail -- the following steps follow this closely with a few alteration\ndue to installing onto removable media.",{"type":20,"tag":675,"props":676,"children":678},"h3",{"id":677},"partition-the-disk-uefi-with-gpt",[679],{"type":25,"value":680},"Partition the Disk (UEFI with GPT)",{"type":20,"tag":116,"props":682,"children":684},{"code":683,"language":119,"meta":7,"className":120,"style":7},"[root@archlinux ~]# fdisk /dev/sdb\n",[685],{"type":20,"tag":45,"props":686,"children":687},{"__ignoreMap":7},[688],{"type":20,"tag":126,"props":689,"children":690},{"class":128,"line":129},[691,696,700],{"type":20,"tag":126,"props":692,"children":693},{"style":434},[694],{"type":25,"value":695},"[root@archlinux ",{"type":20,"tag":126,"props":697,"children":698},{"style":440},[699],{"type":25,"value":443},{"type":20,"tag":126,"props":701,"children":702},{"style":434},[703],{"type":25,"value":704},"]# fdisk /dev/sdb\n",{"type":20,"tag":116,"props":706,"children":708},{"code":707,"language":249,"meta":7,"className":250,"style":7},"Command (m for help): p\nDisk /dev/sdb: 28.66 GiB, 30752636928 bytes, 60063744 sectors\nDisk model: Ultra Fit\nUnits: sectors of 1 * 512 = 512 bytes\nSector size (logical/physical): 512 bytes / 512 bytes\nI/O size (minimum/optimal): 512 bytes / 512 bytes\nDisklabel type: gpt\nDisk identifier: E1D6C445-1B79-AB4D-A442-FA4AD6DF4ECC\n\nDevice Start End Sectors Size Type\n/dev/sdb1 2048 1050623 1048576 512M EFI System\n/dev/sdb2 1050624 60063710 59013087 28.1G Linux filesystem\n\nFilesystem/RAID signature on partition 1 will be wiped.\n",[709],{"type":20,"tag":45,"props":710,"children":711},{"__ignoreMap":7},[712,720,728,736,744,752,760,768,776,783,791,799,808,816],{"type":20,"tag":126,"props":713,"children":714},{"class":128,"line":129},[715],{"type":20,"tag":126,"props":716,"children":717},{},[718],{"type":25,"value":719},"Command (m for help): p\n",{"type":20,"tag":126,"props":721,"children":722},{"class":128,"line":265},[723],{"type":20,"tag":126,"props":724,"children":725},{},[726],{"type":25,"value":727},"Disk /dev/sdb: 28.66 GiB, 30752636928 bytes, 60063744 sectors\n",{"type":20,"tag":126,"props":729,"children":730},{"class":128,"line":274},[731],{"type":20,"tag":126,"props":732,"children":733},{},[734],{"type":25,"value":735},"Disk model: Ultra Fit\n",{"type":20,"tag":126,"props":737,"children":738},{"class":128,"line":284},[739],{"type":20,"tag":126,"props":740,"children":741},{},[742],{"type":25,"value":743},"Units: sectors of 1 * 512 = 512 bytes\n",{"type":20,"tag":126,"props":745,"children":746},{"class":128,"line":293},[747],{"type":20,"tag":126,"props":748,"children":749},{},[750],{"type":25,"value":751},"Sector size (logical/physical): 512 bytes / 512 bytes\n",{"type":20,"tag":126,"props":753,"children":754},{"class":128,"line":302},[755],{"type":20,"tag":126,"props":756,"children":757},{},[758],{"type":25,"value":759},"I/O size (minimum/optimal): 512 bytes / 512 bytes\n",{"type":20,"tag":126,"props":761,"children":762},{"class":128,"line":311},[763],{"type":20,"tag":126,"props":764,"children":765},{},[766],{"type":25,"value":767},"Disklabel type: gpt\n",{"type":20,"tag":126,"props":769,"children":770},{"class":128,"line":320},[771],{"type":20,"tag":126,"props":772,"children":773},{},[774],{"type":25,"value":775},"Disk identifier: E1D6C445-1B79-AB4D-A442-FA4AD6DF4ECC\n",{"type":20,"tag":126,"props":777,"children":778},{"class":128,"line":329},[779],{"type":20,"tag":126,"props":780,"children":781},{"emptyLinePlaceholder":278},[782],{"type":25,"value":281},{"type":20,"tag":126,"props":784,"children":785},{"class":128,"line":338},[786],{"type":20,"tag":126,"props":787,"children":788},{},[789],{"type":25,"value":790},"Device Start End Sectors Size Type\n",{"type":20,"tag":126,"props":792,"children":793},{"class":128,"line":347},[794],{"type":20,"tag":126,"props":795,"children":796},{},[797],{"type":25,"value":798},"/dev/sdb1 2048 1050623 1048576 512M EFI System\n",{"type":20,"tag":126,"props":800,"children":802},{"class":128,"line":801},12,[803],{"type":20,"tag":126,"props":804,"children":805},{},[806],{"type":25,"value":807},"/dev/sdb2 1050624 60063710 59013087 28.1G Linux filesystem\n",{"type":20,"tag":126,"props":809,"children":811},{"class":128,"line":810},13,[812],{"type":20,"tag":126,"props":813,"children":814},{"emptyLinePlaceholder":278},[815],{"type":25,"value":281},{"type":20,"tag":126,"props":817,"children":819},{"class":128,"line":818},14,[820],{"type":20,"tag":126,"props":821,"children":822},{},[823],{"type":25,"value":824},"Filesystem/RAID signature on partition 1 will be wiped.\n",{"type":20,"tag":675,"props":826,"children":828},{"id":827},"format-the-partitions",[829],{"type":25,"value":830},"Format the Partitions",{"type":20,"tag":21,"props":832,"children":833},{},[834,836],{"type":25,"value":835},"The UEFI specification mandates support for FAT file-systems, and FAT32 is\nrecommended for removable media. ",{"type":20,"tag":54,"props":837,"children":838},{},[839],{"type":20,"tag":58,"props":840,"children":843},{"href":841,"rel":842},"https://wiki.archlinux.org/index.php/EFI_system_partition#Format_the_partition",[62],[844],{"type":25,"value":845},"7",{"type":20,"tag":116,"props":847,"children":849},{"code":848,"language":119,"meta":7,"className":120,"style":7},"[root@archlinux ~]# pacman -Sy dosfstools\n[root@archlinux ~]# mkfs.fat -F32 /dev/sdb1\n",[850],{"type":20,"tag":45,"props":851,"children":852},{"__ignoreMap":7},[853,869],{"type":20,"tag":126,"props":854,"children":855},{"class":128,"line":129},[856,860,864],{"type":20,"tag":126,"props":857,"children":858},{"style":434},[859],{"type":25,"value":695},{"type":20,"tag":126,"props":861,"children":862},{"style":440},[863],{"type":25,"value":443},{"type":20,"tag":126,"props":865,"children":866},{"style":434},[867],{"type":25,"value":868},"]# pacman -Sy dosfstools\n",{"type":20,"tag":126,"props":870,"children":871},{"class":128,"line":265},[872,876,880],{"type":20,"tag":126,"props":873,"children":874},{"style":434},[875],{"type":25,"value":695},{"type":20,"tag":126,"props":877,"children":878},{"style":440},[879],{"type":25,"value":443},{"type":20,"tag":126,"props":881,"children":882},{"style":434},[883],{"type":25,"value":884},"]# mkfs.fat -F32 /dev/sdb1\n",{"type":20,"tag":21,"props":886,"children":887},{},[888,890,896,898],{"type":25,"value":889},"As for the root partition, it is recommended to use ",{"type":20,"tag":45,"props":891,"children":893},{"className":892},[],[894],{"type":25,"value":895},"ext4",{"type":25,"value":897}," without a journal to\nreduce the reads and writes to the file-system as this is detrimental to the\nflash-based USB drive. ",{"type":20,"tag":54,"props":899,"children":900},{},[901],{"type":20,"tag":58,"props":902,"children":905},{"href":903,"rel":904},"https://wiki.archlinux.org/index.php/Install_Arch_Linux_on_a_USB_key#Installation_tweaks",[62],[906],{"type":25,"value":907},"8",{"type":20,"tag":116,"props":909,"children":911},{"code":910,"language":119,"meta":7,"className":120,"style":7},"[root@archlinux ~]# mkfs.ext4 -O \"^has_journal\" /dev/sdb2\n",[912],{"type":20,"tag":45,"props":913,"children":914},{"__ignoreMap":7},[915],{"type":20,"tag":126,"props":916,"children":917},{"class":128,"line":129},[918,922,926,931,936],{"type":20,"tag":126,"props":919,"children":920},{"style":434},[921],{"type":25,"value":695},{"type":20,"tag":126,"props":923,"children":924},{"style":440},[925],{"type":25,"value":443},{"type":20,"tag":126,"props":927,"children":928},{"style":434},[929],{"type":25,"value":930},"]# mkfs.ext4 -O ",{"type":20,"tag":126,"props":932,"children":933},{"style":138},[934],{"type":25,"value":935},"\"^has_journal\"",{"type":20,"tag":126,"props":937,"children":938},{"style":434},[939],{"type":25,"value":940}," /dev/sdb2\n",{"type":20,"tag":675,"props":942,"children":944},{"id":943},"mount-the-partitions-and-bootstrap-the-environment",[945],{"type":25,"value":946},"Mount the Partitions and Bootstrap the Environment",{"type":20,"tag":116,"props":948,"children":950},{"code":949,"language":119,"meta":7,"className":120,"style":7},"[root@archlinux ~]# mount /dev/sdb2 /mnt\n[root@archlinux ~]# mkdir -p /mnt/boot/efi\n[root@archlinux ~]# mount /dev/sdb1 /mnt/boot/efi\n",[951],{"type":20,"tag":45,"props":952,"children":953},{"__ignoreMap":7},[954,970,986],{"type":20,"tag":126,"props":955,"children":956},{"class":128,"line":129},[957,961,965],{"type":20,"tag":126,"props":958,"children":959},{"style":434},[960],{"type":25,"value":695},{"type":20,"tag":126,"props":962,"children":963},{"style":440},[964],{"type":25,"value":443},{"type":20,"tag":126,"props":966,"children":967},{"style":434},[968],{"type":25,"value":969},"]# mount /dev/sdb2 /mnt\n",{"type":20,"tag":126,"props":971,"children":972},{"class":128,"line":265},[973,977,981],{"type":20,"tag":126,"props":974,"children":975},{"style":434},[976],{"type":25,"value":695},{"type":20,"tag":126,"props":978,"children":979},{"style":440},[980],{"type":25,"value":443},{"type":20,"tag":126,"props":982,"children":983},{"style":434},[984],{"type":25,"value":985},"]# mkdir -p /mnt/boot/efi\n",{"type":20,"tag":126,"props":987,"children":988},{"class":128,"line":274},[989,993,997],{"type":20,"tag":126,"props":990,"children":991},{"style":434},[992],{"type":25,"value":695},{"type":20,"tag":126,"props":994,"children":995},{"style":440},[996],{"type":25,"value":443},{"type":20,"tag":126,"props":998,"children":999},{"style":434},[1000],{"type":25,"value":1001},"]# mount /dev/sdb1 /mnt/boot/efi\n",{"type":20,"tag":116,"props":1003,"children":1005},{"code":1004,"language":119,"meta":7,"className":120,"style":7},"[root@archlinux ~]# pacman -S arch-install-scripts\n[root@archlinux ~]# pacstrap /mnt base linux linux-firmware\n[root@archlinux ~]# genfstab -U /mnt >> /mnt/etc/fstab\n",[1006],{"type":20,"tag":45,"props":1007,"children":1008},{"__ignoreMap":7},[1009,1025,1041],{"type":20,"tag":126,"props":1010,"children":1011},{"class":128,"line":129},[1012,1016,1020],{"type":20,"tag":126,"props":1013,"children":1014},{"style":434},[1015],{"type":25,"value":695},{"type":20,"tag":126,"props":1017,"children":1018},{"style":440},[1019],{"type":25,"value":443},{"type":20,"tag":126,"props":1021,"children":1022},{"style":434},[1023],{"type":25,"value":1024},"]# pacman -S arch-install-scripts\n",{"type":20,"tag":126,"props":1026,"children":1027},{"class":128,"line":265},[1028,1032,1036],{"type":20,"tag":126,"props":1029,"children":1030},{"style":434},[1031],{"type":25,"value":695},{"type":20,"tag":126,"props":1033,"children":1034},{"style":440},[1035],{"type":25,"value":443},{"type":20,"tag":126,"props":1037,"children":1038},{"style":434},[1039],{"type":25,"value":1040},"]# pacstrap /mnt base linux linux-firmware\n",{"type":20,"tag":126,"props":1042,"children":1043},{"class":128,"line":274},[1044,1048,1052,1057,1062],{"type":20,"tag":126,"props":1045,"children":1046},{"style":434},[1047],{"type":25,"value":695},{"type":20,"tag":126,"props":1049,"children":1050},{"style":440},[1051],{"type":25,"value":443},{"type":20,"tag":126,"props":1053,"children":1054},{"style":434},[1055],{"type":25,"value":1056},"]# genfstab -U /mnt ",{"type":20,"tag":126,"props":1058,"children":1059},{"style":440},[1060],{"type":25,"value":1061},">>",{"type":20,"tag":126,"props":1063,"children":1064},{"style":434},[1065],{"type":25,"value":1066}," /mnt/etc/fstab\n",{"type":20,"tag":675,"props":1068,"children":1070},{"id":1069},"configure-the-new-environment",[1071],{"type":25,"value":1072},"Configure the New Environment",{"type":20,"tag":116,"props":1074,"children":1076},{"code":1075},"[root@archlinux ~]# arch-chroot /mnt\n",[1077],{"type":20,"tag":45,"props":1078,"children":1079},{"__ignoreMap":7},[1080],{"type":25,"value":1075},{"type":20,"tag":116,"props":1082,"children":1084},{"code":1083},"[root@archlinux /]# ln -sf /usr/share/zoneinfo/US/Eastern /etc/localtime\n[root@archlinux /]# hwclock --systohc\n[root@archlinux /]# sed -i 's/#en_US.UTF-8/en_US.UTF-8/' /etc/locale.gen\n[root@archlinux /]# locale-gen\n[root@archlinux /]# echo \"LANG=en_US.UTF-8\" > /etc/locale.conf\n",[1085],{"type":20,"tag":45,"props":1086,"children":1087},{"__ignoreMap":7},[1088],{"type":25,"value":1083},{"type":20,"tag":116,"props":1090,"children":1092},{"code":1091},"[root@archlinux /]# hostnamectl set-hostname usb\n[root@archlinux /]# echo \"127.0.0.1 localhost\" >> /etc/hosts\n[root@archlinux /]# echo \"::1 localhost\" >> /etc/hosts\n",[1093],{"type":20,"tag":45,"props":1094,"children":1095},{"__ignoreMap":7},[1096],{"type":25,"value":1091},{"type":20,"tag":21,"props":1098,"children":1099},{},[1100,1102,1108,1110],{"type":25,"value":1101},"Note, one difference here from a standard installation is that the\n",{"type":20,"tag":45,"props":1103,"children":1105},{"className":1104},[],[1106],{"type":25,"value":1107},"--removable",{"type":25,"value":1109}," flag is specified when installing the GRUB bootloader.\n",{"type":20,"tag":54,"props":1111,"children":1112},{},[1113],{"type":20,"tag":58,"props":1114,"children":1117},{"href":1115,"rel":1116},"https://wiki.archlinux.org/index.php/GRUB#UEFI_systems",[62],[1118],{"type":25,"value":1119},"10",{"type":20,"tag":116,"props":1121,"children":1123},{"code":1122},"[root@archlinux /]# pacman -S grub\n[root@archlinux /]# grub-install --target=x86_64-efi --efi-directory=/boot/efi --removable --recheck\n[root@usb /]# grub-mkconfig -o /boot/grub/grub.cfg\n",[1124],{"type":20,"tag":45,"props":1125,"children":1126},{"__ignoreMap":7},[1127],{"type":25,"value":1122},{"type":20,"tag":21,"props":1129,"children":1130},{},[1131],{"type":25,"value":1132},"Shutdown the virtual machine, restart the host machine, and boot the newly\ncreated Arch Linux thumb-drive!",{"type":20,"tag":21,"props":1134,"children":1135},{},[1136],{"type":25,"value":1137},"🎉",{"type":20,"tag":92,"props":1139,"children":1141},{"id":1140},"side-note",[1142],{"type":25,"value":1143},"Side-note",{"type":20,"tag":21,"props":1145,"children":1146},{},[1147,1149,1155,1157,1162,1164],{"type":25,"value":1148},"It was attempted to use the ",{"type":20,"tag":45,"props":1150,"children":1152},{"className":1151},[],[1153],{"type":25,"value":1154},"controlvm usbattach",{"type":25,"value":1156}," command to pass the USB\ndevice to the guest machine, but this did not work as it expects the virtual\nmachine to already be running, and the ",{"type":20,"tag":45,"props":1158,"children":1160},{"className":1159},[],[1161],{"type":25,"value":236},{"type":25,"value":1163}," option runs prior to\nbooting the machine. ",{"type":20,"tag":54,"props":1165,"children":1166},{},[1167],{"type":20,"tag":58,"props":1168,"children":1171},{"href":1169,"rel":1170},"https://www.vagrantup.com/docs/virtualbox/configuration.html#vboxmanage-customizations",[62],[1172],{"type":25,"value":1173},"11",{"type":20,"tag":116,"props":1175,"children":1177},{"code":1176,"language":249,"meta":7,"className":250,"style":7},"Command: [\"controlvm\", \"060a716b-1965-49e2-bc56-12beed5df716\", \"usbattach36fc9e60-c465-11cf-8056-444553540000\"]\n\nStderr: VBoxManage.exe: error: Machine '060a716b-1965-49e2-bc56-12beed5df716' is not currently running.\n",[1178],{"type":20,"tag":45,"props":1179,"children":1180},{"__ignoreMap":7},[1181,1189,1196],{"type":20,"tag":126,"props":1182,"children":1183},{"class":128,"line":129},[1184],{"type":20,"tag":126,"props":1185,"children":1186},{},[1187],{"type":25,"value":1188},"Command: [\"controlvm\", \"060a716b-1965-49e2-bc56-12beed5df716\", \"usbattach36fc9e60-c465-11cf-8056-444553540000\"]\n",{"type":20,"tag":126,"props":1190,"children":1191},{"class":128,"line":265},[1192],{"type":20,"tag":126,"props":1193,"children":1194},{"emptyLinePlaceholder":278},[1195],{"type":25,"value":281},{"type":20,"tag":126,"props":1197,"children":1198},{"class":128,"line":274},[1199],{"type":20,"tag":126,"props":1200,"children":1201},{},[1202],{"type":25,"value":1203},"Stderr: VBoxManage.exe: error: Machine '060a716b-1965-49e2-bc56-12beed5df716' is not currently running.\n",{"type":20,"tag":92,"props":1205,"children":1207},{"id":1206},"references",[1208],{"type":25,"value":1209},"References",{"type":20,"tag":1211,"props":1212,"children":1213},"ol",{},[1214,1224,1233,1242,1251,1260,1269,1278,1287,1296,1305],{"type":20,"tag":1215,"props":1216,"children":1217},"li",{},[1218],{"type":20,"tag":58,"props":1219,"children":1221},{"href":60,"rel":1220},[62],[1222],{"type":25,"value":1223},"Docker Desktop on Mac vs. Docker Toolbox",{"type":20,"tag":1215,"props":1225,"children":1226},{},[1227],{"type":20,"tag":58,"props":1228,"children":1230},{"href":70,"rel":1229},[62],[1231],{"type":25,"value":1232},"GitHub - HyperKit",{"type":20,"tag":1215,"props":1234,"children":1235},{},[1236],{"type":20,"tag":58,"props":1237,"children":1239},{"href":78,"rel":1238},[62],[1240],{"type":25,"value":1241},"GitHub - Docker for Mac - Issue #900",{"type":20,"tag":1215,"props":1243,"children":1244},{},[1245],{"type":20,"tag":58,"props":1246,"children":1248},{"href":108,"rel":1247},[62],[1249],{"type":25,"value":1250},"Vagrant Cloud - Arch Linux",{"type":20,"tag":1215,"props":1252,"children":1253},{},[1254],{"type":20,"tag":58,"props":1255,"children":1257},{"href":216,"rel":1256},[62],[1258],{"type":25,"value":1259},"Attaching USB Devices to VirtualBox Guests using VBoxManage",{"type":20,"tag":1215,"props":1261,"children":1262},{},[1263],{"type":20,"tag":58,"props":1264,"children":1266},{"href":224,"rel":1265},[62],[1267],{"type":25,"value":1268},"GitHub Gist - Vagrant USB Filter",{"type":20,"tag":1215,"props":1270,"children":1271},{},[1272],{"type":20,"tag":58,"props":1273,"children":1275},{"href":841,"rel":1274},[62],[1276],{"type":25,"value":1277},"Arch Linux Wiki - EFI System Partition - Format Partitions",{"type":20,"tag":1215,"props":1279,"children":1280},{},[1281],{"type":20,"tag":58,"props":1282,"children":1284},{"href":903,"rel":1283},[62],[1285],{"type":25,"value":1286},"Arch Linux Wiki - Arch Linux on USB - Installation Tweaks",{"type":20,"tag":1215,"props":1288,"children":1289},{},[1290],{"type":20,"tag":58,"props":1291,"children":1293},{"href":667,"rel":1292},[62],[1294],{"type":25,"value":1295},"Arch Linux Wiki - Installation Guide",{"type":20,"tag":1215,"props":1297,"children":1298},{},[1299],{"type":20,"tag":58,"props":1300,"children":1302},{"href":1115,"rel":1301},[62],[1303],{"type":25,"value":1304},"Arch Linux Wiki - GRUB - UEFI Systems",{"type":20,"tag":1215,"props":1306,"children":1307},{},[1308],{"type":20,"tag":58,"props":1309,"children":1311},{"href":1169,"rel":1310},[62],[1312],{"type":25,"value":1313},"Vagrant VBoxManage Customizations ",{"type":20,"tag":1315,"props":1316,"children":1317},"style",{},[1318],{"type":25,"value":1319},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}",{"title":7,"searchDepth":265,"depth":265,"links":1321},[1322,1323,1329,1330],{"id":94,"depth":265,"text":97},{"id":656,"depth":265,"text":659,"children":1324},[1325,1326,1327,1328],{"id":677,"depth":274,"text":680},{"id":827,"depth":274,"text":830},{"id":943,"depth":274,"text":946},{"id":1069,"depth":274,"text":1072},{"id":1140,"depth":265,"text":1143},{"id":1206,"depth":265,"text":1209},"markdown","content:articles:persistent-archlinux-usb.md","content","articles/persistent-archlinux-usb.md","articles/persistent-archlinux-usb","md",1735276485254] \ No newline at end of file +[{"data":1,"prerenderedAt":1337},["ShallowReactive",2],{"page-data":3},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"date":10,"draft":6,"tags":11,"categories":14,"excerpt":16,"body":26,"_type":1331,"_id":1332,"_source":1333,"_file":1334,"_stem":1335,"_extension":1336},"/articles/persistent-archlinux-usb","articles",false,"","Create a Persistent Arch Linux Bootable USB with Vagrant","When installing a linux distribution, it is common for the instructions to have\nthe user create a bootable USB, boot from the device, and proceed with the\ninstallation procedure from that live medium. However, this blog post will\noutline an alternative approach where a virtual machine created with Vagrant\nwill be used in favor of the live medium.","2020-01-09",[12,13],"vagrant","archlinux",[15],"linux",{"type":17,"children":18},"root",[19],{"type":20,"tag":21,"props":22,"children":23},"element","p",{},[24],{"type":25,"value":9},"text",{"type":17,"children":27,"toc":1320},[28,32,39,85,91,98,115,152,165,190,246,354,367,388,654,660,674,681,705,825,831,846,885,908,941,947,1002,1067,1073,1081,1089,1097,1120,1128,1133,1138,1144,1174,1204,1210,1314],{"type":20,"tag":21,"props":29,"children":30},{},[31],{"type":25,"value":9},{"type":20,"tag":33,"props":34,"children":36},"h1",{"id":35},"preface",[37],{"type":25,"value":38},"Preface",{"type":20,"tag":21,"props":40,"children":41},{},[42,44,51,53,83],{"type":25,"value":43},"The original intention was to use Docker for this process -- leveraging the\n",{"type":20,"tag":45,"props":46,"children":48},"code",{"className":47},[],[49],{"type":25,"value":50},"--device",{"type":25,"value":52}," flag and mounting the target USB device in the Docker container,\nbut the underlying hypervisor in Docker Desktop for Mac does not support this.\n",{"type":20,"tag":54,"props":55,"children":56},"sup",{},[57,66,68,75,76],{"type":20,"tag":58,"props":59,"children":63},"a",{"href":60,"rel":61},"https://docs.docker.com/docker-for-mac/docker-toolbox/",[62],"nofollow",[64],{"type":25,"value":65},"1",{"type":25,"value":67}," ",{"type":20,"tag":58,"props":69,"children":72},{"href":70,"rel":71},"https://github.com/moby/hyperkit",[62],[73],{"type":25,"value":74},"2",{"type":25,"value":67},{"type":20,"tag":58,"props":77,"children":80},{"href":78,"rel":79},"https://github.com/docker/for-mac/issues/900",[62],[81],{"type":25,"value":82},"3",{"type":25,"value":84}," While there are workarounds using Docker\nMachine, Vagrant felt like the path of least resistance.",{"type":20,"tag":33,"props":86,"children":88},{"id":87},"instructions",[89],{"type":25,"value":90},"Instructions",{"type":20,"tag":92,"props":93,"children":95},"h2",{"id":94},"create-an-arch-linux-virtual-machine-with-vagrant",[96],{"type":25,"value":97},"Create an Arch Linux Virtual Machine with Vagrant",{"type":20,"tag":21,"props":99,"children":100},{},[101,103,113],{"type":25,"value":102},"Get the latest Arch Linux image ",{"type":20,"tag":54,"props":104,"children":105},{},[106],{"type":20,"tag":58,"props":107,"children":110},{"href":108,"rel":109},"https://app.vagrantup.com/archlinux/boxes/archlinux",[62],[111],{"type":25,"value":112},"4",{"type":25,"value":114}," from the Vagrant Cloud Box\nCatalog.",{"type":20,"tag":116,"props":117,"children":121},"pre",{"code":118,"language":119,"meta":7,"className":120,"style":7},"vagrant box add archlinux/archlinux\n","bash","language-bash shiki shiki-themes github-light",[122],{"type":20,"tag":45,"props":123,"children":124},{"__ignoreMap":7},[125],{"type":20,"tag":126,"props":127,"children":130},"span",{"class":128,"line":129},"line",1,[131,136,142,147],{"type":20,"tag":126,"props":132,"children":134},{"style":133},"--shiki-default:#6F42C1",[135],{"type":25,"value":12},{"type":20,"tag":126,"props":137,"children":139},{"style":138},"--shiki-default:#032F62",[140],{"type":25,"value":141}," box",{"type":20,"tag":126,"props":143,"children":144},{"style":138},[145],{"type":25,"value":146}," add",{"type":20,"tag":126,"props":148,"children":149},{"style":138},[150],{"type":25,"value":151}," archlinux/archlinux\n",{"type":20,"tag":21,"props":153,"children":154},{},[155,157,163],{"type":25,"value":156},"Determine the USB vendor information for the thumb-drive that we will\npass-through to the virtual machine. Using the ",{"type":20,"tag":45,"props":158,"children":160},{"className":159},[],[161],{"type":25,"value":162},"VBoxManage",{"type":25,"value":164}," utility that comes\nwith Virtual Box, list the devices, and make note of the Vendor and Product ID.",{"type":20,"tag":116,"props":166,"children":168},{"code":167,"language":119,"meta":7,"className":120,"style":7}," VBoxManage list usbhost\n",[169],{"type":20,"tag":45,"props":170,"children":171},{"__ignoreMap":7},[172],{"type":20,"tag":126,"props":173,"children":174},{"class":128,"line":129},[175,180,185],{"type":20,"tag":126,"props":176,"children":177},{"style":133},[178],{"type":25,"value":179}," VBoxManage",{"type":20,"tag":126,"props":181,"children":182},{"style":138},[183],{"type":25,"value":184}," list",{"type":20,"tag":126,"props":186,"children":187},{"style":138},[188],{"type":25,"value":189}," usbhost\n",{"type":20,"tag":21,"props":191,"children":192},{},[193,195,201,203,209,211,229,231,237,239,244],{"type":25,"value":194},"Create a ",{"type":20,"tag":45,"props":196,"children":198},{"className":197},[],[199],{"type":25,"value":200},"Vagrantfile",{"type":25,"value":202}," with ",{"type":20,"tag":45,"props":204,"children":206},{"className":205},[],[207],{"type":25,"value":208},"archlinx/archlinux",{"type":25,"value":210}," as the target box, and the USB\ndevice information that is passed through. ",{"type":20,"tag":54,"props":212,"children":213},{},[214,221,222],{"type":20,"tag":58,"props":215,"children":218},{"href":216,"rel":217},"https://antonyjepson.wordpress.com/2012/01/26/quickly-attaching-usb-devices-to-virtualbox-guests-using-vboxmanage/",[62],[219],{"type":25,"value":220},"5",{"type":25,"value":67},{"type":20,"tag":58,"props":223,"children":226},{"href":224,"rel":225},"https://gist.github.com/dscape/7d829c0c116ef419f963",[62],[227],{"type":25,"value":228},"6",{"type":25,"value":230}," Vagrant\noffers a handy customization parameter ",{"type":20,"tag":45,"props":232,"children":234},{"className":233},[],[235],{"type":25,"value":236},"vb.customize",{"type":25,"value":238}," that calls the\n",{"type":20,"tag":45,"props":240,"children":242},{"className":241},[],[243],{"type":25,"value":162},{"type":25,"value":245}," command under-the-hood, allowing one to enable the guest machine\nto access the host machine's USB devices.",{"type":20,"tag":116,"props":247,"children":251},{"code":248,"language":249,"meta":7,"className":250,"style":7},"# -*- mode: ruby -*-\n# vi: set ft=ruby :\n\nVagrant.configure(\"2\") do |config|\n config.vm.box = \"archlinux/archlinux\"\n config.vm.provider \"virtualbox\" do |vb|\n vb.name = \"archlinux\"\n vb.customize ['modifyvm', :id, '--usb', 'on']\n vb.customize ['usbfilter', 'add', '1', '--target', :id, '--name', 'SanDisk Ultra Fit', '--vendorid', '0x0781', '--productid', '0x5583']\n end\nend\n","txt","language-txt shiki shiki-themes github-light",[252],{"type":20,"tag":45,"props":253,"children":254},{"__ignoreMap":7},[255,263,272,282,291,300,309,318,327,336,345],{"type":20,"tag":126,"props":256,"children":257},{"class":128,"line":129},[258],{"type":20,"tag":126,"props":259,"children":260},{},[261],{"type":25,"value":262},"# -*- mode: ruby -*-\n",{"type":20,"tag":126,"props":264,"children":266},{"class":128,"line":265},2,[267],{"type":20,"tag":126,"props":268,"children":269},{},[270],{"type":25,"value":271},"# vi: set ft=ruby :\n",{"type":20,"tag":126,"props":273,"children":275},{"class":128,"line":274},3,[276],{"type":20,"tag":126,"props":277,"children":279},{"emptyLinePlaceholder":278},true,[280],{"type":25,"value":281},"\n",{"type":20,"tag":126,"props":283,"children":285},{"class":128,"line":284},4,[286],{"type":20,"tag":126,"props":287,"children":288},{},[289],{"type":25,"value":290},"Vagrant.configure(\"2\") do |config|\n",{"type":20,"tag":126,"props":292,"children":294},{"class":128,"line":293},5,[295],{"type":20,"tag":126,"props":296,"children":297},{},[298],{"type":25,"value":299}," config.vm.box = \"archlinux/archlinux\"\n",{"type":20,"tag":126,"props":301,"children":303},{"class":128,"line":302},6,[304],{"type":20,"tag":126,"props":305,"children":306},{},[307],{"type":25,"value":308}," config.vm.provider \"virtualbox\" do |vb|\n",{"type":20,"tag":126,"props":310,"children":312},{"class":128,"line":311},7,[313],{"type":20,"tag":126,"props":314,"children":315},{},[316],{"type":25,"value":317}," vb.name = \"archlinux\"\n",{"type":20,"tag":126,"props":319,"children":321},{"class":128,"line":320},8,[322],{"type":20,"tag":126,"props":323,"children":324},{},[325],{"type":25,"value":326}," vb.customize ['modifyvm', :id, '--usb', 'on']\n",{"type":20,"tag":126,"props":328,"children":330},{"class":128,"line":329},9,[331],{"type":20,"tag":126,"props":332,"children":333},{},[334],{"type":25,"value":335}," vb.customize ['usbfilter', 'add', '1', '--target', :id, '--name', 'SanDisk Ultra Fit', '--vendorid', '0x0781', '--productid', '0x5583']\n",{"type":20,"tag":126,"props":337,"children":339},{"class":128,"line":338},10,[340],{"type":20,"tag":126,"props":341,"children":342},{},[343],{"type":25,"value":344}," end\n",{"type":20,"tag":126,"props":346,"children":348},{"class":128,"line":347},11,[349],{"type":20,"tag":126,"props":350,"children":351},{},[352],{"type":25,"value":353},"end\n",{"type":20,"tag":21,"props":355,"children":356},{},[357,359,365],{"type":25,"value":358},"When virtual machine is brought up, the ",{"type":20,"tag":45,"props":360,"children":362},{"className":361},[],[363],{"type":25,"value":364},"usbfilter",{"type":25,"value":366}," is applied, and the guest\nis able to access to the host machine's USB device that was specified in the\nfilter.",{"type":20,"tag":21,"props":368,"children":369},{},[370,372,378,380,386],{"type":25,"value":371},"Start the machine, ",{"type":20,"tag":45,"props":373,"children":375},{"className":374},[],[376],{"type":25,"value":377},"ssh",{"type":25,"value":379}," into the guest, and list the devices to confirm that\nthe USB device is available (see: ",{"type":20,"tag":45,"props":381,"children":383},{"className":382},[],[384],{"type":25,"value":385},"/dev/sdb",{"type":25,"value":387},").",{"type":20,"tag":116,"props":389,"children":391},{"code":390,"language":119,"meta":7,"className":120,"style":7},"$ vagrant up\n$ vagrant ssh\n[vagrant@archlinux ~]$ lsblk\nNAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT\nsda 8:0 0 20G 0 disk\n├─sda1 8:1 0 1.9G 0 part [SWAP]\n└─sda2 8:2 0 18.1G 0 part /\nsdb 8:16 1 28.7G 0 disk\n└─sdb1 8:17 1 8G 0 part\n",[392],{"type":20,"tag":45,"props":393,"children":394},{"__ignoreMap":7},[395,413,429,449,487,521,557,592,623],{"type":20,"tag":126,"props":396,"children":397},{"class":128,"line":129},[398,403,408],{"type":20,"tag":126,"props":399,"children":400},{"style":133},[401],{"type":25,"value":402},"$",{"type":20,"tag":126,"props":404,"children":405},{"style":138},[406],{"type":25,"value":407}," vagrant",{"type":20,"tag":126,"props":409,"children":410},{"style":138},[411],{"type":25,"value":412}," up\n",{"type":20,"tag":126,"props":414,"children":415},{"class":128,"line":265},[416,420,424],{"type":20,"tag":126,"props":417,"children":418},{"style":133},[419],{"type":25,"value":402},{"type":20,"tag":126,"props":421,"children":422},{"style":138},[423],{"type":25,"value":407},{"type":20,"tag":126,"props":425,"children":426},{"style":138},[427],{"type":25,"value":428}," ssh\n",{"type":20,"tag":126,"props":430,"children":431},{"class":128,"line":274},[432,438,444],{"type":20,"tag":126,"props":433,"children":435},{"style":434},"--shiki-default:#24292E",[436],{"type":25,"value":437},"[vagrant@archlinux ",{"type":20,"tag":126,"props":439,"children":441},{"style":440},"--shiki-default:#D73A49",[442],{"type":25,"value":443},"~",{"type":20,"tag":126,"props":445,"children":446},{"style":434},[447],{"type":25,"value":448},"]$ lsblk\n",{"type":20,"tag":126,"props":450,"children":451},{"class":128,"line":284},[452,457,462,467,472,477,482],{"type":20,"tag":126,"props":453,"children":454},{"style":133},[455],{"type":25,"value":456},"NAME",{"type":20,"tag":126,"props":458,"children":459},{"style":138},[460],{"type":25,"value":461}," MAJ:MIN",{"type":20,"tag":126,"props":463,"children":464},{"style":138},[465],{"type":25,"value":466}," RM",{"type":20,"tag":126,"props":468,"children":469},{"style":138},[470],{"type":25,"value":471}," SIZE",{"type":20,"tag":126,"props":473,"children":474},{"style":138},[475],{"type":25,"value":476}," RO",{"type":20,"tag":126,"props":478,"children":479},{"style":138},[480],{"type":25,"value":481}," TYPE",{"type":20,"tag":126,"props":483,"children":484},{"style":138},[485],{"type":25,"value":486}," MOUNTPOINT\n",{"type":20,"tag":126,"props":488,"children":489},{"class":128,"line":293},[490,495,500,506,511,516],{"type":20,"tag":126,"props":491,"children":492},{"style":133},[493],{"type":25,"value":494},"sda",{"type":20,"tag":126,"props":496,"children":497},{"style":138},[498],{"type":25,"value":499}," 8:0",{"type":20,"tag":126,"props":501,"children":503},{"style":502},"--shiki-default:#005CC5",[504],{"type":25,"value":505}," 0",{"type":20,"tag":126,"props":507,"children":508},{"style":138},[509],{"type":25,"value":510}," 20G",{"type":20,"tag":126,"props":512,"children":513},{"style":502},[514],{"type":25,"value":515}," 0",{"type":20,"tag":126,"props":517,"children":518},{"style":138},[519],{"type":25,"value":520}," disk\n",{"type":20,"tag":126,"props":522,"children":523},{"class":128,"line":302},[524,529,534,538,543,547,552],{"type":20,"tag":126,"props":525,"children":526},{"style":133},[527],{"type":25,"value":528},"├─sda1",{"type":20,"tag":126,"props":530,"children":531},{"style":138},[532],{"type":25,"value":533}," 8:1",{"type":20,"tag":126,"props":535,"children":536},{"style":502},[537],{"type":25,"value":505},{"type":20,"tag":126,"props":539,"children":540},{"style":138},[541],{"type":25,"value":542}," 1.9G",{"type":20,"tag":126,"props":544,"children":545},{"style":502},[546],{"type":25,"value":515},{"type":20,"tag":126,"props":548,"children":549},{"style":138},[550],{"type":25,"value":551}," part",{"type":20,"tag":126,"props":553,"children":554},{"style":434},[555],{"type":25,"value":556}," [SWAP]\n",{"type":20,"tag":126,"props":558,"children":559},{"class":128,"line":311},[560,565,570,574,579,583,587],{"type":20,"tag":126,"props":561,"children":562},{"style":133},[563],{"type":25,"value":564},"└─sda2",{"type":20,"tag":126,"props":566,"children":567},{"style":138},[568],{"type":25,"value":569}," 8:2",{"type":20,"tag":126,"props":571,"children":572},{"style":502},[573],{"type":25,"value":505},{"type":20,"tag":126,"props":575,"children":576},{"style":138},[577],{"type":25,"value":578}," 18.1G",{"type":20,"tag":126,"props":580,"children":581},{"style":502},[582],{"type":25,"value":515},{"type":20,"tag":126,"props":584,"children":585},{"style":138},[586],{"type":25,"value":551},{"type":20,"tag":126,"props":588,"children":589},{"style":138},[590],{"type":25,"value":591}," /\n",{"type":20,"tag":126,"props":593,"children":594},{"class":128,"line":320},[595,600,605,610,615,619],{"type":20,"tag":126,"props":596,"children":597},{"style":133},[598],{"type":25,"value":599},"sdb",{"type":20,"tag":126,"props":601,"children":602},{"style":138},[603],{"type":25,"value":604}," 8:16",{"type":20,"tag":126,"props":606,"children":607},{"style":502},[608],{"type":25,"value":609}," 1",{"type":20,"tag":126,"props":611,"children":612},{"style":138},[613],{"type":25,"value":614}," 28.7G",{"type":20,"tag":126,"props":616,"children":617},{"style":502},[618],{"type":25,"value":515},{"type":20,"tag":126,"props":620,"children":621},{"style":138},[622],{"type":25,"value":520},{"type":20,"tag":126,"props":624,"children":625},{"class":128,"line":329},[626,631,636,640,645,649],{"type":20,"tag":126,"props":627,"children":628},{"style":133},[629],{"type":25,"value":630},"└─sdb1",{"type":20,"tag":126,"props":632,"children":633},{"style":138},[634],{"type":25,"value":635}," 8:17",{"type":20,"tag":126,"props":637,"children":638},{"style":502},[639],{"type":25,"value":609},{"type":20,"tag":126,"props":641,"children":642},{"style":138},[643],{"type":25,"value":644}," 8G",{"type":20,"tag":126,"props":646,"children":647},{"style":502},[648],{"type":25,"value":515},{"type":20,"tag":126,"props":650,"children":651},{"style":138},[652],{"type":25,"value":653}," part\n",{"type":20,"tag":92,"props":655,"children":657},{"id":656},"install-arch-linux-on-the-usb-drive",[658],{"type":25,"value":659},"Install Arch Linux on the USB Drive",{"type":20,"tag":21,"props":661,"children":662},{},[663,665,672],{"type":25,"value":664},"The ",{"type":20,"tag":58,"props":666,"children":669},{"href":667,"rel":668},"https://wiki.archlinux.org/index.php/Installation_guide",[62],[670],{"type":25,"value":671},"Arch Linux Installation Guide",{"type":25,"value":673}," outlines the installation procedure in\ngreat detail -- the following steps follow this closely with a few alteration\ndue to installing onto removable media.",{"type":20,"tag":675,"props":676,"children":678},"h3",{"id":677},"partition-the-disk-uefi-with-gpt",[679],{"type":25,"value":680},"Partition the Disk (UEFI with GPT)",{"type":20,"tag":116,"props":682,"children":684},{"code":683,"language":119,"meta":7,"className":120,"style":7},"[root@archlinux ~]# fdisk /dev/sdb\n",[685],{"type":20,"tag":45,"props":686,"children":687},{"__ignoreMap":7},[688],{"type":20,"tag":126,"props":689,"children":690},{"class":128,"line":129},[691,696,700],{"type":20,"tag":126,"props":692,"children":693},{"style":434},[694],{"type":25,"value":695},"[root@archlinux ",{"type":20,"tag":126,"props":697,"children":698},{"style":440},[699],{"type":25,"value":443},{"type":20,"tag":126,"props":701,"children":702},{"style":434},[703],{"type":25,"value":704},"]# fdisk /dev/sdb\n",{"type":20,"tag":116,"props":706,"children":708},{"code":707,"language":249,"meta":7,"className":250,"style":7},"Command (m for help): p\nDisk /dev/sdb: 28.66 GiB, 30752636928 bytes, 60063744 sectors\nDisk model: Ultra Fit\nUnits: sectors of 1 * 512 = 512 bytes\nSector size (logical/physical): 512 bytes / 512 bytes\nI/O size (minimum/optimal): 512 bytes / 512 bytes\nDisklabel type: gpt\nDisk identifier: E1D6C445-1B79-AB4D-A442-FA4AD6DF4ECC\n\nDevice Start End Sectors Size Type\n/dev/sdb1 2048 1050623 1048576 512M EFI System\n/dev/sdb2 1050624 60063710 59013087 28.1G Linux filesystem\n\nFilesystem/RAID signature on partition 1 will be wiped.\n",[709],{"type":20,"tag":45,"props":710,"children":711},{"__ignoreMap":7},[712,720,728,736,744,752,760,768,776,783,791,799,808,816],{"type":20,"tag":126,"props":713,"children":714},{"class":128,"line":129},[715],{"type":20,"tag":126,"props":716,"children":717},{},[718],{"type":25,"value":719},"Command (m for help): p\n",{"type":20,"tag":126,"props":721,"children":722},{"class":128,"line":265},[723],{"type":20,"tag":126,"props":724,"children":725},{},[726],{"type":25,"value":727},"Disk /dev/sdb: 28.66 GiB, 30752636928 bytes, 60063744 sectors\n",{"type":20,"tag":126,"props":729,"children":730},{"class":128,"line":274},[731],{"type":20,"tag":126,"props":732,"children":733},{},[734],{"type":25,"value":735},"Disk model: Ultra Fit\n",{"type":20,"tag":126,"props":737,"children":738},{"class":128,"line":284},[739],{"type":20,"tag":126,"props":740,"children":741},{},[742],{"type":25,"value":743},"Units: sectors of 1 * 512 = 512 bytes\n",{"type":20,"tag":126,"props":745,"children":746},{"class":128,"line":293},[747],{"type":20,"tag":126,"props":748,"children":749},{},[750],{"type":25,"value":751},"Sector size (logical/physical): 512 bytes / 512 bytes\n",{"type":20,"tag":126,"props":753,"children":754},{"class":128,"line":302},[755],{"type":20,"tag":126,"props":756,"children":757},{},[758],{"type":25,"value":759},"I/O size (minimum/optimal): 512 bytes / 512 bytes\n",{"type":20,"tag":126,"props":761,"children":762},{"class":128,"line":311},[763],{"type":20,"tag":126,"props":764,"children":765},{},[766],{"type":25,"value":767},"Disklabel type: gpt\n",{"type":20,"tag":126,"props":769,"children":770},{"class":128,"line":320},[771],{"type":20,"tag":126,"props":772,"children":773},{},[774],{"type":25,"value":775},"Disk identifier: E1D6C445-1B79-AB4D-A442-FA4AD6DF4ECC\n",{"type":20,"tag":126,"props":777,"children":778},{"class":128,"line":329},[779],{"type":20,"tag":126,"props":780,"children":781},{"emptyLinePlaceholder":278},[782],{"type":25,"value":281},{"type":20,"tag":126,"props":784,"children":785},{"class":128,"line":338},[786],{"type":20,"tag":126,"props":787,"children":788},{},[789],{"type":25,"value":790},"Device Start End Sectors Size Type\n",{"type":20,"tag":126,"props":792,"children":793},{"class":128,"line":347},[794],{"type":20,"tag":126,"props":795,"children":796},{},[797],{"type":25,"value":798},"/dev/sdb1 2048 1050623 1048576 512M EFI System\n",{"type":20,"tag":126,"props":800,"children":802},{"class":128,"line":801},12,[803],{"type":20,"tag":126,"props":804,"children":805},{},[806],{"type":25,"value":807},"/dev/sdb2 1050624 60063710 59013087 28.1G Linux filesystem\n",{"type":20,"tag":126,"props":809,"children":811},{"class":128,"line":810},13,[812],{"type":20,"tag":126,"props":813,"children":814},{"emptyLinePlaceholder":278},[815],{"type":25,"value":281},{"type":20,"tag":126,"props":817,"children":819},{"class":128,"line":818},14,[820],{"type":20,"tag":126,"props":821,"children":822},{},[823],{"type":25,"value":824},"Filesystem/RAID signature on partition 1 will be wiped.\n",{"type":20,"tag":675,"props":826,"children":828},{"id":827},"format-the-partitions",[829],{"type":25,"value":830},"Format the Partitions",{"type":20,"tag":21,"props":832,"children":833},{},[834,836],{"type":25,"value":835},"The UEFI specification mandates support for FAT file-systems, and FAT32 is\nrecommended for removable media. ",{"type":20,"tag":54,"props":837,"children":838},{},[839],{"type":20,"tag":58,"props":840,"children":843},{"href":841,"rel":842},"https://wiki.archlinux.org/index.php/EFI_system_partition#Format_the_partition",[62],[844],{"type":25,"value":845},"7",{"type":20,"tag":116,"props":847,"children":849},{"code":848,"language":119,"meta":7,"className":120,"style":7},"[root@archlinux ~]# pacman -Sy dosfstools\n[root@archlinux ~]# mkfs.fat -F32 /dev/sdb1\n",[850],{"type":20,"tag":45,"props":851,"children":852},{"__ignoreMap":7},[853,869],{"type":20,"tag":126,"props":854,"children":855},{"class":128,"line":129},[856,860,864],{"type":20,"tag":126,"props":857,"children":858},{"style":434},[859],{"type":25,"value":695},{"type":20,"tag":126,"props":861,"children":862},{"style":440},[863],{"type":25,"value":443},{"type":20,"tag":126,"props":865,"children":866},{"style":434},[867],{"type":25,"value":868},"]# pacman -Sy dosfstools\n",{"type":20,"tag":126,"props":870,"children":871},{"class":128,"line":265},[872,876,880],{"type":20,"tag":126,"props":873,"children":874},{"style":434},[875],{"type":25,"value":695},{"type":20,"tag":126,"props":877,"children":878},{"style":440},[879],{"type":25,"value":443},{"type":20,"tag":126,"props":881,"children":882},{"style":434},[883],{"type":25,"value":884},"]# mkfs.fat -F32 /dev/sdb1\n",{"type":20,"tag":21,"props":886,"children":887},{},[888,890,896,898],{"type":25,"value":889},"As for the root partition, it is recommended to use ",{"type":20,"tag":45,"props":891,"children":893},{"className":892},[],[894],{"type":25,"value":895},"ext4",{"type":25,"value":897}," without a journal to\nreduce the reads and writes to the file-system as this is detrimental to the\nflash-based USB drive. ",{"type":20,"tag":54,"props":899,"children":900},{},[901],{"type":20,"tag":58,"props":902,"children":905},{"href":903,"rel":904},"https://wiki.archlinux.org/index.php/Install_Arch_Linux_on_a_USB_key#Installation_tweaks",[62],[906],{"type":25,"value":907},"8",{"type":20,"tag":116,"props":909,"children":911},{"code":910,"language":119,"meta":7,"className":120,"style":7},"[root@archlinux ~]# mkfs.ext4 -O \"^has_journal\" /dev/sdb2\n",[912],{"type":20,"tag":45,"props":913,"children":914},{"__ignoreMap":7},[915],{"type":20,"tag":126,"props":916,"children":917},{"class":128,"line":129},[918,922,926,931,936],{"type":20,"tag":126,"props":919,"children":920},{"style":434},[921],{"type":25,"value":695},{"type":20,"tag":126,"props":923,"children":924},{"style":440},[925],{"type":25,"value":443},{"type":20,"tag":126,"props":927,"children":928},{"style":434},[929],{"type":25,"value":930},"]# mkfs.ext4 -O ",{"type":20,"tag":126,"props":932,"children":933},{"style":138},[934],{"type":25,"value":935},"\"^has_journal\"",{"type":20,"tag":126,"props":937,"children":938},{"style":434},[939],{"type":25,"value":940}," /dev/sdb2\n",{"type":20,"tag":675,"props":942,"children":944},{"id":943},"mount-the-partitions-and-bootstrap-the-environment",[945],{"type":25,"value":946},"Mount the Partitions and Bootstrap the Environment",{"type":20,"tag":116,"props":948,"children":950},{"code":949,"language":119,"meta":7,"className":120,"style":7},"[root@archlinux ~]# mount /dev/sdb2 /mnt\n[root@archlinux ~]# mkdir -p /mnt/boot/efi\n[root@archlinux ~]# mount /dev/sdb1 /mnt/boot/efi\n",[951],{"type":20,"tag":45,"props":952,"children":953},{"__ignoreMap":7},[954,970,986],{"type":20,"tag":126,"props":955,"children":956},{"class":128,"line":129},[957,961,965],{"type":20,"tag":126,"props":958,"children":959},{"style":434},[960],{"type":25,"value":695},{"type":20,"tag":126,"props":962,"children":963},{"style":440},[964],{"type":25,"value":443},{"type":20,"tag":126,"props":966,"children":967},{"style":434},[968],{"type":25,"value":969},"]# mount /dev/sdb2 /mnt\n",{"type":20,"tag":126,"props":971,"children":972},{"class":128,"line":265},[973,977,981],{"type":20,"tag":126,"props":974,"children":975},{"style":434},[976],{"type":25,"value":695},{"type":20,"tag":126,"props":978,"children":979},{"style":440},[980],{"type":25,"value":443},{"type":20,"tag":126,"props":982,"children":983},{"style":434},[984],{"type":25,"value":985},"]# mkdir -p /mnt/boot/efi\n",{"type":20,"tag":126,"props":987,"children":988},{"class":128,"line":274},[989,993,997],{"type":20,"tag":126,"props":990,"children":991},{"style":434},[992],{"type":25,"value":695},{"type":20,"tag":126,"props":994,"children":995},{"style":440},[996],{"type":25,"value":443},{"type":20,"tag":126,"props":998,"children":999},{"style":434},[1000],{"type":25,"value":1001},"]# mount /dev/sdb1 /mnt/boot/efi\n",{"type":20,"tag":116,"props":1003,"children":1005},{"code":1004,"language":119,"meta":7,"className":120,"style":7},"[root@archlinux ~]# pacman -S arch-install-scripts\n[root@archlinux ~]# pacstrap /mnt base linux linux-firmware\n[root@archlinux ~]# genfstab -U /mnt >> /mnt/etc/fstab\n",[1006],{"type":20,"tag":45,"props":1007,"children":1008},{"__ignoreMap":7},[1009,1025,1041],{"type":20,"tag":126,"props":1010,"children":1011},{"class":128,"line":129},[1012,1016,1020],{"type":20,"tag":126,"props":1013,"children":1014},{"style":434},[1015],{"type":25,"value":695},{"type":20,"tag":126,"props":1017,"children":1018},{"style":440},[1019],{"type":25,"value":443},{"type":20,"tag":126,"props":1021,"children":1022},{"style":434},[1023],{"type":25,"value":1024},"]# pacman -S arch-install-scripts\n",{"type":20,"tag":126,"props":1026,"children":1027},{"class":128,"line":265},[1028,1032,1036],{"type":20,"tag":126,"props":1029,"children":1030},{"style":434},[1031],{"type":25,"value":695},{"type":20,"tag":126,"props":1033,"children":1034},{"style":440},[1035],{"type":25,"value":443},{"type":20,"tag":126,"props":1037,"children":1038},{"style":434},[1039],{"type":25,"value":1040},"]# pacstrap /mnt base linux linux-firmware\n",{"type":20,"tag":126,"props":1042,"children":1043},{"class":128,"line":274},[1044,1048,1052,1057,1062],{"type":20,"tag":126,"props":1045,"children":1046},{"style":434},[1047],{"type":25,"value":695},{"type":20,"tag":126,"props":1049,"children":1050},{"style":440},[1051],{"type":25,"value":443},{"type":20,"tag":126,"props":1053,"children":1054},{"style":434},[1055],{"type":25,"value":1056},"]# genfstab -U /mnt ",{"type":20,"tag":126,"props":1058,"children":1059},{"style":440},[1060],{"type":25,"value":1061},">>",{"type":20,"tag":126,"props":1063,"children":1064},{"style":434},[1065],{"type":25,"value":1066}," /mnt/etc/fstab\n",{"type":20,"tag":675,"props":1068,"children":1070},{"id":1069},"configure-the-new-environment",[1071],{"type":25,"value":1072},"Configure the New Environment",{"type":20,"tag":116,"props":1074,"children":1076},{"code":1075},"[root@archlinux ~]# arch-chroot /mnt\n",[1077],{"type":20,"tag":45,"props":1078,"children":1079},{"__ignoreMap":7},[1080],{"type":25,"value":1075},{"type":20,"tag":116,"props":1082,"children":1084},{"code":1083},"[root@archlinux /]# ln -sf /usr/share/zoneinfo/US/Eastern /etc/localtime\n[root@archlinux /]# hwclock --systohc\n[root@archlinux /]# sed -i 's/#en_US.UTF-8/en_US.UTF-8/' /etc/locale.gen\n[root@archlinux /]# locale-gen\n[root@archlinux /]# echo \"LANG=en_US.UTF-8\" > /etc/locale.conf\n",[1085],{"type":20,"tag":45,"props":1086,"children":1087},{"__ignoreMap":7},[1088],{"type":25,"value":1083},{"type":20,"tag":116,"props":1090,"children":1092},{"code":1091},"[root@archlinux /]# hostnamectl set-hostname usb\n[root@archlinux /]# echo \"127.0.0.1 localhost\" >> /etc/hosts\n[root@archlinux /]# echo \"::1 localhost\" >> /etc/hosts\n",[1093],{"type":20,"tag":45,"props":1094,"children":1095},{"__ignoreMap":7},[1096],{"type":25,"value":1091},{"type":20,"tag":21,"props":1098,"children":1099},{},[1100,1102,1108,1110],{"type":25,"value":1101},"Note, one difference here from a standard installation is that the\n",{"type":20,"tag":45,"props":1103,"children":1105},{"className":1104},[],[1106],{"type":25,"value":1107},"--removable",{"type":25,"value":1109}," flag is specified when installing the GRUB bootloader.\n",{"type":20,"tag":54,"props":1111,"children":1112},{},[1113],{"type":20,"tag":58,"props":1114,"children":1117},{"href":1115,"rel":1116},"https://wiki.archlinux.org/index.php/GRUB#UEFI_systems",[62],[1118],{"type":25,"value":1119},"10",{"type":20,"tag":116,"props":1121,"children":1123},{"code":1122},"[root@archlinux /]# pacman -S grub\n[root@archlinux /]# grub-install --target=x86_64-efi --efi-directory=/boot/efi --removable --recheck\n[root@usb /]# grub-mkconfig -o /boot/grub/grub.cfg\n",[1124],{"type":20,"tag":45,"props":1125,"children":1126},{"__ignoreMap":7},[1127],{"type":25,"value":1122},{"type":20,"tag":21,"props":1129,"children":1130},{},[1131],{"type":25,"value":1132},"Shutdown the virtual machine, restart the host machine, and boot the newly\ncreated Arch Linux thumb-drive!",{"type":20,"tag":21,"props":1134,"children":1135},{},[1136],{"type":25,"value":1137},"🎉",{"type":20,"tag":92,"props":1139,"children":1141},{"id":1140},"side-note",[1142],{"type":25,"value":1143},"Side-note",{"type":20,"tag":21,"props":1145,"children":1146},{},[1147,1149,1155,1157,1162,1164],{"type":25,"value":1148},"It was attempted to use the ",{"type":20,"tag":45,"props":1150,"children":1152},{"className":1151},[],[1153],{"type":25,"value":1154},"controlvm usbattach",{"type":25,"value":1156}," command to pass the USB\ndevice to the guest machine, but this did not work as it expects the virtual\nmachine to already be running, and the ",{"type":20,"tag":45,"props":1158,"children":1160},{"className":1159},[],[1161],{"type":25,"value":236},{"type":25,"value":1163}," option runs prior to\nbooting the machine. ",{"type":20,"tag":54,"props":1165,"children":1166},{},[1167],{"type":20,"tag":58,"props":1168,"children":1171},{"href":1169,"rel":1170},"https://www.vagrantup.com/docs/virtualbox/configuration.html#vboxmanage-customizations",[62],[1172],{"type":25,"value":1173},"11",{"type":20,"tag":116,"props":1175,"children":1177},{"code":1176,"language":249,"meta":7,"className":250,"style":7},"Command: [\"controlvm\", \"060a716b-1965-49e2-bc56-12beed5df716\", \"usbattach36fc9e60-c465-11cf-8056-444553540000\"]\n\nStderr: VBoxManage.exe: error: Machine '060a716b-1965-49e2-bc56-12beed5df716' is not currently running.\n",[1178],{"type":20,"tag":45,"props":1179,"children":1180},{"__ignoreMap":7},[1181,1189,1196],{"type":20,"tag":126,"props":1182,"children":1183},{"class":128,"line":129},[1184],{"type":20,"tag":126,"props":1185,"children":1186},{},[1187],{"type":25,"value":1188},"Command: [\"controlvm\", \"060a716b-1965-49e2-bc56-12beed5df716\", \"usbattach36fc9e60-c465-11cf-8056-444553540000\"]\n",{"type":20,"tag":126,"props":1190,"children":1191},{"class":128,"line":265},[1192],{"type":20,"tag":126,"props":1193,"children":1194},{"emptyLinePlaceholder":278},[1195],{"type":25,"value":281},{"type":20,"tag":126,"props":1197,"children":1198},{"class":128,"line":274},[1199],{"type":20,"tag":126,"props":1200,"children":1201},{},[1202],{"type":25,"value":1203},"Stderr: VBoxManage.exe: error: Machine '060a716b-1965-49e2-bc56-12beed5df716' is not currently running.\n",{"type":20,"tag":92,"props":1205,"children":1207},{"id":1206},"references",[1208],{"type":25,"value":1209},"References",{"type":20,"tag":1211,"props":1212,"children":1213},"ol",{},[1214,1224,1233,1242,1251,1260,1269,1278,1287,1296,1305],{"type":20,"tag":1215,"props":1216,"children":1217},"li",{},[1218],{"type":20,"tag":58,"props":1219,"children":1221},{"href":60,"rel":1220},[62],[1222],{"type":25,"value":1223},"Docker Desktop on Mac vs. Docker Toolbox",{"type":20,"tag":1215,"props":1225,"children":1226},{},[1227],{"type":20,"tag":58,"props":1228,"children":1230},{"href":70,"rel":1229},[62],[1231],{"type":25,"value":1232},"GitHub - HyperKit",{"type":20,"tag":1215,"props":1234,"children":1235},{},[1236],{"type":20,"tag":58,"props":1237,"children":1239},{"href":78,"rel":1238},[62],[1240],{"type":25,"value":1241},"GitHub - Docker for Mac - Issue #900",{"type":20,"tag":1215,"props":1243,"children":1244},{},[1245],{"type":20,"tag":58,"props":1246,"children":1248},{"href":108,"rel":1247},[62],[1249],{"type":25,"value":1250},"Vagrant Cloud - Arch Linux",{"type":20,"tag":1215,"props":1252,"children":1253},{},[1254],{"type":20,"tag":58,"props":1255,"children":1257},{"href":216,"rel":1256},[62],[1258],{"type":25,"value":1259},"Attaching USB Devices to VirtualBox Guests using VBoxManage",{"type":20,"tag":1215,"props":1261,"children":1262},{},[1263],{"type":20,"tag":58,"props":1264,"children":1266},{"href":224,"rel":1265},[62],[1267],{"type":25,"value":1268},"GitHub Gist - Vagrant USB Filter",{"type":20,"tag":1215,"props":1270,"children":1271},{},[1272],{"type":20,"tag":58,"props":1273,"children":1275},{"href":841,"rel":1274},[62],[1276],{"type":25,"value":1277},"Arch Linux Wiki - EFI System Partition - Format Partitions",{"type":20,"tag":1215,"props":1279,"children":1280},{},[1281],{"type":20,"tag":58,"props":1282,"children":1284},{"href":903,"rel":1283},[62],[1285],{"type":25,"value":1286},"Arch Linux Wiki - Arch Linux on USB - Installation Tweaks",{"type":20,"tag":1215,"props":1288,"children":1289},{},[1290],{"type":20,"tag":58,"props":1291,"children":1293},{"href":667,"rel":1292},[62],[1294],{"type":25,"value":1295},"Arch Linux Wiki - Installation Guide",{"type":20,"tag":1215,"props":1297,"children":1298},{},[1299],{"type":20,"tag":58,"props":1300,"children":1302},{"href":1115,"rel":1301},[62],[1303],{"type":25,"value":1304},"Arch Linux Wiki - GRUB - UEFI Systems",{"type":20,"tag":1215,"props":1306,"children":1307},{},[1308],{"type":20,"tag":58,"props":1309,"children":1311},{"href":1169,"rel":1310},[62],[1312],{"type":25,"value":1313},"Vagrant VBoxManage Customizations ",{"type":20,"tag":1315,"props":1316,"children":1317},"style",{},[1318],{"type":25,"value":1319},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}",{"title":7,"searchDepth":265,"depth":265,"links":1321},[1322,1323,1329,1330],{"id":94,"depth":265,"text":97},{"id":656,"depth":265,"text":659,"children":1324},[1325,1326,1327,1328],{"id":677,"depth":274,"text":680},{"id":827,"depth":274,"text":830},{"id":943,"depth":274,"text":946},{"id":1069,"depth":274,"text":1072},{"id":1140,"depth":265,"text":1143},{"id":1206,"depth":265,"text":1209},"markdown","content:articles:persistent-archlinux-usb.md","content","articles/persistent-archlinux-usb.md","articles/persistent-archlinux-usb","md",1735327945075] \ No newline at end of file diff --git a/articles/persistent-archlinux-usb/index.html b/articles/persistent-archlinux-usb/index.html index 65526109..e6027350 100644 --- a/articles/persistent-archlinux-usb/index.html +++ b/articles/persistent-archlinux-usb/index.html @@ -1,41 +1,41 @@ Colton Padden - + - - - - - + + + + + - + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + - -

            Create a Persistent Arch Linux Bootable USB with Vagrant

            When installing a linux distribution, it is common for the instructions to have + +

            Create a Persistent Arch Linux Bootable USB with Vagrant

            When installing a linux distribution, it is common for the instructions to have the user create a bootable USB, boot from the device, and proceed with the installation procedure from that live medium. However, this blog post will outline an alternative approach where a virtual machine created with Vagrant @@ -125,5 +125,5 @@ booting the machine. 11

            Command: ["controlvm", "060a716b-1965-49e2-bc56-12beed5df716", "usbattach36fc9e60-c465-11cf-8056-444553540000"]
             
             Stderr: VBoxManage.exe: error: Machine '060a716b-1965-49e2-bc56-12beed5df716' is not currently running.
            -

            References

            1. Docker Desktop on Mac vs. Docker Toolbox
            2. GitHub - HyperKit
            3. GitHub - Docker for Mac - Issue #900
            4. Vagrant Cloud - Arch Linux
            5. Attaching USB Devices to VirtualBox Guests using VBoxManage
            6. GitHub Gist - Vagrant USB Filter
            7. Arch Linux Wiki - EFI System Partition - Format Partitions
            8. Arch Linux Wiki - Arch Linux on USB - Installation Tweaks
            9. Arch Linux Wiki - Installation Guide
            10. Arch Linux Wiki - GRUB - UEFI Systems
            11. Vagrant VBoxManage Customizations
            - \ No newline at end of file +

            References

            1. Docker Desktop on Mac vs. Docker Toolbox
            2. GitHub - HyperKit
            3. GitHub - Docker for Mac - Issue #900
            4. Vagrant Cloud - Arch Linux
            5. Attaching USB Devices to VirtualBox Guests using VBoxManage
            6. GitHub Gist - Vagrant USB Filter
            7. Arch Linux Wiki - EFI System Partition - Format Partitions
            8. Arch Linux Wiki - Arch Linux on USB - Installation Tweaks
            9. Arch Linux Wiki - Installation Guide
            10. Arch Linux Wiki - GRUB - UEFI Systems
            11. Vagrant VBoxManage Customizations
            + \ No newline at end of file diff --git a/articles/podcast-transcription-whispercpp/_payload.json b/articles/podcast-transcription-whispercpp/_payload.json index 3143f042..7a55dc90 100644 --- a/articles/podcast-transcription-whispercpp/_payload.json +++ b/articles/podcast-transcription-whispercpp/_payload.json @@ -1 +1 @@ -[{"data":1,"prerenderedAt":750},["ShallowReactive",2],{"page-data":3},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"draft":6,"date":10,"tags":11,"categories":14,"excerpt":16,"body":55,"_type":744,"_id":745,"_source":746,"_file":747,"_stem":748,"_extension":749},"/articles/podcast-transcription-whispercpp","articles",false,"","Easily Transcribe Podcasts with Whisper.cpp","If you've ever had the need to transcribe a podcast, lecture, or some other audio recording, it turns out it's surprisingly easy with the extremely impressive whisper.cpp project. This high-performance fork of OpenAI's Whisper can run on all sorts of hardware -- including my M1 Mac Mini. Let's walk through an example from start-to-finish of transcribing an episode of the Alter Everything podcast.","2024-01-08",[12,13],"whisper.cpp","ml",[15],"programming",{"type":17,"children":18},"root",[19],{"type":20,"tag":21,"props":22,"children":23},"element","p",{},[24,27,35,37,44,46,53],{"type":25,"value":26},"text","If you've ever had the need to transcribe a podcast, lecture, or some other audio recording, it turns out it's surprisingly easy with the extremely impressive ",{"type":20,"tag":28,"props":29,"children":33},"a",{"href":30,"rel":31},"https://github.com/ggerganov/whisper.cpp",[32],"nofollow",[34],{"type":25,"value":12},{"type":25,"value":36}," project. This high-performance fork of ",{"type":20,"tag":28,"props":38,"children":41},{"href":39,"rel":40},"https://github.com/openai/whisper",[32],[42],{"type":25,"value":43},"OpenAI's Whisper",{"type":25,"value":45}," can run on all sorts of hardware -- including my M1 Mac Mini. Let's walk through an example from start-to-finish of transcribing an episode of the ",{"type":20,"tag":28,"props":47,"children":50},{"href":48,"rel":49},"https://podcasts.apple.com/us/podcast/alter-everything/id1356137854",[32],[51],{"type":25,"value":52},"Alter Everything",{"type":25,"value":54}," podcast.",{"type":17,"children":56,"toc":739},[57,79,86,130,222,234,399,412,424,550,555,720,725,733],{"type":20,"tag":21,"props":58,"children":59},{},[60,61,66,67,72,73,78],{"type":25,"value":26},{"type":20,"tag":28,"props":62,"children":64},{"href":30,"rel":63},[32],[65],{"type":25,"value":12},{"type":25,"value":36},{"type":20,"tag":28,"props":68,"children":70},{"href":39,"rel":69},[32],[71],{"type":25,"value":43},{"type":25,"value":45},{"type":20,"tag":28,"props":74,"children":76},{"href":48,"rel":75},[32],[77],{"type":25,"value":52},{"type":25,"value":54},{"type":20,"tag":80,"props":81,"children":83},"h2",{"id":82},"obtain-audio-files",[84],{"type":25,"value":85},"Obtain Audio File(s)",{"type":20,"tag":21,"props":87,"children":88},{},[89,91,98,100,106,108,113,115,120,122,128],{"type":25,"value":90},"First, let's get the ",{"type":20,"tag":92,"props":93,"children":95},"code",{"className":94},[],[96],{"type":25,"value":97},"wav",{"type":25,"value":99}," file from YouTube using the ",{"type":20,"tag":92,"props":101,"children":103},{"className":102},[],[104],{"type":25,"value":105},"youtube-dl",{"type":25,"value":107}," utility. It should be noted that ",{"type":20,"tag":92,"props":109,"children":111},{"className":110},[],[112],{"type":25,"value":12},{"type":25,"value":114}," expects ",{"type":20,"tag":92,"props":116,"children":118},{"className":117},[],[119],{"type":25,"value":97},{"type":25,"value":121}," filetypes, and this utility defaults to ",{"type":20,"tag":92,"props":123,"children":125},{"className":124},[],[126],{"type":25,"value":127},"mp3",{"type":25,"value":129},".",{"type":20,"tag":131,"props":132,"children":136},"pre",{"code":133,"language":134,"meta":7,"className":135,"style":7}," $ youtube-dl \\\n --extract-audio \\\n --audio-format wav \\\n --output podcast.wav \\\n \"https://www.youtube.com/watch?v=CoUN690wSYQ\"\n","sh","language-sh shiki shiki-themes github-light",[137],{"type":20,"tag":92,"props":138,"children":139},{"__ignoreMap":7},[140,164,177,195,213],{"type":20,"tag":141,"props":142,"children":145},"span",{"class":143,"line":144},"line",1,[146,152,158],{"type":20,"tag":141,"props":147,"children":149},{"style":148},"--shiki-default:#6F42C1",[150],{"type":25,"value":151}," $",{"type":20,"tag":141,"props":153,"children":155},{"style":154},"--shiki-default:#032F62",[156],{"type":25,"value":157}," youtube-dl",{"type":20,"tag":141,"props":159,"children":161},{"style":160},"--shiki-default:#005CC5",[162],{"type":25,"value":163}," \\\n",{"type":20,"tag":141,"props":165,"children":167},{"class":143,"line":166},2,[168,173],{"type":20,"tag":141,"props":169,"children":170},{"style":160},[171],{"type":25,"value":172}," --extract-audio",{"type":20,"tag":141,"props":174,"children":175},{"style":160},[176],{"type":25,"value":163},{"type":20,"tag":141,"props":178,"children":180},{"class":143,"line":179},3,[181,186,191],{"type":20,"tag":141,"props":182,"children":183},{"style":160},[184],{"type":25,"value":185}," --audio-format",{"type":20,"tag":141,"props":187,"children":188},{"style":154},[189],{"type":25,"value":190}," wav",{"type":20,"tag":141,"props":192,"children":193},{"style":160},[194],{"type":25,"value":163},{"type":20,"tag":141,"props":196,"children":198},{"class":143,"line":197},4,[199,204,209],{"type":20,"tag":141,"props":200,"children":201},{"style":160},[202],{"type":25,"value":203}," --output",{"type":20,"tag":141,"props":205,"children":206},{"style":154},[207],{"type":25,"value":208}," podcast.wav",{"type":20,"tag":141,"props":210,"children":211},{"style":160},[212],{"type":25,"value":163},{"type":20,"tag":141,"props":214,"children":216},{"class":143,"line":215},5,[217],{"type":20,"tag":141,"props":218,"children":219},{"style":154},[220],{"type":25,"value":221}," \"https://www.youtube.com/watch?v=CoUN690wSYQ\"\n",{"type":20,"tag":21,"props":223,"children":224},{},[225,227,232],{"type":25,"value":226},"This file has a 44.1 kHz sample rate, and ",{"type":20,"tag":92,"props":228,"children":230},{"className":229},[],[231],{"type":25,"value":12},{"type":25,"value":233}," expects 16 kHz, so let's go ahead and convert that.",{"type":20,"tag":131,"props":235,"children":237},{"code":236,"language":134,"meta":7,"className":135,"style":7}," $ file podcast.wav\npodcast.wav: RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, stereo 44100 Hz\n\n $ ffmpeg -i podcast.wav -ar 16000 podcast-16khz.wav\n\n $ file podcast-16khz.wav\npodcast-16khz.wav: RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, stereo 16000 Hz\n\n# NOTE: it looks like it's possible to specify this conversion as a post-process as a\n# flag to the `youtube-dl` command -- I will explore this further next time...\n# youtube-dl --extract-audio --audio-quality 0 --audio-format mp3 --postprocessor-args \"-ar 44100\" %dl%\n",[238],{"type":20,"tag":92,"props":239,"children":240},{"__ignoreMap":7},[241,258,277,286,322,329,345,363,371,381,390],{"type":20,"tag":141,"props":242,"children":243},{"class":143,"line":144},[244,248,253],{"type":20,"tag":141,"props":245,"children":246},{"style":148},[247],{"type":25,"value":151},{"type":20,"tag":141,"props":249,"children":250},{"style":154},[251],{"type":25,"value":252}," file",{"type":20,"tag":141,"props":254,"children":255},{"style":154},[256],{"type":25,"value":257}," podcast.wav\n",{"type":20,"tag":141,"props":259,"children":260},{"class":143,"line":166},[261,266,271],{"type":20,"tag":141,"props":262,"children":263},{"style":148},[264],{"type":25,"value":265},"podcast.wav:",{"type":20,"tag":141,"props":267,"children":268},{"style":154},[269],{"type":25,"value":270}," RIFF",{"type":20,"tag":141,"props":272,"children":274},{"style":273},"--shiki-default:#24292E",[275],{"type":25,"value":276}," (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, stereo 44100 Hz\n",{"type":20,"tag":141,"props":278,"children":279},{"class":143,"line":179},[280],{"type":20,"tag":141,"props":281,"children":283},{"emptyLinePlaceholder":282},true,[284],{"type":25,"value":285},"\n",{"type":20,"tag":141,"props":287,"children":288},{"class":143,"line":197},[289,293,298,303,307,312,317],{"type":20,"tag":141,"props":290,"children":291},{"style":148},[292],{"type":25,"value":151},{"type":20,"tag":141,"props":294,"children":295},{"style":154},[296],{"type":25,"value":297}," ffmpeg",{"type":20,"tag":141,"props":299,"children":300},{"style":160},[301],{"type":25,"value":302}," -i",{"type":20,"tag":141,"props":304,"children":305},{"style":154},[306],{"type":25,"value":208},{"type":20,"tag":141,"props":308,"children":309},{"style":160},[310],{"type":25,"value":311}," -ar",{"type":20,"tag":141,"props":313,"children":314},{"style":160},[315],{"type":25,"value":316}," 16000",{"type":20,"tag":141,"props":318,"children":319},{"style":154},[320],{"type":25,"value":321}," podcast-16khz.wav\n",{"type":20,"tag":141,"props":323,"children":324},{"class":143,"line":215},[325],{"type":20,"tag":141,"props":326,"children":327},{"emptyLinePlaceholder":282},[328],{"type":25,"value":285},{"type":20,"tag":141,"props":330,"children":332},{"class":143,"line":331},6,[333,337,341],{"type":20,"tag":141,"props":334,"children":335},{"style":148},[336],{"type":25,"value":151},{"type":20,"tag":141,"props":338,"children":339},{"style":154},[340],{"type":25,"value":252},{"type":20,"tag":141,"props":342,"children":343},{"style":154},[344],{"type":25,"value":321},{"type":20,"tag":141,"props":346,"children":348},{"class":143,"line":347},7,[349,354,358],{"type":20,"tag":141,"props":350,"children":351},{"style":148},[352],{"type":25,"value":353},"podcast-16khz.wav:",{"type":20,"tag":141,"props":355,"children":356},{"style":154},[357],{"type":25,"value":270},{"type":20,"tag":141,"props":359,"children":360},{"style":273},[361],{"type":25,"value":362}," (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, stereo 16000 Hz\n",{"type":20,"tag":141,"props":364,"children":366},{"class":143,"line":365},8,[367],{"type":20,"tag":141,"props":368,"children":369},{"emptyLinePlaceholder":282},[370],{"type":25,"value":285},{"type":20,"tag":141,"props":372,"children":374},{"class":143,"line":373},9,[375],{"type":20,"tag":141,"props":376,"children":378},{"style":377},"--shiki-default:#6A737D",[379],{"type":25,"value":380},"# NOTE: it looks like it's possible to specify this conversion as a post-process as a\n",{"type":20,"tag":141,"props":382,"children":384},{"class":143,"line":383},10,[385],{"type":20,"tag":141,"props":386,"children":387},{"style":377},[388],{"type":25,"value":389},"# flag to the `youtube-dl` command -- I will explore this further next time...\n",{"type":20,"tag":141,"props":391,"children":393},{"class":143,"line":392},11,[394],{"type":20,"tag":141,"props":395,"children":396},{"style":377},[397],{"type":25,"value":398},"# youtube-dl --extract-audio --audio-quality 0 --audio-format mp3 --postprocessor-args \"-ar 44100\" %dl%\n",{"type":20,"tag":80,"props":400,"children":402},{"id":401},"build-whispercpp-transcribe-audio",[403,405,410],{"type":25,"value":404},"Build ",{"type":20,"tag":92,"props":406,"children":408},{"className":407},[],[409],{"type":25,"value":12},{"type":25,"value":411}," & Transcribe Audio",{"type":20,"tag":21,"props":413,"children":414},{},[415,417,422],{"type":25,"value":416},"Then, let's get the latest version of ",{"type":20,"tag":92,"props":418,"children":420},{"className":419},[],[421],{"type":25,"value":12},{"type":25,"value":423},", download the English Whisper model, and build the example.",{"type":20,"tag":131,"props":425,"children":427},{"code":426,"language":134,"meta":7,"className":135,"style":7},"# Clone the `whisper.cpp` repository\n $ git clone --depth 1 git@github.com:ggerganov/whisper.cpp && cd whisper.cpp\n\n# Download the English Whisper model in `ggml` format\n $ bash ./models/download-ggml-model.sh base.en\n\n# Build the main example\n $ make\n",[428],{"type":20,"tag":92,"props":429,"children":430},{"__ignoreMap":7},[431,439,486,493,501,523,530,538],{"type":20,"tag":141,"props":432,"children":433},{"class":143,"line":144},[434],{"type":20,"tag":141,"props":435,"children":436},{"style":377},[437],{"type":25,"value":438},"# Clone the `whisper.cpp` repository\n",{"type":20,"tag":141,"props":440,"children":441},{"class":143,"line":166},[442,446,451,456,461,466,471,476,481],{"type":20,"tag":141,"props":443,"children":444},{"style":148},[445],{"type":25,"value":151},{"type":20,"tag":141,"props":447,"children":448},{"style":154},[449],{"type":25,"value":450}," git",{"type":20,"tag":141,"props":452,"children":453},{"style":154},[454],{"type":25,"value":455}," clone",{"type":20,"tag":141,"props":457,"children":458},{"style":160},[459],{"type":25,"value":460}," --depth",{"type":20,"tag":141,"props":462,"children":463},{"style":160},[464],{"type":25,"value":465}," 1",{"type":20,"tag":141,"props":467,"children":468},{"style":154},[469],{"type":25,"value":470}," git@github.com:ggerganov/whisper.cpp",{"type":20,"tag":141,"props":472,"children":473},{"style":273},[474],{"type":25,"value":475}," && ",{"type":20,"tag":141,"props":477,"children":478},{"style":160},[479],{"type":25,"value":480},"cd",{"type":20,"tag":141,"props":482,"children":483},{"style":154},[484],{"type":25,"value":485}," whisper.cpp\n",{"type":20,"tag":141,"props":487,"children":488},{"class":143,"line":179},[489],{"type":20,"tag":141,"props":490,"children":491},{"emptyLinePlaceholder":282},[492],{"type":25,"value":285},{"type":20,"tag":141,"props":494,"children":495},{"class":143,"line":197},[496],{"type":20,"tag":141,"props":497,"children":498},{"style":377},[499],{"type":25,"value":500},"# Download the English Whisper model in `ggml` format\n",{"type":20,"tag":141,"props":502,"children":503},{"class":143,"line":215},[504,508,513,518],{"type":20,"tag":141,"props":505,"children":506},{"style":148},[507],{"type":25,"value":151},{"type":20,"tag":141,"props":509,"children":510},{"style":154},[511],{"type":25,"value":512}," bash",{"type":20,"tag":141,"props":514,"children":515},{"style":154},[516],{"type":25,"value":517}," ./models/download-ggml-model.sh",{"type":20,"tag":141,"props":519,"children":520},{"style":154},[521],{"type":25,"value":522}," base.en\n",{"type":20,"tag":141,"props":524,"children":525},{"class":143,"line":331},[526],{"type":20,"tag":141,"props":527,"children":528},{"emptyLinePlaceholder":282},[529],{"type":25,"value":285},{"type":20,"tag":141,"props":531,"children":532},{"class":143,"line":347},[533],{"type":20,"tag":141,"props":534,"children":535},{"style":377},[536],{"type":25,"value":537},"# Build the main example\n",{"type":20,"tag":141,"props":539,"children":540},{"class":143,"line":365},[541,545],{"type":20,"tag":141,"props":542,"children":543},{"style":148},[544],{"type":25,"value":151},{"type":20,"tag":141,"props":546,"children":547},{"style":154},[548],{"type":25,"value":549}," make\n",{"type":20,"tag":21,"props":551,"children":552},{},[553],{"type":25,"value":554},"And finally, let's transcribe that podcast!",{"type":20,"tag":131,"props":556,"children":558},{"code":557,"language":134,"meta":7,"className":135,"style":7}," $ ./main \\\n -m ~/workspace/whisper.cpp/models/ggml-base.en.bin \\\n -f ~/Downloads/podcast-16khz.wav \\\n --output-vtt \\\n --output-file out\n\n# whisper_print_timings: load time = 114.71 ms\n# whisper_print_timings: fallbacks = 0 p / 0 h\n# whisper_print_timings: mel time = 692.20 ms\n# whisper_print_timings: sample time = 22278.10 ms / 27893 runs ( 0.80 ms per run)\n# whisper_print_timings: encode time = 10000.75 ms / 55 runs ( 181.83 ms per run)\n# whisper_print_timings: decode time = 331.77 ms / 54 runs ( 6.14 ms per run)\n# whisper_print_timings: batchd time = 45236.73 ms / 27566 runs ( 1.64 ms per run)\n# whisper_print_timings: prompt time = 1921.90 ms / 11832 runs ( 0.16 ms per run)\n# whisper_print_timings: total time = 80709.54 ms\n",[559],{"type":20,"tag":92,"props":560,"children":561},{"__ignoreMap":7},[562,578,595,612,624,637,644,652,660,668,676,684,693,702,711],{"type":20,"tag":141,"props":563,"children":564},{"class":143,"line":144},[565,569,574],{"type":20,"tag":141,"props":566,"children":567},{"style":148},[568],{"type":25,"value":151},{"type":20,"tag":141,"props":570,"children":571},{"style":154},[572],{"type":25,"value":573}," ./main",{"type":20,"tag":141,"props":575,"children":576},{"style":160},[577],{"type":25,"value":163},{"type":20,"tag":141,"props":579,"children":580},{"class":143,"line":166},[581,586,591],{"type":20,"tag":141,"props":582,"children":583},{"style":160},[584],{"type":25,"value":585}," -m",{"type":20,"tag":141,"props":587,"children":588},{"style":154},[589],{"type":25,"value":590}," ~/workspace/whisper.cpp/models/ggml-base.en.bin",{"type":20,"tag":141,"props":592,"children":593},{"style":160},[594],{"type":25,"value":163},{"type":20,"tag":141,"props":596,"children":597},{"class":143,"line":179},[598,603,608],{"type":20,"tag":141,"props":599,"children":600},{"style":160},[601],{"type":25,"value":602}," -f",{"type":20,"tag":141,"props":604,"children":605},{"style":154},[606],{"type":25,"value":607}," ~/Downloads/podcast-16khz.wav",{"type":20,"tag":141,"props":609,"children":610},{"style":160},[611],{"type":25,"value":163},{"type":20,"tag":141,"props":613,"children":614},{"class":143,"line":197},[615,620],{"type":20,"tag":141,"props":616,"children":617},{"style":160},[618],{"type":25,"value":619}," --output-vtt",{"type":20,"tag":141,"props":621,"children":622},{"style":160},[623],{"type":25,"value":163},{"type":20,"tag":141,"props":625,"children":626},{"class":143,"line":215},[627,632],{"type":20,"tag":141,"props":628,"children":629},{"style":160},[630],{"type":25,"value":631}," --output-file",{"type":20,"tag":141,"props":633,"children":634},{"style":154},[635],{"type":25,"value":636}," out\n",{"type":20,"tag":141,"props":638,"children":639},{"class":143,"line":331},[640],{"type":20,"tag":141,"props":641,"children":642},{"emptyLinePlaceholder":282},[643],{"type":25,"value":285},{"type":20,"tag":141,"props":645,"children":646},{"class":143,"line":347},[647],{"type":20,"tag":141,"props":648,"children":649},{"style":377},[650],{"type":25,"value":651},"# whisper_print_timings: load time = 114.71 ms\n",{"type":20,"tag":141,"props":653,"children":654},{"class":143,"line":365},[655],{"type":20,"tag":141,"props":656,"children":657},{"style":377},[658],{"type":25,"value":659},"# whisper_print_timings: fallbacks = 0 p / 0 h\n",{"type":20,"tag":141,"props":661,"children":662},{"class":143,"line":373},[663],{"type":20,"tag":141,"props":664,"children":665},{"style":377},[666],{"type":25,"value":667},"# whisper_print_timings: mel time = 692.20 ms\n",{"type":20,"tag":141,"props":669,"children":670},{"class":143,"line":383},[671],{"type":20,"tag":141,"props":672,"children":673},{"style":377},[674],{"type":25,"value":675},"# whisper_print_timings: sample time = 22278.10 ms / 27893 runs ( 0.80 ms per run)\n",{"type":20,"tag":141,"props":677,"children":678},{"class":143,"line":392},[679],{"type":20,"tag":141,"props":680,"children":681},{"style":377},[682],{"type":25,"value":683},"# whisper_print_timings: encode time = 10000.75 ms / 55 runs ( 181.83 ms per run)\n",{"type":20,"tag":141,"props":685,"children":687},{"class":143,"line":686},12,[688],{"type":20,"tag":141,"props":689,"children":690},{"style":377},[691],{"type":25,"value":692},"# whisper_print_timings: decode time = 331.77 ms / 54 runs ( 6.14 ms per run)\n",{"type":20,"tag":141,"props":694,"children":696},{"class":143,"line":695},13,[697],{"type":20,"tag":141,"props":698,"children":699},{"style":377},[700],{"type":25,"value":701},"# whisper_print_timings: batchd time = 45236.73 ms / 27566 runs ( 1.64 ms per run)\n",{"type":20,"tag":141,"props":703,"children":705},{"class":143,"line":704},14,[706],{"type":20,"tag":141,"props":707,"children":708},{"style":377},[709],{"type":25,"value":710},"# whisper_print_timings: prompt time = 1921.90 ms / 11832 runs ( 0.16 ms per run)\n",{"type":20,"tag":141,"props":712,"children":714},{"class":143,"line":713},15,[715],{"type":20,"tag":141,"props":716,"children":717},{"style":377},[718],{"type":25,"value":719},"# whisper_print_timings: total time = 80709.54 ms\n",{"type":20,"tag":21,"props":721,"children":722},{},[723],{"type":25,"value":724},"A full podcast transcribed in ~80 seconds on an M1 Mac Mini -- not too bad!",{"type":20,"tag":131,"props":726,"children":728},{"code":727},"# out.vtt\n\n00:00:00.000 --> 00:00:06.480\n >> Hi everyone. We recently launched a short engagement feedback survey for the Alter Everything\n\n00:00:06.480 --> 00:00:11.360\n podcast. Click the link in the episode description wherever you're listening to let us know what\n\n00:00:11.360 --> 00:00:16.320\n you think and help us improve our show.\n\n00:00:16.320 --> 00:00:21.200\n Welcome to Alter Everything, a podcast about data science and analytics culture. I'm Megan\n\n00:00:21.200 --> 00:00:26.440\n Dibble and today I'm talking with Nick Schrock, CTO and founder of Dagster Labs. We discussed\n\n00:00:26.440 --> 00:00:31.560\n data engineering trends, challenges in the field, why he started his company, and what\n\n00:00:31.560 --> 00:00:38.960\n makes him excited about the future of data engineering. Let's get started.\n\n00:00:38.960 --> 00:00:42.720\n >> Hi, Nick. It's great to have you on our show today. Thanks for being here.\n\n00:00:42.720 --> 00:00:43.920\n >> Thanks for having me.\n\n00:00:43.920 --> 00:00:48.280\n >> Yeah. Could you start off by giving an introduction to yourself for our listeners?\n\n00:00:48.280 --> 00:00:52.920\n >> Sure. My name is Nick Schrock. I'm the CTO and founder of Dagster Labs. There's the\n\n00:00:52.920 --> 00:00:59.520\n company behind Dagster, which is a data orchestration framework. Prior to doing this, I was an engineer\n\n00:00:59.520 --> 00:01:05.960\n at Facebook from 2009, 2017. While I was there, I found a team called product infrastructure\n\n00:01:05.960 --> 00:01:09.800\n whose goal was to make our application developers more efficient and productive, and a bunch\n\n00:01:09.800 --> 00:01:13.840\n of open source work came out of that actually, one of which was React, which I had nothing\n\n00:01:13.840 --> 00:01:18.040\n to do with, but actually the CEO of Dagster Labs co-created and I personally co-created\n\n00:01:18.040 --> 00:01:22.640\n GraphQL. So as I like to say, Pete and I were present at the creation of the full hipster\n\n00:01:22.640 --> 00:01:28.680\n stack. I moved on to Facebook in 2017, figuring out what to do next, and this data engineering\n\n00:01:28.680 --> 00:01:32.960\n and data orchestration problem really got me hooked actually quite soon after I left,\n\n00:01:32.960 --> 00:01:36.280\n and the rest is history. I'm sure we'll get into that more.\n",[729],{"type":20,"tag":92,"props":730,"children":731},{"__ignoreMap":7},[732],{"type":25,"value":727},{"type":20,"tag":734,"props":735,"children":736},"style",{},[737],{"type":25,"value":738},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}",{"title":7,"searchDepth":166,"depth":166,"links":740},[741,742],{"id":82,"depth":166,"text":85},{"id":401,"depth":166,"text":743},"Build whisper.cpp & Transcribe Audio","markdown","content:articles:podcast-transcription-whispercpp.md","content","articles/podcast-transcription-whispercpp.md","articles/podcast-transcription-whispercpp","md",1735276484939] \ No newline at end of file +[{"data":1,"prerenderedAt":750},["ShallowReactive",2],{"page-data":3},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"draft":6,"date":10,"tags":11,"categories":14,"excerpt":16,"body":55,"_type":744,"_id":745,"_source":746,"_file":747,"_stem":748,"_extension":749},"/articles/podcast-transcription-whispercpp","articles",false,"","Easily Transcribe Podcasts with Whisper.cpp","If you've ever had the need to transcribe a podcast, lecture, or some other audio recording, it turns out it's surprisingly easy with the extremely impressive whisper.cpp project. This high-performance fork of OpenAI's Whisper can run on all sorts of hardware -- including my M1 Mac Mini. Let's walk through an example from start-to-finish of transcribing an episode of the Alter Everything podcast.","2024-01-08",[12,13],"whisper.cpp","ml",[15],"programming",{"type":17,"children":18},"root",[19],{"type":20,"tag":21,"props":22,"children":23},"element","p",{},[24,27,35,37,44,46,53],{"type":25,"value":26},"text","If you've ever had the need to transcribe a podcast, lecture, or some other audio recording, it turns out it's surprisingly easy with the extremely impressive ",{"type":20,"tag":28,"props":29,"children":33},"a",{"href":30,"rel":31},"https://github.com/ggerganov/whisper.cpp",[32],"nofollow",[34],{"type":25,"value":12},{"type":25,"value":36}," project. This high-performance fork of ",{"type":20,"tag":28,"props":38,"children":41},{"href":39,"rel":40},"https://github.com/openai/whisper",[32],[42],{"type":25,"value":43},"OpenAI's Whisper",{"type":25,"value":45}," can run on all sorts of hardware -- including my M1 Mac Mini. Let's walk through an example from start-to-finish of transcribing an episode of the ",{"type":20,"tag":28,"props":47,"children":50},{"href":48,"rel":49},"https://podcasts.apple.com/us/podcast/alter-everything/id1356137854",[32],[51],{"type":25,"value":52},"Alter Everything",{"type":25,"value":54}," podcast.",{"type":17,"children":56,"toc":739},[57,79,86,130,222,234,399,412,424,550,555,720,725,733],{"type":20,"tag":21,"props":58,"children":59},{},[60,61,66,67,72,73,78],{"type":25,"value":26},{"type":20,"tag":28,"props":62,"children":64},{"href":30,"rel":63},[32],[65],{"type":25,"value":12},{"type":25,"value":36},{"type":20,"tag":28,"props":68,"children":70},{"href":39,"rel":69},[32],[71],{"type":25,"value":43},{"type":25,"value":45},{"type":20,"tag":28,"props":74,"children":76},{"href":48,"rel":75},[32],[77],{"type":25,"value":52},{"type":25,"value":54},{"type":20,"tag":80,"props":81,"children":83},"h2",{"id":82},"obtain-audio-files",[84],{"type":25,"value":85},"Obtain Audio File(s)",{"type":20,"tag":21,"props":87,"children":88},{},[89,91,98,100,106,108,113,115,120,122,128],{"type":25,"value":90},"First, let's get the ",{"type":20,"tag":92,"props":93,"children":95},"code",{"className":94},[],[96],{"type":25,"value":97},"wav",{"type":25,"value":99}," file from YouTube using the ",{"type":20,"tag":92,"props":101,"children":103},{"className":102},[],[104],{"type":25,"value":105},"youtube-dl",{"type":25,"value":107}," utility. It should be noted that ",{"type":20,"tag":92,"props":109,"children":111},{"className":110},[],[112],{"type":25,"value":12},{"type":25,"value":114}," expects ",{"type":20,"tag":92,"props":116,"children":118},{"className":117},[],[119],{"type":25,"value":97},{"type":25,"value":121}," filetypes, and this utility defaults to ",{"type":20,"tag":92,"props":123,"children":125},{"className":124},[],[126],{"type":25,"value":127},"mp3",{"type":25,"value":129},".",{"type":20,"tag":131,"props":132,"children":136},"pre",{"code":133,"language":134,"meta":7,"className":135,"style":7}," $ youtube-dl \\\n --extract-audio \\\n --audio-format wav \\\n --output podcast.wav \\\n \"https://www.youtube.com/watch?v=CoUN690wSYQ\"\n","sh","language-sh shiki shiki-themes github-light",[137],{"type":20,"tag":92,"props":138,"children":139},{"__ignoreMap":7},[140,164,177,195,213],{"type":20,"tag":141,"props":142,"children":145},"span",{"class":143,"line":144},"line",1,[146,152,158],{"type":20,"tag":141,"props":147,"children":149},{"style":148},"--shiki-default:#6F42C1",[150],{"type":25,"value":151}," $",{"type":20,"tag":141,"props":153,"children":155},{"style":154},"--shiki-default:#032F62",[156],{"type":25,"value":157}," youtube-dl",{"type":20,"tag":141,"props":159,"children":161},{"style":160},"--shiki-default:#005CC5",[162],{"type":25,"value":163}," \\\n",{"type":20,"tag":141,"props":165,"children":167},{"class":143,"line":166},2,[168,173],{"type":20,"tag":141,"props":169,"children":170},{"style":160},[171],{"type":25,"value":172}," --extract-audio",{"type":20,"tag":141,"props":174,"children":175},{"style":160},[176],{"type":25,"value":163},{"type":20,"tag":141,"props":178,"children":180},{"class":143,"line":179},3,[181,186,191],{"type":20,"tag":141,"props":182,"children":183},{"style":160},[184],{"type":25,"value":185}," --audio-format",{"type":20,"tag":141,"props":187,"children":188},{"style":154},[189],{"type":25,"value":190}," wav",{"type":20,"tag":141,"props":192,"children":193},{"style":160},[194],{"type":25,"value":163},{"type":20,"tag":141,"props":196,"children":198},{"class":143,"line":197},4,[199,204,209],{"type":20,"tag":141,"props":200,"children":201},{"style":160},[202],{"type":25,"value":203}," --output",{"type":20,"tag":141,"props":205,"children":206},{"style":154},[207],{"type":25,"value":208}," podcast.wav",{"type":20,"tag":141,"props":210,"children":211},{"style":160},[212],{"type":25,"value":163},{"type":20,"tag":141,"props":214,"children":216},{"class":143,"line":215},5,[217],{"type":20,"tag":141,"props":218,"children":219},{"style":154},[220],{"type":25,"value":221}," \"https://www.youtube.com/watch?v=CoUN690wSYQ\"\n",{"type":20,"tag":21,"props":223,"children":224},{},[225,227,232],{"type":25,"value":226},"This file has a 44.1 kHz sample rate, and ",{"type":20,"tag":92,"props":228,"children":230},{"className":229},[],[231],{"type":25,"value":12},{"type":25,"value":233}," expects 16 kHz, so let's go ahead and convert that.",{"type":20,"tag":131,"props":235,"children":237},{"code":236,"language":134,"meta":7,"className":135,"style":7}," $ file podcast.wav\npodcast.wav: RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, stereo 44100 Hz\n\n $ ffmpeg -i podcast.wav -ar 16000 podcast-16khz.wav\n\n $ file podcast-16khz.wav\npodcast-16khz.wav: RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, stereo 16000 Hz\n\n# NOTE: it looks like it's possible to specify this conversion as a post-process as a\n# flag to the `youtube-dl` command -- I will explore this further next time...\n# youtube-dl --extract-audio --audio-quality 0 --audio-format mp3 --postprocessor-args \"-ar 44100\" %dl%\n",[238],{"type":20,"tag":92,"props":239,"children":240},{"__ignoreMap":7},[241,258,277,286,322,329,345,363,371,381,390],{"type":20,"tag":141,"props":242,"children":243},{"class":143,"line":144},[244,248,253],{"type":20,"tag":141,"props":245,"children":246},{"style":148},[247],{"type":25,"value":151},{"type":20,"tag":141,"props":249,"children":250},{"style":154},[251],{"type":25,"value":252}," file",{"type":20,"tag":141,"props":254,"children":255},{"style":154},[256],{"type":25,"value":257}," podcast.wav\n",{"type":20,"tag":141,"props":259,"children":260},{"class":143,"line":166},[261,266,271],{"type":20,"tag":141,"props":262,"children":263},{"style":148},[264],{"type":25,"value":265},"podcast.wav:",{"type":20,"tag":141,"props":267,"children":268},{"style":154},[269],{"type":25,"value":270}," RIFF",{"type":20,"tag":141,"props":272,"children":274},{"style":273},"--shiki-default:#24292E",[275],{"type":25,"value":276}," (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, stereo 44100 Hz\n",{"type":20,"tag":141,"props":278,"children":279},{"class":143,"line":179},[280],{"type":20,"tag":141,"props":281,"children":283},{"emptyLinePlaceholder":282},true,[284],{"type":25,"value":285},"\n",{"type":20,"tag":141,"props":287,"children":288},{"class":143,"line":197},[289,293,298,303,307,312,317],{"type":20,"tag":141,"props":290,"children":291},{"style":148},[292],{"type":25,"value":151},{"type":20,"tag":141,"props":294,"children":295},{"style":154},[296],{"type":25,"value":297}," ffmpeg",{"type":20,"tag":141,"props":299,"children":300},{"style":160},[301],{"type":25,"value":302}," -i",{"type":20,"tag":141,"props":304,"children":305},{"style":154},[306],{"type":25,"value":208},{"type":20,"tag":141,"props":308,"children":309},{"style":160},[310],{"type":25,"value":311}," -ar",{"type":20,"tag":141,"props":313,"children":314},{"style":160},[315],{"type":25,"value":316}," 16000",{"type":20,"tag":141,"props":318,"children":319},{"style":154},[320],{"type":25,"value":321}," podcast-16khz.wav\n",{"type":20,"tag":141,"props":323,"children":324},{"class":143,"line":215},[325],{"type":20,"tag":141,"props":326,"children":327},{"emptyLinePlaceholder":282},[328],{"type":25,"value":285},{"type":20,"tag":141,"props":330,"children":332},{"class":143,"line":331},6,[333,337,341],{"type":20,"tag":141,"props":334,"children":335},{"style":148},[336],{"type":25,"value":151},{"type":20,"tag":141,"props":338,"children":339},{"style":154},[340],{"type":25,"value":252},{"type":20,"tag":141,"props":342,"children":343},{"style":154},[344],{"type":25,"value":321},{"type":20,"tag":141,"props":346,"children":348},{"class":143,"line":347},7,[349,354,358],{"type":20,"tag":141,"props":350,"children":351},{"style":148},[352],{"type":25,"value":353},"podcast-16khz.wav:",{"type":20,"tag":141,"props":355,"children":356},{"style":154},[357],{"type":25,"value":270},{"type":20,"tag":141,"props":359,"children":360},{"style":273},[361],{"type":25,"value":362}," (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, stereo 16000 Hz\n",{"type":20,"tag":141,"props":364,"children":366},{"class":143,"line":365},8,[367],{"type":20,"tag":141,"props":368,"children":369},{"emptyLinePlaceholder":282},[370],{"type":25,"value":285},{"type":20,"tag":141,"props":372,"children":374},{"class":143,"line":373},9,[375],{"type":20,"tag":141,"props":376,"children":378},{"style":377},"--shiki-default:#6A737D",[379],{"type":25,"value":380},"# NOTE: it looks like it's possible to specify this conversion as a post-process as a\n",{"type":20,"tag":141,"props":382,"children":384},{"class":143,"line":383},10,[385],{"type":20,"tag":141,"props":386,"children":387},{"style":377},[388],{"type":25,"value":389},"# flag to the `youtube-dl` command -- I will explore this further next time...\n",{"type":20,"tag":141,"props":391,"children":393},{"class":143,"line":392},11,[394],{"type":20,"tag":141,"props":395,"children":396},{"style":377},[397],{"type":25,"value":398},"# youtube-dl --extract-audio --audio-quality 0 --audio-format mp3 --postprocessor-args \"-ar 44100\" %dl%\n",{"type":20,"tag":80,"props":400,"children":402},{"id":401},"build-whispercpp-transcribe-audio",[403,405,410],{"type":25,"value":404},"Build ",{"type":20,"tag":92,"props":406,"children":408},{"className":407},[],[409],{"type":25,"value":12},{"type":25,"value":411}," & Transcribe Audio",{"type":20,"tag":21,"props":413,"children":414},{},[415,417,422],{"type":25,"value":416},"Then, let's get the latest version of ",{"type":20,"tag":92,"props":418,"children":420},{"className":419},[],[421],{"type":25,"value":12},{"type":25,"value":423},", download the English Whisper model, and build the example.",{"type":20,"tag":131,"props":425,"children":427},{"code":426,"language":134,"meta":7,"className":135,"style":7},"# Clone the `whisper.cpp` repository\n $ git clone --depth 1 git@github.com:ggerganov/whisper.cpp && cd whisper.cpp\n\n# Download the English Whisper model in `ggml` format\n $ bash ./models/download-ggml-model.sh base.en\n\n# Build the main example\n $ make\n",[428],{"type":20,"tag":92,"props":429,"children":430},{"__ignoreMap":7},[431,439,486,493,501,523,530,538],{"type":20,"tag":141,"props":432,"children":433},{"class":143,"line":144},[434],{"type":20,"tag":141,"props":435,"children":436},{"style":377},[437],{"type":25,"value":438},"# Clone the `whisper.cpp` repository\n",{"type":20,"tag":141,"props":440,"children":441},{"class":143,"line":166},[442,446,451,456,461,466,471,476,481],{"type":20,"tag":141,"props":443,"children":444},{"style":148},[445],{"type":25,"value":151},{"type":20,"tag":141,"props":447,"children":448},{"style":154},[449],{"type":25,"value":450}," git",{"type":20,"tag":141,"props":452,"children":453},{"style":154},[454],{"type":25,"value":455}," clone",{"type":20,"tag":141,"props":457,"children":458},{"style":160},[459],{"type":25,"value":460}," --depth",{"type":20,"tag":141,"props":462,"children":463},{"style":160},[464],{"type":25,"value":465}," 1",{"type":20,"tag":141,"props":467,"children":468},{"style":154},[469],{"type":25,"value":470}," git@github.com:ggerganov/whisper.cpp",{"type":20,"tag":141,"props":472,"children":473},{"style":273},[474],{"type":25,"value":475}," && ",{"type":20,"tag":141,"props":477,"children":478},{"style":160},[479],{"type":25,"value":480},"cd",{"type":20,"tag":141,"props":482,"children":483},{"style":154},[484],{"type":25,"value":485}," whisper.cpp\n",{"type":20,"tag":141,"props":487,"children":488},{"class":143,"line":179},[489],{"type":20,"tag":141,"props":490,"children":491},{"emptyLinePlaceholder":282},[492],{"type":25,"value":285},{"type":20,"tag":141,"props":494,"children":495},{"class":143,"line":197},[496],{"type":20,"tag":141,"props":497,"children":498},{"style":377},[499],{"type":25,"value":500},"# Download the English Whisper model in `ggml` format\n",{"type":20,"tag":141,"props":502,"children":503},{"class":143,"line":215},[504,508,513,518],{"type":20,"tag":141,"props":505,"children":506},{"style":148},[507],{"type":25,"value":151},{"type":20,"tag":141,"props":509,"children":510},{"style":154},[511],{"type":25,"value":512}," bash",{"type":20,"tag":141,"props":514,"children":515},{"style":154},[516],{"type":25,"value":517}," ./models/download-ggml-model.sh",{"type":20,"tag":141,"props":519,"children":520},{"style":154},[521],{"type":25,"value":522}," base.en\n",{"type":20,"tag":141,"props":524,"children":525},{"class":143,"line":331},[526],{"type":20,"tag":141,"props":527,"children":528},{"emptyLinePlaceholder":282},[529],{"type":25,"value":285},{"type":20,"tag":141,"props":531,"children":532},{"class":143,"line":347},[533],{"type":20,"tag":141,"props":534,"children":535},{"style":377},[536],{"type":25,"value":537},"# Build the main example\n",{"type":20,"tag":141,"props":539,"children":540},{"class":143,"line":365},[541,545],{"type":20,"tag":141,"props":542,"children":543},{"style":148},[544],{"type":25,"value":151},{"type":20,"tag":141,"props":546,"children":547},{"style":154},[548],{"type":25,"value":549}," make\n",{"type":20,"tag":21,"props":551,"children":552},{},[553],{"type":25,"value":554},"And finally, let's transcribe that podcast!",{"type":20,"tag":131,"props":556,"children":558},{"code":557,"language":134,"meta":7,"className":135,"style":7}," $ ./main \\\n -m ~/workspace/whisper.cpp/models/ggml-base.en.bin \\\n -f ~/Downloads/podcast-16khz.wav \\\n --output-vtt \\\n --output-file out\n\n# whisper_print_timings: load time = 114.71 ms\n# whisper_print_timings: fallbacks = 0 p / 0 h\n# whisper_print_timings: mel time = 692.20 ms\n# whisper_print_timings: sample time = 22278.10 ms / 27893 runs ( 0.80 ms per run)\n# whisper_print_timings: encode time = 10000.75 ms / 55 runs ( 181.83 ms per run)\n# whisper_print_timings: decode time = 331.77 ms / 54 runs ( 6.14 ms per run)\n# whisper_print_timings: batchd time = 45236.73 ms / 27566 runs ( 1.64 ms per run)\n# whisper_print_timings: prompt time = 1921.90 ms / 11832 runs ( 0.16 ms per run)\n# whisper_print_timings: total time = 80709.54 ms\n",[559],{"type":20,"tag":92,"props":560,"children":561},{"__ignoreMap":7},[562,578,595,612,624,637,644,652,660,668,676,684,693,702,711],{"type":20,"tag":141,"props":563,"children":564},{"class":143,"line":144},[565,569,574],{"type":20,"tag":141,"props":566,"children":567},{"style":148},[568],{"type":25,"value":151},{"type":20,"tag":141,"props":570,"children":571},{"style":154},[572],{"type":25,"value":573}," ./main",{"type":20,"tag":141,"props":575,"children":576},{"style":160},[577],{"type":25,"value":163},{"type":20,"tag":141,"props":579,"children":580},{"class":143,"line":166},[581,586,591],{"type":20,"tag":141,"props":582,"children":583},{"style":160},[584],{"type":25,"value":585}," -m",{"type":20,"tag":141,"props":587,"children":588},{"style":154},[589],{"type":25,"value":590}," ~/workspace/whisper.cpp/models/ggml-base.en.bin",{"type":20,"tag":141,"props":592,"children":593},{"style":160},[594],{"type":25,"value":163},{"type":20,"tag":141,"props":596,"children":597},{"class":143,"line":179},[598,603,608],{"type":20,"tag":141,"props":599,"children":600},{"style":160},[601],{"type":25,"value":602}," -f",{"type":20,"tag":141,"props":604,"children":605},{"style":154},[606],{"type":25,"value":607}," ~/Downloads/podcast-16khz.wav",{"type":20,"tag":141,"props":609,"children":610},{"style":160},[611],{"type":25,"value":163},{"type":20,"tag":141,"props":613,"children":614},{"class":143,"line":197},[615,620],{"type":20,"tag":141,"props":616,"children":617},{"style":160},[618],{"type":25,"value":619}," --output-vtt",{"type":20,"tag":141,"props":621,"children":622},{"style":160},[623],{"type":25,"value":163},{"type":20,"tag":141,"props":625,"children":626},{"class":143,"line":215},[627,632],{"type":20,"tag":141,"props":628,"children":629},{"style":160},[630],{"type":25,"value":631}," --output-file",{"type":20,"tag":141,"props":633,"children":634},{"style":154},[635],{"type":25,"value":636}," out\n",{"type":20,"tag":141,"props":638,"children":639},{"class":143,"line":331},[640],{"type":20,"tag":141,"props":641,"children":642},{"emptyLinePlaceholder":282},[643],{"type":25,"value":285},{"type":20,"tag":141,"props":645,"children":646},{"class":143,"line":347},[647],{"type":20,"tag":141,"props":648,"children":649},{"style":377},[650],{"type":25,"value":651},"# whisper_print_timings: load time = 114.71 ms\n",{"type":20,"tag":141,"props":653,"children":654},{"class":143,"line":365},[655],{"type":20,"tag":141,"props":656,"children":657},{"style":377},[658],{"type":25,"value":659},"# whisper_print_timings: fallbacks = 0 p / 0 h\n",{"type":20,"tag":141,"props":661,"children":662},{"class":143,"line":373},[663],{"type":20,"tag":141,"props":664,"children":665},{"style":377},[666],{"type":25,"value":667},"# whisper_print_timings: mel time = 692.20 ms\n",{"type":20,"tag":141,"props":669,"children":670},{"class":143,"line":383},[671],{"type":20,"tag":141,"props":672,"children":673},{"style":377},[674],{"type":25,"value":675},"# whisper_print_timings: sample time = 22278.10 ms / 27893 runs ( 0.80 ms per run)\n",{"type":20,"tag":141,"props":677,"children":678},{"class":143,"line":392},[679],{"type":20,"tag":141,"props":680,"children":681},{"style":377},[682],{"type":25,"value":683},"# whisper_print_timings: encode time = 10000.75 ms / 55 runs ( 181.83 ms per run)\n",{"type":20,"tag":141,"props":685,"children":687},{"class":143,"line":686},12,[688],{"type":20,"tag":141,"props":689,"children":690},{"style":377},[691],{"type":25,"value":692},"# whisper_print_timings: decode time = 331.77 ms / 54 runs ( 6.14 ms per run)\n",{"type":20,"tag":141,"props":694,"children":696},{"class":143,"line":695},13,[697],{"type":20,"tag":141,"props":698,"children":699},{"style":377},[700],{"type":25,"value":701},"# whisper_print_timings: batchd time = 45236.73 ms / 27566 runs ( 1.64 ms per run)\n",{"type":20,"tag":141,"props":703,"children":705},{"class":143,"line":704},14,[706],{"type":20,"tag":141,"props":707,"children":708},{"style":377},[709],{"type":25,"value":710},"# whisper_print_timings: prompt time = 1921.90 ms / 11832 runs ( 0.16 ms per run)\n",{"type":20,"tag":141,"props":712,"children":714},{"class":143,"line":713},15,[715],{"type":20,"tag":141,"props":716,"children":717},{"style":377},[718],{"type":25,"value":719},"# whisper_print_timings: total time = 80709.54 ms\n",{"type":20,"tag":21,"props":721,"children":722},{},[723],{"type":25,"value":724},"A full podcast transcribed in ~80 seconds on an M1 Mac Mini -- not too bad!",{"type":20,"tag":131,"props":726,"children":728},{"code":727},"# out.vtt\n\n00:00:00.000 --> 00:00:06.480\n >> Hi everyone. We recently launched a short engagement feedback survey for the Alter Everything\n\n00:00:06.480 --> 00:00:11.360\n podcast. Click the link in the episode description wherever you're listening to let us know what\n\n00:00:11.360 --> 00:00:16.320\n you think and help us improve our show.\n\n00:00:16.320 --> 00:00:21.200\n Welcome to Alter Everything, a podcast about data science and analytics culture. I'm Megan\n\n00:00:21.200 --> 00:00:26.440\n Dibble and today I'm talking with Nick Schrock, CTO and founder of Dagster Labs. We discussed\n\n00:00:26.440 --> 00:00:31.560\n data engineering trends, challenges in the field, why he started his company, and what\n\n00:00:31.560 --> 00:00:38.960\n makes him excited about the future of data engineering. Let's get started.\n\n00:00:38.960 --> 00:00:42.720\n >> Hi, Nick. It's great to have you on our show today. Thanks for being here.\n\n00:00:42.720 --> 00:00:43.920\n >> Thanks for having me.\n\n00:00:43.920 --> 00:00:48.280\n >> Yeah. Could you start off by giving an introduction to yourself for our listeners?\n\n00:00:48.280 --> 00:00:52.920\n >> Sure. My name is Nick Schrock. I'm the CTO and founder of Dagster Labs. There's the\n\n00:00:52.920 --> 00:00:59.520\n company behind Dagster, which is a data orchestration framework. Prior to doing this, I was an engineer\n\n00:00:59.520 --> 00:01:05.960\n at Facebook from 2009, 2017. While I was there, I found a team called product infrastructure\n\n00:01:05.960 --> 00:01:09.800\n whose goal was to make our application developers more efficient and productive, and a bunch\n\n00:01:09.800 --> 00:01:13.840\n of open source work came out of that actually, one of which was React, which I had nothing\n\n00:01:13.840 --> 00:01:18.040\n to do with, but actually the CEO of Dagster Labs co-created and I personally co-created\n\n00:01:18.040 --> 00:01:22.640\n GraphQL. So as I like to say, Pete and I were present at the creation of the full hipster\n\n00:01:22.640 --> 00:01:28.680\n stack. I moved on to Facebook in 2017, figuring out what to do next, and this data engineering\n\n00:01:28.680 --> 00:01:32.960\n and data orchestration problem really got me hooked actually quite soon after I left,\n\n00:01:32.960 --> 00:01:36.280\n and the rest is history. I'm sure we'll get into that more.\n",[729],{"type":20,"tag":92,"props":730,"children":731},{"__ignoreMap":7},[732],{"type":25,"value":727},{"type":20,"tag":734,"props":735,"children":736},"style",{},[737],{"type":25,"value":738},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}",{"title":7,"searchDepth":166,"depth":166,"links":740},[741,742],{"id":82,"depth":166,"text":85},{"id":401,"depth":166,"text":743},"Build whisper.cpp & Transcribe Audio","markdown","content:articles:podcast-transcription-whispercpp.md","content","articles/podcast-transcription-whispercpp.md","articles/podcast-transcription-whispercpp","md",1735327944761] \ No newline at end of file diff --git a/articles/podcast-transcription-whispercpp/index.html b/articles/podcast-transcription-whispercpp/index.html index 46ca76c1..97744b4a 100644 --- a/articles/podcast-transcription-whispercpp/index.html +++ b/articles/podcast-transcription-whispercpp/index.html @@ -1,37 +1,37 @@ Colton Padden - + - - - - - + + + + + - + - - - - - - - - - - - - - + + + + + + + + + + + + + - -

            Easily Transcribe Podcasts with Whisper.cpp

            If you've ever had the need to transcribe a podcast, lecture, or some other audio recording, it turns out it's surprisingly easy with the extremely impressive whisper.cpp project. This high-performance fork of OpenAI's Whisper can run on all sorts of hardware -- including my M1 Mac Mini. Let's walk through an example from start-to-finish of transcribing an episode of the Alter Everything podcast.

            Obtain Audio File(s)

            First, let's get the wav file from YouTube using the youtube-dl utility. It should be noted that whisper.cpp expects wav filetypes, and this utility defaults to mp3.

             $ youtube-dl \
            +
            +

            Easily Transcribe Podcasts with Whisper.cpp

            If you've ever had the need to transcribe a podcast, lecture, or some other audio recording, it turns out it's surprisingly easy with the extremely impressive whisper.cpp project. This high-performance fork of OpenAI's Whisper can run on all sorts of hardware -- including my M1 Mac Mini. Let's walk through an example from start-to-finish of transcribing an episode of the Alter Everything podcast.

            Obtain Audio File(s)

            First, let's get the wav file from YouTube using the youtube-dl utility. It should be noted that whisper.cpp expects wav filetypes, and this utility defaults to mp3.

             $ youtube-dl \
                 --extract-audio \
                 --audio-format wav \
                 --output podcast.wav \
            @@ -131,5 +131,5 @@
             
             00:01:32.960 --> 00:01:36.280
              and the rest is history. I'm sure we'll get into that more.
            -
            - \ No newline at end of file +
            + \ No newline at end of file diff --git a/articles/quick-tip-rerunning-bash-commands/_payload.json b/articles/quick-tip-rerunning-bash-commands/_payload.json index 26ca8be5..a43a5f03 100644 --- a/articles/quick-tip-rerunning-bash-commands/_payload.json +++ b/articles/quick-tip-rerunning-bash-commands/_payload.json @@ -1 +1 @@ -[{"data":1,"prerenderedAt":647},["ShallowReactive",2],{"page-data":3},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"date":10,"draft":6,"tags":11,"categories":14,"excerpt":16,"body":36,"_type":641,"_id":642,"_source":643,"_file":644,"_stem":645,"_extension":646},"/articles/quick-tip-rerunning-bash-commands","articles",false,"","Tip: Re-running Bash Commands","Do you ever find yourself having to re-run a Bash command? I often find this\nhappening to myself when I neglect to use sudo for a command that requires\nroot privileges.","2021-09-22",[12,13],"tip","bash",[15],"tips",{"type":17,"children":18},"root",[19],{"type":20,"tag":21,"props":22,"children":23},"element","p",{},[24,27,34],{"type":25,"value":26},"text","Do you ever find yourself having to re-run a Bash command? I often find this\nhappening to myself when I neglect to use ",{"type":20,"tag":28,"props":29,"children":31},"code",{"className":30},[],[32],{"type":25,"value":33},"sudo",{"type":25,"value":35}," for a command that requires\nroot privileges.",{"type":17,"children":37,"toc":639},[38,48,134,161,245,250,279,381,409,463,476,511,530,572,599,603,633],{"type":20,"tag":21,"props":39,"children":40},{},[41,42,47],{"type":25,"value":26},{"type":20,"tag":28,"props":43,"children":45},{"className":44},[],[46],{"type":25,"value":33},{"type":25,"value":35},{"type":20,"tag":49,"props":50,"children":53},"pre",{"className":51,"code":52,"language":13,"meta":7,"style":7},"language-bash shiki shiki-themes github-light","$ pacman -Syu\nerror: you cannot perform this operation unless you are root.\n",[54],{"type":20,"tag":28,"props":55,"children":56},{"__ignoreMap":7},[57,81],{"type":20,"tag":58,"props":59,"children":62},"span",{"class":60,"line":61},"line",1,[63,69,75],{"type":20,"tag":58,"props":64,"children":66},{"style":65},"--shiki-default:#6F42C1",[67],{"type":25,"value":68},"$",{"type":20,"tag":58,"props":70,"children":72},{"style":71},"--shiki-default:#032F62",[73],{"type":25,"value":74}," pacman",{"type":20,"tag":58,"props":76,"children":78},{"style":77},"--shiki-default:#005CC5",[79],{"type":25,"value":80}," -Syu\n",{"type":20,"tag":58,"props":82,"children":84},{"class":60,"line":83},2,[85,90,95,100,105,110,115,120,124,129],{"type":20,"tag":58,"props":86,"children":87},{"style":65},[88],{"type":25,"value":89},"error:",{"type":20,"tag":58,"props":91,"children":92},{"style":71},[93],{"type":25,"value":94}," you",{"type":20,"tag":58,"props":96,"children":97},{"style":71},[98],{"type":25,"value":99}," cannot",{"type":20,"tag":58,"props":101,"children":102},{"style":71},[103],{"type":25,"value":104}," perform",{"type":20,"tag":58,"props":106,"children":107},{"style":71},[108],{"type":25,"value":109}," this",{"type":20,"tag":58,"props":111,"children":112},{"style":71},[113],{"type":25,"value":114}," operation",{"type":20,"tag":58,"props":116,"children":117},{"style":71},[118],{"type":25,"value":119}," unless",{"type":20,"tag":58,"props":121,"children":122},{"style":71},[123],{"type":25,"value":94},{"type":20,"tag":58,"props":125,"children":126},{"style":71},[127],{"type":25,"value":128}," are",{"type":20,"tag":58,"props":130,"children":131},{"style":71},[132],{"type":25,"value":133}," root.\n",{"type":20,"tag":21,"props":135,"children":136},{},[137,139,145,147,152,154,159],{"type":25,"value":138},"Well, I have good news for you -- you can easily re-issue a command with the\n",{"type":20,"tag":28,"props":140,"children":142},{"className":141},[],[143],{"type":25,"value":144},"!!",{"type":25,"value":146}," designator! Simply type ",{"type":20,"tag":28,"props":148,"children":150},{"className":149},[],[151],{"type":25,"value":33},{"type":25,"value":153}," followed by ",{"type":20,"tag":28,"props":155,"children":157},{"className":156},[],[158],{"type":25,"value":144},{"type":25,"value":160}," and you're good to go.",{"type":20,"tag":49,"props":162,"children":164},{"className":51,"code":163,"language":13,"meta":7,"style":7},"$ sudo !!\nsudo pacman -Syu\n[sudo] password for colton:\n:: Synchronizing package databases...\n",[165],{"type":20,"tag":28,"props":166,"children":167},{"__ignoreMap":7},[168,185,200,221],{"type":20,"tag":58,"props":169,"children":170},{"class":60,"line":61},[171,175,180],{"type":20,"tag":58,"props":172,"children":173},{"style":65},[174],{"type":25,"value":68},{"type":20,"tag":58,"props":176,"children":177},{"style":71},[178],{"type":25,"value":179}," sudo",{"type":20,"tag":58,"props":181,"children":182},{"style":71},[183],{"type":25,"value":184}," !!\n",{"type":20,"tag":58,"props":186,"children":187},{"class":60,"line":83},[188,192,196],{"type":20,"tag":58,"props":189,"children":190},{"style":65},[191],{"type":25,"value":33},{"type":20,"tag":58,"props":193,"children":194},{"style":71},[195],{"type":25,"value":74},{"type":20,"tag":58,"props":197,"children":198},{"style":77},[199],{"type":25,"value":80},{"type":20,"tag":58,"props":201,"children":203},{"class":60,"line":202},3,[204,210,216],{"type":20,"tag":58,"props":205,"children":207},{"style":206},"--shiki-default:#24292E",[208],{"type":25,"value":209},"[sudo] password ",{"type":20,"tag":58,"props":211,"children":213},{"style":212},"--shiki-default:#D73A49",[214],{"type":25,"value":215},"for",{"type":20,"tag":58,"props":217,"children":218},{"style":206},[219],{"type":25,"value":220}," colton:\n",{"type":20,"tag":58,"props":222,"children":224},{"class":60,"line":223},4,[225,230,235,240],{"type":20,"tag":58,"props":226,"children":227},{"style":77},[228],{"type":25,"value":229},"::",{"type":20,"tag":58,"props":231,"children":232},{"style":71},[233],{"type":25,"value":234}," Synchronizing",{"type":20,"tag":58,"props":236,"children":237},{"style":71},[238],{"type":25,"value":239}," package",{"type":20,"tag":58,"props":241,"children":242},{"style":71},[243],{"type":25,"value":244}," databases...\n",{"type":20,"tag":21,"props":246,"children":247},{},[248],{"type":25,"value":249},"--",{"type":20,"tag":21,"props":251,"children":252},{},[253,255,261,263,269,271,277],{"type":25,"value":254},"Commands that are prefixed with a bang, ",{"type":20,"tag":28,"props":256,"children":258},{"className":257},[],[259],{"type":25,"value":260},"!",{"type":25,"value":262},", are considered ",{"type":20,"tag":264,"props":265,"children":266},"em",{},[267],{"type":25,"value":268},"Event\nDesignators,",{"type":25,"value":270}," and are references to your command-line history. You can take a\nlook at your history with the ",{"type":20,"tag":28,"props":272,"children":274},{"className":273},[],[275],{"type":25,"value":276},"history",{"type":25,"value":278}," command.",{"type":20,"tag":49,"props":280,"children":282},{"className":51,"code":281,"language":13,"meta":7,"style":7},"$ history\n 1021 touch hello_world.txt\n 1022 ls\n 1023 echo \"Here we go again!\"\n 1024 find . -name *.py\n",[283],{"type":20,"tag":28,"props":284,"children":285},{"__ignoreMap":7},[286,298,316,329,347],{"type":20,"tag":58,"props":287,"children":288},{"class":60,"line":61},[289,293],{"type":20,"tag":58,"props":290,"children":291},{"style":65},[292],{"type":25,"value":68},{"type":20,"tag":58,"props":294,"children":295},{"style":71},[296],{"type":25,"value":297}," history\n",{"type":20,"tag":58,"props":299,"children":300},{"class":60,"line":83},[301,306,311],{"type":20,"tag":58,"props":302,"children":303},{"style":65},[304],{"type":25,"value":305}," 1021",{"type":20,"tag":58,"props":307,"children":308},{"style":71},[309],{"type":25,"value":310}," touch",{"type":20,"tag":58,"props":312,"children":313},{"style":71},[314],{"type":25,"value":315}," hello_world.txt\n",{"type":20,"tag":58,"props":317,"children":318},{"class":60,"line":202},[319,324],{"type":20,"tag":58,"props":320,"children":321},{"style":65},[322],{"type":25,"value":323}," 1022",{"type":20,"tag":58,"props":325,"children":326},{"style":71},[327],{"type":25,"value":328}," ls\n",{"type":20,"tag":58,"props":330,"children":331},{"class":60,"line":223},[332,337,342],{"type":20,"tag":58,"props":333,"children":334},{"style":65},[335],{"type":25,"value":336}," 1023",{"type":20,"tag":58,"props":338,"children":339},{"style":71},[340],{"type":25,"value":341}," echo",{"type":20,"tag":58,"props":343,"children":344},{"style":71},[345],{"type":25,"value":346}," \"Here we go again!\"\n",{"type":20,"tag":58,"props":348,"children":350},{"class":60,"line":349},5,[351,356,361,366,371,376],{"type":20,"tag":58,"props":352,"children":353},{"style":65},[354],{"type":25,"value":355}," 1024",{"type":20,"tag":58,"props":357,"children":358},{"style":71},[359],{"type":25,"value":360}," find",{"type":20,"tag":58,"props":362,"children":363},{"style":71},[364],{"type":25,"value":365}," .",{"type":20,"tag":58,"props":367,"children":368},{"style":77},[369],{"type":25,"value":370}," -name",{"type":20,"tag":58,"props":372,"children":373},{"style":77},[374],{"type":25,"value":375}," *",{"type":20,"tag":58,"props":377,"children":378},{"style":71},[379],{"type":25,"value":380},".py\n",{"type":20,"tag":21,"props":382,"children":383},{},[384,386,391,393,399,401,407],{"type":25,"value":385},"There are many ways to use ",{"type":20,"tag":28,"props":387,"children":389},{"className":388},[],[390],{"type":25,"value":260},{"type":25,"value":392}," in your shell. For example, if you wanted to\nre-issue a specific command in your history, you could use ",{"type":20,"tag":28,"props":394,"children":396},{"className":395},[],[397],{"type":25,"value":398},"!n",{"type":25,"value":400}," where ",{"type":20,"tag":28,"props":402,"children":404},{"className":403},[],[405],{"type":25,"value":406},"n",{"type":25,"value":408}," is\nthe number next to the command in your history.",{"type":20,"tag":49,"props":410,"children":412},{"className":51,"code":411,"language":13,"meta":7,"style":7},"$ !1023\necho \"Here we go again!\"\nHere we go again!\n",[413],{"type":20,"tag":28,"props":414,"children":415},{"__ignoreMap":7},[416,428,440],{"type":20,"tag":58,"props":417,"children":418},{"class":60,"line":61},[419,423],{"type":20,"tag":58,"props":420,"children":421},{"style":65},[422],{"type":25,"value":68},{"type":20,"tag":58,"props":424,"children":425},{"style":71},[426],{"type":25,"value":427}," !1023\n",{"type":20,"tag":58,"props":429,"children":430},{"class":60,"line":83},[431,436],{"type":20,"tag":58,"props":432,"children":433},{"style":77},[434],{"type":25,"value":435},"echo",{"type":20,"tag":58,"props":437,"children":438},{"style":71},[439],{"type":25,"value":346},{"type":20,"tag":58,"props":441,"children":442},{"class":60,"line":202},[443,448,453,458],{"type":20,"tag":58,"props":444,"children":445},{"style":65},[446],{"type":25,"value":447},"Here",{"type":20,"tag":58,"props":449,"children":450},{"style":71},[451],{"type":25,"value":452}," we",{"type":20,"tag":58,"props":454,"children":455},{"style":71},[456],{"type":25,"value":457}," go",{"type":20,"tag":58,"props":459,"children":460},{"style":71},[461],{"type":25,"value":462}," again!\n",{"type":20,"tag":21,"props":464,"children":465},{},[466,468,474],{"type":25,"value":467},"Or... if you wanted to run the command you issued 4-commands ago, you can use\n",{"type":20,"tag":28,"props":469,"children":471},{"className":470},[],[472],{"type":25,"value":473},"!-4",{"type":25,"value":475},".",{"type":20,"tag":49,"props":477,"children":479},{"className":51,"code":478,"language":13,"meta":7,"style":7},"$ !-4\nls\nhello_world.txt\n",[480],{"type":20,"tag":28,"props":481,"children":482},{"__ignoreMap":7},[483,495,503],{"type":20,"tag":58,"props":484,"children":485},{"class":60,"line":61},[486,490],{"type":20,"tag":58,"props":487,"children":488},{"style":65},[489],{"type":25,"value":68},{"type":20,"tag":58,"props":491,"children":492},{"style":71},[493],{"type":25,"value":494}," !-4\n",{"type":20,"tag":58,"props":496,"children":497},{"class":60,"line":83},[498],{"type":20,"tag":58,"props":499,"children":500},{"style":65},[501],{"type":25,"value":502},"ls\n",{"type":20,"tag":58,"props":504,"children":505},{"class":60,"line":202},[506],{"type":20,"tag":58,"props":507,"children":508},{"style":65},[509],{"type":25,"value":510},"hello_world.txt\n",{"type":20,"tag":21,"props":512,"children":513},{},[514,516,521,523,529],{"type":25,"value":515},"Or... if you wanted to run the last command that started with the string\n",{"type":20,"tag":264,"props":517,"children":518},{},[519],{"type":25,"value":520},"find",{"type":25,"value":522},", you can use ",{"type":20,"tag":28,"props":524,"children":526},{"className":525},[],[527],{"type":25,"value":528},"!find",{"type":25,"value":475},{"type":20,"tag":49,"props":531,"children":533},{"className":51,"code":532,"language":13,"meta":7,"style":7},"$ !find\nfind . -name *.py\n",[534],{"type":20,"tag":28,"props":535,"children":536},{"__ignoreMap":7},[537,549],{"type":20,"tag":58,"props":538,"children":539},{"class":60,"line":61},[540,544],{"type":20,"tag":58,"props":541,"children":542},{"style":65},[543],{"type":25,"value":68},{"type":20,"tag":58,"props":545,"children":546},{"style":71},[547],{"type":25,"value":548}," !find\n",{"type":20,"tag":58,"props":550,"children":551},{"class":60,"line":83},[552,556,560,564,568],{"type":20,"tag":58,"props":553,"children":554},{"style":65},[555],{"type":25,"value":520},{"type":20,"tag":58,"props":557,"children":558},{"style":71},[559],{"type":25,"value":365},{"type":20,"tag":58,"props":561,"children":562},{"style":77},[563],{"type":25,"value":370},{"type":20,"tag":58,"props":565,"children":566},{"style":77},[567],{"type":25,"value":375},{"type":20,"tag":58,"props":569,"children":570},{"style":71},[571],{"type":25,"value":380},{"type":20,"tag":21,"props":573,"children":574},{},[575,577,582,584,589,591,597],{"type":25,"value":576},"Be sure to check out the ",{"type":20,"tag":264,"props":578,"children":579},{},[580],{"type":25,"value":581},"Event Designators",{"type":25,"value":583}," section of the ",{"type":20,"tag":28,"props":585,"children":587},{"className":586},[],[588],{"type":25,"value":13},{"type":25,"value":590}," ",{"type":20,"tag":28,"props":592,"children":594},{"className":593},[],[595],{"type":25,"value":596},"man",{"type":25,"value":598}," pages\nfor more information!",{"type":20,"tag":21,"props":600,"children":601},{},[602],{"type":25,"value":249},{"type":20,"tag":21,"props":604,"children":605},{},[606,608,617,619,624,626,631],{"type":25,"value":607},"As an aside, for even faster command-line history navigation, be sure to check\nout the excellent ",{"type":20,"tag":609,"props":610,"children":614},"a",{"href":611,"rel":612},"https://github.com/junegunn/fzf",[613],"nofollow",[615],{"type":25,"value":616},"fzf",{"type":25,"value":618}," utility by ",{"type":20,"tag":264,"props":620,"children":621},{},[622],{"type":25,"value":623},"junegunn.",{"type":25,"value":625},"\nOne of the many features of ",{"type":20,"tag":28,"props":627,"children":629},{"className":628},[],[630],{"type":25,"value":616},{"type":25,"value":632}," is browsing and re-issuing commands from your\ncommand-line history with a fuzzy-finder!",{"type":20,"tag":634,"props":635,"children":636},"style",{},[637],{"type":25,"value":638},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}",{"title":7,"searchDepth":83,"depth":83,"links":640},[],"markdown","content:articles:quick-tip-rerunning-bash-commands.md","content","articles/quick-tip-rerunning-bash-commands.md","articles/quick-tip-rerunning-bash-commands","md",1735276485229] \ No newline at end of file +[{"data":1,"prerenderedAt":647},["ShallowReactive",2],{"page-data":3},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"date":10,"draft":6,"tags":11,"categories":14,"excerpt":16,"body":36,"_type":641,"_id":642,"_source":643,"_file":644,"_stem":645,"_extension":646},"/articles/quick-tip-rerunning-bash-commands","articles",false,"","Tip: Re-running Bash Commands","Do you ever find yourself having to re-run a Bash command? I often find this\nhappening to myself when I neglect to use sudo for a command that requires\nroot privileges.","2021-09-22",[12,13],"tip","bash",[15],"tips",{"type":17,"children":18},"root",[19],{"type":20,"tag":21,"props":22,"children":23},"element","p",{},[24,27,34],{"type":25,"value":26},"text","Do you ever find yourself having to re-run a Bash command? I often find this\nhappening to myself when I neglect to use ",{"type":20,"tag":28,"props":29,"children":31},"code",{"className":30},[],[32],{"type":25,"value":33},"sudo",{"type":25,"value":35}," for a command that requires\nroot privileges.",{"type":17,"children":37,"toc":639},[38,48,134,161,245,250,279,381,409,463,476,511,530,572,599,603,633],{"type":20,"tag":21,"props":39,"children":40},{},[41,42,47],{"type":25,"value":26},{"type":20,"tag":28,"props":43,"children":45},{"className":44},[],[46],{"type":25,"value":33},{"type":25,"value":35},{"type":20,"tag":49,"props":50,"children":53},"pre",{"className":51,"code":52,"language":13,"meta":7,"style":7},"language-bash shiki shiki-themes github-light","$ pacman -Syu\nerror: you cannot perform this operation unless you are root.\n",[54],{"type":20,"tag":28,"props":55,"children":56},{"__ignoreMap":7},[57,81],{"type":20,"tag":58,"props":59,"children":62},"span",{"class":60,"line":61},"line",1,[63,69,75],{"type":20,"tag":58,"props":64,"children":66},{"style":65},"--shiki-default:#6F42C1",[67],{"type":25,"value":68},"$",{"type":20,"tag":58,"props":70,"children":72},{"style":71},"--shiki-default:#032F62",[73],{"type":25,"value":74}," pacman",{"type":20,"tag":58,"props":76,"children":78},{"style":77},"--shiki-default:#005CC5",[79],{"type":25,"value":80}," -Syu\n",{"type":20,"tag":58,"props":82,"children":84},{"class":60,"line":83},2,[85,90,95,100,105,110,115,120,124,129],{"type":20,"tag":58,"props":86,"children":87},{"style":65},[88],{"type":25,"value":89},"error:",{"type":20,"tag":58,"props":91,"children":92},{"style":71},[93],{"type":25,"value":94}," you",{"type":20,"tag":58,"props":96,"children":97},{"style":71},[98],{"type":25,"value":99}," cannot",{"type":20,"tag":58,"props":101,"children":102},{"style":71},[103],{"type":25,"value":104}," perform",{"type":20,"tag":58,"props":106,"children":107},{"style":71},[108],{"type":25,"value":109}," this",{"type":20,"tag":58,"props":111,"children":112},{"style":71},[113],{"type":25,"value":114}," operation",{"type":20,"tag":58,"props":116,"children":117},{"style":71},[118],{"type":25,"value":119}," unless",{"type":20,"tag":58,"props":121,"children":122},{"style":71},[123],{"type":25,"value":94},{"type":20,"tag":58,"props":125,"children":126},{"style":71},[127],{"type":25,"value":128}," are",{"type":20,"tag":58,"props":130,"children":131},{"style":71},[132],{"type":25,"value":133}," root.\n",{"type":20,"tag":21,"props":135,"children":136},{},[137,139,145,147,152,154,159],{"type":25,"value":138},"Well, I have good news for you -- you can easily re-issue a command with the\n",{"type":20,"tag":28,"props":140,"children":142},{"className":141},[],[143],{"type":25,"value":144},"!!",{"type":25,"value":146}," designator! Simply type ",{"type":20,"tag":28,"props":148,"children":150},{"className":149},[],[151],{"type":25,"value":33},{"type":25,"value":153}," followed by ",{"type":20,"tag":28,"props":155,"children":157},{"className":156},[],[158],{"type":25,"value":144},{"type":25,"value":160}," and you're good to go.",{"type":20,"tag":49,"props":162,"children":164},{"className":51,"code":163,"language":13,"meta":7,"style":7},"$ sudo !!\nsudo pacman -Syu\n[sudo] password for colton:\n:: Synchronizing package databases...\n",[165],{"type":20,"tag":28,"props":166,"children":167},{"__ignoreMap":7},[168,185,200,221],{"type":20,"tag":58,"props":169,"children":170},{"class":60,"line":61},[171,175,180],{"type":20,"tag":58,"props":172,"children":173},{"style":65},[174],{"type":25,"value":68},{"type":20,"tag":58,"props":176,"children":177},{"style":71},[178],{"type":25,"value":179}," sudo",{"type":20,"tag":58,"props":181,"children":182},{"style":71},[183],{"type":25,"value":184}," !!\n",{"type":20,"tag":58,"props":186,"children":187},{"class":60,"line":83},[188,192,196],{"type":20,"tag":58,"props":189,"children":190},{"style":65},[191],{"type":25,"value":33},{"type":20,"tag":58,"props":193,"children":194},{"style":71},[195],{"type":25,"value":74},{"type":20,"tag":58,"props":197,"children":198},{"style":77},[199],{"type":25,"value":80},{"type":20,"tag":58,"props":201,"children":203},{"class":60,"line":202},3,[204,210,216],{"type":20,"tag":58,"props":205,"children":207},{"style":206},"--shiki-default:#24292E",[208],{"type":25,"value":209},"[sudo] password ",{"type":20,"tag":58,"props":211,"children":213},{"style":212},"--shiki-default:#D73A49",[214],{"type":25,"value":215},"for",{"type":20,"tag":58,"props":217,"children":218},{"style":206},[219],{"type":25,"value":220}," colton:\n",{"type":20,"tag":58,"props":222,"children":224},{"class":60,"line":223},4,[225,230,235,240],{"type":20,"tag":58,"props":226,"children":227},{"style":77},[228],{"type":25,"value":229},"::",{"type":20,"tag":58,"props":231,"children":232},{"style":71},[233],{"type":25,"value":234}," Synchronizing",{"type":20,"tag":58,"props":236,"children":237},{"style":71},[238],{"type":25,"value":239}," package",{"type":20,"tag":58,"props":241,"children":242},{"style":71},[243],{"type":25,"value":244}," databases...\n",{"type":20,"tag":21,"props":246,"children":247},{},[248],{"type":25,"value":249},"--",{"type":20,"tag":21,"props":251,"children":252},{},[253,255,261,263,269,271,277],{"type":25,"value":254},"Commands that are prefixed with a bang, ",{"type":20,"tag":28,"props":256,"children":258},{"className":257},[],[259],{"type":25,"value":260},"!",{"type":25,"value":262},", are considered ",{"type":20,"tag":264,"props":265,"children":266},"em",{},[267],{"type":25,"value":268},"Event\nDesignators,",{"type":25,"value":270}," and are references to your command-line history. You can take a\nlook at your history with the ",{"type":20,"tag":28,"props":272,"children":274},{"className":273},[],[275],{"type":25,"value":276},"history",{"type":25,"value":278}," command.",{"type":20,"tag":49,"props":280,"children":282},{"className":51,"code":281,"language":13,"meta":7,"style":7},"$ history\n 1021 touch hello_world.txt\n 1022 ls\n 1023 echo \"Here we go again!\"\n 1024 find . -name *.py\n",[283],{"type":20,"tag":28,"props":284,"children":285},{"__ignoreMap":7},[286,298,316,329,347],{"type":20,"tag":58,"props":287,"children":288},{"class":60,"line":61},[289,293],{"type":20,"tag":58,"props":290,"children":291},{"style":65},[292],{"type":25,"value":68},{"type":20,"tag":58,"props":294,"children":295},{"style":71},[296],{"type":25,"value":297}," history\n",{"type":20,"tag":58,"props":299,"children":300},{"class":60,"line":83},[301,306,311],{"type":20,"tag":58,"props":302,"children":303},{"style":65},[304],{"type":25,"value":305}," 1021",{"type":20,"tag":58,"props":307,"children":308},{"style":71},[309],{"type":25,"value":310}," touch",{"type":20,"tag":58,"props":312,"children":313},{"style":71},[314],{"type":25,"value":315}," hello_world.txt\n",{"type":20,"tag":58,"props":317,"children":318},{"class":60,"line":202},[319,324],{"type":20,"tag":58,"props":320,"children":321},{"style":65},[322],{"type":25,"value":323}," 1022",{"type":20,"tag":58,"props":325,"children":326},{"style":71},[327],{"type":25,"value":328}," ls\n",{"type":20,"tag":58,"props":330,"children":331},{"class":60,"line":223},[332,337,342],{"type":20,"tag":58,"props":333,"children":334},{"style":65},[335],{"type":25,"value":336}," 1023",{"type":20,"tag":58,"props":338,"children":339},{"style":71},[340],{"type":25,"value":341}," echo",{"type":20,"tag":58,"props":343,"children":344},{"style":71},[345],{"type":25,"value":346}," \"Here we go again!\"\n",{"type":20,"tag":58,"props":348,"children":350},{"class":60,"line":349},5,[351,356,361,366,371,376],{"type":20,"tag":58,"props":352,"children":353},{"style":65},[354],{"type":25,"value":355}," 1024",{"type":20,"tag":58,"props":357,"children":358},{"style":71},[359],{"type":25,"value":360}," find",{"type":20,"tag":58,"props":362,"children":363},{"style":71},[364],{"type":25,"value":365}," .",{"type":20,"tag":58,"props":367,"children":368},{"style":77},[369],{"type":25,"value":370}," -name",{"type":20,"tag":58,"props":372,"children":373},{"style":77},[374],{"type":25,"value":375}," *",{"type":20,"tag":58,"props":377,"children":378},{"style":71},[379],{"type":25,"value":380},".py\n",{"type":20,"tag":21,"props":382,"children":383},{},[384,386,391,393,399,401,407],{"type":25,"value":385},"There are many ways to use ",{"type":20,"tag":28,"props":387,"children":389},{"className":388},[],[390],{"type":25,"value":260},{"type":25,"value":392}," in your shell. For example, if you wanted to\nre-issue a specific command in your history, you could use ",{"type":20,"tag":28,"props":394,"children":396},{"className":395},[],[397],{"type":25,"value":398},"!n",{"type":25,"value":400}," where ",{"type":20,"tag":28,"props":402,"children":404},{"className":403},[],[405],{"type":25,"value":406},"n",{"type":25,"value":408}," is\nthe number next to the command in your history.",{"type":20,"tag":49,"props":410,"children":412},{"className":51,"code":411,"language":13,"meta":7,"style":7},"$ !1023\necho \"Here we go again!\"\nHere we go again!\n",[413],{"type":20,"tag":28,"props":414,"children":415},{"__ignoreMap":7},[416,428,440],{"type":20,"tag":58,"props":417,"children":418},{"class":60,"line":61},[419,423],{"type":20,"tag":58,"props":420,"children":421},{"style":65},[422],{"type":25,"value":68},{"type":20,"tag":58,"props":424,"children":425},{"style":71},[426],{"type":25,"value":427}," !1023\n",{"type":20,"tag":58,"props":429,"children":430},{"class":60,"line":83},[431,436],{"type":20,"tag":58,"props":432,"children":433},{"style":77},[434],{"type":25,"value":435},"echo",{"type":20,"tag":58,"props":437,"children":438},{"style":71},[439],{"type":25,"value":346},{"type":20,"tag":58,"props":441,"children":442},{"class":60,"line":202},[443,448,453,458],{"type":20,"tag":58,"props":444,"children":445},{"style":65},[446],{"type":25,"value":447},"Here",{"type":20,"tag":58,"props":449,"children":450},{"style":71},[451],{"type":25,"value":452}," we",{"type":20,"tag":58,"props":454,"children":455},{"style":71},[456],{"type":25,"value":457}," go",{"type":20,"tag":58,"props":459,"children":460},{"style":71},[461],{"type":25,"value":462}," again!\n",{"type":20,"tag":21,"props":464,"children":465},{},[466,468,474],{"type":25,"value":467},"Or... if you wanted to run the command you issued 4-commands ago, you can use\n",{"type":20,"tag":28,"props":469,"children":471},{"className":470},[],[472],{"type":25,"value":473},"!-4",{"type":25,"value":475},".",{"type":20,"tag":49,"props":477,"children":479},{"className":51,"code":478,"language":13,"meta":7,"style":7},"$ !-4\nls\nhello_world.txt\n",[480],{"type":20,"tag":28,"props":481,"children":482},{"__ignoreMap":7},[483,495,503],{"type":20,"tag":58,"props":484,"children":485},{"class":60,"line":61},[486,490],{"type":20,"tag":58,"props":487,"children":488},{"style":65},[489],{"type":25,"value":68},{"type":20,"tag":58,"props":491,"children":492},{"style":71},[493],{"type":25,"value":494}," !-4\n",{"type":20,"tag":58,"props":496,"children":497},{"class":60,"line":83},[498],{"type":20,"tag":58,"props":499,"children":500},{"style":65},[501],{"type":25,"value":502},"ls\n",{"type":20,"tag":58,"props":504,"children":505},{"class":60,"line":202},[506],{"type":20,"tag":58,"props":507,"children":508},{"style":65},[509],{"type":25,"value":510},"hello_world.txt\n",{"type":20,"tag":21,"props":512,"children":513},{},[514,516,521,523,529],{"type":25,"value":515},"Or... if you wanted to run the last command that started with the string\n",{"type":20,"tag":264,"props":517,"children":518},{},[519],{"type":25,"value":520},"find",{"type":25,"value":522},", you can use ",{"type":20,"tag":28,"props":524,"children":526},{"className":525},[],[527],{"type":25,"value":528},"!find",{"type":25,"value":475},{"type":20,"tag":49,"props":531,"children":533},{"className":51,"code":532,"language":13,"meta":7,"style":7},"$ !find\nfind . -name *.py\n",[534],{"type":20,"tag":28,"props":535,"children":536},{"__ignoreMap":7},[537,549],{"type":20,"tag":58,"props":538,"children":539},{"class":60,"line":61},[540,544],{"type":20,"tag":58,"props":541,"children":542},{"style":65},[543],{"type":25,"value":68},{"type":20,"tag":58,"props":545,"children":546},{"style":71},[547],{"type":25,"value":548}," !find\n",{"type":20,"tag":58,"props":550,"children":551},{"class":60,"line":83},[552,556,560,564,568],{"type":20,"tag":58,"props":553,"children":554},{"style":65},[555],{"type":25,"value":520},{"type":20,"tag":58,"props":557,"children":558},{"style":71},[559],{"type":25,"value":365},{"type":20,"tag":58,"props":561,"children":562},{"style":77},[563],{"type":25,"value":370},{"type":20,"tag":58,"props":565,"children":566},{"style":77},[567],{"type":25,"value":375},{"type":20,"tag":58,"props":569,"children":570},{"style":71},[571],{"type":25,"value":380},{"type":20,"tag":21,"props":573,"children":574},{},[575,577,582,584,589,591,597],{"type":25,"value":576},"Be sure to check out the ",{"type":20,"tag":264,"props":578,"children":579},{},[580],{"type":25,"value":581},"Event Designators",{"type":25,"value":583}," section of the ",{"type":20,"tag":28,"props":585,"children":587},{"className":586},[],[588],{"type":25,"value":13},{"type":25,"value":590}," ",{"type":20,"tag":28,"props":592,"children":594},{"className":593},[],[595],{"type":25,"value":596},"man",{"type":25,"value":598}," pages\nfor more information!",{"type":20,"tag":21,"props":600,"children":601},{},[602],{"type":25,"value":249},{"type":20,"tag":21,"props":604,"children":605},{},[606,608,617,619,624,626,631],{"type":25,"value":607},"As an aside, for even faster command-line history navigation, be sure to check\nout the excellent ",{"type":20,"tag":609,"props":610,"children":614},"a",{"href":611,"rel":612},"https://github.com/junegunn/fzf",[613],"nofollow",[615],{"type":25,"value":616},"fzf",{"type":25,"value":618}," utility by ",{"type":20,"tag":264,"props":620,"children":621},{},[622],{"type":25,"value":623},"junegunn.",{"type":25,"value":625},"\nOne of the many features of ",{"type":20,"tag":28,"props":627,"children":629},{"className":628},[],[630],{"type":25,"value":616},{"type":25,"value":632}," is browsing and re-issuing commands from your\ncommand-line history with a fuzzy-finder!",{"type":20,"tag":634,"props":635,"children":636},"style",{},[637],{"type":25,"value":638},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}",{"title":7,"searchDepth":83,"depth":83,"links":640},[],"markdown","content:articles:quick-tip-rerunning-bash-commands.md","content","articles/quick-tip-rerunning-bash-commands.md","articles/quick-tip-rerunning-bash-commands","md",1735327945051] \ No newline at end of file diff --git a/articles/quick-tip-rerunning-bash-commands/index.html b/articles/quick-tip-rerunning-bash-commands/index.html index a39bd059..2d22e9eb 100644 --- a/articles/quick-tip-rerunning-bash-commands/index.html +++ b/articles/quick-tip-rerunning-bash-commands/index.html @@ -1,37 +1,37 @@ Colton Padden - + - - - - - + + + + + - + - - - - - - - - - - - - - + + + + + + + + + + + + + - -
            Category

            Tip: Re-running Bash Commands

            Do you ever find yourself having to re-run a Bash command? I often find this + +

            Category

            Tip: Re-running Bash Commands

            Do you ever find yourself having to re-run a Bash command? I often find this happening to myself when I neglect to use sudo for a command that requires root privileges.

            $ pacman -Syu
             error: you cannot perform this operation unless you are root.
            @@ -63,5 +63,5 @@
             for more information!

            --

            As an aside, for even faster command-line history navigation, be sure to check out the excellent fzf utility by junegunn. One of the many features of fzf is browsing and re-issuing commands from your -command-line history with a fuzzy-finder!

            - \ No newline at end of file +command-line history with a fuzzy-finder!

            + \ No newline at end of file diff --git a/articles/reset-ipmi-password-from-host-os/_payload.json b/articles/reset-ipmi-password-from-host-os/_payload.json index 0070a87b..54c89205 100644 --- a/articles/reset-ipmi-password-from-host-os/_payload.json +++ b/articles/reset-ipmi-password-from-host-os/_payload.json @@ -1 +1 @@ -[{"data":1,"prerenderedAt":203},["ShallowReactive",2],{"page-data":3},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"date":10,"tags":11,"categories":15,"excerpt":16,"body":26,"_type":197,"_id":198,"_source":199,"_file":200,"_stem":201,"_extension":202},"/articles/reset-ipmi-password-from-host-os","articles",false,"","Reset IPMI Credentials from the Host OS","If you ever find yourself locked out of the Intelligent Platform Management Interface (IPMI) of a server, these\ninstructions will guide your through the process of resetting the credentials to their default values from the host\noperating system.","2021-12-27",[12,13,14],"homelab","supermicro","truenas",[12],{"type":17,"children":18},"root",[19],{"type":20,"tag":21,"props":22,"children":23},"element","p",{},[24],{"type":25,"value":9},"text",{"type":17,"children":27,"toc":194},[28,32,54,67,72,81,100,108,113,118,123,131],{"type":20,"tag":21,"props":29,"children":30},{},[31],{"type":25,"value":9},{"type":20,"tag":21,"props":33,"children":34},{},[35,37,44,46,52],{"type":25,"value":36},"If you are using an operating system like TrueNAS -- good news! It's possible to reset the IPMI password directly from\nthe web interface. This is done by navigating to ",{"type":20,"tag":38,"props":39,"children":41},"code",{"className":40},[],[42],{"type":25,"value":43},"Network > IPMI",{"type":25,"value":45},", and simply entering a new value in the ",{"type":20,"tag":47,"props":48,"children":49},"em",{},[50],{"type":25,"value":51},"IPMI\nPassword Reset",{"type":25,"value":53}," field.",{"type":20,"tag":21,"props":55,"children":56},{},[57,59,65],{"type":25,"value":58},"If you are using some other OS that doesn't have this feature, you can achieve similar results by using the ",{"type":20,"tag":38,"props":60,"children":62},{"className":61},[],[63],{"type":25,"value":64},"ipmitool",{"type":25,"value":66},"\ncommand-line utility.",{"type":20,"tag":21,"props":68,"children":69},{},[70],{"type":25,"value":71},"First, you'll want to determine the user ID associated with the user for whom you'd like to reset the password.",{"type":20,"tag":73,"props":74,"children":76},"pre",{"code":75},"# ipmitool user list\nID Name Callin Link Auth IPMI Msg Channel Priv Limit\n1 true false false Unknown (0x00)\n2 ADMIN true false false Unknown (0x00)\n",[77],{"type":20,"tag":38,"props":78,"children":79},{"__ignoreMap":7},[80],{"type":25,"value":75},{"type":20,"tag":21,"props":82,"children":83},{},[84,86,91,93,98],{"type":25,"value":85},"In this case, we will be resetting the password for ",{"type":20,"tag":47,"props":87,"children":88},{},[89],{"type":25,"value":90},"ADMIN",{"type":25,"value":92}," who has a user ID of ",{"type":20,"tag":47,"props":94,"children":95},{},[96],{"type":25,"value":97},"2",{"type":25,"value":99},". Then we'll assign the new\npassword like so:",{"type":20,"tag":73,"props":101,"children":103},{"code":102},"# ipmitool user set password 2 \u003Cpassword>\n",[104],{"type":20,"tag":38,"props":105,"children":106},{"__ignoreMap":7},[107],{"type":25,"value":102},{"type":20,"tag":21,"props":109,"children":110},{},[111],{"type":25,"value":112},"And you should be good to go!",{"type":20,"tag":21,"props":114,"children":115},{},[116],{"type":25,"value":117},"...",{"type":20,"tag":21,"props":119,"children":120},{},[121],{"type":25,"value":122},"Alternatively, if you'd like to factory reset the baseboard management controller (BMC), which will reset the IPMI\ncredentials to their default value, you can issue the following command.",{"type":20,"tag":73,"props":124,"children":126},{"code":125},"# ipmitool raw 0x3c 0x40\n",[127],{"type":20,"tag":38,"props":128,"children":129},{"__ignoreMap":7},[130],{"type":25,"value":125},{"type":20,"tag":21,"props":132,"children":133},{},[134,136,142,144,150,152,158,159,165,167,176,178,183,185,192],{"type":25,"value":135},"Where ",{"type":20,"tag":38,"props":137,"children":139},{"className":138},[],[140],{"type":25,"value":141},"0x3c",{"type":25,"value":143}," is the ",{"type":20,"tag":38,"props":145,"children":147},{"className":146},[],[148],{"type":25,"value":149},"\u003Cnetfn>",{"type":25,"value":151}," argument, a.k.a. the network function code that defines the functional routing for\nmessages, and ",{"type":20,"tag":38,"props":153,"children":155},{"className":154},[],[156],{"type":25,"value":157},"0x40",{"type":25,"value":143},{"type":20,"tag":38,"props":160,"children":162},{"className":161},[],[163],{"type":25,"value":164},"\u003Ccmd>",{"type":25,"value":166},". According to section 5.1 of the ",{"type":20,"tag":168,"props":169,"children":173},"a",{"href":170,"rel":171},"https://www.intel.com/content/dam/www/public/us/en/documents/product-briefs/ipmi-second-gen-interface-spec-v2-rev1-1.pdf",[172],"nofollow",[174],{"type":25,"value":175},"IPMI interface\nspecification",{"type":25,"value":177},",\n",{"type":20,"tag":47,"props":179,"children":180},{},[181],{"type":25,"value":182},"netfn",{"type":25,"value":184}," codes ranging from 0x30 to 0x3F are reserved for vendor specific functions. I searched around for some\nSupermicro references on these vendor specific network functions without much luck other than various ",{"type":20,"tag":168,"props":186,"children":189},{"href":187,"rel":188},"https://www.supermicro.com/support/faqs/faq.cfm?faq=15448",[172],[190],{"type":25,"value":191},"support\nresponses",{"type":25,"value":193}," on how to reset a device. Bummer!",{"title":7,"searchDepth":195,"depth":195,"links":196},2,[],"markdown","content:articles:reset-ipmi-password-from-host-os.md","content","articles/reset-ipmi-password-from-host-os.md","articles/reset-ipmi-password-from-host-os","md",1735276485223] \ No newline at end of file +[{"data":1,"prerenderedAt":203},["ShallowReactive",2],{"page-data":3},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"date":10,"tags":11,"categories":15,"excerpt":16,"body":26,"_type":197,"_id":198,"_source":199,"_file":200,"_stem":201,"_extension":202},"/articles/reset-ipmi-password-from-host-os","articles",false,"","Reset IPMI Credentials from the Host OS","If you ever find yourself locked out of the Intelligent Platform Management Interface (IPMI) of a server, these\ninstructions will guide your through the process of resetting the credentials to their default values from the host\noperating system.","2021-12-27",[12,13,14],"homelab","supermicro","truenas",[12],{"type":17,"children":18},"root",[19],{"type":20,"tag":21,"props":22,"children":23},"element","p",{},[24],{"type":25,"value":9},"text",{"type":17,"children":27,"toc":194},[28,32,54,67,72,81,100,108,113,118,123,131],{"type":20,"tag":21,"props":29,"children":30},{},[31],{"type":25,"value":9},{"type":20,"tag":21,"props":33,"children":34},{},[35,37,44,46,52],{"type":25,"value":36},"If you are using an operating system like TrueNAS -- good news! It's possible to reset the IPMI password directly from\nthe web interface. This is done by navigating to ",{"type":20,"tag":38,"props":39,"children":41},"code",{"className":40},[],[42],{"type":25,"value":43},"Network > IPMI",{"type":25,"value":45},", and simply entering a new value in the ",{"type":20,"tag":47,"props":48,"children":49},"em",{},[50],{"type":25,"value":51},"IPMI\nPassword Reset",{"type":25,"value":53}," field.",{"type":20,"tag":21,"props":55,"children":56},{},[57,59,65],{"type":25,"value":58},"If you are using some other OS that doesn't have this feature, you can achieve similar results by using the ",{"type":20,"tag":38,"props":60,"children":62},{"className":61},[],[63],{"type":25,"value":64},"ipmitool",{"type":25,"value":66},"\ncommand-line utility.",{"type":20,"tag":21,"props":68,"children":69},{},[70],{"type":25,"value":71},"First, you'll want to determine the user ID associated with the user for whom you'd like to reset the password.",{"type":20,"tag":73,"props":74,"children":76},"pre",{"code":75},"# ipmitool user list\nID Name Callin Link Auth IPMI Msg Channel Priv Limit\n1 true false false Unknown (0x00)\n2 ADMIN true false false Unknown (0x00)\n",[77],{"type":20,"tag":38,"props":78,"children":79},{"__ignoreMap":7},[80],{"type":25,"value":75},{"type":20,"tag":21,"props":82,"children":83},{},[84,86,91,93,98],{"type":25,"value":85},"In this case, we will be resetting the password for ",{"type":20,"tag":47,"props":87,"children":88},{},[89],{"type":25,"value":90},"ADMIN",{"type":25,"value":92}," who has a user ID of ",{"type":20,"tag":47,"props":94,"children":95},{},[96],{"type":25,"value":97},"2",{"type":25,"value":99},". Then we'll assign the new\npassword like so:",{"type":20,"tag":73,"props":101,"children":103},{"code":102},"# ipmitool user set password 2 \u003Cpassword>\n",[104],{"type":20,"tag":38,"props":105,"children":106},{"__ignoreMap":7},[107],{"type":25,"value":102},{"type":20,"tag":21,"props":109,"children":110},{},[111],{"type":25,"value":112},"And you should be good to go!",{"type":20,"tag":21,"props":114,"children":115},{},[116],{"type":25,"value":117},"...",{"type":20,"tag":21,"props":119,"children":120},{},[121],{"type":25,"value":122},"Alternatively, if you'd like to factory reset the baseboard management controller (BMC), which will reset the IPMI\ncredentials to their default value, you can issue the following command.",{"type":20,"tag":73,"props":124,"children":126},{"code":125},"# ipmitool raw 0x3c 0x40\n",[127],{"type":20,"tag":38,"props":128,"children":129},{"__ignoreMap":7},[130],{"type":25,"value":125},{"type":20,"tag":21,"props":132,"children":133},{},[134,136,142,144,150,152,158,159,165,167,176,178,183,185,192],{"type":25,"value":135},"Where ",{"type":20,"tag":38,"props":137,"children":139},{"className":138},[],[140],{"type":25,"value":141},"0x3c",{"type":25,"value":143}," is the ",{"type":20,"tag":38,"props":145,"children":147},{"className":146},[],[148],{"type":25,"value":149},"\u003Cnetfn>",{"type":25,"value":151}," argument, a.k.a. the network function code that defines the functional routing for\nmessages, and ",{"type":20,"tag":38,"props":153,"children":155},{"className":154},[],[156],{"type":25,"value":157},"0x40",{"type":25,"value":143},{"type":20,"tag":38,"props":160,"children":162},{"className":161},[],[163],{"type":25,"value":164},"\u003Ccmd>",{"type":25,"value":166},". According to section 5.1 of the ",{"type":20,"tag":168,"props":169,"children":173},"a",{"href":170,"rel":171},"https://www.intel.com/content/dam/www/public/us/en/documents/product-briefs/ipmi-second-gen-interface-spec-v2-rev1-1.pdf",[172],"nofollow",[174],{"type":25,"value":175},"IPMI interface\nspecification",{"type":25,"value":177},",\n",{"type":20,"tag":47,"props":179,"children":180},{},[181],{"type":25,"value":182},"netfn",{"type":25,"value":184}," codes ranging from 0x30 to 0x3F are reserved for vendor specific functions. I searched around for some\nSupermicro references on these vendor specific network functions without much luck other than various ",{"type":20,"tag":168,"props":186,"children":189},{"href":187,"rel":188},"https://www.supermicro.com/support/faqs/faq.cfm?faq=15448",[172],[190],{"type":25,"value":191},"support\nresponses",{"type":25,"value":193}," on how to reset a device. Bummer!",{"title":7,"searchDepth":195,"depth":195,"links":196},2,[],"markdown","content:articles:reset-ipmi-password-from-host-os.md","content","articles/reset-ipmi-password-from-host-os.md","articles/reset-ipmi-password-from-host-os","md",1735327945032] \ No newline at end of file diff --git a/articles/reset-ipmi-password-from-host-os/index.html b/articles/reset-ipmi-password-from-host-os/index.html index fd50e239..b9cdce50 100644 --- a/articles/reset-ipmi-password-from-host-os/index.html +++ b/articles/reset-ipmi-password-from-host-os/index.html @@ -1,37 +1,37 @@ Colton Padden - + - - - - - + + + + + - + - - - - - - - - - - - - - + + + + + + + + + + + + + - -

            Reset IPMI Credentials from the Host OS

            If you ever find yourself locked out of the Intelligent Platform Management Interface (IPMI) of a server, these + +

            Reset IPMI Credentials from the Host OS

            If you ever find yourself locked out of the Intelligent Platform Management Interface (IPMI) of a server, these instructions will guide your through the process of resetting the credentials to their default values from the host operating system.

            If you are using an operating system like TrueNAS -- good news! It's possible to reset the IPMI password directly from the web interface. This is done by navigating to Network > IPMI, and simply entering a new value in the IPMI @@ -49,5 +49,5 @@ specification, netfn codes ranging from 0x30 to 0x3F are reserved for vendor specific functions. I searched around for some Supermicro references on these vendor specific network functions without much luck other than various support -responses on how to reset a device. Bummer!

            - \ No newline at end of file +responses on how to reset a device. Bummer!

            + \ No newline at end of file diff --git a/articles/ssh-ed25519-sk-yubikey/_payload.json b/articles/ssh-ed25519-sk-yubikey/_payload.json index 08f3c2ed..19529f3b 100644 --- a/articles/ssh-ed25519-sk-yubikey/_payload.json +++ b/articles/ssh-ed25519-sk-yubikey/_payload.json @@ -1 +1 @@ -[{"data":1,"prerenderedAt":517},["ShallowReactive",2],{"page-data":3},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"draft":6,"date":10,"tags":11,"categories":14,"excerpt":17,"body":46,"_type":511,"_id":512,"_source":513,"_file":514,"_stem":515,"_extension":516},"/articles/ssh-ed25519-sk-yubikey","articles",false,"","Configuring a YubiKey for use with OpenSSH","YubiKey's are a convenient way to introduce a physical form of two factor authentication into ones workflow. They support a variety of protocols, but in this guide we will walk through how to configure a YubiKey for use with OpenSSH via the \"new\" ed25519-sk key type that supports FIDO compliant hardware keys.","2024-06-09",[12,13],"unix","configurations",[15,16],"tooling","tips",{"type":18,"children":19},"root",[20],{"type":21,"tag":22,"props":23,"children":24},"element","p",{},[25,35,37,44],{"type":21,"tag":26,"props":27,"children":31},"a",{"href":28,"rel":29},"https://www.yubico.com/",[30],"nofollow",[32],{"type":33,"value":34},"text","YubiKey's",{"type":33,"value":36}," are a convenient way to introduce a physical form of two factor authentication into ones workflow. They support a variety of protocols, but in this guide we will walk through how to configure a YubiKey for use with OpenSSH via the \"new\" ",{"type":21,"tag":38,"props":39,"children":41},"code",{"className":40},[],[42],{"type":33,"value":43},"ed25519-sk",{"type":33,"value":45}," key type that supports FIDO compliant hardware keys.",{"type":18,"children":47,"toc":509},[48,63,77,86,100,143,148,192,205,238,243,376,389,484,503],{"type":21,"tag":22,"props":49,"children":50},{},[51,56,57,62],{"type":21,"tag":26,"props":52,"children":54},{"href":28,"rel":53},[30],[55],{"type":33,"value":34},{"type":33,"value":36},{"type":21,"tag":38,"props":58,"children":60},{"className":59},[],[61],{"type":33,"value":43},{"type":33,"value":45},{"type":21,"tag":22,"props":64,"children":65},{},[66,68,75],{"type":33,"value":67},"In ",{"type":21,"tag":26,"props":69,"children":72},{"href":70,"rel":71},"https://www.openssh.com/txt/release-8.2",[30],[73],{"type":33,"value":74},"release 8.2 of OpenSSH",{"type":33,"value":76}," support for FIDO devices was added with public key types \"ecdsa-sk\" and \"ed25519-sk\" (-sk standing for \"security key\"). This key type is supported by YubiKey's with firmware version 5.2.3 or higher.",{"type":21,"tag":78,"props":79,"children":80},"blockquote",{},[81],{"type":21,"tag":22,"props":82,"children":83},{},[84],{"type":33,"value":85},"This release adds support for FIDO/U2F hardware authenticators to OpenSSH. U2F/FIDO are open standards for inexpensive two-factor authentication hardware that are widely used for website authentication. In OpenSSH FIDO devices are supported by new public key types \"ecdsa-sk\" and \"ed25519-sk\", along with corresponding certificate types.",{"type":21,"tag":22,"props":87,"children":88},{},[89,91,98],{"type":33,"value":90},"Let's get started by installing the latest version of OpenSSH via ",{"type":21,"tag":26,"props":92,"children":95},{"href":93,"rel":94},"https://brew.sh/",[30],[96],{"type":33,"value":97},"Homebrew",{"type":33,"value":99},", along with the YubiKey Manager (ykman) CLI. The version of OpenSSH included with macOS is not compatible.",{"type":21,"tag":101,"props":102,"children":106},"pre",{"className":103,"code":104,"language":105,"meta":7,"style":7},"language-sh shiki shiki-themes github-light","$ brew install openssh ykman\n","sh",[107],{"type":21,"tag":38,"props":108,"children":109},{"__ignoreMap":7},[110],{"type":21,"tag":111,"props":112,"children":115},"span",{"class":113,"line":114},"line",1,[116,122,128,133,138],{"type":21,"tag":111,"props":117,"children":119},{"style":118},"--shiki-default:#6F42C1",[120],{"type":33,"value":121},"$",{"type":21,"tag":111,"props":123,"children":125},{"style":124},"--shiki-default:#032F62",[126],{"type":33,"value":127}," brew",{"type":21,"tag":111,"props":129,"children":130},{"style":124},[131],{"type":33,"value":132}," install",{"type":21,"tag":111,"props":134,"children":135},{"style":124},[136],{"type":33,"value":137}," openssh",{"type":21,"tag":111,"props":139,"children":140},{"style":124},[141],{"type":33,"value":142}," ykman\n",{"type":21,"tag":22,"props":144,"children":145},{},[146],{"type":33,"value":147},"Then, let's confirm that our YubiKey has a firmware that is greater than 5.2.3:",{"type":21,"tag":101,"props":149,"children":151},{"className":103,"code":150,"language":105,"meta":7,"style":7},"$ ykman list\nYubiKey 5Ci (5.4.3) [OTP+FIDO+CCID]\n",[152],{"type":21,"tag":38,"props":153,"children":154},{"__ignoreMap":7},[155,172],{"type":21,"tag":111,"props":156,"children":157},{"class":113,"line":114},[158,162,167],{"type":21,"tag":111,"props":159,"children":160},{"style":118},[161],{"type":33,"value":121},{"type":21,"tag":111,"props":163,"children":164},{"style":124},[165],{"type":33,"value":166}," ykman",{"type":21,"tag":111,"props":168,"children":169},{"style":124},[170],{"type":33,"value":171}," list\n",{"type":21,"tag":111,"props":173,"children":175},{"class":113,"line":174},2,[176,181,186],{"type":21,"tag":111,"props":177,"children":178},{"style":118},[179],{"type":33,"value":180},"YubiKey",{"type":21,"tag":111,"props":182,"children":183},{"style":124},[184],{"type":33,"value":185}," 5Ci",{"type":21,"tag":111,"props":187,"children":189},{"style":188},"--shiki-default:#24292E",[190],{"type":33,"value":191}," (5.4.3) [OTP+FIDO+CCID]\n",{"type":21,"tag":22,"props":193,"children":194},{},[195,197,203],{"type":33,"value":196},"Next, we'll go ahead and enable a pin on our device via the ",{"type":21,"tag":38,"props":198,"children":200},{"className":199},[],[201],{"type":33,"value":202},"change-pin",{"type":33,"value":204}," command, as this a requirement for our use.",{"type":21,"tag":101,"props":206,"children":208},{"className":103,"code":207,"language":105,"meta":7,"style":7},"$ ykman fido access change-pin\n",[209],{"type":21,"tag":38,"props":210,"children":211},{"__ignoreMap":7},[212],{"type":21,"tag":111,"props":213,"children":214},{"class":113,"line":114},[215,219,223,228,233],{"type":21,"tag":111,"props":216,"children":217},{"style":118},[218],{"type":33,"value":121},{"type":21,"tag":111,"props":220,"children":221},{"style":124},[222],{"type":33,"value":166},{"type":21,"tag":111,"props":224,"children":225},{"style":124},[226],{"type":33,"value":227}," fido",{"type":21,"tag":111,"props":229,"children":230},{"style":124},[231],{"type":33,"value":232}," access",{"type":21,"tag":111,"props":234,"children":235},{"style":124},[236],{"type":33,"value":237}," change-pin\n",{"type":21,"tag":22,"props":239,"children":240},{},[241],{"type":33,"value":242},"And last, we'll generate the key on our device!",{"type":21,"tag":101,"props":244,"children":246},{"className":103,"code":245,"language":105,"meta":7,"style":7},"$ ssh-keygen -t ed25519-sk -O resident\nGenerating public/private ed25519-sk key pair.\nYou may need to touch your authenticator to authorize key generation.\n...\n",[247],{"type":21,"tag":38,"props":248,"children":249},{"__ignoreMap":7},[250,283,310,367],{"type":21,"tag":111,"props":251,"children":252},{"class":113,"line":114},[253,257,262,268,273,278],{"type":21,"tag":111,"props":254,"children":255},{"style":118},[256],{"type":33,"value":121},{"type":21,"tag":111,"props":258,"children":259},{"style":124},[260],{"type":33,"value":261}," ssh-keygen",{"type":21,"tag":111,"props":263,"children":265},{"style":264},"--shiki-default:#005CC5",[266],{"type":33,"value":267}," -t",{"type":21,"tag":111,"props":269,"children":270},{"style":124},[271],{"type":33,"value":272}," ed25519-sk",{"type":21,"tag":111,"props":274,"children":275},{"style":264},[276],{"type":33,"value":277}," -O",{"type":21,"tag":111,"props":279,"children":280},{"style":124},[281],{"type":33,"value":282}," resident\n",{"type":21,"tag":111,"props":284,"children":285},{"class":113,"line":174},[286,291,296,300,305],{"type":21,"tag":111,"props":287,"children":288},{"style":118},[289],{"type":33,"value":290},"Generating",{"type":21,"tag":111,"props":292,"children":293},{"style":124},[294],{"type":33,"value":295}," public/private",{"type":21,"tag":111,"props":297,"children":298},{"style":124},[299],{"type":33,"value":272},{"type":21,"tag":111,"props":301,"children":302},{"style":124},[303],{"type":33,"value":304}," key",{"type":21,"tag":111,"props":306,"children":307},{"style":124},[308],{"type":33,"value":309}," pair.\n",{"type":21,"tag":111,"props":311,"children":313},{"class":113,"line":312},3,[314,319,324,329,334,339,344,349,353,358,362],{"type":21,"tag":111,"props":315,"children":316},{"style":118},[317],{"type":33,"value":318},"You",{"type":21,"tag":111,"props":320,"children":321},{"style":124},[322],{"type":33,"value":323}," may",{"type":21,"tag":111,"props":325,"children":326},{"style":124},[327],{"type":33,"value":328}," need",{"type":21,"tag":111,"props":330,"children":331},{"style":124},[332],{"type":33,"value":333}," to",{"type":21,"tag":111,"props":335,"children":336},{"style":124},[337],{"type":33,"value":338}," touch",{"type":21,"tag":111,"props":340,"children":341},{"style":124},[342],{"type":33,"value":343}," your",{"type":21,"tag":111,"props":345,"children":346},{"style":124},[347],{"type":33,"value":348}," authenticator",{"type":21,"tag":111,"props":350,"children":351},{"style":124},[352],{"type":33,"value":333},{"type":21,"tag":111,"props":354,"children":355},{"style":124},[356],{"type":33,"value":357}," authorize",{"type":21,"tag":111,"props":359,"children":360},{"style":124},[361],{"type":33,"value":304},{"type":21,"tag":111,"props":363,"children":364},{"style":124},[365],{"type":33,"value":366}," generation.\n",{"type":21,"tag":111,"props":368,"children":370},{"class":113,"line":369},4,[371],{"type":21,"tag":111,"props":372,"children":373},{"style":264},[374],{"type":33,"value":375},"...\n",{"type":21,"tag":22,"props":377,"children":378},{},[379,381,387],{"type":33,"value":380},"We specify ",{"type":21,"tag":382,"props":383,"children":384},"em",{},[385],{"type":33,"value":386},"resident",{"type":33,"value":388}," to indicate that the key handle is to be stored on the YubiKey itself, since we will be using this device with multiple computers.",{"type":21,"tag":101,"props":390,"children":394},{"className":391,"code":392,"language":393,"meta":7,"style":7},"language-txt shiki shiki-themes github-light","resident\n Indicate that the key handle should be stored on the FIDO\n authenticator itself. This makes it easier to use the\n authenticator on multiple computers. Resident keys may be\n supported on FIDO2 authenticators and typically require that a PIN\n be set on the authenticator prior to generation. Resident keys\n may be loaded off the authenticator using ssh-add(1). Storing\n both parts of a key on a FIDO authenticator increases the\n likelihood of an attacker being able to use a stolen authenticator\n device.\n","txt",[395],{"type":21,"tag":38,"props":396,"children":397},{"__ignoreMap":7},[398,406,414,422,430,439,448,457,466,475],{"type":21,"tag":111,"props":399,"children":400},{"class":113,"line":114},[401],{"type":21,"tag":111,"props":402,"children":403},{},[404],{"type":33,"value":405},"resident\n",{"type":21,"tag":111,"props":407,"children":408},{"class":113,"line":174},[409],{"type":21,"tag":111,"props":410,"children":411},{},[412],{"type":33,"value":413}," Indicate that the key handle should be stored on the FIDO\n",{"type":21,"tag":111,"props":415,"children":416},{"class":113,"line":312},[417],{"type":21,"tag":111,"props":418,"children":419},{},[420],{"type":33,"value":421}," authenticator itself. This makes it easier to use the\n",{"type":21,"tag":111,"props":423,"children":424},{"class":113,"line":369},[425],{"type":21,"tag":111,"props":426,"children":427},{},[428],{"type":33,"value":429}," authenticator on multiple computers. Resident keys may be\n",{"type":21,"tag":111,"props":431,"children":433},{"class":113,"line":432},5,[434],{"type":21,"tag":111,"props":435,"children":436},{},[437],{"type":33,"value":438}," supported on FIDO2 authenticators and typically require that a PIN\n",{"type":21,"tag":111,"props":440,"children":442},{"class":113,"line":441},6,[443],{"type":21,"tag":111,"props":444,"children":445},{},[446],{"type":33,"value":447}," be set on the authenticator prior to generation. Resident keys\n",{"type":21,"tag":111,"props":449,"children":451},{"class":113,"line":450},7,[452],{"type":21,"tag":111,"props":453,"children":454},{},[455],{"type":33,"value":456}," may be loaded off the authenticator using ssh-add(1). Storing\n",{"type":21,"tag":111,"props":458,"children":460},{"class":113,"line":459},8,[461],{"type":21,"tag":111,"props":462,"children":463},{},[464],{"type":33,"value":465}," both parts of a key on a FIDO authenticator increases the\n",{"type":21,"tag":111,"props":467,"children":469},{"class":113,"line":468},9,[470],{"type":21,"tag":111,"props":471,"children":472},{},[473],{"type":33,"value":474}," likelihood of an attacker being able to use a stolen authenticator\n",{"type":21,"tag":111,"props":476,"children":478},{"class":113,"line":477},10,[479],{"type":21,"tag":111,"props":480,"children":481},{},[482],{"type":33,"value":483}," device.\n",{"type":21,"tag":22,"props":485,"children":486},{},[487,489,494,496,501],{"type":33,"value":488},"And that's all it takes -- simple enough. Now, when interacting with ",{"type":21,"tag":382,"props":490,"children":491},{},[492],{"type":33,"value":493},"ssh",{"type":33,"value":495}," or ",{"type":21,"tag":382,"props":497,"children":498},{},[499],{"type":33,"value":500},"git",{"type":33,"value":502}," you will be prompted to touch the YubiKey to bring that little bit of physical 2FA.",{"type":21,"tag":504,"props":505,"children":506},"style",{},[507],{"type":33,"value":508},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}",{"title":7,"searchDepth":174,"depth":174,"links":510},[],"markdown","content:articles:ssh-ed25519-sk-yubikey.md","content","articles/ssh-ed25519-sk-yubikey.md","articles/ssh-ed25519-sk-yubikey","md",1735276484938] \ No newline at end of file +[{"data":1,"prerenderedAt":517},["ShallowReactive",2],{"page-data":3},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"draft":6,"date":10,"tags":11,"categories":14,"excerpt":17,"body":46,"_type":511,"_id":512,"_source":513,"_file":514,"_stem":515,"_extension":516},"/articles/ssh-ed25519-sk-yubikey","articles",false,"","Configuring a YubiKey for use with OpenSSH","YubiKey's are a convenient way to introduce a physical form of two factor authentication into ones workflow. They support a variety of protocols, but in this guide we will walk through how to configure a YubiKey for use with OpenSSH via the \"new\" ed25519-sk key type that supports FIDO compliant hardware keys.","2024-06-09",[12,13],"unix","configurations",[15,16],"tooling","tips",{"type":18,"children":19},"root",[20],{"type":21,"tag":22,"props":23,"children":24},"element","p",{},[25,35,37,44],{"type":21,"tag":26,"props":27,"children":31},"a",{"href":28,"rel":29},"https://www.yubico.com/",[30],"nofollow",[32],{"type":33,"value":34},"text","YubiKey's",{"type":33,"value":36}," are a convenient way to introduce a physical form of two factor authentication into ones workflow. They support a variety of protocols, but in this guide we will walk through how to configure a YubiKey for use with OpenSSH via the \"new\" ",{"type":21,"tag":38,"props":39,"children":41},"code",{"className":40},[],[42],{"type":33,"value":43},"ed25519-sk",{"type":33,"value":45}," key type that supports FIDO compliant hardware keys.",{"type":18,"children":47,"toc":509},[48,63,77,86,100,143,148,192,205,238,243,376,389,484,503],{"type":21,"tag":22,"props":49,"children":50},{},[51,56,57,62],{"type":21,"tag":26,"props":52,"children":54},{"href":28,"rel":53},[30],[55],{"type":33,"value":34},{"type":33,"value":36},{"type":21,"tag":38,"props":58,"children":60},{"className":59},[],[61],{"type":33,"value":43},{"type":33,"value":45},{"type":21,"tag":22,"props":64,"children":65},{},[66,68,75],{"type":33,"value":67},"In ",{"type":21,"tag":26,"props":69,"children":72},{"href":70,"rel":71},"https://www.openssh.com/txt/release-8.2",[30],[73],{"type":33,"value":74},"release 8.2 of OpenSSH",{"type":33,"value":76}," support for FIDO devices was added with public key types \"ecdsa-sk\" and \"ed25519-sk\" (-sk standing for \"security key\"). This key type is supported by YubiKey's with firmware version 5.2.3 or higher.",{"type":21,"tag":78,"props":79,"children":80},"blockquote",{},[81],{"type":21,"tag":22,"props":82,"children":83},{},[84],{"type":33,"value":85},"This release adds support for FIDO/U2F hardware authenticators to OpenSSH. U2F/FIDO are open standards for inexpensive two-factor authentication hardware that are widely used for website authentication. In OpenSSH FIDO devices are supported by new public key types \"ecdsa-sk\" and \"ed25519-sk\", along with corresponding certificate types.",{"type":21,"tag":22,"props":87,"children":88},{},[89,91,98],{"type":33,"value":90},"Let's get started by installing the latest version of OpenSSH via ",{"type":21,"tag":26,"props":92,"children":95},{"href":93,"rel":94},"https://brew.sh/",[30],[96],{"type":33,"value":97},"Homebrew",{"type":33,"value":99},", along with the YubiKey Manager (ykman) CLI. The version of OpenSSH included with macOS is not compatible.",{"type":21,"tag":101,"props":102,"children":106},"pre",{"className":103,"code":104,"language":105,"meta":7,"style":7},"language-sh shiki shiki-themes github-light","$ brew install openssh ykman\n","sh",[107],{"type":21,"tag":38,"props":108,"children":109},{"__ignoreMap":7},[110],{"type":21,"tag":111,"props":112,"children":115},"span",{"class":113,"line":114},"line",1,[116,122,128,133,138],{"type":21,"tag":111,"props":117,"children":119},{"style":118},"--shiki-default:#6F42C1",[120],{"type":33,"value":121},"$",{"type":21,"tag":111,"props":123,"children":125},{"style":124},"--shiki-default:#032F62",[126],{"type":33,"value":127}," brew",{"type":21,"tag":111,"props":129,"children":130},{"style":124},[131],{"type":33,"value":132}," install",{"type":21,"tag":111,"props":134,"children":135},{"style":124},[136],{"type":33,"value":137}," openssh",{"type":21,"tag":111,"props":139,"children":140},{"style":124},[141],{"type":33,"value":142}," ykman\n",{"type":21,"tag":22,"props":144,"children":145},{},[146],{"type":33,"value":147},"Then, let's confirm that our YubiKey has a firmware that is greater than 5.2.3:",{"type":21,"tag":101,"props":149,"children":151},{"className":103,"code":150,"language":105,"meta":7,"style":7},"$ ykman list\nYubiKey 5Ci (5.4.3) [OTP+FIDO+CCID]\n",[152],{"type":21,"tag":38,"props":153,"children":154},{"__ignoreMap":7},[155,172],{"type":21,"tag":111,"props":156,"children":157},{"class":113,"line":114},[158,162,167],{"type":21,"tag":111,"props":159,"children":160},{"style":118},[161],{"type":33,"value":121},{"type":21,"tag":111,"props":163,"children":164},{"style":124},[165],{"type":33,"value":166}," ykman",{"type":21,"tag":111,"props":168,"children":169},{"style":124},[170],{"type":33,"value":171}," list\n",{"type":21,"tag":111,"props":173,"children":175},{"class":113,"line":174},2,[176,181,186],{"type":21,"tag":111,"props":177,"children":178},{"style":118},[179],{"type":33,"value":180},"YubiKey",{"type":21,"tag":111,"props":182,"children":183},{"style":124},[184],{"type":33,"value":185}," 5Ci",{"type":21,"tag":111,"props":187,"children":189},{"style":188},"--shiki-default:#24292E",[190],{"type":33,"value":191}," (5.4.3) [OTP+FIDO+CCID]\n",{"type":21,"tag":22,"props":193,"children":194},{},[195,197,203],{"type":33,"value":196},"Next, we'll go ahead and enable a pin on our device via the ",{"type":21,"tag":38,"props":198,"children":200},{"className":199},[],[201],{"type":33,"value":202},"change-pin",{"type":33,"value":204}," command, as this a requirement for our use.",{"type":21,"tag":101,"props":206,"children":208},{"className":103,"code":207,"language":105,"meta":7,"style":7},"$ ykman fido access change-pin\n",[209],{"type":21,"tag":38,"props":210,"children":211},{"__ignoreMap":7},[212],{"type":21,"tag":111,"props":213,"children":214},{"class":113,"line":114},[215,219,223,228,233],{"type":21,"tag":111,"props":216,"children":217},{"style":118},[218],{"type":33,"value":121},{"type":21,"tag":111,"props":220,"children":221},{"style":124},[222],{"type":33,"value":166},{"type":21,"tag":111,"props":224,"children":225},{"style":124},[226],{"type":33,"value":227}," fido",{"type":21,"tag":111,"props":229,"children":230},{"style":124},[231],{"type":33,"value":232}," access",{"type":21,"tag":111,"props":234,"children":235},{"style":124},[236],{"type":33,"value":237}," change-pin\n",{"type":21,"tag":22,"props":239,"children":240},{},[241],{"type":33,"value":242},"And last, we'll generate the key on our device!",{"type":21,"tag":101,"props":244,"children":246},{"className":103,"code":245,"language":105,"meta":7,"style":7},"$ ssh-keygen -t ed25519-sk -O resident\nGenerating public/private ed25519-sk key pair.\nYou may need to touch your authenticator to authorize key generation.\n...\n",[247],{"type":21,"tag":38,"props":248,"children":249},{"__ignoreMap":7},[250,283,310,367],{"type":21,"tag":111,"props":251,"children":252},{"class":113,"line":114},[253,257,262,268,273,278],{"type":21,"tag":111,"props":254,"children":255},{"style":118},[256],{"type":33,"value":121},{"type":21,"tag":111,"props":258,"children":259},{"style":124},[260],{"type":33,"value":261}," ssh-keygen",{"type":21,"tag":111,"props":263,"children":265},{"style":264},"--shiki-default:#005CC5",[266],{"type":33,"value":267}," -t",{"type":21,"tag":111,"props":269,"children":270},{"style":124},[271],{"type":33,"value":272}," ed25519-sk",{"type":21,"tag":111,"props":274,"children":275},{"style":264},[276],{"type":33,"value":277}," -O",{"type":21,"tag":111,"props":279,"children":280},{"style":124},[281],{"type":33,"value":282}," resident\n",{"type":21,"tag":111,"props":284,"children":285},{"class":113,"line":174},[286,291,296,300,305],{"type":21,"tag":111,"props":287,"children":288},{"style":118},[289],{"type":33,"value":290},"Generating",{"type":21,"tag":111,"props":292,"children":293},{"style":124},[294],{"type":33,"value":295}," public/private",{"type":21,"tag":111,"props":297,"children":298},{"style":124},[299],{"type":33,"value":272},{"type":21,"tag":111,"props":301,"children":302},{"style":124},[303],{"type":33,"value":304}," key",{"type":21,"tag":111,"props":306,"children":307},{"style":124},[308],{"type":33,"value":309}," pair.\n",{"type":21,"tag":111,"props":311,"children":313},{"class":113,"line":312},3,[314,319,324,329,334,339,344,349,353,358,362],{"type":21,"tag":111,"props":315,"children":316},{"style":118},[317],{"type":33,"value":318},"You",{"type":21,"tag":111,"props":320,"children":321},{"style":124},[322],{"type":33,"value":323}," may",{"type":21,"tag":111,"props":325,"children":326},{"style":124},[327],{"type":33,"value":328}," need",{"type":21,"tag":111,"props":330,"children":331},{"style":124},[332],{"type":33,"value":333}," to",{"type":21,"tag":111,"props":335,"children":336},{"style":124},[337],{"type":33,"value":338}," touch",{"type":21,"tag":111,"props":340,"children":341},{"style":124},[342],{"type":33,"value":343}," your",{"type":21,"tag":111,"props":345,"children":346},{"style":124},[347],{"type":33,"value":348}," authenticator",{"type":21,"tag":111,"props":350,"children":351},{"style":124},[352],{"type":33,"value":333},{"type":21,"tag":111,"props":354,"children":355},{"style":124},[356],{"type":33,"value":357}," authorize",{"type":21,"tag":111,"props":359,"children":360},{"style":124},[361],{"type":33,"value":304},{"type":21,"tag":111,"props":363,"children":364},{"style":124},[365],{"type":33,"value":366}," generation.\n",{"type":21,"tag":111,"props":368,"children":370},{"class":113,"line":369},4,[371],{"type":21,"tag":111,"props":372,"children":373},{"style":264},[374],{"type":33,"value":375},"...\n",{"type":21,"tag":22,"props":377,"children":378},{},[379,381,387],{"type":33,"value":380},"We specify ",{"type":21,"tag":382,"props":383,"children":384},"em",{},[385],{"type":33,"value":386},"resident",{"type":33,"value":388}," to indicate that the key handle is to be stored on the YubiKey itself, since we will be using this device with multiple computers.",{"type":21,"tag":101,"props":390,"children":394},{"className":391,"code":392,"language":393,"meta":7,"style":7},"language-txt shiki shiki-themes github-light","resident\n Indicate that the key handle should be stored on the FIDO\n authenticator itself. This makes it easier to use the\n authenticator on multiple computers. Resident keys may be\n supported on FIDO2 authenticators and typically require that a PIN\n be set on the authenticator prior to generation. Resident keys\n may be loaded off the authenticator using ssh-add(1). Storing\n both parts of a key on a FIDO authenticator increases the\n likelihood of an attacker being able to use a stolen authenticator\n device.\n","txt",[395],{"type":21,"tag":38,"props":396,"children":397},{"__ignoreMap":7},[398,406,414,422,430,439,448,457,466,475],{"type":21,"tag":111,"props":399,"children":400},{"class":113,"line":114},[401],{"type":21,"tag":111,"props":402,"children":403},{},[404],{"type":33,"value":405},"resident\n",{"type":21,"tag":111,"props":407,"children":408},{"class":113,"line":174},[409],{"type":21,"tag":111,"props":410,"children":411},{},[412],{"type":33,"value":413}," Indicate that the key handle should be stored on the FIDO\n",{"type":21,"tag":111,"props":415,"children":416},{"class":113,"line":312},[417],{"type":21,"tag":111,"props":418,"children":419},{},[420],{"type":33,"value":421}," authenticator itself. This makes it easier to use the\n",{"type":21,"tag":111,"props":423,"children":424},{"class":113,"line":369},[425],{"type":21,"tag":111,"props":426,"children":427},{},[428],{"type":33,"value":429}," authenticator on multiple computers. Resident keys may be\n",{"type":21,"tag":111,"props":431,"children":433},{"class":113,"line":432},5,[434],{"type":21,"tag":111,"props":435,"children":436},{},[437],{"type":33,"value":438}," supported on FIDO2 authenticators and typically require that a PIN\n",{"type":21,"tag":111,"props":440,"children":442},{"class":113,"line":441},6,[443],{"type":21,"tag":111,"props":444,"children":445},{},[446],{"type":33,"value":447}," be set on the authenticator prior to generation. Resident keys\n",{"type":21,"tag":111,"props":449,"children":451},{"class":113,"line":450},7,[452],{"type":21,"tag":111,"props":453,"children":454},{},[455],{"type":33,"value":456}," may be loaded off the authenticator using ssh-add(1). Storing\n",{"type":21,"tag":111,"props":458,"children":460},{"class":113,"line":459},8,[461],{"type":21,"tag":111,"props":462,"children":463},{},[464],{"type":33,"value":465}," both parts of a key on a FIDO authenticator increases the\n",{"type":21,"tag":111,"props":467,"children":469},{"class":113,"line":468},9,[470],{"type":21,"tag":111,"props":471,"children":472},{},[473],{"type":33,"value":474}," likelihood of an attacker being able to use a stolen authenticator\n",{"type":21,"tag":111,"props":476,"children":478},{"class":113,"line":477},10,[479],{"type":21,"tag":111,"props":480,"children":481},{},[482],{"type":33,"value":483}," device.\n",{"type":21,"tag":22,"props":485,"children":486},{},[487,489,494,496,501],{"type":33,"value":488},"And that's all it takes -- simple enough. Now, when interacting with ",{"type":21,"tag":382,"props":490,"children":491},{},[492],{"type":33,"value":493},"ssh",{"type":33,"value":495}," or ",{"type":21,"tag":382,"props":497,"children":498},{},[499],{"type":33,"value":500},"git",{"type":33,"value":502}," you will be prompted to touch the YubiKey to bring that little bit of physical 2FA.",{"type":21,"tag":504,"props":505,"children":506},"style",{},[507],{"type":33,"value":508},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}",{"title":7,"searchDepth":174,"depth":174,"links":510},[],"markdown","content:articles:ssh-ed25519-sk-yubikey.md","content","articles/ssh-ed25519-sk-yubikey.md","articles/ssh-ed25519-sk-yubikey","md",1735327944759] \ No newline at end of file diff --git a/articles/ssh-ed25519-sk-yubikey/index.html b/articles/ssh-ed25519-sk-yubikey/index.html index e3b90580..7b6ae49b 100644 --- a/articles/ssh-ed25519-sk-yubikey/index.html +++ b/articles/ssh-ed25519-sk-yubikey/index.html @@ -1,38 +1,38 @@ Colton Padden - + - - - - - + + + + + - + - - - - - - - - - - - - - - + + + + + + + + + + + + + + - -

            Configuring a YubiKey for use with OpenSSH

            YubiKey's are a convenient way to introduce a physical form of two factor authentication into ones workflow. They support a variety of protocols, but in this guide we will walk through how to configure a YubiKey for use with OpenSSH via the "new" ed25519-sk key type that supports FIDO compliant hardware keys.

            In release 8.2 of OpenSSH support for FIDO devices was added with public key types "ecdsa-sk" and "ed25519-sk" (-sk standing for "security key"). This key type is supported by YubiKey's with firmware version 5.2.3 or higher.

            This release adds support for FIDO/U2F hardware authenticators to OpenSSH. U2F/FIDO are open standards for inexpensive two-factor authentication hardware that are widely used for website authentication. In OpenSSH FIDO devices are supported by new public key types "ecdsa-sk" and "ed25519-sk", along with corresponding certificate types.

            Let's get started by installing the latest version of OpenSSH via Homebrew, along with the YubiKey Manager (ykman) CLI. The version of OpenSSH included with macOS is not compatible.

            $ brew install openssh ykman
            +
            +

            Configuring a YubiKey for use with OpenSSH

            YubiKey's are a convenient way to introduce a physical form of two factor authentication into ones workflow. They support a variety of protocols, but in this guide we will walk through how to configure a YubiKey for use with OpenSSH via the "new" ed25519-sk key type that supports FIDO compliant hardware keys.

            In release 8.2 of OpenSSH support for FIDO devices was added with public key types "ecdsa-sk" and "ed25519-sk" (-sk standing for "security key"). This key type is supported by YubiKey's with firmware version 5.2.3 or higher.

            This release adds support for FIDO/U2F hardware authenticators to OpenSSH. U2F/FIDO are open standards for inexpensive two-factor authentication hardware that are widely used for website authentication. In OpenSSH FIDO devices are supported by new public key types "ecdsa-sk" and "ed25519-sk", along with corresponding certificate types.

            Let's get started by installing the latest version of OpenSSH via Homebrew, along with the YubiKey Manager (ykman) CLI. The version of OpenSSH included with macOS is not compatible.

            $ brew install openssh ykman
             

            Then, let's confirm that our YubiKey has a firmware that is greater than 5.2.3:

            $ ykman list
             YubiKey 5Ci (5.4.3) [OTP+FIDO+CCID]
             

            Next, we'll go ahead and enable a pin on our device via the change-pin command, as this a requirement for our use.

            $ ykman fido access change-pin
            @@ -50,5 +50,5 @@
                     both parts of a key on a FIDO authenticator increases the
                     likelihood of an attacker being able to use a stolen authenticator
                     device.
            -

            And that's all it takes -- simple enough. Now, when interacting with ssh or git you will be prompted to touch the YubiKey to bring that little bit of physical 2FA.

            - \ No newline at end of file +

            And that's all it takes -- simple enough. Now, when interacting with ssh or git you will be prompted to touch the YubiKey to bring that little bit of physical 2FA.

            + \ No newline at end of file diff --git a/articles/unit-testing-micropython-with-mocks/_payload.json b/articles/unit-testing-micropython-with-mocks/_payload.json index a39dc1f4..82ad6827 100644 --- a/articles/unit-testing-micropython-with-mocks/_payload.json +++ b/articles/unit-testing-micropython-with-mocks/_payload.json @@ -1 +1 @@ -[{"data":1,"prerenderedAt":690},["ShallowReactive",2],{"page-data":3},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"date":10,"draft":6,"tags":11,"categories":16,"excerpt":19,"body":29,"_type":684,"_id":685,"_source":686,"_file":687,"_stem":688,"_extension":689},"/articles/unit-testing-micropython-with-mocks","articles",false,"","Unit Testing in MicroPython with Mocks","Unit testing code for embedded systems can be challenging. While it's possible\nto leverage emulators, write side-effect free code, or run tests on the\nhardware itself, it's often easiest to unit test the code on your personal\ncomputer with mocked hardware functionality.","2020-02-07",[12,13,14,15],"micropython","testing","mocks","tutorial",[17,18],"python","embedded",{"type":20,"children":21},"root",[22],{"type":23,"tag":24,"props":25,"children":26},"element","p",{},[27],{"type":28,"value":9},"text",{"type":20,"children":30,"toc":681},[31,35,42,47,53,75,252,278,398,419,618,646,653,675],{"type":23,"tag":24,"props":32,"children":33},{},[34],{"type":28,"value":9},{"type":23,"tag":36,"props":37,"children":39},"h1",{"id":38},"mocking",[40],{"type":28,"value":41},"Mocking",{"type":23,"tag":24,"props":43,"children":44},{},[45],{"type":28,"value":46},"Mocks allow us to replace the hardware interfacing functionality under-the-hood\nwith predefined results and side-effects. For example, if there is a piece of\nlogic that retrieves values from an accelerometer to get a device's\norientation, it would be possible to mock the returned values of the\naccelerometer -- allowing us to run the unit tests on a device that does not\nhave an accelerometer sensor installed.",{"type":23,"tag":36,"props":48,"children":50},{"id":49},"a-micropython-mocking-example",[51],{"type":28,"value":52},"A MicroPython Mocking Example",{"type":23,"tag":24,"props":54,"children":55},{},[56,58,65,67,73],{"type":28,"value":57},"In this example, we will be unit testing a module named ",{"type":23,"tag":59,"props":60,"children":62},"code",{"className":61},[],[63],{"type":28,"value":64},"time_logger",{"type":28,"value":66},", that\ndepends on the MicroPython library ",{"type":23,"tag":59,"props":68,"children":70},{"className":69},[],[71],{"type":28,"value":72},"utime",{"type":28,"value":74}," to log the most recent Epoch time to\na file.",{"type":23,"tag":76,"props":77,"children":80},"pre",{"className":78,"code":79,"language":17,"meta":7,"style":7},"language-python shiki shiki-themes github-light","# time_logger.py\n\nclass TimeLogger(object):\n\n def save_time(self):\n \"\"\" Overwrite a file with the most recent Epoch timestamp from `utime`\n \"\"\"\n with open(\"LAST_KNOWN_TIME\", \"w+\") as f:\n f.write(str(utime.time()))\n",[81],{"type":23,"tag":59,"props":82,"children":83},{"__ignoreMap":7},[84,96,106,139,147,166,176,185,233],{"type":23,"tag":85,"props":86,"children":89},"span",{"class":87,"line":88},"line",1,[90],{"type":23,"tag":85,"props":91,"children":93},{"style":92},"--shiki-default:#6A737D",[94],{"type":28,"value":95},"# time_logger.py\n",{"type":23,"tag":85,"props":97,"children":99},{"class":87,"line":98},2,[100],{"type":23,"tag":85,"props":101,"children":103},{"emptyLinePlaceholder":102},true,[104],{"type":28,"value":105},"\n",{"type":23,"tag":85,"props":107,"children":109},{"class":87,"line":108},3,[110,116,122,128,134],{"type":23,"tag":85,"props":111,"children":113},{"style":112},"--shiki-default:#D73A49",[114],{"type":28,"value":115},"class",{"type":23,"tag":85,"props":117,"children":119},{"style":118},"--shiki-default:#6F42C1",[120],{"type":28,"value":121}," TimeLogger",{"type":23,"tag":85,"props":123,"children":125},{"style":124},"--shiki-default:#24292E",[126],{"type":28,"value":127},"(",{"type":23,"tag":85,"props":129,"children":131},{"style":130},"--shiki-default:#005CC5",[132],{"type":28,"value":133},"object",{"type":23,"tag":85,"props":135,"children":136},{"style":124},[137],{"type":28,"value":138},"):\n",{"type":23,"tag":85,"props":140,"children":142},{"class":87,"line":141},4,[143],{"type":23,"tag":85,"props":144,"children":145},{"emptyLinePlaceholder":102},[146],{"type":28,"value":105},{"type":23,"tag":85,"props":148,"children":150},{"class":87,"line":149},5,[151,156,161],{"type":23,"tag":85,"props":152,"children":153},{"style":112},[154],{"type":28,"value":155}," def",{"type":23,"tag":85,"props":157,"children":158},{"style":118},[159],{"type":28,"value":160}," save_time",{"type":23,"tag":85,"props":162,"children":163},{"style":124},[164],{"type":28,"value":165},"(self):\n",{"type":23,"tag":85,"props":167,"children":169},{"class":87,"line":168},6,[170],{"type":23,"tag":85,"props":171,"children":173},{"style":172},"--shiki-default:#032F62",[174],{"type":28,"value":175}," \"\"\" Overwrite a file with the most recent Epoch timestamp from `utime`\n",{"type":23,"tag":85,"props":177,"children":179},{"class":87,"line":178},7,[180],{"type":23,"tag":85,"props":181,"children":182},{"style":172},[183],{"type":28,"value":184}," \"\"\"\n",{"type":23,"tag":85,"props":186,"children":188},{"class":87,"line":187},8,[189,194,199,203,208,213,218,223,228],{"type":23,"tag":85,"props":190,"children":191},{"style":112},[192],{"type":28,"value":193}," with",{"type":23,"tag":85,"props":195,"children":196},{"style":130},[197],{"type":28,"value":198}," open",{"type":23,"tag":85,"props":200,"children":201},{"style":124},[202],{"type":28,"value":127},{"type":23,"tag":85,"props":204,"children":205},{"style":172},[206],{"type":28,"value":207},"\"LAST_KNOWN_TIME\"",{"type":23,"tag":85,"props":209,"children":210},{"style":124},[211],{"type":28,"value":212},", ",{"type":23,"tag":85,"props":214,"children":215},{"style":172},[216],{"type":28,"value":217},"\"w+\"",{"type":23,"tag":85,"props":219,"children":220},{"style":124},[221],{"type":28,"value":222},") ",{"type":23,"tag":85,"props":224,"children":225},{"style":112},[226],{"type":28,"value":227},"as",{"type":23,"tag":85,"props":229,"children":230},{"style":124},[231],{"type":28,"value":232}," f:\n",{"type":23,"tag":85,"props":234,"children":236},{"class":87,"line":235},9,[237,242,247],{"type":23,"tag":85,"props":238,"children":239},{"style":124},[240],{"type":28,"value":241}," f.write(",{"type":23,"tag":85,"props":243,"children":244},{"style":130},[245],{"type":28,"value":246},"str",{"type":23,"tag":85,"props":248,"children":249},{"style":124},[250],{"type":28,"value":251},"(utime.time()))\n",{"type":23,"tag":24,"props":253,"children":254},{},[255,257,262,264,269,271,276],{"type":28,"value":256},"First, because the ",{"type":23,"tag":59,"props":258,"children":260},{"className":259},[],[261],{"type":28,"value":72},{"type":28,"value":263}," module is not installed on the machine that the unit\ntests on, we must mock ",{"type":23,"tag":59,"props":265,"children":267},{"className":266},[],[268],{"type":28,"value":72},{"type":28,"value":270}," module before importing ",{"type":23,"tag":59,"props":272,"children":274},{"className":273},[],[275],{"type":28,"value":64},{"type":28,"value":277}," in our\nunit test file.",{"type":23,"tag":76,"props":279,"children":281},{"className":78,"code":280,"language":17,"meta":7,"style":7},"# test_time_logger.py\n\nimport unittest\n\nfrom unittest.mock import MagicMock\n\nsys.modules['utime'] = MagicMock()\nfrom time_logger import TimeLogger\n",[282],{"type":23,"tag":59,"props":283,"children":284},{"__ignoreMap":7},[285,293,300,313,320,342,349,377],{"type":23,"tag":85,"props":286,"children":287},{"class":87,"line":88},[288],{"type":23,"tag":85,"props":289,"children":290},{"style":92},[291],{"type":28,"value":292},"# test_time_logger.py\n",{"type":23,"tag":85,"props":294,"children":295},{"class":87,"line":98},[296],{"type":23,"tag":85,"props":297,"children":298},{"emptyLinePlaceholder":102},[299],{"type":28,"value":105},{"type":23,"tag":85,"props":301,"children":302},{"class":87,"line":108},[303,308],{"type":23,"tag":85,"props":304,"children":305},{"style":112},[306],{"type":28,"value":307},"import",{"type":23,"tag":85,"props":309,"children":310},{"style":124},[311],{"type":28,"value":312}," unittest\n",{"type":23,"tag":85,"props":314,"children":315},{"class":87,"line":141},[316],{"type":23,"tag":85,"props":317,"children":318},{"emptyLinePlaceholder":102},[319],{"type":28,"value":105},{"type":23,"tag":85,"props":321,"children":322},{"class":87,"line":149},[323,328,333,337],{"type":23,"tag":85,"props":324,"children":325},{"style":112},[326],{"type":28,"value":327},"from",{"type":23,"tag":85,"props":329,"children":330},{"style":124},[331],{"type":28,"value":332}," unittest.mock ",{"type":23,"tag":85,"props":334,"children":335},{"style":112},[336],{"type":28,"value":307},{"type":23,"tag":85,"props":338,"children":339},{"style":124},[340],{"type":28,"value":341}," MagicMock\n",{"type":23,"tag":85,"props":343,"children":344},{"class":87,"line":168},[345],{"type":23,"tag":85,"props":346,"children":347},{"emptyLinePlaceholder":102},[348],{"type":28,"value":105},{"type":23,"tag":85,"props":350,"children":351},{"class":87,"line":178},[352,357,362,367,372],{"type":23,"tag":85,"props":353,"children":354},{"style":124},[355],{"type":28,"value":356},"sys.modules[",{"type":23,"tag":85,"props":358,"children":359},{"style":172},[360],{"type":28,"value":361},"'utime'",{"type":23,"tag":85,"props":363,"children":364},{"style":124},[365],{"type":28,"value":366},"] ",{"type":23,"tag":85,"props":368,"children":369},{"style":112},[370],{"type":28,"value":371},"=",{"type":23,"tag":85,"props":373,"children":374},{"style":124},[375],{"type":28,"value":376}," MagicMock()\n",{"type":23,"tag":85,"props":378,"children":379},{"class":87,"line":187},[380,384,389,393],{"type":23,"tag":85,"props":381,"children":382},{"style":112},[383],{"type":28,"value":327},{"type":23,"tag":85,"props":385,"children":386},{"style":124},[387],{"type":28,"value":388}," time_logger ",{"type":23,"tag":85,"props":390,"children":391},{"style":112},[392],{"type":28,"value":307},{"type":23,"tag":85,"props":394,"children":395},{"style":124},[396],{"type":28,"value":397}," TimeLogger\n",{"type":23,"tag":24,"props":399,"children":400},{},[401,403,409,411,417],{"type":28,"value":402},"Then, we can write a test that patches the ",{"type":23,"tag":59,"props":404,"children":406},{"className":405},[],[407],{"type":28,"value":408},"utime.time",{"type":28,"value":410}," functionality so that\nit returns a value of our choosing -- in this case, ",{"type":23,"tag":59,"props":412,"children":414},{"className":413},[],[415],{"type":28,"value":416},"1234",{"type":28,"value":418},".",{"type":23,"tag":76,"props":420,"children":422},{"className":78,"code":421,"language":17,"meta":7,"style":7},"class TestTimeLogger(unittest.TestCase):\n\n def test_save_time(self):\n \"\"\" Verify that the Epoch time is written to file\n \"\"\"\n with unittest.mock.patch(\"utime.time\", return_value=1234):\n t = TimeLogger()\n t.save_time()\n with open(\"LAST_KNOWN_TIME\") as f:\n self.assertEqual(\"1234\", f.read())\n",[423],{"type":23,"tag":59,"props":424,"children":425},{"__ignoreMap":7},[426,460,467,483,491,498,537,554,562,594],{"type":23,"tag":85,"props":427,"children":428},{"class":87,"line":88},[429,433,438,442,447,451,456],{"type":23,"tag":85,"props":430,"children":431},{"style":112},[432],{"type":28,"value":115},{"type":23,"tag":85,"props":434,"children":435},{"style":118},[436],{"type":28,"value":437}," TestTimeLogger",{"type":23,"tag":85,"props":439,"children":440},{"style":124},[441],{"type":28,"value":127},{"type":23,"tag":85,"props":443,"children":444},{"style":118},[445],{"type":28,"value":446},"unittest",{"type":23,"tag":85,"props":448,"children":449},{"style":124},[450],{"type":28,"value":418},{"type":23,"tag":85,"props":452,"children":453},{"style":118},[454],{"type":28,"value":455},"TestCase",{"type":23,"tag":85,"props":457,"children":458},{"style":124},[459],{"type":28,"value":138},{"type":23,"tag":85,"props":461,"children":462},{"class":87,"line":98},[463],{"type":23,"tag":85,"props":464,"children":465},{"emptyLinePlaceholder":102},[466],{"type":28,"value":105},{"type":23,"tag":85,"props":468,"children":469},{"class":87,"line":108},[470,474,479],{"type":23,"tag":85,"props":471,"children":472},{"style":112},[473],{"type":28,"value":155},{"type":23,"tag":85,"props":475,"children":476},{"style":118},[477],{"type":28,"value":478}," test_save_time",{"type":23,"tag":85,"props":480,"children":481},{"style":124},[482],{"type":28,"value":165},{"type":23,"tag":85,"props":484,"children":485},{"class":87,"line":141},[486],{"type":23,"tag":85,"props":487,"children":488},{"style":172},[489],{"type":28,"value":490}," \"\"\" Verify that the Epoch time is written to file\n",{"type":23,"tag":85,"props":492,"children":493},{"class":87,"line":149},[494],{"type":23,"tag":85,"props":495,"children":496},{"style":172},[497],{"type":28,"value":184},{"type":23,"tag":85,"props":499,"children":500},{"class":87,"line":168},[501,505,510,515,519,525,529,533],{"type":23,"tag":85,"props":502,"children":503},{"style":112},[504],{"type":28,"value":193},{"type":23,"tag":85,"props":506,"children":507},{"style":124},[508],{"type":28,"value":509}," unittest.mock.patch(",{"type":23,"tag":85,"props":511,"children":512},{"style":172},[513],{"type":28,"value":514},"\"utime.time\"",{"type":23,"tag":85,"props":516,"children":517},{"style":124},[518],{"type":28,"value":212},{"type":23,"tag":85,"props":520,"children":522},{"style":521},"--shiki-default:#E36209",[523],{"type":28,"value":524},"return_value",{"type":23,"tag":85,"props":526,"children":527},{"style":112},[528],{"type":28,"value":371},{"type":23,"tag":85,"props":530,"children":531},{"style":130},[532],{"type":28,"value":416},{"type":23,"tag":85,"props":534,"children":535},{"style":124},[536],{"type":28,"value":138},{"type":23,"tag":85,"props":538,"children":539},{"class":87,"line":178},[540,545,549],{"type":23,"tag":85,"props":541,"children":542},{"style":124},[543],{"type":28,"value":544}," t ",{"type":23,"tag":85,"props":546,"children":547},{"style":112},[548],{"type":28,"value":371},{"type":23,"tag":85,"props":550,"children":551},{"style":124},[552],{"type":28,"value":553}," TimeLogger()\n",{"type":23,"tag":85,"props":555,"children":556},{"class":87,"line":187},[557],{"type":23,"tag":85,"props":558,"children":559},{"style":124},[560],{"type":28,"value":561}," t.save_time()\n",{"type":23,"tag":85,"props":563,"children":564},{"class":87,"line":235},[565,570,574,578,582,586,590],{"type":23,"tag":85,"props":566,"children":567},{"style":112},[568],{"type":28,"value":569}," with",{"type":23,"tag":85,"props":571,"children":572},{"style":130},[573],{"type":28,"value":198},{"type":23,"tag":85,"props":575,"children":576},{"style":124},[577],{"type":28,"value":127},{"type":23,"tag":85,"props":579,"children":580},{"style":172},[581],{"type":28,"value":207},{"type":23,"tag":85,"props":583,"children":584},{"style":124},[585],{"type":28,"value":222},{"type":23,"tag":85,"props":587,"children":588},{"style":112},[589],{"type":28,"value":227},{"type":23,"tag":85,"props":591,"children":592},{"style":124},[593],{"type":28,"value":232},{"type":23,"tag":85,"props":595,"children":597},{"class":87,"line":596},10,[598,603,608,613],{"type":23,"tag":85,"props":599,"children":600},{"style":130},[601],{"type":28,"value":602}," self",{"type":23,"tag":85,"props":604,"children":605},{"style":124},[606],{"type":28,"value":607},".assertEqual(",{"type":23,"tag":85,"props":609,"children":610},{"style":172},[611],{"type":28,"value":612},"\"1234\"",{"type":23,"tag":85,"props":614,"children":615},{"style":124},[616],{"type":28,"value":617},", f.read())\n",{"type":23,"tag":24,"props":619,"children":620},{},[621,623,629,631,637,639,644],{"type":28,"value":622},"Now, when the ",{"type":23,"tag":59,"props":624,"children":626},{"className":625},[],[627],{"type":28,"value":628},"save_time",{"type":28,"value":630}," method gets the latest time from ",{"type":23,"tag":59,"props":632,"children":634},{"className":633},[],[635],{"type":28,"value":636},"utime.time()",{"type":28,"value":638},", the\nvalue will be patched to return ",{"type":23,"tag":59,"props":640,"children":642},{"className":641},[],[643],{"type":28,"value":416},{"type":28,"value":645},". That value will be written to a file,\nand our unit test will pass!",{"type":23,"tag":647,"props":648,"children":650},"h2",{"id":649},"references",[651],{"type":28,"value":652},"References",{"type":23,"tag":654,"props":655,"children":656},"ol",{},[657],{"type":23,"tag":658,"props":659,"children":660},"li",{},[661],{"type":23,"tag":662,"props":663,"children":667},"a",{"href":664,"rel":665},"https://docs.python.org/3/library/unittest.html",[666],"nofollow",[668,673],{"type":23,"tag":59,"props":669,"children":671},{"className":670},[],[672],{"type":28,"value":446},{"type":28,"value":674}," — Unit testing framework",{"type":23,"tag":676,"props":677,"children":678},"style",{},[679],{"type":28,"value":680},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}",{"title":7,"searchDepth":98,"depth":98,"links":682},[683],{"id":649,"depth":98,"text":652},"markdown","content:articles:unit-testing-micropython-with-mocks.md","content","articles/unit-testing-micropython-with-mocks.md","articles/unit-testing-micropython-with-mocks","md",1735276485232] \ No newline at end of file +[{"data":1,"prerenderedAt":690},["ShallowReactive",2],{"page-data":3},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"date":10,"draft":6,"tags":11,"categories":16,"excerpt":19,"body":29,"_type":684,"_id":685,"_source":686,"_file":687,"_stem":688,"_extension":689},"/articles/unit-testing-micropython-with-mocks","articles",false,"","Unit Testing in MicroPython with Mocks","Unit testing code for embedded systems can be challenging. While it's possible\nto leverage emulators, write side-effect free code, or run tests on the\nhardware itself, it's often easiest to unit test the code on your personal\ncomputer with mocked hardware functionality.","2020-02-07",[12,13,14,15],"micropython","testing","mocks","tutorial",[17,18],"python","embedded",{"type":20,"children":21},"root",[22],{"type":23,"tag":24,"props":25,"children":26},"element","p",{},[27],{"type":28,"value":9},"text",{"type":20,"children":30,"toc":681},[31,35,42,47,53,75,252,278,398,419,618,646,653,675],{"type":23,"tag":24,"props":32,"children":33},{},[34],{"type":28,"value":9},{"type":23,"tag":36,"props":37,"children":39},"h1",{"id":38},"mocking",[40],{"type":28,"value":41},"Mocking",{"type":23,"tag":24,"props":43,"children":44},{},[45],{"type":28,"value":46},"Mocks allow us to replace the hardware interfacing functionality under-the-hood\nwith predefined results and side-effects. For example, if there is a piece of\nlogic that retrieves values from an accelerometer to get a device's\norientation, it would be possible to mock the returned values of the\naccelerometer -- allowing us to run the unit tests on a device that does not\nhave an accelerometer sensor installed.",{"type":23,"tag":36,"props":48,"children":50},{"id":49},"a-micropython-mocking-example",[51],{"type":28,"value":52},"A MicroPython Mocking Example",{"type":23,"tag":24,"props":54,"children":55},{},[56,58,65,67,73],{"type":28,"value":57},"In this example, we will be unit testing a module named ",{"type":23,"tag":59,"props":60,"children":62},"code",{"className":61},[],[63],{"type":28,"value":64},"time_logger",{"type":28,"value":66},", that\ndepends on the MicroPython library ",{"type":23,"tag":59,"props":68,"children":70},{"className":69},[],[71],{"type":28,"value":72},"utime",{"type":28,"value":74}," to log the most recent Epoch time to\na file.",{"type":23,"tag":76,"props":77,"children":80},"pre",{"className":78,"code":79,"language":17,"meta":7,"style":7},"language-python shiki shiki-themes github-light","# time_logger.py\n\nclass TimeLogger(object):\n\n def save_time(self):\n \"\"\" Overwrite a file with the most recent Epoch timestamp from `utime`\n \"\"\"\n with open(\"LAST_KNOWN_TIME\", \"w+\") as f:\n f.write(str(utime.time()))\n",[81],{"type":23,"tag":59,"props":82,"children":83},{"__ignoreMap":7},[84,96,106,139,147,166,176,185,233],{"type":23,"tag":85,"props":86,"children":89},"span",{"class":87,"line":88},"line",1,[90],{"type":23,"tag":85,"props":91,"children":93},{"style":92},"--shiki-default:#6A737D",[94],{"type":28,"value":95},"# time_logger.py\n",{"type":23,"tag":85,"props":97,"children":99},{"class":87,"line":98},2,[100],{"type":23,"tag":85,"props":101,"children":103},{"emptyLinePlaceholder":102},true,[104],{"type":28,"value":105},"\n",{"type":23,"tag":85,"props":107,"children":109},{"class":87,"line":108},3,[110,116,122,128,134],{"type":23,"tag":85,"props":111,"children":113},{"style":112},"--shiki-default:#D73A49",[114],{"type":28,"value":115},"class",{"type":23,"tag":85,"props":117,"children":119},{"style":118},"--shiki-default:#6F42C1",[120],{"type":28,"value":121}," TimeLogger",{"type":23,"tag":85,"props":123,"children":125},{"style":124},"--shiki-default:#24292E",[126],{"type":28,"value":127},"(",{"type":23,"tag":85,"props":129,"children":131},{"style":130},"--shiki-default:#005CC5",[132],{"type":28,"value":133},"object",{"type":23,"tag":85,"props":135,"children":136},{"style":124},[137],{"type":28,"value":138},"):\n",{"type":23,"tag":85,"props":140,"children":142},{"class":87,"line":141},4,[143],{"type":23,"tag":85,"props":144,"children":145},{"emptyLinePlaceholder":102},[146],{"type":28,"value":105},{"type":23,"tag":85,"props":148,"children":150},{"class":87,"line":149},5,[151,156,161],{"type":23,"tag":85,"props":152,"children":153},{"style":112},[154],{"type":28,"value":155}," def",{"type":23,"tag":85,"props":157,"children":158},{"style":118},[159],{"type":28,"value":160}," save_time",{"type":23,"tag":85,"props":162,"children":163},{"style":124},[164],{"type":28,"value":165},"(self):\n",{"type":23,"tag":85,"props":167,"children":169},{"class":87,"line":168},6,[170],{"type":23,"tag":85,"props":171,"children":173},{"style":172},"--shiki-default:#032F62",[174],{"type":28,"value":175}," \"\"\" Overwrite a file with the most recent Epoch timestamp from `utime`\n",{"type":23,"tag":85,"props":177,"children":179},{"class":87,"line":178},7,[180],{"type":23,"tag":85,"props":181,"children":182},{"style":172},[183],{"type":28,"value":184}," \"\"\"\n",{"type":23,"tag":85,"props":186,"children":188},{"class":87,"line":187},8,[189,194,199,203,208,213,218,223,228],{"type":23,"tag":85,"props":190,"children":191},{"style":112},[192],{"type":28,"value":193}," with",{"type":23,"tag":85,"props":195,"children":196},{"style":130},[197],{"type":28,"value":198}," open",{"type":23,"tag":85,"props":200,"children":201},{"style":124},[202],{"type":28,"value":127},{"type":23,"tag":85,"props":204,"children":205},{"style":172},[206],{"type":28,"value":207},"\"LAST_KNOWN_TIME\"",{"type":23,"tag":85,"props":209,"children":210},{"style":124},[211],{"type":28,"value":212},", ",{"type":23,"tag":85,"props":214,"children":215},{"style":172},[216],{"type":28,"value":217},"\"w+\"",{"type":23,"tag":85,"props":219,"children":220},{"style":124},[221],{"type":28,"value":222},") ",{"type":23,"tag":85,"props":224,"children":225},{"style":112},[226],{"type":28,"value":227},"as",{"type":23,"tag":85,"props":229,"children":230},{"style":124},[231],{"type":28,"value":232}," f:\n",{"type":23,"tag":85,"props":234,"children":236},{"class":87,"line":235},9,[237,242,247],{"type":23,"tag":85,"props":238,"children":239},{"style":124},[240],{"type":28,"value":241}," f.write(",{"type":23,"tag":85,"props":243,"children":244},{"style":130},[245],{"type":28,"value":246},"str",{"type":23,"tag":85,"props":248,"children":249},{"style":124},[250],{"type":28,"value":251},"(utime.time()))\n",{"type":23,"tag":24,"props":253,"children":254},{},[255,257,262,264,269,271,276],{"type":28,"value":256},"First, because the ",{"type":23,"tag":59,"props":258,"children":260},{"className":259},[],[261],{"type":28,"value":72},{"type":28,"value":263}," module is not installed on the machine that the unit\ntests on, we must mock ",{"type":23,"tag":59,"props":265,"children":267},{"className":266},[],[268],{"type":28,"value":72},{"type":28,"value":270}," module before importing ",{"type":23,"tag":59,"props":272,"children":274},{"className":273},[],[275],{"type":28,"value":64},{"type":28,"value":277}," in our\nunit test file.",{"type":23,"tag":76,"props":279,"children":281},{"className":78,"code":280,"language":17,"meta":7,"style":7},"# test_time_logger.py\n\nimport unittest\n\nfrom unittest.mock import MagicMock\n\nsys.modules['utime'] = MagicMock()\nfrom time_logger import TimeLogger\n",[282],{"type":23,"tag":59,"props":283,"children":284},{"__ignoreMap":7},[285,293,300,313,320,342,349,377],{"type":23,"tag":85,"props":286,"children":287},{"class":87,"line":88},[288],{"type":23,"tag":85,"props":289,"children":290},{"style":92},[291],{"type":28,"value":292},"# test_time_logger.py\n",{"type":23,"tag":85,"props":294,"children":295},{"class":87,"line":98},[296],{"type":23,"tag":85,"props":297,"children":298},{"emptyLinePlaceholder":102},[299],{"type":28,"value":105},{"type":23,"tag":85,"props":301,"children":302},{"class":87,"line":108},[303,308],{"type":23,"tag":85,"props":304,"children":305},{"style":112},[306],{"type":28,"value":307},"import",{"type":23,"tag":85,"props":309,"children":310},{"style":124},[311],{"type":28,"value":312}," unittest\n",{"type":23,"tag":85,"props":314,"children":315},{"class":87,"line":141},[316],{"type":23,"tag":85,"props":317,"children":318},{"emptyLinePlaceholder":102},[319],{"type":28,"value":105},{"type":23,"tag":85,"props":321,"children":322},{"class":87,"line":149},[323,328,333,337],{"type":23,"tag":85,"props":324,"children":325},{"style":112},[326],{"type":28,"value":327},"from",{"type":23,"tag":85,"props":329,"children":330},{"style":124},[331],{"type":28,"value":332}," unittest.mock ",{"type":23,"tag":85,"props":334,"children":335},{"style":112},[336],{"type":28,"value":307},{"type":23,"tag":85,"props":338,"children":339},{"style":124},[340],{"type":28,"value":341}," MagicMock\n",{"type":23,"tag":85,"props":343,"children":344},{"class":87,"line":168},[345],{"type":23,"tag":85,"props":346,"children":347},{"emptyLinePlaceholder":102},[348],{"type":28,"value":105},{"type":23,"tag":85,"props":350,"children":351},{"class":87,"line":178},[352,357,362,367,372],{"type":23,"tag":85,"props":353,"children":354},{"style":124},[355],{"type":28,"value":356},"sys.modules[",{"type":23,"tag":85,"props":358,"children":359},{"style":172},[360],{"type":28,"value":361},"'utime'",{"type":23,"tag":85,"props":363,"children":364},{"style":124},[365],{"type":28,"value":366},"] ",{"type":23,"tag":85,"props":368,"children":369},{"style":112},[370],{"type":28,"value":371},"=",{"type":23,"tag":85,"props":373,"children":374},{"style":124},[375],{"type":28,"value":376}," MagicMock()\n",{"type":23,"tag":85,"props":378,"children":379},{"class":87,"line":187},[380,384,389,393],{"type":23,"tag":85,"props":381,"children":382},{"style":112},[383],{"type":28,"value":327},{"type":23,"tag":85,"props":385,"children":386},{"style":124},[387],{"type":28,"value":388}," time_logger ",{"type":23,"tag":85,"props":390,"children":391},{"style":112},[392],{"type":28,"value":307},{"type":23,"tag":85,"props":394,"children":395},{"style":124},[396],{"type":28,"value":397}," TimeLogger\n",{"type":23,"tag":24,"props":399,"children":400},{},[401,403,409,411,417],{"type":28,"value":402},"Then, we can write a test that patches the ",{"type":23,"tag":59,"props":404,"children":406},{"className":405},[],[407],{"type":28,"value":408},"utime.time",{"type":28,"value":410}," functionality so that\nit returns a value of our choosing -- in this case, ",{"type":23,"tag":59,"props":412,"children":414},{"className":413},[],[415],{"type":28,"value":416},"1234",{"type":28,"value":418},".",{"type":23,"tag":76,"props":420,"children":422},{"className":78,"code":421,"language":17,"meta":7,"style":7},"class TestTimeLogger(unittest.TestCase):\n\n def test_save_time(self):\n \"\"\" Verify that the Epoch time is written to file\n \"\"\"\n with unittest.mock.patch(\"utime.time\", return_value=1234):\n t = TimeLogger()\n t.save_time()\n with open(\"LAST_KNOWN_TIME\") as f:\n self.assertEqual(\"1234\", f.read())\n",[423],{"type":23,"tag":59,"props":424,"children":425},{"__ignoreMap":7},[426,460,467,483,491,498,537,554,562,594],{"type":23,"tag":85,"props":427,"children":428},{"class":87,"line":88},[429,433,438,442,447,451,456],{"type":23,"tag":85,"props":430,"children":431},{"style":112},[432],{"type":28,"value":115},{"type":23,"tag":85,"props":434,"children":435},{"style":118},[436],{"type":28,"value":437}," TestTimeLogger",{"type":23,"tag":85,"props":439,"children":440},{"style":124},[441],{"type":28,"value":127},{"type":23,"tag":85,"props":443,"children":444},{"style":118},[445],{"type":28,"value":446},"unittest",{"type":23,"tag":85,"props":448,"children":449},{"style":124},[450],{"type":28,"value":418},{"type":23,"tag":85,"props":452,"children":453},{"style":118},[454],{"type":28,"value":455},"TestCase",{"type":23,"tag":85,"props":457,"children":458},{"style":124},[459],{"type":28,"value":138},{"type":23,"tag":85,"props":461,"children":462},{"class":87,"line":98},[463],{"type":23,"tag":85,"props":464,"children":465},{"emptyLinePlaceholder":102},[466],{"type":28,"value":105},{"type":23,"tag":85,"props":468,"children":469},{"class":87,"line":108},[470,474,479],{"type":23,"tag":85,"props":471,"children":472},{"style":112},[473],{"type":28,"value":155},{"type":23,"tag":85,"props":475,"children":476},{"style":118},[477],{"type":28,"value":478}," test_save_time",{"type":23,"tag":85,"props":480,"children":481},{"style":124},[482],{"type":28,"value":165},{"type":23,"tag":85,"props":484,"children":485},{"class":87,"line":141},[486],{"type":23,"tag":85,"props":487,"children":488},{"style":172},[489],{"type":28,"value":490}," \"\"\" Verify that the Epoch time is written to file\n",{"type":23,"tag":85,"props":492,"children":493},{"class":87,"line":149},[494],{"type":23,"tag":85,"props":495,"children":496},{"style":172},[497],{"type":28,"value":184},{"type":23,"tag":85,"props":499,"children":500},{"class":87,"line":168},[501,505,510,515,519,525,529,533],{"type":23,"tag":85,"props":502,"children":503},{"style":112},[504],{"type":28,"value":193},{"type":23,"tag":85,"props":506,"children":507},{"style":124},[508],{"type":28,"value":509}," unittest.mock.patch(",{"type":23,"tag":85,"props":511,"children":512},{"style":172},[513],{"type":28,"value":514},"\"utime.time\"",{"type":23,"tag":85,"props":516,"children":517},{"style":124},[518],{"type":28,"value":212},{"type":23,"tag":85,"props":520,"children":522},{"style":521},"--shiki-default:#E36209",[523],{"type":28,"value":524},"return_value",{"type":23,"tag":85,"props":526,"children":527},{"style":112},[528],{"type":28,"value":371},{"type":23,"tag":85,"props":530,"children":531},{"style":130},[532],{"type":28,"value":416},{"type":23,"tag":85,"props":534,"children":535},{"style":124},[536],{"type":28,"value":138},{"type":23,"tag":85,"props":538,"children":539},{"class":87,"line":178},[540,545,549],{"type":23,"tag":85,"props":541,"children":542},{"style":124},[543],{"type":28,"value":544}," t ",{"type":23,"tag":85,"props":546,"children":547},{"style":112},[548],{"type":28,"value":371},{"type":23,"tag":85,"props":550,"children":551},{"style":124},[552],{"type":28,"value":553}," TimeLogger()\n",{"type":23,"tag":85,"props":555,"children":556},{"class":87,"line":187},[557],{"type":23,"tag":85,"props":558,"children":559},{"style":124},[560],{"type":28,"value":561}," t.save_time()\n",{"type":23,"tag":85,"props":563,"children":564},{"class":87,"line":235},[565,570,574,578,582,586,590],{"type":23,"tag":85,"props":566,"children":567},{"style":112},[568],{"type":28,"value":569}," with",{"type":23,"tag":85,"props":571,"children":572},{"style":130},[573],{"type":28,"value":198},{"type":23,"tag":85,"props":575,"children":576},{"style":124},[577],{"type":28,"value":127},{"type":23,"tag":85,"props":579,"children":580},{"style":172},[581],{"type":28,"value":207},{"type":23,"tag":85,"props":583,"children":584},{"style":124},[585],{"type":28,"value":222},{"type":23,"tag":85,"props":587,"children":588},{"style":112},[589],{"type":28,"value":227},{"type":23,"tag":85,"props":591,"children":592},{"style":124},[593],{"type":28,"value":232},{"type":23,"tag":85,"props":595,"children":597},{"class":87,"line":596},10,[598,603,608,613],{"type":23,"tag":85,"props":599,"children":600},{"style":130},[601],{"type":28,"value":602}," self",{"type":23,"tag":85,"props":604,"children":605},{"style":124},[606],{"type":28,"value":607},".assertEqual(",{"type":23,"tag":85,"props":609,"children":610},{"style":172},[611],{"type":28,"value":612},"\"1234\"",{"type":23,"tag":85,"props":614,"children":615},{"style":124},[616],{"type":28,"value":617},", f.read())\n",{"type":23,"tag":24,"props":619,"children":620},{},[621,623,629,631,637,639,644],{"type":28,"value":622},"Now, when the ",{"type":23,"tag":59,"props":624,"children":626},{"className":625},[],[627],{"type":28,"value":628},"save_time",{"type":28,"value":630}," method gets the latest time from ",{"type":23,"tag":59,"props":632,"children":634},{"className":633},[],[635],{"type":28,"value":636},"utime.time()",{"type":28,"value":638},", the\nvalue will be patched to return ",{"type":23,"tag":59,"props":640,"children":642},{"className":641},[],[643],{"type":28,"value":416},{"type":28,"value":645},". That value will be written to a file,\nand our unit test will pass!",{"type":23,"tag":647,"props":648,"children":650},"h2",{"id":649},"references",[651],{"type":28,"value":652},"References",{"type":23,"tag":654,"props":655,"children":656},"ol",{},[657],{"type":23,"tag":658,"props":659,"children":660},"li",{},[661],{"type":23,"tag":662,"props":663,"children":667},"a",{"href":664,"rel":665},"https://docs.python.org/3/library/unittest.html",[666],"nofollow",[668,673],{"type":23,"tag":59,"props":669,"children":671},{"className":670},[],[672],{"type":28,"value":446},{"type":28,"value":674}," — Unit testing framework",{"type":23,"tag":676,"props":677,"children":678},"style",{},[679],{"type":28,"value":680},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}",{"title":7,"searchDepth":98,"depth":98,"links":682},[683],{"id":649,"depth":98,"text":652},"markdown","content:articles:unit-testing-micropython-with-mocks.md","content","articles/unit-testing-micropython-with-mocks.md","articles/unit-testing-micropython-with-mocks","md",1735327945059] \ No newline at end of file diff --git a/articles/unit-testing-micropython-with-mocks/index.html b/articles/unit-testing-micropython-with-mocks/index.html index ef9fd07e..2e7289d3 100644 --- a/articles/unit-testing-micropython-with-mocks/index.html +++ b/articles/unit-testing-micropython-with-mocks/index.html @@ -1,40 +1,40 @@ Colton Padden - + - - - - - + + + + + - + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - -

            Unit Testing in MicroPython with Mocks

            Unit testing code for embedded systems can be challenging. While it's possible + +

            Unit Testing in MicroPython with Mocks

            Unit testing code for embedded systems can be challenging. While it's possible to leverage emulators, write side-effect free code, or run tests on the hardware itself, it's often easiest to unit test the code on your personal computer with mocked hardware functionality.

            Mocking

            Mocks allow us to replace the hardware interfacing functionality under-the-hood @@ -76,5 +76,5 @@ self.assertEqual("1234", f.read())

            Now, when the save_time method gets the latest time from utime.time(), the value will be patched to return 1234. That value will be written to a file, -and our unit test will pass!

            References

            1. unittest — Unit testing framework
            - \ No newline at end of file +and our unit test will pass!

            References

            1. unittest — Unit testing framework
            + \ No newline at end of file diff --git a/articles/vim-fugitive-gpg-pinentry/_payload.json b/articles/vim-fugitive-gpg-pinentry/_payload.json index 0bd1e1d8..55ccc437 100644 --- a/articles/vim-fugitive-gpg-pinentry/_payload.json +++ b/articles/vim-fugitive-gpg-pinentry/_payload.json @@ -1 +1 @@ -[{"data":1,"prerenderedAt":329},["ShallowReactive",2],{"page-data":3},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"draft":6,"date":10,"tags":11,"categories":14,"excerpt":17,"body":56,"_type":323,"_id":324,"_source":325,"_file":326,"_stem":327,"_extension":328},"/articles/vim-fugitive-gpg-pinentry","articles",false,"","Using pinentry-mac to sign commits from vim-fugitive","In order to sign git commits from within Vim using a plugin like tpope/vim-fugitive, it is necessary to configure the gpg-agent to use a GUI based pinentry-program.","2024-05-11",[12,13],"vim","tip",[15,16],"tooling","tips",{"type":18,"children":19},"root",[20],{"type":21,"tag":22,"props":23,"children":24},"element","p",{},[25,28,37,39,46,48,54],{"type":26,"value":27},"text","In order to sign git commits from within Vim using a plugin like ",{"type":21,"tag":29,"props":30,"children":34},"a",{"href":31,"rel":32},"https://github.com/tpope/vim-fugitive",[33],"nofollow",[35],{"type":26,"value":36},"tpope/vim-fugitive",{"type":26,"value":38},", it is necessary to configure the ",{"type":21,"tag":40,"props":41,"children":43},"code",{"className":42},[],[44],{"type":26,"value":45},"gpg-agent",{"type":26,"value":47}," to use a GUI based ",{"type":21,"tag":40,"props":49,"children":51},{"className":50},[],[52],{"type":26,"value":53},"pinentry-program",{"type":26,"value":55},".",{"type":18,"children":57,"toc":319},[58,80,87,129,135,140,178,198,206,218,250,255,308,313],{"type":21,"tag":22,"props":59,"children":60},{},[61,62,67,68,73,74,79],{"type":26,"value":27},{"type":21,"tag":29,"props":63,"children":65},{"href":31,"rel":64},[33],[66],{"type":26,"value":36},{"type":26,"value":38},{"type":21,"tag":40,"props":69,"children":71},{"className":70},[],[72],{"type":26,"value":45},{"type":26,"value":47},{"type":21,"tag":40,"props":75,"children":77},{"className":76},[],[78],{"type":26,"value":53},{"type":26,"value":55},{"type":21,"tag":81,"props":82,"children":84},"h2",{"id":83},"preface",[85],{"type":26,"value":86},"Preface",{"type":21,"tag":22,"props":88,"children":89},{},[90,92,99,101,106,107,112,114,120,122,128],{"type":26,"value":91},"The man, the myth, the legend, Timothy Popallopollis himself ",{"type":21,"tag":29,"props":93,"children":96},{"href":94,"rel":95},"https://github.com/tpope/vim-fugitive/issues/846#issuecomment-253816577",[33],[97],{"type":26,"value":98},"recommends",{"type":26,"value":100}," configuring your ",{"type":21,"tag":40,"props":102,"children":104},{"className":103},[],[105],{"type":26,"value":45},{"type":26,"value":47},{"type":21,"tag":40,"props":108,"children":110},{"className":109},[],[111],{"type":26,"value":53},{"type":26,"value":113},". On macOS this can be done quite by simply installing ",{"type":21,"tag":40,"props":115,"children":117},{"className":116},[],[118],{"type":26,"value":119},"pinentry-mac",{"type":26,"value":121},", and updating your ",{"type":21,"tag":40,"props":123,"children":125},{"className":124},[],[126],{"type":26,"value":127},"gpg-agent.conf",{"type":26,"value":55},{"type":21,"tag":81,"props":130,"children":132},{"id":131},"configuration",[133],{"type":26,"value":134},"Configuration",{"type":21,"tag":22,"props":136,"children":137},{},[138],{"type":26,"value":139},"First things first, let's install the pinentry program.",{"type":21,"tag":141,"props":142,"children":146},"pre",{"code":143,"language":144,"meta":7,"className":145,"style":7},"$ brew install pinentry-mac\n","bash","language-bash shiki shiki-themes github-light",[147],{"type":21,"tag":40,"props":148,"children":149},{"__ignoreMap":7},[150],{"type":21,"tag":151,"props":152,"children":155},"span",{"class":153,"line":154},"line",1,[156,162,168,173],{"type":21,"tag":151,"props":157,"children":159},{"style":158},"--shiki-default:#6F42C1",[160],{"type":26,"value":161},"$",{"type":21,"tag":151,"props":163,"children":165},{"style":164},"--shiki-default:#032F62",[166],{"type":26,"value":167}," brew",{"type":21,"tag":151,"props":169,"children":170},{"style":164},[171],{"type":26,"value":172}," install",{"type":21,"tag":151,"props":174,"children":175},{"style":164},[176],{"type":26,"value":177}," pinentry-mac\n",{"type":21,"tag":22,"props":179,"children":180},{},[181,183,188,190,196],{"type":26,"value":182},"Then, all we need to do is set the ",{"type":21,"tag":40,"props":184,"children":186},{"className":185},[],[187],{"type":26,"value":53},{"type":26,"value":189}," option in your ",{"type":21,"tag":40,"props":191,"children":193},{"className":192},[],[194],{"type":26,"value":195},"~/.gnupg/gpg-agent.conf",{"type":26,"value":197}," file.",{"type":21,"tag":141,"props":199,"children":201},{"code":200},"default-cache-ttl 600\nmax-cache-ttl 7200\npinentry-program /opt/homebrew/bin/pinentry-mac\n",[202],{"type":21,"tag":40,"props":203,"children":204},{"__ignoreMap":7},[205],{"type":26,"value":200},{"type":21,"tag":22,"props":207,"children":208},{},[209,211,217],{"type":26,"value":210},"If your don't know the path to your pinentry program, you can throw down a quick ",{"type":21,"tag":40,"props":212,"children":214},{"className":213},[],[215],{"type":26,"value":216},"which",{"type":26,"value":55},{"type":21,"tag":141,"props":219,"children":221},{"code":220,"language":144,"meta":7,"className":145,"style":7},"$ which pinentry-mac\n/opt/homebrew/bin/pinentry-mac\n",[222],{"type":21,"tag":40,"props":223,"children":224},{"__ignoreMap":7},[225,241],{"type":21,"tag":151,"props":226,"children":227},{"class":153,"line":154},[228,232,237],{"type":21,"tag":151,"props":229,"children":230},{"style":158},[231],{"type":26,"value":161},{"type":21,"tag":151,"props":233,"children":234},{"style":164},[235],{"type":26,"value":236}," which",{"type":21,"tag":151,"props":238,"children":239},{"style":164},[240],{"type":26,"value":177},{"type":21,"tag":151,"props":242,"children":244},{"class":153,"line":243},2,[245],{"type":21,"tag":151,"props":246,"children":247},{"style":158},[248],{"type":26,"value":249},"/opt/homebrew/bin/pinentry-mac\n",{"type":21,"tag":22,"props":251,"children":252},{},[253],{"type":26,"value":254},"Or use your Homebrew prefix.",{"type":21,"tag":141,"props":256,"children":258},{"code":257,"language":144,"meta":7,"className":145,"style":7},"$ echo $(brew --prefix)/bin/pinentry-mac\n/opt/homebrew/bin/pinentry-mac\n",[259],{"type":21,"tag":40,"props":260,"children":261},{"__ignoreMap":7},[262,301],{"type":21,"tag":151,"props":263,"children":264},{"class":153,"line":154},[265,269,274,280,285,291,296],{"type":21,"tag":151,"props":266,"children":267},{"style":158},[268],{"type":26,"value":161},{"type":21,"tag":151,"props":270,"children":271},{"style":164},[272],{"type":26,"value":273}," echo",{"type":21,"tag":151,"props":275,"children":277},{"style":276},"--shiki-default:#24292E",[278],{"type":26,"value":279}," $(",{"type":21,"tag":151,"props":281,"children":282},{"style":158},[283],{"type":26,"value":284},"brew",{"type":21,"tag":151,"props":286,"children":288},{"style":287},"--shiki-default:#005CC5",[289],{"type":26,"value":290}," --prefix",{"type":21,"tag":151,"props":292,"children":293},{"style":276},[294],{"type":26,"value":295},")",{"type":21,"tag":151,"props":297,"children":298},{"style":164},[299],{"type":26,"value":300},"/bin/pinentry-mac\n",{"type":21,"tag":151,"props":302,"children":303},{"class":153,"line":243},[304],{"type":21,"tag":151,"props":305,"children":306},{"style":158},[307],{"type":26,"value":249},{"type":21,"tag":22,"props":309,"children":310},{},[311],{"type":26,"value":312},"But that's all it takes. Now, you should be prompted to enter your gpg pin in an external window when signing commits from vim.",{"type":21,"tag":314,"props":315,"children":316},"style",{},[317],{"type":26,"value":318},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}",{"title":7,"searchDepth":243,"depth":243,"links":320},[321,322],{"id":83,"depth":243,"text":86},{"id":131,"depth":243,"text":134},"markdown","content:articles:vim-fugitive-gpg-pinentry.md","content","articles/vim-fugitive-gpg-pinentry.md","articles/vim-fugitive-gpg-pinentry","md",1735276484939] \ No newline at end of file +[{"data":1,"prerenderedAt":329},["ShallowReactive",2],{"page-data":3},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"draft":6,"date":10,"tags":11,"categories":14,"excerpt":17,"body":56,"_type":323,"_id":324,"_source":325,"_file":326,"_stem":327,"_extension":328},"/articles/vim-fugitive-gpg-pinentry","articles",false,"","Using pinentry-mac to sign commits from vim-fugitive","In order to sign git commits from within Vim using a plugin like tpope/vim-fugitive, it is necessary to configure the gpg-agent to use a GUI based pinentry-program.","2024-05-11",[12,13],"vim","tip",[15,16],"tooling","tips",{"type":18,"children":19},"root",[20],{"type":21,"tag":22,"props":23,"children":24},"element","p",{},[25,28,37,39,46,48,54],{"type":26,"value":27},"text","In order to sign git commits from within Vim using a plugin like ",{"type":21,"tag":29,"props":30,"children":34},"a",{"href":31,"rel":32},"https://github.com/tpope/vim-fugitive",[33],"nofollow",[35],{"type":26,"value":36},"tpope/vim-fugitive",{"type":26,"value":38},", it is necessary to configure the ",{"type":21,"tag":40,"props":41,"children":43},"code",{"className":42},[],[44],{"type":26,"value":45},"gpg-agent",{"type":26,"value":47}," to use a GUI based ",{"type":21,"tag":40,"props":49,"children":51},{"className":50},[],[52],{"type":26,"value":53},"pinentry-program",{"type":26,"value":55},".",{"type":18,"children":57,"toc":319},[58,80,87,129,135,140,178,198,206,218,250,255,308,313],{"type":21,"tag":22,"props":59,"children":60},{},[61,62,67,68,73,74,79],{"type":26,"value":27},{"type":21,"tag":29,"props":63,"children":65},{"href":31,"rel":64},[33],[66],{"type":26,"value":36},{"type":26,"value":38},{"type":21,"tag":40,"props":69,"children":71},{"className":70},[],[72],{"type":26,"value":45},{"type":26,"value":47},{"type":21,"tag":40,"props":75,"children":77},{"className":76},[],[78],{"type":26,"value":53},{"type":26,"value":55},{"type":21,"tag":81,"props":82,"children":84},"h2",{"id":83},"preface",[85],{"type":26,"value":86},"Preface",{"type":21,"tag":22,"props":88,"children":89},{},[90,92,99,101,106,107,112,114,120,122,128],{"type":26,"value":91},"The man, the myth, the legend, Timothy Popallopollis himself ",{"type":21,"tag":29,"props":93,"children":96},{"href":94,"rel":95},"https://github.com/tpope/vim-fugitive/issues/846#issuecomment-253816577",[33],[97],{"type":26,"value":98},"recommends",{"type":26,"value":100}," configuring your ",{"type":21,"tag":40,"props":102,"children":104},{"className":103},[],[105],{"type":26,"value":45},{"type":26,"value":47},{"type":21,"tag":40,"props":108,"children":110},{"className":109},[],[111],{"type":26,"value":53},{"type":26,"value":113},". On macOS this can be done quite by simply installing ",{"type":21,"tag":40,"props":115,"children":117},{"className":116},[],[118],{"type":26,"value":119},"pinentry-mac",{"type":26,"value":121},", and updating your ",{"type":21,"tag":40,"props":123,"children":125},{"className":124},[],[126],{"type":26,"value":127},"gpg-agent.conf",{"type":26,"value":55},{"type":21,"tag":81,"props":130,"children":132},{"id":131},"configuration",[133],{"type":26,"value":134},"Configuration",{"type":21,"tag":22,"props":136,"children":137},{},[138],{"type":26,"value":139},"First things first, let's install the pinentry program.",{"type":21,"tag":141,"props":142,"children":146},"pre",{"code":143,"language":144,"meta":7,"className":145,"style":7},"$ brew install pinentry-mac\n","bash","language-bash shiki shiki-themes github-light",[147],{"type":21,"tag":40,"props":148,"children":149},{"__ignoreMap":7},[150],{"type":21,"tag":151,"props":152,"children":155},"span",{"class":153,"line":154},"line",1,[156,162,168,173],{"type":21,"tag":151,"props":157,"children":159},{"style":158},"--shiki-default:#6F42C1",[160],{"type":26,"value":161},"$",{"type":21,"tag":151,"props":163,"children":165},{"style":164},"--shiki-default:#032F62",[166],{"type":26,"value":167}," brew",{"type":21,"tag":151,"props":169,"children":170},{"style":164},[171],{"type":26,"value":172}," install",{"type":21,"tag":151,"props":174,"children":175},{"style":164},[176],{"type":26,"value":177}," pinentry-mac\n",{"type":21,"tag":22,"props":179,"children":180},{},[181,183,188,190,196],{"type":26,"value":182},"Then, all we need to do is set the ",{"type":21,"tag":40,"props":184,"children":186},{"className":185},[],[187],{"type":26,"value":53},{"type":26,"value":189}," option in your ",{"type":21,"tag":40,"props":191,"children":193},{"className":192},[],[194],{"type":26,"value":195},"~/.gnupg/gpg-agent.conf",{"type":26,"value":197}," file.",{"type":21,"tag":141,"props":199,"children":201},{"code":200},"default-cache-ttl 600\nmax-cache-ttl 7200\npinentry-program /opt/homebrew/bin/pinentry-mac\n",[202],{"type":21,"tag":40,"props":203,"children":204},{"__ignoreMap":7},[205],{"type":26,"value":200},{"type":21,"tag":22,"props":207,"children":208},{},[209,211,217],{"type":26,"value":210},"If your don't know the path to your pinentry program, you can throw down a quick ",{"type":21,"tag":40,"props":212,"children":214},{"className":213},[],[215],{"type":26,"value":216},"which",{"type":26,"value":55},{"type":21,"tag":141,"props":219,"children":221},{"code":220,"language":144,"meta":7,"className":145,"style":7},"$ which pinentry-mac\n/opt/homebrew/bin/pinentry-mac\n",[222],{"type":21,"tag":40,"props":223,"children":224},{"__ignoreMap":7},[225,241],{"type":21,"tag":151,"props":226,"children":227},{"class":153,"line":154},[228,232,237],{"type":21,"tag":151,"props":229,"children":230},{"style":158},[231],{"type":26,"value":161},{"type":21,"tag":151,"props":233,"children":234},{"style":164},[235],{"type":26,"value":236}," which",{"type":21,"tag":151,"props":238,"children":239},{"style":164},[240],{"type":26,"value":177},{"type":21,"tag":151,"props":242,"children":244},{"class":153,"line":243},2,[245],{"type":21,"tag":151,"props":246,"children":247},{"style":158},[248],{"type":26,"value":249},"/opt/homebrew/bin/pinentry-mac\n",{"type":21,"tag":22,"props":251,"children":252},{},[253],{"type":26,"value":254},"Or use your Homebrew prefix.",{"type":21,"tag":141,"props":256,"children":258},{"code":257,"language":144,"meta":7,"className":145,"style":7},"$ echo $(brew --prefix)/bin/pinentry-mac\n/opt/homebrew/bin/pinentry-mac\n",[259],{"type":21,"tag":40,"props":260,"children":261},{"__ignoreMap":7},[262,301],{"type":21,"tag":151,"props":263,"children":264},{"class":153,"line":154},[265,269,274,280,285,291,296],{"type":21,"tag":151,"props":266,"children":267},{"style":158},[268],{"type":26,"value":161},{"type":21,"tag":151,"props":270,"children":271},{"style":164},[272],{"type":26,"value":273}," echo",{"type":21,"tag":151,"props":275,"children":277},{"style":276},"--shiki-default:#24292E",[278],{"type":26,"value":279}," $(",{"type":21,"tag":151,"props":281,"children":282},{"style":158},[283],{"type":26,"value":284},"brew",{"type":21,"tag":151,"props":286,"children":288},{"style":287},"--shiki-default:#005CC5",[289],{"type":26,"value":290}," --prefix",{"type":21,"tag":151,"props":292,"children":293},{"style":276},[294],{"type":26,"value":295},")",{"type":21,"tag":151,"props":297,"children":298},{"style":164},[299],{"type":26,"value":300},"/bin/pinentry-mac\n",{"type":21,"tag":151,"props":302,"children":303},{"class":153,"line":243},[304],{"type":21,"tag":151,"props":305,"children":306},{"style":158},[307],{"type":26,"value":249},{"type":21,"tag":22,"props":309,"children":310},{},[311],{"type":26,"value":312},"But that's all it takes. Now, you should be prompted to enter your gpg pin in an external window when signing commits from vim.",{"type":21,"tag":314,"props":315,"children":316},"style",{},[317],{"type":26,"value":318},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}",{"title":7,"searchDepth":243,"depth":243,"links":320},[321,322],{"id":83,"depth":243,"text":86},{"id":131,"depth":243,"text":134},"markdown","content:articles:vim-fugitive-gpg-pinentry.md","content","articles/vim-fugitive-gpg-pinentry.md","articles/vim-fugitive-gpg-pinentry","md",1735327944760] \ No newline at end of file diff --git a/articles/vim-fugitive-gpg-pinentry/index.html b/articles/vim-fugitive-gpg-pinentry/index.html index da41de2f..873704de 100644 --- a/articles/vim-fugitive-gpg-pinentry/index.html +++ b/articles/vim-fugitive-gpg-pinentry/index.html @@ -1,37 +1,37 @@ Colton Padden - + - - - - - + + + + + - + - - - - - - - - - - - - - + + + + + + + + + + + + + - -
            Category
            Tags

            Using pinentry-mac to sign commits from vim-fugitive

            In order to sign git commits from within Vim using a plugin like tpope/vim-fugitive, it is necessary to configure the gpg-agent to use a GUI based pinentry-program.

            Preface

            The man, the myth, the legend, Timothy Popallopollis himself recommends configuring your gpg-agent to use a GUI based pinentry-program. On macOS this can be done quite by simply installing pinentry-mac, and updating your gpg-agent.conf.

            Configuration

            First things first, let's install the pinentry program.

            $ brew install pinentry-mac
            +
            +
            Category
            Tags

            Using pinentry-mac to sign commits from vim-fugitive

            In order to sign git commits from within Vim using a plugin like tpope/vim-fugitive, it is necessary to configure the gpg-agent to use a GUI based pinentry-program.

            Preface

            The man, the myth, the legend, Timothy Popallopollis himself recommends configuring your gpg-agent to use a GUI based pinentry-program. On macOS this can be done quite by simply installing pinentry-mac, and updating your gpg-agent.conf.

            Configuration

            First things first, let's install the pinentry program.

            $ brew install pinentry-mac
             

            Then, all we need to do is set the pinentry-program option in your ~/.gnupg/gpg-agent.conf file.

            default-cache-ttl 600
             max-cache-ttl 7200
             pinentry-program /opt/homebrew/bin/pinentry-mac
            @@ -39,5 +39,5 @@
             /opt/homebrew/bin/pinentry-mac
             

            Or use your Homebrew prefix.

            $ echo $(brew --prefix)/bin/pinentry-mac
             /opt/homebrew/bin/pinentry-mac
            -

            But that's all it takes. Now, you should be prompted to enter your gpg pin in an external window when signing commits from vim.

            - \ No newline at end of file +

            But that's all it takes. Now, you should be prompted to enter your gpg pin in an external window when signing commits from vim.

            + \ No newline at end of file diff --git a/atom/index.html b/atom/index.html index 1b64ec69..ed91a21b 100644 --- a/atom/index.html +++ b/atom/index.html @@ -2,7 +2,7 @@ https://cmpadden.github.io cmpadden.github.io - 2024-12-27T05:14:44.094Z + 2024-12-27T19:32:23.991Z Nuxt static site generation + Feed for Node.js Colton Padden diff --git a/card/_payload.json b/card/_payload.json index 73f83bd9..2e434b71 100644 --- a/card/_payload.json +++ b/card/_payload.json @@ -1 +1 @@ -[{"data":1,"prerenderedAt":3},["ShallowReactive",2],{},1735276484961] \ No newline at end of file +[{"data":1,"prerenderedAt":3},["ShallowReactive",2],{},1735327944786] \ No newline at end of file diff --git a/card/index.html b/card/index.html index fbd8dedc..7326381a 100644 --- a/card/index.html +++ b/card/index.html @@ -1,16 +1,16 @@ Colton Padden - - - - - - - + + + + + + + - -
            TL;DR
            Name
            Colton
            Profession
            Astronaut
            Hobby
            Skydiving
            - \ No newline at end of file + +
            TL;DR
            Name
            Colton
            Profession
            Astronaut
            Hobby
            Skydiving
            + \ No newline at end of file diff --git a/examples/nested_transitions/_payload.json b/examples/nested_transitions/_payload.json index db1410cd..8e01e5ca 100644 --- a/examples/nested_transitions/_payload.json +++ b/examples/nested_transitions/_payload.json @@ -1 +1 @@ -[{"data":1,"prerenderedAt":3},["ShallowReactive",2],{},1735276484992] \ No newline at end of file +[{"data":1,"prerenderedAt":3},["ShallowReactive",2],{},1735327944873] \ No newline at end of file diff --git a/examples/nested_transitions/index.html b/examples/nested_transitions/index.html index 088e4abb..a467797a 100644 --- a/examples/nested_transitions/index.html +++ b/examples/nested_transitions/index.html @@ -1,16 +1,16 @@ Colton Padden - - - - - - - + + + + + + + - -
            - \ No newline at end of file + +
            + \ No newline at end of file diff --git a/index.html b/index.html index c0d6ede7..976c3e85 100644 --- a/index.html +++ b/index.html @@ -1,20 +1,20 @@ Colton Padden - - - - - - - + + + + + + + - - - + + + - -
            I help educate data engineers while building the future of data orchestration at Dagster.
            Previously, I worked at Gemini building the data platform that provided company-wide insights into the exchange and business. At Georgetown University's Massive Data Institute building data warehousing, processing solutions, and portals to aid social scientists and researchers to leverage large-scale organic data. And previously I provided consulting for financial institutions and government agencies in the D.C. area around data practices, and identity and access management.
            - \ No newline at end of file + +
            I help educate data engineers while building the future of data orchestration at Dagster.
            Previously, I worked at Gemini building the data platform that provided company-wide insights into the exchange and business. At Georgetown University's Massive Data Institute building data warehousing, processing solutions, and portals to aid social scientists and researchers to leverage large-scale organic data. And previously I provided consulting for financial institutions and government agencies in the D.C. area around data practices, and identity and access management.
            + \ No newline at end of file diff --git a/playground/_payload.json b/playground/_payload.json index 11780d26..069578a1 100644 --- a/playground/_payload.json +++ b/playground/_payload.json @@ -1 +1 @@ -[{"data":1,"prerenderedAt":3},["ShallowReactive",2],{},1735276484941] \ No newline at end of file +[{"data":1,"prerenderedAt":3},["ShallowReactive",2],{},1735327944764] \ No newline at end of file diff --git a/playground/audio/_payload.json b/playground/audio/_payload.json index d3fcef4a..21d6397e 100644 --- a/playground/audio/_payload.json +++ b/playground/audio/_payload.json @@ -1 +1 @@ -[{"data":1,"prerenderedAt":3},["ShallowReactive",2],{},1735276484945] \ No newline at end of file +[{"data":1,"prerenderedAt":3},["ShallowReactive",2],{},1735327944768] \ No newline at end of file diff --git a/playground/audio/index.html b/playground/audio/index.html index 15e16867..15858c2a 100644 --- a/playground/audio/index.html +++ b/playground/audio/index.html @@ -1,16 +1,16 @@ Colton Padden - - - - - - - + + + + + + + - -
            Enable
            Disable
            Time Domain Waveform
            Frequency Spectrogram
            Frequency Bar Chart
            Frequency Buffer History
            IndexMeanMinMaxFFTBuffer
            Time Domain Buffer History
            IndexMeanMinMaxFFTBuffer
            - \ No newline at end of file + +
            Enable
            Disable
            Time Domain Waveform
            Frequency Spectrogram
            Frequency Bar Chart
            Frequency Buffer History
            IndexMeanMinMaxFFTBuffer
            Time Domain Buffer History
            IndexMeanMinMaxFFTBuffer
            + \ No newline at end of file diff --git a/playground/chords/_payload.json b/playground/chords/_payload.json index 857e5dc5..bc32aa44 100644 --- a/playground/chords/_payload.json +++ b/playground/chords/_payload.json @@ -1 +1 @@ -[{"data":1,"prerenderedAt":3},["ShallowReactive",2],{},1735276484947] \ No newline at end of file +[{"data":1,"prerenderedAt":3},["ShallowReactive",2],{},1735327944771] \ No newline at end of file diff --git a/playground/chords/index.html b/playground/chords/index.html index b090962e..74be20bc 100644 --- a/playground/chords/index.html +++ b/playground/chords/index.html @@ -1,16 +1,16 @@ Colton Padden - - - - - - - + + + + + + + - -
            Unfortunately, the Web MIDI API is not supported in all browsers...
            - \ No newline at end of file + +
            Unfortunately, the Web MIDI API is not supported in all browsers...
            + \ No newline at end of file diff --git a/playground/conway/_payload.json b/playground/conway/_payload.json index 11780d26..dff97386 100644 --- a/playground/conway/_payload.json +++ b/playground/conway/_payload.json @@ -1 +1 @@ -[{"data":1,"prerenderedAt":3},["ShallowReactive",2],{},1735276484941] \ No newline at end of file +[{"data":1,"prerenderedAt":3},["ShallowReactive",2],{},1735327944765] \ No newline at end of file diff --git a/playground/conway/index.html b/playground/conway/index.html index 9b4ae4d0..c4ab70b1 100644 --- a/playground/conway/index.html +++ b/playground/conway/index.html @@ -1,16 +1,16 @@ Colton Padden - - - - - - - + + + + + + + - -
            - \ No newline at end of file + +
            + \ No newline at end of file diff --git a/playground/french/_payload.json b/playground/french/_payload.json index 48708e4c..1e4b79e3 100644 --- a/playground/french/_payload.json +++ b/playground/french/_payload.json @@ -1 +1 @@ -[{"data":1,"prerenderedAt":3},["ShallowReactive",2],{},1735276484943] \ No newline at end of file +[{"data":1,"prerenderedAt":3},["ShallowReactive",2],{},1735327944767] \ No newline at end of file diff --git a/playground/french/index.html b/playground/french/index.html index 2c587958..7f449639 100644 --- a/playground/french/index.html +++ b/playground/french/index.html @@ -1,18 +1,18 @@ Colton Padden - - - - - + + + + + - - - + + + - -
            1000 French Conjugations
            Loading...
            - \ No newline at end of file + +
            1000 French Conjugations
            Loading...
            + \ No newline at end of file diff --git a/playground/index.html b/playground/index.html index 9ceabd06..94585dd5 100644 --- a/playground/index.html +++ b/playground/index.html @@ -1,17 +1,17 @@ Colton Padden - - - - - - - - + + + + + + + + - -
            - \ No newline at end of file + +
            + \ No newline at end of file diff --git a/playground/matrix/_payload.json b/playground/matrix/_payload.json index 3530c093..009db533 100644 --- a/playground/matrix/_payload.json +++ b/playground/matrix/_payload.json @@ -1 +1 @@ -[{"data":1,"prerenderedAt":3},["ShallowReactive",2],{},1735276485084] \ No newline at end of file +[{"data":1,"prerenderedAt":3},["ShallowReactive",2],{},1735327944886] \ No newline at end of file diff --git a/playground/matrix/index.html b/playground/matrix/index.html index 36ea3d1b..6ebfc39b 100644 --- a/playground/matrix/index.html +++ b/playground/matrix/index.html @@ -1,16 +1,16 @@ Colton Padden - - - - - - - + + + + + + + - -
            Walk through the steps of matrix multiplication with randomly generated matrices. Press the Spacebar or click the buttons to iterate through the steps.
            Matrix A
            Matrix B
            - \ No newline at end of file + +
            Walk through the steps of matrix multiplication with randomly generated matrices. Press the Spacebar or click the buttons to iterate through the steps.
            Matrix A
            Matrix B
            + \ No newline at end of file diff --git a/playground/metronome/_payload.json b/playground/metronome/_payload.json index 00fd31eb..13290b47 100644 --- a/playground/metronome/_payload.json +++ b/playground/metronome/_payload.json @@ -1 +1 @@ -[{"data":1,"prerenderedAt":3},["ShallowReactive",2],{},1735276484942] \ No newline at end of file +[{"data":1,"prerenderedAt":3},["ShallowReactive",2],{},1735327944766] \ No newline at end of file diff --git a/playground/metronome/index.html b/playground/metronome/index.html index 7d5ea453..b1c361a0 100644 --- a/playground/metronome/index.html +++ b/playground/metronome/index.html @@ -1,16 +1,16 @@ Colton Padden - - - - - - - + + + + + + + - -
            - \ No newline at end of file + +
            + \ No newline at end of file diff --git a/playground/midi/_payload.json b/playground/midi/_payload.json index ed626c8e..d01a411b 100644 --- a/playground/midi/_payload.json +++ b/playground/midi/_payload.json @@ -1 +1 @@ -[{"data":1,"prerenderedAt":3},["ShallowReactive",2],{},1735276484948] \ No newline at end of file +[{"data":1,"prerenderedAt":3},["ShallowReactive",2],{},1735327944772] \ No newline at end of file diff --git a/playground/midi/index.html b/playground/midi/index.html index 857cf7e2..0b845806 100644 --- a/playground/midi/index.html +++ b/playground/midi/index.html @@ -1,16 +1,16 @@ Colton Padden - - - - - - - + + + + + + + - -
            Unfortunately, the Web MIDI API is not supported in all browsers...
            - \ No newline at end of file + +
            Unfortunately, the Web MIDI API is not supported in all browsers...
            + \ No newline at end of file diff --git a/playground/palettes/mountains/_payload.json b/playground/palettes/mountains/_payload.json index cfcfac13..1e4b79e3 100644 --- a/playground/palettes/mountains/_payload.json +++ b/playground/palettes/mountains/_payload.json @@ -1 +1 @@ -[{"data":1,"prerenderedAt":3},["ShallowReactive",2],{},1735276484944] \ No newline at end of file +[{"data":1,"prerenderedAt":3},["ShallowReactive",2],{},1735327944767] \ No newline at end of file diff --git a/playground/palettes/mountains/index.html b/playground/palettes/mountains/index.html index 065fc479..7f9818c2 100644 --- a/playground/palettes/mountains/index.html +++ b/playground/palettes/mountains/index.html @@ -1,16 +1,16 @@ Colton Padden - - - - - - - + + + + + + + - -
            Click or tap anywhere to redraw the waves!
            - \ No newline at end of file + +
            Click or tap anywhere to redraw the waves!
            + \ No newline at end of file diff --git a/playground/palettes/variance/_payload.json b/playground/palettes/variance/_payload.json index 40477748..6330449e 100644 --- a/playground/palettes/variance/_payload.json +++ b/playground/palettes/variance/_payload.json @@ -1 +1 @@ -[{"data":1,"prerenderedAt":3},["ShallowReactive",2],{},1735276485156] \ No newline at end of file +[{"data":1,"prerenderedAt":3},["ShallowReactive",2],{},1735327944922] \ No newline at end of file diff --git a/playground/palettes/variance/index.html b/playground/palettes/variance/index.html index 39dda850..d8c61042 100644 --- a/playground/palettes/variance/index.html +++ b/playground/palettes/variance/index.html @@ -1,16 +1,16 @@ Colton Padden - - - - - - - + + + + + + + - -
            - \ No newline at end of file + +
            + \ No newline at end of file diff --git a/playground/plotter/_payload.json b/playground/plotter/_payload.json index 912c1cb3..340348ce 100644 --- a/playground/plotter/_payload.json +++ b/playground/plotter/_payload.json @@ -1 +1 @@ -[{"data":1,"prerenderedAt":3},["ShallowReactive",2],{},1735276485149] \ No newline at end of file +[{"data":1,"prerenderedAt":3},["ShallowReactive",2],{},1735327944919] \ No newline at end of file diff --git a/playground/plotter/index.html b/playground/plotter/index.html index 5edb078f..411f3742 100644 --- a/playground/plotter/index.html +++ b/playground/plotter/index.html @@ -1,16 +1,16 @@ Colton Padden - - - - - - - + + + + + + + - -
            - \ No newline at end of file + +
            + \ No newline at end of file diff --git a/playground/tiling/_payload.json b/playground/tiling/_payload.json index 8098cea5..86a2b3fc 100644 --- a/playground/tiling/_payload.json +++ b/playground/tiling/_payload.json @@ -1 +1 @@ -[{"data":1,"prerenderedAt":3},["ShallowReactive",2],{},1735276485157] \ No newline at end of file +[{"data":1,"prerenderedAt":3},["ShallowReactive",2],{},1735327944923] \ No newline at end of file diff --git a/playground/tiling/index.html b/playground/tiling/index.html index 4f264cfe..ea59162e 100644 --- a/playground/tiling/index.html +++ b/playground/tiling/index.html @@ -1,16 +1,16 @@ Colton Padden - - - - - - - + + + + + + + - -
            m-ary tree based tiling
            - \ No newline at end of file + +
            m-ary tree based tiling
            + \ No newline at end of file diff --git a/playground/waves/_payload.json b/playground/waves/_payload.json index 15989f0e..fe37ab2b 100644 --- a/playground/waves/_payload.json +++ b/playground/waves/_payload.json @@ -1 +1 @@ -[{"data":1,"prerenderedAt":3},["ShallowReactive",2],{},1735276484946] \ No newline at end of file +[{"data":1,"prerenderedAt":3},["ShallowReactive",2],{},1735327944769] \ No newline at end of file diff --git a/playground/waves/index.html b/playground/waves/index.html index c93626c8..06bcdbee 100644 --- a/playground/waves/index.html +++ b/playground/waves/index.html @@ -1,16 +1,16 @@ Colton Padden - - - - - - - + + + + + + + - -
            y(x) = A sin((2π / λ) x)
            y(x) = A cos((2π / λ) x)
            y(x) = A tan((2π / λ) x)
            Click or tap anywhere to clear the canvas!
            - \ No newline at end of file + +
            y(x) = A sin((2π / λ) x)
            y(x) = A cos((2π / λ) x)
            y(x) = A tan((2π / λ) x)
            Click or tap anywhere to clear the canvas!
            + \ No newline at end of file diff --git a/talks/_payload.json b/talks/_payload.json index af9de53c..ccdc114c 100644 --- a/talks/_payload.json +++ b/talks/_payload.json @@ -1 +1 @@ -[{"data":1,"prerenderedAt":3},["ShallowReactive",2],{},1735276485159] \ No newline at end of file +[{"data":1,"prerenderedAt":3},["ShallowReactive",2],{},1735327944975] \ No newline at end of file diff --git a/talks/index.html b/talks/index.html index 7041dc93..2441a9f6 100644 --- a/talks/index.html +++ b/talks/index.html @@ -1,16 +1,16 @@ Colton Padden - - - - - - - + + + + + + + - -

            Talks

            Sep 24, 2024
            Dagster Deep Dive
            Orchestrating ML Workloads with Dagster & Modal
            Aug 06, 2024
            Dagster Deep Dive
            Data Quality: Building Reliable Data Platforms
            Apr 18, 2024
            MotherDuck and Dagster
            From local development to production
            Mar 05, 2024
            Dagster Deep Dive
            Configurations and Resources
            - \ No newline at end of file + +

            Talks

            Sep 24, 2024
            Dagster Deep Dive
            Orchestrating ML Workloads with Dagster & Modal
            Aug 06, 2024
            Dagster Deep Dive
            Data Quality: Building Reliable Data Platforms
            Apr 18, 2024
            MotherDuck and Dagster
            From local development to production
            Mar 05, 2024
            Dagster Deep Dive
            Configurations and Resources
            + \ No newline at end of file