isorite 0.7.0 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/README.md +1 -0
  2. package/dist/main.js +609 -96
  3. package/docs/setup-for-agents.md +3 -0
  4. package/docs/setup.md +20 -0
  5. package/docs/terminal.md +15 -0
  6. package/package.json +1 -1
  7. package/plugin/server.ts +4 -2
  8. package/web/_app/immutable/assets/{0.BKnIhFWM.css → 0.CTbO0owi.css} +1 -1
  9. package/web/_app/immutable/chunks/B-65IYX-.js +6 -0
  10. package/web/_app/immutable/chunks/{62dhNtvj.js → B91efLFT.js} +3 -3
  11. package/web/_app/immutable/chunks/{Cn-vtDpV.js → BjPiibIz.js} +1 -1
  12. package/web/_app/immutable/chunks/{BNjH_DUx.js → BrXPCJaM.js} +1 -1
  13. package/web/_app/immutable/chunks/{B7GA1FFB.js → BtUtjfIh.js} +1 -1
  14. package/web/_app/immutable/chunks/{CYNZ4aV_.js → CCiHXe5d.js} +1 -1
  15. package/web/_app/immutable/chunks/{DHfKGggc.js → CGzfi9Nl.js} +1 -1
  16. package/web/_app/immutable/chunks/CnP_Si9g.js +1 -0
  17. package/web/_app/immutable/chunks/{CWmfjLLv.js → D_JZ0swv.js} +1 -1
  18. package/web/_app/immutable/chunks/{WBFggAXs.js → DgZW3JtG.js} +1 -1
  19. package/web/_app/immutable/chunks/{CVbgxz8Y.js → Di_ac7WN.js} +1 -1
  20. package/web/_app/immutable/chunks/{DsBJWNWe.js → NmqB5ax3.js} +1 -1
  21. package/web/_app/immutable/chunks/{BoNMG-YE.js → dvrIP-Hm.js} +1 -1
  22. package/web/_app/immutable/chunks/hOAYc4Tf.js +1 -0
  23. package/web/_app/immutable/entry/{app.Dt52eXt2.js → app.DO9lj7h3.js} +2 -2
  24. package/web/_app/immutable/entry/start.Bg5TZs6n.js +1 -0
  25. package/web/_app/immutable/nodes/0.N1e1uAFq.js +26 -0
  26. package/web/_app/immutable/nodes/{1.B5qkcrvB.js → 1.BRTPLKyU.js} +1 -1
  27. package/web/_app/immutable/nodes/2.BWh1AYEd.js +1 -0
  28. package/web/_app/immutable/nodes/3.Cgqgn7Zv.js +1 -0
  29. package/web/_app/immutable/nodes/{4.BhNJiqT-.js → 4.DYW7Fxdy.js} +1 -1
  30. package/web/_app/immutable/nodes/{5.DXTbGemS.js → 5.Dkvkif0E.js} +1 -1
  31. package/web/_app/immutable/nodes/6.BinB0fuq.js +1 -0
  32. package/web/_app/version.json +1 -1
  33. package/web/index.html +15 -15
  34. package/web/_app/immutable/chunks/B3dCo0od.js +0 -1
  35. package/web/_app/immutable/chunks/D6Vzg2HD.js +0 -6
  36. package/web/_app/immutable/chunks/DkvLWnSd.js +0 -1
  37. package/web/_app/immutable/entry/start.mjqIl2PI.js +0 -1
  38. package/web/_app/immutable/nodes/0.DIhIOwuo.js +0 -26
  39. package/web/_app/immutable/nodes/2.CK3q7brK.js +0 -1
  40. package/web/_app/immutable/nodes/3.CrUewa31.js +0 -1
  41. package/web/_app/immutable/nodes/6.BZWaFgFP.js +0 -1
@@ -0,0 +1,6 @@
1
+ import{$ as e,A as t,B as n,D as r,E as i,F as a,H as o,J as s,L as c,O as l,P as u,Q as d,S as f,T as p,U as m,X as h,Y as g,_,at as v,dt as y,f as ee,h as b,i as x,j as S,k as C,n as w,ot as T,q as E,rt as te,s as ne,tt as D,u as re,x as ie,z as ae}from"./nMarIA7J.js";import{t as O}from"./BrXPCJaM.js";import"./xihTtKlq.js";import{A as k,C as oe,D as se,F as ce,S as le,_ as ue,a as de,b as fe,c as pe,f as me,h as he,i as ge,k as _e,m as ve,n as ye,o as be,p as xe,r as Se,s as Ce,t as we,u as Te,v as Ee,y as De}from"./B91efLFT.js";import{a as Oe,n as ke,r as Ae,s as je,t as A}from"./CnP_Si9g.js";import{i as Me}from"./hOAYc4Tf.js";import{B as Ne,D as j,E as Pe,F as M,G as Fe,H as Ie,I as Le,J as N,K as Re,L as P,M as F,N as I,P as ze,R as Be,S as Ve,W as He,X as Ue,Y as We,at as Ge,ct as Ke,et as qe,it as Je,lt as Ye,mt as Xe,n as Ze,nt as L,rt as R,t as Qe,ut as $e,v as et,w as tt,x as nt,y as rt}from"./BxTFtVqu.js";import{i as it,l as at,n as ot,o as st,r as ct}from"./yxd8jSz3.js";var lt=class{note;#e=e([]);get entries(){return c(this.#e)}set entries(e){d(this.#e,e)}#t=e(null);get prompt(){return c(this.#t)}set prompt(e){d(this.#t,e)}#n=e(null);get asking(){return c(this.#n)}set asking(e){d(this.#n,e)}#r=e(null);get failed(){return c(this.#r)}set failed(e){d(this.#r,e)}get tier(){return xe.tier}#i=e(null);get cursor(){return c(this.#i)}set cursor(e){d(this.#i,e)}#a=e(``);get busy(){return c(this.#a)}set busy(e){d(this.#a,e,!0)}#o=e(null);get editing(){return c(this.#o)}set editing(e){d(this.#o,e,!0)}stop=null;constructor(e){this.note=e}#s=D(()=>oe(this.entries));get waiting(){return c(this.#s)}set waiting(e){d(this.#s,e)}#c=D(()=>this.waiting.filter(e=>e.form===`insert`));get proposals(){return c(this.#c)}set proposals(e){d(this.#c,e)}#l=D(()=>{let e=[],t=se(this.note.text);for(let n of this.waiting)if(n.form===`rewrite`)for(let r of n.open??[]){let i=n.regions[r],a=ue(this.note.text,i.old),o=a?this.note.text.slice(0,a.from).split(`
2
+ `).length-1:-1,s=t.find(e=>e.from<=o&&o<e.to);e.push({key:`r:${n.id}:${r}`,proposal:n,k:r,at:a,block:/\n/.test(i.old.text.trim())||/\n/.test(i.new.trim()),code:!!(s&&/^\s*(```|~~~)/.test(s.text))})}return e.sort((e,t)=>(e.at?.from??1/0)-(t.at?.from??1/0))});get changes(){return c(this.#l)}set changes(e){d(this.#l,e)}#u=D(()=>{try{let e=k(this.note.text)[0];return{lines:e.split(`
3
+ `).length-1,chars:e.length}}catch{return{lines:0,chars:0}}});get head(){return c(this.#u)}set head(e){d(this.#u,e)}get foot(){return this.note.text.split(`
4
+ `).length}spans(e){return e.flatMap(e=>{let t=ue(this.note.text,e);return t?[t]:[]})}placed(e){return fe(this.note.text,e)!==null}#d=D(()=>{let e=[];for(let t of this.proposals){let n=fe(this.note.text,t);e.push({key:`p:${t.id}`,line:n?.form===`insert`?n.line:this.foot})}this.changes.some(e=>!e.at)&&e.push({key:`lost`,line:this.foot}),this.asking&&e.push({key:`asking`,line:this.asking.line}),this.failed&&e.push({key:`failed`,line:this.failed.line}),this.prompt&&e.push({key:`prompt`,line:this.prompt.line});let t=this.changes.filter(e=>e.at);for(let n of t)n.block&&e.push({key:n.key,line:this.note.text.slice(0,n.at.to).split(`
5
+ `).length});return{blocks:e,picked:this.spans(this.prompt?.regions??this.asking?.regions??[]),old:t.map(e=>e.at),inline:t.filter(e=>!e.block).map(e=>({key:e.key,at:e.at.to}))}});get layout(){return c(this.#d)}set layout(e){d(this.#d,e)}async open(){this.stop=A.on(e=>this.hear(e));let e=A.iso;e?.start&&e.note===this.note.id&&(e.state===`reading`||e.state===`writing`)&&(this.hear(e.start),this.asking&&={...this.asking,text:e.text??``,steps:e.steps});try{this.entries=await A.api.journal(this.note.id)}catch{}}close(){this.stop?.()}hear(e){if(e.type===`journal`){if(e.id!==this.note.id||this.entries.some(t=>t.id===e.entry.id))return;this.entries=[...this.entries,e.entry];let t=e.entry.kind===`discard`||e.entry.kind===`change`?e.entry.proposal:void 0;t&&this.editing?.id===t&&(this.editing=null);return}if(e.type===`note-changed`||e.type===`record`||e.type===`agent-sent`||!(`note`in e)||e.note!==this.note.id)return;if(e.type===`iso-start`){if(this.asking&&!this.asking.request){this.asking={...this.asking,request:e.request};return}let t=this.foot;if(e.place.form===`insert`||e.place.form===`rewrite`){let n=fe(this.note.text,{form:`insert`,after:e.place.after,before:e.place.before});n?.form===`insert`&&(t=n.line)}this.asking={request:e.request,asked:e.asked,line:t,regions:e.place.form===`rewrite`?e.place.regions:[],text:``,steps:[]},this.failed=null,this.prompt=null;return}let t=this.asking;t&&t.request===e.request&&(e.type===`iso-text`?this.asking={...t,text:e.again?e.delta:t.text+e.delta}:e.type===`iso-step`?this.asking={...t,text:``,steps:[...t.steps,e.step]}:(e.type===`iso-failed`&&(this.failed={line:t.line,message:e.message}),this.asking=null))}promptAt(e,t){let n=se(this.note.text).find(t=>t.from<=e&&e<t.to);this.failed=null,this.prompt={line:n?n.to:e,mode:`insert`,regions:[]},t&&t.to>t.from&&(this.setMode(`rewrite`),this.pick([t]))}promptHere(){let e=this.cursor;e?this.promptAt(e.line,e):this.promptAt(this.foot)}askAt(e,t){if(t&&t.to>t.from){this.promptAt(e,t);return}let n=se(this.note.text).find(t=>t.from<=e&&e<t.to),r=n?.text.trim()??``;!n||!r||/^(```|~~~|\$\$|\|)/.test(r)?this.promptAt(e):(this.failed=null,this.prompt={line:n.to,mode:`insert`,regions:[]},this.ask(r))}askHere(){let e=this.cursor;e?this.askAt(e.line,e):this.promptAt(this.foot)}setMode(e){this.prompt&&={...this.prompt,mode:e}}get picking(){return this.prompt?.mode===`rewrite`}pick(e){let t=this.prompt;if(!t)return;let n=this.note.text,r=this.spans(t.regions);for(let t of e){let{from:e,to:i}=t;for(;e<i&&/\s/.test(n[e]);)e++;for(;i>e&&/\s/.test(n[i-1]);)i--;if(i<=e||e<this.head.chars)continue;let a=r.filter(t=>t.from<=i&&e<=t.to);r=[...r.filter(e=>!a.includes(e)),{from:Math.min(e,...a.map(e=>e.from)),to:Math.max(i,...a.map(e=>e.to))}]}r.sort((e,t)=>e.from-t.from),this.prompt={...t,regions:r.map(e=>le(n,e.from,e.to))}}unpick(e){let t=this.prompt;if(!t)return;let n=t.regions.filter(t=>{let n=ue(this.note.text,t);return!n||e<n.from||e>=n.to});n.length!==t.regions.length&&(this.prompt={...t,regions:n})}clearPicked(){this.prompt&&={...this.prompt,regions:[]}}setTier(e){xe.setTier(e)}async ask(e){let t=this.prompt;if(!t||!e.trim()||this.asking||t.mode===`rewrite`&&!t.regions.length)return;let n=t.mode===`rewrite`?t.regions:[];this.prompt=null,this.failed=null,this.asking={request:``,asked:e,line:t.line,regions:n,text:``,steps:[]};try{await this.note.save();let r=De(this.note.text,t.line),i=xe.of(this.note.id),a=Object.keys(i).length?{choice:i}:{},{request:o}=await A.api.ask(n.length?{note:this.note.id,form:`rewrite`,regions:n,after:r.after,before:r.before,asked:e,tier:this.tier,...a}:{note:this.note.id,...r,asked:e,tier:this.tier,...a});this.asking&&!this.asking.request&&(this.asking={...this.asking,request:o})}catch(e){this.asking=null,this.failed={line:t.line,message:e.message}}}async send(){if(this.asking)return``;this.failed=null,this.asking={request:``,asked:``,line:this.foot,regions:[],text:``,steps:[]};try{await this.note.save();let{request:e}=await A.api.ask({note:this.note.id,form:`note`,tier:this.tier});return this.asking&&!this.asking.request&&(this.asking={...this.asking,request:e}),e}catch(e){return this.asking=null,this.failed={line:this.foot,message:e.message},``}}halt(){let e=this.asking;if(!e)return;if(e.request){A.api.stop(e.request);return}let t=A.on(e=>{e.type===`iso-start`&&e.note===this.note.id&&(t(),A.api.stop(e.request))})}say(e,t){this.failed={line:e??this.foot,message:t.message}}lineOf(e){return this.layout.blocks.find(t=>t.key===`p:${e.id}`)?.line}edit(e){this.editing={id:e.id,text:e.text}}async done(e){let t=this.editing;if(t?.id===e.id)try{await A.api.revise(this.note.id,e.id,t.text),this.editing=null}catch(t){this.say(this.lineOf(e),t)}}async keep(e){this.busy=e.id;try{await this.note.save(),this.editing?.id===e.id&&await this.done(e),this.note.adopt(await A.api.keep(this.note.id,e.id))}catch(t){this.say(this.lineOf(e),t)}finally{this.busy=``}}async discard(e){this.busy=e.id;try{await A.api.discard(this.note.id,e.id)}catch(t){this.say(this.lineOf(e),t)}finally{this.busy=``}}async keepChange(e){this.busy=e.key;try{await this.note.save(),this.note.adopt(await A.api.keep(this.note.id,e.proposal.id,e.k))}catch(e){this.say(void 0,e)}finally{this.busy=``}}async discardChange(e){this.busy=e.key;try{await A.api.discard(this.note.id,e.proposal.id,e.k)}catch(e){this.say(void 0,e)}finally{this.busy=``}}async settleAll(e){this.busy=`all`;try{e&&await this.note.save();for(let t of[...this.changes].reverse())(!e||t.at)&&(e?this.note.adopt(await A.api.keep(this.note.id,t.proposal.id,t.k)):await A.api.discard(this.note.id,t.proposal.id,t.k))}catch(e){this.say(void 0,e)}finally{this.busy=``}}},ut=1500,dt=e=>je(`isorite.draft.${e}`);function ft(e,t){try{if(t===void 0)return JSON.parse(localStorage.getItem(dt(e))??`null`);t?localStorage.setItem(dt(e),JSON.stringify(t)):localStorage.removeItem(dt(e))}catch{}return null}var pt=e=>typeof e==`string`?e:e==null?``:String(e),mt=class{id;#e=e(`loading`);get loaded(){return c(this.#e)}set loaded(e){d(this.#e,e,!0)}#t=e(`saved`);get saving(){return c(this.#t)}set saving(e){d(this.#t,e,!0)}#n=e(``);get message(){return c(this.#n)}set message(e){d(this.#n,e,!0)}#r=e(``);get text(){return c(this.#r)}set text(e){d(this.#r,e,!0)}#i=e(void 0);get theirs(){return c(this.#i)}set theirs(e){d(this.#i,e)}#a=e(0);get revision(){return c(this.#a)}set revision(e){d(this.#a,e,!0)}base=``;saved=``;timer=null;inFlight=null;stop=null;constructor(e){this.id=e}#o=D(()=>{try{return ce(this.text)[0]??{}}catch{return null}});get meta(){return c(this.#o)}set meta(e){d(this.#o,e)}#s=D(()=>{let e=this.meta??{};return{title:pt(e.title),type:pt(e.type),description:pt(e.description),tags:Array.isArray(e.tags)?e.tags.map(String).join(`, `):pt(e.tags)}});get fields(){return c(this.#s)}set fields(e){d(this.#s,e)}#c=D(()=>{try{return k(this.text)[2]}catch{return this.text}});get body(){return c(this.#c)}set body(e){d(this.#c,e)}async open(){try{let e=await A.api.readNote(this.id),t=ft(this.id);this.take(e),t&&t.text!==e.text&&(this.text=t.text,t.base===e.version?this.changed():(this.theirs=e,this.saving=`conflict`,ft(this.id,t))),this.loaded=`ready`,this.stop=A.on(e=>this.hear(e))}catch(e){this.loaded=e instanceof Oe&&e.status===404?`missing`:`error`,this.message=e.message}}async close(){this.stop?.(),await this.save()}adopt(e){this.take(e)}async restore(e){await this.settle(),this.take(await A.api.restore(this.id,e,this.base))}async move(e){await this.settle();let t=await A.api.moveNote(this.id,e,this.base);return this.stop?.(),t.id}async setDone(e){await this.settle(),this.take(await A.api.setDone(this.id,e,this.base)),await A.refresh()}async remove(){await this.settle(),await A.api.deleteNote(this.id,this.base),this.stop?.()}async settle(){if(this.saving!==`saved`&&await this.save(),this.saving!==`saved`)throw Error(this.message||`the note could not be saved first`)}take(e){this.text=this.saved=e.text,this.base=e.version,this.theirs=void 0,this.saving=`saved`,this.message=``,ft(this.id,null),this.revision++}setText(e){e!==this.text&&(this.text=e,this.changed())}setBody(e){e!==this.body&&this.setText(_e(this.text,{},e))}setFields(e){let t={};for(let[n,r]of Object.entries(e)){let e=r.trim();t[n]=n===`tags`?e?e.split(`,`).map(e=>e.trim()).filter(Boolean):null:e||null}this.setMeta(t)}setMeta(e){try{this.setText(_e(this.text,e,null))}catch{}}changed(){ft(this.id,{base:this.base,text:this.text}),this.saving!==`conflict`&&(this.saving=`unsaved`,this.timer&&clearTimeout(this.timer),this.timer=setTimeout(()=>{this.save()},ut))}save(){return this.timer&&=(clearTimeout(this.timer),null),this.inFlight=(this.inFlight??Promise.resolve()).then(()=>this.send()),this.inFlight}async send(){if(this.loaded!==`ready`||this.saving===`conflict`||this.text===this.saved)return;let e=this.text;this.saving=`saving`;try{let t=await A.api.saveNote(this.id,{base:this.base,text:e});this.base=t.version,this.saved=e,this.message=``,this.text===e?(this.saving=`saved`,ft(this.id,null)):this.changed()}catch(t){if(t instanceof Oe&&t.status===409&&t.current!==void 0){if(t.current?.text===e)return this.take(t.current);this.theirs=t.current,this.saving=`conflict`}else this.saving=`failed`,this.message=t.message,this.timer=setTimeout(()=>{this.save()},5e3)}}hear(e){e.type===`note-changed`&&e.id===this.id&&e.version!==this.base&&e.version!==Ee(this.text)&&this.saving===`saved`&&A.api.readNote(this.id).then(e=>{this.saving===`saved`&&e.version!==this.base&&this.take(e)},()=>void 0)}keepMine(){let e=this.theirs;return e===void 0?Promise.resolve():(this.theirs=void 0,this.saving=`unsaved`,e===null?A.api.createNote(this.id,this.text).then(e=>this.take(e),e=>{this.saving=`failed`,this.message=e.message}):(this.base=e.version,this.saved=e.text,this.save()))}keepTheirs(){this.theirs&&this.take(this.theirs)}},ht=e=>{let{state:t}=e,n=t.doc.lineAt(t.selection.main.from),r=bt(e.state,n.from);return r.line?_t(e):r.block?yt(e):!1};function gt(e,t){return({state:n,dispatch:r})=>{if(n.readOnly)return!1;let i=e(t,n);return i?(r(n.update(i)),!0):!1}}var _t=gt(Tt,0),vt=gt(wt,0),yt=gt((e,t)=>wt(e,t,Ct(t)),0);function bt(e,t){let n=e.languageDataAt(`commentTokens`,t,1);return n.length?n[0]:{}}var xt=50;function St(e,{open:t,close:n},r,i){let a=e.sliceDoc(r-xt,r),o=e.sliceDoc(i,i+xt),s=/\s*$/.exec(a)[0].length,c=/^\s*/.exec(o)[0].length,l=a.length-s;if(a.slice(l-t.length,l)==t&&o.slice(c,c+n.length)==n)return{open:{pos:r-s,margin:s&&1},close:{pos:i+c,margin:c&&1}};let u,d;i-r<=100?u=d=e.sliceDoc(r,i):(u=e.sliceDoc(r,r+xt),d=e.sliceDoc(i-xt,i));let f=/^\s*/.exec(u)[0].length,p=/\s*$/.exec(d)[0].length,m=d.length-p-n.length;return u.slice(f,f+t.length)==t&&d.slice(m,m+n.length)==n?{open:{pos:r+f+t.length,margin:+!!/\s/.test(u.charAt(f+t.length))},close:{pos:i-p-n.length,margin:+!!/\s/.test(d.charAt(m-1))}}:null}function Ct(e){let t=[];for(let n of e.selection.ranges){let r=e.doc.lineAt(n.from),i=n.to<=r.to?r:e.doc.lineAt(n.to);i.from>r.from&&i.from==n.to&&(i=n.to==r.to+1?r:e.doc.lineAt(n.to-1));let a=t.length-1;a>=0&&t[a].to>r.from?t[a].to=i.to:t.push({from:r.from+/^\s*/.exec(r.text)[0].length,to:i.to})}return t}function wt(e,t,n=t.selection.ranges){let r=n.map(e=>bt(t,e.from).block);if(!r.every(e=>e))return null;let i=n.map((e,n)=>St(t,r[n],e.from,e.to));if(e!=2&&!i.every(e=>e))return{changes:t.changes(n.map((e,t)=>i[t]?[]:[{from:e.from,insert:r[t].open+` `},{from:e.to,insert:` `+r[t].close}]))};if(e!=1&&i.some(e=>e)){let e=[];for(let t=0,n;t<i.length;t++)if(n=i[t]){let i=r[t],{open:a,close:o}=n;e.push({from:a.pos-i.open.length,to:a.pos+a.margin},{from:o.pos-o.margin,to:o.pos+i.close.length})}return{changes:e}}return null}function Tt(e,t,n=t.selection.ranges){let r=[],i=-1;ranges:for(let{from:e,to:a}of n){let n=r.length,o=1e9,s;for(let n=e;n<=a;){let c=t.doc.lineAt(n);if(s==null&&(s=bt(t,c.from).line,!s))continue ranges;if(c.from>i&&(e==a||a>c.from)){i=c.from;let e=/^\s*/.exec(c.text)[0].length,t=e==c.length,n=c.text.slice(e,e+s.length)==s?e:-1;e<c.text.length&&e<o&&(o=e),r.push({line:c,comment:n,token:s,indent:e,empty:t,single:!1})}n=c.to+1}if(o<1e9)for(let e=n;e<r.length;e++)r[e].indent<r[e].line.text.length&&(r[e].indent=o);r.length==n+1&&(r[n].single=!0)}if(e!=2&&r.some(e=>e.comment<0&&(!e.empty||e.single))){let e=[];for(let{line:t,token:n,indent:i,empty:a,single:o}of r)(o||!a)&&e.push({from:t.from+i,insert:n+` `});let n=t.changes(e);return{changes:n,selection:t.selection.map(n,1)}}if(e!=1&&r.some(e=>e.comment>=0)){let e=[];for(let{line:t,comment:n,token:i}of r)if(n>=0){let r=t.from+n,a=r+i.length;t.text[a-t.from]==` `&&a++,e.push({from:r,to:a})}return{changes:e}}return null}var Et=He.define(),Dt=He.define(),Ot=Ue.define(),kt=Ue.define({combine(e){return Ke(e,{minDepth:100,newGroupDelay:500,joinToEvent:(e,t)=>t},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,t)=>(n,r)=>e(n,r)||t(n,r)})}}),At=R.define({create(){return qt.empty},update(e,t){let n=t.state.facet(kt),r=t.annotation(Et);if(r){let i=z.fromTransaction(t,r.selection),a=r.side,o=a==0?e.undone:e.done;return o=i?Lt(o,o.length,n.minDepth,i):Ht(o,t.startState.selection),new qt(a==0?r.rest:o,a==0?o:r.rest)}let i=t.annotation(Dt);if((i==`full`||i==`before`)&&(e=e.isolate()),t.annotation(Ge.addToHistory)===!1)return t.changes.empty?e:e.addMapping(t.changes.desc);let a=z.fromTransaction(t),o=t.annotation(Ge.time),s=t.annotation(Ge.userEvent);return a?e=e.addChanges(a,o,s,n,t):t.selection&&(e=e.addSelection(t.startState.selection,o,s,n.newGroupDelay)),(i==`full`||i==`after`)&&(e=e.isolate()),e},toJSON(e){return{done:e.done.map(e=>e.toJSON()),undone:e.undone.map(e=>e.toJSON())}},fromJSON(e){return new qt(e.done.map(z.fromJSON),e.undone.map(z.fromJSON))}});function jt(e={}){return[At,kt.of(e),M.domEventHandlers({beforeinput(e,t){let n=e.inputType==`historyUndo`?Nt:e.inputType==`historyRedo`?Pt:null;return n?(e.preventDefault(),n(t)):!1}})]}function Mt(e,t){return function({state:n,dispatch:r}){if(!t&&n.readOnly)return!1;let i=n.field(At,!1);if(!i)return!1;let a=i.pop(e,n,t);return a?(r(a),!0):!1}}var Nt=Mt(0,!1),Pt=Mt(1,!1),Ft=Mt(0,!0),It=Mt(1,!0),z=class e{constructor(e,t,n,r,i){this.changes=e,this.effects=t,this.mapped=n,this.startSelection=r,this.selectionsAfter=i}setSelAfter(t){return new e(this.changes,this.effects,this.mapped,this.startSelection,t)}toJSON(){return{changes:this.changes?.toJSON(),mapped:this.mapped?.toJSON(),startSelection:this.startSelection?.toJSON(),selectionsAfter:this.selectionsAfter.map(e=>e.toJSON())}}static fromJSON(t){return new e(t.changes&&Re.fromJSON(t.changes),[],t.mapped&&Fe.fromJSON(t.mapped),t.startSelection&&N.fromJSON(t.startSelection),t.selectionsAfter.map(N.fromJSON))}static fromTransaction(t,n){let r=B;for(let e of t.startState.facet(Ot)){let n=e(t);n.length&&(r=r.concat(n))}return!r.length&&t.changes.empty?null:new e(t.changes.invert(t.startState.doc),r,void 0,n||t.startState.selection,B)}static selection(t){return new e(void 0,B,void 0,void 0,t)}};function Lt(e,t,n,r){let i=t+1>n+20?t-n-1:0,a=e.slice(i,t);return a.push(r),a}function Rt(e,t){let n=[],r=!1;return e.iterChangedRanges((e,t)=>n.push(e,t)),t.iterChangedRanges((e,t,i,a)=>{for(let e=0;e<n.length;){let t=n[e++],o=n[e++];a>=t&&i<=o&&(r=!0)}}),r}function zt(e,t){return e.ranges.length==t.ranges.length&&e.ranges.filter((e,n)=>e.empty!=t.ranges[n].empty).length===0}function Bt(e,t){return e.length?t.length?e.concat(t):e:t}var B=[],Vt=200;function Ht(e,t){if(e.length){let n=e[e.length-1],r=n.selectionsAfter.slice(Math.max(0,n.selectionsAfter.length-Vt));return r.length&&r[r.length-1].eq(t)?e:(r.push(t),Lt(e,e.length-1,1e9,n.setSelAfter(r)))}return[z.selection([t])]}function Ut(e){let t=e[e.length-1],n=e.slice();return n[e.length-1]=t.setSelAfter(t.selectionsAfter.slice(0,t.selectionsAfter.length-1)),n}function Wt(e,t){if(!e.length)return e;let n=e.length,r=B;for(;n;){let i=Gt(e[n-1],t,r);if(i.changes&&!i.changes.empty||i.effects.length){let t=e.slice(0,n);return t[n-1]=i,t}t=i.mapped,n--,r=i.selectionsAfter}return r.length?[z.selection(r)]:B}function Gt(e,t,n){let r=Bt(e.selectionsAfter.length?e.selectionsAfter.map(e=>e.map(t)):B,n);if(!e.changes)return z.selection(r);let i=e.changes.map(t),a=t.mapDesc(e.changes,!0),o=e.mapped?e.mapped.composeDesc(a):a;return new z(i,L.mapEffects(e.effects,t),o,e.startSelection.map(a),r)}var Kt=/^(input\.type|delete)($|\.)/,qt=class e{constructor(e,t,n=0,r=void 0){this.done=e,this.undone=t,this.prevTime=n,this.prevUserEvent=r}isolate(){return this.prevTime?new e(this.done,this.undone):this}addChanges(t,n,r,i,a){let o=this.done,s=o[o.length-1];return o=s&&s.changes&&!s.changes.empty&&t.changes&&(!r||Kt.test(r))&&(!s.selectionsAfter.length&&n-this.prevTime<i.newGroupDelay&&i.joinToEvent(a,Rt(s.changes,t.changes))||r==`input.type.compose`)?Lt(o,o.length-1,i.minDepth,new z(t.changes.compose(s.changes),Bt(L.mapEffects(t.effects,s.changes),s.effects),s.mapped,s.startSelection,B)):Lt(o,o.length,i.minDepth,t),new e(o,B,n,r)}addSelection(t,n,r,i){let a=this.done.length?this.done[this.done.length-1].selectionsAfter:B;return a.length>0&&n-this.prevTime<i&&r==this.prevUserEvent&&r&&/^select($|\.)/.test(r)&&zt(a[a.length-1],t)?this:new e(Ht(this.done,t),this.undone,n,r)}addMapping(t){return new e(Wt(this.done,t),Wt(this.undone,t),this.prevTime,this.prevUserEvent)}pop(e,t,n){let r=e==0?this.done:this.undone;if(r.length==0)return null;let i=r[r.length-1],a=i.selectionsAfter[0]||(i.startSelection?i.startSelection.map(i.changes.invertedDesc,1):t.selection);if(n&&i.selectionsAfter.length)return t.update({selection:i.selectionsAfter[i.selectionsAfter.length-1],annotations:Et.of({side:e,rest:Ut(r),selection:a}),userEvent:e==0?`select.undo`:`select.redo`,scrollIntoView:!0});if(i.changes){let n=r.length==1?B:r.slice(0,r.length-1);return i.mapped&&(n=Wt(n,i.mapped)),t.update({changes:i.changes,selection:i.startSelection,effects:i.effects,annotations:Et.of({side:e,rest:n,selection:a}),filter:!1,userEvent:e==0?`undo`:`redo`,scrollIntoView:!0})}return null}};qt.empty=new qt(B,B);var Jt=[{key:`Mod-z`,run:Nt,preventDefault:!0},{key:`Mod-y`,mac:`Mod-Shift-z`,run:Pt,preventDefault:!0},{linux:`Ctrl-Shift-z`,run:Pt,preventDefault:!0},{key:`Mod-u`,run:Ft,preventDefault:!0},{key:`Alt-u`,mac:`Mod-Shift-u`,run:It,preventDefault:!0}];function V(e,t){return N.create(e.ranges.map(t),e.mainIndex)}function H(e,t){return e.update({selection:t,scrollIntoView:!0,userEvent:`select`})}function U({state:e,dispatch:t},n){let r=V(e.selection,n);return!r.eq(e.selection,!0)&&(t(H(e,r)),!0)}function Yt(e,t){return N.cursor(t?e.to:e.from)}function Xt(e,t){return U(e,n=>n.empty?e.moveByChar(n,t):Yt(n,t))}function W(e){return e.textDirectionAt(e.state.selection.main.head)==ze.LTR}var Zt=e=>Xt(e,!W(e)),Qt=e=>Xt(e,W(e));function $t(e,t){return U(e,n=>n.empty?e.moveByGroup(n,t):Yt(n,t))}var en=e=>$t(e,!W(e)),tn=e=>$t(e,W(e));typeof Intl<`u`&&Intl.Segmenter;function nn(e,t,n){if(t.type.prop(n))return!0;let r=t.to-t.from;return r&&(r>2||/[^\s,.;:]/.test(e.sliceDoc(t.from,t.to)))||t.firstChild}function rn(e,t,n){let r=j(e).resolveInner(t.head),i=n?Xe.closedBy:Xe.openedBy;for(let a=t.head;;){let t=n?r.childAfter(a):r.childBefore(a);if(!t)break;nn(e,t,i)?r=t:a=n?t.to:t.from}let a=r.type.prop(i),o,s;return s=a&&(o=n?tt(e,r.from,1):tt(e,r.to,-1))&&o.matched?n?o.end.to:o.end.from:n?r.to:r.from,N.cursor(s,n?-1:1)}var an=e=>U(e,t=>rn(e.state,t,!W(e))),on=e=>U(e,t=>rn(e.state,t,W(e)));function sn(e,t){return U(e,n=>{if(!n.empty)return Yt(n,t);let r=e.moveVertically(n,t);return r.head==n.head?e.moveToLineBoundary(n,t):r})}var cn=e=>sn(e,!1),ln=e=>sn(e,!0);function un(e){let t=e.scrollDOM.clientHeight<e.scrollDOM.scrollHeight-2,n=0,r=0,i;if(t){for(let t of e.state.facet(M.scrollMargins)){let i=t(e);i?.top&&(n=Math.max(i?.top,n)),i?.bottom&&(r=Math.max(i?.bottom,r))}i=e.scrollDOM.clientHeight-n-r}else i=(e.dom.ownerDocument.defaultView||window).innerHeight;return{marginTop:n,marginBottom:r,selfScroll:t,height:Math.max(e.defaultLineHeight,i-5)}}function dn(e,t){let n=un(e),{state:r}=e,i=V(r.selection,r=>r.empty?e.moveVertically(r,t,n.height):Yt(r,t));if(i.eq(r.selection))return!1;let a;if(n.selfScroll){let t=e.coordsAtPos(r.selection.main.head),o=e.scrollDOM.getBoundingClientRect(),s=o.top+n.marginTop,c=o.bottom-n.marginBottom;t&&t.top>s&&t.bottom<c&&(a=M.scrollIntoView(i.main.head,{y:`start`,yMargin:t.top-s}))}return e.dispatch(H(r,i),{effects:a}),!0}var fn=e=>dn(e,!1),pn=e=>dn(e,!0);function G(e,t,n){let r=e.lineBlockAt(t.head),i=e.moveToLineBoundary(t,n);if(i.head==t.head&&i.head!=(n?r.to:r.from)&&(i=e.moveToLineBoundary(t,n,!1)),!n&&i.head==r.from&&r.length){let n=/^\s*/.exec(e.state.sliceDoc(r.from,Math.min(r.from+100,r.to)))[0].length;n&&t.head!=r.from+n&&(i=N.cursor(r.from+n))}return i}var mn=e=>U(e,t=>G(e,t,!0)),hn=e=>U(e,t=>G(e,t,!1)),gn=e=>U(e,t=>G(e,t,!W(e))),_n=e=>U(e,t=>G(e,t,W(e))),vn=e=>U(e,t=>e.moveToLineBoundary(t,!1,!1)),yn=e=>U(e,t=>e.moveToLineBoundary(t,!0,!1));function bn(e,t,n){let r=!1,i=V(e.selection,t=>{let i=tt(e,t.head,-1)||tt(e,t.head,1)||t.head>0&&tt(e,t.head-1,1)||t.head<e.doc.length&&tt(e,t.head+1,-1);if(!i||!i.end)return t;r=!0;let a=i.start.from==t.head?i.end.to:i.end.from;return n?N.range(t.anchor,a):N.cursor(a)});return r?(t(H(e,i)),!0):!1}var xn=({state:e,dispatch:t})=>bn(e,t,!1);function K(e,t,n){let r=V(e.state.selection,e=>{e.undirectional&&e.head>=e.anchor!=t&&(e=N.range(e.head,e.anchor));let r=n(e);return N.range(e.anchor,r.head,r.goalColumn,r.bidiLevel||void 0,r.assoc)});return!r.eq(e.state.selection)&&(e.dispatch(H(e.state,r)),!0)}function Sn(e,t){return K(e,t,n=>e.moveByChar(n,t))}var Cn=e=>Sn(e,!W(e)),wn=e=>Sn(e,W(e));function Tn(e,t){return K(e,t,n=>e.moveByGroup(n,t))}var En=e=>Tn(e,!W(e)),Dn=e=>Tn(e,W(e)),On=e=>{let t=!W(e);return K(e,t,n=>rn(e.state,n,t))},kn=e=>{let t=W(e);return K(e,t,n=>rn(e.state,n,t))};function An(e,t){return K(e,t,n=>e.moveVertically(n,t))}var jn=e=>An(e,!1),Mn=e=>An(e,!0);function Nn(e,t){return K(e,t,n=>e.moveVertically(n,t,un(e).height))}var Pn=e=>Nn(e,!1),Fn=e=>Nn(e,!0),In=e=>K(e,!0,t=>G(e,t,!0)),Ln=e=>K(e,!1,t=>G(e,t,!1)),Rn=e=>{let t=!W(e);return K(e,t,n=>G(e,n,t))},zn=e=>{let t=W(e);return K(e,t,n=>G(e,n,t))},Bn=e=>K(e,!1,t=>N.cursor(e.lineBlockAt(t.head).from)),Vn=e=>K(e,!0,t=>N.cursor(e.lineBlockAt(t.head).to)),Hn=({state:e,dispatch:t})=>(t(H(e,{anchor:0})),!0),Un=({state:e,dispatch:t})=>(t(H(e,{anchor:e.doc.length})),!0),Wn=({state:e,dispatch:t})=>(t(H(e,{anchor:e.selection.main.anchor,head:0})),!0),Gn=({state:e,dispatch:t})=>(t(H(e,{anchor:e.selection.main.anchor,head:e.doc.length})),!0),Kn=({state:e,dispatch:t})=>(t(e.update({selection:{anchor:0,head:e.doc.length},userEvent:`select`})),!0),qn=({state:e,dispatch:t})=>{let n=fr(e).map(({from:t,to:n})=>N.undirectionalRange(t,Math.min(n+1,e.doc.length)));return t(e.update({selection:N.create(n),userEvent:`select`})),!0},Jn=({state:e,dispatch:t})=>{let n=V(e.selection,t=>{let n=j(e),r=n.resolveStack(t.from,1);if(t.empty){let e=n.resolveStack(t.from,-1);e.node.from>=r.node.from&&e.node.to<=r.node.to&&(r=e)}for(let e=r;e;e=e.next){let{node:n}=e;if((n.from<t.from&&n.to>=t.to||n.to>t.to&&n.from<=t.from)&&e.next)return N.undirectionalRange(n.from,n.to)}return t});return!n.eq(e.selection)&&(t(H(e,n)),!0)};function Yn(e,t){let{state:n}=e,r=n.selection,i=n.selection.ranges.slice();for(let r of n.selection.ranges){let a=n.doc.lineAt(r.head);if(t?a.to<e.state.doc.length:a.from>0)for(let n=r;;){let r=e.moveVertically(n,t);if(r.head<a.from||r.head>a.to){i.some(e=>e.head==r.head)||i.push(r);break}if(r.head==n.head)break;n=r}}return i.length!=r.ranges.length&&(e.dispatch(H(n,N.create(i,i.length-1))),!0)}var Xn=e=>Yn(e,!1),Zn=e=>Yn(e,!0),Qn=({state:e,dispatch:t})=>{let n=e.selection,r=null;return n.ranges.length>1?r=N.create([n.main]):n.main.empty||(r=N.create([N.cursor(n.main.head)])),r?(t(H(e,r)),!0):!1};function $n(e,t){if(e.state.readOnly)return!1;let n=`delete.selection`,{state:r}=e,i=r.changeByRange(r=>{let{from:i,to:a}=r;if(i==a){let o=t(r);o<i?(n=`delete.backward`,o=er(e,o,!1)):o>i&&(n=`delete.forward`,o=er(e,o,!0)),i=Math.min(i,o),a=Math.max(a,o)}else i=er(e,i,!1),a=er(e,a,!0);return i==a?{range:r}:{changes:{from:i,to:a},range:N.cursor(i,i<r.head?-1:1)}});return!i.changes.empty&&(e.dispatch(r.update(i,{scrollIntoView:!0,userEvent:n,effects:n==`delete.selection`?M.announce.of(r.phrase(`Selection deleted`)):void 0})),!0)}function er(e,t,n){if(e instanceof M)for(let r of e.state.facet(M.atomicRanges).map(t=>t(e)))r.between(t,t,(e,r)=>{e<t&&r>t&&(t=n?r:e)});return t}var tr=(e,t,n)=>$n(e,r=>{let i=r.from,{state:a}=e,o=a.doc.lineAt(i),s,c;if(n&&!t&&i>o.from&&i<o.from+200&&!/[^ \t]/.test(s=o.text.slice(0,i-o.from))){if(s[s.length-1]==` `)return i-1;let e=Ye(s,a.tabSize)%et(a)||et(a);for(let t=0;t<e&&s[s.length-1-t]==` `;t++)i--;c=i}else c=$e(o.text,i-o.from,t,t)+o.from,c==i&&o.number!=(t?a.doc.lines:1)?c+=t?1:-1:!t&&/[\ufe00-\ufe0f]/.test(o.text.slice(c-o.from,i-o.from))&&(c=$e(o.text,c-o.from,!1,!1)+o.from);return c}),nr=e=>tr(e,!1,!0),rr=e=>tr(e,!0,!1),ir=(e,t)=>$n(e,n=>{let r=n.head,{state:i}=e,a=i.doc.lineAt(r),o=i.charCategorizer(r);for(let e=null;;){if(r==(t?a.to:a.from)){r==n.head&&a.number!=(t?i.doc.lines:1)&&(r+=t?1:-1);break}let s=$e(a.text,r-a.from,t)+a.from,c=a.text.slice(Math.min(r,s)-a.from,Math.max(r,s)-a.from),l=o(c);if(e!=null&&l!=e)break;(c!=` `||r!=n.head)&&(e=l),r=s}return r}),ar=e=>ir(e,!1),or=e=>ir(e,!0),sr=e=>$n(e,t=>{let n=e.lineBlockAt(t.head).to;return t.head<n?n:Math.min(e.state.doc.length,t.head+1)}),cr=e=>$n(e,t=>{let n=e.moveToLineBoundary(t,!1).head;return t.head>n?n:Math.max(0,t.head-1)}),lr=e=>$n(e,t=>{let n=e.moveToLineBoundary(t,!0).head;return t.head<n?n:Math.min(e.state.doc.length,t.head+1)}),ur=({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=e.changeByRange(e=>({changes:{from:e.from,to:e.to,insert:Je.of([``,``])},range:N.cursor(e.from)}));return t(e.update(n,{scrollIntoView:!0,userEvent:`input`})),!0},dr=({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=e.changeByRange(t=>{if(!t.empty||t.from==0||t.from==e.doc.length)return{range:t};let n=t.from,r=e.doc.lineAt(n),i=n==r.from?n-1:$e(r.text,n-r.from,!1)+r.from,a=n==r.to?n+1:$e(r.text,n-r.from,!0)+r.from;return{changes:{from:i,to:a,insert:e.doc.slice(n,a).append(e.doc.slice(i,n))},range:N.cursor(a)}});return!n.changes.empty&&(t(e.update(n,{scrollIntoView:!0,userEvent:`move.character`})),!0)};function fr(e){let t=[],n=-1;for(let r of e.selection.ranges){let i=e.doc.lineAt(r.from),a=e.doc.lineAt(r.to);if(!r.empty&&r.to==a.from&&(a=e.doc.lineAt(r.to-1)),n>=i.number){let e=t[t.length-1];e.to=a.to,e.ranges.push(r)}else t.push({from:i.from,to:a.to,ranges:[r]});n=a.number+1}return t}function pr(e,t,n){if(e.readOnly)return!1;let r=[],i=[];for(let t of fr(e)){if(n?t.to==e.doc.length:t.from==0)continue;let a=e.doc.lineAt(n?t.to+1:t.from-1),o=a.length+1;if(n){r.push({from:t.to,to:a.to},{from:t.from,insert:a.text+e.lineBreak});for(let n of t.ranges)i.push(N.range(Math.min(e.doc.length,n.anchor+o),Math.min(e.doc.length,n.head+o)))}else{r.push({from:a.from,to:t.from},{from:t.to,insert:e.lineBreak+a.text});for(let e of t.ranges)i.push(N.range(e.anchor-o,e.head-o))}}return r.length?(t(e.update({changes:r,scrollIntoView:!0,selection:N.create(i,e.selection.mainIndex),userEvent:`move.line`})),!0):!1}var mr=({state:e,dispatch:t})=>pr(e,t,!1),hr=({state:e,dispatch:t})=>pr(e,t,!0);function gr(e,t,n){if(e.readOnly)return!1;let r=[];for(let t of fr(e))n?r.push({from:t.from,insert:e.doc.slice(t.from,t.to)+e.lineBreak}):r.push({from:t.to,insert:e.lineBreak+e.doc.slice(t.from,t.to)});let i=e.changes(r);return t(e.update({changes:i,selection:e.selection.map(i,n?1:-1),scrollIntoView:!0,userEvent:`input.copyline`})),!0}var _r=({state:e,dispatch:t})=>gr(e,t,!1),vr=({state:e,dispatch:t})=>gr(e,t,!0),yr=e=>{if(e.state.readOnly)return!1;let{state:t}=e,n=t.changes(fr(t).map(({from:e,to:n})=>(e>0?e--:n<t.doc.length&&n++,{from:e,to:n}))),r=V(t.selection,t=>{let n;if(e.lineWrapping){let r=e.lineBlockAt(t.head),i=e.coordsAtPos(t.head,t.assoc||1);i&&(n=r.bottom+e.documentTop-i.bottom+e.defaultLineHeight/2)}return e.moveVertically(t,!0,n)}).map(n);return e.dispatch({changes:n,selection:r,scrollIntoView:!0,userEvent:`delete.line`}),!0};function br(e,t){if(/\(\)|\[\]|\{\}/.test(e.sliceDoc(t-1,t+1)))return{from:t,to:t};let n=j(e).resolveInner(t),r=n.childBefore(t),i=n.childAfter(t),a;return r&&i&&r.to<=t&&i.from>=t&&(a=r.type.prop(Xe.closedBy))&&a.indexOf(i.name)>-1&&e.doc.lineAt(r.to).from==e.doc.lineAt(i.from).from&&!/\S/.test(e.sliceDoc(r.to,i.from))?{from:r.to,to:i.from}:null}var xr=Cr(!1),Sr=Cr(!0);function Cr(e){return({state:t,dispatch:n})=>{if(t.readOnly)return!1;let r=t.changeByRange(n=>{let{from:r,to:i}=n,a=t.doc.lineAt(r),o=!e&&r==i&&br(t,r);e&&(r=i=(i<=a.to?a:t.doc.lineAt(i)).to);let s=new Ze(t,{simulateBreak:r,simulateDoubleBreak:!!o}),c=rt(s,r);for(c??=Ye(/^\s*/.exec(t.doc.lineAt(r).text)[0],t.tabSize);i<a.to&&/\s/.test(a.text[i-a.from]);)i++;o?{from:r,to:i}=o:r>a.from&&r<a.from+100&&!/\S/.test(a.text.slice(0,r))&&(r=a.from);let l=[``,nt(t,c)];return o&&l.push(nt(t,s.lineIndent(a.from,-1))),{changes:{from:r,to:i,insert:Je.of(l)},range:N.cursor(r+1+l[1].length)}});return n(t.update(r,{scrollIntoView:!0,userEvent:`input`})),!0}}function wr(e,t){let n=-1;return e.changeByRange(r=>{let i=[];for(let a=r.from;a<=r.to;){let o=e.doc.lineAt(a);o.number>n&&(r.empty||r.to>o.from)&&(t(o,i,r),n=o.number),a=o.to+1}let a=e.changes(i);return{changes:i,range:N.range(a.mapPos(r.anchor,1),a.mapPos(r.head,1))}})}var Tr=({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=Object.create(null),r=new Ze(e,{overrideIndentation:e=>n[e]??-1}),i=wr(e,(t,i,a)=>{let o=rt(r,t.from);if(o==null)return;/\S/.test(t.text)||(o=0);let s=/^\s*/.exec(t.text)[0],c=nt(e,o);(s!=c||a.from<t.from+s.length)&&(n[t.from]=o,i.push({from:t.from,to:t.from+s.length,insert:c}))});return i.changes.empty||t(e.update(i,{userEvent:`indent`})),!0},Er=({state:e,dispatch:t})=>!e.readOnly&&(t(e.update(wr(e,(t,n)=>{n.push({from:t.from,insert:e.facet(Ve)})}),{userEvent:`input.indent`})),!0),Dr=({state:e,dispatch:t})=>!e.readOnly&&(t(e.update(wr(e,(t,n)=>{let r=/^\s*/.exec(t.text)[0];if(!r)return;let i=Ye(r,e.tabSize),a=0,o=nt(e,Math.max(0,i-et(e)));for(;a<r.length&&a<o.length&&r.charCodeAt(a)==o.charCodeAt(a);)a++;n.push({from:t.from+a,to:t.from+r.length,insert:o.slice(a)})}),{userEvent:`delete.dedent`})),!0),Or=e=>(e.setTabFocusMode(),!0),kr=[{key:`Ctrl-b`,run:Zt,shift:Cn,preventDefault:!0},{key:`Ctrl-f`,run:Qt,shift:wn},{key:`Ctrl-p`,run:cn,shift:jn},{key:`Ctrl-n`,run:ln,shift:Mn},{key:`Ctrl-a`,run:vn,shift:Bn},{key:`Ctrl-e`,run:yn,shift:Vn},{key:`Ctrl-d`,run:rr},{key:`Ctrl-h`,run:nr},{key:`Ctrl-k`,run:sr},{key:`Ctrl-Alt-h`,run:ar},{key:`Ctrl-o`,run:ur},{key:`Ctrl-t`,run:dr},{key:`Ctrl-v`,run:pn}],Ar=[{key:`ArrowLeft`,run:Zt,shift:Cn,preventDefault:!0},{key:`Mod-ArrowLeft`,mac:`Alt-ArrowLeft`,run:en,shift:En,preventDefault:!0},{mac:`Cmd-ArrowLeft`,run:gn,shift:Rn,preventDefault:!0},{key:`ArrowRight`,run:Qt,shift:wn,preventDefault:!0},{key:`Mod-ArrowRight`,mac:`Alt-ArrowRight`,run:tn,shift:Dn,preventDefault:!0},{mac:`Cmd-ArrowRight`,run:_n,shift:zn,preventDefault:!0},{key:`ArrowUp`,run:cn,shift:jn,preventDefault:!0},{mac:`Cmd-ArrowUp`,run:Hn,shift:Wn},{mac:`Ctrl-ArrowUp`,run:fn,shift:Pn},{key:`ArrowDown`,run:ln,shift:Mn,preventDefault:!0},{mac:`Cmd-ArrowDown`,run:Un,shift:Gn},{mac:`Ctrl-ArrowDown`,run:pn,shift:Fn},{key:`PageUp`,run:fn,shift:Pn},{key:`PageDown`,run:pn,shift:Fn},{key:`Home`,run:hn,shift:Ln,preventDefault:!0},{key:`Mod-Home`,run:Hn,shift:Wn},{key:`End`,run:mn,shift:In,preventDefault:!0},{key:`Mod-End`,run:Un,shift:Gn},{key:`Enter`,run:xr,shift:xr},{key:`Mod-a`,run:Kn},{key:`Backspace`,run:nr,shift:nr,preventDefault:!0},{key:`Delete`,run:rr,preventDefault:!0},{key:`Mod-Backspace`,mac:`Alt-Backspace`,run:ar,preventDefault:!0},{key:`Mod-Delete`,mac:`Alt-Delete`,run:or,preventDefault:!0},{mac:`Mod-Backspace`,run:cr,preventDefault:!0},{mac:`Mod-Delete`,run:lr,preventDefault:!0}].concat(kr.map(e=>({mac:e.key,run:e.run,shift:e.shift}))),jr=[{key:`Alt-ArrowLeft`,mac:`Ctrl-ArrowLeft`,run:an,shift:On},{key:`Alt-ArrowRight`,mac:`Ctrl-ArrowRight`,run:on,shift:kn},{key:`Alt-ArrowUp`,run:mr},{key:`Shift-Alt-ArrowUp`,run:_r},{key:`Alt-ArrowDown`,run:hr},{key:`Shift-Alt-ArrowDown`,run:vr},{key:`Mod-Alt-ArrowUp`,run:Xn},{key:`Mod-Alt-ArrowDown`,run:Zn},{key:`Escape`,run:Qn},{key:`Mod-Enter`,run:Sr},{key:`Alt-l`,mac:`Ctrl-l`,run:qn},{key:`Mod-i`,run:Jn,preventDefault:!0},{key:`Mod-[`,run:Dr},{key:`Mod-]`,run:Er},{key:`Mod-Alt-\\`,run:Tr},{key:`Shift-Mod-k`,run:yr},{key:`Shift-Mod-\\`,run:xn},{key:`Mod-/`,run:ht},{key:`Alt-A`,mac:`Ctrl-A`,run:vt},{key:`Ctrl-m`,mac:`Shift-Alt-m`,run:Or}].concat(Ar),Mr={key:`Tab`,run:Er,shift:Dr},Nr=Ue.define({combine:e=>e[0]??null}),Pr=/^[ \t]*\[\[!([^\]\n]+)\]\][ \t]*$/,Fr={question:`<path d="M5.6 5.6a2.4 2.4 0 1 1 3.4 2.2c-.6.3-1 .8-1 1.5v.9"/><path d="M8 12v1.2"/>`,problem:`<path d="M8 2.5l5.8 10.5H2.2z"/>`,note:`<rect x="3.5" y="2.5" width="9" height="11"/>`},Ir=`<path d="M3 8.5l3 3 7-7"/>`,Lr=class extends P{ref;found;at;constructor(e,t,n){super(),this.ref=e,this.found=t,this.at=n}eq(e){return e.ref===this.ref&&JSON.stringify(e.found)===JSON.stringify(this.found)&&e.at===this.at}toDOM(e){let t=this.found,n=document.createElement(`div`);n.className=`cm-lp-embed${t?` cm-lp-embed-${t.kind}`:` cm-lp-embed-broken`}${t?.done?` cm-lp-embed-done`:``}`,n.title=`[[!${this.ref}]]`;let r=document.createElementNS(`http://www.w3.org/2000/svg`,`svg`);r.setAttribute(`viewBox`,`0 0 16 16`),r.setAttribute(`width`,`16`),r.setAttribute(`height`,`16`),r.setAttribute(`aria-hidden`,`true`),r.innerHTML=t?.done?Ir:Fr[t?.kind??`question`];let i=document.createElement(`span`);return i.textContent=t?t.title:this.ref,n.append(r,i),n.addEventListener(`mousedown`,n=>{n.preventDefault(),t&&!n.altKey?e.state.facet(Nr)?.open(t.id):(e.dispatch({selection:{anchor:this.at},scrollIntoView:!0}),e.focus())}),n}ignoreEvent(){return!0}get estimatedHeight(){return 44}},Rr=class extends P{kind;source;at;beneath;constructor(e,t,n,r){super(),this.kind=e,this.source=t,this.at=n,this.beneath=r}eq(e){return e.kind===this.kind&&e.source===this.source&&e.at===this.at&&e.beneath===this.beneath}toDOM(e){let t=document.createElement(`div`);t.className=`cm-lp-block cm-lp-${this.kind}${this.beneath?` cm-lp-beneath`:``}`;let n=document.createElement(`div`);return n.className=`prose`,t.append(n),n.innerHTML=ge(this.source),this.beneath||(t.title=`Click to edit`,t.addEventListener(`mousedown`,t=>{t.preventDefault(),e.dispatch({selection:{anchor:this.at},scrollIntoView:!0}),e.focus()})),t}ignoreEvent(){return!0}get estimatedHeight(){return this.kind===`maths`?60:120}},zr=new WeakMap,Br=class extends P{source;at;beneath;constructor(e,t,n){super(),this.source=e,this.at=t,this.beneath=n}eq(e){return e.source===this.source&&e.at===this.at&&e.beneath===this.beneath}toDOM(e){let t=document.createElement(`div`);t.className=`cm-lp-block cm-lp-diagram${this.beneath?` cm-lp-beneath`:``}`;let n=document.createElement(`pre`);n.className=`cm-lp-diagram-src`,n.textContent=this.source;let r=document.createElement(`div`);return r.className=`diagram`,t.append(n,r),zr.set(t,{mounted:ye(r,this.source,()=>t.classList.add(`cm-lp-broken-diagram`)),source:this.source}),this.beneath||(t.title=`Click to edit`,t.addEventListener(`mousedown`,t=>{t.preventDefault(),e.dispatch({selection:{anchor:this.at},scrollIntoView:!0}),e.focus()})),t}updateDOM(e){let t=zr.get(e);return!t||!this.beneath||!e.classList.contains(`cm-lp-beneath`)?!1:(t.source!==this.source&&(t.source=this.source,e.classList.remove(`cm-lp-broken-diagram`),e.querySelector(`.cm-lp-diagram-src`).textContent=this.source,t.mounted.then(e=>Se(e,this.source))),!0)}ignoreEvent(){return!0}get estimatedHeight(){return 160}},Vr=(e,t)=>t!==null&&e.sliceDoc(t.from,t.to).trim().split(/\s/)[0].toLowerCase()===`mermaid`;function Hr(e){let t=[],n=e.selection.ranges;j(e).iterate({enter:r=>{let i=null,a=``;if(r.name===`BlockMath`)i=`maths`,a=e.sliceDoc(r.from,r.to);else if(r.name===`Table`)i=`table`,a=e.sliceDoc(r.from,r.to);else if(r.name===`FencedCode`&&Vr(e,r.node.getChild(`CodeInfo`))){let i=r.node.getChild(`CodeText`),a=i?e.sliceDoc(i.from,i.to):``,o=e.doc.lineAt(r.from).from,s=e.doc.lineAt(r.to).to;return n.some(e=>e.to>=o&&e.from<=s)?a.trim()&&t.push(I.widget({widget:new Br(a,r.from,!0),block:!0,side:1}).range(s)):t.push(I.replace({widget:new Br(a,r.from,!1),block:!0}).range(o,s)),!1}else if(r.name===`Document`||r.name===`Blockquote`||/List|ListItem/.test(r.name))return;if(!i)return!1;let o=e.doc.lineAt(r.from).from,s=e.doc.lineAt(r.to).to;return n.some(e=>e.to>=o&&e.from<=s)?i!==`table`&&a.trim()&&t.push(I.widget({widget:new Rr(i,a,r.from,!0),block:!0,side:1}).range(s)):t.push(I.replace({widget:new Rr(i,a,r.from,!1),block:!0}).range(o,s)),!1}});let r=e.facet(Nr);if(r){let i=!1;for(let a=1;a<=e.doc.lines;a++){let o=e.doc.line(a);if(/^\s*(```|~~~)/.test(o.text)){i=!i;continue}let s=i?null:Pr.exec(o.text);if(!s||n.some(e=>e.to>=o.from&&e.from<=o.to))continue;let c=s[1].trim();t.push(I.replace({widget:new Lr(c,r.find(c),o.from),block:!0}).range(o.from,o.to))}}return I.set(t,!0)}var Ur=R.define({create:Hr,update(e,t){return t.docChanged||t.selection||j(t.startState)!==j(t.state)?Hr(t.state):e},provide:e=>M.decorations.from(e)}),Wr=M.theme({".cm-lp-block":{padding:`0`,cursor:`text`},".cm-lp-block .katex-display > .katex":{fontSize:`1.17em`},".cm-lp-block .prose":{maxWidth:`none`},".cm-lp-block .prose > :last-child, .cm-lp-block .table-wrap":{marginBottom:`0`},".cm-lp-block .katex-display":{margin:`0`},".cm-lp-diagram .diagram":{overflowX:`auto`,overflowY:`hidden`},".cm-lp-diagram-src":{display:`none`,margin:`0`,font:`13px/20px var(--font-mono)`,whiteSpace:`pre-wrap`,color:`var(--text-soft)`},".cm-lp-diagram.cm-lp-broken-diagram:not(.cm-lp-beneath) .cm-lp-diagram-src":{display:`block`},".cm-lp-beneath":{borderLeft:`2px solid var(--line)`,paddingLeft:`12px`,marginTop:`4px`,opacity:`.9`},".cm-lp-block:not(.cm-lp-beneath):hover":{outline:`1px dashed var(--line)`,outlineOffset:`2px`},".cm-lp-embed":{display:`flex`,alignItems:`center`,gap:`10px`,padding:`9px 12px`,border:`1px solid var(--rose)`,borderLeftWidth:`3px`,background:`var(--rose-soft)`,fontFamily:`var(--font-text)`,fontSize:`16px`,lineHeight:`1.45`,cursor:`pointer`},".cm-lp-embed svg":{flex:`none`,fill:`none`,stroke:`var(--rose)`,strokeWidth:`1.4`},".cm-lp-embed-problem":{borderColor:`var(--line-strong)`,background:`var(--ground-1)`},".cm-lp-embed-problem svg":{stroke:`var(--text-soft)`},".cm-lp-embed-done":{borderColor:`var(--malachite)`,background:`var(--malachite-soft)`},".cm-lp-embed-done svg":{stroke:`var(--malachite)`},".cm-lp-embed-broken":{borderStyle:`dashed`,borderColor:`var(--line-strong)`,background:`none`,color:`var(--text-faint)`},".cm-lp-embed-broken svg":{stroke:`var(--text-faint)`},".cm-lp-embed:hover":{borderColor:`var(--text-soft)`}});function Gr(e,t){let{state:n}=e,r=t.length;return e.dispatch(n.changeByRange(e=>{let i=n.sliceDoc(e.from-r,e.from),a=n.sliceDoc(e.to,e.to+r);return i===t&&a===t?{changes:[{from:e.from-r,to:e.from},{from:e.to,to:e.to+r}],range:N.range(e.from-r,e.to-r)}:{changes:[{from:e.from,insert:t},{from:e.to,insert:t}],range:N.range(e.from+r,e.to+r)}}),{scrollIntoView:!0,userEvent:`input`}),!0}function Kr(e){let{state:t}=e,n=new Map;for(let e of t.selection.ranges)for(let r=e.from;r<=e.to;){let e=t.doc.lineAt(r);n.set(e.number,{from:e.from,text:e.text}),r=e.to+1}return[...n.values()]}function qr(e){let t=Kr(e).map(({from:e,text:t})=>{let n=/^(#{1,6}) /.exec(t),r=n?n[1].length:0,i=r>=3?``:`#`.repeat(r+1)+` `;return{from:e,to:e+(n?n[0].length:0),insert:i}});return e.dispatch({changes:t,scrollIntoView:!0,userEvent:`input`}),!0}function Jr(e){let t=Kr(e),n=t.every(({text:e})=>/^\s*[-*+] /.test(e)),r=t.map(({from:e,text:t})=>{if(n){let n=/^(\s*)[-*+] /.exec(t);return{from:e+n[1].length,to:e+n[0].length}}return{from:e+/^\s*/.exec(t)[0].length,insert:`- `}});return e.dispatch({changes:r,scrollIntoView:!0,userEvent:`input`}),!0}function Yr(e){let{state:t}=e,n=t.selection.main;if(n.empty)e.dispatch({changes:{from:n.from,insert:`[[]]`},selection:{anchor:n.from+2},userEvent:`input`});else{let r=t.sliceDoc(n.from,n.to);e.dispatch({changes:{from:n.from,to:n.to,insert:`[${r}]()`},selection:{anchor:n.from+r.length+3},userEvent:`input`})}return at(e),!0}function q(e,t){switch(t){case`bold`:return Gr(e,`**`);case`italic`:return Gr(e,`*`);case`maths`:return Gr(e,`$`);case`heading`:return qr(e);case`list`:return Jr(e);case`link`:return Yr(e);case`undo`:return Nt(e);case`redo`:return Pt(e)}}var Xr=[{key:`Mod-b`,preventDefault:!0,run:e=>q(e,`bold`)},{key:`Mod-i`,preventDefault:!0,run:e=>q(e,`italic`)},{key:`Mod-k`,preventDefault:!0,run:e=>q(e,`link`)},{key:`Mod-Shift-m`,preventDefault:!0,run:e=>q(e,`maths`)},{key:`Mod-Shift-h`,preventDefault:!0,run:e=>q(e,`heading`)},{key:`Mod-Shift-8`,preventDefault:!0,run:e=>q(e,`list`)}],Zr=[`requires`,`uses`,`see also`];function Qr(e){if(!e||/^[a-z][a-z0-9+.-]*:/i.test(e)||e.startsWith(`#`))return null;let t=e.split(`#`)[0].split(`?`)[0];return/\.html?$/i.test(t)?`artifact`:/\.(png|jpe?g|gif|svg|webp|avif)$/i.test(t)?`image`:/\.md$/i.test(t)||t.endsWith(`/`)?`note`:null}function J(e,t){let n=j(e);for(let r of[-1,1])for(let i=n.resolveInner(t,r);i;i=i.parent){if(i.name!==`Link`&&i.name!==`Image`)continue;let t=i.getChild(`URL`);if(!t)break;let n=e.sliceDoc(t.from,t.to),r=Qr(n);if(!r)return null;let a=i.getChild(`LinkTitle`),o=a?e.sliceDoc(a.from,a.to):null;return{from:i.from,to:i.to,embed:i.name===`Image`,url:n,urlTo:t.to,title:o===null?null:o.replace(/^["'(]|["')]$/g,``),titleFrom:a?a.from:t.to,titleTo:a?a.to:t.to,kind:r}}return null}var $r=e=>e.kind===`note`||e.kind===`artifact`&&!e.embed;function ei(e,t,n){let r=[];return j(e).iterate({from:t,to:n,enter:i=>{if(i.name!==`Link`&&i.name!==`Image`)return;if(i.from<t||i.to>n)return!1;let a=J(e,i.from+1);return a&&a.from===i.from&&$r(a)&&r.push(a),!1}}),r}var ti=(e,t)=>e.filter(e=>Y(e)!==t).map(e=>X(e,t)),ni=e=>(e??``).trim().toLowerCase().replace(/[-_]/g,` `),Y=e=>Zr.includes(ni(e.title))?ni(e.title):ni(e.title)===`seealso`?`see also`:null,ri=e=>ni(e.title)===`left`?`left`:`center`;function X(e,t){return t===null?{from:e.urlTo,to:e.titleTo,insert:``}:e.titleFrom===e.titleTo?{from:e.urlTo,insert:` "${t}"`}:{from:e.titleFrom,to:e.titleTo,insert:`"${t}"`}}function ii(e,t){if(e.embed===t)return[];let n=[t?{from:e.from,insert:`!`}:{from:e.from,to:e.from+1,insert:``}];return e.title!==null&&(e.kind===`image`||Y(e)!==null)&&n.push(X(e,null)),n}var Z=(e,t)=>e.dispatch({changes:t,userEvent:`input.link`});function ai(e){let t=[...Zr.map(t=>({label:t[0].toUpperCase()+t.slice(1),on:Y(e)===t,run:(e,n)=>Z(e,X(n,t)),hint:t===`requires`?`This note cannot be followed without it: it shapes the Atlas and the study order`:t===`uses`?`It draws on it: it shapes the Atlas`:`Related reading: shown, but it does not shape the Atlas`})),{label:`Unrated`,on:Y(e)===null,run:(e,t)=>Z(e,X(t,null)),hint:`No rating: counted as uses`}];if(e.kind===`note`)return t;let n=[{label:`Shown here`,on:e.embed,run:(e,t)=>Z(e,ii(t,!0)),hint:e.kind===`image`?`The picture is shown in the note`:`The artifact is shown in the note, working`},{label:`Link`,on:!e.embed,run:(e,t)=>Z(e,ii(t,!1)),hint:`A link to it; it opens on its own`}];return e.kind===`image`?e.embed?[...n,{label:`Centre`,on:ri(e)===`center`,run:(e,t)=>Z(e,X(t,null)),hint:`In the middle, 80% of the text's width`},{label:`Left`,on:ri(e)===`left`,run:(e,t)=>Z(e,X(t,`left`)),hint:`At the left, 80% of the text's width`}]:n:e.embed?n:[...n,...t]}function oi(e){let t=t=>e.every(e=>Y(e)===t),n=e.length;return[...Zr.map(e=>({label:e[0].toUpperCase()+e.slice(1),on:t(e),run:t=>Z(t,ti(ei(t.state,t.state.selection.main.from,t.state.selection.main.to),e)),hint:`Rate all ${n} links ${e}`})),{label:`Unrated`,on:t(null),run:e=>Z(e,ti(ei(e.state,e.state.selection.main.from,e.state.selection.main.to),null)),hint:`Take the rating from all ${n} links`}]}function si(e){let t=Y(e[0]),n=e.every(e=>Y(e)===t);return`${e.length} links, ${n?t??`unrated`:`mixed`}`}function ci(e){return e.kind===`note`?Y(e)?Y(e)[0].toUpperCase()+Y(e).slice(1):`Unrated`:e.embed?e.kind===`image`?ri(e)===`left`?`Shown, left`:`Shown, centre`:`Shown here`:Y(e)?`Link, ${Y(e)}`:`Link`}var li=(e,t)=>e===t||!!e&&!!t&&e.from===t.from&&e.to===t.to&&e.title===t.title&&e.embed===t.embed,ui=class{view;layer;button;menu;leader;path;link=null;hover=null;many=[];open=!1;at=0;constructor(e){this.view=e,this.layer=document.createElement(`div`),this.layer.className=`cm-link-control`,this.layer.hidden=!0,this.leader=document.createElementNS(`http://www.w3.org/2000/svg`,`svg`),this.leader.setAttribute(`class`,`cm-link-leader`),this.leader.setAttribute(`aria-hidden`,`true`),this.path=document.createElementNS(`http://www.w3.org/2000/svg`,`path`),this.leader.append(this.path),this.button=document.createElement(`button`),this.button.type=`button`,this.button.className=`cm-link-button`,this.button.setAttribute(`aria-haspopup`,`menu`),this.button.addEventListener(`mousedown`,e=>e.preventDefault()),this.button.addEventListener(`click`,()=>this.toggle(!this.open,!1)),this.menu=document.createElement(`div`),this.menu.className=`cm-link-menu`,this.menu.setAttribute(`role`,`menu`),this.menu.hidden=!0,this.menu.tabIndex=-1,this.menu.addEventListener(`keydown`,e=>this.keys(e)),this.layer.append(this.leader,this.button,this.menu),e.dom.append(this.layer),e.dom.addEventListener(`mousemove`,this.onMove),e.dom.addEventListener(`mouseleave`,this.onLeave)}onMove=e=>{if(this.open||this.layer.contains(e.target))return;let t=this.view.posAtCoords({x:e.clientX,y:e.clientY},!1),n=t===null?null:J(this.view.state,t);li(n,this.hover)||(this.hover=n,this.view.requestMeasure(this.measure))};onLeave=e=>{this.open||this.layer.contains(e.relatedTarget)||this.hover&&(this.hover=null,this.view.requestMeasure(this.measure))};selected(){let e=this.view.state.selection.main;if(e.empty)return[];let t=ei(this.view.state,e.from,e.to);return t.length>=2?t:[]}current(){let e=this.view.state.selection.main,t=this.selected();return t.length?t[0]:J(this.view.state,e.head)??(e.empty?this.hover:null)}update(e){e.docChanged&&(this.hover=null),(e.docChanged||e.selectionSet||e.geometryChanged||e.viewportChanged||e.focusChanged)&&this.view.requestMeasure(this.measure)}measure={key:`link-control`,read:e=>{let t=this.current();if(!t)return null;let n=this.selected(),r=e.dom.getBoundingClientRect(),i=e.contentDOM.getBoundingClientRect(),a=e.coordsAtPos(Math.max(t.from,t.to-1),1)??e.coordsAtPos(t.to,-1);if(n.length){let t=Math.max(r.top,0),i=Math.min(r.bottom,window.innerHeight);a=null;for(let r=n.length-1;r>=0&&!a;r--){let o=e.coordsAtPos(Math.max(n[r].from,n[r].to-1),1);o&&o.top>=t&&o.bottom<=i-34&&(a=o)}a??=e.coordsAtPos(Math.max(n[0].from,n[0].to-1),1)}return a?{l:t,many:n,x:a.right-r.left,y:(a.top+a.bottom)/2-r.top,right:i.right-r.left,width:r.width}:null},write:e=>{if(!e){this.link=null,this.many=[],this.layer.hidden=!0,this.toggle(!1,!1);return}let t=e.many.length?si(e.many):ci(e.l),n=!li(e.l,this.link)||e.many.length!==this.many.length||t!==this.button.textContent;this.link=e.l,this.many=e.many,this.layer.hidden=!1,this.button.textContent=t,this.button.title=e.many.length?`Rate all the selected links (Alt+L)`:`What this link is (Alt+L)`,this.button.setAttribute(`aria-label`,e.many.length?`${t}. Rate them all`:`This link: ${t}. Change it`);let r=this.button.offsetWidth||90,i=e.width-e.right>=r+20,a=i?e.right+14:Math.max(0,e.width-r-2),o=i?e.y-13:e.y+12;this.button.style.transform=`translate(${Math.round(a)}px, ${Math.round(o)}px)`,this.menu.style.transform=`translate(${Math.round(Math.min(a,e.width-250))}px, ${Math.round(o+30)}px)`;let s=a,c=o+13;this.path.setAttribute(`d`,i?`M${e.x+3} ${e.y} H${Math.max(e.x+3,s-3)}`:`M${e.x+3} ${e.y} V${c} H${s-3}`),n&&this.open&&(this.fill(),this.mark(this.at))}};fill(){let e=this.link;e&&this.menu.replaceChildren(...(this.many.length?oi(this.many):ai(e)).map((t,n)=>{let r=document.createElement(`button`);return r.type=`button`,r.tabIndex=-1,r.id=`cm-link-choice-${n}`,r.addEventListener(`mousedown`,e=>e.preventDefault()),r.addEventListener(`mousemove`,()=>this.mark(n)),r.setAttribute(`role`,`menuitemradio`),r.setAttribute(`aria-checked`,String(t.on)),r.title=t.hint,r.innerHTML=`<b></b><span></span>`,r.querySelector(`b`).textContent=t.label,r.querySelector(`span`).textContent=t.hint,r.addEventListener(`click`,()=>{let n=this.current()??e;t.run(this.view,n),this.toggle(!1,!0)}),r}))}toggle(e,t){if(e&&(this.link=this.current()??this.link,this.many=this.selected()),!e||this.link){if(this.open=e,this.menu.hidden=!e,this.layer.classList.toggle(`open`,e),this.button.setAttribute(`aria-expanded`,String(e)),e){this.fill();let e=[...this.menu.querySelectorAll(`button`)];this.mark(Math.max(0,e.findIndex(e=>e.getAttribute(`aria-checked`)===`true`))),this.menu.focus()}else t&&this.view.focus()}}mark(e){let t=[...this.menu.querySelectorAll(`button`)];this.at=t.length?(e+t.length)%t.length:0,t.forEach((e,t)=>e.classList.toggle(`on`,t===this.at)),this.menu.setAttribute(`aria-activedescendant`,t[this.at]?.id??``)}keys(e){let t=[...this.menu.querySelectorAll(`button`)],n=!0;if(e.key===`Escape`)this.toggle(!1,!0);else if(e.key===`Enter`||e.key===` `)t[this.at]?.click();else if(e.key===`ArrowDown`)this.mark(this.at+1);else if(e.key===`ArrowUp`)this.mark(this.at-1);else if(e.key===`Home`)this.mark(0);else if(e.key===`End`)this.mark(t.length-1);else if(e.key===`Tab`)this.toggle(!1,!0);else if(e.key.length===1&&!e.altKey&&!e.ctrlKey&&!e.metaKey){let r=t.findIndex(t=>t.textContent.toLowerCase().startsWith(e.key.toLowerCase()));r>=0?this.mark(r):n=!1}else n=!1;n&&(e.preventDefault(),e.stopPropagation())}destroy(){this.view.dom.removeEventListener(`mousemove`,this.onMove),this.view.dom.removeEventListener(`mouseleave`,this.onLeave),this.layer.remove()}},di=Le.fromClass(ui),fi=e=>t=>{let n=J(t.state,t.state.selection.main.head);return n?(e(t,n),!0):!1},pi=e=>t=>{let n=t.state.selection.main,r=n.empty?[]:ei(t.state,n.from,n.to);return r.length>=2?(Z(t,ti(r,e)),!0):fi((t,n)=>{$r(n)&&Z(t,X(n,e))})(t)},mi=[{key:`Alt-l`,run:e=>{let t=e.plugin(di);return!t||!t.current()?!1:(t.toggle(!0,!1),!0)}},{key:`Alt-1`,run:pi(`requires`)},{key:`Alt-2`,run:pi(`uses`)},{key:`Alt-3`,run:pi(`see also`)},{key:`Alt-0`,run:pi(null)},{key:`Alt-e`,run:fi((e,t)=>{t.kind!==`note`&&Z(e,ii(t,!t.embed))})}],hi=[di,M.baseTheme({"&":{position:`relative`},".cm-link-control":{position:`absolute`,inset:`0`,pointerEvents:`none`,zIndex:`4`,overflow:`visible`},".cm-link-control[hidden]":{display:`none`},".cm-link-leader":{position:`absolute`,left:`0`,top:`0`,width:`100%`,height:`100%`,overflow:`visible`},".cm-link-leader path":{fill:`none`,stroke:`var(--lattice)`,strokeWidth:`1.75`,strokeDasharray:`.1 5`,strokeLinecap:`round`,opacity:`.7`},".cm-link-control:hover .cm-link-leader path, .cm-link-control:focus-within .cm-link-leader path, .cm-link-control.open .cm-link-leader path":{opacity:`1`,animation:`cm-link-run .6s linear infinite`},"@keyframes cm-link-run":{to:{strokeDashoffset:`-5.1`}},"@media (prefers-reduced-motion: reduce)":{".cm-link-leader path":{animation:`none !important`}},".cm-link-button":{position:`absolute`,left:`0`,top:`0`,pointerEvents:`auto`,height:`26px`,padding:`0 9px`,font:`12.5px var(--font-ui)`,whiteSpace:`nowrap`,color:`var(--text)`,background:`var(--ground-1)`,border:`1px solid var(--lattice)`,cursor:`pointer`},".cm-link-button:hover, .cm-link-button[aria-expanded=true]":{background:`var(--lattice-soft)`},".cm-link-button:focus-visible":{outline:`2px solid var(--focus-ring)`,outlineOffset:`2px`},".cm-link-menu":{position:`absolute`,left:`0`,top:`0`,pointerEvents:`auto`,width:`248px`,padding:`4px`,background:`var(--ground-1)`,border:`1px solid var(--line)`,display:`grid`,gap:`1px`},".cm-link-menu[hidden]":{display:`none`},".cm-link-menu button":{display:`grid`,gap:`1px`,textAlign:`left`,padding:`6px 8px 6px 24px`,background:`none`,border:`0`,color:`var(--text)`,font:`13.5px var(--font-ui)`,cursor:`pointer`,position:`relative`},".cm-link-menu button b":{fontWeight:`600`},".cm-link-menu button span":{fontSize:`12px`,color:`var(--text-faint)`,lineHeight:`1.3`},".cm-link-menu button[aria-checked=true]::before":{content:`"●"`,position:`absolute`,left:`8px`,top:`7px`,fontSize:`10px`,color:`var(--lattice)`},".cm-link-menu:focus":{outline:`none`},".cm-link-menu button.on":{background:`var(--lattice-soft)`},".cm-link-menu:focus-visible button.on":{outline:`2px solid var(--focus-ring)`,outlineOffset:`-2px`}}),Ne.of(mi)];function gi(e){return t=>{let n=t.matchBefore(/\[\[[^\]\n]*$/);if(!n)return null;let r=e().map(e=>({label:e.title,detail:e.folder,apply:(t,n,r,i)=>{let a=`[${e.title}](/${e.id}.md)`,o=r-2,s=t.state.sliceDoc(i,i+2)===`]]`?i+2:i;t.dispatch({changes:{from:o,to:s,insert:a},selection:{anchor:o+a.length}})}}));return{from:n.from+2,options:r,filter:!0,validFor:/^[^\]\n]*$/}}}function _i(e){return t=>{let n=t.matchBefore(/\]\([^)\s]*$/);return n?{from:n.from+2,options:e().map(e=>({label:`/${e.id}.md`,detail:e.title})),validFor:/^[^)\s]*$/}:null}}function vi(e){return ot({override:[gi(e),_i(e)],icons:!1,activateOnTyping:!0})}var yi=36,bi=92,xi=40,Si=/^\$\$([^$]*?[^\\])\$\$/,Ci=/^\$((?:[^\s\\])|(?:\S.*?[^\s\\]))\$(?!\d)/,wi=/^\\\((.+?)\\\)/,Ti=/^\$\$([^$]*?[^\\])\$\$(?:[ \t]*\([^)\s]+?\))?(?=[ \t]*(?:\n|$))/,Ei=/^\\\[([\s\S]+?)\\\](?:[ \t]*\([^)$\r\n]+?\))?(?=[ \t]*(?:\n|$))/;function Di(e,t,n){if(t===yi){if(n>e.offset&&e.char(n-1)===bi)return-1;let t=e.slice(n,e.end),r=(t.charCodeAt(1)===yi?Si:Ci).exec(t);return r?e.addElement(e.elt(`InlineMath`,n,n+r[0].length,[e.elt(`MathMark`,n,n+(r[0].startsWith(`$$`)?2:1)),e.elt(`MathMark`,n+r[0].length-(r[0].startsWith(`$$`)?2:1),n+r[0].length)])):-1}if(t===bi&&e.char(n+1)===xi){let t=wi.exec(e.slice(n,e.end));if(!t)return-1;let r=n+t[0].length;return e.addElement(e.elt(`InlineMath`,n,r,[e.elt(`MathMark`,n,n+2),e.elt(`MathMark`,r-2,r)]))}return-1}var Oi=2e4;function ki(e,t){let n=t.text.slice(t.pos),r=n.startsWith(`$$`)?Ti:n.startsWith(`\\[`)?Ei:null;if(!r)return!1;let i=e.lineStart+t.pos,a=e.input,o=r.exec(a.read(i,Math.min(a.length,i+Oi)));if(!o)return!1;let s=i+o[0].length;for(;e.lineStart+t.text.length<s&&e.nextLine(););return e.addElement(e.elt(`BlockMath`,i,s)),e.nextLine(),!0}var Ai={defineNodes:[{name:`InlineMath`,style:F.special(F.content)},{name:`BlockMath`,block:!0,style:F.special(F.content)},{name:`MathMark`,style:F.processingInstruction}],parseInline:[{name:`InlineMath`,parse:Di,before:`Escape`}],parseBlock:[{name:`BlockMath`,parse:ki,before:`FencedCode`}]};function ji(e){let t;return(t=/^\$\$([\s\S]*?)\$\$/.exec(e))||(t=/^\\\[([\s\S]*?)\\\]/.exec(e))?{tex:t[1],display:!0}:(t=/^\\\(([\s\S]*?)\\\)$/.exec(e))||(t=/^\$([\s\S]*?)\$$/.exec(e))?{tex:t[1],display:!1}:{tex:e,display:!1}}var Mi=class extends P{eq(){return!0}toDOM(){let e=document.createElement(`span`);return e.className=`cm-lp-bullet`,e.textContent=`•`,e}},Ni=class extends P{eq(){return!0}toDOM(){let e=document.createElement(`span`);return e.className=`cm-lp-hr`,e}},Pi=class extends P{name;constructor(e){super(),this.name=e}eq(e){return e.name===this.name}toDOM(){let e=document.createElement(`span`);return e.className=`cm-lp-lang`,e.textContent=this.name,e}},Fi=class extends P{source;constructor(e){super(),this.source=e}eq(e){return e.source===this.source}toDOM(){let e=document.createElement(`span`);e.className=`cm-lp-imaths`;let{tex:t,display:n}=ji(this.source);return e.innerHTML=Te.renderToString(t,{displayMode:n,throwOnError:!1}),e}},Q=I.replace({}),Ii=I.replace({widget:new Mi}),Li=I.replace({widget:new Ni}),$=e=>I.mark({class:e}),Ri=e=>I.line({class:e});function zi(e,t){let n=new Set;if(!t)return n;for(let t of e.selection.ranges){let r=e.doc.lineAt(t.from).number,i=e.doc.lineAt(t.to).number;for(let e=r;e<=i;e++)n.add(e)}return n}function Bi(e){let{state:t}=e,n=zi(t,e.hasFocus),r=e=>n.has(t.doc.lineAt(e).number),i=[],a=(e,n,r)=>{for(let a=t.doc.lineAt(e).number,o=t.doc.lineAt(n).number;a<=o;a++)i.push(Ri(r).range(t.doc.line(a).from))},o=e.visibleRanges;if(o.length){let e=o[0].from,s=o[o.length-1].to,c=/^ {0,3}([-*_])(?: *\1){2,} *$/,l=t.doc.lineAt(e).number,u=t.doc.lineAt(s).number,d=e=>e>=1&&e<=t.doc.lines?t.doc.line(e).text:``;for(let e=l;e<=u;e++){let r=t.doc.line(e);if(r.length!==0||/Code|Math|HTML|Comment/.test(j(t).resolveInner(r.from,1).name))continue;let a=e>1&&t.doc.line(e-1).length===0&&!n.has(e),o=c.test(d(e-1))||c.test(d(e+1));i.push(Ri(a?`cm-lp-gap cm-lp-gap-more`:o?`cm-lp-gap cm-lp-gap-rule`:`cm-lp-gap`).range(r.from))}j(t).iterate({from:e,to:s,enter:e=>{let n=e.name,o=/^(?:ATX|Setext)Heading(\d)$/.exec(n);if(o)a(e.from,e.to,`cm-lp-h${o[1]}`);else switch(n){case`HeaderMark`:{if(r(e.from))break;if((e.node.parent?.name??``).startsWith(`SetextHeading`)){i.push(Q.range(t.doc.lineAt(e.from).from,e.to));break}let n=t.sliceDoc(e.to,e.to+1)===` `?e.to+1:e.to;n>e.from&&i.push(Q.range(e.from,n));break}case`EmphasisMark`:case`StrikethroughMark`:r(e.from)||i.push(Q.range(e.from,e.to));break;case`Emphasis`:i.push($(`cm-lp-em`).range(e.from,e.to));break;case`StrongEmphasis`:i.push($(`cm-lp-strong`).range(e.from,e.to));break;case`Strikethrough`:i.push($(`cm-lp-strike`).range(e.from,e.to));break;case`InlineCode`:if(i.push($(`cm-lp-code`).range(e.from,e.to)),!r(e.from)){let t=e.node;for(let e=t.firstChild;e;e=e.nextSibling)e.name===`CodeMark`&&i.push(Q.range(e.from,e.to))}return!1;case`InlineMath`:return r(e.from)?i.push($(`cm-lp-mathsrc`).range(e.from,e.to)):i.push(I.replace({widget:new Fi(t.sliceDoc(e.from,e.to))}).range(e.from,e.to)),!1;case`BlockMath`:case`Table`:return a(e.from,e.to,`cm-lp-codeblock`),!1;case`Link`:{let n=e.node,a=[],o=!1;for(let e=n.firstChild;e;e=e.nextSibling)e.name===`LinkMark`&&a.push(e),e.name===`URL`&&(o=!0);let s=a[0],c=a[1],l=n.getChild(`URL`),u=l?t.sliceDoc(l.from,l.to):``,d=u.startsWith(`code:`),f=/^https?:/i.test(u),p=d?t.facet(Vi)(u)?`cm-lp-link cm-lp-codelink cm-lp-broken`:`cm-lp-link cm-lp-codelink`:f?`cm-lp-link cm-lp-weblink`:`cm-lp-link`;s&&c&&c.from>s.to&&i.push((d?I.mark({class:p,attributes:{title:t.facet(Vi)(u)?`${u.slice(5)}: not in the repository`:u.slice(5)}}):$(p)).range(s.to,c.from)),!r(e.from)&&o&&s&&c&&(i.push(Q.range(s.from,s.to)),i.push(Q.range(c.from,e.to)));break}case`ListMark`:{let n=t.sliceDoc(e.from,e.to);!r(e.from)&&/^[-*+]$/.test(n)?i.push(Ii.range(e.from,e.to)):i.push($(`cm-lp-listmark`).range(e.from,e.to));break}case`TaskMarker`:i.push($(`cm-lp-task`).range(e.from,e.to));break;case`Blockquote`:a(e.from,e.to,`cm-lp-quote`);break;case`QuoteMark`:if(!r(e.from)){let n=t.sliceDoc(e.to,e.to+1)===` `?e.to+1:e.to;i.push(Q.range(e.from,n))}break;case`HorizontalRule`:r(e.from)||(i.push(Li.range(e.from,e.to)),a(e.from,e.to,`cm-lp-ruleline`));break;case`FencedCode`:{a(e.from,e.to,`cm-lp-codeblock`);let n=e.node,o=t.doc.lineAt(e.from),s=t.doc.lineAt(e.to),c=n.getChild(`CodeInfo`),l=n.lastChild?.name===`CodeMark`&&n.lastChild.from>=s.from?n.lastChild:null;if(!r(o.from)){i.push(Ri(`cm-lp-fence`).range(o.from));let e=c?t.sliceDoc(c.from,c.to).trim().split(/\s/)[0]:``;i.push((e?I.replace({widget:new Pi(e)}):Q).range(o.from,o.to))}return l&&s.number>o.number&&!r(s.from)&&(i.push(Ri(`cm-lp-fence`).range(s.from)),s.to>s.from&&i.push(Q.range(s.from,s.to))),!1}case`CodeBlock`:return a(e.from,e.to,`cm-lp-codeblock`),!1;case`HTMLBlock`:case`CommentBlock`:return a(e.from,e.to,`cm-lp-codeblock`),!1}}})}i.sort((e,t)=>e.from-t.from||e.value.startSide-t.value.startSide);let s=new qe;for(let e of i)s.add(e.from,e.to,e.value);return s.finish()}var Vi=Ue.define({combine:e=>e[0]??(()=>!1)}),Hi=Le.fromClass(class{decorations;constructor(e){this.decorations=Bi(e)}update(e){(e.docChanged||e.viewportChanged||e.selectionSet||e.focusChanged||j(e.startState)!==j(e.state))&&(this.decorations=Bi(e.view))}},{decorations:e=>e.decorations}),Ui=M.theme({".cm-scroller":{fontFamily:`var(--font-text)`,fontSize:`var(--text-size)`,lineHeight:`1.55`},".cm-lp-gap":{lineHeight:`20px`},".cm-lp-gap-rule":{lineHeight:`10px`},".cm-lp-gap-more":{lineHeight:`4px`},".cm-lp-ruleline":{lineHeight:`12px`},".cm-content":{fontVariationSettings:`"opsz" 18`},".cm-lp-h1, .cm-lp-h2, .cm-lp-h3, .cm-lp-h4, .cm-lp-h5, .cm-lp-h6":{fontWeight:`600`,lineHeight:`1.3`,fontVariationSettings:`"opsz" 36`,paddingTop:`.5em !important`},".cm-lp-h1":{fontSize:`26px`},".cm-lp-h2":{fontSize:`22px`},".cm-lp-h3":{fontSize:`19px`},".cm-lp-h4":{fontSize:`17px`,fontWeight:`700`},".cm-lp-em":{fontStyle:`italic`},".cm-lp-strong":{fontWeight:`700`},".cm-lp-strike":{textDecoration:`line-through`},".cm-lp-code":{fontFamily:`var(--font-mono)`,fontSize:`.86em`,background:`color-mix(in srgb, var(--text) 8%, transparent)`,padding:`.1em .2em`},".cm-lp-link":{color:`var(--lattice)`,textDecoration:`underline`,textUnderlineOffset:`2px`},".cm-lp-weblink":{textDecorationStyle:`dotted`},".cm-lp-codelink":{fontFamily:`var(--font-mono)`,fontSize:`.86em`,textDecoration:`none`,borderBottom:`1px solid color-mix(in srgb, var(--lattice) 50%, transparent)`},".cm-lp-broken":{color:`var(--rose)`,textDecoration:`line-through`,borderBottomColor:`transparent`},".cm-lp-bullet":{color:`var(--text-faint)`,display:`inline-block`,minWidth:`1ch`},".cm-lp-listmark, .cm-lp-task":{color:`var(--text-faint)`,fontFamily:`var(--font-mono)`},".cm-lp-quote":{borderLeft:`3px solid var(--lattice)`,paddingLeft:`14px !important`,color:`var(--text-soft)`},".cm-lp-codeblock":{fontFamily:`var(--font-mono)`,fontSize:`13px`,lineHeight:`20px`,background:`color-mix(in srgb, var(--line) 38%, transparent)`,borderLeft:`2px solid var(--line-strong)`,padding:`0 16px !important`},".cm-lp-codeblock.cm-lp-fence":{lineHeight:`12px`,position:`relative`},".cm-lp-lang":{position:`absolute`,top:`8px`,right:`12px`,fontFamily:`var(--font-ui)`,fontSize:`12px`,lineHeight:`16px`,color:`var(--text-faint)`,pointerEvents:`none`},".cm-lp-mathsrc":{fontFamily:`var(--font-mono)`,fontSize:`.86em`,color:`var(--text-soft)`},".cm-lp-imaths .katex":{fontSize:`1.05em`},".cm-lp-imaths .katex-display":{margin:`0`,padding:`6px 0`},".cm-lp-imaths .katex-display > .katex":{fontSize:`1.17em`},".cm-lp-hr":{display:`inline-block`,width:`100%`,borderTop:`1px solid var(--line)`,verticalAlign:`middle`}});function Wi(e){let t=e.split(`#`)[0];return t.startsWith(`/`)&&t.endsWith(`.md`)?t.slice(1,-3):null}var Gi=L.define(),Ki=L.define(),qi=[R.define({create:()=>I.none,update(e,t){for(let e of t.effects){if(!e.is(Ki))continue;let n=t.state.doc,r=e.value;if(!r)return I.none;let i=I.line({class:`cm-touched cm-touched-${r.who}`});return I.set([...new Set(r.lines)].filter(e=>e>=0&&e<n.lines&&n.line(e+1).text.trim()!==``).sort((e,t)=>e-t).map(e=>i.range(n.line(e+1).from)))}return t.docChanged?e.map(t.changes):e},provide:e=>M.decorations.from(e)}),M.theme({".cm-line.cm-touched-you":{background:`var(--lattice-soft)`,boxShadow:`-10px 0 0 var(--lattice-soft), -13px 0 0 var(--lattice), 10px 0 0 var(--lattice-soft)`},".cm-line.cm-touched-iso":{background:`var(--growth-soft)`,boxShadow:`-10px 0 0 var(--growth-soft), -13px 0 0 var(--growth), 10px 0 0 var(--growth-soft)`}})],Ji=L.define(),Yi=class extends P{key;mount;block;down=null;watch=null;constructor(e,t,n){super(),this.key=e,this.mount=t,this.block=n}eq(e){return e.key===this.key&&e.block===this.block}toDOM(e){let t=document.createElement(this.block?`div`:`span`);return t.className=this.block?`cm-overlay`:`cm-iso-change`,t.contentEditable=`false`,this.down=this.mount(t,this.key),this.watch=new ResizeObserver(()=>e.requestMeasure()),this.watch.observe(t),t}destroy(){this.watch?.disconnect(),this.watch=null,this.down?.(),this.down=null}ignoreEvent(){return!0}get estimatedHeight(){return this.block?120:-1}};function Xi(e){return[R.define({create:()=>I.none,update(t,n){for(let t of n.effects){if(!t.is(Gi))continue;let r=n.state.doc;return I.set(t.value.map(t=>{let n=t.line>=r.lines,i=n?r.length:r.line(Math.max(1,t.line+1)).from;return I.widget({widget:new Yi(t.key,e,!0),block:!0,side:n?1:-1}).range(i)}),!0)}return n.docChanged?t.map(n.changes):t},provide:e=>M.decorations.from(e)}),R.define({create:()=>I.none,update(t,n){for(let t of n.effects){if(!t.is(Ji))continue;let r=n.state.doc.length,i=[];for(let e of t.value.marks){let t=Math.max(0,Math.min(r,e.from)),n=Math.max(0,Math.min(r,e.to));n>t&&i.push(I.mark({class:`cm-iso-${e.kind}`}).range(t,n))}for(let n of t.value.inline)i.push(I.widget({widget:new Yi(n.key,e,!1),side:1}).range(Math.max(0,Math.min(r,n.at))));return I.set(i,!0)}return n.docChanged?t.map(n.changes):t},provide:e=>M.decorations.from(e)}),M.theme({".cm-overlay":{cursor:`default`,userSelect:`text`,padding:`10px 0`,display:`flow-root`,whiteSpace:`normal`},".cm-iso-picked":{background:`var(--lattice-soft)`,boxShadow:`inset 0 -2px 0 var(--lattice)`,cursor:`pointer`},".cm-iso-old":{textDecoration:`line-through`,textDecorationColor:`var(--text-faint)`,color:`var(--text-faint)`},".cm-iso-old *":{color:`var(--text-faint) !important`},".cm-iso-change":{cursor:`default`},".cm-iso-by-iso":{background:`var(--growth-soft)`,boxShadow:`inset 0 -1.5px 0 var(--growth)`},".cm-iso-given":{textDecoration:`underline dashed var(--growth)`,textUnderlineOffset:`4px`,textDecorationThickness:`1.5px`}})]}function Zi(e){let t=e.split(`#`)[0].split(`?`)[0];return!t.startsWith(`/`)||t.startsWith(`//`)?null:t.endsWith(`.md`)?{id:decodeURIComponent(t.slice(1,-3)),folder:!1}:t.endsWith(`/`)&&t.length>1?{id:decodeURIComponent(t.slice(1,-1)),folder:!0}:null}var Qi=L.define(),$i=I.mark({class:`cm-pointed`});function ea(e,t){if(!t)return I.none;let n=[];return j(e).iterate({enter:r=>{if(r.name!==`Link`)return;let i=J(e,r.from+1);return i&&!i.embed&&i.from===r.from&&Zi(i.url)?.id===t&&n.push($i.range(i.from,i.to)),!1}}),I.set(n)}var ta=R.define({create:()=>({id:``,marks:I.none}),update(e,t){let n=e.id;for(let e of t.effects)e.is(Qi)&&(n=e.value);return n!==e.id||n&&t.docChanged?{id:n,marks:ea(t.state,n)}:e},provide:e=>M.decorations.from(e,e=>e.marks)}),na=M.theme({".cm-pointed":{backgroundColor:`var(--lattice-soft)`,boxShadow:`0 2px 0 var(--lattice)`}});function ra(e){if(!e)return[ta,na];let t=``,n=n=>{let r=n?`${n.folder?`d`:`n`}:${n.id}`:``;r!==t&&(t=r,e(n))};return[ta,na,M.domEventHandlers({pointermove(e,t){if(e.pointerType!==`mouse`)return!1;let r=t.posAtCoords({x:e.clientX,y:e.clientY},!1),i=r===null?null:J(t.state,r);return n(i&&!i.embed?Zi(i.url):null),!1},pointerleave(){return n(null),!1}})]}var ia=M.theme({".cm-scroller":{fontFamily:`var(--font-mono)`,fontSize:`14px`,lineHeight:`1.6`}}),aa=M.theme({"&":{color:`var(--text)`,backgroundColor:`transparent`,fontSize:`16px`},"&.cm-focused":{outline:`none`},".cm-scroller":{overflow:`visible`},".cm-content":{padding:`12px 0 40vh`,caretColor:`var(--lattice)`},".cm-line":{padding:`0 2px`},".cm-cursor, .cm-dropCursor":{borderLeftColor:`var(--lattice)`,borderLeftWidth:`2px`},".cm-selectionBackground":{backgroundColor:`color-mix(in srgb, var(--lattice) 22%, transparent) !important`},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-content ::selection":{backgroundColor:`color-mix(in srgb, var(--lattice) 40%, transparent) !important`},".cm-placeholder":{color:`var(--text-faint)`},".cm-tooltip-autocomplete":{background:`var(--ground-1)`,border:`1px solid var(--line-strong)`,fontFamily:`var(--font-ui)`,fontSize:`13px`},".cm-tooltip.cm-tooltip-autocomplete > ul":{fontFamily:`var(--font-ui)`,maxHeight:`16em`},".cm-tooltip-autocomplete > ul > li":{padding:`6px 10px !important`,lineHeight:`1.3`},".cm-tooltip-autocomplete > ul > li[aria-selected]":{background:`var(--lattice-soft)`,color:`var(--text)`},".cm-completionDetail":{color:`var(--text-faint)`,fontStyle:`normal`,marginLeft:`10px`}}),oa=Qe.define([{tag:F.heading,fontWeight:`700`,color:`var(--text)`},{tag:F.strong,fontWeight:`700`},{tag:F.emphasis,fontStyle:`italic`},{tag:F.strikethrough,textDecoration:`line-through`},{tag:[F.link,F.url],color:`var(--lattice)`},{tag:[F.processingInstruction,F.punctuation,F.contentSeparator],color:`var(--text-faint)`},{tag:F.monospace,color:`var(--text-soft)`},{tag:F.quote,color:`var(--text-soft)`,fontStyle:`italic`}]);function sa(e){let t=e.selection.main;return{line:e.doc.lineAt(t.to).number-1,from:t.from,to:t.to}}function ca(e,t){let n=We.create({doc:t.doc,extensions:[jt(),Be(),M.lineWrapping,Ce({base:pe,extensions:[Ai],completeHTMLTags:!1,codeLanguages:be}),Pe(oa),Pe(de),aa,...t.source?[ia]:[Hi,Ui,Ur,Wr,hi,...t.embeds?[Nr.of(t.embeds)]:[],...t.codeBroken?[Vi.of(t.codeBroken)]:[]],ct(),We.languageData.of(()=>[{closeBrackets:{brackets:[`(`,`[`]}}]),...t.mountOverlay?[Xi(t.mountOverlay)]:[],qi,ra(t.onPoint),...t.readOnly?[We.readOnly.of(!0),M.editable.of(!1)]:[],vi(t.notes),Ie(t.placeholder??`Write the note here. # for a heading, [[ to link to another note, $x$ for maths.`),M.contentAttributes.of({"aria-label":t.label,spellcheck:`true`,autocapitalize:`sentences`,autocorrect:`on`}),Ne.of([{key:`Mod-s`,preventDefault:!0,run:()=>(t.onSave(),!0)},{key:`Mod-Enter`,preventDefault:!0,run:e=>(t.onAsk?.(sa(e.state)),!!t.onAsk)},...Xr,...it,...st,Mr,...jr,...Jt]),M.domEventHandlers((()=>{let e=(e,n)=>{if(!t.picking?.())return;let r=e.state.selection,i=r.ranges.filter(e=>!e.empty).map(e=>({from:e.from,to:e.to}));i.length?(t.onPick?.(i),setTimeout(()=>e.dispatch({selection:{anchor:Math.min(r.main.head,e.state.doc.length)}}),0)):n&&t.onUnpick?.(r.main.head)};return{mouseup:(t,n)=>(e(n,t.detail===1),!1),touchend:(t,n)=>(e(n,!1),!1),keyup:(t,n)=>(t.key===`Shift`&&e(n,!1),!1)}})()),M.domEventHandlers({mousedown(e,n){if(!t.onFollow||!(e.ctrlKey||e.metaKey)||e.button!==0)return!1;let r=n.posAtCoords({x:e.clientX,y:e.clientY},!1),i=r===null?null:J(n.state,r),a=i&&!i.embed?Wi(i.url):null;return a!==null&&(e.preventDefault(),t.onFollow(a),!0)}}),M.updateListener.of(e=>{e.docChanged&&t.onChange(e.state.doc.toString()),t.onCursor&&(e.selectionSet||e.docChanged)&&t.onCursor(sa(e.state))})]});return new M({state:n,parent:e})}function la(e,t){if(t===e.state.doc.toString())return;let n=Math.min(e.state.selection.main.head,t.length);e.dispatch({changes:{from:0,to:e.state.doc.length,insert:t},selection:{anchor:n}})}var ua=S(`<span class="soft picked svelte-192cp36" role="status"> </span>`),da=S(`<div class="between svelte-192cp36"><!> <div class="ask svelte-192cp36"><i class="dia open svelte-192cp36" aria-hidden="true"></i> <textarea rows="1" aria-label="Ask Iso" class="svelte-192cp36"></textarea></div> <div class="foot svelte-192cp36"><span class="grow"></span> <button class="link faint svelte-192cp36" type="button">cancel</button> <button class="btn primary" type="button">ask Iso</button></div></div>`),fa=S(`<div class="prose said svelte-192cp36"></div>`),pa=S(`<span class="faint"> </span>`),ma=S(`<div class="between working svelte-192cp36" aria-live="polite"><!> <div class="foot svelte-192cp36"><i class="dia svelte-192cp36" aria-hidden="true"></i> <span class="soft doing svelte-192cp36"> <!></span> <span class="grow"></span> <button class="link svelte-192cp36" type="button">stop</button></div></div>`),ha=S(`<div class="between stopped svelte-192cp36" role="alert"><p class="bad svelte-192cp36"> </p> <div class="foot svelte-192cp36"><span class="grow"></span><button class="link svelte-192cp36" type="button">dismiss</button></div></div>`),ga=S(`<p class="soft lost svelte-192cp36"><span class="strike svelte-192cp36"> </span> </p>`),_a=S(`<div class="between stopped svelte-192cp36"><p class="label"> </p> <!> <div class="foot svelte-192cp36"><span class="grow"></span><button class="btn remove" type="button">remove</button></div></div>`),va=S(`<p class="label">The place this was written for is no longer in the note, so it is shown here. Keeping it adds it at the end.</p>`),ya=S(`<textarea class="revision svelte-192cp36" aria-label="Iso's text, to edit"></textarea>`),ba=S(`<p class="label"> </p>`),xa=S(`<button class="btn edit" type="button">done</button>`),Sa=S(`<button class="btn edit" type="button">edit</button>`),Ca=S(`<div class="between svelte-192cp36"><!> <!> <!> <div class="foot svelte-192cp36"><i class="dia svelte-192cp36" aria-hidden="true"></i> <span class="grow"></span> <button class="btn keep" type="button">keep</button> <!> <button class="btn remove" type="button">remove</button></div></div>`);function wa(n,i){T(i,!0);let l=x(i,`iso`,7),u=D(()=>i.key.startsWith(`p:`)?l().proposals.find(e=>e.id===i.key.slice(2)):void 0),b=D(()=>c(u)&&l().editing?.id===c(u).id?l().editing:null),S=D(()=>!!c(u)&&l().busy===c(u)?.id),w=D(()=>l().changes.filter(e=>!e.at)),O=e(``),k=e(void 0);m(()=>{i.key===`prompt`&&ae().then(()=>c(k)?.focus())});let oe=D(()=>l().asking?.steps.at(-1)?.said??``),se=D(()=>(l().asking?.regions.length??0)>0),ce=D(()=>l().prompt?.mode===`rewrite`),le=D(()=>l().prompt?.regions.length??0),ue=D(()=>!!c(O).trim()&&(!c(ce)||c(le)>0));function de(e){e.key===`Enter`&&!e.shiftKey?(e.preventDefault(),l().ask(c(O))):e.key===`Escape`&&(e.preventDefault(),l().prompt=null)}var fe=t(),pe=s(fe),me=e=>{var t=da(),n=E(t),i=e=>{var t=ua(),n=g(t,!0);o(()=>r(n,c(le)===0?`select text in the note to rewrite`:`rewriting ${c(le)} ${c(le)===1?`passage`:`passages`} · select more, or click one to drop it`)),C(e,t)};p(n,e=>{c(ce)&&e(i)});var s=h(n,2),u=h(E(s),2);te(u),ne(u,e=>d(k,e),()=>c(k)),y(s);var f=h(s,2),m=h(E(f),2),_=h(m,2);y(f),y(t),o(()=>{ee(u,`placeholder`,c(ce)?`how should Iso rewrite it?`:`what should Iso write here?`),_.disabled=!c(ue)}),a(`keydown`,u,de),re(u,()=>c(O),e=>d(O,e)),a(`click`,m,()=>l().prompt=null),a(`click`,_,()=>l().ask(c(O))),C(e,t)},he=e=>{var t=ma(),n=E(t),i=e=>{var t=fa();ie(t,()=>ge(l().asking.text),!0),y(t),_(t,(e,t)=>we?.(e,t),()=>l().asking.text),C(e,t)};p(n,e=>{l().asking.text&&!c(se)&&e(i)});var s=h(n,2),u=h(E(s),2),d=E(u,!0),f=h(d),m=e=>{var t=pa(),n=g(t);o(()=>r(n,`· ${c(oe)??``}`)),C(e,t)};p(f,e=>{c(oe)&&e(m)}),y(u);var v=h(u,4);y(s),y(t),o(()=>r(d,l().asking.text?c(se)?`Iso is rewriting`:`Iso is writing`:`Iso is thinking`)),a(`click`,v,()=>l().halt()),C(e,t)},_e=e=>{var t=ha(),n=E(t),i=g(n,!0),s=h(n,2),c=h(E(s));y(s),y(t),o(()=>r(i,l().failed.message)),a(`click`,c,()=>l().failed=null),C(e,t)},ve=e=>{var t=_a(),n=E(t),i=g(n),s=h(n,2);f(s,17,()=>c(w),e=>e.key,(e,t)=>{var n=ga(),i=E(n),a=g(i,!0),s=h(i);y(n),o((e,t)=>{r(a,e),r(s,` → ${t??``}`)},[()=>c(t).proposal.regions[c(t).k].old.text.trim(),()=>c(t).proposal.regions[c(t).k].new.trim()||`(taken out)`]),C(e,n)});var u=h(s,2),d=h(E(u));y(u),y(t),o(()=>r(i,`${c(w).length===1?`One change Iso offered is`:`${c(w).length} changes Iso offered are`} for text that is no longer in the note as it was, so ${c(w).length===1?`it`:`they`} cannot be kept.`)),a(`click`,d,()=>{for(let e of c(w))l().discardChange(e)}),C(e,t)},ye=e=>{var t=Ca(),n=E(t),i=e=>{var t=va();C(e,t)},s=D(()=>!l().placed(c(u)));p(n,e=>{c(s)&&e(i)});var d=h(n,2),f=e=>{var t=ya();te(t),o(e=>ee(t,`rows`,e),[()=>Math.max(3,c(b).text.split(`
6
+ `).length+1)]),re(t,()=>c(b).text,e=>c(b).text=e),C(e,t)},m=e=>{var t=fa();ie(t,()=>ge(c(u).text),!0),y(t),_(t,(e,t)=>we?.(e,t),()=>({given:c(u).text,copy:!0})),C(e,t)};p(d,e=>{c(b)?e(f):e(m,-1)});var v=h(d,2),x=e=>{var t=ba(),n=g(t,!0);o(()=>r(n,c(u).notice)),C(e,t)};p(v,e=>{c(u).notice&&e(x)});var w=h(v,2),T=h(E(w),4),ne=h(T,2),ae=e=>{var t=xa();a(`click`,t,()=>l().done(c(u))),C(e,t)},O=e=>{var t=Sa();o(()=>t.disabled=c(S)),a(`click`,t,()=>l().edit(c(u))),C(e,t)};p(ne,e=>{c(b)?e(ae):e(O,-1)});var k=h(ne,2);y(w),y(t),o(()=>{ee(t,`data-proposal`,c(u).id),T.disabled=c(S),k.disabled=c(S)}),a(`click`,T,()=>l().keep(c(u))),a(`click`,k,()=>l().discard(c(u))),C(e,t)};p(pe,e=>{i.key===`prompt`?e(me):i.key===`asking`&&l().asking?e(he,1):i.key===`failed`&&l().failed?e(_e,2):i.key===`lost`&&c(w).length?e(ve,3):c(u)&&e(ye,4)}),C(n,fe),v()}u([`keydown`,`click`]);var Ta=S(`<span class="label who svelte-1o10yjh"> </span>`),Ea=S(`<!> <span class="act svelte-1o10yjh"><button class="keep svelte-1o10yjh" type="button" aria-label="Keep this change">keep</button><button class="remove svelte-1o10yjh" type="button" aria-label="Remove this change">remove</button></span>`,1),Da=S(`<span class="gone svelte-1o10yjh">the passage above is taken out</span>`),Oa=S(`<pre class="new svelte-1o10yjh"> </pre>`),ka=S(`<div class="new prose svelte-1o10yjh"></div>`),Aa=S(`<div><!> <div class="foot svelte-1o10yjh"><i class="dia svelte-1o10yjh" aria-hidden="true"></i><span class="label">in place of the lines struck through above</span><span class="grow"></span><!></div></div>`),ja=S(`<span class="new svelte-1o10yjh"></span>`),Ma=S(`<span class="gone svelte-1o10yjh">taken out</span>`),Na=S(`<span class="change svelte-1o10yjh"><!> <!></span>`);function Pa(e,n){T(n,!0);let i=e=>{var t=Ea(),i=s(t),u=e=>{var t=Ta(),n=g(t,!0);o(()=>{ee(t,`title`,c(l)?.proposal.asked),r(n,c(x))}),C(e,t)};p(i,e=>{c(x)&&e(u)});var f=h(i,2),m=E(f),_=h(m);y(f),o(()=>{m.disabled=c(d),_.disabled=c(d)}),a(`click`,m,()=>c(l)&&n.iso.keepChange(c(l))),a(`click`,_,()=>c(l)&&n.iso.discardChange(c(l))),C(e,t)},l=D(()=>n.iso.changes.find(e=>e.key===n.key)),u=D(()=>c(l)?c(l).proposal.regions[c(l).k].new:``),d=D(()=>n.iso.busy===n.key||n.iso.busy===`all`),f=D(()=>ge(c(u).trim())),m=D(()=>c(f).replace(/^<p>([\s\S]*)<\/p>\s*$/,`$1`)),x=D(()=>c(l)?he(c(l).proposal.who):``);var S=t(),w=s(S),te=e=>{var t=Aa();let a;var s=E(t),d=e=>{var t=Da();C(e,t)},m=D(()=>!c(u).trim()),v=e=>{var t=Oa(),n=g(t,!0);o(e=>r(n,e),[()=>c(u).replace(/^\n+|\s+$/g,``)]),C(e,t)},x=e=>{var t=ka();ie(t,()=>c(f),!0),y(t),_(t,(e,t)=>we?.(e,t),()=>c(f)),C(e,t)};p(s,e=>{c(m)?e(d):c(l).code?e(v,1):e(x,-1)});var S=h(s,2),w=h(E(S),3);i(w),y(S),y(t),o(()=>{a=b(t,1,`change block svelte-1o10yjh`,null,a,{code:c(l).code}),ee(t,`data-change`,n.key)}),C(e,t)},ne=e=>{var t=Na(),r=E(t),a=e=>{var t=ja();ie(t,()=>c(m),!0),y(t),C(e,t)},s=D(()=>c(u).trim()),l=e=>{var t=Ma();C(e,t)};p(r,e=>{c(s)?e(a):e(l,-1)});var d=h(r,2);i(d),y(t),o(()=>ee(t,`data-change`,n.key)),C(e,t)};p(w,e=>{c(l)?.block?e(te):c(l)&&e(ne,1)}),C(e,S),v()}u([`click`]);var Fa=S(`<div></div>`);function Ia(t,r){T(r,!0);let a=x(r,`iso`,7),s=x(r,`touched`,3,null),u=x(r,`lens`,19,()=>[]),f,p=e(void 0),h=D(()=>r.source||!a()?{lines:0,chars:0}:a().head),g=D(()=>{if(!a())return{blocks:[],marks:[],inline:[]};let e=e=>t=>({kind:e,from:t.from-c(h).chars,to:t.to-c(h).chars});return{blocks:a().layout.blocks.map(e=>({key:e.key,line:Math.max(0,e.line-c(h).lines)})).sort((e,t)=>e.line-t.line),marks:[...a().layout.picked.map(e(`picked`)),...a().layout.old.map(e(`old`)),...u().map(t=>e(t.kind)(t))].filter(e=>e.to>0),inline:a().layout.inline.map(e=>({key:e.key,at:e.at-c(h).chars})).filter(e=>e.at>=0)}});w(()=>{let e=ca(f,{doc:r.source?r.note.text:r.note.body,source:r.source,label:r.source?`The note's file`:`The note`,notes:()=>A.listing.notes.filter(e=>e.id!==r.note.id).map(e=>({id:e.id,title:e.title,folder:e.dir})),onChange:e=>r.source?r.note.setText(e):r.note.setBody(e),onSave:()=>{r.note.save()},onFollow:e=>{O(Ae(e))},embeds:{find:ke,open:e=>{O(Ae(e))}},onPoint:e=>me.set(`note`,e?{...e,who:`you`}:null),codeBroken:e=>A.listing.notes.find(e=>e.id===r.note.id)?.broken?.includes(e)??!1,...a()?{onAsk:e=>{let t=r.note.text.slice(e.from+c(h).chars,e.to+c(h).chars).trim();t&&ve.add({kind:`passage`,id:r.note.id,title:r.note.fields.title||r.note.id,text:t}),Me.to(`iso`),requestAnimationFrame(()=>document.getElementById(`iso-box`)?.focus())},onCursor:e=>{a().cursor={line:e.line+c(h).lines,from:e.from+c(h).chars,to:e.to+c(h).chars}},picking:()=>a().picking,onPick:e=>a().pick(e.map(e=>({from:e.from+c(h).chars,to:e.to+c(h).chars}))),onUnpick:e=>a().unpick(e+c(h).chars),mountOverlay:(e,t)=>{let n=i(t.startsWith(`r:`)?Pa:wa,{target:e,props:{iso:a(),key:t}});return()=>{l(n)}}}:{placeholder:n(()=>r.placeholder)??`Write what you understand, what you do not, and what you want from Iso. [[ links a note it should rest on.`}});return d(p,e),()=>{e.destroy(),me.set(`note`,null)}}),m(()=>{r.note.revision,n(()=>{c(p)&&la(c(p),r.source?r.note.text:r.note.body)})}),m(()=>{let e=s(),t=c(h).lines;c(p)&&c(p).dispatch({effects:Ki.of(e?{who:e.who,lines:e.lines.map(e=>e-t)}:null)})}),m(()=>{let e=me.onAtlas;c(p)&&c(p).dispatch({effects:Qi.of(e)})}),m(()=>{let{blocks:e,marks:t,inline:n}=c(g);c(p)&&c(p).dispatch({effects:[Gi.of(e),Ji.of({marks:t,inline:n})]})});var _=Fa();let y;ne(_,e=>f=e,()=>f),o(()=>y=b(_,1,`editor svelte-hrl8lz`,null,y,{source:r.source})),C(t,_),v()}export{mt as a,Ki as i,ca as n,lt as o,la as r,Ia as t};
@@ -1,5 +1,5 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./DIGvaVgJ.js","./BxTFtVqu.js","./yxd8jSz3.js","./Cq5C893B.js","./C6Btt2Xs.js","./DtbnBenW.js","./D_aBVMvK.js","./Bbt0DTmZ.js","./K_3X9lyC.js","./CWmfjLLv.js","./CDAjAYjS.js","./_rHYGvON.js","./WBFggAXs.js","./BoNMG-YE.js","./Bffqt7tx.js","./BWonG38x.js","./BEHa2uNW.js","./BPW39P52.js","./Ds8Pkiic.js","./CPF5uNy5.js","./DLa7NjNO.js","./DXiLM1-G.js","./CygcOYNo.js","./GwMd3KmG.js","./Cp5ooBfH.js","./Bu8mWwtz.js","./Cn-vtDpV.js","./B7GA1FFB.js","./8wVGBFSs.js","./nMarIA7J.js","./CRzLMJPS.js"])))=>i.map(i=>d[i]);
2
- import{$ as e,L as t,Q as n,Z as r,_t as i,gt as a,ht as o}from"./nMarIA7J.js";import{t as s}from"./CRzLMJPS.js";import{t as c}from"./DkvLWnSd.js";import{i as l}from"./B3dCo0od.js";import{A as u,B as d,C as f,D as p,F as m,J as h,M as g,O as _,Q as v,S as y,Y as b,_ as ee,a as x,b as S,bt as te,c as ne,d as C,g as re,gt as ie,ht as ae,i as oe,j as se,k as ce,lt as le,mt as ue,o as de,p as fe,s as pe,vt as me,yt as he}from"./BxTFtVqu.js";import{t as ge}from"./yxd8jSz3.js";var _e=Symbol.for(`yaml.alias`),ve=Symbol.for(`yaml.document`),ye=Symbol.for(`yaml.map`),be=Symbol.for(`yaml.pair`),xe=Symbol.for(`yaml.scalar`),Se=Symbol.for(`yaml.seq`),Ce=Symbol.for(`yaml.node.type`),we=e=>!!e&&typeof e==`object`&&e[Ce]===_e,w=e=>!!e&&typeof e==`object`&&e[Ce]===ve,Te=e=>!!e&&typeof e==`object`&&e[Ce]===ye,Ee=e=>!!e&&typeof e==`object`&&e[Ce]===be,T=e=>!!e&&typeof e==`object`&&e[Ce]===xe,De=e=>!!e&&typeof e==`object`&&e[Ce]===Se;function Oe(e){if(e&&typeof e==`object`)switch(e[Ce]){case ye:case Se:return!0}return!1}function ke(e){if(e&&typeof e==`object`)switch(e[Ce]){case _e:case ye:case xe:case Se:return!0}return!1}var Ae=e=>(T(e)||Oe(e))&&!!e.anchor,je=Symbol(`break visit`),Me=Symbol(`skip children`),Ne=Symbol(`remove node`);function Pe(e,t){let n=Ie(t);w(e)?Fe(null,e.contents,n,Object.freeze([e]))===Ne&&(e.contents=null):Fe(null,e,n,Object.freeze([]))}Pe.BREAK=je,Pe.SKIP=Me,Pe.REMOVE=Ne;function Fe(e,t,n,r){let i=Le(e,t,n,r);if(ke(i)||Ee(i))return Re(e,r,i),Fe(e,i,n,r);if(typeof i!=`symbol`){if(Oe(t)){r=Object.freeze(r.concat(t));for(let e=0;e<t.items.length;++e){let i=Fe(e,t.items[e],n,r);if(typeof i==`number`)e=i-1;else if(i===je)return je;else i===Ne&&(t.items.splice(e,1),--e)}}else if(Ee(t)){r=Object.freeze(r.concat(t));let e=Fe(`key`,t.key,n,r);if(e===je)return je;e===Ne&&(t.key=null);let i=Fe(`value`,t.value,n,r);if(i===je)return je;i===Ne&&(t.value=null)}}return i}function Ie(e){return typeof e==`object`&&(e.Collection||e.Node||e.Value)?Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e):e}function Le(e,t,n,r){if(typeof n==`function`)return n(e,t,r);if(Te(t))return n.Map?.(e,t,r);if(De(t))return n.Seq?.(e,t,r);if(Ee(t))return n.Pair?.(e,t,r);if(T(t))return n.Scalar?.(e,t,r);if(we(t))return n.Alias?.(e,t,r)}function Re(e,t,n){let r=t[t.length-1];if(Oe(r))r.items[e]=n;else if(Ee(r))e===`key`?r.key=n:r.value=n;else if(w(r))r.contents=n;else{let e=we(r)?`alias`:`scalar`;throw Error(`Cannot replace node with ${e} parent`)}}var ze={"!":`%21`,",":`%2C`,"[":`%5B`,"]":`%5D`,"{":`%7B`,"}":`%7D`},Be=e=>e.replace(/[!,[\]{}]/g,e=>ze[e]),Ve=class e{constructor(t,n){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},e.defaultYaml,t),this.tags=Object.assign({},e.defaultTags,n)}clone(){let t=new e(this.yaml,this.tags);return t.docStart=this.docStart,t}atDocument(){let t=new e(this.yaml,this.tags);switch(this.yaml.version){case`1.1`:this.atNextDocument=!0;break;case`1.2`:this.atNextDocument=!1,this.yaml={explicit:e.defaultYaml.explicit,version:`1.2`},this.tags=Object.assign({},e.defaultTags)}return t}add(t,n){this.atNextDocument&&=(this.yaml={explicit:e.defaultYaml.explicit,version:`1.1`},this.tags=Object.assign({},e.defaultTags),!1);let r=t.trim().split(/[ \t]+/),i=r.shift();switch(i){case`%TAG`:{if(r.length!==2&&(n(0,`%TAG directive should contain exactly two parts`),r.length<2))return!1;let[e,t]=r;return this.tags[e]=t,!0}case`%YAML`:{if(this.yaml.explicit=!0,r.length!==1)return n(0,`%YAML directive should contain exactly one part`),!1;let[e]=r;if(e===`1.1`||e===`1.2`)return this.yaml.version=e,!0;{let t=/^\d+\.\d+$/.test(e);return n(6,`Unsupported YAML version ${e}`,t),!1}}default:return n(0,`Unknown directive ${i}`,!0),!1}}tagName(e,t){if(e===`!`)return`!`;if(e[0]!==`!`)return t(`Not a valid tag: ${e}`),null;if(e[1]===`<`){let n=e.slice(2,-1);return n===`!`||n===`!!`?(t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==`>`&&t(`Verbatim tags must end with a >`),n)}let[,n,r]=e.match(/^(.*!)([^!]*)$/s);r||t(`The ${e} tag has no suffix`);let i=this.tags[n];if(i)try{return i+decodeURIComponent(r)}catch(e){return t(String(e)),null}return n===`!`?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(let[t,n]of Object.entries(this.tags))if(e.startsWith(n))return t+Be(e.substring(n.length));return e[0]===`!`?e:`!<${e}>`}toString(e){let t=this.yaml.explicit?[`%YAML ${this.yaml.version||`1.2`}`]:[],n=Object.entries(this.tags),r;if(e&&n.length>0&&ke(e.contents)){let t={};Pe(e.contents,(e,n)=>{ke(n)&&n.tag&&(t[n.tag]=!0)}),r=Object.keys(t)}else r=[];for(let[i,a]of n)(i!==`!!`||a!==`tag:yaml.org,2002:`)&&(!e||r.some(e=>e.startsWith(a)))&&t.push(`%TAG ${i} ${a}`);return t.join(`
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./DIGvaVgJ.js","./BxTFtVqu.js","./yxd8jSz3.js","./Cq5C893B.js","./C6Btt2Xs.js","./DtbnBenW.js","./D_aBVMvK.js","./Bbt0DTmZ.js","./K_3X9lyC.js","./D_JZ0swv.js","./CDAjAYjS.js","./_rHYGvON.js","./DgZW3JtG.js","./dvrIP-Hm.js","./Bffqt7tx.js","./BWonG38x.js","./BEHa2uNW.js","./BPW39P52.js","./Ds8Pkiic.js","./CPF5uNy5.js","./DLa7NjNO.js","./DXiLM1-G.js","./CygcOYNo.js","./GwMd3KmG.js","./Cp5ooBfH.js","./Bu8mWwtz.js","./BjPiibIz.js","./BtUtjfIh.js","./8wVGBFSs.js","./nMarIA7J.js","./CRzLMJPS.js"])))=>i.map(i=>d[i]);
2
+ import{$ as e,L as t,Q as n,Z as r,_t as i,gt as a,ht as o}from"./nMarIA7J.js";import{t as s}from"./CRzLMJPS.js";import{t as c}from"./CnP_Si9g.js";import{i as l}from"./hOAYc4Tf.js";import{A as u,B as d,C as f,D as p,F as m,J as h,M as g,O as _,Q as v,S as y,Y as b,_ as ee,a as x,b as S,bt as te,c as ne,d as C,g as re,gt as ie,ht as ae,i as oe,j as se,k as ce,lt as le,mt as ue,o as de,p as fe,s as pe,vt as me,yt as he}from"./BxTFtVqu.js";import{t as ge}from"./yxd8jSz3.js";var _e=Symbol.for(`yaml.alias`),ve=Symbol.for(`yaml.document`),ye=Symbol.for(`yaml.map`),be=Symbol.for(`yaml.pair`),xe=Symbol.for(`yaml.scalar`),Se=Symbol.for(`yaml.seq`),Ce=Symbol.for(`yaml.node.type`),we=e=>!!e&&typeof e==`object`&&e[Ce]===_e,w=e=>!!e&&typeof e==`object`&&e[Ce]===ve,Te=e=>!!e&&typeof e==`object`&&e[Ce]===ye,Ee=e=>!!e&&typeof e==`object`&&e[Ce]===be,T=e=>!!e&&typeof e==`object`&&e[Ce]===xe,De=e=>!!e&&typeof e==`object`&&e[Ce]===Se;function Oe(e){if(e&&typeof e==`object`)switch(e[Ce]){case ye:case Se:return!0}return!1}function ke(e){if(e&&typeof e==`object`)switch(e[Ce]){case _e:case ye:case xe:case Se:return!0}return!1}var Ae=e=>(T(e)||Oe(e))&&!!e.anchor,je=Symbol(`break visit`),Me=Symbol(`skip children`),Ne=Symbol(`remove node`);function Pe(e,t){let n=Ie(t);w(e)?Fe(null,e.contents,n,Object.freeze([e]))===Ne&&(e.contents=null):Fe(null,e,n,Object.freeze([]))}Pe.BREAK=je,Pe.SKIP=Me,Pe.REMOVE=Ne;function Fe(e,t,n,r){let i=Le(e,t,n,r);if(ke(i)||Ee(i))return Re(e,r,i),Fe(e,i,n,r);if(typeof i!=`symbol`){if(Oe(t)){r=Object.freeze(r.concat(t));for(let e=0;e<t.items.length;++e){let i=Fe(e,t.items[e],n,r);if(typeof i==`number`)e=i-1;else if(i===je)return je;else i===Ne&&(t.items.splice(e,1),--e)}}else if(Ee(t)){r=Object.freeze(r.concat(t));let e=Fe(`key`,t.key,n,r);if(e===je)return je;e===Ne&&(t.key=null);let i=Fe(`value`,t.value,n,r);if(i===je)return je;i===Ne&&(t.value=null)}}return i}function Ie(e){return typeof e==`object`&&(e.Collection||e.Node||e.Value)?Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e):e}function Le(e,t,n,r){if(typeof n==`function`)return n(e,t,r);if(Te(t))return n.Map?.(e,t,r);if(De(t))return n.Seq?.(e,t,r);if(Ee(t))return n.Pair?.(e,t,r);if(T(t))return n.Scalar?.(e,t,r);if(we(t))return n.Alias?.(e,t,r)}function Re(e,t,n){let r=t[t.length-1];if(Oe(r))r.items[e]=n;else if(Ee(r))e===`key`?r.key=n:r.value=n;else if(w(r))r.contents=n;else{let e=we(r)?`alias`:`scalar`;throw Error(`Cannot replace node with ${e} parent`)}}var ze={"!":`%21`,",":`%2C`,"[":`%5B`,"]":`%5D`,"{":`%7B`,"}":`%7D`},Be=e=>e.replace(/[!,[\]{}]/g,e=>ze[e]),Ve=class e{constructor(t,n){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},e.defaultYaml,t),this.tags=Object.assign({},e.defaultTags,n)}clone(){let t=new e(this.yaml,this.tags);return t.docStart=this.docStart,t}atDocument(){let t=new e(this.yaml,this.tags);switch(this.yaml.version){case`1.1`:this.atNextDocument=!0;break;case`1.2`:this.atNextDocument=!1,this.yaml={explicit:e.defaultYaml.explicit,version:`1.2`},this.tags=Object.assign({},e.defaultTags)}return t}add(t,n){this.atNextDocument&&=(this.yaml={explicit:e.defaultYaml.explicit,version:`1.1`},this.tags=Object.assign({},e.defaultTags),!1);let r=t.trim().split(/[ \t]+/),i=r.shift();switch(i){case`%TAG`:{if(r.length!==2&&(n(0,`%TAG directive should contain exactly two parts`),r.length<2))return!1;let[e,t]=r;return this.tags[e]=t,!0}case`%YAML`:{if(this.yaml.explicit=!0,r.length!==1)return n(0,`%YAML directive should contain exactly one part`),!1;let[e]=r;if(e===`1.1`||e===`1.2`)return this.yaml.version=e,!0;{let t=/^\d+\.\d+$/.test(e);return n(6,`Unsupported YAML version ${e}`,t),!1}}default:return n(0,`Unknown directive ${i}`,!0),!1}}tagName(e,t){if(e===`!`)return`!`;if(e[0]!==`!`)return t(`Not a valid tag: ${e}`),null;if(e[1]===`<`){let n=e.slice(2,-1);return n===`!`||n===`!!`?(t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==`>`&&t(`Verbatim tags must end with a >`),n)}let[,n,r]=e.match(/^(.*!)([^!]*)$/s);r||t(`The ${e} tag has no suffix`);let i=this.tags[n];if(i)try{return i+decodeURIComponent(r)}catch(e){return t(String(e)),null}return n===`!`?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(let[t,n]of Object.entries(this.tags))if(e.startsWith(n))return t+Be(e.substring(n.length));return e[0]===`!`?e:`!<${e}>`}toString(e){let t=this.yaml.explicit?[`%YAML ${this.yaml.version||`1.2`}`]:[],n=Object.entries(this.tags),r;if(e&&n.length>0&&ke(e.contents)){let t={};Pe(e.contents,(e,n)=>{ke(n)&&n.tag&&(t[n.tag]=!0)}),r=Object.keys(t)}else r=[];for(let[i,a]of n)(i!==`!!`||a!==`tag:yaml.org,2002:`)&&(!e||r.some(e=>e.startsWith(a)))&&t.push(`%TAG ${i} ${a}`);return t.join(`
3
3
  `)}};Ve.defaultYaml={explicit:!1,version:`1.2`},Ve.defaultTags={"!!":`tag:yaml.org,2002:`};function He(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){let t=`Anchor must not contain whitespace or control characters: ${JSON.stringify(e)}`;throw Error(t)}return!0}function Ue(e){let t=new Set;return Pe(e,{Value(e,n){n.anchor&&t.add(n.anchor)}}),t}function We(e,t){for(let n=1;;++n){let r=`${e}${n}`;if(!t.has(r))return r}}function Ge(e,t){let n=[],r=new Map,i=null;return{onAnchor:r=>{n.push(r),i??=Ue(e);let a=We(t,i);return i.add(a),a},setAnchors:()=>{for(let e of n){let t=r.get(e);if(typeof t==`object`&&t.anchor&&(T(t.node)||Oe(t.node)))t.node.anchor=t.anchor;else{let t=Error(`Failed to resolve repeated object (this should not happen)`);throw t.source=e,t}}},sourceObjects:r}}function Ke(e,t,n,r){if(r&&typeof r==`object`){if(Array.isArray(r))for(let t=0,n=r.length;t<n;++t){let n=r[t],i=Ke(e,r,String(t),n);i===void 0?delete r[t]:i!==n&&(r[t]=i)}else if(r instanceof Map)for(let t of Array.from(r.keys())){let n=r.get(t),i=Ke(e,r,t,n);i===void 0?r.delete(t):i!==n&&r.set(t,i)}else if(r instanceof Set)for(let t of Array.from(r)){let n=Ke(e,r,t,t);n===void 0?r.delete(t):n!==t&&(r.delete(t),r.add(n))}else for(let[t,n]of Object.entries(r)){let i=Ke(e,r,t,n);i===void 0?delete r[t]:i!==n&&(r[t]=i)}}return e.call(t,n,r)}function qe(e,t,n){if(Array.isArray(e))return e.map((e,t)=>qe(e,String(t),n));if(e&&typeof e.toJSON==`function`){if(!n||!Ae(e))return e.toJSON(t,n);let r={aliasCount:0,count:1,res:void 0};n.anchors.set(e,r),n.onCreate=e=>{r.res=e,delete n.onCreate};let i=e.toJSON(t,n);return n.onCreate&&n.onCreate(i),i}return typeof e==`bigint`&&!n?.keep?Number(e):e}var Je=class{constructor(e){Object.defineProperty(this,Ce,{value:e})}clone(){let e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:t,maxAliasCount:n,onAnchor:r,reviver:i}={}){if(!w(e))throw TypeError(`A document argument is required`);let a={anchors:new Map,doc:e,keep:!0,mapAsMap:t===!0,mapKeyWarned:!1,maxAliasCount:typeof n==`number`?n:100},o=qe(this,``,a);if(typeof r==`function`)for(let{count:e,res:t}of a.anchors.values())r(t,e);return typeof i==`function`?Ke(i,{"":o},``,o):o}},Ye=class extends Je{constructor(e){super(_e),this.source=e,Object.defineProperty(this,"tag",{set(){throw Error(`Alias nodes cannot have tags`)}})}resolve(e,t){if(t?.maxAliasCount===0)throw ReferenceError(`Alias resolution is disabled`);let n;t?.aliasResolveCache?n=t.aliasResolveCache:(n=[],Pe(e,{Node:(e,t)=>{(we(t)||Ae(t))&&n.push(t)}}),t&&(t.aliasResolveCache=n));let r;for(let e of n){if(e===this)break;e.anchor===this.source&&(r=e)}if(r&&t){let{anchors:e,doc:n,maxAliasCount:i}=t,a=e.get(r);if(a||=(qe(r,null,t),e.get(r)),a?.res===void 0)throw ReferenceError(`This should not happen: Alias anchor was not resolved?`);if(i>=0&&(a.count+=1,a.aliasCount===0&&(a.aliasCount=E(n,r,e)),a.count*a.aliasCount>i))throw ReferenceError(`Excessive alias count indicates a resource exhaustion attack`)}return r}toJSON(e,t){if(!t)return{source:this.source};let n=this.resolve(t.doc,t);if(!n){let e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw ReferenceError(e)}return t.anchors.get(n).res}toString(e,t,n){let r=`*${this.source}`;if(e){if(He(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){let e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw Error(e)}if(e.implicitKey)return`${r} `}return r}};function E(e,t,n){if(we(t)){let r=t.resolve(e),i=n&&r&&n.get(r);return i?i.count*i.aliasCount:0}if(Oe(t)){let r=0;for(let i of t.items){let t=E(e,i,n);t>r&&(r=t)}return r}if(Ee(t)){let r=E(e,t.key,n),i=E(e,t.value,n);return Math.max(r,i)}return 1}var D=e=>!e||typeof e!=`function`&&typeof e!=`object`,O=class extends Je{constructor(e){super(xe),this.value=e}toJSON(e,t){return t?.keep?this.value:qe(this.value,e,t)}toString(){return String(this.value)}};O.BLOCK_FOLDED=`BLOCK_FOLDED`,O.BLOCK_LITERAL=`BLOCK_LITERAL`,O.PLAIN=`PLAIN`,O.QUOTE_DOUBLE=`QUOTE_DOUBLE`,O.QUOTE_SINGLE=`QUOTE_SINGLE`;var k=`tag:yaml.org,2002:`;function Xe(e,t,n){if(t){let e=n.filter(e=>e.tag===t),r=e.find(e=>!e.format)??e[0];if(!r)throw Error(`Tag ${t} not found`);return r}return n.find(t=>t.identify?.(e)&&!t.format)}function Ze(e,t,n){if(w(e)&&(e=e.contents),ke(e))return e;if(Ee(e)){let t=n.schema[ye].createNode?.(n.schema,null,n);return t.items.push(e),t}(e instanceof String||e instanceof Number||e instanceof Boolean||typeof BigInt<`u`&&e instanceof BigInt)&&(e=e.valueOf());let{aliasDuplicateObjects:r,onAnchor:i,onTagObj:a,schema:o,sourceObjects:s}=n,c;if(r&&e&&typeof e==`object`){if(c=s.get(e),c)return c.anchor??(c.anchor=i(e)),new Ye(c.anchor);c={anchor:null,node:null},s.set(e,c)}t?.startsWith(`!!`)&&(t=k+t.slice(2));let l=Xe(e,t,o.tags);if(!l){if(e&&typeof e.toJSON==`function`&&(e=e.toJSON()),!e||typeof e!=`object`){let t=new O(e);return c&&(c.node=t),t}l=e instanceof Map?o[ye]:Symbol.iterator in Object(e)?o[Se]:o[ye]}a&&(a(l),delete n.onTagObj);let u=l?.createNode?l.createNode(n.schema,e,n):typeof l?.nodeClass?.from==`function`?l.nodeClass.from(n.schema,e,n):new O(e);return t?u.tag=t:l.default||(u.tag=l.tag),c&&(c.node=u),u}function Qe(e,t,n){let r=n;for(let e=t.length-1;e>=0;--e){let n=t[e];if(typeof n==`number`&&Number.isInteger(n)&&n>=0){let e=[];e[n]=r,r=e}else r=new Map([[n,r]])}return Ze(r,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw Error(`This should not happen, please report a bug.`)},schema:e,sourceObjects:new Map})}var A=e=>e==null||typeof e==`object`&&!!e[Symbol.iterator]().next().done,$e=class extends Je{constructor(e,t){super(e),Object.defineProperty(this,"schema",{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(e){let t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(t.schema=e),t.items=t.items.map(t=>ke(t)||Ee(t)?t.clone(e):t),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if(A(e))this.add(t);else{let[n,...r]=e,i=this.get(n,!0);if(Oe(i))i.addIn(r,t);else if(i===void 0&&this.schema)this.set(n,Qe(this.schema,r,t));else throw Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}}deleteIn(e){let[t,...n]=e;if(n.length===0)return this.delete(t);let r=this.get(t,!0);if(Oe(r))return r.deleteIn(n);throw Error(`Expected YAML collection at ${t}. Remaining path: ${n}`)}getIn(e,t){let[n,...r]=e,i=this.get(n,!0);return r.length===0?!t&&T(i)?i.value:i:Oe(i)?i.getIn(r,t):void 0}hasAllNullValues(e){return this.items.every(t=>{if(!Ee(t))return!1;let n=t.value;return n==null||e&&T(n)&&n.value==null&&!n.commentBefore&&!n.comment&&!n.tag})}hasIn(e){let[t,...n]=e;if(n.length===0)return this.has(t);let r=this.get(t,!0);return Oe(r)?r.hasIn(n):!1}setIn(e,t){let[n,...r]=e;if(r.length===0)this.set(n,t);else{let e=this.get(n,!0);if(Oe(e))e.setIn(r,t);else if(e===void 0&&this.schema)this.set(n,Qe(this.schema,r,t));else throw Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}}},et=e=>e.replace(/^(?!$)(?: $)?/gm,`#`);function tt(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}var nt=(e,t,n)=>e.endsWith(`
4
4
  `)?tt(n,t):n.includes(`
5
5
  `)?`
@@ -669,5 +669,5 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
669
669
  `+e.scrub();for(let n of e.markers)t.marks.push(n)}return this.finishLeaf(t),null}stopAt(e){if(this.stoppedAt!=null&&this.stoppedAt<e)throw RangeError(`Can't move stoppedAt forward`);this.stoppedAt=e}reuseFragment(e){if(!this.fragments.moveTo(this.absoluteLineStart+e,this.absoluteLineStart)||!this.fragments.matches(this.block.hash))return!1;let t=this.fragments.takeNodes(this);return t?(this.absoluteLineStart+=t,this.lineStart=fv(this.absoluteLineStart,this.ranges),this.moveRangeI(),this.absoluteLineStart<this.to?(this.lineStart++,this.absoluteLineStart++,this.readLine()):(this.atEnd=!0,this.readLine()),!0):!1}get depth(){return this.stack.length}parentType(e=this.depth-1){return this.parser.nodeSet.types[this.stack[e].type]}nextLine(){return this.lineStart+=this.line.text.length,this.absoluteLineEnd>=this.to?(this.absoluteLineStart=this.absoluteLineEnd,this.atEnd=!0,this.readLine(),!1):(this.lineStart++,this.absoluteLineStart=this.absoluteLineEnd+1,this.moveRangeI(),this.readLine(),!0)}peekLine(){return this.scanLine(this.absoluteLineEnd+1).text}moveRangeI(){for(;this.rangeI<this.ranges.length-1&&this.absoluteLineStart>=this.ranges[this.rangeI].to;)this.rangeI++,this.absoluteLineStart=Math.max(this.absoluteLineStart,this.ranges[this.rangeI].from)}scanLine(e){let t=L_;if(t.end=e,e>=this.to)t.text=``;else if(t.text=this.lineChunkAt(e),t.end+=t.text.length,this.ranges.length>1){let e=this.absoluteLineStart,n=this.rangeI;for(;this.ranges[n].to<t.end;){n++;let r=this.ranges[n].from,i=this.lineChunkAt(r);t.end=r+i.length,t.text=t.text.slice(0,this.ranges[n-1].to-e)+i,e=t.end-t.text.length}}return t}readLine(){let{line:e}=this,{text:t,end:n}=this.scanLine(this.absoluteLineStart);for(this.absoluteLineEnd=n,e.reset(t);e.depth<this.stack.length;e.depth++){let t=this.stack[e.depth],n=this.parser.skipContextMarkup[t.type];if(!n)throw Error(`Unhandled block context `+Q[t.type]);let r=this.line.markers.length;if(!n(t,this,e)){this.line.markers.length>r&&(t.end=this.line.markers[this.line.markers.length-1].to),e.forward();break}e.forward()}}lineChunkAt(e){let t=this.input.chunk(e),n;if(this.input.lineChunks)n=t==`
670
670
  `?``:t;else{let e=t.indexOf(`
671
671
  `);n=e<0?t:t.slice(0,e)}return e+n.length>this.to?n.slice(0,this.to-e):n}prevLineEnd(){return this.atEnd?this.lineStart:this.lineStart-1}startContext(e,t,n=0){this.block=c_.create(e,n,this.lineStart+t,this.block.hash,this.lineStart+this.line.text.length),this.stack.push(this.block)}startComposite(e,t,n=0){this.startContext(this.parser.getNodeType(e),t,n)}addNode(e,t,n){typeof e==`number`&&(e=new he(this.parser.nodeSet.types[e],G_,G_,(n??this.prevLineEnd())-t)),this.block.addChild(e,t-this.block.from)}addElement(e){this.block.addChild(e.toTree(this.parser.nodeSet),e.from-this.block.from)}addLeafElement(e,t){this.addNode(this.buffer.writeElements(lv(t.children,e.marks),-t.from).finish(t.type,t.to-t.from),t.from)}finishContext(){let e=this.stack.pop(),t=this.stack[this.stack.length-1];t.addChild(e.toTree(this.parser.nodeSet),e.from-t.from),this.block=t}finish(){for(;this.stack.length>1;)this.finishContext();return this.addGaps(this.block.toTree(this.parser.nodeSet,this.lineStart))}addGaps(e){return this.ranges.length>1?z_(this.ranges,0,e.topNode,this.ranges[0].from,this.reusePlaceholders):e}finishLeaf(e){for(let t of e.parsers)if(t.finish(this,e))return;let t=lv(this.parser.parseInline(e.content,e.start),e.marks);this.addNode(this.buffer.writeElements(t,-e.start).finish(Q.Paragraph,e.content.length),e.start)}elt(e,t,n,r){return typeof e==`string`?Y_(this.parser.getNodeType(e),t,n,r):new J_(e,t)}get buffer(){return new K_(this.parser.nodeSet)}};function z_(e,t,n,r,i){let a=e[t].to,o=[],s=[],c=n.from+r;function l(n,i){for(;i?n>=a:n>a;){let i=e[t+1].from-a;r+=i,n+=i,t++,a=e[t].to}}for(let u=n.firstChild;u;u=u.nextSibling){l(u.from+r,!0);let n=u.from+r,d,f=i.get(u.tree);f?d=f:u.to+r>a?(d=z_(e,t,u,r,i),l(u.to+r,!1)):d=u.toTree(),o.push(d),s.push(n-c)}return l(n.to+r,!1),new he(n.type,o,s,n.to+r-c,n.tree?n.tree.propValues:void 0)}var B_=class e extends me{constructor(e,t,n,r,i,a,o,s,c){super(),this.nodeSet=e,this.blockParsers=t,this.leafBlockParsers=n,this.blockNames=r,this.endLeafBlock=i,this.skipContextMarkup=a,this.inlineParsers=o,this.inlineNames=s,this.wrappers=c,this.nodeTypes=Object.create(null);for(let t of e.types)this.nodeTypes[t.name]=t.id}createParse(e,t,n){let r=new R_(this,e,t,n);for(let i of this.wrappers)r=i(r,e,t,n);return r}configure(t){let n=H_(t);if(!n)return this;let{nodeSet:r,skipContextMarkup:i}=this,a=this.blockParsers.slice(),o=this.leafBlockParsers.slice(),s=this.blockNames.slice(),c=this.inlineParsers.slice(),l=this.inlineNames.slice(),d=this.endLeafBlock.slice(),f=this.wrappers;if(V_(n.defineNodes)){i=Object.assign({},i);let e=r.types.slice(),t;for(let r of n.defineNodes){let{name:n,block:a,composite:o,style:s}=typeof r==`string`?{name:r}:r;if(e.some(e=>e.name==n))continue;o&&(i[e.length]=(e,t,n)=>o(t,n,e.value));let c=e.length,l=o?[`Block`,`BlockContext`]:a?c>=Q.ATXHeading1&&c<=Q.SetextHeading2?[`Block`,`LeafBlock`,`Heading`]:[`Block`,`LeafBlock`]:void 0;e.push(ie.define({id:c,name:n,props:l&&[[ue.group,l]]})),s&&(t||={},Array.isArray(s)||s instanceof _?t[n]=s:Object.assign(t,s))}r=new ae(e),t&&(r=r.extend(u(t)))}if(V_(n.props)&&(r=r.extend(...n.props)),V_(n.remove))for(let e of n.remove){let t=this.blockNames.indexOf(e),n=this.inlineNames.indexOf(e);t>-1&&(a[t]=o[t]=void 0),n>-1&&(c[n]=void 0)}if(V_(n.parseBlock))for(let e of n.parseBlock){let t=s.indexOf(e.name);if(t>-1)a[t]=e.parse,o[t]=e.leaf;else{let t=e.before?U_(s,e.before):e.after?U_(s,e.after)+1:s.length-1;a.splice(t,0,e.parse),o.splice(t,0,e.leaf),s.splice(t,0,e.name)}e.endLeaf&&d.push(e.endLeaf)}if(V_(n.parseInline))for(let e of n.parseInline){let t=l.indexOf(e.name);if(t>-1)c[t]=e.parse;else{let t=e.before?U_(l,e.before):e.after?U_(l,e.after)+1:l.length-1;c.splice(t,0,e.parse),l.splice(t,0,e.name)}}return n.wrap&&(f=f.concat(n.wrap)),new e(r,a,o,s,d,i,c,l,f)}getNodeType(e){let t=this.nodeTypes[e];if(t==null)throw RangeError(`Unknown node type '${e}'`);return t}parseInline(e,t){let n=new cv(this,e,t);outer:for(let e=t;e<n.end;){let t=n.char(e);for(let r of this.inlineParsers)if(r){let i=r(n,t,e);if(i>=0){e=i;continue outer}}e++}return n.resolveMarkers(0)}};function V_(e){return e!=null&&e.length>0}function H_(e){if(!Array.isArray(e))return e;if(e.length==0)return null;let t=H_(e[0]);if(e.length==1)return t;let n=H_(e.slice(1));if(!n||!t)return t||n;let r=(e,t)=>(e||G_).concat(t||G_),i=t.wrap,a=n.wrap;return{props:r(t.props,n.props),defineNodes:r(t.defineNodes,n.defineNodes),parseBlock:r(t.parseBlock,n.parseBlock),parseInline:r(t.parseInline,n.parseInline),remove:r(t.remove,n.remove),wrap:i?a?(e,t,n,r)=>i(a(e,t,n,r),t,n,r):i:a}}function U_(e,t){let n=e.indexOf(t);if(n<0)throw RangeError(`Position specified relative to unknown parser ${t}`);return n}var W_=[ie.none];for(let e=1,t;t=Q[e];e++)W_[e]=ie.define({id:e,name:t,props:e>=Q.Escape?[]:[[ue.group,e in f_?[`Block`,`BlockContext`]:[`Block`,`LeafBlock`]]],top:t==`Document`});var G_=[],K_=class{constructor(e){this.nodeSet=e,this.content=[],this.nodes=[]}write(e,t,n,r=0){return this.content.push(e,t,n,4+r*4),this}writeElements(e,t=0){for(let n of e)n.writeTo(this,t);return this}finish(e,t){return he.build({buffer:this.content,nodeSet:this.nodeSet,reused:this.nodes,topID:e,length:t})}},q_=class{constructor(e,t,n,r=G_){this.type=e,this.from=t,this.to=n,this.children=r}writeTo(e,t){let n=e.content.length;e.writeElements(this.children,t),e.content.push(this.type,this.from+t,this.to+t,e.content.length+4-n)}toTree(e){return new K_(e).writeElements(this.children,-this.from).finish(this.type,this.to-this.from)}},J_=class{constructor(e,t){this.tree=e,this.from=t}get to(){return this.from+this.tree.length}get type(){return this.tree.type.id}get children(){return G_}writeTo(e,t){e.nodes.push(this.tree),e.content.push(e.nodes.length-1,this.from+t,this.to+t,-1)}toTree(){return this.tree}};function Y_(e,t,n,r){return new q_(e,t,n,r)}var X_={resolve:`Emphasis`,mark:`EmphasisMark`},Z_={resolve:`Emphasis`,mark:`EmphasisMark`},Q_={},$_={},ev=class{constructor(e,t,n,r,i=n-t){this.type=e,this.from=t,this.to=n,this.side=r,this.size=i}},tv=`!"#$%&'()*+,-./:;<=>?@[\\]^_\`{|}~`,nv=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\u2010-\u2027]/;try{nv=RegExp(`[\\p{S}|\\p{P}]`,`u`)}catch{}var rv={Escape(e,t,n){if(t!=92||n==e.end-1)return-1;let r=e.char(n+1);for(let t=0;t<32;t++)if(tv.charCodeAt(t)==r)return e.append(Y_(Q.Escape,n,n+2));return-1},Entity(e,t,n){if(t!=38)return-1;let r=/^(?:#\d+|#x[a-f\d]+|\w+);/i.exec(e.slice(n+1,n+31));return r?e.append(Y_(Q.Entity,n,n+1+r[0].length)):-1},InlineCode(e,t,n){if(t!=96||n&&e.char(n-1)==96)return-1;let r=n+1;for(;r<e.end&&e.char(r)==96;)r++;let i=r-n,a=0;for(;r<e.end;r++)if(e.char(r)==96){if(a++,a==i&&e.char(r+1)!=96)return e.append(Y_(Q.InlineCode,n,r+1,[Y_(Q.CodeMark,n,n+i),Y_(Q.CodeMark,r+1-i,r+1)]))}else a=0;return-1},HTMLTag(e,t,n){if(t!=60||n==e.end-1)return-1;let r=e.slice(n+1,e.end),i=/^(?:[a-z][-\w+.]+:[^\s>]+|[a-z\d.!#$%&'*+/=?^_`{|}~-]+@[a-z\d](?:[a-z\d-]{0,61}[a-z\d])?(?:\.[a-z\d](?:[a-z\d-]{0,61}[a-z\d])?)*)>/i.exec(r);if(i)return e.append(Y_(Q.Autolink,n,n+1+i[0].length,[Y_(Q.LinkMark,n,n+1),Y_(Q.URL,n+1,n+i[0].length),Y_(Q.LinkMark,n+i[0].length,n+1+i[0].length)]));let a=/^!--[^>](?:-[^-]|[^-])*?-->/i.exec(r);if(a)return e.append(Y_(Q.Comment,n,n+1+a[0].length));let o=/^\?[^]*?\?>/.exec(r);if(o)return e.append(Y_(Q.ProcessingInstruction,n,n+1+o[0].length));let s=/^(?:![A-Z][^]*?>|!\[CDATA\[[^]*?\]\]>|\/\s*[a-zA-Z][\w-]*\s*>|\s*[a-zA-Z][\w-]*(\s+[a-zA-Z:_][\w-.:]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*(\/\s*)?>)/.exec(r);return s?e.append(Y_(Q.HTMLTag,n,n+1+s[0].length)):-1},Emphasis(e,t,n){if(t!=95&&t!=42)return-1;let r=n+1;for(;e.char(r)==t;)r++;let i=e.slice(n-1,n),a=e.slice(r,r+1),o=nv.test(i),s=nv.test(a),c=/\s|^$/.test(i),l=/\s|^$/.test(a),u=!l&&(!s||c||o),d=!c&&(!o||l||s),f=u&&(t==42||!d||o),p=d&&(t==42||!u||s);return e.append(new ev(t==95?X_:Z_,n,r,!!f|(p?2:0)))},HardBreak(e,t,n){if(t==92&&e.char(n+1)==10)return e.append(Y_(Q.HardBreak,n,n+2));if(t==32){let t=n+1;for(;e.char(t)==32;)t++;if(e.char(t)==10&&t>=n+2)return e.append(Y_(Q.HardBreak,n,t+1))}return-1},Link(e,t,n){return t==91?e.append(new ev(Q_,n,n+1,1)):-1},Image(e,t,n){return t==33&&e.char(n+1)==91?e.append(new ev($_,n,n+2,1)):-1},LinkEnd(e,t,n){if(t!=93)return-1;for(let t=e.parts.length-1;t>=0;t--){let r=e.parts[t];if(r instanceof ev&&(r.type==Q_||r.type==$_)){if(!r.side||e.skipSpace(r.to)==n&&!/[(\[]/.test(e.slice(n+1,n+2)))return e.parts[t]=null,-1;let i=e.takeContent(t),a=e.parts[t]=iv(e,i,r.type==Q_?Q.Link:Q.Image,r.from,n+1);if(r.type==Q_)for(let n=0;n<t;n++){let t=e.parts[n];t instanceof ev&&t.type==Q_&&(t.side=0)}return a.to}}return-1}};function iv(e,t,n,r,i){let{text:a}=e,o=e.char(i),s=i;if(t.unshift(Y_(Q.LinkMark,r,r+(n==Q.Image?2:1))),t.push(Y_(Q.LinkMark,i-1,i)),o==40){let n=e.skipSpace(i+1),r=av(a,n-e.offset,e.offset),o;r&&(n=e.skipSpace(r.to),n!=r.to&&(o=ov(a,n-e.offset,e.offset),o&&(n=e.skipSpace(o.to)))),e.char(n)==41&&(t.push(Y_(Q.LinkMark,i,i+1)),s=n+1,r&&t.push(r),o&&t.push(o),t.push(Y_(Q.LinkMark,n,s)))}else if(o==91){let n=sv(a,i-e.offset,e.offset,!1);n&&(t.push(n),s=n.to)}return Y_(n,r,s,t)}function av(e,t,n){if(e.charCodeAt(t)==60){for(let r=t+1;r<e.length;r++){let i=e.charCodeAt(r);if(i==62)return Y_(Q.URL,t+n,r+1+n);if(i==60||i==10)return!1}return null}{let r=0,i=t;for(let t=!1;i<e.length;i++){let n=e.charCodeAt(i);if(p_(n))break;if(t)t=!1;else if(n==40)r++;else if(n==41){if(!r)break;r--}else n==92&&(t=!0)}return i>t?Y_(Q.URL,t+n,i+n):i==e.length&&null}}function ov(e,t,n){let r=e.charCodeAt(t);if(r!=39&&r!=34&&r!=40)return!1;let i=r==40?41:r;for(let r=t+1,a=!1;r<e.length;r++){let o=e.charCodeAt(r);if(a)a=!1;else if(o==i)return Y_(Q.LinkTitle,t+n,r+1+n);else o==92&&(a=!0)}return null}function sv(e,t,n,r){for(let i=!1,a=t+1,o=Math.min(e.length,a+999);a<o;a++){let o=e.charCodeAt(a);if(i)i=!1;else if(o==93)return!r&&Y_(Q.LinkLabel,t+n,a+1+n);else{if(r&&!p_(o)&&(r=!1),o==91)return!1;o==92&&(i=!0)}}return null}var cv=class{constructor(e,t,n){this.parser=e,this.text=t,this.offset=n,this.parts=[]}char(e){return e>=this.end?-1:this.text.charCodeAt(e-this.offset)}get end(){return this.offset+this.text.length}slice(e,t){return this.text.slice(e-this.offset,t-this.offset)}append(e){return this.parts.push(e),e.to}addDelimiter(e,t,n,r,i){return this.append(new ev(e,t,n,!!r|(i?2:0)))}get hasOpenLink(){for(let e=this.parts.length-1;e>=0;e--){let t=this.parts[e];if(t instanceof ev&&(t.type==Q_||t.type==$_))return!0}return!1}addElement(e){return this.append(e)}resolveMarkers(e){for(let t=e;t<this.parts.length;t++){let n=this.parts[t];if(!(n instanceof ev&&n.type.resolve&&n.side&2))continue;let r=n.type==X_||n.type==Z_,i=n.to-n.from,a,o=t-1;for(;o>=e;o--){let e=this.parts[o];if(e instanceof ev&&e.side&1&&e.type==n.type&&!(r&&(n.side&1||e.side&2)&&(e.size+n.size)%3==0&&(e.size%3||n.size%3))){a=e;break}}if(!a)continue;let s=n.type.resolve,c=[],l=a.from,u=n.to;if(r){let e=Math.min(2,a.to-a.from,i);l=a.to-e,u=n.from+e,s=e==1?`Emphasis`:`StrongEmphasis`}a.type.mark&&c.push(this.elt(a.type.mark,l,a.to));for(let e=o+1;e<t;e++)this.parts[e]instanceof q_&&c.push(this.parts[e]),this.parts[e]=null;n.type.mark&&c.push(this.elt(n.type.mark,n.from,u));let d=this.elt(s,l,u,c);this.parts[o]=r&&a.from!=l?new ev(a.type,a.from,l,a.side,a.size):null,(this.parts[t]=r&&n.to!=u?new ev(n.type,u,n.to,n.side,n.size):null)?this.parts.splice(t,0,d):this.parts[t]=d}let t=[];for(let n=e;n<this.parts.length;n++){let e=this.parts[n];e instanceof q_&&t.push(e)}return t}findOpeningDelimiter(e){for(let t=this.parts.length-1;t>=0;t--){let n=this.parts[t];if(n instanceof ev&&n.type==e&&n.side&1)return t}return null}takeContent(e){let t=this.resolveMarkers(e);return this.parts.length=e,t}getDelimiterAt(e){let t=this.parts[e];return t instanceof ev?t:null}skipSpace(e){return m_(this.text,e-this.offset)+this.offset}elt(e,t,n,r){return typeof e==`string`?Y_(this.parser.getNodeType(e),t,n,r):new J_(e,t)}};cv.linkStart=Q_,cv.imageStart=$_,cv.emphasisAsterisk=Z_,cv.emphasisUnderscore=X_;function lv(e,t){if(!t.length)return e;if(!e.length)return t;let n=e.slice(),r=0;for(let e of t){for(;r<n.length&&n[r].to<e.to;)r++;if(r<n.length&&n[r].from<e.from){let t=n[r];t instanceof q_&&(n[r]=new q_(t.type,t.from,t.to,lv(t.children,[e])))}else n.splice(r++,0,e)}return n}var uv=[Q.CodeBlock,Q.ListItem,Q.OrderedList,Q.BulletList],dv=class{constructor(e,t){this.fragments=e,this.input=t,this.i=0,this.fragment=null,this.fragmentEnd=-1,this.cursor=null,e.length&&(this.fragment=e[this.i++])}nextFragment(){this.fragment=this.i<this.fragments.length?this.fragments[this.i++]:null,this.cursor=null,this.fragmentEnd=-1}moveTo(e,t){for(;this.fragment&&this.fragment.to<=e;)this.nextFragment();if(!this.fragment||this.fragment.from>(e?e-1:0))return!1;if(this.fragmentEnd<0){let e=this.fragment.to;for(;e>0&&this.input.read(e-1,e)!=`
672
- `;)e--;this.fragmentEnd=e?e-1:0}let n=this.cursor;n||(n=this.cursor=this.fragment.tree.cursor(),n.firstChild());let r=e+this.fragment.offset;for(;n.to<=r;)if(!n.parent())return!1;for(;;){if(n.from>=r)return this.fragment.from<=t;if(!n.childAfter(r))return!1}}matches(e){let t=this.cursor.tree;return t&&t.prop(ue.contextHash)==e}takeNodes(e){let t=this.cursor,n=this.fragment.offset,r=this.fragmentEnd-+!!this.fragment.openEnd,i=e.absoluteLineStart,a=i,o=e.block.children.length,s=a,c=o;for(;;){if(t.to-n>r||t.to-n>e.to){if(t.type.isAnonymous&&t.firstChild())continue;break}let i=fv(t.from-n,e.ranges);if(t.to-n<=e.ranges[e.rangeI].to)e.addNode(t.tree,i);else{let n=new he(e.parser.nodeSet.types[Q.Paragraph],[],[],0,e.block.hashProp);e.reusePlaceholders.set(n,t.tree),e.addNode(n,i)}if(t.type.is(`Block`)&&(uv.indexOf(t.type.id)<0?(a=t.to-n,o=e.block.children.length):(a=s,o=c),s=t.to-n,c=e.block.children.length),!t.nextSibling())break}for(;e.block.children.length>o;)e.block.children.pop(),e.block.positions.pop();return a-i}};function fv(e,t){let n=e;for(let r=1;r<t.length;r++){let i=t[r-1].to,a=t[r].from;i<e&&(n-=a-i)}return n}var pv=u({"Blockquote/...":g.quote,HorizontalRule:g.contentSeparator,"ATXHeading1/... SetextHeading1/...":g.heading1,"ATXHeading2/... SetextHeading2/...":g.heading2,"ATXHeading3/...":g.heading3,"ATXHeading4/...":g.heading4,"ATXHeading5/...":g.heading5,"ATXHeading6/...":g.heading6,"Comment CommentBlock":g.comment,Escape:g.escape,Entity:g.character,"Emphasis/...":g.emphasis,"StrongEmphasis/...":g.strong,"Link/... Image/...":g.link,"OrderedList/... BulletList/...":g.list,"BlockQuote/...":g.quote,"InlineCode CodeText":g.monospace,"URL Autolink":g.url,"HeaderMark HardBreak QuoteMark ListMark LinkMark EmphasisMark CodeMark":g.processingInstruction,"CodeInfo LinkLabel":g.labelName,LinkTitle:g.string,Paragraph:g.content}),mv=new B_(new ae(W_).extend(pv),Object.keys(j_).map(e=>j_[e]),Object.keys(j_).map(e=>F_[e]),Object.keys(j_),I_,f_,Object.keys(rv).map(e=>rv[e]),Object.keys(rv),[]);function hv(e,t,n){let r=[];for(let i=e.firstChild,a=t;;i=i.nextSibling){let e=i?i.from:n;if(e>a&&r.push({from:a,to:e}),!i)break;a=i.to}return r}function gv(e){let{codeParser:t,htmlParser:n}=e;return{wrap:te((e,r)=>{let i=e.type.id;if(t&&(i==Q.CodeBlock||i==Q.FencedCode)){let n=``;if(i==Q.FencedCode){let t=e.node.getChild(Q.CodeInfo);t&&(n=r.read(t.from,t.to))}let a=t(n);if(a)return{parser:a,overlay:e=>e.type.id==Q.CodeText,bracketed:i==Q.FencedCode}}else if(n&&(i==Q.HTMLBlock||i==Q.HTMLTag||i==Q.CommentBlock))return{parser:n,overlay:hv(e.node,e.from,e.to)};return null})}}var _v={resolve:`Strikethrough`,mark:`StrikethroughMark`},vv={defineNodes:[{name:`Strikethrough`,style:{"Strikethrough/...":g.strikethrough}},{name:`StrikethroughMark`,style:g.processingInstruction}],parseInline:[{name:`Strikethrough`,parse(e,t,n){if(t!=126||e.char(n+1)!=126||e.char(n+2)==126)return-1;let r=e.slice(n-1,n),i=e.slice(n+2,n+3),a=/\s|^$/.test(r),o=/\s|^$/.test(i),s=nv.test(r),c=nv.test(i);return e.addDelimiter(_v,n,n+2,!o&&(!c||a||s),!a&&(!s||o||c))},after:`Emphasis`}]};function yv(e,t,n=0,r,i=0){let a=0,o=!0,s=-1,c=-1,l=!1,u=()=>{r.push(e.elt(`TableCell`,i+s,i+c,e.parser.parseInline(t.slice(s,c),i+s)))};for(let d=n;d<t.length;d++){let n=t.charCodeAt(d);n==124&&!l?((!o||s>-1)&&a++,o=!1,r&&(s>-1&&u(),r.push(e.elt(`TableDelimiter`,d+i,d+i+1))),s=c=-1):(l||n!=32&&n!=9)&&(s<0&&(s=d),c=d+1),l=!l&&n==92}return s>-1&&(a++,r&&u()),a}function bv(e,t){for(let n=t;n<e.length;n++){let t=e.charCodeAt(n);if(t==124)return!0;t==92&&n++}return!1}var xv=/^[>\s]*\|?(\s*:?-+:?\s*\|)+(\s*:?-+:?\s*)?$/,Sv=class{constructor(){this.rows=null}nextLine(e,t,n){if(this.rows==null){this.rows=!1;let r;if((t.next==45||t.next==58||t.next==124)&&xv.test(r=t.text.slice(t.pos))){let i=[];yv(e,n.content,0,i,n.start)==yv(e,r,0)&&(this.rows=[e.elt(`TableHeader`,n.start,n.start+n.content.length,i),e.elt(`TableDelimiter`,e.lineStart+t.pos,e.lineStart+t.text.length)])}}else if(this.rows){let n=[];yv(e,t.text,t.pos,n,e.lineStart),this.rows.push(e.elt(`TableRow`,e.lineStart+t.pos,e.lineStart+t.text.length,n))}return!1}finish(e,t){return this.rows?(e.addLeafElement(t,e.elt(`Table`,t.start,t.start+t.content.length,this.rows)),!0):!1}},Cv={defineNodes:[{name:`Table`,block:!0},{name:`TableHeader`,style:{"TableHeader/...":g.heading}},`TableRow`,{name:`TableCell`,style:g.content},{name:`TableDelimiter`,style:g.processingInstruction}],parseBlock:[{name:`Table`,leaf(e,t){return bv(t.content,0)?new Sv:null},endLeaf(e,t,n){if(n.parsers.some(e=>e instanceof Sv)||!bv(t.text,t.basePos))return!1;let r=e.peekLine();return xv.test(r)&&yv(e,t.text,t.basePos)==yv(e,r,t.basePos)},before:`SetextHeading`}]},wv=class{nextLine(){return!1}finish(e,t){return e.addLeafElement(t,e.elt(`Task`,t.start,t.start+t.content.length,[e.elt(`TaskMarker`,t.start,t.start+3),...e.parser.parseInline(t.content.slice(3),t.start+3)])),!0}},Tv={defineNodes:[{name:`Task`,block:!0,style:g.list},{name:`TaskMarker`,style:g.atom}],parseBlock:[{name:`TaskList`,leaf(e,t){return/^\[[ xX]\][ \t]/.test(t.content)&&e.parentType().name==`ListItem`?new wv:null},after:`SetextHeading`}]},Ev=/(www\.)|(https?:\/\/)|([\w.+-]{1,100}@)|(mailto:|xmpp:)/gy,Dv=/[\w-]+(\.[\w-]+)+(:\d+)?(\/[^\s<]*)?/gy,Ov=/[\w-]+\.[\w-]+($|[/:])/,kv=/[\w.+-]+@[\w-]+(\.[\w.-]+)+/gy,Av=/\/[a-zA-Z\d@.]+/gy;function jv(e,t,n,r){let i=0;for(let a=t;a<n;a++)e[a]==r&&i++;return i}function Mv(e,t){Dv.lastIndex=t;let n=Dv.exec(e);if(!n||Ov.exec(n[0])[0].indexOf(`_`)>-1)return-1;let r=t+n[0].length;for(;;){let n=e[r-1],i;if(/[?!.,:*_~]/.test(n)||n==`)`&&jv(e,t,r,`)`)>jv(e,t,r,`(`))r--;else if(n==`;`&&(i=/&(?:#\d+|#x[a-f\d]+|\w+);$/.exec(e.slice(t,r))))r=t+i.index;else break}return r}function Nv(e,t){kv.lastIndex=t;let n=kv.exec(e);if(!n)return-1;let r=n[0][n[0].length-1];return r==`_`||r==`-`?-1:t+n[0].length-+(r==`.`)}var Pv=[Cv,Tv,vv,{parseInline:[{name:`Autolink`,parse(e,t,n){let r=n-e.offset;if(r&&/\w/.test(e.text[r-1]))return-1;Ev.lastIndex=r;let i=Ev.exec(e.text),a=-1;return!i||(i[1]||i[2]?(a=Mv(e.text,r+i[0].length),a>-1&&e.hasOpenLink&&(a=r+/([^\[\]]|\[[^\]]*\])*/.exec(e.text.slice(r,a))[0].length)):i[3]?a=Nv(e.text,r):(a=Nv(e.text,r+i[0].length),a>-1&&i[0]==`xmpp:`&&(Av.lastIndex=a,i=Av.exec(e.text),i&&(a=i.index+i[0].length))),a<0)?-1:(e.addElement(e.elt(`URL`,n,a+e.offset)),a+e.offset)}}]}];function Fv(e,t,n){return(r,i,a)=>{if(i!=e||r.char(a+1)==e)return-1;let o=[r.elt(n,a,a+1)];for(let i=a+1;i<r.end;i++){let s=r.char(i);if(s==e)return r.addElement(r.elt(t,a,i+1,o.concat(r.elt(n,i,i+1))));if(s==92&&o.push(r.elt(`Escape`,i,i+++2)),p_(s))break}return-1}}var Iv={defineNodes:[{name:`Superscript`,style:g.special(g.content)},{name:`SuperscriptMark`,style:g.processingInstruction}],parseInline:[{name:`Superscript`,parse:Fv(94,`Superscript`,`SuperscriptMark`)}]},Lv={defineNodes:[{name:`Subscript`,style:g.special(g.content)},{name:`SubscriptMark`,style:g.processingInstruction}],parseInline:[{name:`Subscript`,parse:Fv(126,`Subscript`,`SubscriptMark`)}]},Rv={defineNodes:[{name:`Emoji`,style:g.character}],parseInline:[{name:`Emoji`,parse(e,t,n){let r;return t!=58||!(r=/^[a-zA-Z_0-9]+:/.exec(e.slice(n+1,e.end)))?-1:e.addElement(e.elt(`Emoji`,n,n+1+r[0].length))}}]},zv=a({html:()=>Uv,htmlCompletionSource:()=>Wv}),Bv=ie.define({id:0,name:`Document`,top:!0}),Vv=class extends me{createParse(e,t,n){let r=n[0]?.from??0,i=n[n.length-1]?.to??e.length;return{parsedPos:i,stoppedAt:null,stopAt(){},advance:()=>new he(Bv,[],[],i-r)}}},Hv=new oe(C(),new Vv,[],`html`);function Uv(e){return new de(Hv)}function Wv(){return null}var Gv=a({commonmarkLanguage:()=>ey,deleteMarkupBackward:()=>my,insertNewlineContinueMarkup:()=>ly,insertNewlineContinueMarkupCommand:()=>cy,markdown:()=>_y,markdownKeymap:()=>hy,markdownLanguage:()=>ty,pasteURLAsLink:()=>Sy}),Kv=C({commentTokens:{block:{open:`<!--`,close:`-->`}}}),qv=new ue,Jv=mv.configure({props:[re.add(e=>!e.is(`Block`)||e.is(`Document`)||Yv(e)!=null||Xv(e)?void 0:(e,t)=>({from:t.doc.lineAt(e.from).to,to:e.to})),qv.add(Yv),S.add({Document:()=>null}),f.add({Document:Kv})]});function Yv(e){let t=/^(?:ATX|Setext)Heading(\d)$/.exec(e.name);return t?+t[1]:void 0}function Xv(e){return e.name==`OrderedList`||e.name==`BulletList`}function Zv(e,t){let n=e;for(;;){let e=n.nextSibling,r;if(!e||(r=Yv(e.type))!=null&&r<=t)break;n=e}return n.to}var Qv=ee.of((e,t,n)=>{for(let r=p(e).resolveInner(n,-1);r&&!(r.from<t);r=r.parent){let e=r.type.prop(qv);if(e==null)continue;let t=Zv(r,e);if(t>n)return{from:n,to:t}}return null});function $v(e){return new oe(Kv,e,[],`markdown`)}var ey=$v(Jv),ty=$v(Jv.configure([Pv,Lv,Iv,Rv,{props:[re.add({Table:(e,t)=>({from:t.doc.lineAt(e.from).to,to:e.to})})]}]));function ny(e,t){return n=>{if(n&&e){let t=null;if(n=/\S*/.exec(n)[0],t=typeof e==`function`?e(n):x.matchLanguageName(e,n,!0),t instanceof x)return t.support?t.support.language.parser:pe.getSkippingParser(t.load());if(t)return t.parser}return t?t.parser:null}}var ry=class{constructor(e,t,n,r,i,a,o){this.node=e,this.from=t,this.to=n,this.spaceBefore=r,this.spaceAfter=i,this.type=a,this.item=o}blank(e,t=!0){let n=this.spaceBefore+(this.node.name==`Blockquote`?`>`:``);if(e!=null){for(;n.length<e;)n+=` `;return n}for(let e=this.to-this.from-n.length-this.spaceAfter.length;e>0;e--)n+=` `;return n+(t?this.spaceAfter:``)}marker(e,t){let n=this.node.name==`OrderedList`?String(+ay(this.item,e)[2]+t):``;return this.spaceBefore+n+this.type+this.spaceAfter}};function iy(e,t){let n=[],r=[];for(let t=e;t;t=t.parent){if(t.name==`FencedCode`)return r;(t.name==`ListItem`||t.name==`Blockquote`)&&n.push(t)}for(let e=n.length-1;e>=0;e--){let i=n[e],a,o=t.lineAt(i.from),s=i.from-o.from;if(i.name==`Blockquote`&&(a=/^ *>( ?)/.exec(o.text.slice(s))))r.push(new ry(i,s,s+a[0].length,``,a[1],`>`,null));else if(i.name==`ListItem`&&i.parent.name==`OrderedList`&&(a=/^( *)\d+([.)])( *)/.exec(o.text.slice(s)))){let e=a[3],t=a[0].length;e.length>=4&&(e=e.slice(0,e.length-4),t-=4),r.push(new ry(i.parent,s,s+t,a[1],e,a[2],i))}else if(i.name==`ListItem`&&i.parent.name==`BulletList`&&(a=/^( *)([-+*])( {1,4}\[[ xX]\])?( +)/.exec(o.text.slice(s)))){let e=a[4],t=a[0].length;e.length>4&&(e=e.slice(0,e.length-4),t-=4);let n=a[2];a[3]&&(n+=a[3].replace(/[xX]/,` `)),r.push(new ry(i.parent,s,s+t,a[1],e,n,i))}}return r}function ay(e,t){return/^(\s*)(\d+)(?=[.)])/.exec(t.sliceString(e.from,e.from+10))}function oy(e,t,n,r=0){for(let i=-1,a=e;;){if(a.name==`ListItem`){let e=ay(a,t),o=+e[2];if(i>=0){if(o!=i+1)return;n.push({from:a.from+e[1].length,to:a.from+e[0].length,insert:String(i+2+r)})}i=o}let e=a.nextSibling;if(!e)break;a=e}}function sy(e,t){let n=/^[ \t]*/.exec(e)[0].length;if(!n||t.facet(y)!=` `)return e;let r=le(e,4,n),i=``;for(let e=r;e>0;)e>=4?(i+=` `,e-=4):(i+=` `,e--);return i+e.slice(n)}var cy=(e={})=>({state:t,dispatch:n})=>{let r=p(t),{doc:i}=t,a=null,o=t.changeByRange(n=>{if(!n.empty||!ty.isActiveAt(t,n.from,-1)&&!ty.isActiveAt(t,n.from,1))return a={range:n};let o=n.from,s=i.lineAt(o),c=iy(r.resolveInner(o,-1),i);for(;c.length&&c[c.length-1].from>o-s.from;)c.pop();if(!c.length)return a={range:n};let l=c[c.length-1];if(l.to-l.spaceAfter.length>o-s.from)return a={range:n};let u=o>=l.to-l.spaceAfter.length&&!/\S/.test(s.text.slice(l.to));if(l.item&&u){if(l.item.from<s.from&&!/^[\s>]*$/.test(s.text.slice(0,l.to)))return a={range:n};let r=l.node.firstChild,u=l.node.getChild(`ListItem`,`ListItem`);if(r.to>=o||u&&u.to<o||s.from>0&&!/[^\s>]/.test(i.lineAt(s.from-1).text)||e.nonTightLists===!1){let e=c.length>1?c[c.length-2]:null,t,n=``;e&&e.item?(t=s.from+e.from,n=e.marker(i,1)):t=s.from+(e?e.to:0);let r=[{from:t,to:o,insert:n}];return l.node.name==`OrderedList`&&oy(l.item,i,r,-2),e&&e.node.name==`OrderedList`&&oy(e.item,i,r),{range:h.cursor(t+n.length),changes:r}}{let e=fy(c,t,s);return{range:h.cursor(o+e.length+1),changes:{from:s.from,insert:e+t.lineBreak}}}}if(l.node.name==`Blockquote`&&u&&s.from){let e=i.lineAt(s.from-1),r=/>\s*$/.exec(e.text);if(r&&r.index==l.from){let i=t.changes([{from:e.from+r.index,to:e.to},{from:s.from+l.from,to:s.to}]);return{range:n.map(i),changes:i}}}let d=[];l.node.name==`OrderedList`&&oy(l.item,i,d);let f=l.item&&l.item.from<s.from,p=``;if(!f||/^[\s\d.)\-+*>]*/.exec(s.text)[0].length>=l.to)for(let e=0,t=c.length-1;e<=t;e++)p+=e==t&&!f?c[e].marker(i,1):c[e].blank(e<t?le(s.text,4,c[e+1].from)-p.length:null);let m=o;for(;m>s.from&&/\s/.test(s.text.charAt(m-s.from-1));)m--;return p=sy(p,t),dy(l.node,t.doc)&&(p=fy(c,t,s)+t.lineBreak+p),d.push({from:m,to:o,insert:t.lineBreak+p}),{range:h.cursor(m+p.length+1),changes:d}});return!a&&(n(t.update(o,{scrollIntoView:!0,userEvent:`input`})),!0)},ly=cy();function uy(e){return e.name==`QuoteMark`||e.name==`ListMark`}function dy(e,t){if(e.name!=`OrderedList`&&e.name!=`BulletList`)return!1;let n=e.firstChild,r=e.getChild(`ListItem`,`ListItem`);if(!r)return!1;let i=t.lineAt(n.to),a=t.lineAt(r.from),o=/^[\s>]*$/.test(i.text);return i.number+ +!o<a.number}function fy(e,t,n){let r=``;for(let t=0,i=e.length-2;t<=i;t++)r+=e[t].blank(t<i?le(n.text,4,e[t+1].from)-r.length:null,t<i);return sy(r,t)}function py(e,t){let n=e.resolveInner(t,-1),r=t;uy(n)&&(r=n.from,n=n.parent);for(let e;e=n.childBefore(r);)if(uy(e))r=e.from;else if(e.name==`OrderedList`||e.name==`BulletList`)n=e.lastChild,r=n.to;else break;return n}var my=({state:e,dispatch:t})=>{let n=p(e),r=null,i=e.changeByRange(t=>{let i=t.from,{doc:a}=e;if(t.empty&&ty.isActiveAt(e,t.from)){let t=a.lineAt(i),r=iy(py(n,i),a);if(r.length){let n=r[r.length-1],a=n.to-n.spaceAfter.length+ +!!n.spaceAfter;if(i-t.from>a&&!/\S/.test(t.text.slice(a,i-t.from)))return{range:h.cursor(t.from+a),changes:{from:t.from+a,to:i}};if(i-t.from==a&&(n.item&&t.from<=n.item.from||/^[\s>]*$/.test(t.text.slice(0,n.to)))){let r=t.from+n.from;if(n.item&&n.node.from<n.item.from&&/\S/.test(t.text.slice(n.from,n.to))){let i=n.blank(le(t.text,4,n.to)-le(t.text,4,n.from));return r==t.from&&(i=sy(i,e)),{range:h.cursor(r+i.length),changes:{from:r,to:t.from+n.to,insert:i}}}if(r<i)return{range:h.cursor(r),changes:{from:r,to:i}}}}}return r={range:t}});return!r&&(t(e.update(i,{scrollIntoView:!0,userEvent:`delete`})),!0)},hy=[{key:`Enter`,run:ly},{key:`Backspace`,run:my}],gy=Uv({matchClosingTags:!1});function _y(e={}){let{codeLanguages:t,defaultCodeLanguage:n,addKeymap:r=!0,base:{parser:i}=ey,completeHTMLTags:a=!0,pasteURLAsLink:o=!0,htmlTagLanguage:s=gy}=e;if(!(i instanceof B_))throw RangeError("Base parser provided to `markdown` should be a Markdown parser");let c=e.extensions?[e.extensions]:[],l=[s.support,Qv],u;o&&l.push(Sy),n instanceof de?(l.push(n.support),u=n.language):n&&(u=n);let f=t||u?ny(t,u):void 0;c.push(gv({codeParser:f,htmlParser:s.language.parser})),r&&l.push(v.high(d.of(hy)));let p=$v(i.configure(c));return a&&l.push(p.data.of({autocomplete:vy})),new de(p,l)}function vy(e){let{state:t,pos:n}=e,r=/<[:\-\.\w\u00b7-\uffff]*$/.exec(t.sliceDoc(n-25,n));if(!r)return null;let i=p(t).resolveInner(n,-1);for(;i&&!i.type.isTop;){if(i.name==`CodeBlock`||i.name==`FencedCode`||i.name==`ProcessingInstructionBlock`||i.name==`CommentBlock`||i.name==`Link`||i.name==`Image`)return null;i=i.parent}return{from:n-r[0].length,to:n,options:by(),validFor:/^<[:\-\.\w\u00b7-\uffff]*$/}}var yy=null;function by(){if(yy)return yy;let e=Wv(new ge(b.create({extensions:gy}),0,!0));return yy=e?e.options:[]}var xy=/code|horizontalrule|html|link|comment|processing|escape|entity|image|mark|url/i,Sy=m.domEventHandlers({paste:(e,t)=>{let{main:n}=t.state.selection;if(n.empty)return!1;let r=e.clipboardData?.getData(`text/plain`);if(!r||!/^(https?:\/\/|mailto:|xmpp:|www\.)/.test(r)||(/^www\./.test(r)&&(r=`https://`+r),!ty.isActiveAt(t.state,n.from,1)))return!1;let i=p(t.state),a=!1;return i.iterate({from:n.from,to:n.to,enter:e=>{(e.from>n.from||xy.test(e.name))&&(a=!0)},leave:e=>{e.to<n.to&&(a=!0)}}),!a&&(t.dispatch({changes:[{from:n.from,insert:`[`},{from:n.to,insert:`](${r})`}],userEvent:`input.paste`,scrollIntoView:!0}),!0)}});function $(e){return new de(ne.define(e))}function Cy(e){return s(()=>import(`./DIGvaVgJ.js`).then(t=>t.sql({dialect:t[e]})),__vite__mapDeps([0,1,2,3]),import.meta.url)}var wy=[x.of({name:`C`,extensions:[`c`,`h`,`ino`],load(){return s(()=>import(`./C6Btt2Xs.js`).then(e=>e.cpp()),__vite__mapDeps([4,1,3]),import.meta.url)}}),x.of({name:`C++`,alias:[`cpp`],extensions:[`cpp`,`c++`,`cc`,`cxx`,`hpp`,`h++`,`hh`,`hxx`],load(){return s(()=>import(`./C6Btt2Xs.js`).then(e=>e.cpp()),__vite__mapDeps([4,1,3]),import.meta.url)}}),x.of({name:`CQL`,alias:[`cassandra`],extensions:[`cql`],load(){return Cy(`Cassandra`)}}),x.of({name:`CSS`,extensions:[`css`],load(){return s(()=>import(`./DtbnBenW.js`).then(e=>e.css()),__vite__mapDeps([5,1,3]),import.meta.url)}}),x.of({name:`Go`,extensions:[`go`],load(){return s(()=>import(`./D_aBVMvK.js`).then(e=>e.go()),__vite__mapDeps([6,1,2,3]),import.meta.url)}}),x.of({name:`HTML`,alias:[`xhtml`],extensions:[`html`,`htm`,`handlebars`,`hbs`],load(){return s(()=>Promise.resolve().then(()=>zv).then(e=>e.html()),void 0,import.meta.url)}}),x.of({name:`Java`,extensions:[`java`],load(){return s(()=>import(`./Bbt0DTmZ.js`).then(e=>e.java()),__vite__mapDeps([7,1,3]),import.meta.url)}}),x.of({name:`JavaScript`,alias:[`ecmascript`,`js`,`node`],extensions:[`js`,`mjs`,`cjs`],load(){return s(()=>import(`./K_3X9lyC.js`).then(e=>e.javascript()),__vite__mapDeps([8,1,2,3]),import.meta.url)}}),x.of({name:`Jinja`,extensions:[`j2`,`jinja`,`jinja2`],load(){return s(()=>import(`./CWmfjLLv.js`).then(e=>e.jinja()),__vite__mapDeps([9,1,3]),import.meta.url)}}),x.of({name:`JSON`,alias:[`json5`],extensions:[`json`,`map`],load(){return s(()=>import(`./CDAjAYjS.js`).then(e=>e.json()),__vite__mapDeps([10,1,3]),import.meta.url)}}),x.of({name:`JSX`,extensions:[`jsx`],load(){return s(()=>import(`./K_3X9lyC.js`).then(e=>e.javascript({jsx:!0})),__vite__mapDeps([8,1,2,3]),import.meta.url)}}),x.of({name:`LESS`,extensions:[`less`],load(){return s(()=>import(`./_rHYGvON.js`).then(e=>e.less()),__vite__mapDeps([11,1,3,5]),import.meta.url)}}),x.of({name:`Liquid`,extensions:[`liquid`],load(){return s(()=>import(`./WBFggAXs.js`).then(e=>e.liquid()),__vite__mapDeps([12,1,3]),import.meta.url)}}),x.of({name:`MariaDB SQL`,load(){return Cy(`MariaSQL`)}}),x.of({name:`Markdown`,extensions:[`md`,`markdown`,`mkd`],load(){return s(()=>Promise.resolve().then(()=>Gv).then(e=>e.markdown()),void 0,import.meta.url)}}),x.of({name:`MS SQL`,load(){return Cy(`MSSQL`)}}),x.of({name:`MySQL`,load(){return Cy(`MySQL`)}}),x.of({name:`PHP`,extensions:[`php`,`php3`,`php4`,`php5`,`php7`,`phtml`],load(){return s(()=>import(`./BoNMG-YE.js`).then(e=>e.php()),__vite__mapDeps([13,1,3]),import.meta.url)}}),x.of({name:`PLSQL`,extensions:[`pls`],load(){return Cy(`PLSQL`)}}),x.of({name:`PostgreSQL`,load(){return Cy(`PostgreSQL`)}}),x.of({name:`Python`,extensions:[`BUILD`,`bzl`,`py`,`pyw`],filename:/^(BUCK|BUILD)$/,load(){return s(()=>import(`./Bffqt7tx.js`).then(e=>e.python()),__vite__mapDeps([14,1,2,3]),import.meta.url)}}),x.of({name:`Rust`,extensions:[`rs`],load(){return s(()=>import(`./BWonG38x.js`).then(e=>e.rust()),__vite__mapDeps([15,1,3]),import.meta.url)}}),x.of({name:`Sass`,extensions:[`sass`],load(){return s(()=>import(`./BEHa2uNW.js`).then(e=>e.sass({indented:!0})),__vite__mapDeps([16,1,3,5]),import.meta.url)}}),x.of({name:`SCSS`,extensions:[`scss`],load(){return s(()=>import(`./BEHa2uNW.js`).then(e=>e.sass()),__vite__mapDeps([16,1,3,5]),import.meta.url)}}),x.of({name:`SQL`,extensions:[`sql`],load(){return Cy(`StandardSQL`)}}),x.of({name:`SQLite`,load(){return Cy(`SQLite`)}}),x.of({name:`TSX`,extensions:[`tsx`],load(){return s(()=>import(`./K_3X9lyC.js`).then(e=>e.javascript({jsx:!0,typescript:!0})),__vite__mapDeps([8,1,2,3]),import.meta.url)}}),x.of({name:`TypeScript`,alias:[`ts`],extensions:[`ts`,`mts`,`cts`],load(){return s(()=>import(`./K_3X9lyC.js`).then(e=>e.javascript({typescript:!0})),__vite__mapDeps([8,1,2,3]),import.meta.url)}}),x.of({name:`WebAssembly`,extensions:[`wat`,`wast`],load(){return s(()=>import(`./BPW39P52.js`).then(e=>e.wast()),__vite__mapDeps([17,1,3]),import.meta.url)}}),x.of({name:`XML`,alias:[`rss`,`wsdl`,`xsd`],extensions:[`xml`,`xsl`,`xsd`,`svg`],load(){return s(()=>import(`./Ds8Pkiic.js`).then(e=>e.xml()),__vite__mapDeps([18,1,3]),import.meta.url)}}),x.of({name:`YAML`,alias:[`yml`],extensions:[`yaml`,`yml`],load(){return s(()=>import(`./CPF5uNy5.js`).then(e=>e.yaml()),__vite__mapDeps([19,1,3]),import.meta.url)}}),x.of({name:`APL`,extensions:[`dyalog`,`apl`],load(){return s(()=>import(`./gfMMiTNf.js`).then(e=>$(e.apl)),[],import.meta.url)}}),x.of({name:`PGP`,alias:[`asciiarmor`],extensions:[`asc`,`pgp`,`sig`],load(){return s(()=>import(`./C_eisQCp.js`).then(e=>$(e.asciiArmor)),[],import.meta.url)}}),x.of({name:`ASN.1`,extensions:[`asn`,`asn1`],load(){return s(()=>import(`./DCl_8MCW.js`).then(e=>$(e.asn1({}))),[],import.meta.url)}}),x.of({name:`Asterisk`,filename:/^extensions\.conf$/i,load(){return s(()=>import(`./BEn0Cwpx.js`).then(e=>$(e.asterisk)),[],import.meta.url)}}),x.of({name:`Brainfuck`,extensions:[`b`,`bf`],load(){return s(()=>import(`./D5EjA2JK.js`).then(e=>$(e.brainfuck)),[],import.meta.url)}}),x.of({name:`Cobol`,extensions:[`cob`,`cpy`],load(){return s(()=>import(`./DHLQUbN7.js`).then(e=>$(e.cobol)),[],import.meta.url)}}),x.of({name:`C#`,alias:[`csharp`,`cs`],extensions:[`cs`],load(){return s(()=>import(`./xvONpD0Z.js`).then(e=>$(e.csharp)),[],import.meta.url)}}),x.of({name:`Clojure`,extensions:[`clj`,`cljc`,`cljx`],load(){return s(()=>import(`./BflJGmDX.js`).then(e=>$(e.clojure)),[],import.meta.url)}}),x.of({name:`ClojureScript`,extensions:[`cljs`],load(){return s(()=>import(`./BflJGmDX.js`).then(e=>$(e.clojure)),[],import.meta.url)}}),x.of({name:`Closure Stylesheets (GSS)`,extensions:[`gss`],load(){return s(()=>import(`./CnaYoQib.js`).then(e=>$(e.gss)),[],import.meta.url)}}),x.of({name:`CMake`,extensions:[`cmake`,`cmake.in`],filename:/^CMakeLists\.txt$/,load(){return s(()=>import(`./84nbDH0I.js`).then(e=>$(e.cmake)),[],import.meta.url)}}),x.of({name:`CoffeeScript`,alias:[`coffee`,`coffee-script`],extensions:[`coffee`],load(){return s(()=>import(`./De_zI4J0.js`).then(e=>$(e.coffeeScript)),[],import.meta.url)}}),x.of({name:`Common Lisp`,alias:[`lisp`],extensions:[`cl`,`lisp`,`el`],load(){return s(()=>import(`./DgAKBe0r.js`).then(e=>$(e.commonLisp)),[],import.meta.url)}}),x.of({name:`Cypher`,extensions:[`cyp`,`cypher`],load(){return s(()=>import(`./p9eYesGn.js`).then(e=>$(e.cypher)),[],import.meta.url)}}),x.of({name:`Cython`,extensions:[`pyx`,`pxd`,`pxi`],load(){return s(()=>import(`./B_1Jd8HM.js`).then(e=>$(e.cython)),[],import.meta.url)}}),x.of({name:`Crystal`,extensions:[`cr`],load(){return s(()=>import(`./Bsdphhtm.js`).then(e=>$(e.crystal)),[],import.meta.url)}}),x.of({name:`D`,extensions:[`d`],load(){return s(()=>import(`./DWkQyNnU.js`).then(e=>$(e.d)),[],import.meta.url)}}),x.of({name:`Dart`,extensions:[`dart`],load(){return s(()=>import(`./xvONpD0Z.js`).then(e=>$(e.dart)),[],import.meta.url)}}),x.of({name:`diff`,extensions:[`diff`,`patch`],load(){return s(()=>import(`./ChtP43wD.js`).then(e=>$(e.diff)),[],import.meta.url)}}),x.of({name:`Dockerfile`,filename:/^Dockerfile$/,load(){return s(()=>import(`./DLa7NjNO.js`).then(e=>$(e.dockerFile)),__vite__mapDeps([20,21]),import.meta.url)}}),x.of({name:`DTD`,extensions:[`dtd`],load(){return s(()=>import(`./DTF72YNO.js`).then(e=>$(e.dtd)),[],import.meta.url)}}),x.of({name:`Dylan`,extensions:[`dylan`,`dyl`,`intr`],load(){return s(()=>import(`./S7ucR4pR.js`).then(e=>$(e.dylan)),[],import.meta.url)}}),x.of({name:`EBNF`,load(){return s(()=>import(`./D4c0_ac3.js`).then(e=>$(e.ebnf)),[],import.meta.url)}}),x.of({name:`ECL`,extensions:[`ecl`],load(){return s(()=>import(`./BVIeWmwY.js`).then(e=>$(e.ecl)),[],import.meta.url)}}),x.of({name:`edn`,extensions:[`edn`],load(){return s(()=>import(`./BflJGmDX.js`).then(e=>$(e.clojure)),[],import.meta.url)}}),x.of({name:`Eiffel`,extensions:[`e`],load(){return s(()=>import(`./BEjRio4Q.js`).then(e=>$(e.eiffel)),[],import.meta.url)}}),x.of({name:`Elm`,extensions:[`elm`],load(){return s(()=>import(`./Cshzl8qu.js`).then(e=>$(e.elm)),[],import.meta.url)}}),x.of({name:`Erlang`,extensions:[`erl`],load(){return s(()=>import(`./BV0c4Hdn.js`).then(e=>$(e.erlang)),[],import.meta.url)}}),x.of({name:`Esper`,load(){return s(()=>import(`./DuQMFDvy.js`).then(e=>$(e.esper)),[],import.meta.url)}}),x.of({name:`Factor`,extensions:[`factor`],load(){return s(()=>import(`./CygcOYNo.js`).then(e=>$(e.factor)),__vite__mapDeps([22,21]),import.meta.url)}}),x.of({name:`FCL`,load(){return s(()=>import(`./ClOhbFR7.js`).then(e=>$(e.fcl)),[],import.meta.url)}}),x.of({name:`Forth`,extensions:[`forth`,`fth`,`4th`],load(){return s(()=>import(`./D6RzAl64.js`).then(e=>$(e.forth)),[],import.meta.url)}}),x.of({name:`Fortran`,extensions:[`f`,`for`,`f77`,`f90`,`f95`],load(){return s(()=>import(`./Bt6PBEDR.js`).then(e=>$(e.fortran)),[],import.meta.url)}}),x.of({name:`F#`,alias:[`fsharp`],extensions:[`fs`],load(){return s(()=>import(`./B45xgp2S.js`).then(e=>$(e.fSharp)),[],import.meta.url)}}),x.of({name:`Gas`,extensions:[`s`],load(){return s(()=>import(`./BHEdbvp9.js`).then(e=>$(e.gas)),[],import.meta.url)}}),x.of({name:`Gherkin`,extensions:[`feature`],load(){return s(()=>import(`./oBAE_ms0.js`).then(e=>$(e.gherkin)),[],import.meta.url)}}),x.of({name:`Groovy`,extensions:[`groovy`,`gradle`],filename:/^Jenkinsfile$/,load(){return s(()=>import(`./CUpZ7dEl.js`).then(e=>$(e.groovy)),[],import.meta.url)}}),x.of({name:`Haskell`,extensions:[`hs`],load(){return s(()=>import(`./BRsoo5mP.js`).then(e=>$(e.haskell)),[],import.meta.url)}}),x.of({name:`Haxe`,extensions:[`hx`],load(){return s(()=>import(`./DjVOVvNP.js`).then(e=>$(e.haxe)),[],import.meta.url)}}),x.of({name:`HXML`,extensions:[`hxml`],load(){return s(()=>import(`./DjVOVvNP.js`).then(e=>$(e.hxml)),[],import.meta.url)}}),x.of({name:`HTTP`,load(){return s(()=>import(`./CLVgA2GD.js`).then(e=>$(e.http)),[],import.meta.url)}}),x.of({name:`IDL`,extensions:[`pro`],load(){return s(()=>import(`./BUZw3wgd.js`).then(e=>$(e.idl)),[],import.meta.url)}}),x.of({name:`JSON-LD`,alias:[`jsonld`],extensions:[`jsonld`],load(){return s(()=>import(`./Bu8mWwtz.js`).then(e=>$(e.jsonld)),[],import.meta.url)}}),x.of({name:`Julia`,extensions:[`jl`],load(){return s(()=>import(`./CQfgDRfP.js`).then(e=>$(e.julia)),[],import.meta.url)}}),x.of({name:`Kotlin`,extensions:[`kt`,`kts`],load(){return s(()=>import(`./xvONpD0Z.js`).then(e=>$(e.kotlin)),[],import.meta.url)}}),x.of({name:`LiveScript`,alias:[`ls`],extensions:[`ls`],load(){return s(()=>import(`./BXxG0Yva.js`).then(e=>$(e.liveScript)),[],import.meta.url)}}),x.of({name:`Lua`,extensions:[`lua`],load(){return s(()=>import(`./DPCEkfD_.js`).then(e=>$(e.lua)),[],import.meta.url)}}),x.of({name:`mIRC`,extensions:[`mrc`],load(){return s(()=>import(`./C9zpzAZU.js`).then(e=>$(e.mirc)),[],import.meta.url)}}),x.of({name:`Mathematica`,extensions:[`m`,`nb`,`wl`,`wls`],load(){return s(()=>import(`./u8YMmbU0.js`).then(e=>$(e.mathematica)),[],import.meta.url)}}),x.of({name:`Modelica`,extensions:[`mo`],load(){return s(()=>import(`./CqHI_q-D.js`).then(e=>$(e.modelica)),[],import.meta.url)}}),x.of({name:`MUMPS`,extensions:[`mps`],load(){return s(()=>import(`./BSzj6Xyz.js`).then(e=>$(e.mumps)),[],import.meta.url)}}),x.of({name:`Mbox`,extensions:[`mbox`],load(){return s(()=>import(`./BEMVcqjs.js`).then(e=>$(e.mbox)),[],import.meta.url)}}),x.of({name:`Nginx`,filename:/nginx.*\.conf$/i,load(){return s(()=>import(`./8H7HVH4w.js`).then(e=>$(e.nginx)),[],import.meta.url)}}),x.of({name:`NSIS`,extensions:[`nsh`,`nsi`],load(){return s(()=>import(`./GwMd3KmG.js`).then(e=>$(e.nsis)),__vite__mapDeps([23,21]),import.meta.url)}}),x.of({name:`NTriples`,extensions:[`nt`,`nq`],load(){return s(()=>import(`./CzMBulkp.js`).then(e=>$(e.ntriples)),[],import.meta.url)}}),x.of({name:`Objective-C`,alias:[`objective-c`,`objc`],extensions:[`m`],load(){return s(()=>import(`./xvONpD0Z.js`).then(e=>$(e.objectiveC)),[],import.meta.url)}}),x.of({name:`Objective-C++`,alias:[`objective-c++`,`objc++`],extensions:[`mm`],load(){return s(()=>import(`./xvONpD0Z.js`).then(e=>$(e.objectiveCpp)),[],import.meta.url)}}),x.of({name:`OCaml`,extensions:[`ml`,`mli`,`mll`,`mly`],load(){return s(()=>import(`./B45xgp2S.js`).then(e=>$(e.oCaml)),[],import.meta.url)}}),x.of({name:`Octave`,extensions:[`m`],load(){return s(()=>import(`./D2Q8cUp1.js`).then(e=>$(e.octave)),[],import.meta.url)}}),x.of({name:`Oz`,extensions:[`oz`],load(){return s(()=>import(`./BwTct_5T.js`).then(e=>$(e.oz)),[],import.meta.url)}}),x.of({name:`Pascal`,extensions:[`p`,`pas`],load(){return s(()=>import(`./Dp_KdFgX.js`).then(e=>$(e.pascal)),[],import.meta.url)}}),x.of({name:`Perl`,extensions:[`pl`,`pm`],load(){return s(()=>import(`./BkSkiI9m.js`).then(e=>$(e.perl)),[],import.meta.url)}}),x.of({name:`Pig`,extensions:[`pig`],load(){return s(()=>import(`./AF4Hwhju.js`).then(e=>$(e.pig)),[],import.meta.url)}}),x.of({name:`PowerShell`,extensions:[`ps1`,`psd1`,`psm1`],load(){return s(()=>import(`./D8WpQPaX.js`).then(e=>$(e.powerShell)),[],import.meta.url)}}),x.of({name:`Properties files`,alias:[`ini`,`properties`],extensions:[`properties`,`ini`,`in`],load(){return s(()=>import(`./C357ku5U.js`).then(e=>$(e.properties)),[],import.meta.url)}}),x.of({name:`ProtoBuf`,extensions:[`proto`],load(){return s(()=>import(`./D1ij_kNL.js`).then(e=>$(e.protobuf)),[],import.meta.url)}}),x.of({name:`Pug`,alias:[`jade`],extensions:[`pug`,`jade`],load(){return s(()=>import(`./Cp5ooBfH.js`).then(e=>$(e.pug)),__vite__mapDeps([24,25]),import.meta.url)}}),x.of({name:`Puppet`,extensions:[`pp`],load(){return s(()=>import(`./BZyAS7I4.js`).then(e=>$(e.puppet)),[],import.meta.url)}}),x.of({name:`Q`,extensions:[`q`],load(){return s(()=>import(`./B9NhS7L_.js`).then(e=>$(e.q)),[],import.meta.url)}}),x.of({name:`R`,alias:[`rscript`],extensions:[`r`,`R`],load(){return s(()=>import(`./CxDmU1I4.js`).then(e=>$(e.r)),[],import.meta.url)}}),x.of({name:`RPM Changes`,load(){return s(()=>import(`./gpDK5sbt.js`).then(e=>$(e.rpmChanges)),[],import.meta.url)}}),x.of({name:`RPM Spec`,extensions:[`spec`],load(){return s(()=>import(`./gpDK5sbt.js`).then(e=>$(e.rpmSpec)),[],import.meta.url)}}),x.of({name:`Ruby`,alias:[`jruby`,`macruby`,`rake`,`rb`,`rbx`],extensions:[`rb`],filename:/^(Gemfile|Rakefile)$/,load(){return s(()=>import(`./ChfNwlCY.js`).then(e=>$(e.ruby)),[],import.meta.url)}}),x.of({name:`SAS`,extensions:[`sas`],load(){return s(()=>import(`./C2OyD2Y6.js`).then(e=>$(e.sas)),[],import.meta.url)}}),x.of({name:`Scala`,extensions:[`scala`],load(){return s(()=>import(`./xvONpD0Z.js`).then(e=>$(e.scala)),[],import.meta.url)}}),x.of({name:`Scheme`,extensions:[`scm`,`ss`],load(){return s(()=>import(`./D9qYN0V5.js`).then(e=>$(e.scheme)),[],import.meta.url)}}),x.of({name:`Shell`,alias:[`bash`,`sh`,`zsh`],extensions:[`sh`,`ksh`,`bash`],filename:/^PKGBUILD$/,load(){return s(()=>import(`./DwuoZtxw.js`).then(e=>$(e.shell)),[],import.meta.url)}}),x.of({name:`Sieve`,extensions:[`siv`,`sieve`],load(){return s(()=>import(`./tLWDfEkZ.js`).then(e=>$(e.sieve)),[],import.meta.url)}}),x.of({name:`Smalltalk`,extensions:[`st`],load(){return s(()=>import(`./BLp5-jwC.js`).then(e=>$(e.smalltalk)),[],import.meta.url)}}),x.of({name:`Solr`,load(){return s(()=>import(`./B78wSQJQ.js`).then(e=>$(e.solr)),[],import.meta.url)}}),x.of({name:`SML`,extensions:[`sml`,`sig`,`fun`,`smackspec`],load(){return s(()=>import(`./B45xgp2S.js`).then(e=>$(e.sml)),[],import.meta.url)}}),x.of({name:`SPARQL`,alias:[`sparul`],extensions:[`rq`,`sparql`],load(){return s(()=>import(`./Dz-mlCAC.js`).then(e=>$(e.sparql)),[],import.meta.url)}}),x.of({name:`Spreadsheet`,alias:[`excel`,`formula`],load(){return s(()=>import(`./CTIncYxj.js`).then(e=>$(e.spreadsheet)),[],import.meta.url)}}),x.of({name:`Squirrel`,extensions:[`nut`],load(){return s(()=>import(`./xvONpD0Z.js`).then(e=>$(e.squirrel)),[],import.meta.url)}}),x.of({name:`Stylus`,extensions:[`styl`],load(){return s(()=>import(`./BOVgKnng.js`).then(e=>$(e.stylus)),[],import.meta.url)}}),x.of({name:`Swift`,extensions:[`swift`],load(){return s(()=>import(`./DKB6_1j6.js`).then(e=>$(e.swift)),[],import.meta.url)}}),x.of({name:`sTeX`,load(){return s(()=>import(`./DNzd62Q_.js`).then(e=>$(e.stex)),[],import.meta.url)}}),x.of({name:`LaTeX`,alias:[`tex`],extensions:[`text`,`ltx`,`tex`],load(){return s(()=>import(`./DNzd62Q_.js`).then(e=>$(e.stex)),[],import.meta.url)}}),x.of({name:`SystemVerilog`,extensions:[`v`,`sv`,`svh`],load(){return s(()=>import(`./CjI9Y6RI.js`).then(e=>$(e.verilog)),[],import.meta.url)}}),x.of({name:`Tcl`,extensions:[`tcl`],load(){return s(()=>import(`./BGfruO1u.js`).then(e=>$(e.tcl)),[],import.meta.url)}}),x.of({name:`Textile`,extensions:[`textile`],load(){return s(()=>import(`./C4jVoHG1.js`).then(e=>$(e.textile)),[],import.meta.url)}}),x.of({name:`TiddlyWiki`,load(){return s(()=>import(`./VlUiK86J.js`).then(e=>$(e.tiddlyWiki)),[],import.meta.url)}}),x.of({name:`Tiki wiki`,load(){return s(()=>import(`./DTszW0OQ.js`).then(e=>$(e.tiki)),[],import.meta.url)}}),x.of({name:`TOML`,extensions:[`toml`],load(){return s(()=>import(`./BPTmHmyx.js`).then(e=>$(e.toml)),[],import.meta.url)}}),x.of({name:`Troff`,extensions:[`1`,`2`,`3`,`4`,`5`,`6`,`7`,`8`,`9`],load(){return s(()=>import(`./C2dAgh7P.js`).then(e=>$(e.troff)),[],import.meta.url)}}),x.of({name:`TTCN`,extensions:[`ttcn`,`ttcn3`,`ttcnpp`],load(){return s(()=>import(`./PPSTk1ow.js`).then(e=>$(e.ttcn)),[],import.meta.url)}}),x.of({name:`TTCN_CFG`,extensions:[`cfg`],load(){return s(()=>import(`./2b4Gb5sE.js`).then(e=>$(e.ttcnCfg)),[],import.meta.url)}}),x.of({name:`Turtle`,extensions:[`ttl`],load(){return s(()=>import(`./Cx3rYX2g.js`).then(e=>$(e.turtle)),[],import.meta.url)}}),x.of({name:`Web IDL`,extensions:[`webidl`],load(){return s(()=>import(`./D5jiJvOU.js`).then(e=>$(e.webIDL)),[],import.meta.url)}}),x.of({name:`VB.NET`,extensions:[`vb`],load(){return s(()=>import(`./BthdM_4N.js`).then(e=>$(e.vb)),[],import.meta.url)}}),x.of({name:`VBScript`,extensions:[`vbs`],load(){return s(()=>import(`./D9f6rSsU.js`).then(e=>$(e.vbScript)),[],import.meta.url)}}),x.of({name:`Velocity`,extensions:[`vtl`],load(){return s(()=>import(`./CqftRsjg.js`).then(e=>$(e.velocity)),[],import.meta.url)}}),x.of({name:`Verilog`,extensions:[`v`],load(){return s(()=>import(`./CjI9Y6RI.js`).then(e=>$(e.verilog)),[],import.meta.url)}}),x.of({name:`VHDL`,extensions:[`vhd`,`vhdl`],load(){return s(()=>import(`./kS471soi.js`).then(e=>$(e.vhdl)),[],import.meta.url)}}),x.of({name:`XQuery`,extensions:[`xy`,`xquery`,`xq`,`xqm`,`xqy`],load(){return s(()=>import(`./BKJx4mf9.js`).then(e=>$(e.xQuery)),[],import.meta.url)}}),x.of({name:`Yacas`,extensions:[`ys`],load(){return s(()=>import(`./CXXgtw0p.js`).then(e=>$(e.yacas)),[],import.meta.url)}}),x.of({name:`Z80`,extensions:[`z80`],load(){return s(()=>import(`./Co3PbHdE.js`).then(e=>$(e.z80)),[],import.meta.url)}}),x.of({name:`MscGen`,extensions:[`mscgen`,`mscin`,`msc`],load(){return s(()=>import(`./qgSLujhx.js`).then(e=>$(e.mscgen)),[],import.meta.url)}}),x.of({name:`Xù`,extensions:[`xu`],load(){return s(()=>import(`./qgSLujhx.js`).then(e=>$(e.xu)),[],import.meta.url)}}),x.of({name:`MsGenny`,extensions:[`msgenny`],load(){return s(()=>import(`./qgSLujhx.js`).then(e=>$(e.msgenny)),[],import.meta.url)}}),x.of({name:`Vue`,extensions:[`vue`],load(){return s(()=>import(`./Cn-vtDpV.js`).then(e=>e.vue()),__vite__mapDeps([26,1,3,8,2]),import.meta.url)}}),x.of({name:`Angular Template`,load(){return s(()=>import(`./B7GA1FFB.js`).then(e=>e.angular()),__vite__mapDeps([27,1,3,8,2]),import.meta.url)}})],Ty=se([{tag:g.keyword,class:`tok-k`},{tag:[g.string,g.regexp,g.special(g.string)],class:`tok-s`},{tag:[g.number,g.bool,g.null,g.atom],class:`tok-n`},{tag:[g.typeName,g.className,g.namespace],class:`tok-t`},{tag:g.comment,class:`tok-c`}]),Ey={style:e=>Ty.style(e),scope:e=>e.prop(f)!==ty.data};function Dy(e){let t=e.trim().split(/\s/)[0]??``;return t?x.matchLanguageName(wy,t,!1):null}var Oy=e=>e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`);function ky(e,t){let n=Dy(t)?.support;if(!n)return null;let r=``,i=fe(b.create({doc:e,extensions:[n]}),e.length,500)??n.language.parser.parse(e);return ce(e,i,Ey,(e,t)=>{r+=t?`<span class="${t}">${Oy(e)}</span>`:Oy(e)},()=>{r+=`
672
+ `;)e--;this.fragmentEnd=e?e-1:0}let n=this.cursor;n||(n=this.cursor=this.fragment.tree.cursor(),n.firstChild());let r=e+this.fragment.offset;for(;n.to<=r;)if(!n.parent())return!1;for(;;){if(n.from>=r)return this.fragment.from<=t;if(!n.childAfter(r))return!1}}matches(e){let t=this.cursor.tree;return t&&t.prop(ue.contextHash)==e}takeNodes(e){let t=this.cursor,n=this.fragment.offset,r=this.fragmentEnd-+!!this.fragment.openEnd,i=e.absoluteLineStart,a=i,o=e.block.children.length,s=a,c=o;for(;;){if(t.to-n>r||t.to-n>e.to){if(t.type.isAnonymous&&t.firstChild())continue;break}let i=fv(t.from-n,e.ranges);if(t.to-n<=e.ranges[e.rangeI].to)e.addNode(t.tree,i);else{let n=new he(e.parser.nodeSet.types[Q.Paragraph],[],[],0,e.block.hashProp);e.reusePlaceholders.set(n,t.tree),e.addNode(n,i)}if(t.type.is(`Block`)&&(uv.indexOf(t.type.id)<0?(a=t.to-n,o=e.block.children.length):(a=s,o=c),s=t.to-n,c=e.block.children.length),!t.nextSibling())break}for(;e.block.children.length>o;)e.block.children.pop(),e.block.positions.pop();return a-i}};function fv(e,t){let n=e;for(let r=1;r<t.length;r++){let i=t[r-1].to,a=t[r].from;i<e&&(n-=a-i)}return n}var pv=u({"Blockquote/...":g.quote,HorizontalRule:g.contentSeparator,"ATXHeading1/... SetextHeading1/...":g.heading1,"ATXHeading2/... SetextHeading2/...":g.heading2,"ATXHeading3/...":g.heading3,"ATXHeading4/...":g.heading4,"ATXHeading5/...":g.heading5,"ATXHeading6/...":g.heading6,"Comment CommentBlock":g.comment,Escape:g.escape,Entity:g.character,"Emphasis/...":g.emphasis,"StrongEmphasis/...":g.strong,"Link/... Image/...":g.link,"OrderedList/... BulletList/...":g.list,"BlockQuote/...":g.quote,"InlineCode CodeText":g.monospace,"URL Autolink":g.url,"HeaderMark HardBreak QuoteMark ListMark LinkMark EmphasisMark CodeMark":g.processingInstruction,"CodeInfo LinkLabel":g.labelName,LinkTitle:g.string,Paragraph:g.content}),mv=new B_(new ae(W_).extend(pv),Object.keys(j_).map(e=>j_[e]),Object.keys(j_).map(e=>F_[e]),Object.keys(j_),I_,f_,Object.keys(rv).map(e=>rv[e]),Object.keys(rv),[]);function hv(e,t,n){let r=[];for(let i=e.firstChild,a=t;;i=i.nextSibling){let e=i?i.from:n;if(e>a&&r.push({from:a,to:e}),!i)break;a=i.to}return r}function gv(e){let{codeParser:t,htmlParser:n}=e;return{wrap:te((e,r)=>{let i=e.type.id;if(t&&(i==Q.CodeBlock||i==Q.FencedCode)){let n=``;if(i==Q.FencedCode){let t=e.node.getChild(Q.CodeInfo);t&&(n=r.read(t.from,t.to))}let a=t(n);if(a)return{parser:a,overlay:e=>e.type.id==Q.CodeText,bracketed:i==Q.FencedCode}}else if(n&&(i==Q.HTMLBlock||i==Q.HTMLTag||i==Q.CommentBlock))return{parser:n,overlay:hv(e.node,e.from,e.to)};return null})}}var _v={resolve:`Strikethrough`,mark:`StrikethroughMark`},vv={defineNodes:[{name:`Strikethrough`,style:{"Strikethrough/...":g.strikethrough}},{name:`StrikethroughMark`,style:g.processingInstruction}],parseInline:[{name:`Strikethrough`,parse(e,t,n){if(t!=126||e.char(n+1)!=126||e.char(n+2)==126)return-1;let r=e.slice(n-1,n),i=e.slice(n+2,n+3),a=/\s|^$/.test(r),o=/\s|^$/.test(i),s=nv.test(r),c=nv.test(i);return e.addDelimiter(_v,n,n+2,!o&&(!c||a||s),!a&&(!s||o||c))},after:`Emphasis`}]};function yv(e,t,n=0,r,i=0){let a=0,o=!0,s=-1,c=-1,l=!1,u=()=>{r.push(e.elt(`TableCell`,i+s,i+c,e.parser.parseInline(t.slice(s,c),i+s)))};for(let d=n;d<t.length;d++){let n=t.charCodeAt(d);n==124&&!l?((!o||s>-1)&&a++,o=!1,r&&(s>-1&&u(),r.push(e.elt(`TableDelimiter`,d+i,d+i+1))),s=c=-1):(l||n!=32&&n!=9)&&(s<0&&(s=d),c=d+1),l=!l&&n==92}return s>-1&&(a++,r&&u()),a}function bv(e,t){for(let n=t;n<e.length;n++){let t=e.charCodeAt(n);if(t==124)return!0;t==92&&n++}return!1}var xv=/^[>\s]*\|?(\s*:?-+:?\s*\|)+(\s*:?-+:?\s*)?$/,Sv=class{constructor(){this.rows=null}nextLine(e,t,n){if(this.rows==null){this.rows=!1;let r;if((t.next==45||t.next==58||t.next==124)&&xv.test(r=t.text.slice(t.pos))){let i=[];yv(e,n.content,0,i,n.start)==yv(e,r,0)&&(this.rows=[e.elt(`TableHeader`,n.start,n.start+n.content.length,i),e.elt(`TableDelimiter`,e.lineStart+t.pos,e.lineStart+t.text.length)])}}else if(this.rows){let n=[];yv(e,t.text,t.pos,n,e.lineStart),this.rows.push(e.elt(`TableRow`,e.lineStart+t.pos,e.lineStart+t.text.length,n))}return!1}finish(e,t){return this.rows?(e.addLeafElement(t,e.elt(`Table`,t.start,t.start+t.content.length,this.rows)),!0):!1}},Cv={defineNodes:[{name:`Table`,block:!0},{name:`TableHeader`,style:{"TableHeader/...":g.heading}},`TableRow`,{name:`TableCell`,style:g.content},{name:`TableDelimiter`,style:g.processingInstruction}],parseBlock:[{name:`Table`,leaf(e,t){return bv(t.content,0)?new Sv:null},endLeaf(e,t,n){if(n.parsers.some(e=>e instanceof Sv)||!bv(t.text,t.basePos))return!1;let r=e.peekLine();return xv.test(r)&&yv(e,t.text,t.basePos)==yv(e,r,t.basePos)},before:`SetextHeading`}]},wv=class{nextLine(){return!1}finish(e,t){return e.addLeafElement(t,e.elt(`Task`,t.start,t.start+t.content.length,[e.elt(`TaskMarker`,t.start,t.start+3),...e.parser.parseInline(t.content.slice(3),t.start+3)])),!0}},Tv={defineNodes:[{name:`Task`,block:!0,style:g.list},{name:`TaskMarker`,style:g.atom}],parseBlock:[{name:`TaskList`,leaf(e,t){return/^\[[ xX]\][ \t]/.test(t.content)&&e.parentType().name==`ListItem`?new wv:null},after:`SetextHeading`}]},Ev=/(www\.)|(https?:\/\/)|([\w.+-]{1,100}@)|(mailto:|xmpp:)/gy,Dv=/[\w-]+(\.[\w-]+)+(:\d+)?(\/[^\s<]*)?/gy,Ov=/[\w-]+\.[\w-]+($|[/:])/,kv=/[\w.+-]+@[\w-]+(\.[\w.-]+)+/gy,Av=/\/[a-zA-Z\d@.]+/gy;function jv(e,t,n,r){let i=0;for(let a=t;a<n;a++)e[a]==r&&i++;return i}function Mv(e,t){Dv.lastIndex=t;let n=Dv.exec(e);if(!n||Ov.exec(n[0])[0].indexOf(`_`)>-1)return-1;let r=t+n[0].length;for(;;){let n=e[r-1],i;if(/[?!.,:*_~]/.test(n)||n==`)`&&jv(e,t,r,`)`)>jv(e,t,r,`(`))r--;else if(n==`;`&&(i=/&(?:#\d+|#x[a-f\d]+|\w+);$/.exec(e.slice(t,r))))r=t+i.index;else break}return r}function Nv(e,t){kv.lastIndex=t;let n=kv.exec(e);if(!n)return-1;let r=n[0][n[0].length-1];return r==`_`||r==`-`?-1:t+n[0].length-+(r==`.`)}var Pv=[Cv,Tv,vv,{parseInline:[{name:`Autolink`,parse(e,t,n){let r=n-e.offset;if(r&&/\w/.test(e.text[r-1]))return-1;Ev.lastIndex=r;let i=Ev.exec(e.text),a=-1;return!i||(i[1]||i[2]?(a=Mv(e.text,r+i[0].length),a>-1&&e.hasOpenLink&&(a=r+/([^\[\]]|\[[^\]]*\])*/.exec(e.text.slice(r,a))[0].length)):i[3]?a=Nv(e.text,r):(a=Nv(e.text,r+i[0].length),a>-1&&i[0]==`xmpp:`&&(Av.lastIndex=a,i=Av.exec(e.text),i&&(a=i.index+i[0].length))),a<0)?-1:(e.addElement(e.elt(`URL`,n,a+e.offset)),a+e.offset)}}]}];function Fv(e,t,n){return(r,i,a)=>{if(i!=e||r.char(a+1)==e)return-1;let o=[r.elt(n,a,a+1)];for(let i=a+1;i<r.end;i++){let s=r.char(i);if(s==e)return r.addElement(r.elt(t,a,i+1,o.concat(r.elt(n,i,i+1))));if(s==92&&o.push(r.elt(`Escape`,i,i+++2)),p_(s))break}return-1}}var Iv={defineNodes:[{name:`Superscript`,style:g.special(g.content)},{name:`SuperscriptMark`,style:g.processingInstruction}],parseInline:[{name:`Superscript`,parse:Fv(94,`Superscript`,`SuperscriptMark`)}]},Lv={defineNodes:[{name:`Subscript`,style:g.special(g.content)},{name:`SubscriptMark`,style:g.processingInstruction}],parseInline:[{name:`Subscript`,parse:Fv(126,`Subscript`,`SubscriptMark`)}]},Rv={defineNodes:[{name:`Emoji`,style:g.character}],parseInline:[{name:`Emoji`,parse(e,t,n){let r;return t!=58||!(r=/^[a-zA-Z_0-9]+:/.exec(e.slice(n+1,e.end)))?-1:e.addElement(e.elt(`Emoji`,n,n+1+r[0].length))}}]},zv=a({html:()=>Uv,htmlCompletionSource:()=>Wv}),Bv=ie.define({id:0,name:`Document`,top:!0}),Vv=class extends me{createParse(e,t,n){let r=n[0]?.from??0,i=n[n.length-1]?.to??e.length;return{parsedPos:i,stoppedAt:null,stopAt(){},advance:()=>new he(Bv,[],[],i-r)}}},Hv=new oe(C(),new Vv,[],`html`);function Uv(e){return new de(Hv)}function Wv(){return null}var Gv=a({commonmarkLanguage:()=>ey,deleteMarkupBackward:()=>my,insertNewlineContinueMarkup:()=>ly,insertNewlineContinueMarkupCommand:()=>cy,markdown:()=>_y,markdownKeymap:()=>hy,markdownLanguage:()=>ty,pasteURLAsLink:()=>Sy}),Kv=C({commentTokens:{block:{open:`<!--`,close:`-->`}}}),qv=new ue,Jv=mv.configure({props:[re.add(e=>!e.is(`Block`)||e.is(`Document`)||Yv(e)!=null||Xv(e)?void 0:(e,t)=>({from:t.doc.lineAt(e.from).to,to:e.to})),qv.add(Yv),S.add({Document:()=>null}),f.add({Document:Kv})]});function Yv(e){let t=/^(?:ATX|Setext)Heading(\d)$/.exec(e.name);return t?+t[1]:void 0}function Xv(e){return e.name==`OrderedList`||e.name==`BulletList`}function Zv(e,t){let n=e;for(;;){let e=n.nextSibling,r;if(!e||(r=Yv(e.type))!=null&&r<=t)break;n=e}return n.to}var Qv=ee.of((e,t,n)=>{for(let r=p(e).resolveInner(n,-1);r&&!(r.from<t);r=r.parent){let e=r.type.prop(qv);if(e==null)continue;let t=Zv(r,e);if(t>n)return{from:n,to:t}}return null});function $v(e){return new oe(Kv,e,[],`markdown`)}var ey=$v(Jv),ty=$v(Jv.configure([Pv,Lv,Iv,Rv,{props:[re.add({Table:(e,t)=>({from:t.doc.lineAt(e.from).to,to:e.to})})]}]));function ny(e,t){return n=>{if(n&&e){let t=null;if(n=/\S*/.exec(n)[0],t=typeof e==`function`?e(n):x.matchLanguageName(e,n,!0),t instanceof x)return t.support?t.support.language.parser:pe.getSkippingParser(t.load());if(t)return t.parser}return t?t.parser:null}}var ry=class{constructor(e,t,n,r,i,a,o){this.node=e,this.from=t,this.to=n,this.spaceBefore=r,this.spaceAfter=i,this.type=a,this.item=o}blank(e,t=!0){let n=this.spaceBefore+(this.node.name==`Blockquote`?`>`:``);if(e!=null){for(;n.length<e;)n+=` `;return n}for(let e=this.to-this.from-n.length-this.spaceAfter.length;e>0;e--)n+=` `;return n+(t?this.spaceAfter:``)}marker(e,t){let n=this.node.name==`OrderedList`?String(+ay(this.item,e)[2]+t):``;return this.spaceBefore+n+this.type+this.spaceAfter}};function iy(e,t){let n=[],r=[];for(let t=e;t;t=t.parent){if(t.name==`FencedCode`)return r;(t.name==`ListItem`||t.name==`Blockquote`)&&n.push(t)}for(let e=n.length-1;e>=0;e--){let i=n[e],a,o=t.lineAt(i.from),s=i.from-o.from;if(i.name==`Blockquote`&&(a=/^ *>( ?)/.exec(o.text.slice(s))))r.push(new ry(i,s,s+a[0].length,``,a[1],`>`,null));else if(i.name==`ListItem`&&i.parent.name==`OrderedList`&&(a=/^( *)\d+([.)])( *)/.exec(o.text.slice(s)))){let e=a[3],t=a[0].length;e.length>=4&&(e=e.slice(0,e.length-4),t-=4),r.push(new ry(i.parent,s,s+t,a[1],e,a[2],i))}else if(i.name==`ListItem`&&i.parent.name==`BulletList`&&(a=/^( *)([-+*])( {1,4}\[[ xX]\])?( +)/.exec(o.text.slice(s)))){let e=a[4],t=a[0].length;e.length>4&&(e=e.slice(0,e.length-4),t-=4);let n=a[2];a[3]&&(n+=a[3].replace(/[xX]/,` `)),r.push(new ry(i.parent,s,s+t,a[1],e,n,i))}}return r}function ay(e,t){return/^(\s*)(\d+)(?=[.)])/.exec(t.sliceString(e.from,e.from+10))}function oy(e,t,n,r=0){for(let i=-1,a=e;;){if(a.name==`ListItem`){let e=ay(a,t),o=+e[2];if(i>=0){if(o!=i+1)return;n.push({from:a.from+e[1].length,to:a.from+e[0].length,insert:String(i+2+r)})}i=o}let e=a.nextSibling;if(!e)break;a=e}}function sy(e,t){let n=/^[ \t]*/.exec(e)[0].length;if(!n||t.facet(y)!=` `)return e;let r=le(e,4,n),i=``;for(let e=r;e>0;)e>=4?(i+=` `,e-=4):(i+=` `,e--);return i+e.slice(n)}var cy=(e={})=>({state:t,dispatch:n})=>{let r=p(t),{doc:i}=t,a=null,o=t.changeByRange(n=>{if(!n.empty||!ty.isActiveAt(t,n.from,-1)&&!ty.isActiveAt(t,n.from,1))return a={range:n};let o=n.from,s=i.lineAt(o),c=iy(r.resolveInner(o,-1),i);for(;c.length&&c[c.length-1].from>o-s.from;)c.pop();if(!c.length)return a={range:n};let l=c[c.length-1];if(l.to-l.spaceAfter.length>o-s.from)return a={range:n};let u=o>=l.to-l.spaceAfter.length&&!/\S/.test(s.text.slice(l.to));if(l.item&&u){if(l.item.from<s.from&&!/^[\s>]*$/.test(s.text.slice(0,l.to)))return a={range:n};let r=l.node.firstChild,u=l.node.getChild(`ListItem`,`ListItem`);if(r.to>=o||u&&u.to<o||s.from>0&&!/[^\s>]/.test(i.lineAt(s.from-1).text)||e.nonTightLists===!1){let e=c.length>1?c[c.length-2]:null,t,n=``;e&&e.item?(t=s.from+e.from,n=e.marker(i,1)):t=s.from+(e?e.to:0);let r=[{from:t,to:o,insert:n}];return l.node.name==`OrderedList`&&oy(l.item,i,r,-2),e&&e.node.name==`OrderedList`&&oy(e.item,i,r),{range:h.cursor(t+n.length),changes:r}}{let e=fy(c,t,s);return{range:h.cursor(o+e.length+1),changes:{from:s.from,insert:e+t.lineBreak}}}}if(l.node.name==`Blockquote`&&u&&s.from){let e=i.lineAt(s.from-1),r=/>\s*$/.exec(e.text);if(r&&r.index==l.from){let i=t.changes([{from:e.from+r.index,to:e.to},{from:s.from+l.from,to:s.to}]);return{range:n.map(i),changes:i}}}let d=[];l.node.name==`OrderedList`&&oy(l.item,i,d);let f=l.item&&l.item.from<s.from,p=``;if(!f||/^[\s\d.)\-+*>]*/.exec(s.text)[0].length>=l.to)for(let e=0,t=c.length-1;e<=t;e++)p+=e==t&&!f?c[e].marker(i,1):c[e].blank(e<t?le(s.text,4,c[e+1].from)-p.length:null);let m=o;for(;m>s.from&&/\s/.test(s.text.charAt(m-s.from-1));)m--;return p=sy(p,t),dy(l.node,t.doc)&&(p=fy(c,t,s)+t.lineBreak+p),d.push({from:m,to:o,insert:t.lineBreak+p}),{range:h.cursor(m+p.length+1),changes:d}});return!a&&(n(t.update(o,{scrollIntoView:!0,userEvent:`input`})),!0)},ly=cy();function uy(e){return e.name==`QuoteMark`||e.name==`ListMark`}function dy(e,t){if(e.name!=`OrderedList`&&e.name!=`BulletList`)return!1;let n=e.firstChild,r=e.getChild(`ListItem`,`ListItem`);if(!r)return!1;let i=t.lineAt(n.to),a=t.lineAt(r.from),o=/^[\s>]*$/.test(i.text);return i.number+ +!o<a.number}function fy(e,t,n){let r=``;for(let t=0,i=e.length-2;t<=i;t++)r+=e[t].blank(t<i?le(n.text,4,e[t+1].from)-r.length:null,t<i);return sy(r,t)}function py(e,t){let n=e.resolveInner(t,-1),r=t;uy(n)&&(r=n.from,n=n.parent);for(let e;e=n.childBefore(r);)if(uy(e))r=e.from;else if(e.name==`OrderedList`||e.name==`BulletList`)n=e.lastChild,r=n.to;else break;return n}var my=({state:e,dispatch:t})=>{let n=p(e),r=null,i=e.changeByRange(t=>{let i=t.from,{doc:a}=e;if(t.empty&&ty.isActiveAt(e,t.from)){let t=a.lineAt(i),r=iy(py(n,i),a);if(r.length){let n=r[r.length-1],a=n.to-n.spaceAfter.length+ +!!n.spaceAfter;if(i-t.from>a&&!/\S/.test(t.text.slice(a,i-t.from)))return{range:h.cursor(t.from+a),changes:{from:t.from+a,to:i}};if(i-t.from==a&&(n.item&&t.from<=n.item.from||/^[\s>]*$/.test(t.text.slice(0,n.to)))){let r=t.from+n.from;if(n.item&&n.node.from<n.item.from&&/\S/.test(t.text.slice(n.from,n.to))){let i=n.blank(le(t.text,4,n.to)-le(t.text,4,n.from));return r==t.from&&(i=sy(i,e)),{range:h.cursor(r+i.length),changes:{from:r,to:t.from+n.to,insert:i}}}if(r<i)return{range:h.cursor(r),changes:{from:r,to:i}}}}}return r={range:t}});return!r&&(t(e.update(i,{scrollIntoView:!0,userEvent:`delete`})),!0)},hy=[{key:`Enter`,run:ly},{key:`Backspace`,run:my}],gy=Uv({matchClosingTags:!1});function _y(e={}){let{codeLanguages:t,defaultCodeLanguage:n,addKeymap:r=!0,base:{parser:i}=ey,completeHTMLTags:a=!0,pasteURLAsLink:o=!0,htmlTagLanguage:s=gy}=e;if(!(i instanceof B_))throw RangeError("Base parser provided to `markdown` should be a Markdown parser");let c=e.extensions?[e.extensions]:[],l=[s.support,Qv],u;o&&l.push(Sy),n instanceof de?(l.push(n.support),u=n.language):n&&(u=n);let f=t||u?ny(t,u):void 0;c.push(gv({codeParser:f,htmlParser:s.language.parser})),r&&l.push(v.high(d.of(hy)));let p=$v(i.configure(c));return a&&l.push(p.data.of({autocomplete:vy})),new de(p,l)}function vy(e){let{state:t,pos:n}=e,r=/<[:\-\.\w\u00b7-\uffff]*$/.exec(t.sliceDoc(n-25,n));if(!r)return null;let i=p(t).resolveInner(n,-1);for(;i&&!i.type.isTop;){if(i.name==`CodeBlock`||i.name==`FencedCode`||i.name==`ProcessingInstructionBlock`||i.name==`CommentBlock`||i.name==`Link`||i.name==`Image`)return null;i=i.parent}return{from:n-r[0].length,to:n,options:by(),validFor:/^<[:\-\.\w\u00b7-\uffff]*$/}}var yy=null;function by(){if(yy)return yy;let e=Wv(new ge(b.create({extensions:gy}),0,!0));return yy=e?e.options:[]}var xy=/code|horizontalrule|html|link|comment|processing|escape|entity|image|mark|url/i,Sy=m.domEventHandlers({paste:(e,t)=>{let{main:n}=t.state.selection;if(n.empty)return!1;let r=e.clipboardData?.getData(`text/plain`);if(!r||!/^(https?:\/\/|mailto:|xmpp:|www\.)/.test(r)||(/^www\./.test(r)&&(r=`https://`+r),!ty.isActiveAt(t.state,n.from,1)))return!1;let i=p(t.state),a=!1;return i.iterate({from:n.from,to:n.to,enter:e=>{(e.from>n.from||xy.test(e.name))&&(a=!0)},leave:e=>{e.to<n.to&&(a=!0)}}),!a&&(t.dispatch({changes:[{from:n.from,insert:`[`},{from:n.to,insert:`](${r})`}],userEvent:`input.paste`,scrollIntoView:!0}),!0)}});function $(e){return new de(ne.define(e))}function Cy(e){return s(()=>import(`./DIGvaVgJ.js`).then(t=>t.sql({dialect:t[e]})),__vite__mapDeps([0,1,2,3]),import.meta.url)}var wy=[x.of({name:`C`,extensions:[`c`,`h`,`ino`],load(){return s(()=>import(`./C6Btt2Xs.js`).then(e=>e.cpp()),__vite__mapDeps([4,1,3]),import.meta.url)}}),x.of({name:`C++`,alias:[`cpp`],extensions:[`cpp`,`c++`,`cc`,`cxx`,`hpp`,`h++`,`hh`,`hxx`],load(){return s(()=>import(`./C6Btt2Xs.js`).then(e=>e.cpp()),__vite__mapDeps([4,1,3]),import.meta.url)}}),x.of({name:`CQL`,alias:[`cassandra`],extensions:[`cql`],load(){return Cy(`Cassandra`)}}),x.of({name:`CSS`,extensions:[`css`],load(){return s(()=>import(`./DtbnBenW.js`).then(e=>e.css()),__vite__mapDeps([5,1,3]),import.meta.url)}}),x.of({name:`Go`,extensions:[`go`],load(){return s(()=>import(`./D_aBVMvK.js`).then(e=>e.go()),__vite__mapDeps([6,1,2,3]),import.meta.url)}}),x.of({name:`HTML`,alias:[`xhtml`],extensions:[`html`,`htm`,`handlebars`,`hbs`],load(){return s(()=>Promise.resolve().then(()=>zv).then(e=>e.html()),void 0,import.meta.url)}}),x.of({name:`Java`,extensions:[`java`],load(){return s(()=>import(`./Bbt0DTmZ.js`).then(e=>e.java()),__vite__mapDeps([7,1,3]),import.meta.url)}}),x.of({name:`JavaScript`,alias:[`ecmascript`,`js`,`node`],extensions:[`js`,`mjs`,`cjs`],load(){return s(()=>import(`./K_3X9lyC.js`).then(e=>e.javascript()),__vite__mapDeps([8,1,2,3]),import.meta.url)}}),x.of({name:`Jinja`,extensions:[`j2`,`jinja`,`jinja2`],load(){return s(()=>import(`./D_JZ0swv.js`).then(e=>e.jinja()),__vite__mapDeps([9,1,3]),import.meta.url)}}),x.of({name:`JSON`,alias:[`json5`],extensions:[`json`,`map`],load(){return s(()=>import(`./CDAjAYjS.js`).then(e=>e.json()),__vite__mapDeps([10,1,3]),import.meta.url)}}),x.of({name:`JSX`,extensions:[`jsx`],load(){return s(()=>import(`./K_3X9lyC.js`).then(e=>e.javascript({jsx:!0})),__vite__mapDeps([8,1,2,3]),import.meta.url)}}),x.of({name:`LESS`,extensions:[`less`],load(){return s(()=>import(`./_rHYGvON.js`).then(e=>e.less()),__vite__mapDeps([11,1,3,5]),import.meta.url)}}),x.of({name:`Liquid`,extensions:[`liquid`],load(){return s(()=>import(`./DgZW3JtG.js`).then(e=>e.liquid()),__vite__mapDeps([12,1,3]),import.meta.url)}}),x.of({name:`MariaDB SQL`,load(){return Cy(`MariaSQL`)}}),x.of({name:`Markdown`,extensions:[`md`,`markdown`,`mkd`],load(){return s(()=>Promise.resolve().then(()=>Gv).then(e=>e.markdown()),void 0,import.meta.url)}}),x.of({name:`MS SQL`,load(){return Cy(`MSSQL`)}}),x.of({name:`MySQL`,load(){return Cy(`MySQL`)}}),x.of({name:`PHP`,extensions:[`php`,`php3`,`php4`,`php5`,`php7`,`phtml`],load(){return s(()=>import(`./dvrIP-Hm.js`).then(e=>e.php()),__vite__mapDeps([13,1,3]),import.meta.url)}}),x.of({name:`PLSQL`,extensions:[`pls`],load(){return Cy(`PLSQL`)}}),x.of({name:`PostgreSQL`,load(){return Cy(`PostgreSQL`)}}),x.of({name:`Python`,extensions:[`BUILD`,`bzl`,`py`,`pyw`],filename:/^(BUCK|BUILD)$/,load(){return s(()=>import(`./Bffqt7tx.js`).then(e=>e.python()),__vite__mapDeps([14,1,2,3]),import.meta.url)}}),x.of({name:`Rust`,extensions:[`rs`],load(){return s(()=>import(`./BWonG38x.js`).then(e=>e.rust()),__vite__mapDeps([15,1,3]),import.meta.url)}}),x.of({name:`Sass`,extensions:[`sass`],load(){return s(()=>import(`./BEHa2uNW.js`).then(e=>e.sass({indented:!0})),__vite__mapDeps([16,1,3,5]),import.meta.url)}}),x.of({name:`SCSS`,extensions:[`scss`],load(){return s(()=>import(`./BEHa2uNW.js`).then(e=>e.sass()),__vite__mapDeps([16,1,3,5]),import.meta.url)}}),x.of({name:`SQL`,extensions:[`sql`],load(){return Cy(`StandardSQL`)}}),x.of({name:`SQLite`,load(){return Cy(`SQLite`)}}),x.of({name:`TSX`,extensions:[`tsx`],load(){return s(()=>import(`./K_3X9lyC.js`).then(e=>e.javascript({jsx:!0,typescript:!0})),__vite__mapDeps([8,1,2,3]),import.meta.url)}}),x.of({name:`TypeScript`,alias:[`ts`],extensions:[`ts`,`mts`,`cts`],load(){return s(()=>import(`./K_3X9lyC.js`).then(e=>e.javascript({typescript:!0})),__vite__mapDeps([8,1,2,3]),import.meta.url)}}),x.of({name:`WebAssembly`,extensions:[`wat`,`wast`],load(){return s(()=>import(`./BPW39P52.js`).then(e=>e.wast()),__vite__mapDeps([17,1,3]),import.meta.url)}}),x.of({name:`XML`,alias:[`rss`,`wsdl`,`xsd`],extensions:[`xml`,`xsl`,`xsd`,`svg`],load(){return s(()=>import(`./Ds8Pkiic.js`).then(e=>e.xml()),__vite__mapDeps([18,1,3]),import.meta.url)}}),x.of({name:`YAML`,alias:[`yml`],extensions:[`yaml`,`yml`],load(){return s(()=>import(`./CPF5uNy5.js`).then(e=>e.yaml()),__vite__mapDeps([19,1,3]),import.meta.url)}}),x.of({name:`APL`,extensions:[`dyalog`,`apl`],load(){return s(()=>import(`./gfMMiTNf.js`).then(e=>$(e.apl)),[],import.meta.url)}}),x.of({name:`PGP`,alias:[`asciiarmor`],extensions:[`asc`,`pgp`,`sig`],load(){return s(()=>import(`./C_eisQCp.js`).then(e=>$(e.asciiArmor)),[],import.meta.url)}}),x.of({name:`ASN.1`,extensions:[`asn`,`asn1`],load(){return s(()=>import(`./DCl_8MCW.js`).then(e=>$(e.asn1({}))),[],import.meta.url)}}),x.of({name:`Asterisk`,filename:/^extensions\.conf$/i,load(){return s(()=>import(`./BEn0Cwpx.js`).then(e=>$(e.asterisk)),[],import.meta.url)}}),x.of({name:`Brainfuck`,extensions:[`b`,`bf`],load(){return s(()=>import(`./D5EjA2JK.js`).then(e=>$(e.brainfuck)),[],import.meta.url)}}),x.of({name:`Cobol`,extensions:[`cob`,`cpy`],load(){return s(()=>import(`./DHLQUbN7.js`).then(e=>$(e.cobol)),[],import.meta.url)}}),x.of({name:`C#`,alias:[`csharp`,`cs`],extensions:[`cs`],load(){return s(()=>import(`./xvONpD0Z.js`).then(e=>$(e.csharp)),[],import.meta.url)}}),x.of({name:`Clojure`,extensions:[`clj`,`cljc`,`cljx`],load(){return s(()=>import(`./BflJGmDX.js`).then(e=>$(e.clojure)),[],import.meta.url)}}),x.of({name:`ClojureScript`,extensions:[`cljs`],load(){return s(()=>import(`./BflJGmDX.js`).then(e=>$(e.clojure)),[],import.meta.url)}}),x.of({name:`Closure Stylesheets (GSS)`,extensions:[`gss`],load(){return s(()=>import(`./CnaYoQib.js`).then(e=>$(e.gss)),[],import.meta.url)}}),x.of({name:`CMake`,extensions:[`cmake`,`cmake.in`],filename:/^CMakeLists\.txt$/,load(){return s(()=>import(`./84nbDH0I.js`).then(e=>$(e.cmake)),[],import.meta.url)}}),x.of({name:`CoffeeScript`,alias:[`coffee`,`coffee-script`],extensions:[`coffee`],load(){return s(()=>import(`./De_zI4J0.js`).then(e=>$(e.coffeeScript)),[],import.meta.url)}}),x.of({name:`Common Lisp`,alias:[`lisp`],extensions:[`cl`,`lisp`,`el`],load(){return s(()=>import(`./DgAKBe0r.js`).then(e=>$(e.commonLisp)),[],import.meta.url)}}),x.of({name:`Cypher`,extensions:[`cyp`,`cypher`],load(){return s(()=>import(`./p9eYesGn.js`).then(e=>$(e.cypher)),[],import.meta.url)}}),x.of({name:`Cython`,extensions:[`pyx`,`pxd`,`pxi`],load(){return s(()=>import(`./B_1Jd8HM.js`).then(e=>$(e.cython)),[],import.meta.url)}}),x.of({name:`Crystal`,extensions:[`cr`],load(){return s(()=>import(`./Bsdphhtm.js`).then(e=>$(e.crystal)),[],import.meta.url)}}),x.of({name:`D`,extensions:[`d`],load(){return s(()=>import(`./DWkQyNnU.js`).then(e=>$(e.d)),[],import.meta.url)}}),x.of({name:`Dart`,extensions:[`dart`],load(){return s(()=>import(`./xvONpD0Z.js`).then(e=>$(e.dart)),[],import.meta.url)}}),x.of({name:`diff`,extensions:[`diff`,`patch`],load(){return s(()=>import(`./ChtP43wD.js`).then(e=>$(e.diff)),[],import.meta.url)}}),x.of({name:`Dockerfile`,filename:/^Dockerfile$/,load(){return s(()=>import(`./DLa7NjNO.js`).then(e=>$(e.dockerFile)),__vite__mapDeps([20,21]),import.meta.url)}}),x.of({name:`DTD`,extensions:[`dtd`],load(){return s(()=>import(`./DTF72YNO.js`).then(e=>$(e.dtd)),[],import.meta.url)}}),x.of({name:`Dylan`,extensions:[`dylan`,`dyl`,`intr`],load(){return s(()=>import(`./S7ucR4pR.js`).then(e=>$(e.dylan)),[],import.meta.url)}}),x.of({name:`EBNF`,load(){return s(()=>import(`./D4c0_ac3.js`).then(e=>$(e.ebnf)),[],import.meta.url)}}),x.of({name:`ECL`,extensions:[`ecl`],load(){return s(()=>import(`./BVIeWmwY.js`).then(e=>$(e.ecl)),[],import.meta.url)}}),x.of({name:`edn`,extensions:[`edn`],load(){return s(()=>import(`./BflJGmDX.js`).then(e=>$(e.clojure)),[],import.meta.url)}}),x.of({name:`Eiffel`,extensions:[`e`],load(){return s(()=>import(`./BEjRio4Q.js`).then(e=>$(e.eiffel)),[],import.meta.url)}}),x.of({name:`Elm`,extensions:[`elm`],load(){return s(()=>import(`./Cshzl8qu.js`).then(e=>$(e.elm)),[],import.meta.url)}}),x.of({name:`Erlang`,extensions:[`erl`],load(){return s(()=>import(`./BV0c4Hdn.js`).then(e=>$(e.erlang)),[],import.meta.url)}}),x.of({name:`Esper`,load(){return s(()=>import(`./DuQMFDvy.js`).then(e=>$(e.esper)),[],import.meta.url)}}),x.of({name:`Factor`,extensions:[`factor`],load(){return s(()=>import(`./CygcOYNo.js`).then(e=>$(e.factor)),__vite__mapDeps([22,21]),import.meta.url)}}),x.of({name:`FCL`,load(){return s(()=>import(`./ClOhbFR7.js`).then(e=>$(e.fcl)),[],import.meta.url)}}),x.of({name:`Forth`,extensions:[`forth`,`fth`,`4th`],load(){return s(()=>import(`./D6RzAl64.js`).then(e=>$(e.forth)),[],import.meta.url)}}),x.of({name:`Fortran`,extensions:[`f`,`for`,`f77`,`f90`,`f95`],load(){return s(()=>import(`./Bt6PBEDR.js`).then(e=>$(e.fortran)),[],import.meta.url)}}),x.of({name:`F#`,alias:[`fsharp`],extensions:[`fs`],load(){return s(()=>import(`./B45xgp2S.js`).then(e=>$(e.fSharp)),[],import.meta.url)}}),x.of({name:`Gas`,extensions:[`s`],load(){return s(()=>import(`./BHEdbvp9.js`).then(e=>$(e.gas)),[],import.meta.url)}}),x.of({name:`Gherkin`,extensions:[`feature`],load(){return s(()=>import(`./oBAE_ms0.js`).then(e=>$(e.gherkin)),[],import.meta.url)}}),x.of({name:`Groovy`,extensions:[`groovy`,`gradle`],filename:/^Jenkinsfile$/,load(){return s(()=>import(`./CUpZ7dEl.js`).then(e=>$(e.groovy)),[],import.meta.url)}}),x.of({name:`Haskell`,extensions:[`hs`],load(){return s(()=>import(`./BRsoo5mP.js`).then(e=>$(e.haskell)),[],import.meta.url)}}),x.of({name:`Haxe`,extensions:[`hx`],load(){return s(()=>import(`./DjVOVvNP.js`).then(e=>$(e.haxe)),[],import.meta.url)}}),x.of({name:`HXML`,extensions:[`hxml`],load(){return s(()=>import(`./DjVOVvNP.js`).then(e=>$(e.hxml)),[],import.meta.url)}}),x.of({name:`HTTP`,load(){return s(()=>import(`./CLVgA2GD.js`).then(e=>$(e.http)),[],import.meta.url)}}),x.of({name:`IDL`,extensions:[`pro`],load(){return s(()=>import(`./BUZw3wgd.js`).then(e=>$(e.idl)),[],import.meta.url)}}),x.of({name:`JSON-LD`,alias:[`jsonld`],extensions:[`jsonld`],load(){return s(()=>import(`./Bu8mWwtz.js`).then(e=>$(e.jsonld)),[],import.meta.url)}}),x.of({name:`Julia`,extensions:[`jl`],load(){return s(()=>import(`./CQfgDRfP.js`).then(e=>$(e.julia)),[],import.meta.url)}}),x.of({name:`Kotlin`,extensions:[`kt`,`kts`],load(){return s(()=>import(`./xvONpD0Z.js`).then(e=>$(e.kotlin)),[],import.meta.url)}}),x.of({name:`LiveScript`,alias:[`ls`],extensions:[`ls`],load(){return s(()=>import(`./BXxG0Yva.js`).then(e=>$(e.liveScript)),[],import.meta.url)}}),x.of({name:`Lua`,extensions:[`lua`],load(){return s(()=>import(`./DPCEkfD_.js`).then(e=>$(e.lua)),[],import.meta.url)}}),x.of({name:`mIRC`,extensions:[`mrc`],load(){return s(()=>import(`./C9zpzAZU.js`).then(e=>$(e.mirc)),[],import.meta.url)}}),x.of({name:`Mathematica`,extensions:[`m`,`nb`,`wl`,`wls`],load(){return s(()=>import(`./u8YMmbU0.js`).then(e=>$(e.mathematica)),[],import.meta.url)}}),x.of({name:`Modelica`,extensions:[`mo`],load(){return s(()=>import(`./CqHI_q-D.js`).then(e=>$(e.modelica)),[],import.meta.url)}}),x.of({name:`MUMPS`,extensions:[`mps`],load(){return s(()=>import(`./BSzj6Xyz.js`).then(e=>$(e.mumps)),[],import.meta.url)}}),x.of({name:`Mbox`,extensions:[`mbox`],load(){return s(()=>import(`./BEMVcqjs.js`).then(e=>$(e.mbox)),[],import.meta.url)}}),x.of({name:`Nginx`,filename:/nginx.*\.conf$/i,load(){return s(()=>import(`./8H7HVH4w.js`).then(e=>$(e.nginx)),[],import.meta.url)}}),x.of({name:`NSIS`,extensions:[`nsh`,`nsi`],load(){return s(()=>import(`./GwMd3KmG.js`).then(e=>$(e.nsis)),__vite__mapDeps([23,21]),import.meta.url)}}),x.of({name:`NTriples`,extensions:[`nt`,`nq`],load(){return s(()=>import(`./CzMBulkp.js`).then(e=>$(e.ntriples)),[],import.meta.url)}}),x.of({name:`Objective-C`,alias:[`objective-c`,`objc`],extensions:[`m`],load(){return s(()=>import(`./xvONpD0Z.js`).then(e=>$(e.objectiveC)),[],import.meta.url)}}),x.of({name:`Objective-C++`,alias:[`objective-c++`,`objc++`],extensions:[`mm`],load(){return s(()=>import(`./xvONpD0Z.js`).then(e=>$(e.objectiveCpp)),[],import.meta.url)}}),x.of({name:`OCaml`,extensions:[`ml`,`mli`,`mll`,`mly`],load(){return s(()=>import(`./B45xgp2S.js`).then(e=>$(e.oCaml)),[],import.meta.url)}}),x.of({name:`Octave`,extensions:[`m`],load(){return s(()=>import(`./D2Q8cUp1.js`).then(e=>$(e.octave)),[],import.meta.url)}}),x.of({name:`Oz`,extensions:[`oz`],load(){return s(()=>import(`./BwTct_5T.js`).then(e=>$(e.oz)),[],import.meta.url)}}),x.of({name:`Pascal`,extensions:[`p`,`pas`],load(){return s(()=>import(`./Dp_KdFgX.js`).then(e=>$(e.pascal)),[],import.meta.url)}}),x.of({name:`Perl`,extensions:[`pl`,`pm`],load(){return s(()=>import(`./BkSkiI9m.js`).then(e=>$(e.perl)),[],import.meta.url)}}),x.of({name:`Pig`,extensions:[`pig`],load(){return s(()=>import(`./AF4Hwhju.js`).then(e=>$(e.pig)),[],import.meta.url)}}),x.of({name:`PowerShell`,extensions:[`ps1`,`psd1`,`psm1`],load(){return s(()=>import(`./D8WpQPaX.js`).then(e=>$(e.powerShell)),[],import.meta.url)}}),x.of({name:`Properties files`,alias:[`ini`,`properties`],extensions:[`properties`,`ini`,`in`],load(){return s(()=>import(`./C357ku5U.js`).then(e=>$(e.properties)),[],import.meta.url)}}),x.of({name:`ProtoBuf`,extensions:[`proto`],load(){return s(()=>import(`./D1ij_kNL.js`).then(e=>$(e.protobuf)),[],import.meta.url)}}),x.of({name:`Pug`,alias:[`jade`],extensions:[`pug`,`jade`],load(){return s(()=>import(`./Cp5ooBfH.js`).then(e=>$(e.pug)),__vite__mapDeps([24,25]),import.meta.url)}}),x.of({name:`Puppet`,extensions:[`pp`],load(){return s(()=>import(`./BZyAS7I4.js`).then(e=>$(e.puppet)),[],import.meta.url)}}),x.of({name:`Q`,extensions:[`q`],load(){return s(()=>import(`./B9NhS7L_.js`).then(e=>$(e.q)),[],import.meta.url)}}),x.of({name:`R`,alias:[`rscript`],extensions:[`r`,`R`],load(){return s(()=>import(`./CxDmU1I4.js`).then(e=>$(e.r)),[],import.meta.url)}}),x.of({name:`RPM Changes`,load(){return s(()=>import(`./gpDK5sbt.js`).then(e=>$(e.rpmChanges)),[],import.meta.url)}}),x.of({name:`RPM Spec`,extensions:[`spec`],load(){return s(()=>import(`./gpDK5sbt.js`).then(e=>$(e.rpmSpec)),[],import.meta.url)}}),x.of({name:`Ruby`,alias:[`jruby`,`macruby`,`rake`,`rb`,`rbx`],extensions:[`rb`],filename:/^(Gemfile|Rakefile)$/,load(){return s(()=>import(`./ChfNwlCY.js`).then(e=>$(e.ruby)),[],import.meta.url)}}),x.of({name:`SAS`,extensions:[`sas`],load(){return s(()=>import(`./C2OyD2Y6.js`).then(e=>$(e.sas)),[],import.meta.url)}}),x.of({name:`Scala`,extensions:[`scala`],load(){return s(()=>import(`./xvONpD0Z.js`).then(e=>$(e.scala)),[],import.meta.url)}}),x.of({name:`Scheme`,extensions:[`scm`,`ss`],load(){return s(()=>import(`./D9qYN0V5.js`).then(e=>$(e.scheme)),[],import.meta.url)}}),x.of({name:`Shell`,alias:[`bash`,`sh`,`zsh`],extensions:[`sh`,`ksh`,`bash`],filename:/^PKGBUILD$/,load(){return s(()=>import(`./DwuoZtxw.js`).then(e=>$(e.shell)),[],import.meta.url)}}),x.of({name:`Sieve`,extensions:[`siv`,`sieve`],load(){return s(()=>import(`./tLWDfEkZ.js`).then(e=>$(e.sieve)),[],import.meta.url)}}),x.of({name:`Smalltalk`,extensions:[`st`],load(){return s(()=>import(`./BLp5-jwC.js`).then(e=>$(e.smalltalk)),[],import.meta.url)}}),x.of({name:`Solr`,load(){return s(()=>import(`./B78wSQJQ.js`).then(e=>$(e.solr)),[],import.meta.url)}}),x.of({name:`SML`,extensions:[`sml`,`sig`,`fun`,`smackspec`],load(){return s(()=>import(`./B45xgp2S.js`).then(e=>$(e.sml)),[],import.meta.url)}}),x.of({name:`SPARQL`,alias:[`sparul`],extensions:[`rq`,`sparql`],load(){return s(()=>import(`./Dz-mlCAC.js`).then(e=>$(e.sparql)),[],import.meta.url)}}),x.of({name:`Spreadsheet`,alias:[`excel`,`formula`],load(){return s(()=>import(`./CTIncYxj.js`).then(e=>$(e.spreadsheet)),[],import.meta.url)}}),x.of({name:`Squirrel`,extensions:[`nut`],load(){return s(()=>import(`./xvONpD0Z.js`).then(e=>$(e.squirrel)),[],import.meta.url)}}),x.of({name:`Stylus`,extensions:[`styl`],load(){return s(()=>import(`./BOVgKnng.js`).then(e=>$(e.stylus)),[],import.meta.url)}}),x.of({name:`Swift`,extensions:[`swift`],load(){return s(()=>import(`./DKB6_1j6.js`).then(e=>$(e.swift)),[],import.meta.url)}}),x.of({name:`sTeX`,load(){return s(()=>import(`./DNzd62Q_.js`).then(e=>$(e.stex)),[],import.meta.url)}}),x.of({name:`LaTeX`,alias:[`tex`],extensions:[`text`,`ltx`,`tex`],load(){return s(()=>import(`./DNzd62Q_.js`).then(e=>$(e.stex)),[],import.meta.url)}}),x.of({name:`SystemVerilog`,extensions:[`v`,`sv`,`svh`],load(){return s(()=>import(`./CjI9Y6RI.js`).then(e=>$(e.verilog)),[],import.meta.url)}}),x.of({name:`Tcl`,extensions:[`tcl`],load(){return s(()=>import(`./BGfruO1u.js`).then(e=>$(e.tcl)),[],import.meta.url)}}),x.of({name:`Textile`,extensions:[`textile`],load(){return s(()=>import(`./C4jVoHG1.js`).then(e=>$(e.textile)),[],import.meta.url)}}),x.of({name:`TiddlyWiki`,load(){return s(()=>import(`./VlUiK86J.js`).then(e=>$(e.tiddlyWiki)),[],import.meta.url)}}),x.of({name:`Tiki wiki`,load(){return s(()=>import(`./DTszW0OQ.js`).then(e=>$(e.tiki)),[],import.meta.url)}}),x.of({name:`TOML`,extensions:[`toml`],load(){return s(()=>import(`./BPTmHmyx.js`).then(e=>$(e.toml)),[],import.meta.url)}}),x.of({name:`Troff`,extensions:[`1`,`2`,`3`,`4`,`5`,`6`,`7`,`8`,`9`],load(){return s(()=>import(`./C2dAgh7P.js`).then(e=>$(e.troff)),[],import.meta.url)}}),x.of({name:`TTCN`,extensions:[`ttcn`,`ttcn3`,`ttcnpp`],load(){return s(()=>import(`./PPSTk1ow.js`).then(e=>$(e.ttcn)),[],import.meta.url)}}),x.of({name:`TTCN_CFG`,extensions:[`cfg`],load(){return s(()=>import(`./2b4Gb5sE.js`).then(e=>$(e.ttcnCfg)),[],import.meta.url)}}),x.of({name:`Turtle`,extensions:[`ttl`],load(){return s(()=>import(`./Cx3rYX2g.js`).then(e=>$(e.turtle)),[],import.meta.url)}}),x.of({name:`Web IDL`,extensions:[`webidl`],load(){return s(()=>import(`./D5jiJvOU.js`).then(e=>$(e.webIDL)),[],import.meta.url)}}),x.of({name:`VB.NET`,extensions:[`vb`],load(){return s(()=>import(`./BthdM_4N.js`).then(e=>$(e.vb)),[],import.meta.url)}}),x.of({name:`VBScript`,extensions:[`vbs`],load(){return s(()=>import(`./D9f6rSsU.js`).then(e=>$(e.vbScript)),[],import.meta.url)}}),x.of({name:`Velocity`,extensions:[`vtl`],load(){return s(()=>import(`./CqftRsjg.js`).then(e=>$(e.velocity)),[],import.meta.url)}}),x.of({name:`Verilog`,extensions:[`v`],load(){return s(()=>import(`./CjI9Y6RI.js`).then(e=>$(e.verilog)),[],import.meta.url)}}),x.of({name:`VHDL`,extensions:[`vhd`,`vhdl`],load(){return s(()=>import(`./kS471soi.js`).then(e=>$(e.vhdl)),[],import.meta.url)}}),x.of({name:`XQuery`,extensions:[`xy`,`xquery`,`xq`,`xqm`,`xqy`],load(){return s(()=>import(`./BKJx4mf9.js`).then(e=>$(e.xQuery)),[],import.meta.url)}}),x.of({name:`Yacas`,extensions:[`ys`],load(){return s(()=>import(`./CXXgtw0p.js`).then(e=>$(e.yacas)),[],import.meta.url)}}),x.of({name:`Z80`,extensions:[`z80`],load(){return s(()=>import(`./Co3PbHdE.js`).then(e=>$(e.z80)),[],import.meta.url)}}),x.of({name:`MscGen`,extensions:[`mscgen`,`mscin`,`msc`],load(){return s(()=>import(`./qgSLujhx.js`).then(e=>$(e.mscgen)),[],import.meta.url)}}),x.of({name:`Xù`,extensions:[`xu`],load(){return s(()=>import(`./qgSLujhx.js`).then(e=>$(e.xu)),[],import.meta.url)}}),x.of({name:`MsGenny`,extensions:[`msgenny`],load(){return s(()=>import(`./qgSLujhx.js`).then(e=>$(e.msgenny)),[],import.meta.url)}}),x.of({name:`Vue`,extensions:[`vue`],load(){return s(()=>import(`./BjPiibIz.js`).then(e=>e.vue()),__vite__mapDeps([26,1,3,8,2]),import.meta.url)}}),x.of({name:`Angular Template`,load(){return s(()=>import(`./BtUtjfIh.js`).then(e=>e.angular()),__vite__mapDeps([27,1,3,8,2]),import.meta.url)}})],Ty=se([{tag:g.keyword,class:`tok-k`},{tag:[g.string,g.regexp,g.special(g.string)],class:`tok-s`},{tag:[g.number,g.bool,g.null,g.atom],class:`tok-n`},{tag:[g.typeName,g.className,g.namespace],class:`tok-t`},{tag:g.comment,class:`tok-c`}]),Ey={style:e=>Ty.style(e),scope:e=>e.prop(f)!==ty.data};function Dy(e){let t=e.trim().split(/\s/)[0]??``;return t?x.matchLanguageName(wy,t,!1):null}var Oy=e=>e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`);function ky(e,t){let n=Dy(t)?.support;if(!n)return null;let r=``,i=fe(b.create({doc:e,extensions:[n]}),e.length,500)??n.language.parser.parse(e);return ce(e,i,Ey,(e,t)=>{r+=t?`<span class="${t}">${Oy(e)}</span>`:Oy(e)},()=>{r+=`
673
673
  `}),r}async function Ay(e,t){let n=Dy(t);if(!n)return null;try{await n.load()}catch{return null}return ky(e,t)}function jy(e,t){let n=()=>{for(let t of e.querySelectorAll(`pre > code[class*='language-']:not([data-coloured])`)){let e=/language-(\S+)/.exec(t.className)?.[1]??``,n=t.textContent??``;t.dataset.coloured=``,Ay(n,e).then(e=>{e!==null&&t.textContent===n&&(t.innerHTML=e)})}};return n(),{update:n}}var My=new xc({html:!1,linkify:!0,typographer:!0}).use(vl.default,{engine:kh,delimiters:[`dollars`,`brackets`],katexOptions:{throwOnError:!1}});My.renderer.rules.table_open=()=>`<div class="table-wrap"><table>`,My.renderer.rules.table_close=()=>`</table></div>`;var Ny=My.utils.escapeHtml;My.renderer.rules.fence=(e,t)=>{let n=e[t],r=n.info.trim().split(/\s/)[0]??``;if(r.toLowerCase()===`mermaid`)return`<div class="diagram"><pre><code>${Ny(n.content)}</code></pre></div>\n`;let i=(r?ky(n.content.replace(/\n$/,``),r):null)??Ny(n.content.replace(/\n$/,``)),a=r?`<span class="code-lang">${Ny(r)}</span>`:``;return`<div class="code-block"><pre><code${r?` class="language-${Ny(r)}"`:``}>${i}</code></pre>${a}</div>\n`};var Py=My.renderer.rules.link_open??((e,t,n,r,i)=>i.renderToken(e,t,n));My.renderer.rules.link_open=(e,t,n,r,i)=>{let a=e[t],o=a.attrGet(`href`)??``;return/^https?:/i.test(o)?(a.attrSet(`target`,`_blank`),a.attrSet(`rel`,`noopener`)):o.startsWith(`/`)&&/\.md(#.*)?$/.test(o)&&a.attrSet(`href`,`#/n`+o.replace(/\.md(#.*)?$/,``)),Py(e,t,n,r,i)};function Fy(e){return s_.sanitize(My.render(e||``),{ADD_ATTR:[`target`]})}var Iy=null,Ly=()=>Iy??=s(()=>import(`./8wVGBFSs.js`).then(e=>e.t),__vite__mapDeps([28,29,30]),import.meta.url);function Ry(e,t){let n=kh.renderToString(e,{throwOnError:!1,output:`html`}),r=document.createElement(`span`);r.style.cssText=`position:absolute;visibility:hidden;left:-9999px;top:0;white-space:nowrap;font-size:${t}px`,r.innerHTML=n,document.body.append(r);let{width:i,height:a}=r.getBoundingClientRect();return r.remove(),i?{html:n,width:Math.ceil(i),height:Math.ceil(a)}:null}function zy(e){return s_.sanitize(e,{USE_PROFILES:{svg:!0,svgFilters:!0,html:!0},ADD_TAGS:[`foreignObject`],HTML_INTEGRATION_POINTS:{"annotation-xml":!0,foreignobject:!0},RETURN_DOM_FRAGMENT:!0})}var By={links:!1,images:!1,autoDirection:!0,zoom:!1,math:Ry,sanitize:zy,fontSize:12};async function Vy(e,t,n){return(await Ly()).mountAsync(e,t,n?{...By,onError:n}:By)}async function Hy(e,t){let n=await Ly();await n.load(n.detectType(t)),e.update(t)}function Uy(e,t){let n=()=>{for(let t of e.querySelectorAll(`div.diagram:not([data-drawn])`))t.dataset.drawn=``,Vy(t,t.textContent??``)};return n(),{update:n}}var Wy=`<svg viewBox="0 0 16 16" aria-hidden="true"><rect x="5.5" y="5.5" width="8" height="8"/><path d="M10.5 3.5v-1h-8v8h1"/></svg>`,Gy=`<svg viewBox="0 0 16 16" aria-hidden="true"><path d="M3 8.5l3 3 7-7"/></svg>`;function Ky(e){for(let t of e.querySelectorAll(`.code-block:not(:has(> .code-copy))`)){let e=document.createElement(`button`);e.type=`button`,e.className=`code-copy`,e.title=`Copy the code`,e.setAttribute(`aria-label`,`Copy the code`),e.innerHTML=Wy,e.addEventListener(`click`,()=>{let n=t.querySelector(`code`)?.textContent??``;navigator.clipboard?.writeText(n).then(()=>{e.classList.add(`done`),e.innerHTML=Gy,setTimeout(()=>{e.classList.remove(`done`),e.innerHTML=Wy},1500)},()=>void 0)}),t.insertBefore(e,t.querySelector(`.code-lang`))}}var qy=e=>typeof e==`object`&&!!e&&`copy`in e&&!!e.copy;function Jy(e,t){let n=t=>{jy(e),Uy(e),qy(t)&&Ky(e)};return n(t),{update:e=>n(e)}}export{Oc as A,Zc as C,Rc as D,Yc as E,oi as F,Ec as M,Tc as N,Ic as O,Sc as P,$c as S,al as T,Qc as _,Ey as a,el as b,ty as c,gl as d,hl as f,ol as g,cl as h,Fy as i,Cc as j,Fc as k,Uv as l,ul as m,Vy as n,wy as o,ml as p,Hy as r,_y as s,Jy as t,kh as u,Gc as v,Xc as w,nl as x,tl as y};
@@ -1 +1 @@
1
- import{l as e}from"./62dhNtvj.js";import{A as t,M as n,bt as r,o as i,r as a}from"./BxTFtVqu.js";import{i as o,r as s}from"./Cq5C893B.js";import{javascriptLanguage as c}from"./K_3X9lyC.js";var l=s.deserialize({version:14,states:"%pOVOWOOObQPOOOpOSO'#C_OOOO'#Cp'#CpQVOWOOQxQPOOO!TQQOOQ!YQPOOOOOO,58y,58yO!_OSO,58yOOOO-E6n-E6nO!dQQO'#CqQ{QPOOO!iQPOOQ{QPOOO!qQPOOOOOO1G.e1G.eOOQO,59],59]OOQO-E6o-E6oO!yOpO'#CiO#RO`O'#CiQOQPOOO#ZO#tO'#CmO#fO!bO'#CmOOQO,59T,59TO#qOpO,59TO#vO`O,59TOOOO'#Cr'#CrO#{O#tO,59XOOQO,59X,59XOOOO'#Cs'#CsO$WO!bO,59XOOQO1G.o1G.oOOOO-E6p-E6pOOQO1G.s1G.sOOOO-E6q-E6q",stateData:"$g~OjOS~OQROUROkQO~OWTOXUOZUO`VO~OSXOTWO~OXUO[]OlZO~OY^O~O[_O~OT`O~OYaO~OmcOodO~OmfOogO~O^iOnhO~O_jOphO~ObkOqkOrmO~OcnOsnOtmO~OnpO~OppO~ObkOqkOrrO~OcnOsnOtrO~OWX`~",goto:`!^hPPPiPPPPPPPPPmPPPpPPsy!Q!WTROSRe]Re_QSORYSS[T^Rb[QlfRqlQogRso`,nodeNames:`⚠ Content Text Interpolation InterpolationContent }} Entity Attribute VueAttributeName : Identifier @ Is ScriptAttributeValue AttributeScript AttributeScript AttributeName AttributeValue Entity Entity`,maxTerm:36,nodeProps:[[`isolate`,-3,3,13,17,``]],skippedNodes:[0],repeatNodeCount:4,tokenData:"'y~RdXY!aYZ!a]^!apq!ars!rwx!w}!O!|!O!P#t!Q![#y![!]$s!_!`%g!b!c%l!c!}#y#R#S#y#T#j#y#j#k%q#k#o#y%W;'S#y;'S;:j$m<%lO#y~!fSj~XY!aYZ!a]^!apq!a~!wOm~~!|Oo~!b#RX`!b}!O!|!Q![!|![!]!|!c!}!|#R#S!|#T#o!|%W;'S!|;'S;:j#n<%lO!|!b#qP;=`<%l!|~#yOl~%W$QXY#t`!b}!O!|!Q![#y![!]!|!c!}#y#R#S#y#T#o#y%W;'S#y;'S;:j$m<%lO#y%W$pP;=`<%l#y~$zXX~`!b}!O!|!Q![!|![!]!|!c!}!|#R#S!|#T#o!|%W;'S!|;'S;:j#n<%lO!|~%lO[~~%qOZ~%W%xXY#t`!b}!O&e!Q![#y![!]!|!c!}#y#R#S#y#T#o#y%W;'S#y;'S;:j$m<%lO#y!b&jX`!b}!O!|!Q![!|![!]!|!c!}'V#R#S!|#T#o'V%W;'S!|;'S;:j#n<%lO!|!b'^XW!b`!b}!O!|!Q![!|![!]!|!c!}'V#R#S!|#T#o'V%W;'S!|;'S;:j#n<%lO!|",tokenizers:[6,7,new o(`b~RP#q#rU~XP#q#r[~aOT~~`,17,4),new o("!k~RQvwX#o#p!_~^TU~Opmq!]m!^;'Sm;'S;=`!X<%lOm~pUOpmq!]m!]!^!S!^;'Sm;'S;=`!X<%lOm~!XOU~~![P;=`<%lm~!bP#o#p!e~!jOk~~",72,2),new o(`[~RPwxU~ZOp~~`,11,15),new o(`[~RPrsU~ZOn~~`,11,14),new o("!e~RQvwXwx!_~^Tc~Opmq!]m!^;'Sm;'S;=`!X<%lOm~pUOpmq!]m!]!^!S!^;'Sm;'S;=`!X<%lOm~!XOc~~![P;=`<%lm~!dOt~~",66,35),new o("!e~RQrsXvw^~^Or~~cTb~Oprq!]r!^;'Sr;'S;=`!^<%lOr~uUOprq!]r!]!^!X!^;'Sr;'S;=`!^<%lOr~!^Ob~~!aP;=`<%lr~",66,33)],topRules:{Content:[0,1],Attribute:[1,7]},tokenPrec:157}),u=c.parser.configure({top:`SingleExpression`}),d=l.configure({props:[t({Text:n.content,Is:n.definitionOperator,AttributeName:n.attributeName,VueAttributeName:n.keyword,Identifier:n.variableName,"AttributeValue ScriptAttributeValue":n.attributeValue,Entity:n.character,"{{ }}":n.brace,"@ :":n.punctuation})]}),f={parser:u},p=d.configure({wrap:r((e,t)=>e.name==`InterpolationContent`?f:null)}),m=d.configure({wrap:r((e,t)=>e.name==`AttributeScript`?f:null),top:`Attribute`}),h={parser:p},g={parser:m},_=e();function v(e){return e.configure({dialect:`selfClosing`,wrap:r(b)},`vue`)}var y=v(_.language);function b(e,t){switch(e.name){case`Attribute`:return/^(@|:|v-)/.test(t.read(e.from,e.from+2))?g:null;case`Text`:return h}return null}function x(e={}){let t=_;if(e.base){if(e.base.language.name!=`html`||!(e.base.language instanceof a))throw RangeError(`The base option must be the result of calling html(...)`);t=e.base}return new i(t.language==_.language?y:v(t.language),[t.support,t.language.data.of({closeBrackets:{brackets:[`{`,`"`]}})])}export{x as vue};
1
+ import{l as e}from"./B91efLFT.js";import{A as t,M as n,bt as r,o as i,r as a}from"./BxTFtVqu.js";import{i as o,r as s}from"./Cq5C893B.js";import{javascriptLanguage as c}from"./K_3X9lyC.js";var l=s.deserialize({version:14,states:"%pOVOWOOObQPOOOpOSO'#C_OOOO'#Cp'#CpQVOWOOQxQPOOO!TQQOOQ!YQPOOOOOO,58y,58yO!_OSO,58yOOOO-E6n-E6nO!dQQO'#CqQ{QPOOO!iQPOOQ{QPOOO!qQPOOOOOO1G.e1G.eOOQO,59],59]OOQO-E6o-E6oO!yOpO'#CiO#RO`O'#CiQOQPOOO#ZO#tO'#CmO#fO!bO'#CmOOQO,59T,59TO#qOpO,59TO#vO`O,59TOOOO'#Cr'#CrO#{O#tO,59XOOQO,59X,59XOOOO'#Cs'#CsO$WO!bO,59XOOQO1G.o1G.oOOOO-E6p-E6pOOQO1G.s1G.sOOOO-E6q-E6q",stateData:"$g~OjOS~OQROUROkQO~OWTOXUOZUO`VO~OSXOTWO~OXUO[]OlZO~OY^O~O[_O~OT`O~OYaO~OmcOodO~OmfOogO~O^iOnhO~O_jOphO~ObkOqkOrmO~OcnOsnOtmO~OnpO~OppO~ObkOqkOrrO~OcnOsnOtrO~OWX`~",goto:`!^hPPPiPPPPPPPPPmPPPpPPsy!Q!WTROSRe]Re_QSORYSS[T^Rb[QlfRqlQogRso`,nodeNames:`⚠ Content Text Interpolation InterpolationContent }} Entity Attribute VueAttributeName : Identifier @ Is ScriptAttributeValue AttributeScript AttributeScript AttributeName AttributeValue Entity Entity`,maxTerm:36,nodeProps:[[`isolate`,-3,3,13,17,``]],skippedNodes:[0],repeatNodeCount:4,tokenData:"'y~RdXY!aYZ!a]^!apq!ars!rwx!w}!O!|!O!P#t!Q![#y![!]$s!_!`%g!b!c%l!c!}#y#R#S#y#T#j#y#j#k%q#k#o#y%W;'S#y;'S;:j$m<%lO#y~!fSj~XY!aYZ!a]^!apq!a~!wOm~~!|Oo~!b#RX`!b}!O!|!Q![!|![!]!|!c!}!|#R#S!|#T#o!|%W;'S!|;'S;:j#n<%lO!|!b#qP;=`<%l!|~#yOl~%W$QXY#t`!b}!O!|!Q![#y![!]!|!c!}#y#R#S#y#T#o#y%W;'S#y;'S;:j$m<%lO#y%W$pP;=`<%l#y~$zXX~`!b}!O!|!Q![!|![!]!|!c!}!|#R#S!|#T#o!|%W;'S!|;'S;:j#n<%lO!|~%lO[~~%qOZ~%W%xXY#t`!b}!O&e!Q![#y![!]!|!c!}#y#R#S#y#T#o#y%W;'S#y;'S;:j$m<%lO#y!b&jX`!b}!O!|!Q![!|![!]!|!c!}'V#R#S!|#T#o'V%W;'S!|;'S;:j#n<%lO!|!b'^XW!b`!b}!O!|!Q![!|![!]!|!c!}'V#R#S!|#T#o'V%W;'S!|;'S;:j#n<%lO!|",tokenizers:[6,7,new o(`b~RP#q#rU~XP#q#r[~aOT~~`,17,4),new o("!k~RQvwX#o#p!_~^TU~Opmq!]m!^;'Sm;'S;=`!X<%lOm~pUOpmq!]m!]!^!S!^;'Sm;'S;=`!X<%lOm~!XOU~~![P;=`<%lm~!bP#o#p!e~!jOk~~",72,2),new o(`[~RPwxU~ZOp~~`,11,15),new o(`[~RPrsU~ZOn~~`,11,14),new o("!e~RQvwXwx!_~^Tc~Opmq!]m!^;'Sm;'S;=`!X<%lOm~pUOpmq!]m!]!^!S!^;'Sm;'S;=`!X<%lOm~!XOc~~![P;=`<%lm~!dOt~~",66,35),new o("!e~RQrsXvw^~^Or~~cTb~Oprq!]r!^;'Sr;'S;=`!^<%lOr~uUOprq!]r!]!^!X!^;'Sr;'S;=`!^<%lOr~!^Ob~~!aP;=`<%lr~",66,33)],topRules:{Content:[0,1],Attribute:[1,7]},tokenPrec:157}),u=c.parser.configure({top:`SingleExpression`}),d=l.configure({props:[t({Text:n.content,Is:n.definitionOperator,AttributeName:n.attributeName,VueAttributeName:n.keyword,Identifier:n.variableName,"AttributeValue ScriptAttributeValue":n.attributeValue,Entity:n.character,"{{ }}":n.brace,"@ :":n.punctuation})]}),f={parser:u},p=d.configure({wrap:r((e,t)=>e.name==`InterpolationContent`?f:null)}),m=d.configure({wrap:r((e,t)=>e.name==`AttributeScript`?f:null),top:`Attribute`}),h={parser:p},g={parser:m},_=e();function v(e){return e.configure({dialect:`selfClosing`,wrap:r(b)},`vue`)}var y=v(_.language);function b(e,t){switch(e.name){case`Attribute`:return/^(@|:|v-)/.test(t.read(e.from,e.from+2))?g:null;case`Text`:return h}return null}function x(e={}){let t=_;if(e.base){if(e.base.language.name!=`html`||!(e.base.language instanceof a))throw RangeError(`The base option must be the result of calling html(...)`);t=e.base}return new i(t.language==_.language?y:v(t.language),[t.support,t.language.data.of({closeBrackets:{brackets:[`{`,`"`]}})])}export{x as vue};