From 5b2f9dfbab3589a1fdbb6437270becf48f74affc Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 6 Nov 2026 18:20:30 +0000 Subject: [PATCH 1/5] Interface in Chinese and English, following the system or the account Every string the app shows comes from one Strings interface in core with a Chinese and an English implementation, so a missing translation does not compile. LanguageSettings picks the language: the signed-in account's choice, then the choice made on this device (remembered), then the system's language (first supported one, English otherwise). A new account starts with the language in use when it registered. A picker sits in the library menu, the libraries list and the account sheet. Until the server stores the account's language, it is kept on this device per account; IvyApp marks where it will be sent and read. Requests carry Accept-Language. Dates and relative times follow the language; the sync node is still preselected by the system's region. The editor page gets setLanguage for its placeholder and formatting words. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01NZ7eDkNbqLj8z7BEXeW8wW --- README.md | 9 + app/src/main/assets/editor/main.js | 62 +- .../main/kotlin/app/ivynote/android/IvyApp.kt | 43 + .../app/ivynote/android/LibrarySession.kt | 2 +- .../app/ivynote/android/MainActivity.kt | 3 +- .../app/ivynote/android/editor/EditorHost.kt | 10 + .../app/ivynote/android/ui/AccountSheet.kt | 47 +- .../kotlin/app/ivynote/android/ui/Common.kt | 39 +- .../kotlin/app/ivynote/android/ui/Language.kt | 101 ++ .../app/ivynote/android/ui/LibrariesScreen.kt | 65 +- .../app/ivynote/android/ui/LibraryScreen.kt | 15 +- .../kotlin/app/ivynote/android/ui/Media.kt | 98 +- .../app/ivynote/android/ui/NoteScreen.kt | 68 +- .../app/ivynote/android/ui/NoteSheets.kt | 111 +- .../kotlin/app/ivynote/android/ui/Root.kt | 15 +- .../app/ivynote/android/ui/ShelfPane.kt | 100 +- .../kotlin/app/ivynote/android/ui/SignIn.kt | 109 +- .../kotlin/app/ivynote/android/ui/Tags.kt | 42 +- .../main/kotlin/app/ivynote/core/ApiClient.kt | 2 + .../main/kotlin/app/ivynote/core/ApiError.kt | 20 +- .../main/kotlin/app/ivynote/core/Language.kt | 192 +++ .../kotlin/app/ivynote/core/LibraryCatalog.kt | 2 +- .../app/ivynote/core/LibraryMigrator.kt | 4 +- .../src/main/kotlin/app/ivynote/core/Links.kt | 2 +- .../kotlin/app/ivynote/core/MediaLibrary.kt | 27 +- .../main/kotlin/app/ivynote/core/Models.kt | 6 +- .../main/kotlin/app/ivynote/core/Remote.kt | 6 +- .../kotlin/app/ivynote/core/ServerAddress.kt | 18 +- .../kotlin/app/ivynote/core/SessionStore.kt | 2 +- .../src/main/kotlin/app/ivynote/core/Shelf.kt | 22 +- .../main/kotlin/app/ivynote/core/Strings.kt | 1032 +++++++++++++++++ .../kotlin/app/ivynote/core/SyncEngine.kt | 4 +- .../kotlin/app/ivynote/core/SyncRegion.kt | 8 +- .../kotlin/app/ivynote/core/LanguageTest.kt | 110 ++ editor-web/main.ts | 34 +- 35 files changed, 2028 insertions(+), 402 deletions(-) create mode 100644 app/src/main/kotlin/app/ivynote/android/ui/Language.kt create mode 100644 core/src/main/kotlin/app/ivynote/core/Language.kt create mode 100644 core/src/main/kotlin/app/ivynote/core/Strings.kt create mode 100644 core/src/test/kotlin/app/ivynote/core/LanguageTest.kt diff --git a/README.md b/README.md index 86975e6..fe9fcba 100644 --- a/README.md +++ b/README.md @@ -75,6 +75,15 @@ repository does not keep a copy. - **Search** across titles and bodies, ranked as on the web (guide 11.5). - Phones show one pane at a time; tablets and unfolded foldables show the shelf beside the note. Light and dark themes follow the system. +- **Languages**: 简体中文 and English, as on the web (`core/…/Strings.kt`, + one interface, so a string missing from a language does not compile). + The language follows the system (the first supported one in its list, + English otherwise) until one is picked under 语言 · Language (library + menu, libraries list, account sheet); the choice is remembered. Signed in + to a synced library, the account's language comes first; a new account + starts with the language in use when it was registered (`LanguageSettings`). + Until the server stores it, the account's language is kept on this device + per account; `IvyApp` marks where it will be sent and read. ## Layout diff --git a/app/src/main/assets/editor/main.js b/app/src/main/assets/editor/main.js index 005db43..004ec4d 100644 --- a/app/src/main/assets/editor/main.js +++ b/app/src/main/assets/editor/main.js @@ -1,9 +1,9 @@ -import{$ as R,A as Xe,B as X,C as ve,D as Ni,E as Fi,F as Hi,G as jr,H as _r,I as Ki,Ia as us,J as Ji,K as es,L as K,M as Te,N as ht,O as le,P as M,Q as Lt,R as Et,S as Wt,T as ts,U as Oe,V as f,W as rs,X as Mt,Y as Yr,Z as ns,_ as De,a as Wi,aa as is,b as Rr,ba as ce,c as W,ca as Cr,d as Ot,da as Ut,e as J,ea as $e,f as qt,fa as ss,g as Z,ga as as,h as Ge,ha as Be,i as ie,ia as os,j as ge,ja as he,k as Mi,ka as Vt,l as Ui,la as ls,m as q,ma as Os,n as Vi,na as cs,o as A,p as Qe,q as ct,r as Gi,s as Ii,t as Di,tc as ps,u as Ie,uc as fs,v as I,w as ee,x as v,y as Bi,ya as hs,z as At}from"./chunks/chunk-GJGDCSZU.js";import{a as Gt}from"./chunks/chunk-TO3N6BD7.js";import"./chunks/chunk-Y6SLVHK3.js";var Ne=class{constructor(e,t,n,i){this.state=e,this.pos=t,this.explicit=n,this.view=i,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(e){let t=R(this.state).resolveInner(this.pos,-1);for(;t&&e.indexOf(t.name)<0;)t=t.parent;return t?{from:t.from,to:this.pos,text:this.state.sliceDoc(t.from,this.pos),type:t.type}:null}matchBefore(e){let t=this.state.doc.lineAt(this.pos),n=Math.max(t.from,this.pos-250),i=t.text.slice(n-t.from,this.pos-t.from),s=i.search(xs(e,!1));return s<0?null:{from:n+s,to:this.pos,text:i.slice(s)}}get aborted(){return this.abortListeners==null}addEventListener(e,t,n){e=="abort"&&this.abortListeners&&(this.abortListeners.push(t),n&&n.onDocChange&&(this.abortOnDocChange=!0))}};function ds(r){let e=Object.keys(r).join(""),t=/\w/.test(e);return t&&(e=e.replace(/\w/g,"")),`[${t?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function Wl(r){let e=Object.create(null),t=Object.create(null);for(let{label:i}of r){e[i[0]]=!0;for(let s=1;stypeof i=="string"?{label:i}:i),[t,n]=e.every(i=>/^\w+$/.test(i.label))?[/\w*$/,/\w+$/]:Wl(e);return i=>{let s=i.matchBefore(n);return s||i.explicit?{from:s?s.from:i.pos,options:e,validFor:t}:null}}function Ps(r,e){return t=>{for(let n=R(t.state).resolveInner(t.pos,-1);n;n=n.parent){if(r.indexOf(n.name)>-1)return null;if(n.type.isTop)break}return e(t)}}var Dt=class{constructor(e,t,n,i){this.completion=e,this.source=t,this.match=n,this.score=i}};function je(r){return r.selection.main.from}function xs(r,e){var t;let{source:n}=r,i=e&&n[0]!="^",s=n[n.length-1]!="$";return!i&&!s?r:new RegExp(`${i?"^":""}(?:${n})${s?"$":""}`,(t=r.flags)!==null&&t!==void 0?t:r.ignoreCase?"i":"")}var Nr=Ui.define();function Ml(r,e,t,n){let{main:i}=r.selection,s=t-i.from,a=n-i.from;return{...r.changeByRange(o=>{if(o!=i&&t!=n&&r.sliceDoc(o.from+s,o.from+a)!=r.sliceDoc(t,n))return{range:o};let l=r.toText(e);return{changes:{from:o.from+s,to:n==i.from?o.to:o.from+a,insert:l},range:Z.cursor(o.from+s+l.length)}}),scrollIntoView:!0,userEvent:"input.complete"}}var ms=new WeakMap;function Ul(r){if(!Array.isArray(r))return r;let e=ms.get(r);return e||ms.set(r,e=Br(r)),e}var Bt=q.define(),ut=q.define(),Lr=class{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let t=0;t=48&&w<=57||w>=97&&w<=122?2:w>=65&&w<=90?1:0:(_=Ot(w))!=_.toLowerCase()?1:_!=_.toUpperCase()?2:0;(!Q||G==1&&g||y==0&&G!=0)&&(t[h]==w||n[h]==w&&(p=!0)?a[h++]=Q:a.length&&(b=!1)),y=G,Q+=J(w)}return h==l&&a[0]==0&&b?this.result(-100+(p?-200:0),a,e):u==l&&d==0?this.ret(-200-e.length+(m==e.length?0:-100),[0,m]):o>-1?this.ret(-700-e.length,[o,o+this.pattern.length]):u==l?this.ret(-900-e.length,[d,m]):h==l?this.result(-100+(p?-200:0)+-700+(b?0:-1100),a,e):t.length==2?null:this.result((i[0]?-700:0)+-200+-1100,i,e)}result(e,t,n){let i=[],s=0;for(let a of t){let o=a+(this.astral?J(W(n,a)):1);s&&i[s-1]==a?i[s-1]=o:(i[s++]=a,i[s++]=o)}return this.ret(e-n.length,i)}},Er=class{constructor(e){this.pattern=e,this.matched=[],this.score=0,this.folded=e.toLowerCase()}match(e){if(e.length!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:Vl,filterStrict:!1,compareCompletions:(e,t)=>(e.sortText||e.label).localeCompare(t.sortText||t.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(e,t)=>e&&t,closeOnBlur:(e,t)=>e&&t,icons:(e,t)=>e&&t,tooltipClass:(e,t)=>n=>gs(e(n),t(n)),optionClass:(e,t)=>n=>gs(e(n),t(n)),addToOptions:(e,t)=>e.concat(t),filterStrict:(e,t)=>e||t})}});function gs(r,e){return r?e?r+" "+e:r:e}function Vl(r,e,t,n,i,s){let a=r.textDirection==Bi.RTL,o=a,l=!1,O="top",c,h,p=e.left-i.left,u=i.right-e.right,d=n.right-n.left,m=n.bottom-n.top;if(o&&p=m||Q>e.top?c=t.bottom-e.top:(O="bottom",c=e.bottom-t.top)}let g=(e.bottom-e.top)/s.offsetHeight,b=(e.right-e.left)/s.offsetWidth;return{style:`${O}: ${c/g}px; max-width: ${h/b}px`,class:"cm-completionInfo-"+(l?a?"left-narrow":"right-narrow":o?"left":"right")}}var Fr=q.define();function Gl(r){let e=r.addToOptions.slice();return r.icons&&e.push({render(t){let n=document.createElement("div");return n.classList.add("cm-completionIcon"),t.type&&n.classList.add(...t.type.split(/\s+/g).map(i=>"cm-completionIcon-"+i)),n.setAttribute("aria-hidden","true"),n},position:20}),e.push({render(t,n,i,s){let a=document.createElement("span");a.className="cm-completionLabel";let o=t.displayLabel||t.label,l=0;for(let O=0;Ol&&a.appendChild(document.createTextNode(o.slice(l,c)));let p=a.appendChild(document.createElement("span"));p.appendChild(document.createTextNode(o.slice(c,h))),p.className="cm-completionMatchedText",l=h}return lt.position-n.position).map(t=>t.render)}function zr(r,e,t){if(r<=t)return{from:0,to:r};if(e<0&&(e=0),e<=r>>1){let i=Math.floor(e/t);return{from:i*t,to:(i+1)*t}}let n=Math.ceil((r-e)/t);return{from:r-n*t,to:r-(n-1)*t}}var Wr=class{constructor(e,t,n){this.view=e,this.stateField=t,this.applyCompletion=n,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:l=>this.placeInfo(l),key:this},this.space=null,this.currentClass="";let i=e.state.field(t),{options:s,selected:a}=i.open,o=e.state.facet(C);this.optionContent=Gl(o),this.optionClass=o.optionClass,this.tooltipClass=o.tooltipClass,this.range=zr(s.length,a,o.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",l=>{let{options:O}=e.state.field(t).open;for(let c=l.target,h;c&&c!=this.dom;c=c.parentNode)if(c.nodeName=="LI"&&(h=/-(\d+)$/.exec(c.id))&&+h[1]this.list.lastChild.getBoundingClientRect().bottom?this.range.to:null;c!=null&&(e.dispatch({effects:Fr.of(c)}),l.preventDefault())}}),this.dom.addEventListener("focusout",l=>{let O=e.state.field(this.stateField,!1);O&&O.tooltip&&e.state.facet(C).closeOnBlur&&l.relatedTarget!=e.contentDOM&&e.dispatch({effects:ut.of(null)})}),this.showOptions(s,i.id)}mount(){this.updateSel()}showOptions(e,t){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e,t,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}update(e){var t;let n=e.state.field(this.stateField),i=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),n!=i){let{options:s,selected:a,disabled:o}=n.open;(!i.open||i.open.options!=s)&&(this.range=zr(s.length,a,e.state.facet(C).maxRenderedOptions),this.showOptions(s,n.id)),this.updateSel(),o!=((t=i.open)===null||t===void 0?void 0:t.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!o)}}updateTooltipClass(e){let t=this.tooltipClass(e);if(t!=this.currentClass){for(let n of this.currentClass.split(" "))n&&this.dom.classList.remove(n);for(let n of t.split(" "))n&&this.dom.classList.add(n);this.currentClass=t}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),t=e.open;(t.selected>-1&&t.selected=this.range.to)&&(this.range=zr(t.options.length,t.selected,this.view.state.facet(C).maxRenderedOptions),this.showOptions(t.options,e.id));let n=this.updateSelectedOption(t.selected);if(n){this.destroyInfo();let{completion:i}=t.options[t.selected],{info:s}=i;if(!s)return;let a=typeof s=="string"?document.createTextNode(s):s(i);if(!a)return;"then"in a?a.then(o=>{o&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(o,i)}).catch(o=>At(this.view.state,o,"completion info")):(this.addInfoPane(a,i),n.setAttribute("aria-describedby",this.info.id))}}addInfoPane(e,t){this.destroyInfo();let n=this.info=document.createElement("div");if(n.className="cm-tooltip cm-completionInfo",n.id="cm-completionInfo-"+Math.floor(Math.random()*65535).toString(16),e.nodeType!=null)n.appendChild(e),this.infoDestroy=null;else{let{dom:i,destroy:s}=e;n.appendChild(i),this.infoDestroy=s||null}this.dom.appendChild(n),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let t=null;for(let n=this.list.firstChild,i=this.range.from;n;n=n.nextSibling,i++)n.nodeName!="LI"||!n.id?i--:i==e?n.hasAttribute("aria-selected")||(n.setAttribute("aria-selected","true"),t=n):n.hasAttribute("aria-selected")&&(n.removeAttribute("aria-selected"),n.removeAttribute("aria-describedby"));return t&&Dl(this.list,t),t}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let t=this.dom.getBoundingClientRect(),n=this.info.getBoundingClientRect(),i=e.getBoundingClientRect(),s=this.space;if(!s){let a=this.dom.ownerDocument.documentElement;s={left:0,top:0,right:a.clientWidth,bottom:a.clientHeight}}return i.top>Math.min(s.bottom,t.bottom)-10||i.bottom{a.target==i&&a.preventDefault()});let s=null;for(let a=n.from;an.from||n.from==0))if(s=p,typeof O!="string"&&O.header)i.appendChild(O.header(O));else{let u=i.appendChild(document.createElement("completion-section"));u.textContent=p}}let c=i.appendChild(document.createElement("li"));c.id=t+"-"+a,c.setAttribute("role","option");let h=this.optionClass(o);h&&(c.className=h);for(let p of this.optionContent){let u=p(o,this.view.state,this.view,l);u&&c.appendChild(u)}}return n.from&&i.classList.add("cm-completionListIncompleteTop"),n.tonew Wr(t,r,e)}function Dl(r,e){let t=r.getBoundingClientRect(),n=e.getBoundingClientRect(),i=t.height/r.offsetHeight;n.topt.bottom&&(r.scrollTop+=(n.bottom-t.bottom)/i)}function Qs(r){return(r.boost||0)*100+(r.apply?10:0)+(r.info?5:0)+(r.type?1:0)}function Bl(r,e){let t=[],n=null,i=null,s=c=>{t.push(c);let{section:h}=c.completion;if(h){n||(n=[]);let p=typeof h=="string"?h:h.name;n.some(u=>u.name==p)||n.push(typeof h=="string"?{name:p}:h)}},a=e.facet(C);for(let c of r)if(c.hasResult()){let h=c.result.getMatch;if(c.result.filter===!1)for(let p of c.result.options)s(new Dt(p,c.source,h?h(p):[],1e9-t.length));else{let p=e.sliceDoc(c.from,c.to),u,d=a.filterStrict?new Er(p):new Lr(p);for(let m of c.result.options)if(u=d.match(m.label)){let g=m.displayLabel?h?h(m,u.matched):[]:u.matched,b=u.score+(m.boost||0);if(s(new Dt(m,c.source,g,b)),typeof m.section=="object"&&m.section.rank==="dynamic"){let{name:Q}=m.section;i||(i=Object.create(null)),i[Q]=Math.max(b,i[Q]||-1e9)}}}}if(n){let c=Object.create(null),h=0,p=(u,d)=>(u.rank==="dynamic"&&d.rank==="dynamic"?i[d.name]-i[u.name]:0)||(typeof u.rank=="number"?u.rank:1e9)-(typeof d.rank=="number"?d.rank:1e9)||(u.namep.score-h.score||O(h.completion,p.completion))){let h=c.completion;!l||l.label!=h.label||l.detail!=h.detail||l.type!=null&&h.type!=null&&l.type!=h.type||l.apply!=h.apply||l.boost!=h.boost?o.push(c):Qs(c.completion)>Qs(l)&&(o[o.length-1]=c),l=c.completion}return o}var Mr=class r{constructor(e,t,n,i,s,a){this.options=e,this.attrs=t,this.tooltip=n,this.timestamp=i,this.selected=s,this.disabled=a}setSelected(e,t){return e==this.selected||e>=this.options.length?this:new r(this.options,$s(t,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,t,n,i,s,a){if(i&&!a&&e.some(O=>O.isPending))return i.setDisabled();let o=Bl(e,t);if(!o.length)return i&&e.some(O=>O.isPending)?i.setDisabled():null;let l=t.facet(C).selectOnOpen?0:-1;if(i&&i.selected!=l&&i.selected!=-1){let O=i.options[i.selected].completion;for(let c=0;cc.hasResult()?Math.min(O,c.from):O,1e8),create:eO,above:s.aboveCursor},i?i.timestamp:Date.now(),l,!1)}map(e){return new r(this.options,this.attrs,{...this.tooltip,pos:e.mapPos(this.tooltip.pos)},this.timestamp,this.selected,this.disabled)}setDisabled(){return new r(this.options,this.attrs,this.tooltip,this.timestamp,this.selected,!0)}},Ur=class r{constructor(e,t,n){this.active=e,this.id=t,this.open=n}static start(){return new r(Kl,"cm-ac-"+Math.floor(Math.random()*2e6).toString(36),null)}update(e){let{state:t}=e,n=t.facet(C),s=(n.override||t.languageDataAt("autocomplete",je(t)).map(Ul)).map(l=>(this.active.find(c=>c.source==l)||new ue(l,this.active.some(c=>c.state!=0)?1:0)).update(e,n));s.length==this.active.length&&s.every((l,O)=>l==this.active[O])&&(s=this.active);let a=this.open,o=e.effects.some(l=>l.is(Hr));a&&e.docChanged&&(a=a.map(e.changes)),e.selection||s.some(l=>l.hasResult()&&e.changes.touchesRange(l.from,l.to))||!Nl(s,this.active)||o?a=Mr.build(s,t,this.id,a,n,o):a&&a.disabled&&!s.some(l=>l.isPending)&&(a=null),!a&&s.every(l=>!l.isPending)&&s.some(l=>l.hasResult())&&(s=s.map(l=>l.hasResult()?new ue(l.source,0):l));for(let l of e.effects)l.is(Fr)&&(a=a&&a.setSelected(l.value,this.id));return s==this.active&&a==this.open?this:new r(s,this.id,a)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?Fl:Hl}};function Nl(r,e){if(r==e)return!0;for(let t=0,n=0;;){for(;t-1&&(t["aria-activedescendant"]=r+"-"+e),t}var Kl=[];function ws(r,e){if(r.isUserEvent("input.complete")){let n=r.annotation(Nr);if(n&&e.activateOnCompletion(n))return 12}let t=r.isUserEvent("input.type");return t&&e.activateOnTyping?5:t?1:r.isUserEvent("delete.backward")?2:r.selection?8:r.docChanged?16:0}var ue=class r{constructor(e,t,n=!1){this.source=e,this.state=t,this.explicit=n}hasResult(){return!1}get isPending(){return this.state==1}update(e,t){let n=ws(e,t),i=this;(n&8||n&16&&this.touches(e))&&(i=new r(i.source,0)),n&4&&i.state==0&&(i=new r(this.source,1)),i=i.updateFor(e,n);for(let s of e.effects)if(s.is(Bt))i=new r(i.source,1,s.value);else if(s.is(ut))i=new r(i.source,0);else if(s.is(Hr))for(let a of s.value)a.source==i.source&&(i=a);return i}updateFor(e,t){return this.map(e.changes)}map(e){return this}touches(e){return e.changes.touchesRange(je(e.state))}},Nt=class r extends ue{constructor(e,t,n,i,s,a){super(e,3,t),this.limit=n,this.result=i,this.from=s,this.to=a}hasResult(){return!0}updateFor(e,t){var n;if(!(t&3))return this.map(e.changes);let i=this.result;i.map&&!e.changes.empty&&(i=i.map(i,e.changes));let s=e.changes.mapPos(this.from),a=e.changes.mapPos(this.to,1),o=je(e.state);if(o>a||!i||t&2&&(je(e.startState)==this.from||ot.map(e))}}),U=ie.define({create(){return Ur.start()},update(r,e){return r.update(e)},provide:r=>[Hi.from(r,e=>e.tooltip),X.contentAttributes.from(r,e=>e.attrs)]});function Kr(r,e){let t=e.completion.apply||e.completion.label,n=r.state.field(U).active.find(i=>i.source==e.source);return n instanceof Nt?(typeof t=="string"?r.dispatch({...Ml(r.state,t,n.from,n.to),annotations:Nr.of(e.completion)}):t(r,e.completion,n.from,n.to),!0):!1}var eO=Il(U,Kr);function It(r,e="option"){return t=>{let n=t.state.field(U,!1);if(!n||!n.open||n.open.disabled||Date.now()-n.open.timestamp-1?n.open.selected+i*(r?1:-1):r?0:a-1;return o<0?o=e=="page"?0:a-1:o>=a&&(o=e=="page"?a-1:0),t.dispatch({effects:Fr.of(o)}),!0}}var tO=r=>{let e=r.state.field(U,!1);return r.state.readOnly||!e||!e.open||e.open.selected<0||e.open.disabled||Date.now()-e.open.timestampr.state.field(U,!1)?(r.dispatch({effects:Bt.of(!0)}),!0):!1,rO=r=>{let e=r.state.field(U,!1);return!e||!e.active.some(t=>t.state!=0)?!1:(r.dispatch({effects:ut.of(null)}),!0)},Vr=class{constructor(e,t){this.active=e,this.context=t,this.time=Date.now(),this.updates=[],this.done=void 0}},nO=50,iO=1e3,sO=Xe.fromClass(class{constructor(r){this.view=r,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let e of r.state.field(U).active)e.isPending&&this.startQuery(e)}update(r){let e=r.state.field(U),t=r.state.facet(C);if(!r.selectionSet&&!r.docChanged&&r.startState.field(U)==e)return;let n=r.transactions.some(s=>{let a=ws(s,t);return a&8||(s.selection||s.docChanged)&&!(a&3)});for(let s=0;snO&&Date.now()-a.time>iO){for(let o of a.context.abortListeners)try{o()}catch(l){At(this.view.state,l)}a.context.abortListeners=null,this.running.splice(s--,1)}else a.updates.push(...r.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),r.transactions.some(s=>s.effects.some(a=>a.is(Bt)))&&(this.pendingStart=!0);let i=this.pendingStart?50:t.activateOnTypingDelay;if(this.debounceUpdate=e.active.some(s=>s.isPending&&!this.running.some(a=>a.active.source==s.source))?setTimeout(()=>this.startUpdate(),i):-1,this.composing!=0)for(let s of r.transactions)s.isUserEvent("input.type")?this.composing=2:this.composing==2&&s.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:r}=this.view,e=r.field(U);for(let t of e.active)t.isPending&&!this.running.some(n=>n.active.source==t.source)&&this.startQuery(t);this.running.length&&e.open&&e.open.disabled&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(C).updateSyncTime))}startQuery(r){let{state:e}=this.view,t=je(e),n=new Ne(e,t,r.explicit,this.view),i=new Vr(r,n);this.running.push(i),Promise.resolve(r.source(n)).then(s=>{i.context.aborted||(i.done=s||null,this.scheduleAccept())},s=>{this.view.dispatch({effects:ut.of(null)}),At(this.view.state,s)})}scheduleAccept(){this.running.every(r=>r.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(C).updateSyncTime))}accept(){var r;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],t=this.view.state.facet(C),n=this.view.state.field(U);for(let i=0;io.source==s.active.source);if(a&&a.isPending)if(s.done==null){let o=new ue(s.active.source,0);for(let l of s.updates)o=o.update(l,t);o.isPending||e.push(o)}else this.startQuery(a)}(e.length||n.open&&n.open.disabled)&&this.view.dispatch({effects:Hr.of(e)})}},{eventHandlers:{blur(r){let e=this.view.state.field(U,!1);if(e&&e.tooltip&&this.view.state.facet(C).closeOnBlur){let t=e.open&&jr(this.view,e.open.tooltip);(!t||!t.dom.contains(r.relatedTarget))&&setTimeout(()=>this.view.dispatch({effects:ut.of(null)}),10)}},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:Bt.of(!1)}),20),this.composing=0}}}),aO=typeof navigator=="object"&&/Win/.test(navigator.platform),oO=ge.highest(X.domEventHandlers({keydown(r,e){let t=e.state.field(U,!1);if(!t||!t.open||t.open.disabled||t.open.selected<0||!r.key||r.key.length>1||r.ctrlKey&&!(aO&&r.altKey)||r.metaKey)return!1;let n=t.open.options[t.open.selected],i=t.active.find(a=>a.source==n.source),s=n.completion.commitCharacters||i.result.commitCharacters;return s&&s.indexOf(r.key)>-1&&Kr(e,n),!1}})),ys=X.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"\xB7\xB7\xB7"',opacity:.5,display:"block",textAlign:"center",cursor:"pointer"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box",whiteSpace:"pre-line"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'\u0192'"}},".cm-completionIcon-class":{"&:after":{content:"'\u25CB'"}},".cm-completionIcon-interface":{"&:after":{content:"'\u25CC'"}},".cm-completionIcon-variable":{"&:after":{content:"'\u{1D465}'"}},".cm-completionIcon-constant":{"&:after":{content:"'\u{1D436}'"}},".cm-completionIcon-type":{"&:after":{content:"'\u{1D461}'"}},".cm-completionIcon-enum":{"&:after":{content:"'\u222A'"}},".cm-completionIcon-property":{"&:after":{content:"'\u25A1'"}},".cm-completionIcon-keyword":{"&:after":{content:"'\u{1F511}\uFE0E'"}},".cm-completionIcon-namespace":{"&:after":{content:"'\u25A2'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}}),Gr=class{constructor(e,t,n,i){this.field=e,this.line=t,this.from=n,this.to=i}},Ir=class r{constructor(e,t,n){this.field=e,this.from=t,this.to=n}map(e){let t=e.mapPos(this.from,-1,qt.TrackDel),n=e.mapPos(this.to,1,qt.TrackDel);return t==null||n==null?null:new r(this.field,t,n)}},Dr=class r{constructor(e,t){this.lines=e,this.fieldPositions=t}instantiate(e,t){let n=[],i=[t],s=e.doc.lineAt(t),a=/^\s*/.exec(s.text)[0];for(let l of this.lines){if(n.length){let O=a,c=/^\t*/.exec(l)[0].length;for(let h=0;hnew Ir(l.field,i[l.line]+l.from,i[l.line]+l.to));return{text:n,ranges:o}}static parse(e){let t=[],n=[],i=[],s;for(let a of e.split(/\r\n?|\n/)){for(;s=/[#$]\{(?:(\d+)(?::([^{}]*))?|((?:\\[{}]|[^{}])*))\}/.exec(a);){let o=s[1]?+s[1]:null,l=s[2]||s[3]||"",O=-1;o===0&&(o=1e9);let c=l.replace(/\\[{}]/g,h=>h[1]);for(let h=0;h=O&&p.field++}for(let h of i)if(h.line==n.length&&h.from>s.index){let p=s[2]?3+(s[1]||"").length:2;h.from-=p,h.to-=p}i.push(new Gr(O,n.length,s.index,s.index+c.length)),a=a.slice(0,s.index)+l+a.slice(s.index+s[0].length)}a=a.replace(/\\([{}])/g,(o,l,O)=>{for(let c of i)c.line==n.length&&c.from>O&&(c.from--,c.to--);return l}),n.push(a)}return new r(n,i)}},lO=v.widget({widget:new class extends ee{toDOM(){let r=document.createElement("span");return r.className="cm-snippetFieldPosition",r}ignoreEvent(){return!1}}}),OO=v.mark({class:"cm-snippetField"}),Fe=class r{constructor(e,t){this.ranges=e,this.active=t,this.deco=v.set(e.map(n=>(n.from==n.to?lO:OO).range(n.from,n.to)),!0)}map(e){let t=[];for(let n of this.ranges){let i=n.map(e);if(!i)return null;t.push(i)}return new r(t,this.active)}selectionInsideField(e){return e.ranges.every(t=>this.ranges.some(n=>n.field==this.active&&n.from<=t.from&&n.to>=t.to))}},dt=q.define({map(r,e){return r&&r.map(e)}}),cO=q.define(),pt=ie.define({create(){return null},update(r,e){for(let t of e.effects){if(t.is(dt))return t.value;if(t.is(cO)&&r)return new Fe(r.ranges,t.value)}return r&&e.docChanged&&(r=r.map(e.changes)),r&&e.selection&&!r.selectionInsideField(e.selection)&&(r=null),r},provide:r=>X.decorations.from(r,e=>e?e.deco:v.none)});function Jr(r,e){return Z.create(r.filter(t=>t.field==e).map(t=>Z.range(t.from,t.to)))}function hO(r){let e=Dr.parse(r);return(t,n,i,s)=>{let{text:a,ranges:o}=e.instantiate(t.state,i),{main:l}=t.state.selection,O={changes:{from:i,to:s==l.from?l.to:s,insert:Wi.of(a)},scrollIntoView:!0,annotations:n?[Nr.of(n),Vi.userEvent.of("input.complete")]:void 0};if(o.length&&(O.selection=Jr(o,0)),o.some(c=>c.field>0)){let c=new Fe(o,0),h=O.effects=[dt.of(c)];t.state.field(pt,!1)===void 0&&h.push(q.appendConfig.of([pt,mO,gO,ys]))}t.dispatch(t.state.update(O))}}function Zs(r){return({state:e,dispatch:t})=>{let n=e.field(pt,!1);if(!n||r<0&&n.active==0)return!1;let i=n.active+r,s=r>0&&!n.ranges.some(a=>a.field==i+r);return t(e.update({selection:Jr(n.ranges,i),effects:dt.of(s?null:new Fe(n.ranges,i)),scrollIntoView:!0})),!0}}var uO=({state:r,dispatch:e})=>r.field(pt,!1)?(e(r.update({effects:dt.of(null)})),!0):!1,pO=Zs(1),fO=Zs(-1);var dO=[{key:"Tab",run:pO,shift:fO},{key:"Escape",run:uO}],bs=Ge.define({combine(r){return r.length?r[0]:dO}}),mO=ge.highest(ve.compute([bs],r=>r.facet(bs)));function L(r,e){return{...e,apply:hO(r)}}var gO=X.domEventHandlers({mousedown(r,e){let t=e.state.field(pt,!1),n;if(!t||(n=e.posAtCoords({x:r.clientX,y:r.clientY}))==null)return!1;let i=t.ranges.find(s=>s.from<=n&&s.to>=n);return!i||i.field==t.active?!1:(e.dispatch({selection:Jr(t.ranges,i.field),effects:dt.of(t.ranges.some(s=>s.field>i.field)?new Fe(t.ranges,i.field):null),scrollIntoView:!0}),!0)}});var ft={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},Re=q.define({map(r,e){let t=e.mapPos(r,-1,qt.TrackAfter);return t??void 0}}),en=new class extends Gi{};en.startSide=1;en.endSide=-1;var Xs=ie.define({create(){return Ii.empty},update(r,e){if(r=r.map(e.changes),e.selection){let t=e.state.doc.lineAt(e.selection.main.head);r=r.update({filter:n=>n>=t.from&&n<=t.to})}for(let t of e.effects)t.is(Re)&&(r=r.update({add:[en.range(t.value,t.value+1)]}));return r}});function vs(){return[$O,Xs]}var Ar="()[]{}<>\xAB\xBB\xBB\xAB\uFF3B\uFF3D\uFF5B\uFF5D";function Ts(r){for(let e=0;e{if((QO?r.composing:r.compositionStarted)||r.state.readOnly)return!1;let i=r.state.selection.main;if(n.length>2||n.length==2&&J(W(n,0))==1||e!=i.from||t!=i.to)return!1;let s=SO(r.state,n);return s?(r.dispatch(s),!0):!1}),bO=({state:r,dispatch:e})=>{if(r.readOnly)return!1;let n=Rs(r,r.selection.main.head).brackets||ft.brackets,i=null,s=r.changeByRange(a=>{if(a.empty){let o=kO(r.doc,a.head);for(let l of n)if(l==o&&Ft(r.doc,a.head)==Ts(W(l,0)))return{changes:{from:a.head-l.length,to:a.head+l.length},range:Z.cursor(a.head-l.length)}}return{range:i=a}});return i||e(r.update(s,{scrollIntoView:!0,userEvent:"delete.backward"})),!i},js=[{key:"Backspace",run:bO}];function SO(r,e){let t=Rs(r,r.selection.main.head),n=t.brackets||ft.brackets;for(let i of n){let s=Ts(W(i,0));if(e==i)return s==i?wO(r,i,n.indexOf(i+i+i)>-1,t):PO(r,i,s,t.before||ft.before);if(e==s&&_s(r,r.selection.main.from))return xO(r,i,s)}return null}function _s(r,e){let t=!1;return r.field(Xs).between(0,r.doc.length,n=>{n==e&&(t=!0)}),t}function Ft(r,e){let t=r.sliceString(e,e+2);return t.slice(0,J(W(t,0)))}function kO(r,e){let t=r.sliceString(e-2,e);return J(W(t,0))==t.length?t:t.slice(1)}function PO(r,e,t,n){let i=null,s=r.changeByRange(a=>{if(!a.empty)return{changes:[{insert:e,from:a.from},{insert:t,from:a.to}],effects:Re.of(a.to+e.length),range:Z.range(a.anchor+e.length,a.head+e.length)};let o=Ft(r.doc,a.head);return!o||/\s/.test(o)||n.indexOf(o)>-1?{changes:{insert:e+t,from:a.head},effects:Re.of(a.head+e.length),range:Z.cursor(a.head+e.length)}:{range:i=a}});return i?null:r.update(s,{scrollIntoView:!0,userEvent:"input.type"})}function xO(r,e,t){let n=null,i=r.changeByRange(s=>s.empty&&Ft(r.doc,s.head)==t?{changes:{from:s.head,to:s.head+t.length,insert:t},range:Z.cursor(s.head+t.length)}:n={range:s});return n?null:r.update(i,{scrollIntoView:!0,userEvent:"input.type"})}function wO(r,e,t,n){let i=n.stringPrefixes||ft.stringPrefixes,s=null,a=r.changeByRange(o=>{if(!o.empty)return{changes:[{insert:e,from:o.from},{insert:e,from:o.to}],effects:Re.of(o.to+e.length),range:Z.range(o.anchor+e.length,o.head+e.length)};let l=o.head,O=Ft(r.doc,l),c;if(O==e){if(Ss(r,l))return{changes:{insert:e+e,from:l},effects:Re.of(l+e.length),range:Z.cursor(l+e.length)};if(_s(r,l)){let p=t&&r.sliceDoc(l,l+e.length*3)==e+e+e?e+e+e:e;return{changes:{from:l,to:l+p.length,insert:p},range:Z.cursor(l+p.length)}}}else{if(t&&r.sliceDoc(l-2*e.length,l)==e+e&&(c=ks(r,l-2*e.length,i))>-1&&Ss(r,c))return{changes:{insert:e+e+e+e,from:l},effects:Re.of(l+e.length),range:Z.cursor(l+e.length)};if(r.charCategorizer(l)(O)!=A.Word&&ks(r,l,i)>-1&&!yO(r,l,e,i))return{changes:{insert:e+e,from:l},effects:Re.of(l+e.length),range:Z.cursor(l+e.length)}}return{range:s=o}});return s?null:r.update(a,{scrollIntoView:!0,userEvent:"input.type"})}function Ss(r,e){let t=R(r).resolveInner(e+1);return t.parent&&t.from==e}function yO(r,e,t,n){let i=R(r).resolveInner(e,-1),s=n.reduce((a,o)=>Math.max(a,o.length),0);for(let a=0;a<5;a++){let o=r.sliceDoc(i.from,Math.min(i.to,i.from+t.length+s)),l=o.indexOf(t);if(!l||l>-1&&n.indexOf(o.slice(0,l))>-1){let c=i.firstChild;for(;c&&c.from==i.from&&c.to-c.from>t.length+l;){if(r.sliceDoc(c.to-t.length,c.to)==t)return!1;c=c.firstChild}return!0}let O=i.to==e&&i.parent;if(!O)break;i=O}return!1}function ks(r,e,t){let n=r.charCategorizer(e);if(n(r.sliceDoc(e-1,e))!=A.Word)return e;for(let i of t){let s=e-i.length;if(r.sliceDoc(s,e)==i&&n(r.sliceDoc(s-1,s))!=A.Word)return s}return-1}function Ys(r={}){return[oO,U,C.of(r),sO,ZO,ys]}var tn=[{key:"Ctrl-Space",run:qr},{mac:"Alt-`",run:qr},{mac:"Alt-i",run:qr},{key:"Escape",run:rO},{key:"ArrowDown",run:It(!0)},{key:"ArrowUp",run:It(!1)},{key:"PageDown",run:It(!0,"page")},{key:"PageUp",run:It(!1,"page")},{key:"Enter",run:tO}],ZO=ge.highest(ve.computeN([C],r=>r.facet(C).defaultKeymap?[tn]:[]));var Jt=class r{static create(e,t,n,i,s){let a=i+(i<<8)+e+(t<<4)|0;return new r(e,t,n,a,s,[],[])}constructor(e,t,n,i,s,a,o){this.type=e,this.value=t,this.from=n,this.hash=i,this.end=s,this.children=a,this.positions=o,this.blankFirstLine=!1,this.hashProp=[[K.contextHash,i]]}addChild(e,t){e.prop(K.contextHash)!=this.hash&&(e=new M(e.type,e.children,e.positions,e.length,this.hashProp)),this.children.push(e),this.positions.push(t)}toTree(e,t=this.end){let n=this.children.length-1;return n>=0&&(t=Math.max(t,this.positions[n]+this.children[n].length+this.from)),new M(e.types[this.type],this.children,this.positions,t-this.from).balance({makeTree:(i,s,a)=>new M(Te.none,i,s,a,this.hashProp)})}},$;(function(r){r[r.Document=1]="Document",r[r.CodeBlock=2]="CodeBlock",r[r.FencedCode=3]="FencedCode",r[r.Blockquote=4]="Blockquote",r[r.HorizontalRule=5]="HorizontalRule",r[r.BulletList=6]="BulletList",r[r.OrderedList=7]="OrderedList",r[r.ListItem=8]="ListItem",r[r.ATXHeading1=9]="ATXHeading1",r[r.ATXHeading2=10]="ATXHeading2",r[r.ATXHeading3=11]="ATXHeading3",r[r.ATXHeading4=12]="ATXHeading4",r[r.ATXHeading5=13]="ATXHeading5",r[r.ATXHeading6=14]="ATXHeading6",r[r.SetextHeading1=15]="SetextHeading1",r[r.SetextHeading2=16]="SetextHeading2",r[r.HTMLBlock=17]="HTMLBlock",r[r.LinkReference=18]="LinkReference",r[r.Paragraph=19]="Paragraph",r[r.CommentBlock=20]="CommentBlock",r[r.ProcessingInstructionBlock=21]="ProcessingInstructionBlock",r[r.Escape=22]="Escape",r[r.Entity=23]="Entity",r[r.HardBreak=24]="HardBreak",r[r.Emphasis=25]="Emphasis",r[r.StrongEmphasis=26]="StrongEmphasis",r[r.Link=27]="Link",r[r.Image=28]="Image",r[r.InlineCode=29]="InlineCode",r[r.HTMLTag=30]="HTMLTag",r[r.Comment=31]="Comment",r[r.ProcessingInstruction=32]="ProcessingInstruction",r[r.Autolink=33]="Autolink",r[r.HeaderMark=34]="HeaderMark",r[r.QuoteMark=35]="QuoteMark",r[r.ListMark=36]="ListMark",r[r.LinkMark=37]="LinkMark",r[r.EmphasisMark=38]="EmphasisMark",r[r.CodeMark=39]="CodeMark",r[r.CodeText=40]="CodeText",r[r.CodeInfo=41]="CodeInfo",r[r.LinkTitle=42]="LinkTitle",r[r.LinkLabel=43]="LinkLabel",r[r.URL=44]="URL"})($||($={}));var sn=class{constructor(e,t){this.start=e,this.content=t,this.marks=[],this.parsers=[]}},an=class{constructor(){this.text="",this.baseIndent=0,this.basePos=0,this.depth=0,this.markers=[],this.pos=0,this.indent=0,this.next=-1}forward(){this.basePos>this.pos&&this.forwardInner()}forwardInner(){let e=this.skipSpace(this.basePos);this.indent=this.countIndent(e,this.pos,this.indent),this.pos=e,this.next=e==this.text.length?-1:this.text.charCodeAt(e)}skipSpace(e){return gt(this.text,e)}reset(e){for(this.text=e,this.baseIndent=this.basePos=this.pos=this.indent=0,this.forwardInner(),this.depth=1;this.markers.length;)this.markers.pop()}moveBase(e){this.basePos=e,this.baseIndent=this.countIndent(e,this.pos,this.indent)}moveBaseColumn(e){this.baseIndent=e,this.basePos=this.findColumn(e)}addMarker(e){this.markers.push(e)}countIndent(e,t=0,n=0){for(let i=t;i=e.stack[t.depth+1].value+t.baseIndent)return!0;if(t.indent>=t.baseIndent+4)return!1;let n=(r.type==$.OrderedList?Qn:gn)(t,e,!1);return n>0&&(r.type!=$.BulletList||mn(t,e,!1)<0)&&t.text.charCodeAt(t.pos+n-1)==r.value}var Is={[$.Blockquote](r,e,t){return t.next!=62?!1:(t.markers.push(T($.QuoteMark,e.lineStart+t.pos,e.lineStart+t.pos+1)),t.moveBase(t.pos+(D(t.text.charCodeAt(t.pos+1))?2:1)),r.end=e.lineStart+t.text.length,!0)},[$.ListItem](r,e,t){return(t.next<0?r.blankFirstLine&&r.children.length==1:t.indentt&&D(r.charCodeAt(e-1));)e--;return e}function Ds(r){if(r.next!=96&&r.next!=126)return-1;let e=r.pos+1;for(;e-1&&r.depth==e.stack.length&&e.parser.leafBlockParsers.indexOf(ta.SetextHeading)>-1||n<3?-1:1}function Ns(r,e){for(let t=r.stack.length-1;t>=0;t--)if(r.stack[t].type==e)return!0;return!1}function gn(r,e,t){return(r.next==45||r.next==43||r.next==42)&&(r.pos==r.text.length-1||D(r.text.charCodeAt(r.pos+1)))&&(!t||Ns(e,$.BulletList)||r.skipSpace(r.pos+2)=48&&i<=57;){n++;if(n==r.text.length)return-1;i=r.text.charCodeAt(n)}return n==r.pos||n>r.pos+9||i!=46&&i!=41||nr.pos+1||r.next!=49)?-1:n+1-r.pos}function Fs(r){if(r.next!=35)return-1;let e=r.pos+1;for(;e6?-1:t}function Hs(r){if(r.next!=45&&r.next!=61||r.indent>=r.baseIndent+4)return-1;let e=r.pos+1;for(;e/,Js=/\?>/,ln=[[/^<(?:script|pre|style|textarea)(?:\s|>|$)/i,/<\/(?:script|pre|style|textarea)>/i],[/^\s*/,ta=/\?>/,hn=[[/^<(?:script|pre|style|textarea)(?:\s|>|$)/i,/<\/(?:script|pre|style|textarea)>/i],[/^\s*)/.exec(n);if(s)return r.append(T($.Comment,t,t+1+s[0].length));let a=/^\?[^]*?\?>/.exec(n);if(a)return r.append(T($.ProcessingInstruction,t,t+1+a[0].length));let o=/^(?:![A-Z][^]*?>|!\[CDATA\[[^]*?\]\]>|\/[a-zA-Z][\w-]*\s*>|[a-zA-Z][\w-]*(\s+[a-zA-Z:_][\w-.:]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*\/?>)/.exec(n);return o?r.append(T($.HTMLTag,t,t+1+o[0].length)):-1},Emphasis(r,e,t){if(e!=95&&e!=42)return-1;let n=t+1;for(;r.char(n)==e;)n++;let i=r.slice(t-1,t),s=r.slice(n,n+1),a=bt.test(i),o=bt.test(s),l=/\s|^$/.test(i),O=/\s|^$/.test(s),c=!O&&(!o||l||a),h=!l&&(!a||O||o),p=c&&(e==42||!h||a),u=h&&(e==42||!c||o);return r.append(new E(e==95?$n:bn,t,n,(p?1:0)|(u?2:0)))},HardBreak(r,e,t){if(e==92&&r.char(t+1)==10)return r.append(T($.HardBreak,t,t+2));if(e==32){let n=t+1;for(;r.char(n)==32;)n++;if(r.char(n)==10&&n>=t+2)return r.append(T($.HardBreak,t,n+1))}return-1},Link(r,e,t){return e==91?r.append(new E(_e,t,t+1,1)):-1},Image(r,e,t){return e==33&&r.char(t+1)==91?r.append(new E(rr,t,t+2,1)):-1},LinkEnd(r,e,t){if(e!=93)return-1;for(let n=r.parts.length-1;n>=0;n--){let i=r.parts[n];if(i instanceof E&&(i.type==_e||i.type==rr)){if(!i.side||r.skipSpace(i.to)==t&&!/[(\[]/.test(r.slice(t+1,t+2)))return r.parts[n]=null,-1;let s=r.takeContent(n),a=r.parts[n]=TO(r,s,i.type==_e?$.Link:$.Image,i.from,t+1);if(i.type==_e)for(let o=0;oe?T($.URL,e+t,s+t):s==r.length?null:!1}}function sa(r,e,t){let n=r.charCodeAt(e);if(n!=39&&n!=34&&n!=40)return!1;let i=n==40?41:n;for(let s=e+1,a=!1;s=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,i,s){return this.append(new E(e,t,n,(i?1:0)|(s?2:0)))}get hasOpenLink(){for(let e=this.parts.length-1;e>=0;e--){let t=this.parts[e];if(t instanceof E&&(t.type==_e||t.type==rr))return!0}return!1}addElement(e){return this.append(e)}resolveMarkers(e){for(let n=e;n=e;l--){let m=this.parts[l];if(m instanceof E&&m.side&1&&m.type==i.type&&!(s&&(i.side&1||m.side&2)&&(m.size+i.size)%3==0&&(m.size%3||i.size%3))){o=m;break}}if(!o)continue;let O=i.type.resolve,c=[],h=o.from,p=i.to;if(s){let m=Math.min(2,o.to-o.from,a);h=o.to-m,p=i.from+m,O=m==1?"Emphasis":"StrongEmphasis"}o.type.mark&&c.push(this.elt(o.type.mark,h,o.to));for(let m=l+1;m=0;t--){let n=this.parts[t];if(n instanceof E&&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 E?t:null}skipSpace(e){return gt(this.text,e-this.offset)+this.offset}elt(e,t,n,i){return typeof e=="string"?T(this.parser.getNodeType(e),t,n,i):new tr(e,t)}};Ce.linkStart=_e;Ce.imageStart=rr;Ce.emphasisAsterisk=bn;Ce.emphasisUnderscore=$n;function pn(r,e){if(!e.length)return r;if(!r.length)return e;let t=r.slice(),n=0;for(let i of e){for(;n(e?e-1:0))return!1;if(this.fragmentEnd<0){let s=this.fragment.to;for(;s>0&&this.input.read(s-1,s)!=` -`;)s--;this.fragmentEnd=s?s-1:0}let n=this.cursor;n||(n=this.cursor=this.fragment.tree.cursor(le.IncludeAnonymous|le.IgnoreMounts),n.firstChild());let i=e+this.fragment.offset;for(;n.to<=i;)if(!n.parent())return!1;for(;;){if(n.from>=i)return this.fragment.from<=t;if(!n.childAfter(i))return!1}}matches(e){let t=this.cursor.tree;for(;t&&t.type.isAnonymous&&t.children[0]instanceof M;)t=t.children[0];return t&&t.prop(K.contextHash)==e}takeNodes(e){let t=this.cursor,n=this.fragment.offset,i=this.fragmentEnd-(this.fragment.openEnd?1:0),s=e.absoluteLineStart,a=s,o=e.block.children.length,l=e.lineStart-e.block.from>>2,O=a,c=o;e:for(;;){if(t.to-n>Math.min(i,e.to)||t.type.isAnonymous&&t.tree&&(t.to-t.from>l||!RO(t.tree))){if(t.type.isAnonymous&&t.firstChild())continue;break}let h=la(t.from-n,e.ranges);if(t.to-n<=e.ranges[e.rangeI].to)e.addNode(t.tree,h);else{let p=new M(e.parser.nodeSet.types[$.Paragraph],[],[],0,e.block.hashProp);e.reusePlaceholders.set(p,t.tree),e.addNode(p,h)}for((t.type.isAnonymous||t.type.is("Block"))&&(t.type.isAnonymous||oa.indexOf(t.type.id)<0?(a=t.to-n,o=e.block.children.length):(a=O,o=c),O=t.to-n,c=e.block.children.length);;){if(t.nextSibling())continue e;if(!t.parent()||!t.type.isAnonymous)break e}}for(;e.block.children.length>o;)e.block.children.pop(),e.block.positions.pop();return a-s}};function RO(r){for(;r.type.isAnonymous;){let e=r.children[r.children.length-1];if(e instanceof M)r=e;else return!1}return r.type.is("Block")&&oa.indexOf(r.type.id)<0}function la(r,e){let t=r;for(let n=1;nHt[r]),Object.keys(Ht).map(r=>ta[r]),Object.keys(Ht),XO,Is,Object.keys(nn).map(r=>nn[r]),Object.keys(nn),[]);function _O(r,e,t){let n=[];for(let i=r.firstChild,s=e;;i=i.nextSibling){let a=i?i.from:t;if(a>s&&n.push({from:s,to:a}),!i)break;s=i.to}return n}function ca(r){let{codeParser:e,htmlParser:t}=r;return{wrap:Wt((i,s)=>{let a=i.type.id;if(e&&(a==$.CodeBlock||a==$.FencedCode)){let o="";if(a==$.FencedCode){let O=i.node.getChild($.CodeInfo);O&&(o=s.read(O.from,O.to))}let l=e(o);if(l)return{parser:l,overlay:O=>O.type.id==$.CodeText,bracketed:a==$.FencedCode}}else if(t&&(a==$.HTMLBlock||a==$.HTMLTag||a==$.CommentBlock))return{parser:t,overlay:_O(i.node,i.from,i.to)};return null})}}var YO={resolve:"Strikethrough",mark:"StrikethroughMark"},CO={defineNodes:[{name:"Strikethrough",style:{"Strikethrough/...":f.strikethrough}},{name:"StrikethroughMark",style:f.processingInstruction}],parseInline:[{name:"Strikethrough",parse(r,e,t){if(e!=126||r.char(t+1)!=126||r.char(t+2)==126)return-1;let n=r.slice(t-1,t),i=r.slice(t+2,t+3),s=/\s|^$/.test(n),a=/\s|^$/.test(i),o=bt.test(n),l=bt.test(i);return r.addDelimiter(YO,t,t+2,!a&&(!l||s||o),!s&&(!o||a||l))},after:"Emphasis"}]};function Qt(r,e,t=0,n,i=0){let s=0,a=!0,o=-1,l=-1,O=!1,c=()=>{n.push(r.elt("TableCell",i+o,i+l,r.parser.parseInline(e.slice(o,l),i+o)))};for(let h=t;h-1)&&s++,a=!1,n&&(o>-1&&c(),n.push(r.elt("TableDelimiter",h+i,h+i+1))),o=l=-1):(O||p!=32&&p!=9)&&(o<0&&(o=h),l=h+1),O=!O&&p==92}return o>-1&&(s++,n&&c()),s}function Ls(r,e){for(let t=e;t\s]*\|?(\s*:?-+:?\s*\|)+(\s*:?-+:?\s*)?$/,nr=class{constructor(){this.rows=null}nextLine(e,t,n){if(this.rows==null){this.rows=!1;let i;if((t.next==45||t.next==58||t.next==124)&&ha.test(i=t.text.slice(t.pos))){let s=[];Qt(e,n.content,0,s,n.start)==Qt(e,i,0)&&(this.rows=[e.elt("TableHeader",n.start,n.start+n.content.length,s),e.elt("TableDelimiter",e.lineStart+t.pos,e.lineStart+t.text.length)])}}else if(this.rows){let i=[];Qt(e,t.text,t.pos,i,e.lineStart),this.rows.push(e.elt("TableRow",e.lineStart+t.pos,e.lineStart+t.text.length,i))}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}},zO={defineNodes:[{name:"Table",block:!0},{name:"TableHeader",style:{"TableHeader/...":f.heading}},"TableRow",{name:"TableCell",style:f.content},{name:"TableDelimiter",style:f.processingInstruction}],parseBlock:[{name:"Table",leaf(r,e){return Ls(e.content,0)?new nr:null},endLeaf(r,e,t){if(t.parsers.some(i=>i instanceof nr)||!Ls(e.text,e.basePos))return!1;let n=r.peekLine();return ha.test(n)&&Qt(r,e.text,e.basePos)==Qt(r,n,e.basePos)},before:"SetextHeading"}]},dn=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}},qO={defineNodes:[{name:"Task",block:!0,style:f.list},{name:"TaskMarker",style:f.atom}],parseBlock:[{name:"TaskList",leaf(r,e){return/^\[[ xX]\][ \t]/.test(e.content)&&r.parentType().name=="ListItem"?new dn:null},after:"SetextHeading"}]},Es=/(www\.)|(https?:\/\/)|([\w.+-]{1,100}@)|(mailto:|xmpp:)/gy,Ws=/[\w-]+(\.[\w-]+)+(:\d+)?(\/[^\s<]*)?/gy,AO=/[\w-]+\.[\w-]+($|[/:])/,Ms=/[\w.+-]+@[\w-]+(\.[\w.-]+)+/gy,Us=/\/[a-zA-Z\d@.]+/gy;function Vs(r,e,t,n){let i=0;for(let s=e;s-1)return-1;let n=e+t[0].length;for(;;){let i=r[n-1],s;if(/[?!.,:*_~]/.test(i)||i==")"&&Vs(r,e,n,")")>Vs(r,e,n,"("))n--;else if(i==";"&&(s=/&(?:#\d+|#x[a-f\d]+|\w+);$/.exec(r.slice(e,n))))n=e+s.index;else break}return n}function Gs(r,e){Ms.lastIndex=e;let t=Ms.exec(r);if(!t)return-1;let n=t[0][t[0].length-1];return n=="_"||n=="-"?-1:e+t[0].length-(n=="."?1:0)}var EO={parseInline:[{name:"Autolink",parse(r,e,t){let n=t-r.offset;if(n&&/\w/.test(r.text[n-1]))return-1;Es.lastIndex=n;let i=Es.exec(r.text),s=-1;if(!i)return-1;if(i[1]||i[2]){if(s=LO(r.text,n+i[0].length),s>-1&&r.hasOpenLink){let a=/([^\[\]]|\[[^\]]*\])*/.exec(r.text.slice(n,s));s=n+a[0].length}}else i[3]?s=Gs(r.text,n):(s=Gs(r.text,n+i[0].length),s>-1&&i[0]=="xmpp:"&&(Us.lastIndex=s,i=Us.exec(r.text),i&&(s=i.index+i[0].length)));return s<0?-1:(r.addElement(r.elt("URL",t,s+r.offset)),s+r.offset)}}]},ua=[zO,qO,CO,EO];function pa(r,e,t){return(n,i,s)=>{if(i!=r||n.char(s+1)==r)return-1;let a=[n.elt(t,s,s+1)];for(let o=s+1;ot%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,t,n=0){let i=e.parser.context;return new r(e,[],t,n,n,0,[],0,i?new ir(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,t){this.stack.push(this.state,t,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var t;let n=e>>19,i=e&65535,{parser:s}=this.p,a=this.reducePos=2e3&&!(!((t=this.p.parser.nodeSet.types[i])===null||t===void 0)&&t.isAnonymous)&&(O==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=c):this.p.lastBigReductionSizel;)this.stack.pop();this.reduceContext(i,O)}storeNode(e,t,n,i=4,s=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]0&&this.buffer[a-4]==0&&this.buffer[a-1]>-1){if(t==n)return;if(this.buffer[a-2]>=t){this.buffer[a-2]=n;return}}}if(!s||this.pos==n)this.buffer.push(e,t,n,i);else{let a=this.buffer.length;if(a>0&&(this.buffer[a-4]!=0||this.buffer[a-1]<0)){let o=!1;for(let l=a;l>0&&this.buffer[l-2]>n;l-=4)if(this.buffer[l-1]>=0){o=!0;break}if(o)for(;a>0&&this.buffer[a-2]>n;)this.buffer[a]=this.buffer[a-4],this.buffer[a+1]=this.buffer[a-3],this.buffer[a+2]=this.buffer[a-2],this.buffer[a+3]=this.buffer[a-1],a-=4,i>4&&(i-=4)}this.buffer[a]=e,this.buffer[a+1]=t,this.buffer[a+2]=n,this.buffer[a+3]=i}}shift(e,t,n,i){if(e&131072)this.pushState(e&65535,this.pos);else if((e&262144)==0){let s=e,{parser:a}=this.p;this.pos=i;let o=a.stateFlag(s,1);!o&&(i>n||t<=a.maxNode)&&(this.reducePos=i),this.pushState(s,o?n:Math.min(n,this.reducePos)),this.shiftContext(t,n),t<=a.maxNode&&this.buffer.push(t,n,i,4)}else this.pos=i,this.shiftContext(t,n),t<=this.p.parser.maxNode&&this.buffer.push(t,n,i,4)}apply(e,t,n,i){e&65536?this.reduce(e):this.shift(e,t,n,i)}useNode(e,t,n){let i=this.p.reused.length-1;(i<0||this.p.reused[i]!=e)&&(this.p.reused.push(e),i++);let s=this.reducePos=this.pos=n+e.length;this.pushState(t,n),this.buffer.push(i,n,s,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,t=e.buffer.length;for(t&&e.buffer[t-4]==0&&(t-=4);t>0&&e.buffer[t-2]>e.reducePos;)t-=4;let n=e.buffer.slice(t),i=e.bufferBase+t;for(;e&&i==e.bufferBase;)e=e.parent;return new r(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,n,i,this.curContext,this.lookAhead,e)}recoverByDelete(e,t){let n=e<=this.p.parser.maxNode;n&&this.storeNode(e,this.pos,t,4),this.storeNode(0,this.pos,t,n?8:4),this.pos=this.reducePos=t,this.score-=190}canShift(e){for(let t=new xn(this);;){let n=this.p.parser.stateSlot(t.state,4)||this.p.parser.hasAction(t.state,e);if(n==0)return!1;if((n&65536)==0)return!0;t.reduce(n)}}recoverByInsert(e){if(this.stack.length>=300)return[];let t=this.p.parser.nextStates(this.state);if(t.length>8||this.stack.length>=120){let i=[];for(let s=0,a;sl&1&&o==a)||i.push(t[s],a)}t=i}let n=[];for(let i=0;i>19,i=t&65535,s=this.stack.length-n*3;if(s<0||e.getGoto(this.stack[s],i,!1)<0){let a=this.findForcedReduction();if(a==null)return!1;t=a}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(t),!0}findForcedReduction(){let{parser:e}=this.p,t=[],n=(i,s)=>{if(!t.includes(i))return t.push(i),e.allActions(i,a=>{if(!(a&393216))if(a&65536){let o=(a>>19)-s;if(o>1){let l=a&65535,O=this.stack.length-o*3;if(O>=0&&e.getGoto(this.stack[O],l,!1)>=0)return o<<19|65536|l}}else{let o=n(a,s+1);if(o!=null)return o}})};return n(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let t=0;t0&&this.emitLookAhead()}},ir=class{constructor(e,t){this.tracker=e,this.context=t,this.hash=e.strict?e.hash(t):0}},xn=class{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let t=e&65535,n=e>>19;n==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(n-1)*3;let i=this.start.p.parser.getGoto(this.stack[this.base-3],t,!0);this.state=i}},wn=class r{constructor(e,t,n){this.stack=e,this.pos=t,this.index=n,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(e,t=e.bufferBase+e.buffer.length){return new r(e,t,t-e.bufferBase)}maybeNext(){let e=this.stack.parent;e!=null&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new r(this.stack,this.pos,this.index)}};function St(r,e=Uint16Array){if(typeof r!="string")return r;let t=null;for(let n=0,i=0;n=92&&a--,a>=34&&a--;let l=a-32;if(l>=46&&(l-=46,o=!0),s+=l,o)break;s*=46}t?t[i++]=s:t=new e(s)}return t}var Ke=class{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}},ga=new Ke,yn=class{constructor(e,t){this.input=e,this.ranges=t,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=ga,this.rangeIndex=0,this.pos=this.chunkPos=t[0].from,this.range=t[0],this.end=t[t.length-1].to,this.readNext()}resolveOffset(e,t){let n=this.range,i=this.rangeIndex,s=this.pos+e;for(;sn.to:s>=n.to;){if(i==this.ranges.length-1)return null;let a=this.ranges[++i];s+=a.from-n.to,n=a}return s}clipPos(e){if(e>=this.range.from&&ee)return Math.max(e,t.from);return this.end}peek(e){let t=this.chunkOff+e,n,i;if(t>=0&&t=this.chunk2Pos&&no.to&&(this.chunk2=this.chunk2.slice(0,o.to-n)),i=this.chunk2.charCodeAt(0)}}return n>=this.token.lookAhead&&(this.token.lookAhead=n+1),i}acceptToken(e,t=0){let n=t?this.resolveOffset(t,-1):this.pos;if(n==null||n=this.chunk2Pos&&this.posthis.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,t){if(t?(this.token=t,t.start=e,t.lookAhead=e+1,t.value=t.extended=-1):this.token=ga,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e=this.chunkPos&&t<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,t-this.chunkPos);if(e>=this.chunk2Pos&&t<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,t-this.chunk2Pos);if(e>=this.range.from&&t<=this.range.to)return this.input.read(e,t);let n="";for(let i of this.ranges){if(i.from>=t)break;i.to>e&&(n+=this.input.read(Math.max(i.from,e),Math.min(i.to,t)))}return n}},Se=class{constructor(e,t){this.data=e,this.id=t}token(e,t){let{parser:n}=t.p;ka(this.data,e,t,this.id,n.data,n.tokenPrecTable)}};Se.prototype.contextual=Se.prototype.fallback=Se.prototype.extend=!1;var ke=class{constructor(e,t,n){this.precTable=t,this.elseToken=n,this.data=typeof e=="string"?St(e):e}token(e,t){let n=e.pos,i=0;for(;;){let s=e.next<0,a=e.resolveOffset(1,1);if(ka(this.data,e,t,0,this.data,this.precTable),e.token.value>-1)break;if(this.elseToken==null)return;if(s||i++,a==null)break;e.reset(a,e.token)}i&&(e.reset(n,e.token),e.acceptToken(this.elseToken,i))}};ke.prototype.contextual=Se.prototype.fallback=Se.prototype.extend=!1;var z=class{constructor(e,t={}){this.token=e,this.contextual=!!t.contextual,this.fallback=!!t.fallback,this.extend=!!t.extend}};function ka(r,e,t,n,i,s){let a=0,o=1<0){let d=r[u];if(l.allows(d)&&(e.token.value==-1||e.token.value==d||MO(d,e.token.value,i,s))){e.acceptToken(d);break}}let c=e.next,h=0,p=r[a+2];if(e.next<0&&p>h&&r[O+p*3-3]==65535){a=r[O+p*3-1];continue e}for(;h>1,d=O+u+(u<<1),m=r[d],g=r[d+1]||65536;if(c=g)h=u+1;else{a=r[d+2],e.advance();continue e}}break}}function Qa(r,e,t){for(let n=e,i;(i=r[n])!=65535;n++)if(i==t)return n-e;return-1}function MO(r,e,t,n){let i=Qa(t,n,e);return i<0||Qa(t,n,r)e)&&!n.type.isError)return t<0?Math.max(0,Math.min(n.to-1,e-25)):Math.min(r.length,Math.max(n.from+1,e+25));if(t<0?n.prevSibling():n.nextSibling())break;if(!n.parent())return t<0?0:r.length}}var Zn=class{constructor(e,t){this.fragments=e,this.minRepeat=t,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.lastRepeat=null,this.lastRepeatPos=-1,this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?$a(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?$a(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(ee)return this.nextStart=a,null;if(s instanceof M){let o=a>this.lastRepeatPos&&s.type.id>=this.minRepeat;if(a==e||o){let l=a+s.length,O;if(a>=this.safeFrom&&l<=this.safeTo&&(!(O=s.prop(K.lookAhead))||l+O=Math.max(this.safeFrom,e)&&(this.trees.push(s),this.start.push(a),this.index.push(0))}else this.index[t]++,this.nextStart=a+s.length}}},Xn=class{constructor(e,t){this.stream=t,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(n=>new Ke)}getActions(e){let t=0,n=null,{parser:i}=e.p,{tokenizers:s}=i,a=i.stateSlot(e.state,3),o=e.curContext?e.curContext.hash:0,l=0;for(let O=0;Oh.end+25&&(l=Math.max(h.lookAhead,l)),h.value!=0)){let p=t;if(h.extended>-1&&(t=this.addActions(e,h.extended,h.end,t)),t=this.addActions(e,h.value,h.end,t),!c.extend&&(n=h,t>p))break}}for(;this.actions.length>t;)this.actions.pop();return l&&e.setLookAhead(l),!n&&e.pos==this.stream.end&&(n=new Ke,n.value=e.p.parser.eofTerm,n.start=n.end=e.pos,t=this.addActions(e,n.value,n.end,t)),this.mainToken=n,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let t=new Ke,{pos:n,p:i}=e;return t.start=n,t.end=Math.min(n+1,i.stream.end),t.value=n==i.stream.end?i.parser.eofTerm:0,t}updateCachedToken(e,t,n){let i=this.stream.clipPos(n.pos);if(t.token(this.stream.reset(i,e),n),e.value>-1){let{parser:s}=n.p;for(let a=0;a=0&&n.p.parser.dialect.allows(o>>1)){(o&1)==0?e.value=o>>1:e.extended=o>>1;break}}}else e.value=0,e.end=this.stream.clipPos(i+1)}putAction(e,t,n,i){for(let s=0;se.bufferLength*4?new Zn(n,e.minRepeatTerm):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,t=this.minStackPos,n=this.stacks=[],i,s;if(this.bigReductionCount>300&&e.length==1){let[a]=e;for(;a.forceReduce()&&a.stack.length&&a.stack[a.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let a=0;at)n.push(o);else{if(this.advanceStack(o,n,e))continue;{i||(i=[],s=[]),i.push(o);let l=this.tokens.getMainToken(o);s.push(l.value,l.end)}}break}}if(!n.length){let a=i&&UO(i);if(a)return B&&console.log("Finish with "+this.stackID(a)),this.stackToTree(a);if(this.parser.strict)throw B&&i&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+t);this.recovering||(this.recovering=5)}if(this.recovering&&i){let a=this.stoppedAt!=null&&i[0].pos>this.stoppedAt?i[0]:this.runRecovery(i,s,n);if(a)return B&&console.log("Force-finish "+this.stackID(a)),this.stackToTree(a.forceAll())}if(this.recovering){let a=this.recovering==1?1:this.recovering*3;if(n.length>a)for(n.sort((o,l)=>l.score-o.score);n.length>a;)n.pop();n.some(o=>o.reducePos>t)&&this.recovering--}else if(n.length>1){e:for(let a=0;a500&&O.buffer.length>500)if((o.score-O.score||o.buffer.length-O.buffer.length)>0)n.splice(l--,1);else{n.splice(a--,1);continue e}}}n.length>12&&(n.sort((a,o)=>o.score-a.score),n.splice(12,n.length-12))}this.minStackPos=n[0].pos;for(let a=1;a-1&&n.length&&(!s||(n.prop(K.contextHash)||0)==a))return e.useNode(n,o,t),n;if(n.children.length==0||n.positions[0]>0)break;let l=n.children[0];if(l instanceof M&&(!i||l.type.id>=this.parser.minRepeatTerm))n=l;else break}return null}advanceStack(e,t,n){let i=e.pos,{parser:s}=this,a=B?this.stackID(e)+" -> ":"";if(this.stoppedAt!=null&&i>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let O=e.reducePos0)return e.reduce(o),B&&console.log(a+this.stackID(e)+` (via always-reduce ${s.getName(o&65535)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let l=this.tokens.getActions(e);for(let O=0;Oi?t.push(d):n.push(d)}return!1}advanceFully(e,t){let n=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>n)return ba(e,t),!0}}runRecovery(e,t,n){let i=null,s=!1;for(let a=0;a ":"";if(o.deadEnd&&(s||(s=!0,o.restart(),B&&console.log(c+this.stackID(o)+" (restarted)"),this.advanceFully(o,n))))continue;let h=o.split(),p=c;for(let u=0;u<10&&h.forceReduce()&&(B&&console.log(p+this.stackID(h)+" (via force-reduce)"),!this.advanceFully(h,n));u++)B&&(p=this.stackID(h)+" -> ");for(let u of o.recoverByInsert(l))B&&console.log(c+this.stackID(u)+" (via recover-insert)"),this.advanceFully(u,n);this.stream.end>o.pos?(O==o.pos&&(O++,l=0),o.recoverByDelete(l,O),B&&console.log(c+this.stackID(o)+` (via recover-delete ${this.parser.getName(l)})`),ba(o,n)):(!i||i.scorer,Je=class{constructor(e){this.start=e.start,this.shift=e.shift||kn,this.reduce=e.reduce||kn,this.reuse=e.reuse||kn,this.hash=e.hash||(()=>0),this.strict=e.strict!==!1}},Pe=class r extends Et{constructor(e){if(super(),this.wrappers=[],e.version!=14)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let t=e.nodeNames.split(" ");this.minRepeatTerm=t.length;for(let o=0;oe.topRules[o][1]),i=[];for(let o=0;o=0)s(c,l,o[O++]);else{let h=o[O+-c];for(let p=-c;p>0;p--)s(o[O++],l,h);O++}}}this.nodeSet=new ht(t.map((o,l)=>Te.define({name:l>=this.minRepeatTerm?void 0:o,id:l,props:i[l],top:n.indexOf(l)>-1,error:l==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(l)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=1024;let a=St(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let o=0;otypeof o=="number"?new Se(a,o):o),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,t,n){let i=new vn(this,e,t,n);for(let s of this.wrappers)i=s(i,e,t,n);return i}getGoto(e,t,n=!1){let i=this.goto;if(t>=i[0])return-1;for(let s=i[t+1];;){let a=i[s++],o=a&1,l=i[s++];if(o&&n)return l;for(let O=s+(a>>1);s0}validAction(e,t){return!!this.allActions(e,n=>n==t?!0:null)}allActions(e,t){let n=this.stateSlot(e,4),i=n?t(n):void 0;for(let s=this.stateSlot(e,1);i==null;s+=3){if(this.data[s]==65535)if(this.data[s+1]==1)s=pe(this.data,s+2);else break;i=t(pe(this.data,s+1))}return i}nextStates(e){let t=[];for(let n=this.stateSlot(e,1);;n+=3){if(this.data[n]==65535)if(this.data[n+1]==1)n=pe(this.data,n+2);else break;if((this.data[n+2]&1)==0){let i=this.data[n+1];t.some((s,a)=>a&1&&s==i)||t.push(this.data[n],i)}}return t}configure(e){let t=Object.assign(Object.create(r.prototype),this);if(e.props&&(t.nodeSet=this.nodeSet.extend(...e.props)),e.top){let n=this.topRules[e.top];if(!n)throw new RangeError(`Invalid top rule name ${e.top}`);t.top=n}return e.tokenizers&&(t.tokenizers=this.tokenizers.map(n=>{let i=e.tokenizers.find(s=>s.from==n);return i?i.to:n})),e.specializers&&(t.specializers=this.specializers.slice(),t.specializerSpecs=this.specializerSpecs.map((n,i)=>{let s=e.specializers.find(o=>o.from==n.external);if(!s)return n;let a=Object.assign(Object.assign({},n),{external:s.to});return t.specializers[i]=Sa(a),a})),e.contextTracker&&(t.context=e.contextTracker),e.dialect&&(t.dialect=this.parseDialect(e.dialect)),e.strict!=null&&(t.strict=e.strict),e.wrap&&(t.wrappers=t.wrappers.concat(e.wrap)),e.bufferLength!=null&&(t.bufferLength=e.bufferLength),t}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let t=this.dynamicPrecedences;return t==null?0:t[e]||0}parseDialect(e){let t=Object.keys(this.dialects),n=t.map(()=>!1);if(e)for(let s of e.split(" ")){let a=t.indexOf(s);a>=0&&(n[a]=!0)}let i=null;for(let s=0;sn)&&t.p.parser.stateFlag(t.state,2)&&(!e||e.scorer.external(t,n)<<1|e}return r.get}var VO=55,GO=1,IO=56,DO=2,BO=57,NO=3,Pa=4,FO=5,Cn=6,Ra=7,ja=8,_a=9,Ya=10,HO=11,KO=12,JO=13,Rn=58,ec=14,tc=15,xa=59,Ca=21,rc=23,za=24,nc=25,_n=27,qa=28,ic=29,sc=32,ac=35,oc=37,lc=38,Oc=0,cc=1,hc={area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},uc={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},wa={dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}};function pc(r){return r==45||r==46||r==58||r>=65&&r<=90||r==95||r>=97&&r<=122||r>=161}var ya=null,Za=null,Xa=0;function Yn(r,e){let t=r.pos+e;if(Xa==t&&Za==r)return ya;let n=r.peek(e),i="";for(;pc(n);)i+=String.fromCharCode(n),n=r.peek(++e);return Za=r,Xa=t,ya=i?i.toLowerCase():n==fc||n==dc?void 0:null}var Aa=60,sr=62,zn=47,fc=63,dc=33,mc=45;function va(r,e){this.name=r,this.parent=e}var gc=[Cn,Ya,Ra,ja,_a],Qc=new Je({start:null,shift(r,e,t,n){return gc.indexOf(e)>-1?new va(Yn(n,1)||"",r):r},reduce(r,e){return e==Ca&&r?r.parent:r},reuse(r,e,t,n){let i=e.type.id;return i==Cn||i==oc?new va(Yn(n,1)||"",r):r},strict:!1}),$c=new z((r,e)=>{if(r.next!=Aa){r.next<0&&e.context&&r.acceptToken(Rn);return}r.advance();let t=r.next==zn;t&&r.advance();let n=Yn(r,0);if(n===void 0)return;if(!n)return r.acceptToken(t?tc:ec);let i=e.context?e.context.name:null;if(t){if(n==i)return r.acceptToken(HO);if(i&&uc[i])return r.acceptToken(Rn,-2);if(e.dialectEnabled(Oc))return r.acceptToken(KO);for(let s=e.context;s;s=s.parent)if(s.name==n)return;r.acceptToken(JO)}else{if(n=="script")return r.acceptToken(Ra);if(n=="style")return r.acceptToken(ja);if(n=="textarea")return r.acceptToken(_a);if(hc.hasOwnProperty(n))return r.acceptToken(Ya);i&&wa[i]&&wa[i][n]?r.acceptToken(Rn,-1):r.acceptToken(Cn)}},{contextual:!0}),bc=new z(r=>{for(let e=0,t=0;;t++){if(r.next<0){t&&r.acceptToken(xa);break}if(r.next==mc)e++;else if(r.next==sr&&e>=2){t>=3&&r.acceptToken(xa,-2);break}else e=0;r.advance()}});function Sc(r){for(;r;r=r.parent)if(r.name=="svg"||r.name=="math")return!0;return!1}var kc=new z((r,e)=>{if(r.next==zn&&r.peek(1)==sr){let t=e.dialectEnabled(cc)||Sc(e.context);r.acceptToken(t?FO:Pa,2)}else r.next==sr&&r.acceptToken(Pa,1)});function qn(r,e,t){let n=2+r.length;return new z(i=>{for(let s=0,a=0,o=0;;o++){if(i.next<0){o&&i.acceptToken(e);break}if(s==0&&i.next==Aa||s==1&&i.next==zn||s>=2&&sa?i.acceptToken(e,-a):i.acceptToken(t,-(a-2));break}else if((i.next==10||i.next==13)&&o){i.acceptToken(e,1);break}else s=a=0;i.advance()}})}var Pc=qn("script",VO,GO),xc=qn("style",IO,DO),wc=qn("textarea",BO,NO),yc=Oe({"Text RawText IncompleteTag IncompleteCloseTag":f.content,"StartTag StartCloseTag SelfClosingEndTag EndTag":f.angleBracket,TagName:f.tagName,"MismatchedCloseTag/TagName":[f.tagName,f.invalid],AttributeName:f.attributeName,"AttributeValue UnquotedAttributeValue":f.attributeValue,Is:f.definitionOperator,"EntityReference CharacterReference":f.character,Comment:f.blockComment,ProcessingInst:f.processingInstruction,DoctypeDecl:f.documentMeta}),La=Pe.deserialize({version:14,states:",xOVO!rOOO!ZQ#tO'#CrO!`Q#tO'#C{O!eQ#tO'#DOO!jQ#tO'#DRO!oQ#tO'#DTO!tOaO'#CqO#PObO'#CqO#[OdO'#CqO$kO!rO'#CqOOO`'#Cq'#CqO$rO$fO'#DUO$zQ#tO'#DWO%PQ#tO'#DXOOO`'#Dl'#DlOOO`'#DZ'#DZQVO!rOOO%UQ&rO,59^O%aQ&rO,59gO%lQ&rO,59jO%wQ&rO,59mO&SQ&rO,59oOOOa'#D_'#D_O&_OaO'#CyO&jOaO,59]OOOb'#D`'#D`O&rObO'#C|O&}ObO,59]OOOd'#Da'#DaO'VOdO'#DPO'bOdO,59]O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sX~OR!]O![!XO~O![!XO~P#gOg!_O~O!]sO!f!aO~OS!bO~OS!cO~Oj!dOShXThXihX~OS!fOT!gOiyO~OS!hOT!gOiyO~OS!iOT!gOiyO~OS!jOT!gOiyO~OS!gOT!gOiyO~Og!kO~Og!lO~Og!mO~OS!nO~Ol!qO!a!oO!c!pO~OS!rO~OS!sO~OS!tO~Ob!uOc!uOd!uO!a!wO!b!uO~Ob!xOc!xOd!xO!c!wO!d!xO~Ob!uOc!uOd!uO!a!{O!b!uO~Ob!xOc!xOd!xO!c!{O!d!xO~OT~cbd!ey|!e~",goto:"%q!aPPPPPPPPPPPPPPPPPPPPP!b!hP!nPP!zP!}#Q#T#Z#^#a#g#j#m#s#y!bP!b!bP$P$V$m$s$y%P%V%]%cPPPPPPPP%iX^OX`pXUOX`pezabcde{!O!Q!S!UR!q!dRhUR!XhXVOX`pRkVR!XkXWOX`pRnWR!XnXXOX`pQrXR!XpXYOX`pQ`ORx`Q{aQ!ObQ!QcQ!SdQ!UeZ!e{!O!Q!S!UQ!v!oR!z!vQ!y!pR!|!yQgUR!VgQjVR!YjQmWR![mQpXR!^pQtZR!`tS_O`ToXp",nodeNames:"\u26A0 StartCloseTag StartCloseTag StartCloseTag EndTag SelfClosingEndTag StartTag StartTag StartTag StartTag StartTag StartCloseTag StartCloseTag StartCloseTag IncompleteTag IncompleteCloseTag Document Text EntityReference CharacterReference InvalidEntity Element OpenTag TagName Attribute AttributeName Is AttributeValue UnquotedAttributeValue ScriptText CloseTag OpenTag StyleText CloseTag OpenTag TextareaText CloseTag OpenTag CloseTag SelfClosingTag Comment ProcessingInst MismatchedCloseTag CloseTag DoctypeDecl",maxTerm:68,context:Qc,nodeProps:[["closedBy",-10,1,2,3,7,8,9,10,11,12,13,"EndTag",6,"EndTag SelfClosingEndTag",-4,22,31,34,37,"CloseTag"],["openedBy",4,"StartTag StartCloseTag",5,"StartTag",-4,30,33,36,38,"OpenTag"],["group",-10,14,15,18,19,20,21,40,41,42,43,"Entity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Y!b`!dpOr!4trs!5ksv!4tvw!6Vwx!8]x!a!4t!a!b!:]!b;'S!4t;'S;=`!;r<%lO!4tq!5pV!dpOv!5kvx!6Vx!a!5k!a!b!7W!b;'S!5k;'S;=`!8V<%lO!5kP!6YTO!a!6V!a!b!6i!b;'S!6V;'S;=`!7Q<%lO!6VP!6lTO!`!6V!`!a!6{!a;'S!6V;'S;=`!7Q<%lO!6VP!7QOyPP!7TP;=`<%l!6Vq!7]V!dpOv!5kvx!6Vx!`!5k!`!a!7r!a;'S!5k;'S;=`!8V<%lO!5kq!7yS!dpyPOv(Vx;'S(V;'S;=`(h<%lO(Vq!8YP;=`<%l!5ka!8bX!b`Or!8]rs!6Vsv!8]vw!6Vw!a!8]!a!b!8}!b;'S!8];'S;=`!:V<%lO!8]a!9SX!b`Or!8]rs!6Vsv!8]vw!6Vw!`!8]!`!a!9o!a;'S!8];'S;=`!:V<%lO!8]a!9vT!b`yPOr)esv)ew;'S)e;'S;=`)y<%lO)ea!:YP;=`<%l!8]!R!:dY!b`!dpOr!4trs!5ksv!4tvw!6Vwx!8]x!`!4t!`!a!;S!a;'S!4t;'S;=`!;r<%lO!4t!R!;]V!b`!dpyPOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!;uP;=`<%l!4t!V!{let O=o.type.id;if(O==ic)return jn(o,l,t);if(O==sc)return jn(o,l,n);if(O==ac)return jn(o,l,i);if(O==Ca&&s.length){let c=o.node,h=c.firstChild,p=h&&Ta(h,l),u;if(p){for(let d of s)if(d.tag==p&&(!d.attrs||d.attrs(u||(u=Ea(h,l))))){let m=c.lastChild,g=m.type.id==lc?m.from:c.to;if(g>h.to)return{parser:d.parser,overlay:[{from:h.to,to:g}]}}}}if(a&&O==za){let c=o.node,h;if(h=c.firstChild){let p=a[l.read(h.from,h.to)];if(p)for(let u of p){if(u.tagName&&u.tagName!=Ta(c.parent,l))continue;let d=c.lastChild;if(d.type.id==_n){let m=d.from+1,g=d.lastChild,b=d.to-(g&&g.isError?0:1);if(b>m)return{parser:u.parser,overlay:[{from:m,to:b}],bracketed:!0}}else if(d.type.id==qa)return{parser:u.parser,overlay:[{from:d.from,to:d.to}]}}}}return null})}var Zc=148,Wa=1,Xc=149,vc=150,Va=2,Tc=151,Rc=3,jc=4,_c=152,Ga=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],Yc=58,Cc=40,Ia=95,zc=91,ar=45,qc=46,Ac=35,Lc=37,Ec=38,Wc=92,Mc=10,Uc=42;function kt(r){return r>=65&&r<=90||r>=97&&r<=122||r>=161}function Ln(r){return r>=48&&r<=57}function Ma(r){return Ln(r)||r>=97&&r<=102||r>=65&&r<=70}var Da=(r,e,t)=>(n,i)=>{for(let s=!1,a=0,o=0;;o++){let{next:l}=n;if(kt(l)||l==ar||l==Ia||s&&Ln(l))!s&&(l!=ar||o>0)&&(s=!0),a===o&&l==ar&&a++,n.advance();else if(l==Wc&&n.peek(1)!=Mc){if(n.advance(),Ma(n.next)){do n.advance();while(Ma(n.next));n.next==32&&n.advance()}else n.next>-1&&n.advance();s=!0}else{s&&n.acceptToken(a>=2&&i.canShift(Va)?e:l==Cc?t:r);break}}},Vc=new z(Da(Xc,Va,vc),{contextual:!0}),Gc=new z(Da(Tc,Rc,jc),{contextual:!0}),Ic=new z(r=>{if(Ga.includes(r.peek(-1))){let{next:e}=r;(kt(e)||e==Ia||e==Ac||e==qc||e==Uc||e==zc||e==Yc&&kt(r.peek(1))||e==ar||e==Ec)&&r.acceptToken(Zc)}}),Dc=new z(r=>{if(!Ga.includes(r.peek(-1))){let{next:e}=r;if(e==Lc&&(r.advance(),r.acceptToken(Wa)),kt(e)){do r.advance();while(kt(r.next)||Ln(r.next));r.acceptToken(Wa)}}});function Ua(r){let e=r.length;return(e==4||e==5||e==7||e==9)&&/^#[a-f\d]+$/i.test(r)?_c:-1}var Bc=Oe({"AtKeyword import charset namespace keyframes media supports font-feature-values":f.definitionKeyword,"from to selector scope MatchFlag":f.keyword,NamespaceName:f.namespace,KeyframeName:f.labelName,KeyframeRangeName:f.operatorKeyword,TagName:f.tagName,ClassName:f.className,PseudoClassName:f.constant(f.className),IdName:f.labelName,"FeatureName PropertyName":f.propertyName,AttributeName:f.attributeName,NumberLiteral:f.number,KeywordQuery:f.keyword,UnaryQueryOp:f.operatorKeyword,"CallTag ValueName FontName":f.atom,VariableName:f.variableName,Callee:f.operatorKeyword,Unit:f.unit,"UniversalSelector NestingSelector":f.definitionOperator,"MatchOp CompareOp":f.compareOperator,"ChildOp SiblingOp, LogicOp":f.logicOperator,BinOp:f.arithmeticOperator,Important:f.modifier,Comment:f.blockComment,ColorLiteral:f.color,"ParenthesizedContent StringLiteral":f.string,":":f.punctuation,PseudoOp:f.derefOperator,"; , |":f.separator,"( )":f.paren,"[ ]":f.squareBracket,"{ }":f.brace}),Nc={__proto__:null,lang:44,"nth-child":44,"nth-last-child":44,"nth-of-type":44,"nth-last-of-type":44,dir:44,"host-context":44,if:88,url:158,"url-prefix":158,domain:158,regexp:158},Fc={__proto__:null,or:102,and:102,not:112,only:112,layer:212},Hc={__proto__:null,selector:118,style:124,layer:208},Kc={__proto__:null,"@import":204,"@media":216,"@charset":220,"@namespace":224,"@keyframes":230,"@supports":242,"@scope":246,"@font-feature-values":252},Jc={__proto__:null,to:249},Ba=Pe.deserialize({version:14,states:"MrQYQdOOO$TQdOOP$[O`OOO%XQaO'#CfOOQP'#Ce'#CeO%`QdO'#CgO%eQ`O'#CgO%jQaO'#FrO&eQdO'#CkO'XQaO'#CcO'cQdO'#CnOOQP'#ES'#ESOOQP'#ER'#ERO'nQdO'#ETO'yQdO'#E[O'yQdO'#E_OOQP'#Fr'#FrO)`QhO'#FQOOQS'#Fq'#FqOOQS'#FT'#FTQYQdOOO)gQdO'#EeO*vQhO'#EkO)gQdO'#EmO*}QdO'#EoO+YQdO'#ErO*[QhO'#ExO+bQdO'#EzO+mQdO'#E}O+rQaO'#Cf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jz!_%j!_!`0^!`;'S%j;'S;=`%{<%lO%jjHTSqYOy%jz;'S%j;'S;=`%{<%lO%jfHfU#SQOy%jz!_%j!_!`0^!`;'S%j;'S;=`%{<%lO%j`H{P;=`<%l%Z",tokenizers:[Ic,Dc,Vc,Gc,1,2,3,4,new ke("m~RRYZ[z{a~~g~aO$c~~dP!P!Qg~lO$d~~",28,156)],topRules:{StyleSheet:[0,6],Styles:[1,129]},dynamicPrecedences:{97:1},specialized:[{term:172,get:(r,e)=>Ua(r)<<1,external:Ua},{term:150,get:r=>Nc[r]||-1},{term:151,get:r=>Fc[r]||-1},{term:4,get:r=>Hc[r]||-1},{term:28,get:r=>Kc[r]||-1},{term:149,get:r=>Jc[r]||-1}],tokenPrec:2433});var En=null;function Wn(){if(!En&&typeof document=="object"&&document.body){let{style:r}=document.body,e=[],t=new Set;for(let n in r)n!="cssText"&&n!="cssFloat"&&typeof r[n]=="string"&&(/[A-Z]/.test(n)&&(n=n.replace(/[A-Z]/g,i=>"-"+i.toLowerCase())),t.has(n)||(e.push(n),t.add(n)));En=e.sort().map(n=>({type:"property",label:n,apply:n+": "}))}return En||[]}var Na=["active","after","any-link","autofill","backdrop","before","checked","cue","default","defined","disabled","empty","enabled","file-selector-button","first","first-child","first-letter","first-line","first-of-type","focus","focus-visible","focus-within","fullscreen","has","host","host-context","hover","in-range","indeterminate","invalid","is","lang","last-child","last-of-type","left","link","marker","modal","not","nth-child","nth-last-child","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","part","placeholder","placeholder-shown","read-only","read-write","required","right","root","scope","selection","slotted","target","target-text","valid","visited","where"].map(r=>({type:"class",label:r})),Fa=["above","absolute","activeborder","additive","activecaption","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","antialiased","appworkspace","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic-abegede-gez","ethiopic-halehame-aa-er","ethiopic-halehame-gez","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","graytext","grid","groove","hand","hard-light","help","hidden","hide","higher","highlight","highlighttext","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","justify","keep-all","landscape","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-hexadecimal","lower-latin","lower-norwegian","lowercase","ltr","luminosity","manipulation","match","matrix","matrix3d","medium","menu","menutext","message-box","middle","min-intrinsic","mix","monospace","move","multiple","multiple_mask_images","multiply","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","opacity","open-quote","optimizeLegibility","optimizeSpeed","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","text","text-bottom","text-top","textarea","textfield","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","to","top","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-latin","uppercase","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"].map(r=>({type:"keyword",label:r})).concat(["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"].map(r=>({type:"constant",label:r}))),eh=["a","abbr","address","article","aside","b","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","dd","del","details","dfn","dialog","div","dl","dt","em","figcaption","figure","footer","form","header","hgroup","h1","h2","h3","h4","h5","h6","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","main","meter","nav","ol","output","p","pre","ruby","section","select","small","source","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","tr","u","ul"].map(r=>({type:"type",label:r})),th=["@charset","@color-profile","@container","@counter-style","@font-face","@font-feature-values","@font-palette-values","@import","@keyframes","@layer","@media","@namespace","@page","@position-try","@property","@scope","@starting-style","@supports","@view-transition"].map(r=>({type:"keyword",label:r})),fe=/^(\w[\w-]*|-\w[\w-]*|)$/,rh=/^-(-[\w-]*)?$/;function nh(r,e){var t;if((r.name=="("||r.type.isError)&&(r=r.parent||r),r.name!="ArgList")return!1;let n=(t=r.parent)===null||t===void 0?void 0:t.firstChild;return n?.name!="Callee"?!1:e.sliceString(n.from,n.to)=="var"}var Ha=new Lt,ih=["Declaration"];function sh(r){for(let e=r;;){if(e.type.isTop)return e;if(!(e=e.parent))return r}}function Ka(r,e,t){if(e.to-e.from>4096){let n=Ha.get(e);if(n)return n;let i=[],s=new Set,a=e.cursor(le.IncludeAnonymous);if(a.firstChild())do for(let o of Ka(r,a.node,t))s.has(o.label)||(s.add(o.label),i.push(o));while(a.nextSibling());return Ha.set(e,i),i}else{let n=[],i=new Set;return e.cursor().iterate(s=>{var a;if(t(s)&&s.matchContext(ih)&&((a=s.node.nextSibling)===null||a===void 0?void 0:a.name)==":"){let o=r.sliceString(s.from,s.to);i.has(o)||(i.add(o),n.push({label:o,type:"variable"}))}}),n}}var ah=r=>e=>{let{state:t,pos:n}=e,i=R(t).resolveInner(n,-1),s=i.type.isError&&i.from==i.to-1&&t.doc.sliceString(i.from,i.to)=="-";if(i.name=="PropertyName"||(s||i.name=="TagName")&&/^(Block|Styles)$/.test(i.resolve(i.to).name))return{from:i.from,options:Wn(),validFor:fe};if(i.name=="ValueName")return{from:i.from,options:Fa,validFor:fe};if(i.name=="PseudoClassName")return{from:i.from,options:Na,validFor:fe};if(r(i)||(e.explicit||s)&&nh(i,t.doc))return{from:r(i)||s?i.from:n,options:Ka(t.doc,sh(i),r),validFor:rh};if(i.name=="TagName"){for(let{parent:l}=i;l;l=l.parent)if(l.name=="Block")return{from:i.from,options:Wn(),validFor:fe};return{from:i.from,options:eh,validFor:fe}}if(i.name=="AtKeyword")return{from:i.from,options:th,validFor:fe};if(!e.explicit)return null;let a=i.resolve(n),o=a.childBefore(n);return o&&o.name==":"&&a.name=="PseudoClassSelector"?{from:n,options:Na,validFor:fe}:o&&o.name==":"&&a.name=="Declaration"||a.name=="ArgList"?{from:n,options:Fa,validFor:fe}:a.name=="Block"||a.name=="Styles"?{from:n,options:Wn(),validFor:fe}:null},oh=ah(r=>r.name=="VariableName"),Pt=De.define({name:"css",parser:Ba.configure({props:[$e.add({Declaration:Be()}),he.add({"Block KeyframeList":Vt})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"}},indentOnInput:/^\s*\}$/,wordChars:"-"}});function Ja(){return new ce(Pt,Pt.data.of({autocomplete:oh}))}var lh=317,Oh=318,eo=1,ch=2,hh=3,uh=4,ph=319,fh=321,dh=322,mh=5,gh=6,Qh=0,Un=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],to=125,$h=59,Vn=47,bh=42,Sh=43,kh=45,Ph=60,xh=44,wh=63,yh=46,Zh=91,Xh=new Je({start:!1,shift(r,e){return e==mh||e==gh||e==fh?r:e==dh},strict:!1}),vh=new z((r,e)=>{let{next:t}=r;(t==to||t==-1||e.context)&&r.acceptToken(ph)},{contextual:!0,fallback:!0}),Th=new z((r,e)=>{let{next:t}=r,n;Un.indexOf(t)>-1||t==Vn&&((n=r.peek(1))==Vn||n==bh)||t!=to&&t!=$h&&t!=-1&&!e.context&&r.acceptToken(lh)},{contextual:!0}),Rh=new z((r,e)=>{r.next==Zh&&!e.context&&r.acceptToken(Oh)},{contextual:!0}),jh=new z((r,e)=>{let{next:t}=r;if(t==Sh||t==kh){if(r.advance(),t==r.next){r.advance();let n=!e.context&&e.canShift(eo);r.acceptToken(n?eo:ch)}}else t==wh&&r.peek(1)==yh&&(r.advance(),r.advance(),(r.next<48||r.next>57)&&r.acceptToken(hh))},{contextual:!0});function Mn(r,e){return r>=65&&r<=90||r>=97&&r<=122||r==95||r>=192||!e&&r>=48&&r<=57}var _h=new z((r,e)=>{if(r.next!=Ph||!e.dialectEnabled(Qh)||(r.advance(),r.next==Vn))return;let t=0;for(;Un.indexOf(r.next)>-1;)r.advance(),t++;if(Mn(r.next,!0)){for(r.advance(),t++;Mn(r.next,!1);)r.advance(),t++;for(;Un.indexOf(r.next)>-1;)r.advance(),t++;if(r.next==xh)return;for(let n=0;;n++){if(n==7){if(!Mn(r.next,!0))return;break}if(r.next!="extends".charCodeAt(n))break;r.advance(),t++}}r.acceptToken(uh,-t)}),Yh=Oe({"get set async static":f.modifier,"for while do if else switch try catch finally return throw break continue default case defer":f.controlKeyword,"in of await yield void typeof delete instanceof as satisfies":f.operatorKeyword,"let var const using function class extends":f.definitionKeyword,"import export from":f.moduleKeyword,"with debugger new":f.keyword,TemplateString:f.special(f.string),super:f.atom,BooleanLiteral:f.bool,this:f.self,null:f.null,Star:f.modifier,VariableName:f.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":f.function(f.variableName),VariableDefinition:f.definition(f.variableName),Label:f.labelName,PropertyName:f.propertyName,PrivatePropertyName:f.special(f.propertyName),"CallExpression/MemberExpression/PropertyName":f.function(f.propertyName),"FunctionDeclaration/VariableDefinition":f.function(f.definition(f.variableName)),"ClassDeclaration/VariableDefinition":f.definition(f.className),"NewExpression/VariableName":f.className,PropertyDefinition:f.definition(f.propertyName),PrivatePropertyDefinition:f.definition(f.special(f.propertyName)),UpdateOp:f.updateOperator,"LineComment Hashbang":f.lineComment,BlockComment:f.blockComment,Number:f.number,String:f.string,Escape:f.escape,ArithOp:f.arithmeticOperator,LogicOp:f.logicOperator,BitOp:f.bitwiseOperator,CompareOp:f.compareOperator,RegExp:f.regexp,Equals:f.definitionOperator,Arrow:f.function(f.punctuation),": Spread":f.punctuation,"( )":f.paren,"[ ]":f.squareBracket,"{ }":f.brace,"InterpolationStart InterpolationEnd":f.special(f.brace),".":f.derefOperator,", ;":f.separator,"@":f.meta,TypeName:f.typeName,TypeDefinition:f.definition(f.typeName),"type enum interface implements namespace module declare":f.definitionKeyword,"abstract global Privacy readonly override":f.modifier,"is keyof unique infer asserts":f.operatorKeyword,JSXAttributeValue:f.attributeValue,JSXText:f.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":f.angleBracket,"JSXIdentifier JSXNameSpacedName":f.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":f.attributeName,"JSXBuiltin/JSXIdentifier":f.standard(f.tagName)}),Ch={__proto__:null,export:20,as:25,from:33,default:36,async:41,function:42,in:52,out:55,const:56,extends:60,this:64,true:72,false:72,null:84,void:88,typeof:92,super:108,new:142,delete:154,yield:163,await:167,class:172,public:237,private:237,protected:237,readonly:239,instanceof:258,satisfies:261,import:294,keyof:351,unique:355,infer:361,asserts:397,is:399,abstract:419,implements:421,type:423,let:426,var:428,using:431,interface:437,enum:441,namespace:447,module:449,declare:453,global:457,defer:473,for:478,of:487,while:490,with:494,do:498,if:502,else:504,switch:508,case:514,try:520,catch:524,finally:528,return:532,throw:536,break:540,continue:544,debugger:548},zh={__proto__:null,async:129,get:131,set:133,declare:195,public:197,private:197,protected:197,static:199,abstract:201,override:203,readonly:209,accessor:211,new:403},qh={__proto__:null,"<":193},ro=Pe.deserialize({version:14,states:"$GSQ%TQlOOO%[QlOOO'_QpOOP(lO`OOO*zQ!0MxO'#CiO+RO#tO'#CjO+aO&jO'#CjO+oO#@ItO'#DaO.QQlO'#DgO.bQlO'#DrO%[QlO'#DzO0fQlO'#ESOOQ!0Lf'#E['#E[O1PQ`O'#EXOOQO'#Ep'#EpOOQO'#Im'#ImO1XQ`O'#GtO1dQ`O'#EoO1iQ`O'#EoO3hQ!0MxO'#JsO6[Q!0MxO'#JtO6uQ`O'#F^O6zQ,UO'#FuOOQ!0Lf'#Fg'#FgO7VO7dO'#FgO9XQMhO'#F}O9`Q`O'#F|OOQ!0Lf'#Jt'#JtOOQ!0Lb'#Js'#JsO9eQ`O'#GxOOQ['#K`'#K`O9pQ`O'#IZO9uQ!0LrO'#I[OOQ['#Ja'#JaOOQ['#I`'#I`Q`QlOOQ`QlOOO9}Q!L^O'#DvO:UQlO'#EOO:]QlO'#EQO9kQ`O'#GtO:dQMhO'#CoO:rQ`O'#EnO:}Q`O'#EzO;hQMhO'#FfO;xQ`O'#GtOOQO'#Ka'#KaO;}Q`O'#KaO<]Q`O'#G|O<]Q`O'#G}O<]Q`O'#HPO9kQ`O'#HSO=SQ`O'#HVO>kQ`O'#CeO>{Q`O'#HdO?TQ`O'#HjO?TQ`O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Y8eQ:d8xQ:i9OQ:p9_Q;W:ZQ;_:eQ;c:qQ;n;XR;q;`Q%zyQ'e!iQ'p!uU+o%{%|%}Q-X'VU-m'f'g'hS-q'l'vQ0S*kS1S+p+qQ2p-ZS2}-n-oQ3U-vS4r0T0WQ5d1TQ6x2wQ6{3OQ7Q3VU7}4t4u4xQ9|8PR;Q9}S$wi>QR*|%VU%Ui%V>QR0h*zQ$viS(v#v+kS)d$b$cQ)f$dQ*]$xS*f${*ZQ*u%OQ*v%QQ+R%^Q+S%_Q+W%cQ.nQQ>O>YQ>P>ZQ>[>^R>]>_Q+P%]Q.pTR#[WR'Z!el!tQ!r!v!y!z'a'm'n'o-g-w1q5}6PS'V!e-^U*k$|*[*pS-Z'W'`S0W*l*rQ0`*sQ2w-eQ4x0^R4}0aR(|#xQ!fQT-f'a-g]!qQ!r'a-g1q5}Q#p]R'j < TypeParamList in out const TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewTarget new NewExpression ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression TypeArgList CompareOp < declare Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty VariableDefinition Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression InstantiationExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast < ArrowFunction TypeParamList SequenceExpression InstantiationExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate asserts is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var using TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration defer ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement SingleExpression SingleClassItem",maxTerm:381,context:Xh,nodeProps:[["isolate",-8,5,6,14,37,39,51,53,55,""],["group",-26,9,17,19,68,208,212,216,217,219,222,225,235,238,244,246,248,250,253,259,265,267,269,271,273,275,276,"Statement",-34,13,14,32,35,36,42,51,54,55,57,62,70,72,76,80,82,84,85,110,111,121,122,137,140,142,143,144,145,146,148,149,168,170,172,"Expression",-23,31,33,37,41,43,45,174,176,178,179,181,182,183,185,186,187,189,190,191,202,204,206,207,"Type",-3,88,103,109,"ClassItem"],["openedBy",23,"<",38,"InterpolationStart",56,"[",60,"{",73,"(",161,"JSXStartCloseTag"],["closedBy",-2,24,169,">",40,"InterpolationEnd",50,"]",61,"}",74,")",166,"JSXEndTag"]],propSources:[Yh],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_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$g%Z$g;'SEr;'S;=`I|<%lOEr",tokenizers:[Th,Rh,jh,_h,2,3,4,5,6,7,8,9,10,11,12,13,14,vh,new ke("$S~RRtu[#O#Pg#S#T#|~_P#o#pb~gOx~~jVO#i!P#i#j!U#j#l!P#l#m!q#m;'S!P;'S;=`#v<%lO!P~!UO!U~~!XS!Q![!e!c!i!e#T#Z!e#o#p#Z~!hR!Q![!q!c!i!q#T#Z!q~!tR!Q![!}!c!i!}#T#Z!}~#QR!Q![!P!c!i!P#T#Z!P~#^R!Q![#g!c!i#g#T#Z#g~#jS!Q![#g!c!i#g#T#Z#g#q#r!P~#yP;=`<%l!P~$RO(d~~",141,341),new ke("j~RQYZXz{^~^O(R~~aP!P!Qd~iO(S~~",25,324)],topRules:{Script:[0,7],SingleExpression:[1,277],SingleClassItem:[2,278]},dialects:{jsx:0,ts:15179},dynamicPrecedences:{80:1,82:1,94:1,170:1,200:1},specialized:[{term:328,get:r=>Ch[r]||-1},{term:344,get:r=>zh[r]||-1},{term:95,get:r=>qh[r]||-1}],tokenPrec:15205});var ao=[L("function ${name}(${params}) {\n ${}\n}",{label:"function",detail:"definition",type:"keyword"}),L("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}",{label:"for",detail:"loop",type:"keyword"}),L("for (let ${name} of ${collection}) {\n ${}\n}",{label:"for",detail:"of loop",type:"keyword"}),L("do {\n ${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),L("while (${}) {\n ${}\n}",{label:"while",detail:"loop",type:"keyword"}),L(`try { +`);n=i<0?t:t.slice(0,i)}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=er.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 M(this.parser.nodeSet.types[e],Ke,Ke,(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(mn(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?ia(this.ranges,0,e.topNode,this.ranges[0].from,this.reusePlaceholders):e}finishLeaf(e){for(let n of e.parsers)if(n.finish(this,e))return;let t=mn(this.parser.parseInline(e.content,e.start),e.marks);this.addNode(this.buffer.writeElements(t,-e.start).finish($.Paragraph,e.content.length),e.start)}elt(e,t,n,i){return typeof e=="string"?T(this.parser.getNodeType(e),t,n,i):new rr(e,t)}get buffer(){return new tr(this.parser.nodeSet)}};function ia(r,e,t,n,i){let s=r[e].to,a=[],o=[],l=t.from+n;function O(c,h){for(;h?c>=s:c>s;){let p=r[e+1].from-s;n+=p,c+=p,e++,s=r[e].to}}for(let c=t.firstChild;c;c=c.nextSibling){O(c.from+n,!0);let h=c.from+n,p,u=i.get(c.tree);u?p=u:c.to+n>s?(p=ia(r,e,c,n,i),O(c.to+n,!1)):p=c.toTree(),a.push(p),o.push(h-l)}return O(t.to+n,!1),new M(t.type,a,o,t.to+n-l,t.tree?t.tree.propValues:void 0)}var bt=class r extends Wt{constructor(e,t,n,i,s,a,o,l,O){super(),this.nodeSet=e,this.blockParsers=t,this.leafBlockParsers=n,this.blockNames=i,this.endLeafBlock=s,this.skipContextMarkup=a,this.inlineParsers=o,this.inlineNames=l,this.wrappers=O,this.nodeTypes=Object.create(null);for(let c of e.types)this.nodeTypes[c.name]=c.id}createParse(e,t,n){let i=new fn(this,e,t,n);for(let s of this.wrappers)i=s(i,e,t,n);return i}configure(e){let t=dn(e);if(!t)return this;let{nodeSet:n,skipContextMarkup:i}=this,s=this.blockParsers.slice(),a=this.leafBlockParsers.slice(),o=this.blockNames.slice(),l=this.inlineParsers.slice(),O=this.inlineNames.slice(),c=this.endLeafBlock.slice(),h=this.wrappers;if(gt(t.defineNodes)){i=Object.assign({},i);let p=n.types.slice(),u;for(let d of t.defineNodes){let{name:m,block:g,composite:b,style:Q}=typeof d=="string"?{name:d}:d;if(p.some(w=>w.name==m))continue;b&&(i[p.length]=(w,_,G)=>b(_,G,w.value));let k=p.length,y=b?["Block","BlockContext"]:g?k>=$.ATXHeading1&&k<=$.SetextHeading2?["Block","LeafBlock","Heading"]:["Block","LeafBlock"]:void 0;p.push(Re.define({id:k,name:m,props:y&&[[K.group,y]]})),Q&&(u||(u={}),Array.isArray(Q)||Q instanceof ns?u[m]=Q:Object.assign(u,Q))}n=new ut(p),u&&(n=n.extend(Oe(u)))}if(gt(t.props)&&(n=n.extend(...t.props)),gt(t.remove))for(let p of t.remove){let u=this.blockNames.indexOf(p),d=this.inlineNames.indexOf(p);u>-1&&(s[u]=a[u]=void 0),d>-1&&(l[d]=void 0)}if(gt(t.parseBlock))for(let p of t.parseBlock){let u=o.indexOf(p.name);if(u>-1)s[u]=p.parse,a[u]=p.leaf;else{let d=p.before?Jt(o,p.before):p.after?Jt(o,p.after)+1:o.length-1;s.splice(d,0,p.parse),a.splice(d,0,p.leaf),o.splice(d,0,p.name)}p.endLeaf&&c.push(p.endLeaf)}if(gt(t.parseInline))for(let p of t.parseInline){let u=O.indexOf(p.name);if(u>-1)l[u]=p.parse;else{let d=p.before?Jt(O,p.before):p.after?Jt(O,p.after)+1:O.length-1;l.splice(d,0,p.parse),O.splice(d,0,p.name)}}return t.wrap&&(h=h.concat(t.wrap)),new r(n,s,a,o,c,i,l,O,h)}getNodeType(e){let t=this.nodeTypes[e];if(t==null)throw new RangeError(`Unknown node type '${e}'`);return t}parseInline(e,t){let n=new ze(this,e,t);e:for(let i=t;i=0){i=o;continue e}}i++}return n.resolveMarkers(0)}};function gt(r){return r!=null&&r.length>0}function dn(r){if(!Array.isArray(r))return r;if(r.length==0)return null;let e=dn(r[0]);if(r.length==1)return e;let t=dn(r.slice(1));if(!t||!e)return e||t;let n=(a,o)=>(a||Ke).concat(o||Ke),i=e.wrap,s=t.wrap;return{props:n(e.props,t.props),defineNodes:n(e.defineNodes,t.defineNodes),parseBlock:n(e.parseBlock,t.parseBlock),parseInline:n(e.parseInline,t.parseInline),remove:n(e.remove,t.remove),wrap:i?s?(a,o,l,O)=>i(s(a,o,l,O),o,l,O):i:s}}function Jt(r,e){let t=r.indexOf(e);if(t<0)throw new RangeError(`Position specified relative to unknown parser ${e}`);return t}var sa=[Re.none];for(let r=1,e;e=$[r];r++)sa[r]=Re.define({id:r,name:e,props:r>=$.Escape?[]:[[K.group,r in Bs?["Block","BlockContext"]:["Block","LeafBlock"]]],top:e=="Document"});var Ke=[],tr=class{constructor(e){this.nodeSet=e,this.content=[],this.nodes=[]}write(e,t,n,i=0){return this.content.push(e,t,n,4+i*4),this}writeElements(e,t=0){for(let n of e)n.writeTo(this,t);return this}finish(e,t){return M.build({buffer:this.content,nodeSet:this.nodeSet,reused:this.nodes,topID:e,length:t})}},Ce=class{constructor(e,t,n,i=Ke){this.type=e,this.from=t,this.to=n,this.children=i}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 tr(e).writeElements(this.children,-this.from).finish(this.type,this.to-this.from)}},rr=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 Ke}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 T(r,e,t,n){return new Ce(r,e,t,n)}var kn={resolve:"Emphasis",mark:"EmphasisMark"},Pn={resolve:"Emphasis",mark:"EmphasisMark"},Ye={},nr={},E=class{constructor(e,t,n,i,s=n-t){this.type=e,this.from=t,this.to=n,this.side=i,this.size=s}},Es="!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~",St=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\u2010-\u2027]/;try{St=new RegExp("[\\p{S}|\\p{P}]","u")}catch{}var on={Escape(r,e,t){if(e!=92||t==r.end-1)return-1;let n=r.char(t+1);for(let i=0;i]+|[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(n);if(i)return r.append(T($.Autolink,t,t+1+i[0].length,[T($.LinkMark,t,t+1),T($.URL,t+1,t+i[0].length),T($.LinkMark,t+i[0].length,t+1+i[0].length)]));let s=/^!--(?:-?>|[^]*?-->)/.exec(n);if(s)return r.append(T($.Comment,t,t+1+s[0].length));let a=/^\?[^]*?\?>/.exec(n);if(a)return r.append(T($.ProcessingInstruction,t,t+1+a[0].length));let o=/^(?:![A-Z][^]*?>|!\[CDATA\[[^]*?\]\]>|\/[a-zA-Z][\w-]*\s*>|[a-zA-Z][\w-]*(\s+[a-zA-Z:_][\w-.:]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*\/?>)/.exec(n);return o?r.append(T($.HTMLTag,t,t+1+o[0].length)):-1},Emphasis(r,e,t){if(e!=95&&e!=42)return-1;let n=t+1;for(;r.char(n)==e;)n++;let i=r.slice(t-1,t),s=r.slice(n,n+1),a=St.test(i),o=St.test(s),l=/\s|^$/.test(i),O=/\s|^$/.test(s),c=!O&&(!o||l||a),h=!l&&(!a||O||o),p=c&&(e==42||!h||a),u=h&&(e==42||!c||o);return r.append(new E(e==95?kn:Pn,t,n,(p?1:0)|(u?2:0)))},HardBreak(r,e,t){if(e==92&&r.char(t+1)==10)return r.append(T($.HardBreak,t,t+2));if(e==32){let n=t+1;for(;r.char(n)==32;)n++;if(r.char(n)==10&&n>=t+2)return r.append(T($.HardBreak,t,n+1))}return-1},Link(r,e,t){return e==91?r.append(new E(Ye,t,t+1,1)):-1},Image(r,e,t){return e==33&&r.char(t+1)==91?r.append(new E(nr,t,t+2,1)):-1},LinkEnd(r,e,t){if(e!=93)return-1;for(let n=r.parts.length-1;n>=0;n--){let i=r.parts[n];if(i instanceof E&&(i.type==Ye||i.type==nr)){if(!i.side||r.skipSpace(i.to)==t&&!/[(\[]/.test(r.slice(t+1,t+2)))return r.parts[n]=null,-1;let s=r.takeContent(n),a=r.parts[n]=_O(r,s,i.type==Ye?$.Link:$.Image,i.from,t+1);if(i.type==Ye)for(let o=0;oe?T($.URL,e+t,s+t):s==r.length?null:!1}}function oa(r,e,t){let n=r.charCodeAt(e);if(n!=39&&n!=34&&n!=40)return!1;let i=n==40?41:n;for(let s=e+1,a=!1;s=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,i,s){return this.append(new E(e,t,n,(i?1:0)|(s?2:0)))}get hasOpenLink(){for(let e=this.parts.length-1;e>=0;e--){let t=this.parts[e];if(t instanceof E&&(t.type==Ye||t.type==nr))return!0}return!1}addElement(e){return this.append(e)}resolveMarkers(e){for(let n=e;n=e;l--){let m=this.parts[l];if(m instanceof E&&m.side&1&&m.type==i.type&&!(s&&(i.side&1||m.side&2)&&(m.size+i.size)%3==0&&(m.size%3||i.size%3))){o=m;break}}if(!o)continue;let O=i.type.resolve,c=[],h=o.from,p=i.to;if(s){let m=Math.min(2,o.to-o.from,a);h=o.to-m,p=i.from+m,O=m==1?"Emphasis":"StrongEmphasis"}o.type.mark&&c.push(this.elt(o.type.mark,h,o.to));for(let m=l+1;m=0;t--){let n=this.parts[t];if(n instanceof E&&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 E?t:null}skipSpace(e){return Qt(this.text,e-this.offset)+this.offset}elt(e,t,n,i){return typeof e=="string"?T(this.parser.getNodeType(e),t,n,i):new rr(e,t)}};ze.linkStart=Ye;ze.imageStart=nr;ze.emphasisAsterisk=Pn;ze.emphasisUnderscore=kn;function mn(r,e){if(!e.length)return r;if(!r.length)return e;let t=r.slice(),n=0;for(let i of e){for(;n(e?e-1:0))return!1;if(this.fragmentEnd<0){let s=this.fragment.to;for(;s>0&&this.input.read(s-1,s)!=` +`;)s--;this.fragmentEnd=s?s-1:0}let n=this.cursor;n||(n=this.cursor=this.fragment.tree.cursor(le.IncludeAnonymous|le.IgnoreMounts),n.firstChild());let i=e+this.fragment.offset;for(;n.to<=i;)if(!n.parent())return!1;for(;;){if(n.from>=i)return this.fragment.from<=t;if(!n.childAfter(i))return!1}}matches(e){let t=this.cursor.tree;for(;t&&t.type.isAnonymous&&t.children[0]instanceof M;)t=t.children[0];return t&&t.prop(K.contextHash)==e}takeNodes(e){let t=this.cursor,n=this.fragment.offset,i=this.fragmentEnd-(this.fragment.openEnd?1:0),s=e.absoluteLineStart,a=s,o=e.block.children.length,l=e.lineStart-e.block.from>>2,O=a,c=o;e:for(;;){if(t.to-n>Math.min(i,e.to)||t.type.isAnonymous&&t.tree&&(t.to-t.from>l||!YO(t.tree))){if(t.type.isAnonymous&&t.firstChild())continue;break}let h=ca(t.from-n,e.ranges);if(t.to-n<=e.ranges[e.rangeI].to)e.addNode(t.tree,h);else{let p=new M(e.parser.nodeSet.types[$.Paragraph],[],[],0,e.block.hashProp);e.reusePlaceholders.set(p,t.tree),e.addNode(p,h)}for((t.type.isAnonymous||t.type.is("Block"))&&(t.type.isAnonymous||Oa.indexOf(t.type.id)<0?(a=t.to-n,o=e.block.children.length):(a=O,o=c),O=t.to-n,c=e.block.children.length);;){if(t.nextSibling())continue e;if(!t.parent()||!t.type.isAnonymous)break e}}for(;e.block.children.length>o;)e.block.children.pop(),e.block.positions.pop();return a-s}};function YO(r){for(;r.type.isAnonymous;){let e=r.children[r.children.length-1];if(e instanceof M)r=e;else return!1}return r.type.is("Block")&&Oa.indexOf(r.type.id)<0}function ca(r,e){let t=r;for(let n=1;nKt[r]),Object.keys(Kt).map(r=>na[r]),Object.keys(Kt),RO,Bs,Object.keys(on).map(r=>on[r]),Object.keys(on),[]);function zO(r,e,t){let n=[];for(let i=r.firstChild,s=e;;i=i.nextSibling){let a=i?i.from:t;if(a>s&&n.push({from:s,to:a}),!i)break;s=i.to}return n}function ua(r){let{codeParser:e,htmlParser:t}=r;return{wrap:Mt((i,s)=>{let a=i.type.id;if(e&&(a==$.CodeBlock||a==$.FencedCode)){let o="";if(a==$.FencedCode){let O=i.node.getChild($.CodeInfo);O&&(o=s.read(O.from,O.to))}let l=e(o);if(l)return{parser:l,overlay:O=>O.type.id==$.CodeText,bracketed:a==$.FencedCode}}else if(t&&(a==$.HTMLBlock||a==$.HTMLTag||a==$.CommentBlock))return{parser:t,overlay:zO(i.node,i.from,i.to)};return null})}}var qO={resolve:"Strikethrough",mark:"StrikethroughMark"},AO={defineNodes:[{name:"Strikethrough",style:{"Strikethrough/...":f.strikethrough}},{name:"StrikethroughMark",style:f.processingInstruction}],parseInline:[{name:"Strikethrough",parse(r,e,t){if(e!=126||r.char(t+1)!=126||r.char(t+2)==126)return-1;let n=r.slice(t-1,t),i=r.slice(t+2,t+3),s=/\s|^$/.test(n),a=/\s|^$/.test(i),o=St.test(n),l=St.test(i);return r.addDelimiter(qO,t,t+2,!a&&(!l||s||o),!s&&(!o||a||l))},after:"Emphasis"}]};function $t(r,e,t=0,n,i=0){let s=0,a=!0,o=-1,l=-1,O=!1,c=()=>{n.push(r.elt("TableCell",i+o,i+l,r.parser.parseInline(e.slice(o,l),i+o)))};for(let h=t;h-1)&&s++,a=!1,n&&(o>-1&&c(),n.push(r.elt("TableDelimiter",h+i,h+i+1))),o=l=-1):(O||p!=32&&p!=9)&&(o<0&&(o=h),l=h+1),O=!O&&p==92}return o>-1&&(s++,n&&c()),s}function Ws(r,e){for(let t=e;t\s]*\|?(\s*:?-+:?\s*\|)+(\s*:?-+:?\s*)?$/,ir=class{constructor(){this.rows=null}nextLine(e,t,n){if(this.rows==null){this.rows=!1;let i;if((t.next==45||t.next==58||t.next==124)&&pa.test(i=t.text.slice(t.pos))){let s=[];$t(e,n.content,0,s,n.start)==$t(e,i,0)&&(this.rows=[e.elt("TableHeader",n.start,n.start+n.content.length,s),e.elt("TableDelimiter",e.lineStart+t.pos,e.lineStart+t.text.length)])}}else if(this.rows){let i=[];$t(e,t.text,t.pos,i,e.lineStart),this.rows.push(e.elt("TableRow",e.lineStart+t.pos,e.lineStart+t.text.length,i))}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}},LO={defineNodes:[{name:"Table",block:!0},{name:"TableHeader",style:{"TableHeader/...":f.heading}},"TableRow",{name:"TableCell",style:f.content},{name:"TableDelimiter",style:f.processingInstruction}],parseBlock:[{name:"Table",leaf(r,e){return Ws(e.content,0)?new ir:null},endLeaf(r,e,t){if(t.parsers.some(i=>i instanceof ir)||!Ws(e.text,e.basePos))return!1;let n=r.peekLine();return pa.test(n)&&$t(r,e.text,e.basePos)==$t(r,n,e.basePos)},before:"SetextHeading"}]},Qn=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}},EO={defineNodes:[{name:"Task",block:!0,style:f.list},{name:"TaskMarker",style:f.atom}],parseBlock:[{name:"TaskList",leaf(r,e){return/^\[[ xX]\][ \t]/.test(e.content)&&r.parentType().name=="ListItem"?new Qn:null},after:"SetextHeading"}]},Ms=/(www\.)|(https?:\/\/)|([\w.+-]{1,100}@)|(mailto:|xmpp:)/gy,Us=/[\w-]+(\.[\w-]+)+(:\d+)?(\/[^\s<]*)?/gy,WO=/[\w-]+\.[\w-]+($|[/:])/,Vs=/[\w.+-]+@[\w-]+(\.[\w.-]+)+/gy,Gs=/\/[a-zA-Z\d@.]+/gy;function Is(r,e,t,n){let i=0;for(let s=e;s-1)return-1;let n=e+t[0].length;for(;;){let i=r[n-1],s;if(/[?!.,:*_~]/.test(i)||i==")"&&Is(r,e,n,")")>Is(r,e,n,"("))n--;else if(i==";"&&(s=/&(?:#\d+|#x[a-f\d]+|\w+);$/.exec(r.slice(e,n))))n=e+s.index;else break}return n}function Ds(r,e){Vs.lastIndex=e;let t=Vs.exec(r);if(!t)return-1;let n=t[0][t[0].length-1];return n=="_"||n=="-"?-1:e+t[0].length-(n=="."?1:0)}var UO={parseInline:[{name:"Autolink",parse(r,e,t){let n=t-r.offset;if(n&&/\w/.test(r.text[n-1]))return-1;Ms.lastIndex=n;let i=Ms.exec(r.text),s=-1;if(!i)return-1;if(i[1]||i[2]){if(s=MO(r.text,n+i[0].length),s>-1&&r.hasOpenLink){let a=/([^\[\]]|\[[^\]]*\])*/.exec(r.text.slice(n,s));s=n+a[0].length}}else i[3]?s=Ds(r.text,n):(s=Ds(r.text,n+i[0].length),s>-1&&i[0]=="xmpp:"&&(Gs.lastIndex=s,i=Gs.exec(r.text),i&&(s=i.index+i[0].length)));return s<0?-1:(r.addElement(r.elt("URL",t,s+r.offset)),s+r.offset)}}]},fa=[LO,EO,AO,UO];function da(r,e,t){return(n,i,s)=>{if(i!=r||n.char(s+1)==r)return-1;let a=[n.elt(t,s,s+1)];for(let o=s+1;ot%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,t,n=0){let i=e.parser.context;return new r(e,[],t,n,n,0,[],0,i?new sr(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,t){this.stack.push(this.state,t,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var t;let n=e>>19,i=e&65535,{parser:s}=this.p,a=this.reducePos=2e3&&!(!((t=this.p.parser.nodeSet.types[i])===null||t===void 0)&&t.isAnonymous)&&(O==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=c):this.p.lastBigReductionSizel;)this.stack.pop();this.reduceContext(i,O)}storeNode(e,t,n,i=4,s=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]0&&this.buffer[a-4]==0&&this.buffer[a-1]>-1){if(t==n)return;if(this.buffer[a-2]>=t){this.buffer[a-2]=n;return}}}if(!s||this.pos==n)this.buffer.push(e,t,n,i);else{let a=this.buffer.length;if(a>0&&(this.buffer[a-4]!=0||this.buffer[a-1]<0)){let o=!1;for(let l=a;l>0&&this.buffer[l-2]>n;l-=4)if(this.buffer[l-1]>=0){o=!0;break}if(o)for(;a>0&&this.buffer[a-2]>n;)this.buffer[a]=this.buffer[a-4],this.buffer[a+1]=this.buffer[a-3],this.buffer[a+2]=this.buffer[a-2],this.buffer[a+3]=this.buffer[a-1],a-=4,i>4&&(i-=4)}this.buffer[a]=e,this.buffer[a+1]=t,this.buffer[a+2]=n,this.buffer[a+3]=i}}shift(e,t,n,i){if(e&131072)this.pushState(e&65535,this.pos);else if((e&262144)==0){let s=e,{parser:a}=this.p;this.pos=i;let o=a.stateFlag(s,1);!o&&(i>n||t<=a.maxNode)&&(this.reducePos=i),this.pushState(s,o?n:Math.min(n,this.reducePos)),this.shiftContext(t,n),t<=a.maxNode&&this.buffer.push(t,n,i,4)}else this.pos=i,this.shiftContext(t,n),t<=this.p.parser.maxNode&&this.buffer.push(t,n,i,4)}apply(e,t,n,i){e&65536?this.reduce(e):this.shift(e,t,n,i)}useNode(e,t,n){let i=this.p.reused.length-1;(i<0||this.p.reused[i]!=e)&&(this.p.reused.push(e),i++);let s=this.reducePos=this.pos=n+e.length;this.pushState(t,n),this.buffer.push(i,n,s,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,t=e.buffer.length;for(t&&e.buffer[t-4]==0&&(t-=4);t>0&&e.buffer[t-2]>e.reducePos;)t-=4;let n=e.buffer.slice(t),i=e.bufferBase+t;for(;e&&i==e.bufferBase;)e=e.parent;return new r(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,n,i,this.curContext,this.lookAhead,e)}recoverByDelete(e,t){let n=e<=this.p.parser.maxNode;n&&this.storeNode(e,this.pos,t,4),this.storeNode(0,this.pos,t,n?8:4),this.pos=this.reducePos=t,this.score-=190}canShift(e){for(let t=new Zn(this);;){let n=this.p.parser.stateSlot(t.state,4)||this.p.parser.hasAction(t.state,e);if(n==0)return!1;if((n&65536)==0)return!0;t.reduce(n)}}recoverByInsert(e){if(this.stack.length>=300)return[];let t=this.p.parser.nextStates(this.state);if(t.length>8||this.stack.length>=120){let i=[];for(let s=0,a;sl&1&&o==a)||i.push(t[s],a)}t=i}let n=[];for(let i=0;i>19,i=t&65535,s=this.stack.length-n*3;if(s<0||e.getGoto(this.stack[s],i,!1)<0){let a=this.findForcedReduction();if(a==null)return!1;t=a}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(t),!0}findForcedReduction(){let{parser:e}=this.p,t=[],n=(i,s)=>{if(!t.includes(i))return t.push(i),e.allActions(i,a=>{if(!(a&393216))if(a&65536){let o=(a>>19)-s;if(o>1){let l=a&65535,O=this.stack.length-o*3;if(O>=0&&e.getGoto(this.stack[O],l,!1)>=0)return o<<19|65536|l}}else{let o=n(a,s+1);if(o!=null)return o}})};return n(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let t=0;t0&&this.emitLookAhead()}},sr=class{constructor(e,t){this.tracker=e,this.context=t,this.hash=e.strict?e.hash(t):0}},Zn=class{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let t=e&65535,n=e>>19;n==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(n-1)*3;let i=this.start.p.parser.getGoto(this.stack[this.base-3],t,!0);this.state=i}},Xn=class r{constructor(e,t,n){this.stack=e,this.pos=t,this.index=n,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(e,t=e.bufferBase+e.buffer.length){return new r(e,t,t-e.bufferBase)}maybeNext(){let e=this.stack.parent;e!=null&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new r(this.stack,this.pos,this.index)}};function kt(r,e=Uint16Array){if(typeof r!="string")return r;let t=null;for(let n=0,i=0;n=92&&a--,a>=34&&a--;let l=a-32;if(l>=46&&(l-=46,o=!0),s+=l,o)break;s*=46}t?t[i++]=s:t=new e(s)}return t}var Je=class{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}},$a=new Je,vn=class{constructor(e,t){this.input=e,this.ranges=t,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=$a,this.rangeIndex=0,this.pos=this.chunkPos=t[0].from,this.range=t[0],this.end=t[t.length-1].to,this.readNext()}resolveOffset(e,t){let n=this.range,i=this.rangeIndex,s=this.pos+e;for(;sn.to:s>=n.to;){if(i==this.ranges.length-1)return null;let a=this.ranges[++i];s+=a.from-n.to,n=a}return s}clipPos(e){if(e>=this.range.from&&ee)return Math.max(e,t.from);return this.end}peek(e){let t=this.chunkOff+e,n,i;if(t>=0&&t=this.chunk2Pos&&no.to&&(this.chunk2=this.chunk2.slice(0,o.to-n)),i=this.chunk2.charCodeAt(0)}}return n>=this.token.lookAhead&&(this.token.lookAhead=n+1),i}acceptToken(e,t=0){let n=t?this.resolveOffset(t,-1):this.pos;if(n==null||n=this.chunk2Pos&&this.posthis.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,t){if(t?(this.token=t,t.start=e,t.lookAhead=e+1,t.value=t.extended=-1):this.token=$a,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e=this.chunkPos&&t<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,t-this.chunkPos);if(e>=this.chunk2Pos&&t<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,t-this.chunk2Pos);if(e>=this.range.from&&t<=this.range.to)return this.input.read(e,t);let n="";for(let i of this.ranges){if(i.from>=t)break;i.to>e&&(n+=this.input.read(Math.max(i.from,e),Math.min(i.to,t)))}return n}},Se=class{constructor(e,t){this.data=e,this.id=t}token(e,t){let{parser:n}=t.p;xa(this.data,e,t,this.id,n.data,n.tokenPrecTable)}};Se.prototype.contextual=Se.prototype.fallback=Se.prototype.extend=!1;var ke=class{constructor(e,t,n){this.precTable=t,this.elseToken=n,this.data=typeof e=="string"?kt(e):e}token(e,t){let n=e.pos,i=0;for(;;){let s=e.next<0,a=e.resolveOffset(1,1);if(xa(this.data,e,t,0,this.data,this.precTable),e.token.value>-1)break;if(this.elseToken==null)return;if(s||i++,a==null)break;e.reset(a,e.token)}i&&(e.reset(n,e.token),e.acceptToken(this.elseToken,i))}};ke.prototype.contextual=Se.prototype.fallback=Se.prototype.extend=!1;var z=class{constructor(e,t={}){this.token=e,this.contextual=!!t.contextual,this.fallback=!!t.fallback,this.extend=!!t.extend}};function xa(r,e,t,n,i,s){let a=0,o=1<0){let d=r[u];if(l.allows(d)&&(e.token.value==-1||e.token.value==d||GO(d,e.token.value,i,s))){e.acceptToken(d);break}}let c=e.next,h=0,p=r[a+2];if(e.next<0&&p>h&&r[O+p*3-3]==65535){a=r[O+p*3-1];continue e}for(;h>1,d=O+u+(u<<1),m=r[d],g=r[d+1]||65536;if(c=g)h=u+1;else{a=r[d+2],e.advance();continue e}}break}}function ba(r,e,t){for(let n=e,i;(i=r[n])!=65535;n++)if(i==t)return n-e;return-1}function GO(r,e,t,n){let i=ba(t,n,e);return i<0||ba(t,n,r)e)&&!n.type.isError)return t<0?Math.max(0,Math.min(n.to-1,e-25)):Math.min(r.length,Math.max(n.from+1,e+25));if(t<0?n.prevSibling():n.nextSibling())break;if(!n.parent())return t<0?0:r.length}}var Tn=class{constructor(e,t){this.fragments=e,this.minRepeat=t,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.lastRepeat=null,this.lastRepeatPos=-1,this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?Sa(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?Sa(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(ee)return this.nextStart=a,null;if(s instanceof M){let o=a>this.lastRepeatPos&&s.type.id>=this.minRepeat;if(a==e||o){let l=a+s.length,O;if(a>=this.safeFrom&&l<=this.safeTo&&(!(O=s.prop(K.lookAhead))||l+O=Math.max(this.safeFrom,e)&&(this.trees.push(s),this.start.push(a),this.index.push(0))}else this.index[t]++,this.nextStart=a+s.length}}},Rn=class{constructor(e,t){this.stream=t,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(n=>new Je)}getActions(e){let t=0,n=null,{parser:i}=e.p,{tokenizers:s}=i,a=i.stateSlot(e.state,3),o=e.curContext?e.curContext.hash:0,l=0;for(let O=0;Oh.end+25&&(l=Math.max(h.lookAhead,l)),h.value!=0)){let p=t;if(h.extended>-1&&(t=this.addActions(e,h.extended,h.end,t)),t=this.addActions(e,h.value,h.end,t),!c.extend&&(n=h,t>p))break}}for(;this.actions.length>t;)this.actions.pop();return l&&e.setLookAhead(l),!n&&e.pos==this.stream.end&&(n=new Je,n.value=e.p.parser.eofTerm,n.start=n.end=e.pos,t=this.addActions(e,n.value,n.end,t)),this.mainToken=n,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let t=new Je,{pos:n,p:i}=e;return t.start=n,t.end=Math.min(n+1,i.stream.end),t.value=n==i.stream.end?i.parser.eofTerm:0,t}updateCachedToken(e,t,n){let i=this.stream.clipPos(n.pos);if(t.token(this.stream.reset(i,e),n),e.value>-1){let{parser:s}=n.p;for(let a=0;a=0&&n.p.parser.dialect.allows(o>>1)){(o&1)==0?e.value=o>>1:e.extended=o>>1;break}}}else e.value=0,e.end=this.stream.clipPos(i+1)}putAction(e,t,n,i){for(let s=0;se.bufferLength*4?new Tn(n,e.minRepeatTerm):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,t=this.minStackPos,n=this.stacks=[],i,s;if(this.bigReductionCount>300&&e.length==1){let[a]=e;for(;a.forceReduce()&&a.stack.length&&a.stack[a.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let a=0;at)n.push(o);else{if(this.advanceStack(o,n,e))continue;{i||(i=[],s=[]),i.push(o);let l=this.tokens.getMainToken(o);s.push(l.value,l.end)}}break}}if(!n.length){let a=i&&IO(i);if(a)return B&&console.log("Finish with "+this.stackID(a)),this.stackToTree(a);if(this.parser.strict)throw B&&i&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+t);this.recovering||(this.recovering=5)}if(this.recovering&&i){let a=this.stoppedAt!=null&&i[0].pos>this.stoppedAt?i[0]:this.runRecovery(i,s,n);if(a)return B&&console.log("Force-finish "+this.stackID(a)),this.stackToTree(a.forceAll())}if(this.recovering){let a=this.recovering==1?1:this.recovering*3;if(n.length>a)for(n.sort((o,l)=>l.score-o.score);n.length>a;)n.pop();n.some(o=>o.reducePos>t)&&this.recovering--}else if(n.length>1){e:for(let a=0;a500&&O.buffer.length>500)if((o.score-O.score||o.buffer.length-O.buffer.length)>0)n.splice(l--,1);else{n.splice(a--,1);continue e}}}n.length>12&&(n.sort((a,o)=>o.score-a.score),n.splice(12,n.length-12))}this.minStackPos=n[0].pos;for(let a=1;a-1&&n.length&&(!s||(n.prop(K.contextHash)||0)==a))return e.useNode(n,o,t),n;if(n.children.length==0||n.positions[0]>0)break;let l=n.children[0];if(l instanceof M&&(!i||l.type.id>=this.parser.minRepeatTerm))n=l;else break}return null}advanceStack(e,t,n){let i=e.pos,{parser:s}=this,a=B?this.stackID(e)+" -> ":"";if(this.stoppedAt!=null&&i>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let O=e.reducePos0)return e.reduce(o),B&&console.log(a+this.stackID(e)+` (via always-reduce ${s.getName(o&65535)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let l=this.tokens.getActions(e);for(let O=0;Oi?t.push(d):n.push(d)}return!1}advanceFully(e,t){let n=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>n)return ka(e,t),!0}}runRecovery(e,t,n){let i=null,s=!1;for(let a=0;a ":"";if(o.deadEnd&&(s||(s=!0,o.restart(),B&&console.log(c+this.stackID(o)+" (restarted)"),this.advanceFully(o,n))))continue;let h=o.split(),p=c;for(let u=0;u<10&&h.forceReduce()&&(B&&console.log(p+this.stackID(h)+" (via force-reduce)"),!this.advanceFully(h,n));u++)B&&(p=this.stackID(h)+" -> ");for(let u of o.recoverByInsert(l))B&&console.log(c+this.stackID(u)+" (via recover-insert)"),this.advanceFully(u,n);this.stream.end>o.pos?(O==o.pos&&(O++,l=0),o.recoverByDelete(l,O),B&&console.log(c+this.stackID(o)+` (via recover-delete ${this.parser.getName(l)})`),ka(o,n)):(!i||i.scorer,et=class{constructor(e){this.start=e.start,this.shift=e.shift||wn,this.reduce=e.reduce||wn,this.reuse=e.reuse||wn,this.hash=e.hash||(()=>0),this.strict=e.strict!==!1}},Pe=class r extends Wt{constructor(e){if(super(),this.wrappers=[],e.version!=14)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let t=e.nodeNames.split(" ");this.minRepeatTerm=t.length;for(let o=0;oe.topRules[o][1]),i=[];for(let o=0;o=0)s(c,l,o[O++]);else{let h=o[O+-c];for(let p=-c;p>0;p--)s(o[O++],l,h);O++}}}this.nodeSet=new ut(t.map((o,l)=>Re.define({name:l>=this.minRepeatTerm?void 0:o,id:l,props:i[l],top:n.indexOf(l)>-1,error:l==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(l)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=1024;let a=kt(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let o=0;otypeof o=="number"?new Se(a,o):o),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,t,n){let i=new jn(this,e,t,n);for(let s of this.wrappers)i=s(i,e,t,n);return i}getGoto(e,t,n=!1){let i=this.goto;if(t>=i[0])return-1;for(let s=i[t+1];;){let a=i[s++],o=a&1,l=i[s++];if(o&&n)return l;for(let O=s+(a>>1);s0}validAction(e,t){return!!this.allActions(e,n=>n==t?!0:null)}allActions(e,t){let n=this.stateSlot(e,4),i=n?t(n):void 0;for(let s=this.stateSlot(e,1);i==null;s+=3){if(this.data[s]==65535)if(this.data[s+1]==1)s=pe(this.data,s+2);else break;i=t(pe(this.data,s+1))}return i}nextStates(e){let t=[];for(let n=this.stateSlot(e,1);;n+=3){if(this.data[n]==65535)if(this.data[n+1]==1)n=pe(this.data,n+2);else break;if((this.data[n+2]&1)==0){let i=this.data[n+1];t.some((s,a)=>a&1&&s==i)||t.push(this.data[n],i)}}return t}configure(e){let t=Object.assign(Object.create(r.prototype),this);if(e.props&&(t.nodeSet=this.nodeSet.extend(...e.props)),e.top){let n=this.topRules[e.top];if(!n)throw new RangeError(`Invalid top rule name ${e.top}`);t.top=n}return e.tokenizers&&(t.tokenizers=this.tokenizers.map(n=>{let i=e.tokenizers.find(s=>s.from==n);return i?i.to:n})),e.specializers&&(t.specializers=this.specializers.slice(),t.specializerSpecs=this.specializerSpecs.map((n,i)=>{let s=e.specializers.find(o=>o.from==n.external);if(!s)return n;let a=Object.assign(Object.assign({},n),{external:s.to});return t.specializers[i]=Pa(a),a})),e.contextTracker&&(t.context=e.contextTracker),e.dialect&&(t.dialect=this.parseDialect(e.dialect)),e.strict!=null&&(t.strict=e.strict),e.wrap&&(t.wrappers=t.wrappers.concat(e.wrap)),e.bufferLength!=null&&(t.bufferLength=e.bufferLength),t}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let t=this.dynamicPrecedences;return t==null?0:t[e]||0}parseDialect(e){let t=Object.keys(this.dialects),n=t.map(()=>!1);if(e)for(let s of e.split(" ")){let a=t.indexOf(s);a>=0&&(n[a]=!0)}let i=null;for(let s=0;sn)&&t.p.parser.stateFlag(t.state,2)&&(!e||e.scorer.external(t,n)<<1|e}return r.get}var DO=55,BO=1,NO=56,FO=2,HO=57,KO=3,wa=4,JO=5,An=6,_a=7,Ya=8,Ca=9,za=10,ec=11,tc=12,rc=13,Yn=58,nc=14,ic=15,ya=59,qa=21,sc=23,Aa=24,ac=25,zn=27,La=28,oc=29,lc=32,Oc=35,cc=37,hc=38,uc=0,pc=1,fc={area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},dc={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},Za={dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}};function mc(r){return r==45||r==46||r==58||r>=65&&r<=90||r==95||r>=97&&r<=122||r>=161}var Xa=null,va=null,Ta=0;function qn(r,e){let t=r.pos+e;if(Ta==t&&va==r)return Xa;let n=r.peek(e),i="";for(;mc(n);)i+=String.fromCharCode(n),n=r.peek(++e);return va=r,Ta=t,Xa=i?i.toLowerCase():n==gc||n==Qc?void 0:null}var Ea=60,ar=62,Ln=47,gc=63,Qc=33,$c=45;function Ra(r,e){this.name=r,this.parent=e}var bc=[An,za,_a,Ya,Ca],Sc=new et({start:null,shift(r,e,t,n){return bc.indexOf(e)>-1?new Ra(qn(n,1)||"",r):r},reduce(r,e){return e==qa&&r?r.parent:r},reuse(r,e,t,n){let i=e.type.id;return i==An||i==cc?new Ra(qn(n,1)||"",r):r},strict:!1}),kc=new z((r,e)=>{if(r.next!=Ea){r.next<0&&e.context&&r.acceptToken(Yn);return}r.advance();let t=r.next==Ln;t&&r.advance();let n=qn(r,0);if(n===void 0)return;if(!n)return r.acceptToken(t?ic:nc);let i=e.context?e.context.name:null;if(t){if(n==i)return r.acceptToken(ec);if(i&&dc[i])return r.acceptToken(Yn,-2);if(e.dialectEnabled(uc))return r.acceptToken(tc);for(let s=e.context;s;s=s.parent)if(s.name==n)return;r.acceptToken(rc)}else{if(n=="script")return r.acceptToken(_a);if(n=="style")return r.acceptToken(Ya);if(n=="textarea")return r.acceptToken(Ca);if(fc.hasOwnProperty(n))return r.acceptToken(za);i&&Za[i]&&Za[i][n]?r.acceptToken(Yn,-1):r.acceptToken(An)}},{contextual:!0}),Pc=new z(r=>{for(let e=0,t=0;;t++){if(r.next<0){t&&r.acceptToken(ya);break}if(r.next==$c)e++;else if(r.next==ar&&e>=2){t>=3&&r.acceptToken(ya,-2);break}else e=0;r.advance()}});function xc(r){for(;r;r=r.parent)if(r.name=="svg"||r.name=="math")return!0;return!1}var wc=new z((r,e)=>{if(r.next==Ln&&r.peek(1)==ar){let t=e.dialectEnabled(pc)||xc(e.context);r.acceptToken(t?JO:wa,2)}else r.next==ar&&r.acceptToken(wa,1)});function En(r,e,t){let n=2+r.length;return new z(i=>{for(let s=0,a=0,o=0;;o++){if(i.next<0){o&&i.acceptToken(e);break}if(s==0&&i.next==Ea||s==1&&i.next==Ln||s>=2&&sa?i.acceptToken(e,-a):i.acceptToken(t,-(a-2));break}else if((i.next==10||i.next==13)&&o){i.acceptToken(e,1);break}else s=a=0;i.advance()}})}var yc=En("script",DO,BO),Zc=En("style",NO,FO),Xc=En("textarea",HO,KO),vc=Oe({"Text RawText IncompleteTag IncompleteCloseTag":f.content,"StartTag StartCloseTag SelfClosingEndTag EndTag":f.angleBracket,TagName:f.tagName,"MismatchedCloseTag/TagName":[f.tagName,f.invalid],AttributeName:f.attributeName,"AttributeValue UnquotedAttributeValue":f.attributeValue,Is:f.definitionOperator,"EntityReference CharacterReference":f.character,Comment:f.blockComment,ProcessingInst:f.processingInstruction,DoctypeDecl:f.documentMeta}),Wa=Pe.deserialize({version:14,states:",xOVO!rOOO!ZQ#tO'#CrO!`Q#tO'#C{O!eQ#tO'#DOO!jQ#tO'#DRO!oQ#tO'#DTO!tOaO'#CqO#PObO'#CqO#[OdO'#CqO$kO!rO'#CqOOO`'#Cq'#CqO$rO$fO'#DUO$zQ#tO'#DWO%PQ#tO'#DXOOO`'#Dl'#DlOOO`'#DZ'#DZQVO!rOOO%UQ&rO,59^O%aQ&rO,59gO%lQ&rO,59jO%wQ&rO,59mO&SQ&rO,59oOOOa'#D_'#D_O&_OaO'#CyO&jOaO,59]OOOb'#D`'#D`O&rObO'#C|O&}ObO,59]OOOd'#Da'#DaO'VOdO'#DPO'bOdO,59]OOO`'#Db'#DbO'jO!rO,59]O'qQ#tO'#DSOOO`,59],59]OOOp'#Dc'#DcO'vO$fO,59pOOO`,59p,59pO(OQ#|O,59rO(TQ#|O,59sOOO`-E7X-E7XO(YQ&rO'#CtOOQW'#D['#D[O(hQ&rO1G.xOOOa1G.x1G.xOOO`1G/Z1G/ZO(sQ&rO1G/ROOOb1G/R1G/RO)OQ&rO1G/UOOOd1G/U1G/UO)ZQ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d!xO!c!wO!d!xO~Ob!uOc!uOd!uO!a!{O!b!uO~Ob!xOc!xOd!xO!c!{O!d!xO~OT~cbd!ey|!e~",goto:"%q!aPPPPPPPPPPPPPPPPPPPPP!b!hP!nPP!zP!}#Q#T#Z#^#a#g#j#m#s#y!bP!b!bP$P$V$m$s$y%P%V%]%cPPPPPPPP%iX^OX`pXUOX`pezabcde{!O!Q!S!UR!q!dRhUR!XhXVOX`pRkVR!XkXWOX`pRnWR!XnXXOX`pQrXR!XpXYOX`pQ`ORx`Q{aQ!ObQ!QcQ!SdQ!UeZ!e{!O!Q!S!UQ!v!oR!z!vQ!y!pR!|!yQgUR!VgQjVR!YjQmWR![mQpXR!^pQtZR!`tS_O`ToXp",nodeNames:"\u26A0 StartCloseTag StartCloseTag StartCloseTag EndTag SelfClosingEndTag StartTag StartTag StartTag StartTag StartTag StartCloseTag StartCloseTag StartCloseTag IncompleteTag IncompleteCloseTag Document Text EntityReference CharacterReference InvalidEntity Element OpenTag TagName Attribute AttributeName Is AttributeValue UnquotedAttributeValue ScriptText CloseTag OpenTag StyleText CloseTag OpenTag TextareaText CloseTag OpenTag CloseTag SelfClosingTag Comment ProcessingInst MismatchedCloseTag CloseTag DoctypeDecl",maxTerm:68,context:Sc,nodeProps:[["closedBy",-10,1,2,3,7,8,9,10,11,12,13,"EndTag",6,"EndTag SelfClosingEndTag",-4,22,31,34,37,"CloseTag"],["openedBy",4,"StartTag StartCloseTag",5,"StartTag",-4,30,33,36,38,"OpenTag"],["group",-10,14,15,18,19,20,21,40,41,42,43,"Entity",17,"Entity TextContent",-3,29,32,35,"TextContent Entity"],["isolate",-11,22,30,31,33,34,36,37,38,39,42,43,"ltr",-3,27,28,40,""]],propSources:[vc],skippedNodes:[0],repeatNodeCount:9,tokenData:"!]tw8twx7Sx!P8t!P!Q5u!Q!]8t!]!^/^!^!a7S!a#S8t#S#T;{#T#s8t#s$f5u$f;'S8t;'S;=`>V<%l?Ah8t?Ah?BY5u?BY?Mn8t?Mn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P;=`<%l!6Vq!7]V!dpOv!5kvx!6Vx!`!5k!`!a!7r!a;'S!5k;'S;=`!8V<%lO!5kq!7yS!dpyPOv(Vx;'S(V;'S;=`(h<%lO(Vq!8YP;=`<%l!5ka!8bX!b`Or!8]rs!6Vsv!8]vw!6Vw!a!8]!a!b!8}!b;'S!8];'S;=`!:V<%lO!8]a!9SX!b`Or!8]rs!6Vsv!8]vw!6Vw!`!8]!`!a!9o!a;'S!8];'S;=`!:V<%lO!8]a!9vT!b`yPOr)esv)ew;'S)e;'S;=`)y<%lO)ea!:YP;=`<%l!8]!R!:dY!b`!dpOr!4trs!5ksv!4tvw!6Vwx!8]x!`!4t!`!a!;S!a;'S!4t;'S;=`!;r<%lO!4t!R!;]V!b`!dpyPOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!;uP;=`<%l!4t!V!{let O=o.type.id;if(O==oc)return Cn(o,l,t);if(O==lc)return Cn(o,l,n);if(O==Oc)return Cn(o,l,i);if(O==qa&&s.length){let c=o.node,h=c.firstChild,p=h&&ja(h,l),u;if(p){for(let d of s)if(d.tag==p&&(!d.attrs||d.attrs(u||(u=Ma(h,l))))){let m=c.lastChild,g=m.type.id==hc?m.from:c.to;if(g>h.to)return{parser:d.parser,overlay:[{from:h.to,to:g}]}}}}if(a&&O==Aa){let c=o.node,h;if(h=c.firstChild){let p=a[l.read(h.from,h.to)];if(p)for(let u of p){if(u.tagName&&u.tagName!=ja(c.parent,l))continue;let d=c.lastChild;if(d.type.id==zn){let m=d.from+1,g=d.lastChild,b=d.to-(g&&g.isError?0:1);if(b>m)return{parser:u.parser,overlay:[{from:m,to:b}],bracketed:!0}}else if(d.type.id==La)return{parser:u.parser,overlay:[{from:d.from,to:d.to}]}}}}return null})}var Tc=148,Ua=1,Rc=149,jc=150,Ia=2,_c=151,Yc=3,Cc=4,zc=152,Da=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],qc=58,Ac=40,Ba=95,Lc=91,or=45,Ec=46,Wc=35,Mc=37,Uc=38,Vc=92,Gc=10,Ic=42;function Pt(r){return r>=65&&r<=90||r>=97&&r<=122||r>=161}function Mn(r){return r>=48&&r<=57}function Va(r){return Mn(r)||r>=97&&r<=102||r>=65&&r<=70}var Na=(r,e,t)=>(n,i)=>{for(let s=!1,a=0,o=0;;o++){let{next:l}=n;if(Pt(l)||l==or||l==Ba||s&&Mn(l))!s&&(l!=or||o>0)&&(s=!0),a===o&&l==or&&a++,n.advance();else if(l==Vc&&n.peek(1)!=Gc){if(n.advance(),Va(n.next)){do n.advance();while(Va(n.next));n.next==32&&n.advance()}else n.next>-1&&n.advance();s=!0}else{s&&n.acceptToken(a>=2&&i.canShift(Ia)?e:l==Ac?t:r);break}}},Dc=new z(Na(Rc,Ia,jc),{contextual:!0}),Bc=new z(Na(_c,Yc,Cc),{contextual:!0}),Nc=new z(r=>{if(Da.includes(r.peek(-1))){let{next:e}=r;(Pt(e)||e==Ba||e==Wc||e==Ec||e==Ic||e==Lc||e==qc&&Pt(r.peek(1))||e==or||e==Uc)&&r.acceptToken(Tc)}}),Fc=new z(r=>{if(!Da.includes(r.peek(-1))){let{next:e}=r;if(e==Mc&&(r.advance(),r.acceptToken(Ua)),Pt(e)){do r.advance();while(Pt(r.next)||Mn(r.next));r.acceptToken(Ua)}}});function Ga(r){let e=r.length;return(e==4||e==5||e==7||e==9)&&/^#[a-f\d]+$/i.test(r)?zc:-1}var Hc=Oe({"AtKeyword import charset namespace keyframes media supports font-feature-values":f.definitionKeyword,"from to selector scope MatchFlag":f.keyword,NamespaceName:f.namespace,KeyframeName:f.labelName,KeyframeRangeName:f.operatorKeyword,TagName:f.tagName,ClassName:f.className,PseudoClassName:f.constant(f.className),IdName:f.labelName,"FeatureName PropertyName":f.propertyName,AttributeName:f.attributeName,NumberLiteral:f.number,KeywordQuery:f.keyword,UnaryQueryOp:f.operatorKeyword,"CallTag ValueName FontName":f.atom,VariableName:f.variableName,Callee:f.operatorKeyword,Unit:f.unit,"UniversalSelector NestingSelector":f.definitionOperator,"MatchOp CompareOp":f.compareOperator,"ChildOp SiblingOp, LogicOp":f.logicOperator,BinOp:f.arithmeticOperator,Important:f.modifier,Comment:f.blockComment,ColorLiteral:f.color,"ParenthesizedContent StringLiteral":f.string,":":f.punctuation,PseudoOp:f.derefOperator,"; , |":f.separator,"( )":f.paren,"[ ]":f.squareBracket,"{ }":f.brace}),Kc={__proto__:null,lang:44,"nth-child":44,"nth-last-child":44,"nth-of-type":44,"nth-last-of-type":44,dir:44,"host-context":44,if:88,url:158,"url-prefix":158,domain:158,regexp:158},Jc={__proto__:null,or:102,and:102,not:112,only:112,layer:212},eh={__proto__:null,selector:118,style:124,layer:208},th={__proto__:null,"@import":204,"@media":216,"@charset":220,"@namespace":224,"@keyframes":230,"@supports":242,"@scope":246,"@font-feature-values":252},rh={__proto__:null,to:249},Fa=Pe.deserialize({version:14,states:"MrQYQdOOO$TQdOOP$[O`OOO%XQaO'#CfOOQP'#Ce'#CeO%`QdO'#CgO%eQ`O'#CgO%jQaO'#FrO&eQdO'#CkO'XQaO'#CcO'cQdO'#CnOOQP'#ES'#ESOOQP'#ER'#ERO'nQdO'#ETO'yQdO'#E[O'yQdO'#E_OOQP'#Fr'#FrO)`QhO'#FQOOQS'#Fq'#FqOOQS'#FT'#FTQYQdOOO)gQdO'#EeO*vQhO'#EkO)gQdO'#EmO*}QdO'#EoO+YQdO'#ErO*[QhO'#ExO+bQdO'#EzO+mQdO'#E}O+rQaO'#CfO+yQ`O'#EbO,OQ`O'#GPO,ZQdO'#GPQOQ`OOP,eO&jO'#CaPOOO)CAa)CAaOOQP'#Ci'#CiOOQP,59R,59RO%`QdO,59ROOQP'#Cm'#CmOOQP,59V,59VO&eQdO,59VO,pQdO,59YOOQP,5:m,5:mO'nQdO,5:oO'yQdO,5:vO'yQdO,5:xO'yQdO,5:yO'yQdO'#F[O,{Q`O,58}O-TQdO'#EaOOQS,58},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ynamicPrecedences:{97:1},specialized:[{term:172,get:(r,e)=>Ga(r)<<1,external:Ga},{term:150,get:r=>Kc[r]||-1},{term:151,get:r=>Jc[r]||-1},{term:4,get:r=>eh[r]||-1},{term:28,get:r=>th[r]||-1},{term:149,get:r=>rh[r]||-1}],tokenPrec:2433});var Un=null;function Vn(){if(!Un&&typeof document=="object"&&document.body){let{style:r}=document.body,e=[],t=new Set;for(let n in r)n!="cssText"&&n!="cssFloat"&&typeof r[n]=="string"&&(/[A-Z]/.test(n)&&(n=n.replace(/[A-Z]/g,i=>"-"+i.toLowerCase())),t.has(n)||(e.push(n),t.add(n)));Un=e.sort().map(n=>({type:"property",label:n,apply:n+": "}))}return Un||[]}var Ha=["active","after","any-link","autofill","backdrop","before","checked","cue","default","defined","disabled","empty","enabled","file-selector-button","first","first-child","first-letter","first-line","first-of-type","focus","focus-visible","focus-within","fullscreen","has","host","host-context","hover","in-range","indeterminate","invalid","is","lang","last-child","last-of-type","left","link","marker","modal","not","nth-child","nth-last-child","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","part","placeholder","placeholder-shown","read-only","read-write","required","right","root","scope","selection","slotted","target","target-text","valid","visited","where"].map(r=>({type:"class",label:r})),Ka=["above","absolute","activeborder","additive","activecaption","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","antialiased","appworkspace","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic-abegede-gez","ethiopic-halehame-aa-er","ethiopic-halehame-gez","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","graytext","grid","groove","hand","hard-light","help","hidden","hide","higher","highlight","highlighttext","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","justify","keep-all","landscape","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-hexadecimal","lower-latin","lower-norwegian","lowercase","ltr","luminosity","manipulation","match","matrix","matrix3d","medium","menu","menutext","message-box","middle","min-intrinsic","mix","monospace","move","multiple","multiple_mask_images","multiply","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","opacity","open-quote","optimizeLegibility","optimizeSpeed","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","text","text-bottom","text-top","textarea","textfield","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","to","top","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-latin","uppercase","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"].map(r=>({type:"keyword",label:r})).concat(["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"].map(r=>({type:"constant",label:r}))),nh=["a","abbr","address","article","aside","b","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","dd","del","details","dfn","dialog","div","dl","dt","em","figcaption","figure","footer","form","header","hgroup","h1","h2","h3","h4","h5","h6","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","main","meter","nav","ol","output","p","pre","ruby","section","select","small","source","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","tr","u","ul"].map(r=>({type:"type",label:r})),ih=["@charset","@color-profile","@container","@counter-style","@font-face","@font-feature-values","@font-palette-values","@import","@keyframes","@layer","@media","@namespace","@page","@position-try","@property","@scope","@starting-style","@supports","@view-transition"].map(r=>({type:"keyword",label:r})),fe=/^(\w[\w-]*|-\w[\w-]*|)$/,sh=/^-(-[\w-]*)?$/;function ah(r,e){var t;if((r.name=="("||r.type.isError)&&(r=r.parent||r),r.name!="ArgList")return!1;let n=(t=r.parent)===null||t===void 0?void 0:t.firstChild;return n?.name!="Callee"?!1:e.sliceString(n.from,n.to)=="var"}var Ja=new Et,oh=["Declaration"];function lh(r){for(let e=r;;){if(e.type.isTop)return e;if(!(e=e.parent))return r}}function eo(r,e,t){if(e.to-e.from>4096){let n=Ja.get(e);if(n)return n;let i=[],s=new Set,a=e.cursor(le.IncludeAnonymous);if(a.firstChild())do for(let o of eo(r,a.node,t))s.has(o.label)||(s.add(o.label),i.push(o));while(a.nextSibling());return Ja.set(e,i),i}else{let n=[],i=new Set;return e.cursor().iterate(s=>{var a;if(t(s)&&s.matchContext(oh)&&((a=s.node.nextSibling)===null||a===void 0?void 0:a.name)==":"){let o=r.sliceString(s.from,s.to);i.has(o)||(i.add(o),n.push({label:o,type:"variable"}))}}),n}}var Oh=r=>e=>{let{state:t,pos:n}=e,i=R(t).resolveInner(n,-1),s=i.type.isError&&i.from==i.to-1&&t.doc.sliceString(i.from,i.to)=="-";if(i.name=="PropertyName"||(s||i.name=="TagName")&&/^(Block|Styles)$/.test(i.resolve(i.to).name))return{from:i.from,options:Vn(),validFor:fe};if(i.name=="ValueName")return{from:i.from,options:Ka,validFor:fe};if(i.name=="PseudoClassName")return{from:i.from,options:Ha,validFor:fe};if(r(i)||(e.explicit||s)&&ah(i,t.doc))return{from:r(i)||s?i.from:n,options:eo(t.doc,lh(i),r),validFor:sh};if(i.name=="TagName"){for(let{parent:l}=i;l;l=l.parent)if(l.name=="Block")return{from:i.from,options:Vn(),validFor:fe};return{from:i.from,options:nh,validFor:fe}}if(i.name=="AtKeyword")return{from:i.from,options:ih,validFor:fe};if(!e.explicit)return null;let a=i.resolve(n),o=a.childBefore(n);return o&&o.name==":"&&a.name=="PseudoClassSelector"?{from:n,options:Ha,validFor:fe}:o&&o.name==":"&&a.name=="Declaration"||a.name=="ArgList"?{from:n,options:Ka,validFor:fe}:a.name=="Block"||a.name=="Styles"?{from:n,options:Vn(),validFor:fe}:null},ch=Oh(r=>r.name=="VariableName"),xt=Be.define({name:"css",parser:Fa.configure({props:[$e.add({Declaration:Ne()}),he.add({"Block KeyframeList":Gt})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"}},indentOnInput:/^\s*\}$/,wordChars:"-"}});function to(){return new ce(xt,xt.data.of({autocomplete:ch}))}var hh=317,uh=318,ro=1,ph=2,fh=3,dh=4,mh=319,gh=321,Qh=322,$h=5,bh=6,Sh=0,In=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],no=125,kh=59,Dn=47,Ph=42,xh=43,wh=45,yh=60,Zh=44,Xh=63,vh=46,Th=91,Rh=new et({start:!1,shift(r,e){return e==$h||e==bh||e==gh?r:e==Qh},strict:!1}),jh=new z((r,e)=>{let{next:t}=r;(t==no||t==-1||e.context)&&r.acceptToken(mh)},{contextual:!0,fallback:!0}),_h=new z((r,e)=>{let{next:t}=r,n;In.indexOf(t)>-1||t==Dn&&((n=r.peek(1))==Dn||n==Ph)||t!=no&&t!=kh&&t!=-1&&!e.context&&r.acceptToken(hh)},{contextual:!0}),Yh=new z((r,e)=>{r.next==Th&&!e.context&&r.acceptToken(uh)},{contextual:!0}),Ch=new z((r,e)=>{let{next:t}=r;if(t==xh||t==wh){if(r.advance(),t==r.next){r.advance();let n=!e.context&&e.canShift(ro);r.acceptToken(n?ro:ph)}}else t==Xh&&r.peek(1)==vh&&(r.advance(),r.advance(),(r.next<48||r.next>57)&&r.acceptToken(fh))},{contextual:!0});function Gn(r,e){return r>=65&&r<=90||r>=97&&r<=122||r==95||r>=192||!e&&r>=48&&r<=57}var zh=new z((r,e)=>{if(r.next!=yh||!e.dialectEnabled(Sh)||(r.advance(),r.next==Dn))return;let t=0;for(;In.indexOf(r.next)>-1;)r.advance(),t++;if(Gn(r.next,!0)){for(r.advance(),t++;Gn(r.next,!1);)r.advance(),t++;for(;In.indexOf(r.next)>-1;)r.advance(),t++;if(r.next==Zh)return;for(let n=0;;n++){if(n==7){if(!Gn(r.next,!0))return;break}if(r.next!="extends".charCodeAt(n))break;r.advance(),t++}}r.acceptToken(dh,-t)}),qh=Oe({"get set async static":f.modifier,"for while do if else switch try catch finally return throw break continue default case defer":f.controlKeyword,"in of await yield void typeof delete instanceof as satisfies":f.operatorKeyword,"let var const using function class extends":f.definitionKeyword,"import export from":f.moduleKeyword,"with debugger new":f.keyword,TemplateString:f.special(f.string),super:f.atom,BooleanLiteral:f.bool,this:f.self,null:f.null,Star:f.modifier,VariableName:f.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":f.function(f.variableName),VariableDefinition:f.definition(f.variableName),Label:f.labelName,PropertyName:f.propertyName,PrivatePropertyName:f.special(f.propertyName),"CallExpression/MemberExpression/PropertyName":f.function(f.propertyName),"FunctionDeclaration/VariableDefinition":f.function(f.definition(f.variableName)),"ClassDeclaration/VariableDefinition":f.definition(f.className),"NewExpression/VariableName":f.className,PropertyDefinition:f.definition(f.propertyName),PrivatePropertyDefinition:f.definition(f.special(f.propertyName)),UpdateOp:f.updateOperator,"LineComment Hashbang":f.lineComment,BlockComment:f.blockComment,Number:f.number,String:f.string,Escape:f.escape,ArithOp:f.arithmeticOperator,LogicOp:f.logicOperator,BitOp:f.bitwiseOperator,CompareOp:f.compareOperator,RegExp:f.regexp,Equals:f.definitionOperator,Arrow:f.function(f.punctuation),": Spread":f.punctuation,"( )":f.paren,"[ ]":f.squareBracket,"{ }":f.brace,"InterpolationStart InterpolationEnd":f.special(f.brace),".":f.derefOperator,", ;":f.separator,"@":f.meta,TypeName:f.typeName,TypeDefinition:f.definition(f.typeName),"type enum interface implements namespace module declare":f.definitionKeyword,"abstract global Privacy readonly override":f.modifier,"is keyof unique infer asserts":f.operatorKeyword,JSXAttributeValue:f.attributeValue,JSXText:f.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":f.angleBracket,"JSXIdentifier JSXNameSpacedName":f.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":f.attributeName,"JSXBuiltin/JSXIdentifier":f.standard(f.tagName)}),Ah={__proto__:null,export:20,as:25,from:33,default:36,async:41,function:42,in:52,out:55,const:56,extends:60,this:64,true:72,false:72,null:84,void:88,typeof:92,super:108,new:142,delete:154,yield:163,await:167,class:172,public:237,private:237,protected:237,readonly:239,instanceof:258,satisfies:261,import:294,keyof:351,unique:355,infer:361,asserts:397,is:399,abstract:419,implements:421,type:423,let:426,var:428,using:431,interface:437,enum:441,namespace:447,module:449,declare:453,global:457,defer:473,for:478,of:487,while:490,with:494,do:498,if:502,else:504,switch:508,case:514,try:520,catch:524,finally:528,return:532,throw:536,break:540,continue:544,debugger:548},Lh={__proto__:null,async:129,get:131,set:133,declare:195,public:197,private:197,protected:197,static:199,abstract:201,override:203,readonly:209,accessor:211,new:403},Eh={__proto__:null,"<":193},io=Pe.deserialize({version:14,states:"$GSQ%TQlOOO%[QlOOO'_QpOOP(lO`OOO*zQ!0MxO'#CiO+RO#tO'#CjO+aO&jO'#CjO+oO#@ItO'#DaO.QQlO'#DgO.bQlO'#DrO%[QlO'#DzO0fQlO'#ESOOQ!0Lf'#E['#E[O1PQ`O'#EXOOQO'#Ep'#EpOOQO'#Im'#ImO1XQ`O'#GtO1dQ`O'#EoO1iQ`O'#EoO3hQ!0MxO'#JsO6[Q!0MxO'#JtO6uQ`O'#F^O6zQ,UO'#FuOOQ!0Lf'#Fg'#FgO7VO7dO'#FgO9XQMhO'#F}O9`Q`O'#F|OOQ!0Lf'#Jt'#JtOOQ!0Lb'#Js'#JsO9eQ`O'#GxOOQ['#K`'#K`O9pQ`O'#IZO9uQ!0LrO'#I[OOQ['#Ja'#JaOOQ['#I`'#I`Q`QlOOQ`QlOOO9}Q!L^O'#DvO:UQlO'#EOO:]QlO'#EQO9kQ`O'#GtO:dQMhO'#CoO:rQ`O'#EnO:}Q`O'#EzO;hQMhO'#FfO;xQ`O'#GtOOQO'#Ka'#KaO;}Q`O'#KaO<]Q`O'#G|O<]Q`O'#G}O<]Q`O'#HPO9kQ`O'#HSO=SQ`O'#HVO>kQ`O'#CeO>{Q`O'#HdO?TQ`O'#HjO?TQ`O'#HlO`QlO'#HnO?TQ`O'#HpO?TQ`O'#HsO?YQ`O'#HyO?_Q!0LsO'#IPO%[QlO'#IRO?jQ!0LsO'#ITO?uQ!0LsO'#IVO9uQ!0LrO'#IXO@QQ!0MxO'#CiOASQpO'#DlQOQ`OOO%[QlO'#EQOAjQ`O'#ETO:dQMhO'#EnOAuQ`O'#EnOBQQ!bO'#FfOOQ['#Cg'#CgOOQ!0Lb'#Dq'#DqO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Q)f$dQ*]$xS*f${*ZQ*u%OQ*v%QQ+R%^Q+S%_Q+W%cQ.nQQ>O>YQ>P>ZQ>[>^R>]>_Q+P%]Q.pTR#[WR'Z!el!tQ!r!v!y!z'a'm'n'o-g-w1q5}6PS'V!e-^U*k$|*[*pS-Z'W'`S0W*l*rQ0`*sQ2w-eQ4x0^R4}0aR(|#xQ!fQT-f'a-g]!qQ!r'a-g1q5}Q#p]R'j < TypeParamList in out const TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewTarget new NewExpression ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression TypeArgList CompareOp < declare Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty VariableDefinition Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression InstantiationExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast < ArrowFunction TypeParamList SequenceExpression InstantiationExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate asserts is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var using TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration defer ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement SingleExpression SingleClassItem",maxTerm:381,context:Rh,nodeProps:[["isolate",-8,5,6,14,37,39,51,53,55,""],["group",-26,9,17,19,68,208,212,216,217,219,222,225,235,238,244,246,248,250,253,259,265,267,269,271,273,275,276,"Statement",-34,13,14,32,35,36,42,51,54,55,57,62,70,72,76,80,82,84,85,110,111,121,122,137,140,142,143,144,145,146,148,149,168,170,172,"Expression",-23,31,33,37,41,43,45,174,176,178,179,181,182,183,185,186,187,189,190,191,202,204,206,207,"Type",-3,88,103,109,"ClassItem"],["openedBy",23,"<",38,"InterpolationStart",56,"[",60,"{",73,"(",161,"JSXStartCloseTag"],["closedBy",-2,24,169,">",40,"InterpolationEnd",50,"]",61,"}",74,")",166,"JSXEndTag"]],propSources:[qh],skippedNodes:[0,5,6,279],repeatNodeCount:37,tokenData:"$Fq07[R!bOX%ZXY+gYZ-yZ[+g[]%Z]^.c^p%Zpq+gqr/mrs3cst:_tuEruvJSvwLkwx! Yxy!'iyz!(sz{!)}{|!,q|}!.O}!O!,q!O!P!/Y!P!Q!9j!Q!R#:O!R![#<_![!]#I_!]!^#Jk!^!_#Ku!_!`$![!`!a$$v!a!b$*T!b!c$,r!c!}Er!}#O$-|#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~~!XS!Q![!e!c!i!e#T#Z!e#o#p#Z~!hR!Q![!q!c!i!q#T#Z!q~!tR!Q![!}!c!i!}#T#Z!}~#QR!Q![!P!c!i!P#T#Z!P~#^R!Q![#g!c!i#g#T#Z#g~#jS!Q![#g!c!i#g#T#Z#g#q#r!P~#yP;=`<%l!P~$RO(d~~",141,341),new ke("j~RQYZXz{^~^O(R~~aP!P!Qd~iO(S~~",25,324)],topRules:{Script:[0,7],SingleExpression:[1,277],SingleClassItem:[2,278]},dialects:{jsx:0,ts:15179},dynamicPrecedences:{80:1,82:1,94:1,170:1,200:1},specialized:[{term:328,get:r=>Ah[r]||-1},{term:344,get:r=>Lh[r]||-1},{term:95,get:r=>Eh[r]||-1}],tokenPrec:15205});var lo=[L("function ${name}(${params}) {\n ${}\n}",{label:"function",detail:"definition",type:"keyword"}),L("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}",{label:"for",detail:"loop",type:"keyword"}),L("for (let ${name} of ${collection}) {\n ${}\n}",{label:"for",detail:"of loop",type:"keyword"}),L("do {\n ${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),L("while (${}) {\n ${}\n}",{label:"while",detail:"loop",type:"keyword"}),L(`try { \${} } catch (\${error}) { \${} @@ -15,26 +15,26 @@ import{$ as R,A as Xe,B as X,C as ve,D as Ni,E as Fi,F as Hi,G as jr,H as _r,I a constructor(\${params}) { \${} } -}`,{label:"class",detail:"definition",type:"keyword"}),L('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),L('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],Ah=ao.concat([L("interface ${name} {\n ${}\n}",{label:"interface",detail:"definition",type:"keyword"}),L("type ${name} = ${type}",{label:"type",detail:"definition",type:"keyword"}),L("enum ${name} {\n ${}\n}",{label:"enum",detail:"definition",type:"keyword"})]),no=new Lt,oo=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function xt(r){return(e,t)=>{let n=e.node.getChild("VariableDefinition");return n&&t(n,r),!0}}var Lh=["FunctionDeclaration"],Eh={FunctionDeclaration:xt("function"),ClassDeclaration:xt("class"),ClassExpression:()=>!0,EnumDeclaration:xt("constant"),TypeAliasDeclaration:xt("type"),NamespaceDeclaration:xt("namespace"),VariableDefinition(r,e){r.matchContext(Lh)||e(r,"variable")},TypeDefinition(r,e){e(r,"type")},__proto__:null};function lo(r,e){let t=no.get(e);if(t)return t;let n=[],i=!0;function s(a,o){let l=r.sliceString(a.from,a.to);n.push({label:l,type:o})}return e.cursor(le.IncludeAnonymous).iterate(a=>{if(i)i=!1;else if(a.name){let o=Eh[a.name];if(o&&o(a,s)||oo.has(a.name))return!1}else if(a.to-a.from>8192){for(let o of lo(r,a.node))n.push(o);return!1}}),no.set(e,n),n}var io=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,Oo=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName","JSXText","JSXAttributeValue","JSXOpenTag","JSXCloseTag","JSXSelfClosingTag",".","?."];function Wh(r){let e=R(r.state).resolveInner(r.pos,-1);if(Oo.indexOf(e.name)>-1)return null;let t=e.name=="VariableName"||e.to-e.from<20&&io.test(r.state.sliceDoc(e.from,e.to));if(!t&&!r.explicit)return null;let n=[];for(let i=e;i;i=i.parent)oo.has(i.name)&&(n=n.concat(lo(r.state.doc,i)));return{options:n,from:t?e.from:r.pos,validFor:io}}var te=De.define({name:"javascript",parser:ro.configure({props:[$e.add({IfStatement:Be({except:/^\s*({|else\b)/}),TryStatement:Be({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:as,SwitchBody:r=>{let e=r.textAfter,t=/^\s*\}/.test(e),n=/^\s*(case|default)\b/.test(e);return r.baseIndent+(t?0:n?1:2)*r.unit},Block:ss({closing:"}"}),ArrowFunction:r=>r.baseIndent+r.unit,"TemplateString BlockComment":()=>null,"Statement Property":Be({except:/^\s*{/}),JSXElement(r){let e=/^\s*<\//.test(r.textAfter);return r.lineIndent(r.node.from)+(e?0:r.unit)},JSXEscape(r){let e=/\s*\}/.test(r.textAfter);return r.lineIndent(r.node.from)+(e?0:r.unit)},"JSXOpenTag JSXSelfClosingTag"(r){return r.column(r.node.from)+r.unit}}),he.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":Vt,BlockComment(r){return{from:r.from+2,to:r.to-2}},JSXElement(r){let e=r.firstChild;if(!e||e.name=="JSXSelfClosingTag")return null;let t=r.lastChild;return{from:e.to,to:t.type.isError?r.to:t.from}},"JSXSelfClosingTag JSXOpenTag"(r){var e;let t=(e=r.firstChild)===null||e===void 0?void 0:e.nextSibling,n=r.lastChild;return!t||t.type.isError?null:{from:t.to,to:n.type.isError?r.to:n.from}}})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),co={test:r=>/^JSX/.test(r.name),facet:Mt({commentTokens:{block:{open:"{/*",close:"*/}"}}})},Gn=te.configure({dialect:"ts"},"typescript"),In=te.configure({dialect:"jsx",props:[Yr.add(r=>r.isTop?[co]:void 0)]}),Dn=te.configure({dialect:"jsx ts",props:[Yr.add(r=>r.isTop?[co]:void 0)]},"typescript"),ho=r=>({label:r,type:"keyword"}),uo="break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ").map(ho),Mh=uo.concat(["declare","implements","private","protected","public"].map(ho));function po(r={}){let e=r.jsx?r.typescript?Dn:In:r.typescript?Gn:te,t=r.typescript?Ah.concat(Mh):ao.concat(uo);return new ce(e,[te.data.of({autocomplete:Ps(Oo,Br(t))}),te.data.of({autocomplete:Wh}),r.jsx?Gh:[]])}function Uh(r){for(;;){if(r.name=="JSXOpenTag"||r.name=="JSXSelfClosingTag"||r.name=="JSXFragmentTag")return r;if(r.name=="JSXEscape"||!r.parent)return null;r=r.parent}}function so(r,e,t=r.length){for(let n=e?.firstChild;n;n=n.nextSibling)if(n.name=="JSXIdentifier"||n.name=="JSXBuiltin"||n.name=="JSXNamespacedName"||n.name=="JSXMemberExpression")return r.sliceString(n.from,Math.min(n.to,t));return""}var Vh=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),Gh=X.inputHandler.of((r,e,t,n,i)=>{if((Vh?r.composing:r.compositionStarted)||r.state.readOnly||e!=t||n!=">"&&n!="/"||!te.isActiveAt(r.state,e,-1))return!1;let s=i(),{state:a}=s,o=a.changeByRange(l=>{var O;let{head:c}=l,h=R(a).resolveInner(c-1,-1),p;if(h.name=="JSXStartTag"&&(h=h.parent),!(a.doc.sliceString(c-1,c)!=n||h.name=="JSXAttributeValue"&&h.to>c)){if(n==">"&&h.name=="JSXFragmentTag")return{range:l,changes:{from:c,insert:""}};if(n=="/"&&h.name=="JSXStartCloseTag"){let u=h.parent,d=u.parent;if(d&&u.from==c-2&&((p=so(a.doc,d.firstChild,c))||((O=d.firstChild)===null||O===void 0?void 0:O.name)=="JSXFragmentTag")){let m=`${p}>`;return{range:Z.cursor(c+m.length,-1),changes:{from:c,insert:m}}}}else if(n==">"){let u=Uh(h);if(u&&u.name=="JSXOpenTag"&&!/^\/?>|^<\//.test(a.doc.sliceString(c,c+2))&&(p=so(a.doc,u,c)))return{range:l,changes:{from:c,insert:``}}}}return{range:l}});return o.changes.empty?!1:(r.dispatch([s,a.update(o,{userEvent:"input.complete",scrollIntoView:!0})]),!0)});var wt=["_blank","_self","_top","_parent"],Bn=["ascii","utf-8","utf-16","latin1","latin1"],Nn=["get","post","put","delete"],Fn=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],N=["true","false"],S={},Ih={a:{attrs:{href:null,ping:null,type:null,media:null,target:wt,hreflang:null}},abbr:S,address:S,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:null,hreflang:null,type:null,shape:["default","rect","circle","poly"]}},article:S,aside:S,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["autoplay"],loop:["loop"],controls:["controls"]}},b:S,base:{attrs:{href:null,target:wt}},bdi:S,bdo:S,blockquote:{attrs:{cite:null}},body:S,br:S,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["autofocus"],disabled:["autofocus"],formenctype:Fn,formmethod:Nn,formnovalidate:["novalidate"],formtarget:wt,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:S,center:S,cite:S,code:S,col:{attrs:{span:null}},colgroup:{attrs:{span:null}},command:{attrs:{type:["command","checkbox","radio"],label:null,icon:null,radiogroup:null,command:null,title:null,disabled:["disabled"],checked:["checked"]}},data:{attrs:{value:null}},datagrid:{attrs:{disabled:["disabled"],multiple:["multiple"]}},datalist:{attrs:{data:null}},dd:S,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["open"]}},dfn:S,div:S,dl:S,dt:S,em:S,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["disabled"],form:null,name:null}},figcaption:S,figure:S,footer:S,form:{attrs:{action:null,name:null,"accept-charset":Bn,autocomplete:["on","off"],enctype:Fn,method:Nn,novalidate:["novalidate"],target:wt}},h1:S,h2:S,h3:S,h4:S,h5:S,h6:S,head:{children:["title","base","link","style","meta","script","noscript","command"]},header:S,hgroup:S,hr:S,html:{attrs:{manifest:null}},i:S,iframe:{attrs:{src:null,srcdoc:null,name:null,width:null,height:null,sandbox:["allow-top-navigation","allow-same-origin","allow-forms","allow-scripts"],seamless:["seamless"]}},img:{attrs:{alt:null,src:null,ismap:null,usemap:null,width:null,height:null,crossorigin:["anonymous","use-credentials"]}},input:{attrs:{alt:null,dirname:null,form:null,formaction:null,height:null,list:null,max:null,maxlength:null,min:null,name:null,pattern:null,placeholder:null,size:null,src:null,step:null,value:null,width:null,accept:["audio/*","video/*","image/*"],autocomplete:["on","off"],autofocus:["autofocus"],checked:["checked"],disabled:["disabled"],formenctype:Fn,formmethod:Nn,formnovalidate:["novalidate"],formtarget:wt,multiple:["multiple"],readonly:["readonly"],required:["required"],type:["hidden","text","search","tel","url","email","password","datetime","date","month","week","time","datetime-local","number","range","color","checkbox","radio","file","submit","image","reset","button"]}},ins:{attrs:{cite:null,datetime:null}},kbd:S,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["autofocus"],disabled:["disabled"],keytype:["RSA"]}},label:{attrs:{for:null,form:null}},legend:S,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:null,media:null,sizes:["all","16x16","16x16 32x32","16x16 32x32 64x64"]}},map:{attrs:{name:null}},mark:S,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:Bn,name:["viewport","application-name","author","description","generator","keywords"],"http-equiv":["content-language","content-type","default-style","refresh"]}},meter:{attrs:{value:null,min:null,low:null,high:null,max:null,optimum:null}},nav:S,noscript:S,object:{attrs:{data:null,type:null,name:null,usemap:null,form:null,width:null,height:null,typemustmatch:["typemustmatch"]}},ol:{attrs:{reversed:["reversed"],start:null,type:["1","a","A","i","I"]},children:["li","script","template","ul","ol"]},optgroup:{attrs:{disabled:["disabled"],label:null}},option:{attrs:{disabled:["disabled"],label:null,selected:["selected"],value:null}},output:{attrs:{for:null,form:null,name:null}},p:S,param:{attrs:{name:null,value:null}},pre:S,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:S,rt:S,ruby:S,samp:S,script:{attrs:{type:["text/javascript"],src:null,async:["async"],defer:["defer"],charset:Bn}},section:S,select:{attrs:{form:null,name:null,size:null,autofocus:["autofocus"],disabled:["disabled"],multiple:["multiple"]}},slot:{attrs:{name:null}},small:S,source:{attrs:{src:null,type:null,media:null}},span:S,strong:S,style:{attrs:{type:["text/css"],media:null,scoped:null}},sub:S,summary:S,sup:S,table:S,tbody:S,td:{attrs:{colspan:null,rowspan:null,headers:null}},template:S,textarea:{attrs:{dirname:null,form:null,maxlength:null,name:null,placeholder:null,rows:null,cols:null,autofocus:["autofocus"],disabled:["disabled"],readonly:["readonly"],required:["required"],wrap:["soft","hard"]}},tfoot:S,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:["row","col","rowgroup","colgroup"]}},thead:S,time:{attrs:{datetime:null}},title:S,tr:S,track:{attrs:{src:null,label:null,default:null,kind:["subtitles","captions","descriptions","chapters","metadata"],srclang:null}},ul:{children:["li","script","template","ul","ol"]},var:S,video:{attrs:{src:null,poster:null,width:null,height:null,crossorigin:["anonymous","use-credentials"],preload:["auto","metadata","none"],autoplay:["autoplay"],mediagroup:["movie"],muted:["muted"],controls:["controls"]}},wbr:S},Qo={accesskey:null,class:null,contenteditable:N,contextmenu:null,dir:["ltr","rtl","auto"],draggable:["true","false","auto"],dropzone:["copy","move","link","string:","file:"],hidden:["hidden"],id:null,inert:["inert"],itemid:null,itemprop:null,itemref:null,itemscope:["itemscope"],itemtype:null,lang:["ar","bn","de","en-GB","en-US","es","fr","hi","id","ja","pa","pt","ru","tr","zh"],spellcheck:N,autocorrect:N,autocapitalize:N,style:null,tabindex:null,title:null,translate:["yes","no"],rel:["stylesheet","alternate","author","bookmark","help","license","next","nofollow","noreferrer","prefetch","prev","search","tag"],role:"alert application article banner button cell checkbox complementary contentinfo dialog document feed figure form grid gridcell heading img list listbox listitem main navigation region row rowgroup search switch tab table tabpanel textbox timer".split(" "),"aria-activedescendant":null,"aria-atomic":N,"aria-autocomplete":["inline","list","both","none"],"aria-busy":N,"aria-checked":["true","false","mixed","undefined"],"aria-controls":null,"aria-describedby":null,"aria-disabled":N,"aria-dropeffect":null,"aria-expanded":["true","false","undefined"],"aria-flowto":null,"aria-grabbed":["true","false","undefined"],"aria-haspopup":N,"aria-hidden":N,"aria-invalid":["true","false","grammar","spelling"],"aria-label":null,"aria-labelledby":null,"aria-level":null,"aria-live":["off","polite","assertive"],"aria-multiline":N,"aria-multiselectable":N,"aria-owns":null,"aria-posinset":null,"aria-pressed":["true","false","mixed","undefined"],"aria-readonly":N,"aria-relevant":null,"aria-required":N,"aria-selected":["true","false","undefined"],"aria-setsize":null,"aria-sort":["ascending","descending","none","other"],"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null},$o="beforeunload copy cut dragstart dragover dragleave dragenter dragend drag paste focus blur change click load mousedown mouseenter mouseleave mouseup keydown keyup resize scroll unload".split(" ").map(r=>"on"+r);for(let r of $o)Qo[r]=null;var ze=class{constructor(e,t){this.tags={...Ih,...e},this.globalAttrs={...Qo,...t},this.allTags=Object.keys(this.tags),this.globalAttrNames=Object.keys(this.globalAttrs)}};ze.default=new ze;function qe(r,e,t=r.length){if(!e)return"";let n=e.firstChild,i=n&&n.getChild("TagName");return i?r.sliceString(i.from,Math.min(i.to,t)):""}function et(r,e=!1){for(;r;r=r.parent)if(r.name=="Element")if(e)e=!1;else return r;return null}function bo(r,e,t){let n=t.tags[qe(r,et(e))];return n?.children||t.allTags}function Hn(r,e){let t=[];for(let n=et(e);n&&!n.type.isTop;n=et(n.parent)){let i=qe(r,n);if(i&&n.lastChild.name=="CloseTag")break;i&&t.indexOf(i)<0&&(e.name=="EndTag"||e.from>=n.firstChild.to)&&t.push(i)}return t}var So=/^[:\-\.\w\u00b7-\uffff]*$/;function fo(r,e,t,n,i){let s=/\s*>/.test(r.sliceDoc(i,i+5))?"":">",a=et(t,t.name=="StartTag"||t.name=="TagName");return{from:n,to:i,options:bo(r.doc,a,e).map(o=>({label:o,type:"type"})).concat(Hn(r.doc,t).map((o,l)=>({label:"/"+o,apply:"/"+o+s,type:"type",boost:99-l}))),validFor:/^\/?[:\-\.\w\u00b7-\uffff]*$/}}function mo(r,e,t,n){let i=/\s*>/.test(r.sliceDoc(n,n+5))?"":">";return{from:t,to:n,options:Hn(r.doc,e).map((s,a)=>({label:s,apply:s+i,type:"type",boost:99-a})),validFor:So}}function Dh(r,e,t,n){let i=[],s=0;for(let a of bo(r.doc,t,e))i.push({label:"<"+a,type:"type"});for(let a of Hn(r.doc,t))i.push({label:"",type:"type",boost:99-s++});return{from:n,to:n,options:i,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}function Bh(r,e,t,n,i){let s=et(t),a=s?e.tags[qe(r.doc,s)]:null,o=a&&a.attrs?Object.keys(a.attrs):[],l=a&&a.globalAttrs===!1?o:o.length?o.concat(e.globalAttrNames):e.globalAttrNames;return{from:n,to:i,options:l.map(O=>({label:O,type:"property"})),validFor:So}}function Nh(r,e,t,n,i){var s;let a=(s=t.parent)===null||s===void 0?void 0:s.getChild("AttributeName"),o=[],l;if(a){let O=r.sliceDoc(a.from,a.to),c=e.globalAttrs[O];if(!c){let h=et(t),p=h?e.tags[qe(r.doc,h)]:null;c=p?.attrs&&p.attrs[O]}if(c){let h=r.sliceDoc(n,i).toLowerCase(),p='"',u='"';/^['"]/.test(h)?(l=h[0]=='"'?/^[^"]*$/:/^[^']*$/,p="",u=r.sliceDoc(i,i+1)==h[0]?"":h[0],h=h.slice(1),n++):l=/^[^\s<>='"]*$/;for(let d of c)o.push({label:d,apply:p+d+u,type:"constant"})}}return{from:n,to:i,options:o,validFor:l}}function ko(r,e){let{state:t,pos:n}=e,i=R(t).resolveInner(n,-1),s=i.resolve(n);for(let a=n,o;s==i&&(o=i.childBefore(a));){let l=o.lastChild;if(!l||!l.type.isError||l.fromko(n,i)}var Hh=te.parser.configure({top:"SingleExpression"}),xo=[{tag:"script",attrs:r=>r.type=="text/typescript"||r.lang=="ts",parser:Gn.parser},{tag:"script",attrs:r=>r.type=="text/babel"||r.type=="text/jsx",parser:In.parser},{tag:"script",attrs:r=>r.type=="text/typescript-jsx",parser:Dn.parser},{tag:"script",attrs(r){return/^(importmap|speculationrules|application\/(.+\+)?json)$/i.test(r.type)},parser:Hh},{tag:"script",attrs(r){return!r.type||/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(r.type)},parser:te.parser},{tag:"style",attrs(r){return(!r.lang||r.lang=="css")&&(!r.type||/^(text\/)?(x-)?(stylesheet|css)$/i.test(r.type))},parser:Pt.parser}],wo=[{name:"style",parser:Pt.parser.configure({top:"Styles"})}].concat($o.map(r=>({name:r,parser:te.parser}))),yo=De.define({name:"html",parser:La.configure({props:[$e.add({Element(r){let e=/^(\s*)(<\/)?/.exec(r.textAfter);return r.node.to<=r.pos+e[0].length?r.continue():r.lineIndent(r.node.from)+(e[2]?0:r.unit)},"OpenTag CloseTag SelfClosingTag"(r){return r.column(r.node.from)+r.unit},Document(r){if(r.pos+/\s*/.exec(r.textAfter)[0].lengthr.getChild("TagName")})]}),languageData:{commentTokens:{block:{open:""}},indentOnInput:/^\s*<\/\w+\W$/,wordChars:"-_"}}),or=yo.configure({wrap:An(xo,wo)});function Zo(r={}){let e="",t;r.matchClosingTags===!1&&(e="noMatch"),r.selfClosingTags===!0&&(e=(e?e+" ":"")+"selfClosing"),(r.nestedLanguages&&r.nestedLanguages.length||r.nestedAttributes&&r.nestedAttributes.length)&&(t=An((r.nestedLanguages||[]).concat(xo),(r.nestedAttributes||[]).concat(wo)));let n=t?yo.configure({wrap:t,dialect:e}):e?or.configure({dialect:e}):or;return new ce(n,[or.data.of({autocomplete:Fh(r)}),r.autoCloseTags!==!1?Jh:[],po().support,Ja().support])}var go=new Set("area base br col command embed frame hr img input keygen link meta param source track wbr menuitem".split(" "));function Kh(r,e,t){for(var n;;){if(((n=e.lastChild)===null||n===void 0?void 0:n.name)!="CloseTag")return!1;let i=e.parent;if(!i||qe(r,i)!=t)return!0;e=i}}var Jh=X.inputHandler.of((r,e,t,n,i)=>{if(r.composing||r.state.readOnly||e!=t||n!=">"&&n!="/"||!or.isActiveAt(r.state,e,-1))return!1;let s=i(),{state:a}=s,o=a.changeByRange(l=>{var O;let c=a.doc.sliceString(l.from-1,l.to)==n,{head:h}=l,p=R(a).resolveInner(h,-1),u;if(c&&n==">"&&p.name=="EndTag"){let d=p.parent;if((u=qe(a.doc,d.parent,h))&&!go.has(u)&&!Kh(a.doc,d.parent,u)){let m=h+(a.doc.sliceString(h,h+1)===">"?1:0),g=``;return{range:l,changes:{from:h,to:m,insert:g}}}}else if(c&&n=="/"&&p.name=="IncompleteCloseTag"){let d=p.parent;if(p.from==h-2&&((O=d.lastChild)===null||O===void 0?void 0:O.name)!="CloseTag"&&(u=qe(a.doc,d,h))&&!go.has(u)){let m=h+(a.doc.sliceString(h,h+1)===">"?1:0),g=`${u}>`;return{range:Z.cursor(h+g.length,-1),changes:{from:h,to:m,insert:g}}}}return{range:l}});return o.changes.empty?!1:(r.dispatch([s,a.update(o,{userEvent:"input.complete",scrollIntoView:!0})]),!0)});var To=Mt({commentTokens:{block:{open:""}}}),Ro=new K,jo=Oa.configure({props:[he.add(r=>!r.is("Block")||r.is("Document")||ei(r)!=null||eu(r)?void 0:(e,t)=>({from:t.doc.lineAt(e.from).to,to:e.to})),Ro.add(ei),$e.add({Document:()=>null}),rs.add({Document:To})]});function ei(r){let e=/^(?:ATX|Setext)Heading(\d)$/.exec(r.name);return e?+e[1]:void 0}function eu(r){return r.name=="OrderedList"||r.name=="BulletList"}function tu(r,e){let t=r;for(;;){let n=t.nextSibling,i;if(!n||(i=ei(n.type))!=null&&i<=e)break;t=n}return t.to}var ru=os.of((r,e,t)=>{for(let n=R(r).resolveInner(t,-1);n&&!(n.fromt)return{from:t,to:s}}return null});function ti(r){return new ns(To,r,[],"markdown")}var nu=ti(jo),iu=jo.configure([ua,da,fa,ma,{props:[he.add({Table:(r,e)=>({from:e.doc.lineAt(r.from).to,to:r.to})})]}]),tt=ti(iu);function su(r,e){return t=>{if(t&&r){let n=null;if(t=/\S*/.exec(t)[0],typeof r=="function"?n=r(t):n=Cr.matchLanguageName(r,t,!0),n instanceof Cr)return n.support?n.support.language.parser:is.getSkippingParser(n.load());if(n)return n.parser}return e?e.parser:null}}var yt=class{constructor(e,t,n,i,s,a,o){this.node=e,this.from=t,this.to=n,this.spaceBefore=i,this.spaceAfter=s,this.type=a,this.item=o}blank(e,t=!0){let n=this.spaceBefore+(this.node.name=="Blockquote"?">":"");if(e!=null){for(;n.length0;i--)n+=" ";return n+(t?this.spaceAfter:"")}}marker(e,t){let n=this.node.name=="OrderedList"?String(+Yo(this.item,e)[2]+t):"";return this.spaceBefore+n+this.type+this.spaceAfter}};function _o(r,e){let t=[],n=[];for(let i=r;i;i=i.parent){if(i.name=="FencedCode")return n;(i.name=="ListItem"||i.name=="Blockquote")&&t.push(i)}for(let i=t.length-1;i>=0;i--){let s=t[i],a,o=e.lineAt(s.from),l=s.from-o.from;if(s.name=="Blockquote"&&(a=/^ *>( ?)/.exec(o.text.slice(l))))n.push(new yt(s,l,l+a[0].length,"",a[1],">",null));else if(s.name=="ListItem"&&s.parent.name=="OrderedList"&&(a=/^( *)\d+([.)])( *)/.exec(o.text.slice(l)))){let O=a[3],c=a[0].length;O.length>=4&&(O=O.slice(0,O.length-4),c-=4),n.push(new yt(s.parent,l,l+c,a[1],O,a[2],s))}else if(s.name=="ListItem"&&s.parent.name=="BulletList"&&(a=/^( *)([-+*])( {1,4}\[[ xX]\])?( +)/.exec(o.text.slice(l)))){let O=a[4],c=a[0].length;O.length>4&&(O=O.slice(0,O.length-4),c-=4);let h=a[2];a[3]&&(h+=a[3].replace(/[xX]/," ")),n.push(new yt(s.parent,l,l+c,a[1],O,h,s))}}return n}function Yo(r,e){return/^(\s*)(\d+)(?=[.)])/.exec(e.sliceString(r.from,r.from+10))}function Kn(r,e,t,n=0){for(let i=-1,s=r;;){if(s.name=="ListItem"){let o=Yo(s,e),l=+o[2];if(i>=0){if(l!=i+1)return;t.push({from:s.from+o[1].length,to:s.from+o[0].length,insert:String(i+2+n)})}i=l}let a=s.nextSibling;if(!a)break;s=a}}function ri(r,e){let t=/^[ \t]*/.exec(r)[0].length;if(!t||e.facet(Ut)!=" ")return r;let n=Ie(r,4,t),i="";for(let s=n;s>0;)s>=4?(i+=" ",s-=4):(i+=" ",s--);return i+r.slice(t)}var au=(r={})=>({state:e,dispatch:t})=>{let n=R(e),{doc:i}=e,s=null,a=e.changeByRange(o=>{if(!o.empty||!tt.isActiveAt(e,o.from,-1)&&!tt.isActiveAt(e,o.from,1))return s={range:o};let l=o.from,O=i.lineAt(l),c=_o(n.resolveInner(l,-1),i);for(;c.length&&c[c.length-1].from>l-O.from;)c.pop();if(!c.length)return s={range:o};let h=c[c.length-1];if(h.to-h.spaceAfter.length>l-O.from)return s={range:o};let p=l>=h.to-h.spaceAfter.length&&!/\S/.test(O.text.slice(h.to));if(h.item&&p){if(h.item.from]*$/.test(O.text.slice(0,h.to)))return s={range:o};let b=h.node.firstChild,Q=h.node.getChild("ListItem","ListItem");if(b.to>=l||Q&&Q.to0&&!/[^\s>]/.test(i.lineAt(O.from-1).text)||r.nonTightLists===!1){let k=c.length>1?c[c.length-2]:null,y,w="";k&&k.item?(y=O.from+k.from,w=k.marker(i,1)):y=O.from+(k?k.to:0);let _=[{from:y,to:l,insert:w}];return h.node.name=="OrderedList"&&Kn(h.item,i,_,-2),k&&k.node.name=="OrderedList"&&Kn(k.item,i,_),{range:Z.cursor(y+w.length),changes:_}}else{let k=vo(c,e,O);return{range:Z.cursor(l+k.length+1),changes:{from:O.from,insert:k+e.lineBreak}}}}if(h.node.name=="Blockquote"&&p&&O.from){let b=i.lineAt(O.from-1),Q=/>\s*$/.exec(b.text);if(Q&&Q.index==h.from){let k=e.changes([{from:b.from+Q.index,to:b.to},{from:O.from+h.from,to:O.to}]);return{range:o.map(k),changes:k}}}let u=[];h.node.name=="OrderedList"&&Kn(h.item,i,u);let d=h.item&&h.item.from]*/.exec(O.text)[0].length>=h.to)for(let b=0,Q=c.length-1;b<=Q;b++)m+=b==Q&&!d?c[b].marker(i,1):c[b].blank(bO.from&&/\s/.test(O.text.charAt(g-O.from-1));)g--;return m=ri(m,e),lu(h.node,e.doc)&&(m=vo(c,e,O)+e.lineBreak+m),u.push({from:g,to:l,insert:e.lineBreak+m}),{range:Z.cursor(g+m.length+1),changes:u}});return s?!1:(t(e.update(a,{scrollIntoView:!0,userEvent:"input"})),!0)},ou=au();function Xo(r){return r.name=="QuoteMark"||r.name=="ListMark"}function lu(r,e){if(r.name!="OrderedList"&&r.name!="BulletList")return!1;let t=r.firstChild,n=r.getChild("ListItem","ListItem");if(!n)return!1;let i=e.lineAt(t.to),s=e.lineAt(n.from),a=/^[\s>]*$/.test(i.text);return i.number+(a?0:1){let t=R(r),n=null,i=r.changeByRange(s=>{let a=s.from,{doc:o}=r;if(s.empty&&tt.isActiveAt(r,s.from)){let l=o.lineAt(a),O=_o(Ou(t,a),o);if(O.length){let c=O[O.length-1],h=c.to-c.spaceAfter.length+(c.spaceAfter?1:0);if(a-l.from>h&&!/\S/.test(l.text.slice(h,a-l.from)))return{range:Z.cursor(l.from+h),changes:{from:l.from+h,to:a}};if(a-l.from==h&&(c.item&&l.from<=c.item.from||/^[\s>]*$/.test(l.text.slice(0,c.to)))){let p=l.from+c.from;if(c.item&&c.node.from{var t;let{main:n}=e.state.selection;if(n.empty)return!1;let i=(t=r.clipboardData)===null||t===void 0?void 0:t.getData("text/plain");if(!i||!/^(https?:\/\/|mailto:|xmpp:|www\.)/.test(i)||(/^www\./.test(i)&&(i="https://"+i),!tt.isActiveAt(e.state,n.from,1)))return!1;let s=R(e.state),a=!1;return s.iterate({from:n.from,to:n.to,enter:o=>{(o.from>n.from||fu.test(o.name))&&(a=!0)},leave:o=>{o.tor.normalize("NFKD"):r=>r,we=class{constructor(e,t,n=0,i=e.length,s,a){this.test=a,this.value={from:0,to:0,precise:!1},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(n,i),this.bufferStart=n,this.normalize=s?o=>s(qo(o)):qo,this.query=this.normalize(t)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return W(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let t=Ot(e),n=this.bufferStart+this.bufferPos;this.bufferPos+=J(e);let i=this.normalize(t);if(i.length)for(let s=0,a=n,o=!0;;s++){let l=i.charCodeAt(s),O=this.match(l,a,o,this.bufferPos+this.bufferStart,s==i.length-1);if(O)return this.value=O,this;if(s==i.length-1)break;o&&sthis.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let t=this.matchPos<=this.to&&this.re.exec(this.curLine);if(t){let n=this.curLineStart+t.index,i=n+t[0].length;if(this.matchPos=pr(this.text,i+(n==i?1:0)),n==this.curLineStart+this.curLine.length&&this.nextLine(),(nthis.value.to)&&(!this.test||this.test(n,i,t)))return this.value={from:n,to:i,precise:!0,match:t},this;e=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length=n||i.to<=t){let o=new r(t,e.sliceString(t,n));return ni.set(e,o),o}if(i.from==t&&i.to==n)return i;let{text:s,from:a}=i;return a>t&&(s=e.sliceString(t,a)+s,a=t),i.to=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,t=this.re.exec(this.flat.text);if(t&&!t[0]&&t.index==e&&(this.re.lastIndex=e+1,t=this.re.exec(this.flat.text)),t){let n=this.flat.from+t.index,i=n+t[0].length;if((this.flat.to>=this.to||t.index+t[0].length<=this.flat.text.length-10)&&(!this.test||this.test(n,i,t)))return this.value={from:n,to:i,precise:!0,match:t},this.matchPos=pr(this.text,i+(n==i?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=hr.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}};typeof Symbol<"u"&&(cr.prototype[Symbol.iterator]=ur.prototype[Symbol.iterator]=function(){return this});function mu(r){try{return new RegExp(r,Oi),!0}catch{return!1}}function pr(r,e){if(e>=r.length)return e;let t=r.lineAt(e),n;for(;e=56320&&n<57344;)e++;return e}var gu=r=>{let e=es(r,"cm-goto-line");if(e){let a=e.dom.querySelector("input[type=text]");return a&&a.select(),!0}let{state:t}=r,n=String(t.doc.lineAt(r.state.selection.main.head).number),{close:i,result:s}=Ji(r,{class:"cm-goto-line",label:t.phrase("Go to line"),input:{type:"text",name:"line",value:n},focus:!0,submitLabel:t.phrase("go")});return s.then(a=>{let o=a&&/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(a.elements.line.value);if(!o){r.dispatch({effects:i});return}let l=t.doc.lineAt(t.selection.main.head),[,O,c,h,p]=o,u=h?+h.slice(1):0,d=c?+c:l.number;if(c&&p){let b=d/100;O&&(b=b*(O=="-"?-1:1)+l.number/t.doc.lines),d=Math.round(t.doc.lines*b)}else c&&O&&(d=d*(O=="-"?-1:1)+l.number);let m=t.doc.line(Math.max(1,Math.min(t.doc.lines,d))),g=Z.cursor(m.from+Math.max(0,Math.min(u,m.length)));r.dispatch({effects:[i,X.scrollIntoView(g.from,{y:"center"})],selection:g})}),!0},Qu={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},Wo=Ge.define({combine(r){return ct(r,Qu,{highlightWordAroundCursor:(e,t)=>e||t,minSelectionLength:Math.min,maxMatches:Math.min})}});function Mo(r){let e=[Pu,ku];return r&&e.push(Wo.of(r)),e}var $u=v.mark({class:"cm-selectionMatch"}),bu=v.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function Ao(r,e,t,n){return(t==0||r(e.sliceDoc(t-1,t))!=A.Word)&&(n==e.doc.length||r(e.sliceDoc(n,n+1))!=A.Word)}function Su(r,e,t,n){return r(e.sliceDoc(t,t+1))==A.Word&&r(e.sliceDoc(n-1,n))==A.Word}var ku=Xe.fromClass(class{constructor(r){this.decorations=this.getDeco(r)}update(r){(r.selectionSet||r.docChanged||r.viewportChanged)&&(this.decorations=this.getDeco(r.view))}getDeco(r){let e=r.state.facet(Wo),{state:t}=r,n=t.selection;if(n.ranges.length>1)return v.none;let i=n.main,s,a=null;if(i.empty){if(!e.highlightWordAroundCursor)return v.none;let l=t.wordAt(i.head);if(!l)return v.none;a=t.charCategorizer(i.head),s=t.sliceDoc(l.from,l.to)}else{let l=i.to-i.from;if(l200)return v.none;if(e.wholeWords){if(s=t.sliceDoc(i.from,i.to),a=t.charCategorizer(i.head),!(Ao(a,t,i.from,i.to)&&Su(a,t,i.from,i.to)))return v.none}else if(s=t.sliceDoc(i.from,i.to),!s)return v.none}let o=[];for(let l of r.visibleRanges){let O=new we(t.doc,s,l.from,l.to);for(;!O.next().done;){let{from:c,to:h}=O.value;if((!a||Ao(a,t,c,h))&&(i.empty&&c<=i.from&&h>=i.to?o.push(bu.range(c,h)):(c>=i.to||h<=i.from)&&o.push($u.range(c,h)),o.length>e.maxMatches))return v.none}}return v.set(o)}},{decorations:r=>r.decorations}),Pu=X.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),xu=({state:r,dispatch:e})=>{let{selection:t}=r,n=Z.create(t.ranges.map(i=>r.wordAt(i.head)||Z.cursor(i.head)),t.mainIndex);return n.eq(t)?!1:(e(r.update({selection:n})),!0)};function wu(r,e){let{main:t,ranges:n}=r.selection,i=r.wordAt(t.head),s=i&&i.from==t.from&&i.to==t.to;for(let a=!1,o=new we(r.doc,e,n[n.length-1].to);;)if(o.next(),o.done){if(a)return null;o=new we(r.doc,e,0,Math.max(0,n[n.length-1].from-1)),a=!0}else{if(a&&n.some(l=>l.from==o.value.from))continue;if(s){let l=r.wordAt(o.value.from);if(!l||l.from!=o.value.from||l.to!=o.value.to)continue}return o.value}}var yu=({state:r,dispatch:e})=>{let{ranges:t}=r.selection;if(t.some(s=>s.from===s.to))return xu({state:r,dispatch:e});let n=r.sliceDoc(t[0].from,t[0].to);if(r.selection.ranges.some(s=>r.sliceDoc(s.from,s.to)!=n))return!1;let i=wu(r,n);return i?(e(r.update({selection:r.selection.addRange(Z.range(i.from,i.to),!1),effects:X.scrollIntoView(i.to)})),!0):!1},Ae=Ge.define({combine(r){return ct(r,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new oi(e),scrollToMatch:e=>X.scrollIntoView(e)})}});function Uo(r){return r?[Ae.of(r),li]:li}var fr=class{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||"",this.valid=!!this.search&&(!this.regexp||mu(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord,this.test=e.test}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(t,n)=>n=="n"?` -`:n=="r"?"\r":n=="t"?" ":"\\")}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord&&this.test==e.test}create(){return this.regexp?new si(this):new ii(this)}getCursor(e,t=0,n){let i=e.doc?e:Qe.create({doc:e});return n==null&&(n=i.doc.length),this.regexp?nt(this,i,t,n):rt(this,i,t,n)}},dr=class{constructor(e){this.spec=e}};function Zu(r,e,t){return(n,i,s,a)=>{if(t&&!t(n,i,s,a))return!1;let o=n>=a&&i<=a+s.length?s.slice(n-a,i-a):e.doc.sliceString(n,i);return r(o,e,n,i)}}function rt(r,e,t,n){let i;return r.wholeWord&&(i=Xu(e.doc,e.charCategorizer(e.selection.main.head))),r.test&&(i=Zu(r.test,e,i)),new we(e.doc,r.unquoted,t,n,r.caseSensitive?void 0:s=>s.toLowerCase(),i)}function Xu(r,e){return(t,n,i,s)=>((s>t||s+i.length=t)return null;i.push(n.value)}return i}highlight(e,t,n,i){let s=rt(this.spec,e,Math.max(0,t-this.spec.unquoted.length),Math.min(n+this.spec.unquoted.length,e.doc.length));for(;!s.next().done;)i(s.value.from,s.value.to)}};function vu(r,e,t){return(n,i,s)=>(!t||t(n,i,s))&&r(s[0],e,n,i)}function nt(r,e,t,n){let i;return r.wholeWord&&(i=Tu(e.charCategorizer(e.selection.main.head))),r.test&&(i=vu(r.test,e,i)),new cr(e.doc,r.search,{ignoreCase:!r.caseSensitive,test:i},t,n)}function mr(r,e){return r.slice(Rr(r,e,!1),e)}function gr(r,e){return r.slice(e,Rr(r,e))}function Tu(r){return(e,t,n)=>!n[0].length||(r(mr(n.input,n.index))!=A.Word||r(gr(n.input,n.index))!=A.Word)&&(r(gr(n.input,n.index+n[0].length))!=A.Word||r(mr(n.input,n.index+n[0].length))!=A.Word)}var si=class extends dr{nextMatch(e,t,n){let i=nt(this.spec,e,n,e.doc.length).next();return i.done&&(i=nt(this.spec,e,0,t).next()),i.done?null:i.value}prevMatchInRange(e,t,n){for(let i=1;;i++){let s=Math.max(t,n-i*1e4),a=nt(this.spec,e,s,n),o=null;for(;!a.next().done;)o=a.value;if(o&&(s==t||o.from>s+10))return o;if(s==t)return null}}prevMatch(e,t,n){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,n,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&]|\d+)/g,(t,n)=>{if(n=="&")return e.match[0];if(n=="$")return"$";for(let i=n.length;i>0;i--){let s=+n.slice(0,i);if(s>0&&s=t)return null;i.push(n.value)}return i}highlight(e,t,n,i){let s=nt(this.spec,e,Math.max(0,t-250),Math.min(n+250,e.doc.length));for(;!s.next().done;)i(s.value.from,s.value.to)}},Xt=q.define(),ci=q.define(),xe=ie.define({create(r){return new Zt(ai(r).create(),null)},update(r,e){for(let t of e.effects)t.is(Xt)?r=new Zt(t.value.create(),r.panel):t.is(ci)&&(r=new Zt(r.query,t.value?hi:null));return r},provide:r=>Ki.from(r,e=>e.panel)});var Zt=class{constructor(e,t){this.query=e,this.panel=t}},Ru=v.mark({class:"cm-searchMatch"}),ju=v.mark({class:"cm-searchMatch cm-searchMatch-selected"}),_u=Xe.fromClass(class{constructor(r){this.view=r,this.decorations=this.highlight(r.state.field(xe))}update(r){let e=r.state.field(xe);(e!=r.startState.field(xe)||r.docChanged||r.selectionSet||r.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:r,panel:e}){if(!e||!r.spec.valid)return v.none;let{view:t}=this,n=new Di;for(let i=0,s=t.visibleRanges,a=s.length;is[i+1].from-500;)l=s[++i].to;r.highlight(t.state,o,l,(O,c)=>{let h=t.state.selection.ranges.some(p=>p.from==O&&p.to==c);n.add(O,c,h?ju:Ru)})}return n.finish()}},{decorations:r=>r.decorations});function vt(r){return e=>{let t=e.state.field(xe,!1);return t&&t.query.spec.valid?r(e,t):Io(e)}}var Qr=vt((r,{query:e})=>{let{to:t}=r.state.selection.main,n=e.nextMatch(r.state,t,t);if(!n)return!1;let i=Z.single(n.from,n.to),s=r.state.facet(Ae);return r.dispatch({selection:i,effects:[ui(r,n),s.scrollToMatch(i.main,r)],userEvent:"select.search"}),Go(r),!0}),$r=vt((r,{query:e})=>{let{state:t}=r,{from:n}=t.selection.main,i=e.prevMatch(t,n,n);if(!i)return!1;let s=Z.single(i.from,i.to),a=r.state.facet(Ae);return r.dispatch({selection:s,effects:[ui(r,i),a.scrollToMatch(s.main,r)],userEvent:"select.search"}),Go(r),!0}),Yu=vt((r,{query:e})=>{let t=e.matchAll(r.state,1e3);return!t||!t.length?!1:(r.dispatch({selection:Z.create(t.map(n=>Z.range(n.from,n.to))),userEvent:"select.search.matches"}),!0)}),Cu=({state:r,dispatch:e})=>{let t=r.selection;if(t.ranges.length>1||t.main.empty)return!1;let{from:n,to:i}=t.main,s=[],a=0;for(let o=new we(r.doc,r.sliceDoc(n,i));!o.next().done;){if(s.length>1e3)return!1;o.value.from==n&&(a=s.length),s.push(Z.range(o.value.from,o.value.to))}return e(r.update({selection:Z.create(s,a),userEvent:"select.search.matches"})),!0},Lo=vt((r,{query:e})=>{let{state:t}=r,{from:n,to:i}=t.selection.main;if(t.readOnly)return!1;let s=e.nextMatch(t,n,n);if(!s)return!1;let a=s,o=[],l,O,c=[];a.precise?a.from==n&&a.to==i&&(O=t.toText(e.getReplacement(a)),o.push({from:a.from,to:a.to,insert:O}),a=e.nextMatch(t,a.from,a.to),c.push(X.announce.of(t.phrase("replaced match on line $",t.doc.lineAt(n).number)+"."))):a=e.nextMatch(t,a.from,a.to);let h=r.state.changes(o);return a&&(l=Z.single(a.from,a.to).map(h),c.push(ui(r,a)),c.push(t.facet(Ae).scrollToMatch(l.main,r))),r.dispatch({changes:h,selection:l,effects:c,userEvent:"input.replace"}),!0}),zu=vt((r,{query:e})=>{if(r.state.readOnly)return!1;let t=[];for(let i of e.matchAll(r.state,1e9)){let{from:s,to:a,precise:o}=i;o&&t.push({from:s,to:a,insert:e.getReplacement(i)})}if(!t.length)return!1;let n=r.state.phrase("replaced $ matches",t.length)+".";return r.dispatch({changes:t,effects:X.announce.of(n),userEvent:"input.replace.all"}),!0});function hi(r){return r.state.facet(Ae).createPanel(r)}function ai(r,e){var t,n,i,s,a;let o=r.selection.main,l=o.empty||o.to>o.from+100?"":r.sliceDoc(o.from,o.to);if(e&&!l)return e;let O=r.facet(Ae);return new fr({search:((t=e?.literal)!==null&&t!==void 0?t:O.literal)?l:l.replace(/\n/g,"\\n"),caseSensitive:(n=e?.caseSensitive)!==null&&n!==void 0?n:O.caseSensitive,literal:(i=e?.literal)!==null&&i!==void 0?i:O.literal,regexp:(s=e?.regexp)!==null&&s!==void 0?s:O.regexp,wholeWord:(a=e?.wholeWord)!==null&&a!==void 0?a:O.wholeWord})}function Vo(r){let e=_r(r,hi);return e&&e.dom.querySelector("[main-field]")}function Go(r){let e=Vo(r);e&&e==r.root.activeElement&&e.select()}var Io=r=>{let e=r.state.field(xe,!1);if(e&&e.panel){let t=Vo(r);if(t&&t!=r.root.activeElement){let n=ai(r.state,e.query.spec);n.valid&&r.dispatch({effects:Xt.of(n)}),t.focus(),t.select()}}else r.dispatch({effects:[ci.of(!0),e?Xt.of(ai(r.state,e.query.spec)):q.appendConfig.of(li)]});return!0},Do=r=>{let e=r.state.field(xe,!1);if(!e||!e.panel)return!1;let t=_r(r,hi);return t&&t.dom.contains(r.root.activeElement)&&r.focus(),r.dispatch({effects:ci.of(!1)}),!0},Bo=[{key:"Mod-f",run:Io,scope:"editor search-panel"},{key:"F3",run:Qr,shift:$r,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:Qr,shift:$r,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:Do,scope:"editor search-panel"},{key:"Mod-Shift-l",run:Cu},{key:"Mod-Alt-g",run:gu},{key:"Mod-d",run:yu,preventDefault:!0}],oi=class{constructor(e){this.view=e;let t=this.query=e.state.field(xe).query.spec;this.commit=this.commit.bind(this),this.searchField=I("input",{value:t.search,placeholder:F(e,"Find"),"aria-label":F(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=I("input",{value:t.replace,placeholder:F(e,"Replace"),"aria-label":F(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=I("input",{type:"checkbox",name:"case",form:"",checked:t.caseSensitive,onchange:this.commit}),this.reField=I("input",{type:"checkbox",name:"re",form:"",checked:t.regexp,onchange:this.commit}),this.wordField=I("input",{type:"checkbox",name:"word",form:"",checked:t.wholeWord,onchange:this.commit});function n(i,s,a){return I("button",{class:"cm-button",name:i,onclick:s,type:"button"},a)}this.dom=I("div",{onkeydown:i=>this.keydown(i),class:"cm-search"},[this.searchField,n("next",()=>Qr(e),[F(e,"next")]),n("prev",()=>$r(e),[F(e,"previous")]),n("select",()=>Yu(e),[F(e,"all")]),I("label",null,[this.caseField,F(e,"match case")]),I("label",null,[this.reField,F(e,"regexp")]),I("label",null,[this.wordField,F(e,"by word")]),...e.state.readOnly?[]:[I("br"),this.replaceField,n("replace",()=>Lo(e),[F(e,"replace")]),n("replaceAll",()=>zu(e),[F(e,"replace all")])],I("button",{name:"close",onclick:()=>Do(e),"aria-label":F(e,"close"),type:"button"},["\xD7"])])}commit(){let e=new fr({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:Xt.of(e)}))}keydown(e){Ni(this.view,e,"search-panel")?e.preventDefault():e.keyCode==13&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?$r:Qr)(this.view)):e.keyCode==13&&e.target==this.replaceField&&(e.preventDefault(),Lo(this.view))}update(e){for(let t of e.transactions)for(let n of t.effects)n.is(Xt)&&!n.value.eq(this.query)&&this.setQuery(n.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(Ae).top}};function F(r,e){return r.state.phrase(e)}var lr=30,Or=/[\s\.,:;?!]/;function ui(r,{from:e,to:t}){let n=r.state.doc.lineAt(e),i=r.state.doc.lineAt(t).to,s=Math.max(n.from,e-lr),a=Math.min(i,t+lr),o=r.state.sliceDoc(s,a);if(s!=n.from){for(let l=0;lo.length-lr;l--)if(!Or.test(o[l-1])&&Or.test(o[l])){o=o.slice(0,l);break}}return X.announce.of(`${r.state.phrase("current match")}. ${o} ${r.state.phrase("on line")} ${n.number}.`)}var qu=X.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),li=[xe,ge.low(_u),qu];function de(r,e,t=""){let n=r.state.changeByRange(i=>{let{from:s,to:a}=i,o=r.state.sliceDoc(s-e.length,s),l=r.state.sliceDoc(a,a+e.length);if(o===e&&l===e)return{changes:[{from:s-e.length,to:s,insert:""},{from:a,to:a+e.length,insert:""}],range:Z.range(s-e.length,a-e.length)};let O=r.state.sliceDoc(s,a)||t;return{changes:{from:s,to:a,insert:e+O+e},range:Z.range(s+e.length,s+e.length+O.length)}});return r.dispatch(n,{scrollIntoView:!0,userEvent:"input"}),r.focus(),!0}function V(r,e){let{state:t}=r,n=[],i=new Set;for(let a of t.selection.ranges)for(let o=t.doc.lineAt(a.from).number;o<=t.doc.lineAt(a.to).number;o++)i.add(o);let s=/^(\s*)(#{1,6}\s+|>\s?|[-*+]\s+\[[ xX]\]\s+|[-*+]\s+|\d+[.)]\s+)?/;for(let a of i){let o=t.doc.line(a),l=s.exec(o.text),O=l[1],c=l[2]??"",h=o.from+O.length,p=h+c.length;n.push({from:h,to:p,insert:c===e?"":e})}return r.dispatch({changes:n,scrollIntoView:!0,userEvent:"input"}),r.focus(),!0}function pi(r,e,t=!1){let{state:n}=r,i=n.selection.main,s=e;if(t){let a=n.doc.lineAt(i.from);i.from===a.from||(s=` +}`,{label:"class",detail:"definition",type:"keyword"}),L('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),L('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],Wh=lo.concat([L("interface ${name} {\n ${}\n}",{label:"interface",detail:"definition",type:"keyword"}),L("type ${name} = ${type}",{label:"type",detail:"definition",type:"keyword"}),L("enum ${name} {\n ${}\n}",{label:"enum",detail:"definition",type:"keyword"})]),so=new Et,Oo=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function wt(r){return(e,t)=>{let n=e.node.getChild("VariableDefinition");return n&&t(n,r),!0}}var Mh=["FunctionDeclaration"],Uh={FunctionDeclaration:wt("function"),ClassDeclaration:wt("class"),ClassExpression:()=>!0,EnumDeclaration:wt("constant"),TypeAliasDeclaration:wt("type"),NamespaceDeclaration:wt("namespace"),VariableDefinition(r,e){r.matchContext(Mh)||e(r,"variable")},TypeDefinition(r,e){e(r,"type")},__proto__:null};function co(r,e){let t=so.get(e);if(t)return t;let n=[],i=!0;function s(a,o){let l=r.sliceString(a.from,a.to);n.push({label:l,type:o})}return e.cursor(le.IncludeAnonymous).iterate(a=>{if(i)i=!1;else if(a.name){let o=Uh[a.name];if(o&&o(a,s)||Oo.has(a.name))return!1}else if(a.to-a.from>8192){for(let o of co(r,a.node))n.push(o);return!1}}),so.set(e,n),n}var ao=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,ho=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName","JSXText","JSXAttributeValue","JSXOpenTag","JSXCloseTag","JSXSelfClosingTag",".","?."];function Vh(r){let e=R(r.state).resolveInner(r.pos,-1);if(ho.indexOf(e.name)>-1)return null;let t=e.name=="VariableName"||e.to-e.from<20&&ao.test(r.state.sliceDoc(e.from,e.to));if(!t&&!r.explicit)return null;let n=[];for(let i=e;i;i=i.parent)Oo.has(i.name)&&(n=n.concat(co(r.state.doc,i)));return{options:n,from:t?e.from:r.pos,validFor:ao}}var te=Be.define({name:"javascript",parser:io.configure({props:[$e.add({IfStatement:Ne({except:/^\s*({|else\b)/}),TryStatement:Ne({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:ls,SwitchBody:r=>{let e=r.textAfter,t=/^\s*\}/.test(e),n=/^\s*(case|default)\b/.test(e);return r.baseIndent+(t?0:n?1:2)*r.unit},Block:os({closing:"}"}),ArrowFunction:r=>r.baseIndent+r.unit,"TemplateString BlockComment":()=>null,"Statement Property":Ne({except:/^\s*{/}),JSXElement(r){let e=/^\s*<\//.test(r.textAfter);return r.lineIndent(r.node.from)+(e?0:r.unit)},JSXEscape(r){let e=/\s*\}/.test(r.textAfter);return r.lineIndent(r.node.from)+(e?0:r.unit)},"JSXOpenTag JSXSelfClosingTag"(r){return r.column(r.node.from)+r.unit}}),he.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":Gt,BlockComment(r){return{from:r.from+2,to:r.to-2}},JSXElement(r){let e=r.firstChild;if(!e||e.name=="JSXSelfClosingTag")return null;let t=r.lastChild;return{from:e.to,to:t.type.isError?r.to:t.from}},"JSXSelfClosingTag JSXOpenTag"(r){var e;let t=(e=r.firstChild)===null||e===void 0?void 0:e.nextSibling,n=r.lastChild;return!t||t.type.isError?null:{from:t.to,to:n.type.isError?r.to:n.from}}})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),uo={test:r=>/^JSX/.test(r.name),facet:Ut({commentTokens:{block:{open:"{/*",close:"*/}"}}})},Bn=te.configure({dialect:"ts"},"typescript"),Nn=te.configure({dialect:"jsx",props:[qr.add(r=>r.isTop?[uo]:void 0)]}),Fn=te.configure({dialect:"jsx ts",props:[qr.add(r=>r.isTop?[uo]:void 0)]},"typescript"),po=r=>({label:r,type:"keyword"}),fo="break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ").map(po),Gh=fo.concat(["declare","implements","private","protected","public"].map(po));function mo(r={}){let e=r.jsx?r.typescript?Fn:Nn:r.typescript?Bn:te,t=r.typescript?Wh.concat(Gh):lo.concat(fo);return new ce(e,[te.data.of({autocomplete:ws(ho,Hr(t))}),te.data.of({autocomplete:Vh}),r.jsx?Bh:[]])}function Ih(r){for(;;){if(r.name=="JSXOpenTag"||r.name=="JSXSelfClosingTag"||r.name=="JSXFragmentTag")return r;if(r.name=="JSXEscape"||!r.parent)return null;r=r.parent}}function oo(r,e,t=r.length){for(let n=e?.firstChild;n;n=n.nextSibling)if(n.name=="JSXIdentifier"||n.name=="JSXBuiltin"||n.name=="JSXNamespacedName"||n.name=="JSXMemberExpression")return r.sliceString(n.from,Math.min(n.to,t));return""}var Dh=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),Bh=X.inputHandler.of((r,e,t,n,i)=>{if((Dh?r.composing:r.compositionStarted)||r.state.readOnly||e!=t||n!=">"&&n!="/"||!te.isActiveAt(r.state,e,-1))return!1;let s=i(),{state:a}=s,o=a.changeByRange(l=>{var O;let{head:c}=l,h=R(a).resolveInner(c-1,-1),p;if(h.name=="JSXStartTag"&&(h=h.parent),!(a.doc.sliceString(c-1,c)!=n||h.name=="JSXAttributeValue"&&h.to>c)){if(n==">"&&h.name=="JSXFragmentTag")return{range:l,changes:{from:c,insert:""}};if(n=="/"&&h.name=="JSXStartCloseTag"){let u=h.parent,d=u.parent;if(d&&u.from==c-2&&((p=oo(a.doc,d.firstChild,c))||((O=d.firstChild)===null||O===void 0?void 0:O.name)=="JSXFragmentTag")){let m=`${p}>`;return{range:Z.cursor(c+m.length,-1),changes:{from:c,insert:m}}}}else if(n==">"){let u=Ih(h);if(u&&u.name=="JSXOpenTag"&&!/^\/?>|^<\//.test(a.doc.sliceString(c,c+2))&&(p=oo(a.doc,u,c)))return{range:l,changes:{from:c,insert:``}}}}return{range:l}});return o.changes.empty?!1:(r.dispatch([s,a.update(o,{userEvent:"input.complete",scrollIntoView:!0})]),!0)});var yt=["_blank","_self","_top","_parent"],Hn=["ascii","utf-8","utf-16","latin1","latin1"],Kn=["get","post","put","delete"],Jn=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],N=["true","false"],S={},Nh={a:{attrs:{href:null,ping:null,type:null,media:null,target:yt,hreflang:null}},abbr:S,address:S,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:null,hreflang:null,type:null,shape:["default","rect","circle","poly"]}},article:S,aside:S,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["autoplay"],loop:["loop"],controls:["controls"]}},b:S,base:{attrs:{href:null,target:yt}},bdi:S,bdo:S,blockquote:{attrs:{cite:null}},body:S,br:S,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["autofocus"],disabled:["autofocus"],formenctype:Jn,formmethod:Kn,formnovalidate:["novalidate"],formtarget:yt,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:S,center:S,cite:S,code:S,col:{attrs:{span:null}},colgroup:{attrs:{span:null}},command:{attrs:{type:["command","checkbox","radio"],label:null,icon:null,radiogroup:null,command:null,title:null,disabled:["disabled"],checked:["checked"]}},data:{attrs:{value:null}},datagrid:{attrs:{disabled:["disabled"],multiple:["multiple"]}},datalist:{attrs:{data:null}},dd:S,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["open"]}},dfn:S,div:S,dl:S,dt:S,em:S,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["disabled"],form:null,name:null}},figcaption:S,figure:S,footer:S,form:{attrs:{action:null,name:null,"accept-charset":Hn,autocomplete:["on","off"],enctype:Jn,method:Kn,novalidate:["novalidate"],target:yt}},h1:S,h2:S,h3:S,h4:S,h5:S,h6:S,head:{children:["title","base","link","style","meta","script","noscript","command"]},header:S,hgroup:S,hr:S,html:{attrs:{manifest:null}},i:S,iframe:{attrs:{src:null,srcdoc:null,name:null,width:null,height:null,sandbox:["allow-top-navigation","allow-same-origin","allow-forms","allow-scripts"],seamless:["seamless"]}},img:{attrs:{alt:null,src:null,ismap:null,usemap:null,width:null,height:null,crossorigin:["anonymous","use-credentials"]}},input:{attrs:{alt:null,dirname:null,form:null,formaction:null,height:null,list:null,max:null,maxlength:null,min:null,name:null,pattern:null,placeholder:null,size:null,src:null,step:null,value:null,width:null,accept:["audio/*","video/*","image/*"],autocomplete:["on","off"],autofocus:["autofocus"],checked:["checked"],disabled:["disabled"],formenctype:Jn,formmethod:Kn,formnovalidate:["novalidate"],formtarget:yt,multiple:["multiple"],readonly:["readonly"],required:["required"],type:["hidden","text","search","tel","url","email","password","datetime","date","month","week","time","datetime-local","number","range","color","checkbox","radio","file","submit","image","reset","button"]}},ins:{attrs:{cite:null,datetime:null}},kbd:S,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["autofocus"],disabled:["disabled"],keytype:["RSA"]}},label:{attrs:{for:null,form:null}},legend:S,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:null,media:null,sizes:["all","16x16","16x16 32x32","16x16 32x32 64x64"]}},map:{attrs:{name:null}},mark:S,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:Hn,name:["viewport","application-name","author","description","generator","keywords"],"http-equiv":["content-language","content-type","default-style","refresh"]}},meter:{attrs:{value:null,min:null,low:null,high:null,max:null,optimum:null}},nav:S,noscript:S,object:{attrs:{data:null,type:null,name:null,usemap:null,form:null,width:null,height:null,typemustmatch:["typemustmatch"]}},ol:{attrs:{reversed:["reversed"],start:null,type:["1","a","A","i","I"]},children:["li","script","template","ul","ol"]},optgroup:{attrs:{disabled:["disabled"],label:null}},option:{attrs:{disabled:["disabled"],label:null,selected:["selected"],value:null}},output:{attrs:{for:null,form:null,name:null}},p:S,param:{attrs:{name:null,value:null}},pre:S,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:S,rt:S,ruby:S,samp:S,script:{attrs:{type:["text/javascript"],src:null,async:["async"],defer:["defer"],charset:Hn}},section:S,select:{attrs:{form:null,name:null,size:null,autofocus:["autofocus"],disabled:["disabled"],multiple:["multiple"]}},slot:{attrs:{name:null}},small:S,source:{attrs:{src:null,type:null,media:null}},span:S,strong:S,style:{attrs:{type:["text/css"],media:null,scoped:null}},sub:S,summary:S,sup:S,table:S,tbody:S,td:{attrs:{colspan:null,rowspan:null,headers:null}},template:S,textarea:{attrs:{dirname:null,form:null,maxlength:null,name:null,placeholder:null,rows:null,cols:null,autofocus:["autofocus"],disabled:["disabled"],readonly:["readonly"],required:["required"],wrap:["soft","hard"]}},tfoot:S,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:["row","col","rowgroup","colgroup"]}},thead:S,time:{attrs:{datetime:null}},title:S,tr:S,track:{attrs:{src:null,label:null,default:null,kind:["subtitles","captions","descriptions","chapters","metadata"],srclang:null}},ul:{children:["li","script","template","ul","ol"]},var:S,video:{attrs:{src:null,poster:null,width:null,height:null,crossorigin:["anonymous","use-credentials"],preload:["auto","metadata","none"],autoplay:["autoplay"],mediagroup:["movie"],muted:["muted"],controls:["controls"]}},wbr:S},bo={accesskey:null,class:null,contenteditable:N,contextmenu:null,dir:["ltr","rtl","auto"],draggable:["true","false","auto"],dropzone:["copy","move","link","string:","file:"],hidden:["hidden"],id:null,inert:["inert"],itemid:null,itemprop:null,itemref:null,itemscope:["itemscope"],itemtype:null,lang:["ar","bn","de","en-GB","en-US","es","fr","hi","id","ja","pa","pt","ru","tr","zh"],spellcheck:N,autocorrect:N,autocapitalize:N,style:null,tabindex:null,title:null,translate:["yes","no"],rel:["stylesheet","alternate","author","bookmark","help","license","next","nofollow","noreferrer","prefetch","prev","search","tag"],role:"alert application article banner button cell checkbox complementary contentinfo dialog document feed figure form grid gridcell heading img list listbox listitem main navigation region row rowgroup search switch tab table tabpanel textbox timer".split(" "),"aria-activedescendant":null,"aria-atomic":N,"aria-autocomplete":["inline","list","both","none"],"aria-busy":N,"aria-checked":["true","false","mixed","undefined"],"aria-controls":null,"aria-describedby":null,"aria-disabled":N,"aria-dropeffect":null,"aria-expanded":["true","false","undefined"],"aria-flowto":null,"aria-grabbed":["true","false","undefined"],"aria-haspopup":N,"aria-hidden":N,"aria-invalid":["true","false","grammar","spelling"],"aria-label":null,"aria-labelledby":null,"aria-level":null,"aria-live":["off","polite","assertive"],"aria-multiline":N,"aria-multiselectable":N,"aria-owns":null,"aria-posinset":null,"aria-pressed":["true","false","mixed","undefined"],"aria-readonly":N,"aria-relevant":null,"aria-required":N,"aria-selected":["true","false","undefined"],"aria-setsize":null,"aria-sort":["ascending","descending","none","other"],"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null},So="beforeunload copy cut dragstart dragover dragleave dragenter dragend drag paste focus blur change click load mousedown mouseenter mouseleave mouseup keydown keyup resize scroll unload".split(" ").map(r=>"on"+r);for(let r of So)bo[r]=null;var qe=class{constructor(e,t){this.tags={...Nh,...e},this.globalAttrs={...bo,...t},this.allTags=Object.keys(this.tags),this.globalAttrNames=Object.keys(this.globalAttrs)}};qe.default=new qe;function Ae(r,e,t=r.length){if(!e)return"";let n=e.firstChild,i=n&&n.getChild("TagName");return i?r.sliceString(i.from,Math.min(i.to,t)):""}function tt(r,e=!1){for(;r;r=r.parent)if(r.name=="Element")if(e)e=!1;else return r;return null}function ko(r,e,t){let n=t.tags[Ae(r,tt(e))];return n?.children||t.allTags}function ei(r,e){let t=[];for(let n=tt(e);n&&!n.type.isTop;n=tt(n.parent)){let i=Ae(r,n);if(i&&n.lastChild.name=="CloseTag")break;i&&t.indexOf(i)<0&&(e.name=="EndTag"||e.from>=n.firstChild.to)&&t.push(i)}return t}var Po=/^[:\-\.\w\u00b7-\uffff]*$/;function go(r,e,t,n,i){let s=/\s*>/.test(r.sliceDoc(i,i+5))?"":">",a=tt(t,t.name=="StartTag"||t.name=="TagName");return{from:n,to:i,options:ko(r.doc,a,e).map(o=>({label:o,type:"type"})).concat(ei(r.doc,t).map((o,l)=>({label:"/"+o,apply:"/"+o+s,type:"type",boost:99-l}))),validFor:/^\/?[:\-\.\w\u00b7-\uffff]*$/}}function Qo(r,e,t,n){let i=/\s*>/.test(r.sliceDoc(n,n+5))?"":">";return{from:t,to:n,options:ei(r.doc,e).map((s,a)=>({label:s,apply:s+i,type:"type",boost:99-a})),validFor:Po}}function Fh(r,e,t,n){let i=[],s=0;for(let a of ko(r.doc,t,e))i.push({label:"<"+a,type:"type"});for(let a of ei(r.doc,t))i.push({label:"",type:"type",boost:99-s++});return{from:n,to:n,options:i,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}function Hh(r,e,t,n,i){let s=tt(t),a=s?e.tags[Ae(r.doc,s)]:null,o=a&&a.attrs?Object.keys(a.attrs):[],l=a&&a.globalAttrs===!1?o:o.length?o.concat(e.globalAttrNames):e.globalAttrNames;return{from:n,to:i,options:l.map(O=>({label:O,type:"property"})),validFor:Po}}function Kh(r,e,t,n,i){var s;let a=(s=t.parent)===null||s===void 0?void 0:s.getChild("AttributeName"),o=[],l;if(a){let O=r.sliceDoc(a.from,a.to),c=e.globalAttrs[O];if(!c){let h=tt(t),p=h?e.tags[Ae(r.doc,h)]:null;c=p?.attrs&&p.attrs[O]}if(c){let h=r.sliceDoc(n,i).toLowerCase(),p='"',u='"';/^['"]/.test(h)?(l=h[0]=='"'?/^[^"]*$/:/^[^']*$/,p="",u=r.sliceDoc(i,i+1)==h[0]?"":h[0],h=h.slice(1),n++):l=/^[^\s<>='"]*$/;for(let d of c)o.push({label:d,apply:p+d+u,type:"constant"})}}return{from:n,to:i,options:o,validFor:l}}function xo(r,e){let{state:t,pos:n}=e,i=R(t).resolveInner(n,-1),s=i.resolve(n);for(let a=n,o;s==i&&(o=i.childBefore(a));){let l=o.lastChild;if(!l||!l.type.isError||l.fromxo(n,i)}var eu=te.parser.configure({top:"SingleExpression"}),yo=[{tag:"script",attrs:r=>r.type=="text/typescript"||r.lang=="ts",parser:Bn.parser},{tag:"script",attrs:r=>r.type=="text/babel"||r.type=="text/jsx",parser:Nn.parser},{tag:"script",attrs:r=>r.type=="text/typescript-jsx",parser:Fn.parser},{tag:"script",attrs(r){return/^(importmap|speculationrules|application\/(.+\+)?json)$/i.test(r.type)},parser:eu},{tag:"script",attrs(r){return!r.type||/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(r.type)},parser:te.parser},{tag:"style",attrs(r){return(!r.lang||r.lang=="css")&&(!r.type||/^(text\/)?(x-)?(stylesheet|css)$/i.test(r.type))},parser:xt.parser}],Zo=[{name:"style",parser:xt.parser.configure({top:"Styles"})}].concat(So.map(r=>({name:r,parser:te.parser}))),Xo=Be.define({name:"html",parser:Wa.configure({props:[$e.add({Element(r){let e=/^(\s*)(<\/)?/.exec(r.textAfter);return r.node.to<=r.pos+e[0].length?r.continue():r.lineIndent(r.node.from)+(e[2]?0:r.unit)},"OpenTag CloseTag SelfClosingTag"(r){return r.column(r.node.from)+r.unit},Document(r){if(r.pos+/\s*/.exec(r.textAfter)[0].lengthr.getChild("TagName")})]}),languageData:{commentTokens:{block:{open:""}},indentOnInput:/^\s*<\/\w+\W$/,wordChars:"-_"}}),lr=Xo.configure({wrap:Wn(yo,Zo)});function vo(r={}){let e="",t;r.matchClosingTags===!1&&(e="noMatch"),r.selfClosingTags===!0&&(e=(e?e+" ":"")+"selfClosing"),(r.nestedLanguages&&r.nestedLanguages.length||r.nestedAttributes&&r.nestedAttributes.length)&&(t=Wn((r.nestedLanguages||[]).concat(yo),(r.nestedAttributes||[]).concat(Zo)));let n=t?Xo.configure({wrap:t,dialect:e}):e?lr.configure({dialect:e}):lr;return new ce(n,[lr.data.of({autocomplete:Jh(r)}),r.autoCloseTags!==!1?ru:[],mo().support,to().support])}var $o=new Set("area base br col command embed frame hr img input keygen link meta param source track wbr menuitem".split(" "));function tu(r,e,t){for(var n;;){if(((n=e.lastChild)===null||n===void 0?void 0:n.name)!="CloseTag")return!1;let i=e.parent;if(!i||Ae(r,i)!=t)return!0;e=i}}var ru=X.inputHandler.of((r,e,t,n,i)=>{if(r.composing||r.state.readOnly||e!=t||n!=">"&&n!="/"||!lr.isActiveAt(r.state,e,-1))return!1;let s=i(),{state:a}=s,o=a.changeByRange(l=>{var O;let c=a.doc.sliceString(l.from-1,l.to)==n,{head:h}=l,p=R(a).resolveInner(h,-1),u;if(c&&n==">"&&p.name=="EndTag"){let d=p.parent;if((u=Ae(a.doc,d.parent,h))&&!$o.has(u)&&!tu(a.doc,d.parent,u)){let m=h+(a.doc.sliceString(h,h+1)===">"?1:0),g=``;return{range:l,changes:{from:h,to:m,insert:g}}}}else if(c&&n=="/"&&p.name=="IncompleteCloseTag"){let d=p.parent;if(p.from==h-2&&((O=d.lastChild)===null||O===void 0?void 0:O.name)!="CloseTag"&&(u=Ae(a.doc,d,h))&&!$o.has(u)){let m=h+(a.doc.sliceString(h,h+1)===">"?1:0),g=`${u}>`;return{range:Z.cursor(h+g.length,-1),changes:{from:h,to:m,insert:g}}}}return{range:l}});return o.changes.empty?!1:(r.dispatch([s,a.update(o,{userEvent:"input.complete",scrollIntoView:!0})]),!0)});var jo=Ut({commentTokens:{block:{open:""}}}),_o=new K,Yo=ha.configure({props:[he.add(r=>!r.is("Block")||r.is("Document")||ni(r)!=null||nu(r)?void 0:(e,t)=>({from:t.doc.lineAt(e.from).to,to:e.to})),_o.add(ni),$e.add({Document:()=>null}),is.add({Document:jo})]});function ni(r){let e=/^(?:ATX|Setext)Heading(\d)$/.exec(r.name);return e?+e[1]:void 0}function nu(r){return r.name=="OrderedList"||r.name=="BulletList"}function iu(r,e){let t=r;for(;;){let n=t.nextSibling,i;if(!n||(i=ni(n.type))!=null&&i<=e)break;t=n}return t.to}var su=Os.of((r,e,t)=>{for(let n=R(r).resolveInner(t,-1);n&&!(n.fromt)return{from:t,to:s}}return null});function ii(r){return new ss(jo,r,[],"markdown")}var au=ii(Yo),ou=Yo.configure([fa,ga,ma,Qa,{props:[he.add({Table:(r,e)=>({from:e.doc.lineAt(r.from).to,to:r.to})})]}]),rt=ii(ou);function lu(r,e){return t=>{if(t&&r){let n=null;if(t=/\S*/.exec(t)[0],typeof r=="function"?n=r(t):n=Ar.matchLanguageName(r,t,!0),n instanceof Ar)return n.support?n.support.language.parser:as.getSkippingParser(n.load());if(n)return n.parser}return e?e.parser:null}}var Zt=class{constructor(e,t,n,i,s,a,o){this.node=e,this.from=t,this.to=n,this.spaceBefore=i,this.spaceAfter=s,this.type=a,this.item=o}blank(e,t=!0){let n=this.spaceBefore+(this.node.name=="Blockquote"?">":"");if(e!=null){for(;n.length0;i--)n+=" ";return n+(t?this.spaceAfter:"")}}marker(e,t){let n=this.node.name=="OrderedList"?String(+zo(this.item,e)[2]+t):"";return this.spaceBefore+n+this.type+this.spaceAfter}};function Co(r,e){let t=[],n=[];for(let i=r;i;i=i.parent){if(i.name=="FencedCode")return n;(i.name=="ListItem"||i.name=="Blockquote")&&t.push(i)}for(let i=t.length-1;i>=0;i--){let s=t[i],a,o=e.lineAt(s.from),l=s.from-o.from;if(s.name=="Blockquote"&&(a=/^ *>( ?)/.exec(o.text.slice(l))))n.push(new Zt(s,l,l+a[0].length,"",a[1],">",null));else if(s.name=="ListItem"&&s.parent.name=="OrderedList"&&(a=/^( *)\d+([.)])( *)/.exec(o.text.slice(l)))){let O=a[3],c=a[0].length;O.length>=4&&(O=O.slice(0,O.length-4),c-=4),n.push(new Zt(s.parent,l,l+c,a[1],O,a[2],s))}else if(s.name=="ListItem"&&s.parent.name=="BulletList"&&(a=/^( *)([-+*])( {1,4}\[[ xX]\])?( +)/.exec(o.text.slice(l)))){let O=a[4],c=a[0].length;O.length>4&&(O=O.slice(0,O.length-4),c-=4);let h=a[2];a[3]&&(h+=a[3].replace(/[xX]/," ")),n.push(new Zt(s.parent,l,l+c,a[1],O,h,s))}}return n}function zo(r,e){return/^(\s*)(\d+)(?=[.)])/.exec(e.sliceString(r.from,r.from+10))}function ti(r,e,t,n=0){for(let i=-1,s=r;;){if(s.name=="ListItem"){let o=zo(s,e),l=+o[2];if(i>=0){if(l!=i+1)return;t.push({from:s.from+o[1].length,to:s.from+o[0].length,insert:String(i+2+n)})}i=l}let a=s.nextSibling;if(!a)break;s=a}}function si(r,e){let t=/^[ \t]*/.exec(r)[0].length;if(!t||e.facet(Vt)!=" ")return r;let n=De(r,4,t),i="";for(let s=n;s>0;)s>=4?(i+=" ",s-=4):(i+=" ",s--);return i+r.slice(t)}var Ou=(r={})=>({state:e,dispatch:t})=>{let n=R(e),{doc:i}=e,s=null,a=e.changeByRange(o=>{if(!o.empty||!rt.isActiveAt(e,o.from,-1)&&!rt.isActiveAt(e,o.from,1))return s={range:o};let l=o.from,O=i.lineAt(l),c=Co(n.resolveInner(l,-1),i);for(;c.length&&c[c.length-1].from>l-O.from;)c.pop();if(!c.length)return s={range:o};let h=c[c.length-1];if(h.to-h.spaceAfter.length>l-O.from)return s={range:o};let p=l>=h.to-h.spaceAfter.length&&!/\S/.test(O.text.slice(h.to));if(h.item&&p){if(h.item.from]*$/.test(O.text.slice(0,h.to)))return s={range:o};let b=h.node.firstChild,Q=h.node.getChild("ListItem","ListItem");if(b.to>=l||Q&&Q.to0&&!/[^\s>]/.test(i.lineAt(O.from-1).text)||r.nonTightLists===!1){let k=c.length>1?c[c.length-2]:null,y,w="";k&&k.item?(y=O.from+k.from,w=k.marker(i,1)):y=O.from+(k?k.to:0);let _=[{from:y,to:l,insert:w}];return h.node.name=="OrderedList"&&ti(h.item,i,_,-2),k&&k.node.name=="OrderedList"&&ti(k.item,i,_),{range:Z.cursor(y+w.length),changes:_}}else{let k=Ro(c,e,O);return{range:Z.cursor(l+k.length+1),changes:{from:O.from,insert:k+e.lineBreak}}}}if(h.node.name=="Blockquote"&&p&&O.from){let b=i.lineAt(O.from-1),Q=/>\s*$/.exec(b.text);if(Q&&Q.index==h.from){let k=e.changes([{from:b.from+Q.index,to:b.to},{from:O.from+h.from,to:O.to}]);return{range:o.map(k),changes:k}}}let u=[];h.node.name=="OrderedList"&&ti(h.item,i,u);let d=h.item&&h.item.from]*/.exec(O.text)[0].length>=h.to)for(let b=0,Q=c.length-1;b<=Q;b++)m+=b==Q&&!d?c[b].marker(i,1):c[b].blank(bO.from&&/\s/.test(O.text.charAt(g-O.from-1));)g--;return m=si(m,e),hu(h.node,e.doc)&&(m=Ro(c,e,O)+e.lineBreak+m),u.push({from:g,to:l,insert:e.lineBreak+m}),{range:Z.cursor(g+m.length+1),changes:u}});return s?!1:(t(e.update(a,{scrollIntoView:!0,userEvent:"input"})),!0)},cu=Ou();function To(r){return r.name=="QuoteMark"||r.name=="ListMark"}function hu(r,e){if(r.name!="OrderedList"&&r.name!="BulletList")return!1;let t=r.firstChild,n=r.getChild("ListItem","ListItem");if(!n)return!1;let i=e.lineAt(t.to),s=e.lineAt(n.from),a=/^[\s>]*$/.test(i.text);return i.number+(a?0:1){let t=R(r),n=null,i=r.changeByRange(s=>{let a=s.from,{doc:o}=r;if(s.empty&&rt.isActiveAt(r,s.from)){let l=o.lineAt(a),O=Co(uu(t,a),o);if(O.length){let c=O[O.length-1],h=c.to-c.spaceAfter.length+(c.spaceAfter?1:0);if(a-l.from>h&&!/\S/.test(l.text.slice(h,a-l.from)))return{range:Z.cursor(l.from+h),changes:{from:l.from+h,to:a}};if(a-l.from==h&&(c.item&&l.from<=c.item.from||/^[\s>]*$/.test(l.text.slice(0,c.to)))){let p=l.from+c.from;if(c.item&&c.node.from{var t;let{main:n}=e.state.selection;if(n.empty)return!1;let i=(t=r.clipboardData)===null||t===void 0?void 0:t.getData("text/plain");if(!i||!/^(https?:\/\/|mailto:|xmpp:|www\.)/.test(i)||(/^www\./.test(i)&&(i="https://"+i),!rt.isActiveAt(e.state,n.from,1)))return!1;let s=R(e.state),a=!1;return s.iterate({from:n.from,to:n.to,enter:o=>{(o.from>n.from||gu.test(o.name))&&(a=!0)},leave:o=>{o.tor.normalize("NFKD"):r=>r,we=class{constructor(e,t,n=0,i=e.length,s,a){this.test=a,this.value={from:0,to:0,precise:!1},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(n,i),this.bufferStart=n,this.normalize=s?o=>s(Lo(o)):Lo,this.query=this.normalize(t)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return W(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let t=ct(e),n=this.bufferStart+this.bufferPos;this.bufferPos+=J(e);let i=this.normalize(t);if(i.length)for(let s=0,a=n,o=!0;;s++){let l=i.charCodeAt(s),O=this.match(l,a,o,this.bufferPos+this.bufferStart,s==i.length-1);if(O)return this.value=O,this;if(s==i.length-1)break;o&&sthis.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let t=this.matchPos<=this.to&&this.re.exec(this.curLine);if(t){let n=this.curLineStart+t.index,i=n+t[0].length;if(this.matchPos=fr(this.text,i+(n==i?1:0)),n==this.curLineStart+this.curLine.length&&this.nextLine(),(nthis.value.to)&&(!this.test||this.test(n,i,t)))return this.value={from:n,to:i,precise:!0,match:t},this;e=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length=n||i.to<=t){let o=new r(t,e.sliceString(t,n));return ai.set(e,o),o}if(i.from==t&&i.to==n)return i;let{text:s,from:a}=i;return a>t&&(s=e.sliceString(t,a)+s,a=t),i.to=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,t=this.re.exec(this.flat.text);if(t&&!t[0]&&t.index==e&&(this.re.lastIndex=e+1,t=this.re.exec(this.flat.text)),t){let n=this.flat.from+t.index,i=n+t[0].length;if((this.flat.to>=this.to||t.index+t[0].length<=this.flat.text.length-10)&&(!this.test||this.test(n,i,t)))return this.value={from:n,to:i,precise:!0,match:t},this.matchPos=fr(this.text,i+(n==i?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=ur.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}};typeof Symbol<"u"&&(hr.prototype[Symbol.iterator]=pr.prototype[Symbol.iterator]=function(){return this});function $u(r){try{return new RegExp(r,ui),!0}catch{return!1}}function fr(r,e){if(e>=r.length)return e;let t=r.lineAt(e),n;for(;e=56320&&n<57344;)e++;return e}var bu=r=>{let e=rs(r,"cm-goto-line");if(e){let a=e.dom.querySelector("input[type=text]");return a&&a.select(),!0}let{state:t}=r,n=String(t.doc.lineAt(r.state.selection.main.head).number),{close:i,result:s}=ts(r,{class:"cm-goto-line",label:t.phrase("Go to line"),input:{type:"text",name:"line",value:n},focus:!0,submitLabel:t.phrase("go")});return s.then(a=>{let o=a&&/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(a.elements.line.value);if(!o){r.dispatch({effects:i});return}let l=t.doc.lineAt(t.selection.main.head),[,O,c,h,p]=o,u=h?+h.slice(1):0,d=c?+c:l.number;if(c&&p){let b=d/100;O&&(b=b*(O=="-"?-1:1)+l.number/t.doc.lines),d=Math.round(t.doc.lines*b)}else c&&O&&(d=d*(O=="-"?-1:1)+l.number);let m=t.doc.line(Math.max(1,Math.min(t.doc.lines,d))),g=Z.cursor(m.from+Math.max(0,Math.min(u,m.length)));r.dispatch({effects:[i,X.scrollIntoView(g.from,{y:"center"})],selection:g})}),!0},Su={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},Uo=Ie.define({combine(r){return ht(r,Su,{highlightWordAroundCursor:(e,t)=>e||t,minSelectionLength:Math.min,maxMatches:Math.min})}});function Vo(r){let e=[yu,wu];return r&&e.push(Uo.of(r)),e}var ku=v.mark({class:"cm-selectionMatch"}),Pu=v.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function Eo(r,e,t,n){return(t==0||r(e.sliceDoc(t-1,t))!=A.Word)&&(n==e.doc.length||r(e.sliceDoc(n,n+1))!=A.Word)}function xu(r,e,t,n){return r(e.sliceDoc(t,t+1))==A.Word&&r(e.sliceDoc(n-1,n))==A.Word}var wu=ve.fromClass(class{constructor(r){this.decorations=this.getDeco(r)}update(r){(r.selectionSet||r.docChanged||r.viewportChanged)&&(this.decorations=this.getDeco(r.view))}getDeco(r){let e=r.state.facet(Uo),{state:t}=r,n=t.selection;if(n.ranges.length>1)return v.none;let i=n.main,s,a=null;if(i.empty){if(!e.highlightWordAroundCursor)return v.none;let l=t.wordAt(i.head);if(!l)return v.none;a=t.charCategorizer(i.head),s=t.sliceDoc(l.from,l.to)}else{let l=i.to-i.from;if(l200)return v.none;if(e.wholeWords){if(s=t.sliceDoc(i.from,i.to),a=t.charCategorizer(i.head),!(Eo(a,t,i.from,i.to)&&xu(a,t,i.from,i.to)))return v.none}else if(s=t.sliceDoc(i.from,i.to),!s)return v.none}let o=[];for(let l of r.visibleRanges){let O=new we(t.doc,s,l.from,l.to);for(;!O.next().done;){let{from:c,to:h}=O.value;if((!a||Eo(a,t,c,h))&&(i.empty&&c<=i.from&&h>=i.to?o.push(Pu.range(c,h)):(c>=i.to||h<=i.from)&&o.push(ku.range(c,h)),o.length>e.maxMatches))return v.none}}return v.set(o)}},{decorations:r=>r.decorations}),yu=X.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),Zu=({state:r,dispatch:e})=>{let{selection:t}=r,n=Z.create(t.ranges.map(i=>r.wordAt(i.head)||Z.cursor(i.head)),t.mainIndex);return n.eq(t)?!1:(e(r.update({selection:n})),!0)};function Xu(r,e){let{main:t,ranges:n}=r.selection,i=r.wordAt(t.head),s=i&&i.from==t.from&&i.to==t.to;for(let a=!1,o=new we(r.doc,e,n[n.length-1].to);;)if(o.next(),o.done){if(a)return null;o=new we(r.doc,e,0,Math.max(0,n[n.length-1].from-1)),a=!0}else{if(a&&n.some(l=>l.from==o.value.from))continue;if(s){let l=r.wordAt(o.value.from);if(!l||l.from!=o.value.from||l.to!=o.value.to)continue}return o.value}}var vu=({state:r,dispatch:e})=>{let{ranges:t}=r.selection;if(t.some(s=>s.from===s.to))return Zu({state:r,dispatch:e});let n=r.sliceDoc(t[0].from,t[0].to);if(r.selection.ranges.some(s=>r.sliceDoc(s.from,s.to)!=n))return!1;let i=Xu(r,n);return i?(e(r.update({selection:r.selection.addRange(Z.range(i.from,i.to),!1),effects:X.scrollIntoView(i.to)})),!0):!1},Le=Ie.define({combine(r){return ht(r,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new ci(e),scrollToMatch:e=>X.scrollIntoView(e)})}});function Go(r){return r?[Le.of(r),hi]:hi}var dr=class{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||"",this.valid=!!this.search&&(!this.regexp||$u(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord,this.test=e.test}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(t,n)=>n=="n"?` +`:n=="r"?"\r":n=="t"?" ":"\\")}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord&&this.test==e.test}create(){return this.regexp?new li(this):new oi(this)}getCursor(e,t=0,n){let i=e.doc?e:Qe.create({doc:e});return n==null&&(n=i.doc.length),this.regexp?it(this,i,t,n):nt(this,i,t,n)}},mr=class{constructor(e){this.spec=e}};function Tu(r,e,t){return(n,i,s,a)=>{if(t&&!t(n,i,s,a))return!1;let o=n>=a&&i<=a+s.length?s.slice(n-a,i-a):e.doc.sliceString(n,i);return r(o,e,n,i)}}function nt(r,e,t,n){let i;return r.wholeWord&&(i=Ru(e.doc,e.charCategorizer(e.selection.main.head))),r.test&&(i=Tu(r.test,e,i)),new we(e.doc,r.unquoted,t,n,r.caseSensitive?void 0:s=>s.toLowerCase(),i)}function Ru(r,e){return(t,n,i,s)=>((s>t||s+i.length=t)return null;i.push(n.value)}return i}highlight(e,t,n,i){let s=nt(this.spec,e,Math.max(0,t-this.spec.unquoted.length),Math.min(n+this.spec.unquoted.length,e.doc.length));for(;!s.next().done;)i(s.value.from,s.value.to)}};function ju(r,e,t){return(n,i,s)=>(!t||t(n,i,s))&&r(s[0],e,n,i)}function it(r,e,t,n){let i;return r.wholeWord&&(i=_u(e.charCategorizer(e.selection.main.head))),r.test&&(i=ju(r.test,e,i)),new hr(e.doc,r.search,{ignoreCase:!r.caseSensitive,test:i},t,n)}function gr(r,e){return r.slice(jr(r,e,!1),e)}function Qr(r,e){return r.slice(e,jr(r,e))}function _u(r){return(e,t,n)=>!n[0].length||(r(gr(n.input,n.index))!=A.Word||r(Qr(n.input,n.index))!=A.Word)&&(r(Qr(n.input,n.index+n[0].length))!=A.Word||r(gr(n.input,n.index+n[0].length))!=A.Word)}var li=class extends mr{nextMatch(e,t,n){let i=it(this.spec,e,n,e.doc.length).next();return i.done&&(i=it(this.spec,e,0,t).next()),i.done?null:i.value}prevMatchInRange(e,t,n){for(let i=1;;i++){let s=Math.max(t,n-i*1e4),a=it(this.spec,e,s,n),o=null;for(;!a.next().done;)o=a.value;if(o&&(s==t||o.from>s+10))return o;if(s==t)return null}}prevMatch(e,t,n){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,n,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&]|\d+)/g,(t,n)=>{if(n=="&")return e.match[0];if(n=="$")return"$";for(let i=n.length;i>0;i--){let s=+n.slice(0,i);if(s>0&&s=t)return null;i.push(n.value)}return i}highlight(e,t,n,i){let s=it(this.spec,e,Math.max(0,t-250),Math.min(n+250,e.doc.length));for(;!s.next().done;)i(s.value.from,s.value.to)}},vt=q.define(),pi=q.define(),xe=ie.define({create(r){return new Xt(Oi(r).create(),null)},update(r,e){for(let t of e.effects)t.is(vt)?r=new Xt(t.value.create(),r.panel):t.is(pi)&&(r=new Xt(r.query,t.value?fi:null));return r},provide:r=>es.from(r,e=>e.panel)});var Xt=class{constructor(e,t){this.query=e,this.panel=t}},Yu=v.mark({class:"cm-searchMatch"}),Cu=v.mark({class:"cm-searchMatch cm-searchMatch-selected"}),zu=ve.fromClass(class{constructor(r){this.view=r,this.decorations=this.highlight(r.state.field(xe))}update(r){let e=r.state.field(xe);(e!=r.startState.field(xe)||r.docChanged||r.selectionSet||r.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:r,panel:e}){if(!e||!r.spec.valid)return v.none;let{view:t}=this,n=new Fi;for(let i=0,s=t.visibleRanges,a=s.length;is[i+1].from-500;)l=s[++i].to;r.highlight(t.state,o,l,(O,c)=>{let h=t.state.selection.ranges.some(p=>p.from==O&&p.to==c);n.add(O,c,h?Cu:Yu)})}return n.finish()}},{decorations:r=>r.decorations});function Tt(r){return e=>{let t=e.state.field(xe,!1);return t&&t.query.spec.valid?r(e,t):Bo(e)}}var $r=Tt((r,{query:e})=>{let{to:t}=r.state.selection.main,n=e.nextMatch(r.state,t,t);if(!n)return!1;let i=Z.single(n.from,n.to),s=r.state.facet(Le);return r.dispatch({selection:i,effects:[di(r,n),s.scrollToMatch(i.main,r)],userEvent:"select.search"}),Do(r),!0}),br=Tt((r,{query:e})=>{let{state:t}=r,{from:n}=t.selection.main,i=e.prevMatch(t,n,n);if(!i)return!1;let s=Z.single(i.from,i.to),a=r.state.facet(Le);return r.dispatch({selection:s,effects:[di(r,i),a.scrollToMatch(s.main,r)],userEvent:"select.search"}),Do(r),!0}),qu=Tt((r,{query:e})=>{let t=e.matchAll(r.state,1e3);return!t||!t.length?!1:(r.dispatch({selection:Z.create(t.map(n=>Z.range(n.from,n.to))),userEvent:"select.search.matches"}),!0)}),Au=({state:r,dispatch:e})=>{let t=r.selection;if(t.ranges.length>1||t.main.empty)return!1;let{from:n,to:i}=t.main,s=[],a=0;for(let o=new we(r.doc,r.sliceDoc(n,i));!o.next().done;){if(s.length>1e3)return!1;o.value.from==n&&(a=s.length),s.push(Z.range(o.value.from,o.value.to))}return e(r.update({selection:Z.create(s,a),userEvent:"select.search.matches"})),!0},Wo=Tt((r,{query:e})=>{let{state:t}=r,{from:n,to:i}=t.selection.main;if(t.readOnly)return!1;let s=e.nextMatch(t,n,n);if(!s)return!1;let a=s,o=[],l,O,c=[];a.precise?a.from==n&&a.to==i&&(O=t.toText(e.getReplacement(a)),o.push({from:a.from,to:a.to,insert:O}),a=e.nextMatch(t,a.from,a.to),c.push(X.announce.of(t.phrase("replaced match on line $",t.doc.lineAt(n).number)+"."))):a=e.nextMatch(t,a.from,a.to);let h=r.state.changes(o);return a&&(l=Z.single(a.from,a.to).map(h),c.push(di(r,a)),c.push(t.facet(Le).scrollToMatch(l.main,r))),r.dispatch({changes:h,selection:l,effects:c,userEvent:"input.replace"}),!0}),Lu=Tt((r,{query:e})=>{if(r.state.readOnly)return!1;let t=[];for(let i of e.matchAll(r.state,1e9)){let{from:s,to:a,precise:o}=i;o&&t.push({from:s,to:a,insert:e.getReplacement(i)})}if(!t.length)return!1;let n=r.state.phrase("replaced $ matches",t.length)+".";return r.dispatch({changes:t,effects:X.announce.of(n),userEvent:"input.replace.all"}),!0});function fi(r){return r.state.facet(Le).createPanel(r)}function Oi(r,e){var t,n,i,s,a;let o=r.selection.main,l=o.empty||o.to>o.from+100?"":r.sliceDoc(o.from,o.to);if(e&&!l)return e;let O=r.facet(Le);return new dr({search:((t=e?.literal)!==null&&t!==void 0?t:O.literal)?l:l.replace(/\n/g,"\\n"),caseSensitive:(n=e?.caseSensitive)!==null&&n!==void 0?n:O.caseSensitive,literal:(i=e?.literal)!==null&&i!==void 0?i:O.literal,regexp:(s=e?.regexp)!==null&&s!==void 0?s:O.regexp,wholeWord:(a=e?.wholeWord)!==null&&a!==void 0?a:O.wholeWord})}function Io(r){let e=zr(r,fi);return e&&e.dom.querySelector("[main-field]")}function Do(r){let e=Io(r);e&&e==r.root.activeElement&&e.select()}var Bo=r=>{let e=r.state.field(xe,!1);if(e&&e.panel){let t=Io(r);if(t&&t!=r.root.activeElement){let n=Oi(r.state,e.query.spec);n.valid&&r.dispatch({effects:vt.of(n)}),t.focus(),t.select()}}else r.dispatch({effects:[pi.of(!0),e?vt.of(Oi(r.state,e.query.spec)):q.appendConfig.of(hi)]});return!0},No=r=>{let e=r.state.field(xe,!1);if(!e||!e.panel)return!1;let t=zr(r,fi);return t&&t.dom.contains(r.root.activeElement)&&r.focus(),r.dispatch({effects:pi.of(!1)}),!0},Fo=[{key:"Mod-f",run:Bo,scope:"editor search-panel"},{key:"F3",run:$r,shift:br,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:$r,shift:br,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:No,scope:"editor search-panel"},{key:"Mod-Shift-l",run:Au},{key:"Mod-Alt-g",run:bu},{key:"Mod-d",run:vu,preventDefault:!0}],ci=class{constructor(e){this.view=e;let t=this.query=e.state.field(xe).query.spec;this.commit=this.commit.bind(this),this.searchField=I("input",{value:t.search,placeholder:F(e,"Find"),"aria-label":F(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=I("input",{value:t.replace,placeholder:F(e,"Replace"),"aria-label":F(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=I("input",{type:"checkbox",name:"case",form:"",checked:t.caseSensitive,onchange:this.commit}),this.reField=I("input",{type:"checkbox",name:"re",form:"",checked:t.regexp,onchange:this.commit}),this.wordField=I("input",{type:"checkbox",name:"word",form:"",checked:t.wholeWord,onchange:this.commit});function n(i,s,a){return I("button",{class:"cm-button",name:i,onclick:s,type:"button"},a)}this.dom=I("div",{onkeydown:i=>this.keydown(i),class:"cm-search"},[this.searchField,n("next",()=>$r(e),[F(e,"next")]),n("prev",()=>br(e),[F(e,"previous")]),n("select",()=>qu(e),[F(e,"all")]),I("label",null,[this.caseField,F(e,"match case")]),I("label",null,[this.reField,F(e,"regexp")]),I("label",null,[this.wordField,F(e,"by word")]),...e.state.readOnly?[]:[I("br"),this.replaceField,n("replace",()=>Wo(e),[F(e,"replace")]),n("replaceAll",()=>Lu(e),[F(e,"replace all")])],I("button",{name:"close",onclick:()=>No(e),"aria-label":F(e,"close"),type:"button"},["\xD7"])])}commit(){let e=new dr({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:vt.of(e)}))}keydown(e){Ki(this.view,e,"search-panel")?e.preventDefault():e.keyCode==13&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?br:$r)(this.view)):e.keyCode==13&&e.target==this.replaceField&&(e.preventDefault(),Wo(this.view))}update(e){for(let t of e.transactions)for(let n of t.effects)n.is(vt)&&!n.value.eq(this.query)&&this.setQuery(n.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(Le).top}};function F(r,e){return r.state.phrase(e)}var Or=30,cr=/[\s\.,:;?!]/;function di(r,{from:e,to:t}){let n=r.state.doc.lineAt(e),i=r.state.doc.lineAt(t).to,s=Math.max(n.from,e-Or),a=Math.min(i,t+Or),o=r.state.sliceDoc(s,a);if(s!=n.from){for(let l=0;lo.length-Or;l--)if(!cr.test(o[l-1])&&cr.test(o[l])){o=o.slice(0,l);break}}return X.announce.of(`${r.state.phrase("current match")}. ${o} ${r.state.phrase("on line")} ${n.number}.`)}var Eu=X.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),hi=[xe,ge.low(zu),Eu];function de(r,e,t=""){let n=r.state.changeByRange(i=>{let{from:s,to:a}=i,o=r.state.sliceDoc(s-e.length,s),l=r.state.sliceDoc(a,a+e.length);if(o===e&&l===e)return{changes:[{from:s-e.length,to:s,insert:""},{from:a,to:a+e.length,insert:""}],range:Z.range(s-e.length,a-e.length)};let O=r.state.sliceDoc(s,a)||t;return{changes:{from:s,to:a,insert:e+O+e},range:Z.range(s+e.length,s+e.length+O.length)}});return r.dispatch(n,{scrollIntoView:!0,userEvent:"input"}),r.focus(),!0}function V(r,e){let{state:t}=r,n=[],i=new Set;for(let a of t.selection.ranges)for(let o=t.doc.lineAt(a.from).number;o<=t.doc.lineAt(a.to).number;o++)i.add(o);let s=/^(\s*)(#{1,6}\s+|>\s?|[-*+]\s+\[[ xX]\]\s+|[-*+]\s+|\d+[.)]\s+)?/;for(let a of i){let o=t.doc.line(a),l=s.exec(o.text),O=l[1],c=l[2]??"",h=o.from+O.length,p=h+c.length;n.push({from:h,to:p,insert:c===e?"":e})}return r.dispatch({changes:n,scrollIntoView:!0,userEvent:"input"}),r.focus(),!0}function mi(r,e,t=!1){let{state:n}=r,i=n.selection.main,s=e;if(t){let a=n.doc.lineAt(i.from);i.from===a.from||(s=` `+s);let l=n.doc.lineAt(i.to);(i.to!==l.to||l.number===n.doc.lines)&&(s+=` -`)}r.dispatch({changes:{from:i.from,to:i.to,insert:s},selection:{anchor:i.from+s.length},scrollIntoView:!0,userEvent:"input"}),r.focus()}function fi(r){let e=r.state.selection.main,t=r.state.sliceDoc(e.from,e.to)||"\u94FE\u63A5",n=`[${t}](https://)`;return r.dispatch({changes:{from:e.from,to:e.to,insert:n},selection:Z.range(e.from+t.length+3,e.from+n.length-1),userEvent:"input"}),r.focus(),!0}function di(r){let e=r.state.selection.main,t=r.state.sliceDoc(e.from,e.to);return r.dispatch({changes:{from:e.from,to:e.to,insert:`[[${t}]]`},selection:{anchor:e.from+2+t.length},userEvent:"input"}),r.focus(),!0}var No=null,Fo="",Au=0,it=new Map;function gi(){return typeof document<"u"&&document.documentElement.dataset.theme==="dark"?"dark":"neutral"}async function Lu(){No??=import("./chunks/mermaid.core-3W6VKKIW.js").then(t=>t.default);let r=await No,e=gi();return Fo!==e&&(r.initialize({startOnLoad:!1,securityLevel:"strict",theme:e,fontFamily:"inherit"}),Fo=e),r}async function Eu(r){let e=gi()+` -`+r,t=it.get(e);if(t)return t;let n=await Lu(),i=`ivy-mermaid-${++Au}`;try{let{svg:s}=await n.render(i,r);return it.size>64&&it.delete(it.keys().next().value),it.set(e,s),s}finally{document.getElementById("d"+i)?.remove(),document.getElementById(i)?.remove()}}function Wu(r,e){return r.classList.add("mermaid-diagram"),r.setAttribute("role","img"),r.setAttribute("aria-label","Mermaid"),Eu(e).then(n=>{r.innerHTML=n,r.classList.remove("mermaid-error")},n=>{r.classList.add("mermaid-error"),r.textContent="Mermaid: "+String(n?.message??n).split(` -`)[0]})}var mi=class extends ee{constructor(t){super();this.code=t}eq(t){return t.code===this.code}toDOM(){let t=document.createElement("div");t.className="cm-mermaid";let n=gi()+` -`+this.code,i=it.get(n);return i?(t.classList.add("mermaid-diagram"),t.innerHTML=i):(t.classList.add("cm-mermaid-loading"),Wu(t,this.code).finally(()=>t.classList.remove("cm-mermaid-loading"))),t}get estimatedHeight(){return 200}ignoreEvent(){return!1}};function Mu(r){let e=[];return R(r).iterate({enter(t){if(t.name!=="FencedCode")return;let n=t.node.getChild("CodeInfo");if(!n||r.sliceDoc(n.from,n.to).trim().toLowerCase()!=="mermaid")return!1;let i=t.node.getChild("CodeText");return e.push({from:t.from,to:t.to,code:i?r.sliceDoc(i.from,i.to):""}),!1}}),e}function Qi(r,e,t){return r.selection.ranges.some(n=>n.from<=t&&n.to>=e)}var Ho=q.define();function Ko(r,e){let t=[];for(let n of Mu(r)){if(e&&Qi(r,n.from,n.to)||!n.code.trim())continue;let i=r.doc.lineAt(n.from).from,s=r.doc.lineAt(n.to).to;t.push(v.replace({widget:new mi(n.code),block:!0}).range(i,s))}return v.set(t,!0)}function Jo(){return[ie.define({create:e=>({focused:!1,deco:Ko(e,!1)}),update(e,t){let n=e.focused;for(let i of t.effects)i.is(Ho)&&(n=i.value);return n!==e.focused||t.docChanged||t.selection||R(t.startState)!==R(t.state)?{focused:n,deco:Ko(t.state,n)}:e},provide:e=>X.decorations.from(e,t=>t.deco)}),X.focusChangeEffect.of((e,t)=>Ho.of(t)),X.domEventHandlers({mousedown(e,t){let n=e.target.closest(".cm-mermaid");if(!n)return!1;let i=t.posAtDOM(n),s=t.state.doc.lineAt(i);e.preventDefault();let a=s.number"']/g,e=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[e])}function el(r){let e=r.trim();return e.startsWith("|")&&(e=e.slice(1)),e.endsWith("|")&&!e.endsWith("\\|")&&(e=e.slice(0,-1)),e.split(/(?t.trim().replace(/\\\|/g,"|"))}function Vu(r){let e=r.split(` -`).filter(i=>i.trim());if(e.length<2)return"";let t=el(e[1]).map(i=>/^:-+:$/.test(i)?"center":/^-+:$/.test(i)?"right":""),n=(i,s)=>""+el(i).map((a,o)=>`<${s}${t[o]?` style="text-align:${t[o]}"`:""}>${Uu(a)}`).join("")+"";return`${n(e[0],"th")}${e.slice(2).map(i=>n(i,"td")).join("")}
`}var $i=class extends ee{constructor(t,n){super();this.src=t;this.render=n}eq(t){return t.src===this.src}toDOM(){let t=document.createElement("div");return t.className="cm-table prose-ivy",t.innerHTML=this.render(this.src),t}ignoreEvent(){return!1}};function Gu(r){let e=[];return R(r).iterate({enter(t){if(t.name==="Table")return e.push({from:t.from,to:t.to}),!1;if(t.name==="FencedCode"||t.name==="CodeBlock")return!1}}),e}var tl=q.define();function nl(r,e,t){return r.selection.ranges.some(n=>n.from<=t&&n.to>=e)}function rl(r,e,t){let n=[];for(let i of Gu(r)){if(e&&nl(r,i.from,i.to))continue;let s=r.doc.lineAt(i.from).from,a=r.doc.lineAt(i.to).to;n.push(v.replace({widget:new $i(r.sliceDoc(s,a),t),block:!0}).range(s,a))}return v.set(n,!0)}function il(r,e,t,n){return!(n&&nl(r,e,t))}function sl(r){let e=n=>r.renderBlock?.(n)||Vu(n);return[ie.define({create:n=>({focused:!1,deco:rl(n,!1,e)}),update(n,i){let s=n.focused;for(let a of i.effects)a.is(tl)&&(s=a.value);return s!==n.focused||i.docChanged||i.selection||R(i.startState)!==R(i.state)?{focused:s,deco:rl(i.state,s,e)}:n},provide:n=>X.decorations.from(n,i=>i.deco)}),X.focusChangeEffect.of((n,i)=>tl.of(i)),X.domEventHandlers({mousedown(n,i){let s=n.target.closest(".cm-table");if(!s)return!1;let a=n.target.closest("a");if(n.preventDefault(),a?.dataset.note||a?.classList.contains("missing"))return r.openNote(a.dataset.note??"",a.dataset.title??a.textContent??"",n.button===1||n.shiftKey),!0;if(a?.href&&/^https?:/i.test(a.href))return window.open(a.href,"_blank","noopener"),!0;let o=i.posAtDOM(s),l=i.state.doc.lineAt(o),O=n.target.closest("tr"),c=[...s.querySelectorAll("tr")],h=O?c.indexOf(O):0;h>0&&h++;let p=i.state.doc.line(Math.min(l.number+Math.max(0,h),i.state.doc.lines));return i.dispatch({selection:{anchor:p.from+Math.min(2,p.length)}}),i.focus(),!0}})]}var Iu=/^ivy:\/\/res\/([A-Za-z0-9_-]{8,64})/,Si=class extends ee{constructor(t,n,i){super();this.src=t;this.alt=n;this.kind=i}eq(t){return t.src===this.src&&t.alt===this.alt&&t.kind===this.kind}toDOM(){let t=document.createElement("span");if(t.className="cm-media",this.kind==="video"||this.kind==="audio"){let n=document.createElement(this.kind);n.src=this.src,n.controls=!0,n.preload="metadata",t.appendChild(n)}else if(this.kind==="file"){let n=document.createElement("a");n.className="cm-file-card",n.href=this.src,n.target="_blank",n.rel="noopener",n.textContent="\u{1F4CE} "+(this.alt||"file"),t.appendChild(n)}else{let n=document.createElement("img");n.src=this.src,n.alt=this.alt,n.loading="lazy",n.onerror=()=>t.classList.add("cm-media-broken"),t.appendChild(n)}return t}ignoreEvent(){return!1}},ki=class extends ee{constructor(t,n){super();this.checked=t;this.pos=n}eq(t){return t.checked===this.checked&&t.pos===this.pos}toDOM(t){let n=document.createElement("input");return n.type="checkbox",n.className="cm-task",n.checked=this.checked,n.setAttribute("aria-label",this.checked?"\u5DF2\u5B8C\u6210":"\u5F85\u529E"),n.addEventListener("mousedown",i=>{i.preventDefault();let a=t.state.sliceDoc(this.pos,this.pos+3)==="[ ]"?"[x]":"[ ]";t.dispatch({changes:{from:this.pos,to:this.pos+3,insert:a}})}),n}ignoreEvent(){return!0}},Pi=class extends ee{toDOM(){let e=document.createElement("span");return e.className="cm-hr-widget",e}eq(){return!0}},xi=class extends ee{toDOM(){let e=document.createElement("span");return e.className="cm-bullet",e.textContent="\u2022",e}eq(){return!0}},se=v.replace({}),bi=r=>v.line({class:r}),Tt=r=>v.mark({class:r});function Du(r){let e=new Set;for(let t of r.selection.ranges){let n=r.doc.lineAt(t.from).number,i=r.doc.lineAt(t.to).number;for(let s=n;s<=i;s++)e.add(s)}return e}function Bu(r,e,t){return r.selection.ranges.some(n=>n.from<=t&&n.to>=e)}var Nu=/\[\[([^[\]\n]+?)\]\]/g;function al(r,e,t){let{state:n}=r,i=[],s=t?Du(n):new Set,a=c=>s.has(n.doc.lineAt(c).number),o=(c,h)=>t&&Bu(n,c,h),l=[];for(let{from:c,to:h}of r.visibleRanges){R(n).iterate({from:c,to:h,enter(u){let d=u.name,m=/^ATXHeading(\d)$/.exec(d);if(m){let g=n.doc.lineAt(u.from);if(i.push(bi(`cm-h cm-h${m[1]}`).range(g.from)),!a(u.from)){let b=u.node.getChild("HeaderMark");b&&i.push(se.range(b.from,Math.min(b.to+1,g.to)))}return}switch(d){case"Table":return il(n,u.from,u.to,t)?!1:void 0;case"FencedCode":case"CodeBlock":{l.push([u.from,u.to]);let g=u.node.getChild("CodeInfo"),b=u.node.getChild("CodeText");if(g&&b&&n.sliceDoc(g.from,g.to).trim().toLowerCase()==="mermaid"&&n.sliceDoc(b.from,b.to).trim()&&!(t&&Qi(n,u.from,u.to)))return!1;let Q=n.doc.lineAt(u.from).number,k=n.doc.lineAt(u.to).number;if(d==="FencedCode"&&!o(u.from,u.to)){let y=n.doc.line(Q),w=n.doc.line(k);y.to>y.from&&i.push(se.range(y.from,y.to)),k!==Q&&w.to>w.from&&/^\s*(```|~~~)/.test(w.text)&&i.push(se.range(w.from,w.to))}for(let y=Q;y<=k;y++){let w=n.doc.line(y),_="cm-codeblock";y===Q&&(_+=" cm-codeblock-first"),y===k&&(_+=" cm-codeblock-last"),i.push(bi(_).range(w.from))}return!1}case"StrongEmphasis":case"Emphasis":case"Strikethrough":case"InlineCode":{let g=d==="StrongEmphasis"?"cm-strong":d==="Emphasis"?"cm-em":d==="Strikethrough"?"cm-strike":"cm-inline-code";if(i.push(Tt(g).range(u.from,u.to)),!o(u.from,u.to)){let b=d==="InlineCode"?"CodeMark":d==="Strikethrough"?"StrikethroughMark":"EmphasisMark",Q=u.node.firstChild;for(;Q;)Q.name===b&&i.push(se.range(Q.from,Q.to)),Q=Q.nextSibling}return d!=="InlineCode"}case"Link":{if(o(u.from,u.to))return;let g=u.node.getChildren("LinkMark"),b=u.node.getChild("URL");return g.length>=2&&(i.push(se.range(g[0].from,g[0].to)),i.push(Tt("cm-link").range(g[0].to,g[1].from)),i.push(se.range(g[1].from,u.to))),!1}case"Image":{let g=u.node.getChild("URL");if(!g)return!1;let b=n.sliceDoc(g.from,g.to),Q=Iu.exec(b),k=Q?e.resolveResource(Q[1]):b,y=Q?e.resourceKind(Q[1]):void 0,w=u.node.getChildren("LinkMark"),_=w.length>=2?n.sliceDoc(w[0].to,w[1].from):"";if(!k||/^javascript:/i.test(k))return!1;let G=new Si(k,_,y);return a(u.from)?i.push(v.widget({widget:G,side:1}).range(u.to)):i.push(v.replace({widget:G}).range(u.from,u.to)),!1}case"Blockquote":{let g=n.doc.lineAt(u.from).number,b=n.doc.lineAt(u.to).number;for(let Q=g;Q<=b;Q++)i.push(bi("cm-quote").range(n.doc.line(Q).from));return}case"QuoteMark":{if(!a(u.from)){let g=n.sliceDoc(u.to,u.to+1)===" "?u.to+1:u.to;i.push(se.range(u.from,g))}return}case"HorizontalRule":{a(u.from)||i.push(v.replace({widget:new Pi}).range(u.from,u.to));return}case"ListMark":{let g=n.sliceDoc(u.from,u.to),b=g==="-"||g==="*"||g==="+",Q=n.sliceDoc(u.to,u.to+4),k=/^ \[[ xX]\]/.test(Q);b&&!a(u.from)?k?i.push(se.range(u.from,u.to+1)):i.push(v.replace({widget:new xi}).range(u.from,u.to)):i.push(Tt("cm-list-mark").range(u.from,u.to));return}case"TaskMarker":{let g=/x/i.test(n.sliceDoc(u.from,u.to));if(!o(u.from,u.to)&&(i.push(v.replace({widget:new ki(g,u.from)}).range(u.from,u.to)),g)){let b=n.doc.lineAt(u.from);u.to+1d>=w&&m<=_))continue;let g=u[1],b=g.indexOf("|"),Q=(b>=0?g.slice(0,b):g).split("#")[0].trim(),k=!!e.resolveTitle(Q),y={"data-wiki":Q};if(o(d,m)){i.push(v.mark({class:"cm-wikilink cm-wikilink-src"+(k?"":" cm-wikilink-missing"),attributes:y}).range(d,m));continue}i.push(se.range(d,d+2+(b>=0?b+1:0))),i.push(v.mark({class:"cm-wikilink cm-wikilink-rendered"+(k?"":" cm-wikilink-missing"),attributes:y}).range(d+2+(b>=0?b+1:0),m-2)),i.push(se.range(m-2,m))}}let O=i.filter(c=>c.value.point===!0);return{all:v.set(i,!0),atomic:v.set(O,!0)}}function ol(r){let e=Xe.fromClass(class{decorations;atomic;constructor(t){let n=al(t,r,t.hasFocus);this.decorations=n.all,this.atomic=n.atomic}update(t){if(t.docChanged||t.viewportChanged||t.selectionSet||t.focusChanged||R(t.startState)!==R(t.state)){let n=al(t.view,r,t.view.hasFocus);this.decorations=n.all,this.atomic=n.atomic}}},{decorations:t=>t.decorations,eventHandlers:{mousedown(t,n){let i=t.target.closest(".cm-wikilink");if(!i)return!1;let s=i.classList.contains("cm-wikilink-rendered"),a=t.button===1||t.shiftKey;if(t.button>1||!s&&!(t.metaKey||t.ctrlKey||t.button===1))return!1;let o=i.dataset.wiki??"";return t.preventDefault(),r.openNote(r.resolveTitle(o),o,a),!0},click(t){let n=t.target.closest(".cm-link, .cm-file-card");return n&&(t.metaKey||t.ctrlKey)&&n instanceof HTMLAnchorElement?(window.open(n.href,"_blank","noopener"),!0):!1}}});return[e,Jo(),sl(r),X.atomicRanges.of(t=>t.plugin(e)?.atomic??v.none)]}var ll=X.theme({"&":{color:"rgb(var(--ink))",backgroundColor:"transparent",height:"100%"},"&.cm-focused":{outline:"none"},".cm-scroller":{fontFamily:"inherit",lineHeight:"1.85",overflow:"visible"},".cm-content":{padding:"0 0 40vh",caretColor:"rgb(var(--ivy))"},".cm-line":{padding:"0"},".cm-cursor, .cm-dropCursor":{borderLeftColor:"rgb(var(--ivy))",borderLeftWidth:"2px"},"&.cm-focused .cm-selectionBackground, .cm-selectionBackground, ::selection":{backgroundColor:"rgb(var(--ivy) / 0.2) !important"},".cm-placeholder":{color:"rgb(var(--faint))"},".cm-tooltip":{border:"none",backgroundColor:"rgb(var(--surface))",borderRadius:"14px",boxShadow:"var(--shadow-lift)",overflow:"hidden"},".cm-tooltip-autocomplete > ul":{fontFamily:"inherit",maxHeight:"260px",padding:"4px"},".cm-tooltip-autocomplete > ul > li":{padding:"7px 10px",borderRadius:"10px",lineHeight:"1.4"},".cm-tooltip-autocomplete > ul > li[aria-selected]":{backgroundColor:"rgb(var(--sunken))",color:"rgb(var(--ink))"},".cm-completionDetail":{marginLeft:"8px",color:"rgb(var(--muted))",fontStyle:"normal",fontSize:"12px"},".cm-completionIcon":{display:"none"},".cm-panels":{backgroundColor:"rgb(var(--surface))",color:"rgb(var(--ink))",border:"none"},".cm-searchMatch":{backgroundColor:"rgb(var(--warn) / 0.3)"},".cm-searchMatch-selected":{backgroundColor:"rgb(var(--warn) / 0.55)"}}),Ol=Os(ls.define([{tag:f.heading,fontWeight:"600"},{tag:f.strong,fontWeight:"600"},{tag:f.emphasis,fontStyle:"italic"},{tag:f.strikethrough,textDecoration:"line-through"},{tag:f.link,color:"rgb(var(--ivy))"},{tag:f.url,color:"rgb(var(--ivy))"},{tag:f.monospace,fontFamily:"var(--font-mono)",color:"rgb(var(--warn-ink))"},{tag:f.quote,color:"rgb(var(--ink-2))"},{tag:[f.processingInstruction,f.contentSeparator,f.meta],color:"rgb(var(--faint))"},{tag:f.labelName,color:"rgb(var(--muted))"}]));function cl(r){return e=>{let t=e.matchBefore(/\[\[[^\]\n|#]*$/);if(!t)return null;let n=t.text.slice(2).toLowerCase(),i=e.state.sliceDoc(e.pos,e.pos+2),s=[],a=new Set;for(let o of r())if(!(!o.title||a.has(o.title))&&(a.add(o.title),!(n&&!o.title.toLowerCase().includes(n))&&(s.push({label:o.title,detail:o.detail,type:"text",boost:o.title.toLowerCase().startsWith(n)?1:0,apply:(l,O,c,h)=>{let p=i==="]]"?"":"]]";l.dispatch({changes:{from:c,to:h,insert:O.label+p},selection:{anchor:c+O.label.length+2}})}}),s.length>=50)))break;if(n&&!a.has(t.text.slice(2))){let o=t.text.slice(2);s.push({label:o,detail:"\u65B0\u5EFA\u94FE\u63A5",type:"keyword",boost:-1,apply:(l,O,c,h)=>l.dispatch({changes:{from:c,to:h,insert:o+(i==="]]"?"":"]]")},selection:{anchor:c+o.length+2}})})}return{from:t.from+2,options:s,validFor:/^[^\]\n|#]*$/}}}function br(r){return r.trim().replace(/\s+/g," ").toLowerCase()}function hl(r){let e=r,t,n,i=e.indexOf("|");i>=0&&(t=e.slice(i+1).trim(),e=e.slice(0,i));let s=e.indexOf("#");return s>=0&&(n=e.slice(s+1).trim(),e=e.slice(0,s)),{target:e.trim(),alias:t,heading:n}}function Xi(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Me=Xi();function kl(r){Me=r}var Ee={exec:()=>null};function Le(r){let e=[];return t=>{let n=Math.max(0,Math.min(3,t-1)),i=e[n];return i||(i=r(n),e[n]=i),i}}function x(r,e=""){let t=typeof r=="string"?r:r.source,n={replace:(i,s)=>{let a=typeof s=="string"?s:s.source;return a=a.replace(Y.caret,"$1"),t=t.replace(i,a),n},getRegex:()=>new RegExp(t,e)};return n}var Pl=((r="")=>{try{return!!new RegExp("(?<=1)(?/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+)[ \t]*)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,blockquoteMarkerWhitespace:/^( {0,3}>)([ \t]+)/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\][ \t]+\S/,listReplaceTask:/^\[[ xX]\][ \t]+/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,numericCharacterReference:/&#(?:(\d{1,7})|[Xx]([A-Fa-f0-9]{1,6}));/,numericCharacterReferenceOrAmpersand:/&#(?:(\d{1,7})|[Xx]([A-Fa-f0-9]{1,6}));|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:r=>new RegExp(`^( {0,3}${r})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:Le(r=>new RegExp(`^ {0,${r}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:Le(r=>new RegExp(`^ {0,${r}}((?:-[ ]*){3,}|(?:_[ ]*){3,}|(?:\\*[ ]*){3,})(?:\\n+|$)`)),fencesBeginRegex:Le(r=>new RegExp(`^ {0,${r}}(?:\`\`\`|~~~)`)),headingBeginRegex:Le(r=>new RegExp(`^ {0,${r}}#{1,6}(?:\\s|$)`)),pedanticHeadingBeginRegex:Le(r=>new RegExp(`^ {0,${r}}#`)),htmlBeginRegex:Le(r=>new RegExp(`^ {0,${r}}(?:)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|new RegExp(`^ {0,${r}}>`))},Fu=/^(?:[ \t]*(?:\n|$))+/,Hu=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Ku=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}(?:(?=`)\1`*|(?=~)\1~*) *(?=\n|$)|$)/,_t=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Ju=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,vi=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,xl=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |fences|blockquote|heading|hr|html|table))+?)\n {0,3}(=+|-+)[ \t]*(?:\n+|$)/,wl=x(xl).replace(/bull/g,vi).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/hr/g,/ {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),ep=x(xl).replace(/bull/g,vi).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/hr/g,/ {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Ti=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/,tp=/^[^\n]+/,Ri=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\\n]|\n(?![ \t]*\n))+/,rp=x(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Ri).replace("title",/(?:"(?:\\[\s\S]|[^"\\])*"|'(?:\\[\s\S]|[^'\\\n]|\n(?!\n))*'|\((?:\\[\s\S]|[^()\\])*\))/).getRegex(),np=x(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,vi).getRegex(),Yt="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",ji=/|$))/,ip=x("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|[^\\n]*\\n*|$)|[^\\n]*\\n*|$)||$)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!(?:script|pre|style|textarea)(?![a-z0-9-]))([a-z][a-z0-9-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",ji).replace("tag",Yt).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),yl=r=>x(Ti).replace("hr",_t).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list",r).replace("html"," {0,3}(?:)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?| ?(?:(?![ \t]*(?:\n|$))(paragraph)|[^\n]*)(?:\n|$))+/).replace("paragraph",ap).getRegex(),_i={blockquote:op,code:Hu,def:rp,fences:Ku,heading:Ju,hr:_t,html:ip,lheading:wl,list:np,newline:Fu,paragraph:sp,table:Ee,text:tp},ul=x("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",_t).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html"," {0,3}(?:)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html"," {0,3}(?:)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|(?: *\\n{2,}|\\s*$)|\\s]*)*?/?>(?: *\\n{2,}|\\s*$))`).replace("comment",ji).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Ee,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:x(Ti).replace("hr",_t).replace("heading",` *#{1,6} *[^ -]`).replace("lheading",wl).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},cp=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,hp=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Zl=/^( {2,}|\\)\n(?!\s*$)[ \t]*/,up=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\`+)[^`]+\k(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Pl?"(?`+)[^`]+\k(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),vl=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,Qp=x(vl,"u").replace(/punct/g,ae).getRegex(),$p=x(vl,"u").replace(/punct/g,Xl).getRegex(),bp=/^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/,Sp=x(bp,"u").replace(/openQuote/g,fp).replace(/punct/g,ae).getRegex(),Tl="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",kp=x(Tl,"gu").replace(/notPunctSpace/g,Ct).replace(/punctSpace/g,ot).replace(/punct/g,ae).getRegex(),Pp=x(Tl,"gu").replace(/notPunctSpace/g,mp).replace(/punctSpace/g,dp).replace(/punct/g,Xl).getRegex(),xp="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)",wp=x(xp,"gu").replace(/notPunctSpace/g,Ct).replace(/punctSpace/g,ot).replace(/punct/g,ae).getRegex(),yp=x("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Ct).replace(/punctSpace/g,ot).replace(/punct/g,ae).getRegex(),Zp="^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)",Xp=x(Zp,"gu").replace(/notPunctSpace/g,Ct).replace(/punctSpace/g,ot).replace(/punct/g,ae).getRegex(),vp=x(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,ae).getRegex(),Tp="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",Rp=x(Tp,"gu").replace(/notPunctSpace/g,Ct).replace(/punctSpace/g,ot).replace(/punct/g,ae).getRegex(),jp=x(/\\(punct)/,"gu").replace(/punct/g,ae).getRegex(),_p=x(/(`+)(?:[^`]|[^`][\s\S]*?[^`])\1(?!`)|`+|\\(punct)/,"gu").replace(/punct/g,ae).getRegex(),Yp=x(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Cp=x(ji).replace("(?:-->|$)","-->").getRegex(),zp=x("^comment|^|^<[a-zA-Z][a-zA-Z0-9-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",Cp).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Rl=/\[(?:\\[\s\S]|[^\[\]\\])*\]/,Pr=x(/(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/).replace("brackets",Rl).getRegex(),qp=x(/^!?\[(label)\]\([ \t\n]*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?[ \t\n]*\)/).replace("label",Pr).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title",/"(?:\\[\s\S]|[^"\\])*"|'(?:\\[\s\S]|[^'\\])*'|\((?:\\[\s\S]|[^)\\])*\)/).getRegex(),Ap=x(/^!?\[(label)\]\[(ref)\]/).replace("label",Pr).replace("ref",Ri).getRegex(),Lp=x(/^!?\[(ref)\](?:\[\])?/).replace("ref",Ri).getRegex(),pl=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\]){1,999}/,Ep=x(/(?:[^\[\]\\`]*(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\]))){0,999}?[^\[\]\\`]*?/).replace("brackets",Rl).getRegex(),Wp=x("reflink|nolink(?!\\()","g").replace("reflink",x(/^!?\[(label)\]\[(ref)\]/).replace("label",Ep).replace("ref",pl).getRegex()).replace("nolink",x(/^!?\[(ref)\](?:\[\])?/).replace("ref",pl).getRegex()).getRegex(),fl=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Mp=/[A-Za-z0-9._+-]+@[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/,Up=x(/(?:mailto:email|xmpp:email(?:\/[A-Za-z0-9@.]+)?)/).replace(/email/g,Mp).getRegex(),Yi={_backpedal:Ee,anyPunctuation:jp,anyPunctuationOutsideCode:_p,autolink:Yp,blockSkip:gp,br:Zl,code:hp,del:Ee,delLDelim:Ee,delRDelim:Ee,emStrongLDelim:Qp,emStrongRDelimAst:kp,emStrongRDelimUnd:yp,escape:cp,link:qp,nolink:Lp,punctuation:pp,reflink:Ap,reflinkSearch:Wp,tag:zp,text:up,url:Ee},Vp={...Yi,emStrongLDelim:Sp,emStrongRDelimAst:wp,emStrongRDelimUnd:Xp,link:x(/^!?\[(label)\]\((.*?)\)/).replace("label",Pr).getRegex(),reflink:x(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Pr).getRegex()},wi={...Yi,emStrongRDelimAst:Pp,emStrongLDelim:$p,delLDelim:vp,delRDelim:Rp,url:x(/^emailProtocol|^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("emailProtocol",Up).replace("protocol",fl).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:x(/^(?:[^a-zA-Z0-9](?=emailProtocol)|(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\":">",'"':""","'":"'"},dl=r=>Ip[r];function H(r,e){if(e){if(Y.escapeTest.test(r))return r.replace(Y.escapeReplace,dl)}else if(Y.escapeTestNoEncode.test(r))return r.replace(Y.escapeReplaceNoEncode,dl);return r}function Dp(r){return Y.numericCharacterReference.test(r)?r.replace(Y.numericCharacterReferenceOrAmpersand,(e,t,n)=>{if(t===void 0&&n===void 0)return"&";let i=t===void 0?Number.parseInt(n,16):Number.parseInt(t,10);return i===0||i>1114111||i>=55296&&i<=57343?"\uFFFD":i===38?"&":String.fromCodePoint(i)}):r}function ml(r){try{r=encodeURI(r).replace(Y.percentDecode,"%")}catch{return null}return r}function gl(r,e){let t=r.replace(Y.findPipe,(s,a,o)=>{let l=!1,O=a;for(;--O>=0&&o[O]==="\\";)l=!l;return l?"|":" |"}),n=t.split(Y.splitPipe),i=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),e)if(n.length>e)n.splice(e);else for(;n.lengtht.default);let r=await Ho,e=bi();return Ko!==e&&(r.initialize({startOnLoad:!1,securityLevel:"strict",theme:e,fontFamily:"inherit"}),Ko=e),r}async function Uu(r){let e=bi()+` +`+r,t=st.get(e);if(t)return t;let n=await Mu(),i=`ivy-mermaid-${++Wu}`;try{let{svg:s}=await n.render(i,r);return st.size>64&&st.delete(st.keys().next().value),st.set(e,s),s}finally{document.getElementById("d"+i)?.remove(),document.getElementById(i)?.remove()}}function Vu(r,e){return r.classList.add("mermaid-diagram"),r.setAttribute("role","img"),r.setAttribute("aria-label","Mermaid"),Uu(e).then(n=>{r.innerHTML=n,r.classList.remove("mermaid-error")},n=>{r.classList.add("mermaid-error"),r.textContent="Mermaid: "+String(n?.message??n).split(` +`)[0]})}var $i=class extends ee{constructor(t){super();this.code=t}eq(t){return t.code===this.code}toDOM(){let t=document.createElement("div");t.className="cm-mermaid";let n=bi()+` +`+this.code,i=st.get(n);return i?(t.classList.add("mermaid-diagram"),t.innerHTML=i):(t.classList.add("cm-mermaid-loading"),Vu(t,this.code).finally(()=>t.classList.remove("cm-mermaid-loading"))),t}get estimatedHeight(){return 200}ignoreEvent(){return!1}};function Gu(r){let e=[];return R(r).iterate({enter(t){if(t.name!=="FencedCode")return;let n=t.node.getChild("CodeInfo");if(!n||r.sliceDoc(n.from,n.to).trim().toLowerCase()!=="mermaid")return!1;let i=t.node.getChild("CodeText");return e.push({from:t.from,to:t.to,code:i?r.sliceDoc(i.from,i.to):""}),!1}}),e}function Si(r,e,t){return r.selection.ranges.some(n=>n.from<=t&&n.to>=e)}var Jo=q.define();function el(r,e){let t=[];for(let n of Gu(r)){if(e&&Si(r,n.from,n.to)||!n.code.trim())continue;let i=r.doc.lineAt(n.from).from,s=r.doc.lineAt(n.to).to;t.push(v.replace({widget:new $i(n.code),block:!0}).range(i,s))}return v.set(t,!0)}function tl(){return[ie.define({create:e=>({focused:!1,deco:el(e,!1)}),update(e,t){let n=e.focused;for(let i of t.effects)i.is(Jo)&&(n=i.value);return n!==e.focused||t.docChanged||t.selection||R(t.startState)!==R(t.state)?{focused:n,deco:el(t.state,n)}:e},provide:e=>X.decorations.from(e,t=>t.deco)}),X.focusChangeEffect.of((e,t)=>Jo.of(t)),X.domEventHandlers({mousedown(e,t){let n=e.target.closest(".cm-mermaid");if(!n)return!1;let i=t.posAtDOM(n),s=t.state.doc.lineAt(i);e.preventDefault();let a=s.number"']/g,e=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[e])}function rl(r){let e=r.trim();return e.startsWith("|")&&(e=e.slice(1)),e.endsWith("|")&&!e.endsWith("\\|")&&(e=e.slice(0,-1)),e.split(/(?t.trim().replace(/\\\|/g,"|"))}function Du(r){let e=r.split(` +`).filter(i=>i.trim());if(e.length<2)return"";let t=rl(e[1]).map(i=>/^:-+:$/.test(i)?"center":/^-+:$/.test(i)?"right":""),n=(i,s)=>""+rl(i).map((a,o)=>`<${s}${t[o]?` style="text-align:${t[o]}"`:""}>${Iu(a)}`).join("")+"";return`${n(e[0],"th")}${e.slice(2).map(i=>n(i,"td")).join("")}
`}var ki=class extends ee{constructor(t,n){super();this.src=t;this.render=n}eq(t){return t.src===this.src}toDOM(){let t=document.createElement("div");return t.className="cm-table prose-ivy",t.innerHTML=this.render(this.src),t}ignoreEvent(){return!1}};function Bu(r){let e=[];return R(r).iterate({enter(t){if(t.name==="Table")return e.push({from:t.from,to:t.to}),!1;if(t.name==="FencedCode"||t.name==="CodeBlock")return!1}}),e}var nl=q.define();function sl(r,e,t){return r.selection.ranges.some(n=>n.from<=t&&n.to>=e)}function il(r,e,t){let n=[];for(let i of Bu(r)){if(e&&sl(r,i.from,i.to))continue;let s=r.doc.lineAt(i.from).from,a=r.doc.lineAt(i.to).to;n.push(v.replace({widget:new ki(r.sliceDoc(s,a),t),block:!0}).range(s,a))}return v.set(n,!0)}function al(r,e,t,n){return!(n&&sl(r,e,t))}function ol(r){let e=n=>r.renderBlock?.(n)||Du(n);return[ie.define({create:n=>({focused:!1,deco:il(n,!1,e)}),update(n,i){let s=n.focused;for(let a of i.effects)a.is(nl)&&(s=a.value);return s!==n.focused||i.docChanged||i.selection||R(i.startState)!==R(i.state)?{focused:s,deco:il(i.state,s,e)}:n},provide:n=>X.decorations.from(n,i=>i.deco)}),X.focusChangeEffect.of((n,i)=>nl.of(i)),X.domEventHandlers({mousedown(n,i){let s=n.target.closest(".cm-table");if(!s)return!1;let a=n.target.closest("a");if(n.preventDefault(),a?.dataset.note||a?.classList.contains("missing"))return r.openNote(a.dataset.note??"",a.dataset.title??a.textContent??"",n.button===1||n.shiftKey),!0;if(a?.href&&/^https?:/i.test(a.href))return window.open(a.href,"_blank","noopener"),!0;let o=i.posAtDOM(s),l=i.state.doc.lineAt(o),O=n.target.closest("tr"),c=[...s.querySelectorAll("tr")],h=O?c.indexOf(O):0;h>0&&h++;let p=i.state.doc.line(Math.min(l.number+Math.max(0,h),i.state.doc.lines));return i.dispatch({selection:{anchor:p.from+Math.min(2,p.length)}}),i.focus(),!0}})]}var Nu=/^ivy:\/\/res\/([A-Za-z0-9_-]{8,64})/,xi=class extends ee{constructor(t,n,i){super();this.src=t;this.alt=n;this.kind=i}eq(t){return t.src===this.src&&t.alt===this.alt&&t.kind===this.kind}toDOM(){let t=document.createElement("span");if(t.className="cm-media",this.kind==="video"||this.kind==="audio"){let n=document.createElement(this.kind);n.src=this.src,n.controls=!0,n.preload="metadata",t.appendChild(n)}else if(this.kind==="file"){let n=document.createElement("a");n.className="cm-file-card",n.href=this.src,n.target="_blank",n.rel="noopener",n.textContent="\u{1F4CE} "+(this.alt||"file"),t.appendChild(n)}else{let n=document.createElement("img");n.src=this.src,n.alt=this.alt,n.loading="lazy",n.onerror=()=>t.classList.add("cm-media-broken"),t.appendChild(n)}return t}ignoreEvent(){return!1}},wi=class extends ee{constructor(t,n){super();this.checked=t;this.pos=n}eq(t){return t.checked===this.checked&&t.pos===this.pos}toDOM(t){let n=document.createElement("input");return n.type="checkbox",n.className="cm-task",n.checked=this.checked,n.setAttribute("aria-label",this.checked?"\u5DF2\u5B8C\u6210":"\u5F85\u529E"),n.addEventListener("mousedown",i=>{i.preventDefault();let a=t.state.sliceDoc(this.pos,this.pos+3)==="[ ]"?"[x]":"[ ]";t.dispatch({changes:{from:this.pos,to:this.pos+3,insert:a}})}),n}ignoreEvent(){return!0}},yi=class extends ee{toDOM(){let e=document.createElement("span");return e.className="cm-hr-widget",e}eq(){return!0}},Zi=class extends ee{toDOM(){let e=document.createElement("span");return e.className="cm-bullet",e.textContent="\u2022",e}eq(){return!0}},se=v.replace({}),Pi=r=>v.line({class:r}),Rt=r=>v.mark({class:r});function Fu(r){let e=new Set;for(let t of r.selection.ranges){let n=r.doc.lineAt(t.from).number,i=r.doc.lineAt(t.to).number;for(let s=n;s<=i;s++)e.add(s)}return e}function Hu(r,e,t){return r.selection.ranges.some(n=>n.from<=t&&n.to>=e)}var Ku=/\[\[([^[\]\n]+?)\]\]/g;function ll(r,e,t){let{state:n}=r,i=[],s=t?Fu(n):new Set,a=c=>s.has(n.doc.lineAt(c).number),o=(c,h)=>t&&Hu(n,c,h),l=[];for(let{from:c,to:h}of r.visibleRanges){R(n).iterate({from:c,to:h,enter(u){let d=u.name,m=/^ATXHeading(\d)$/.exec(d);if(m){let g=n.doc.lineAt(u.from);if(i.push(Pi(`cm-h cm-h${m[1]}`).range(g.from)),!a(u.from)){let b=u.node.getChild("HeaderMark");b&&i.push(se.range(b.from,Math.min(b.to+1,g.to)))}return}switch(d){case"Table":return al(n,u.from,u.to,t)?!1:void 0;case"FencedCode":case"CodeBlock":{l.push([u.from,u.to]);let g=u.node.getChild("CodeInfo"),b=u.node.getChild("CodeText");if(g&&b&&n.sliceDoc(g.from,g.to).trim().toLowerCase()==="mermaid"&&n.sliceDoc(b.from,b.to).trim()&&!(t&&Si(n,u.from,u.to)))return!1;let Q=n.doc.lineAt(u.from).number,k=n.doc.lineAt(u.to).number;if(d==="FencedCode"&&!o(u.from,u.to)){let y=n.doc.line(Q),w=n.doc.line(k);y.to>y.from&&i.push(se.range(y.from,y.to)),k!==Q&&w.to>w.from&&/^\s*(```|~~~)/.test(w.text)&&i.push(se.range(w.from,w.to))}for(let y=Q;y<=k;y++){let w=n.doc.line(y),_="cm-codeblock";y===Q&&(_+=" cm-codeblock-first"),y===k&&(_+=" cm-codeblock-last"),i.push(Pi(_).range(w.from))}return!1}case"StrongEmphasis":case"Emphasis":case"Strikethrough":case"InlineCode":{let g=d==="StrongEmphasis"?"cm-strong":d==="Emphasis"?"cm-em":d==="Strikethrough"?"cm-strike":"cm-inline-code";if(i.push(Rt(g).range(u.from,u.to)),!o(u.from,u.to)){let b=d==="InlineCode"?"CodeMark":d==="Strikethrough"?"StrikethroughMark":"EmphasisMark",Q=u.node.firstChild;for(;Q;)Q.name===b&&i.push(se.range(Q.from,Q.to)),Q=Q.nextSibling}return d!=="InlineCode"}case"Link":{if(o(u.from,u.to))return;let g=u.node.getChildren("LinkMark"),b=u.node.getChild("URL");return g.length>=2&&(i.push(se.range(g[0].from,g[0].to)),i.push(Rt("cm-link").range(g[0].to,g[1].from)),i.push(se.range(g[1].from,u.to))),!1}case"Image":{let g=u.node.getChild("URL");if(!g)return!1;let b=n.sliceDoc(g.from,g.to),Q=Nu.exec(b),k=Q?e.resolveResource(Q[1]):b,y=Q?e.resourceKind(Q[1]):void 0,w=u.node.getChildren("LinkMark"),_=w.length>=2?n.sliceDoc(w[0].to,w[1].from):"";if(!k||/^javascript:/i.test(k))return!1;let G=new xi(k,_,y);return a(u.from)?i.push(v.widget({widget:G,side:1}).range(u.to)):i.push(v.replace({widget:G}).range(u.from,u.to)),!1}case"Blockquote":{let g=n.doc.lineAt(u.from).number,b=n.doc.lineAt(u.to).number;for(let Q=g;Q<=b;Q++)i.push(Pi("cm-quote").range(n.doc.line(Q).from));return}case"QuoteMark":{if(!a(u.from)){let g=n.sliceDoc(u.to,u.to+1)===" "?u.to+1:u.to;i.push(se.range(u.from,g))}return}case"HorizontalRule":{a(u.from)||i.push(v.replace({widget:new yi}).range(u.from,u.to));return}case"ListMark":{let g=n.sliceDoc(u.from,u.to),b=g==="-"||g==="*"||g==="+",Q=n.sliceDoc(u.to,u.to+4),k=/^ \[[ xX]\]/.test(Q);b&&!a(u.from)?k?i.push(se.range(u.from,u.to+1)):i.push(v.replace({widget:new Zi}).range(u.from,u.to)):i.push(Rt("cm-list-mark").range(u.from,u.to));return}case"TaskMarker":{let g=/x/i.test(n.sliceDoc(u.from,u.to));if(!o(u.from,u.to)&&(i.push(v.replace({widget:new wi(g,u.from)}).range(u.from,u.to)),g)){let b=n.doc.lineAt(u.from);u.to+1d>=w&&m<=_))continue;let g=u[1],b=g.indexOf("|"),Q=(b>=0?g.slice(0,b):g).split("#")[0].trim(),k=!!e.resolveTitle(Q),y={"data-wiki":Q};if(o(d,m)){i.push(v.mark({class:"cm-wikilink cm-wikilink-src"+(k?"":" cm-wikilink-missing"),attributes:y}).range(d,m));continue}i.push(se.range(d,d+2+(b>=0?b+1:0))),i.push(v.mark({class:"cm-wikilink cm-wikilink-rendered"+(k?"":" cm-wikilink-missing"),attributes:y}).range(d+2+(b>=0?b+1:0),m-2)),i.push(se.range(m-2,m))}}let O=i.filter(c=>c.value.point===!0);return{all:v.set(i,!0),atomic:v.set(O,!0)}}function Ol(r){let e=ve.fromClass(class{decorations;atomic;constructor(t){let n=ll(t,r,t.hasFocus);this.decorations=n.all,this.atomic=n.atomic}update(t){if(t.docChanged||t.viewportChanged||t.selectionSet||t.focusChanged||R(t.startState)!==R(t.state)){let n=ll(t.view,r,t.view.hasFocus);this.decorations=n.all,this.atomic=n.atomic}}},{decorations:t=>t.decorations,eventHandlers:{mousedown(t,n){let i=t.target.closest(".cm-wikilink");if(!i)return!1;let s=i.classList.contains("cm-wikilink-rendered"),a=t.button===1||t.shiftKey;if(t.button>1||!s&&!(t.metaKey||t.ctrlKey||t.button===1))return!1;let o=i.dataset.wiki??"";return t.preventDefault(),r.openNote(r.resolveTitle(o),o,a),!0},click(t){let n=t.target.closest(".cm-link, .cm-file-card");return n&&(t.metaKey||t.ctrlKey)&&n instanceof HTMLAnchorElement?(window.open(n.href,"_blank","noopener"),!0):!1}}});return[e,tl(),ol(r),X.atomicRanges.of(t=>t.plugin(e)?.atomic??v.none)]}var cl=X.theme({"&":{color:"rgb(var(--ink))",backgroundColor:"transparent",height:"100%"},"&.cm-focused":{outline:"none"},".cm-scroller":{fontFamily:"inherit",lineHeight:"1.85",overflow:"visible"},".cm-content":{padding:"0 0 40vh",caretColor:"rgb(var(--ivy))"},".cm-line":{padding:"0"},".cm-cursor, .cm-dropCursor":{borderLeftColor:"rgb(var(--ivy))",borderLeftWidth:"2px"},"&.cm-focused .cm-selectionBackground, .cm-selectionBackground, ::selection":{backgroundColor:"rgb(var(--ivy) / 0.2) !important"},".cm-placeholder":{color:"rgb(var(--faint))"},".cm-tooltip":{border:"none",backgroundColor:"rgb(var(--surface))",borderRadius:"14px",boxShadow:"var(--shadow-lift)",overflow:"hidden"},".cm-tooltip-autocomplete > ul":{fontFamily:"inherit",maxHeight:"260px",padding:"4px"},".cm-tooltip-autocomplete > ul > li":{padding:"7px 10px",borderRadius:"10px",lineHeight:"1.4"},".cm-tooltip-autocomplete > ul > li[aria-selected]":{backgroundColor:"rgb(var(--sunken))",color:"rgb(var(--ink))"},".cm-completionDetail":{marginLeft:"8px",color:"rgb(var(--muted))",fontStyle:"normal",fontSize:"12px"},".cm-completionIcon":{display:"none"},".cm-panels":{backgroundColor:"rgb(var(--surface))",color:"rgb(var(--ink))",border:"none"},".cm-searchMatch":{backgroundColor:"rgb(var(--warn) / 0.3)"},".cm-searchMatch-selected":{backgroundColor:"rgb(var(--warn) / 0.55)"}}),hl=hs(cs.define([{tag:f.heading,fontWeight:"600"},{tag:f.strong,fontWeight:"600"},{tag:f.emphasis,fontStyle:"italic"},{tag:f.strikethrough,textDecoration:"line-through"},{tag:f.link,color:"rgb(var(--ivy))"},{tag:f.url,color:"rgb(var(--ivy))"},{tag:f.monospace,fontFamily:"var(--font-mono)",color:"rgb(var(--warn-ink))"},{tag:f.quote,color:"rgb(var(--ink-2))"},{tag:[f.processingInstruction,f.contentSeparator,f.meta],color:"rgb(var(--faint))"},{tag:f.labelName,color:"rgb(var(--muted))"}]));function ul(r){return e=>{let t=e.matchBefore(/\[\[[^\]\n|#]*$/);if(!t)return null;let n=t.text.slice(2).toLowerCase(),i=e.state.sliceDoc(e.pos,e.pos+2),s=[],a=new Set;for(let o of r())if(!(!o.title||a.has(o.title))&&(a.add(o.title),!(n&&!o.title.toLowerCase().includes(n))&&(s.push({label:o.title,detail:o.detail,type:"text",boost:o.title.toLowerCase().startsWith(n)?1:0,apply:(l,O,c,h)=>{let p=i==="]]"?"":"]]";l.dispatch({changes:{from:c,to:h,insert:O.label+p},selection:{anchor:c+O.label.length+2}})}}),s.length>=50)))break;if(n&&!a.has(t.text.slice(2))){let o=t.text.slice(2);s.push({label:o,detail:"\u65B0\u5EFA\u94FE\u63A5",type:"keyword",boost:-1,apply:(l,O,c,h)=>l.dispatch({changes:{from:c,to:h,insert:o+(i==="]]"?"":"]]")},selection:{anchor:c+o.length+2}})})}return{from:t.from+2,options:s,validFor:/^[^\]\n|#]*$/}}}function Sr(r){return r.trim().replace(/\s+/g," ").toLowerCase()}function pl(r){let e=r,t,n,i=e.indexOf("|");i>=0&&(t=e.slice(i+1).trim(),e=e.slice(0,i));let s=e.indexOf("#");return s>=0&&(n=e.slice(s+1).trim(),e=e.slice(0,s)),{target:e.trim(),alias:t,heading:n}}function Ri(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Ue=Ri();function xl(r){Ue=r}var We={exec:()=>null};function Ee(r){let e=[];return t=>{let n=Math.max(0,Math.min(3,t-1)),i=e[n];return i||(i=r(n),e[n]=i),i}}function x(r,e=""){let t=typeof r=="string"?r:r.source,n={replace:(i,s)=>{let a=typeof s=="string"?s:s.source;return a=a.replace(Y.caret,"$1"),t=t.replace(i,a),n},getRegex:()=>new RegExp(t,e)};return n}var wl=((r="")=>{try{return!!new RegExp("(?<=1)(?/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+)[ \t]*)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,blockquoteMarkerWhitespace:/^( {0,3}>)([ \t]+)/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\][ \t]+\S/,listReplaceTask:/^\[[ xX]\][ \t]+/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^
/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,numericCharacterReference:/&#(?:(\d{1,7})|[Xx]([A-Fa-f0-9]{1,6}));/,numericCharacterReferenceOrAmpersand:/&#(?:(\d{1,7})|[Xx]([A-Fa-f0-9]{1,6}));|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:r=>new RegExp(`^( {0,3}${r})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:Ee(r=>new RegExp(`^ {0,${r}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:Ee(r=>new RegExp(`^ {0,${r}}((?:-[ ]*){3,}|(?:_[ ]*){3,}|(?:\\*[ ]*){3,})(?:\\n+|$)`)),fencesBeginRegex:Ee(r=>new RegExp(`^ {0,${r}}(?:\`\`\`|~~~)`)),headingBeginRegex:Ee(r=>new RegExp(`^ {0,${r}}#{1,6}(?:\\s|$)`)),pedanticHeadingBeginRegex:Ee(r=>new RegExp(`^ {0,${r}}#`)),htmlBeginRegex:Ee(r=>new RegExp(`^ {0,${r}}(?:)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|new RegExp(`^ {0,${r}}>`))},Ju=/^(?:[ \t]*(?:\n|$))+/,ep=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,tp=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}(?:(?=`)\1`*|(?=~)\1~*) *(?=\n|$)|$)/,Yt=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,rp=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,ji=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,yl=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |fences|blockquote|heading|hr|html|table))+?)\n {0,3}(=+|-+)[ \t]*(?:\n+|$)/,Zl=x(yl).replace(/bull/g,ji).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/hr/g,/ {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),np=x(yl).replace(/bull/g,ji).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/hr/g,/ {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),_i=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/,ip=/^[^\n]+/,Yi=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\\n]|\n(?![ \t]*\n))+/,sp=x(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Yi).replace("title",/(?:"(?:\\[\s\S]|[^"\\])*"|'(?:\\[\s\S]|[^'\\\n]|\n(?!\n))*'|\((?:\\[\s\S]|[^()\\])*\))/).getRegex(),ap=x(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,ji).getRegex(),Ct="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Ci=/|$))/,op=x("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|[^\\n]*\\n*|$)|[^\\n]*\\n*|$)||$)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!(?:script|pre|style|textarea)(?![a-z0-9-]))([a-z][a-z0-9-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Ci).replace("tag",Ct).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Xl=r=>x(_i).replace("hr",Yt).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list",r).replace("html"," {0,3}(?:)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?| ?(?:(?![ \t]*(?:\n|$))(paragraph)|[^\n]*)(?:\n|$))+/).replace("paragraph",Op).getRegex(),zi={blockquote:cp,code:ep,def:sp,fences:tp,heading:rp,hr:Yt,html:op,lheading:Zl,list:ap,newline:Ju,paragraph:lp,table:We,text:ip},fl=x("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Yt).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html"," {0,3}(?:)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html"," {0,3}(?:)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|(?: *\\n{2,}|\\s*$)|\\s]*)*?/?>(?: *\\n{2,}|\\s*$))`).replace("comment",Ci).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:We,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:x(_i).replace("hr",Yt).replace("heading",` *#{1,6} *[^ +]`).replace("lheading",Zl).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},pp=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,fp=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,vl=/^( {2,}|\\)\n(?!\s*$)[ \t]*/,dp=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\`+)[^`]+\k(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",wl?"(?`+)[^`]+\k(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Rl=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,Sp=x(Rl,"u").replace(/punct/g,ae).getRegex(),kp=x(Rl,"u").replace(/punct/g,Tl).getRegex(),Pp=/^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/,xp=x(Pp,"u").replace(/openQuote/g,gp).replace(/punct/g,ae).getRegex(),jl="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",wp=x(jl,"gu").replace(/notPunctSpace/g,zt).replace(/punctSpace/g,lt).replace(/punct/g,ae).getRegex(),yp=x(jl,"gu").replace(/notPunctSpace/g,$p).replace(/punctSpace/g,Qp).replace(/punct/g,Tl).getRegex(),Zp="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)",Xp=x(Zp,"gu").replace(/notPunctSpace/g,zt).replace(/punctSpace/g,lt).replace(/punct/g,ae).getRegex(),vp=x("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,zt).replace(/punctSpace/g,lt).replace(/punct/g,ae).getRegex(),Tp="^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)",Rp=x(Tp,"gu").replace(/notPunctSpace/g,zt).replace(/punctSpace/g,lt).replace(/punct/g,ae).getRegex(),jp=x(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,ae).getRegex(),_p="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",Yp=x(_p,"gu").replace(/notPunctSpace/g,zt).replace(/punctSpace/g,lt).replace(/punct/g,ae).getRegex(),Cp=x(/\\(punct)/,"gu").replace(/punct/g,ae).getRegex(),zp=x(/(`+)(?:[^`]|[^`][\s\S]*?[^`])\1(?!`)|`+|\\(punct)/,"gu").replace(/punct/g,ae).getRegex(),qp=x(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Ap=x(Ci).replace("(?:-->|$)","-->").getRegex(),Lp=x("^comment|^|^<[a-zA-Z][a-zA-Z0-9-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",Ap).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),_l=/\[(?:\\[\s\S]|[^\[\]\\])*\]/,xr=x(/(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/).replace("brackets",_l).getRegex(),Ep=x(/^!?\[(label)\]\([ \t\n]*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?[ \t\n]*\)/).replace("label",xr).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title",/"(?:\\[\s\S]|[^"\\])*"|'(?:\\[\s\S]|[^'\\])*'|\((?:\\[\s\S]|[^)\\])*\)/).getRegex(),Wp=x(/^!?\[(label)\]\[(ref)\]/).replace("label",xr).replace("ref",Yi).getRegex(),Mp=x(/^!?\[(ref)\](?:\[\])?/).replace("ref",Yi).getRegex(),dl=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\]){1,999}/,Up=x(/(?:[^\[\]\\`]*(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\]))){0,999}?[^\[\]\\`]*?/).replace("brackets",_l).getRegex(),Vp=x("reflink|nolink(?!\\()","g").replace("reflink",x(/^!?\[(label)\]\[(ref)\]/).replace("label",Up).replace("ref",dl).getRegex()).replace("nolink",x(/^!?\[(ref)\](?:\[\])?/).replace("ref",dl).getRegex()).getRegex(),ml=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Gp=/[A-Za-z0-9._+-]+@[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/,Ip=x(/(?:mailto:email|xmpp:email(?:\/[A-Za-z0-9@.]+)?)/).replace(/email/g,Gp).getRegex(),qi={_backpedal:We,anyPunctuation:Cp,anyPunctuationOutsideCode:zp,autolink:qp,blockSkip:bp,br:vl,code:fp,del:We,delLDelim:We,delRDelim:We,emStrongLDelim:Sp,emStrongRDelimAst:wp,emStrongRDelimUnd:vp,escape:pp,link:Ep,nolink:Mp,punctuation:mp,reflink:Wp,reflinkSearch:Vp,tag:Lp,text:dp,url:We},Dp={...qi,emStrongLDelim:xp,emStrongRDelimAst:Xp,emStrongRDelimUnd:Rp,link:x(/^!?\[(label)\]\((.*?)\)/).replace("label",xr).getRegex(),reflink:x(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",xr).getRegex()},Xi={...qi,emStrongRDelimAst:yp,emStrongLDelim:kp,delLDelim:jp,delRDelim:Yp,url:x(/^emailProtocol|^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("emailProtocol",Ip).replace("protocol",ml).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:x(/^(?:[^a-zA-Z0-9](?=emailProtocol)|(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\":">",'"':""","'":"'"},gl=r=>Np[r];function H(r,e){if(e){if(Y.escapeTest.test(r))return r.replace(Y.escapeReplace,gl)}else if(Y.escapeTestNoEncode.test(r))return r.replace(Y.escapeReplaceNoEncode,gl);return r}function Fp(r){return Y.numericCharacterReference.test(r)?r.replace(Y.numericCharacterReferenceOrAmpersand,(e,t,n)=>{if(t===void 0&&n===void 0)return"&";let i=t===void 0?Number.parseInt(n,16):Number.parseInt(t,10);return i===0||i>1114111||i>=55296&&i<=57343?"\uFFFD":i===38?"&":String.fromCodePoint(i)}):r}function Ql(r){try{r=encodeURI(r).replace(Y.percentDecode,"%")}catch{return null}return r}function $l(r,e){let t=r.replace(Y.findPipe,(s,a,o)=>{let l=!1,O=a;for(;--O>=0&&o[O]==="\\";)l=!l;return l?"|":" |"}),n=t.split(Y.splitPipe),i=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),e)if(n.length>e)n.splice(e);else for(;n.length=0&&Y.blankLine.test(e[t]);)t--;return e.length-t<=2?r:e.slice(0,t+1).join(` -`)}function xr(r){return r.trim().replace(Y.multipleSpaceGlobal," ").toLowerCase().toUpperCase().toLowerCase()}function $l(r,e){if(r.indexOf(e[0])===-1&&r.indexOf(e[1])===-1)return-1;let t=0;for(let n=0;n0?-2:-1}var at=new WeakMap;function Ci(r){let e={"*":-1,_:-1},t=-1,n=r.length;for(let i=0;i0?-2:-1}var ot=new WeakMap;function Ai(r){let e={"*":-1,_:-1},t=-1,n=r.length;for(let i=0;i{let a=s.match(t.other.beginningSpace);if(a===null)return s;let[o]=a;return s.slice(Math.min(o.length,i.length))}).join(` -`)}function Sl(r,e,t,n){if(!e.includes("<"))return!1;for(let i=0;ie.length-i)return!0;i+=a[0].length-1}}return!1}var st=class{options;rules;lexer;constructor(r){this.options=r||Me}space(r){let e=this.rules.block.newline.exec(r);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(r){let e=this.rules.block.code.exec(r);if(e){let t=this.options.pedantic?e[0]:Ql(e[0]),n=t.replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t,codeBlockStyle:"indented",text:n}}}fences(r){let e=this.rules.block.fences.exec(r);if(e){let t=e[0],n=Kp(t,e[3]||"",this.rules);return{type:"code",raw:t,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:n}}}heading(r){let e=this.rules.block.heading.exec(r);if(e){let t=e[2].trim();if(this.rules.other.endingHash.test(t)){let n=me(t,"#");(this.options.pedantic||!n||this.rules.other.endingSpaceTabChar.test(n))&&(t=n.trim())}return{type:"heading",raw:me(e[0],` +`)}function Pl(r,e,t,n){if(!e.includes("<"))return!1;for(let i=0;ie.length-i)return!0;i+=a[0].length-1}}return!1}var at=class{options;rules;lexer;constructor(r){this.options=r||Ue}space(r){let e=this.rules.block.newline.exec(r);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(r){let e=this.rules.block.code.exec(r);if(e){let t=this.options.pedantic?e[0]:bl(e[0]),n=t.replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t,codeBlockStyle:"indented",text:n}}}fences(r){let e=this.rules.block.fences.exec(r);if(e){let t=e[0],n=tf(t,e[3]||"",this.rules);return{type:"code",raw:t,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:n}}}heading(r){let e=this.rules.block.heading.exec(r);if(e){let t=e[2].trim();if(this.rules.other.endingHash.test(t)){let n=me(t,"#");(this.options.pedantic||!n||this.rules.other.endingSpaceTabChar.test(n))&&(t=n.trim())}return{type:"heading",raw:me(e[0],` `),depth:e[1].length,text:t,tokens:this.lexer.inline(t)}}}hr(r){let e=this.rules.block.hr.exec(r);if(e)return{type:"hr",raw:me(e[0],` `)}}blockquote(r){let e=this.rules.block.blockquote.exec(r);if(e){let t=me(e[0],` `).split(` `),n="",i="",s=[];for(;t.length>0;){let a=!1,o=[],l;for(l=0;ld+kr(m,d.length)).replace(this.rules.other.blockquoteSetextReplace,` +`),c=O.replace(this.rules.other.blockquoteMarkerWhitespace,(u,d,m)=>d+Pr(m,d.length)).replace(this.rules.other.blockquoteSetextReplace,` $1`).replace(this.rules.other.blockquoteSetextReplace2,"");n=n?`${n} ${O}`:O,i=i?`${i} ${c}`:c;let h=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(c,s,!0),this.lexer.state.top=h,t.length===0)break;let p=s.at(-1);if(p?.type==="code"||p?.type==="heading"||p?.type==="hr"||p?.type==="html"||p?.type==="table")break;if(p?.type==="blockquote"){let u=p,d=t.join(` @@ -49,17 +49,17 @@ ${k.join(` `);n=`${n} ${b}`,i=`${i} ${b}`}t=t.slice(g);continue}}return{type:"blockquote",raw:n,tokens:s,text:i}}}list(r){let e=this.rules.block.list.exec(r);if(e){let t=r,n=()=>t.length-r.length,i=e[1].trim(),s=i.length>1,a={type:"list",raw:"",ordered:s,start:s?+i.slice(0,-1):"",loose:!1,items:[]};i=s?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=s?i:"[*+-]");let o=this.rules.other.listItemRegex(i),l=!1;for(;r;){let c=!1,h="";if(!(e=o.exec(r))||this.rules.block.hr.test(r))break;let p=n();r=r.substring(e[0].length);let u=e[2].split(` -`,1)[0],d=e[1].length,m=this.options.pedantic?kr(u,d):u.replace(this.rules.other.leadingSpaceTab,y=>kr(y,d)),g=r.split(` -`,1)[0],b=!m.trim(),Q=0;if(this.options.pedantic?(Q=2,h=m.trimStart()):b?Q=d+1:(Q=m.search(this.rules.other.nonSpaceChar),Q=Q>4?1:Q,h=m.slice(Q),Q+=d),b&&this.rules.other.blankLine.test(g)&&(r=r.substring(g.length+1),c=!0),!c){let y=this.rules.other.nextBulletRegex(Q),w=this.rules.other.hrRegex(Q),_=this.rules.other.fencesBeginRegex(Q),G=this.options.pedantic?this.rules.other.pedanticHeadingBeginRegex(Q):this.rules.other.headingBeginRegex(Q),Ze=this.rules.other.htmlBeginRegex(Q),zt=this.rules.other.blockquoteBeginRegex(Q);for(;r;){let lt=r.split(` -`,1)[0],Ve;if(g=lt,this.options.pedantic?(g=g.replace(this.rules.other.listReplaceNesting," "),Ve=g):Ve=g.replace(this.rules.other.leadingSpaceTab,Tr=>kr(Tr)),_.test(g)||G.test(g)||Ze.test(g)||zt.test(g)||y.test(g)||w.test(g))break;if(Ve.search(this.rules.other.nonSpaceChar)>=Q||!g.trim())h+=` -`+Ve.slice(Q);else{if(b||m.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||_.test(m)||G.test(m)||Ze.test(m)||w.test(m))break;let Tr=!this.options.pedantic&&/^ {0,3}(?:=+|-+) *$/.test(g)&&this.rules.block.lheading.test(`${m} -${g}`)?` ${Ve.replace(/^ {0,3}/,"")}`:g;h+=` -`+Tr}b=!g.trim(),r=r.substring(lt.length+1),m=Ve.slice(Q)}}let k=t.slice(p,n());a.loose||(l?a.loose=!0:this.rules.other.doubleBlankLine.test(k)&&(l=!0)),a.items.push({type:"list_item",raw:k,task:!!this.options.gfm&&this.rules.other.listIsTask.test(h),loose:!1,text:h,tokens:[]})}let O=a.items.at(-1);if(O)O.raw=O.raw.trimEnd(),O.text=O.text.trimEnd();else return;a.raw=t.slice(0,n()).trimEnd();for(let c of a.items)if(this.lexer.state.top=!1,c.tokens=this.lexer.blockTokens(c.text,[]),!a.loose){let h=c.tokens.filter(u=>u.type==="space"),p=h.length>0&&h.some(u=>this.rules.other.anyLine.test(u.raw));a.loose=p}for(let c of a.items){let h=c.tokens[0];if(c.task&&(h?.type==="text"||h?.type==="paragraph")){c.text=c.text.replace(this.rules.other.listReplaceTask,""),h.raw=h.raw.replace(this.rules.other.listReplaceTask,""),h.text=h.text.replace(this.rules.other.listReplaceTask,"");for(let u=this.lexer.inlineQueue.length-1;u>=0;u--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[u].src)){this.lexer.inlineQueue[u].src=this.lexer.inlineQueue[u].src.replace(this.rules.other.listReplaceTask,"");break}let p=this.rules.other.listTaskCheckbox.exec(c.raw);if(p){let u={type:"checkbox",raw:p[0]+" ",checked:p[0]!=="[ ]"};c.checked=u.checked,a.loose?c.tokens[0]&&["paragraph","text"].includes(c.tokens[0].type)&&"tokens"in c.tokens[0]&&c.tokens[0].tokens?(c.tokens[0].raw=u.raw+c.tokens[0].raw,c.tokens[0].text=u.raw+c.tokens[0].text,c.tokens[0].tokens.unshift(u)):c.tokens.unshift({type:"paragraph",raw:u.raw,text:u.raw,tokens:[u]}):c.tokens.unshift(u)}}else c.task&&(c.task=!1)}if(a.loose)for(let c of a.items){c.loose=!0;for(let h of c.tokens)h.type==="text"&&(h.type="paragraph")}return a}}html(r){let e=this.rules.block.html.exec(r);if(e){let t=Ql(e[0]);return{type:"html",block:!0,raw:t,pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:t}}}def(r){let e=this.rules.block.def.exec(r);if(e){if(!this.rules.other.startAngleBracket.test(e[2])&&$l(e[2],"()")!==-1)return;let t=xr(e[1]),n=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",i=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:t,raw:me(e[0],` -`),href:n,title:i}}}table(r){let e=this.rules.block.table.exec(r);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;let t=gl(e[1]),n=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),i=e[3]?.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split(` +`,1)[0],d=e[1].length,m=this.options.pedantic?Pr(u,d):u.replace(this.rules.other.leadingSpaceTab,y=>Pr(y,d)),g=r.split(` +`,1)[0],b=!m.trim(),Q=0;if(this.options.pedantic?(Q=2,h=m.trimStart()):b?Q=d+1:(Q=m.search(this.rules.other.nonSpaceChar),Q=Q>4?1:Q,h=m.slice(Q),Q+=d),b&&this.rules.other.blankLine.test(g)&&(r=r.substring(g.length+1),c=!0),!c){let y=this.rules.other.nextBulletRegex(Q),w=this.rules.other.hrRegex(Q),_=this.rules.other.fencesBeginRegex(Q),G=this.options.pedantic?this.rules.other.pedanticHeadingBeginRegex(Q):this.rules.other.headingBeginRegex(Q),Xe=this.rules.other.htmlBeginRegex(Q),qt=this.rules.other.blockquoteBeginRegex(Q);for(;r;){let Ot=r.split(` +`,1)[0],Ge;if(g=Ot,this.options.pedantic?(g=g.replace(this.rules.other.listReplaceNesting," "),Ge=g):Ge=g.replace(this.rules.other.leadingSpaceTab,Rr=>Pr(Rr)),_.test(g)||G.test(g)||Xe.test(g)||qt.test(g)||y.test(g)||w.test(g))break;if(Ge.search(this.rules.other.nonSpaceChar)>=Q||!g.trim())h+=` +`+Ge.slice(Q);else{if(b||m.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||_.test(m)||G.test(m)||Xe.test(m)||w.test(m))break;let Rr=!this.options.pedantic&&/^ {0,3}(?:=+|-+) *$/.test(g)&&this.rules.block.lheading.test(`${m} +${g}`)?` ${Ge.replace(/^ {0,3}/,"")}`:g;h+=` +`+Rr}b=!g.trim(),r=r.substring(Ot.length+1),m=Ge.slice(Q)}}let k=t.slice(p,n());a.loose||(l?a.loose=!0:this.rules.other.doubleBlankLine.test(k)&&(l=!0)),a.items.push({type:"list_item",raw:k,task:!!this.options.gfm&&this.rules.other.listIsTask.test(h),loose:!1,text:h,tokens:[]})}let O=a.items.at(-1);if(O)O.raw=O.raw.trimEnd(),O.text=O.text.trimEnd();else return;a.raw=t.slice(0,n()).trimEnd();for(let c of a.items)if(this.lexer.state.top=!1,c.tokens=this.lexer.blockTokens(c.text,[]),!a.loose){let h=c.tokens.filter(u=>u.type==="space"),p=h.length>0&&h.some(u=>this.rules.other.anyLine.test(u.raw));a.loose=p}for(let c of a.items){let h=c.tokens[0];if(c.task&&(h?.type==="text"||h?.type==="paragraph")){c.text=c.text.replace(this.rules.other.listReplaceTask,""),h.raw=h.raw.replace(this.rules.other.listReplaceTask,""),h.text=h.text.replace(this.rules.other.listReplaceTask,"");for(let u=this.lexer.inlineQueue.length-1;u>=0;u--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[u].src)){this.lexer.inlineQueue[u].src=this.lexer.inlineQueue[u].src.replace(this.rules.other.listReplaceTask,"");break}let p=this.rules.other.listTaskCheckbox.exec(c.raw);if(p){let u={type:"checkbox",raw:p[0]+" ",checked:p[0]!=="[ ]"};c.checked=u.checked,a.loose?c.tokens[0]&&["paragraph","text"].includes(c.tokens[0].type)&&"tokens"in c.tokens[0]&&c.tokens[0].tokens?(c.tokens[0].raw=u.raw+c.tokens[0].raw,c.tokens[0].text=u.raw+c.tokens[0].text,c.tokens[0].tokens.unshift(u)):c.tokens.unshift({type:"paragraph",raw:u.raw,text:u.raw,tokens:[u]}):c.tokens.unshift(u)}}else c.task&&(c.task=!1)}if(a.loose)for(let c of a.items){c.loose=!0;for(let h of c.tokens)h.type==="text"&&(h.type="paragraph")}return a}}html(r){let e=this.rules.block.html.exec(r);if(e){let t=bl(e[0]);return{type:"html",block:!0,raw:t,pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:t}}}def(r){let e=this.rules.block.def.exec(r);if(e){if(!this.rules.other.startAngleBracket.test(e[2])&&Sl(e[2],"()")!==-1)return;let t=wr(e[1]),n=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",i=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:t,raw:me(e[0],` +`),href:n,title:i}}}table(r){let e=this.rules.block.table.exec(r);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;let t=$l(e[1]),n=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),i=e[3]?.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split(` `):[],s={type:"table",raw:me(e[0],` -`),header:[],align:[],rows:[]};if(t.length===n.length){for(let a of n)this.rules.other.tableAlignRight.test(a)?s.align.push("right"):this.rules.other.tableAlignCenter.test(a)?s.align.push("center"):this.rules.other.tableAlignLeft.test(a)?s.align.push("left"):s.align.push(null);for(let a=0;a({text:o,tokens:this.lexer.inline(o),header:!1,align:s.align[l]})));return s}}lheading(r){let e=this.rules.block.lheading.exec(r);if(e){let t=e[1].trim();return{type:"heading",raw:me(e[0],` +`),header:[],align:[],rows:[]};if(t.length===n.length){for(let a of n)this.rules.other.tableAlignRight.test(a)?s.align.push("right"):this.rules.other.tableAlignCenter.test(a)?s.align.push("center"):this.rules.other.tableAlignLeft.test(a)?s.align.push("left"):s.align.push(null);for(let a=0;a({text:o,tokens:this.lexer.inline(o),header:!1,align:s.align[l]})));return s}}lheading(r){let e=this.rules.block.lheading.exec(r);if(e){let t=e[1].trim();return{type:"heading",raw:me(e[0],` `),depth:e[2].charAt(0)==="="?1:2,text:t,tokens:this.lexer.inline(t)}}}paragraph(r){let e=this.rules.block.paragraph.exec(r);if(e){let t=e[1].charAt(e[1].length-1)===` -`?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:t,tokens:this.lexer.inline(t)}}}text(r){let e=this.rules.block.text.exec(r);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(r){let e=this.rules.inline.escape.exec(r);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(r){let e=this.rules.inline.tag.exec(r);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(r){if(this.lexer.state.linkParenPossible===!1)return;let e=this.rules.inline.link.exec(r);if(e){let t=e[0].charAt(0)==="!"?2:1;if(!this.options.pedantic&&Sl(r,e[1],t,this.rules))return;let n=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;let o=me(n.slice(0,-1),"\\");if((n.length-o.length)%2===0)return}else{let o=$l(e[2],"()");if(o===-2)return;if(o>-1){let l=(e[0].indexOf("!")===0?5:4)+e[1].length+o;e[2]=e[2].substring(0,o),e[0]=e[0].substring(0,l).trim(),e[3]=""}}let i=me(e[0].slice(0,-1),"\\");if((e[0].length-i.length)%2===0)return;let s=e[2],a="";if(this.options.pedantic){let o=this.rules.other.pedanticHrefTitle.exec(s);o&&(s=o[1],a=o[3])}else a=e[3]?e[3].slice(1,-1):"";return s=s.trim(),this.rules.other.startAngleBracket.test(s)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?s=s.slice(1):s=s.slice(1,-1)),bl(e,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:a&&a.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(r,e){let t;if((t=this.rules.inline.reflink.exec(r))||(t=this.rules.inline.nolink.exec(r))){let n=t[0].charAt(0)==="!"?2:1;if(!this.options.pedantic&&Sl(r,t[1],n,this.rules))return;let i=e[xr(t[2]||t[1])];if(!i){let s=t[0].charAt(0);return{type:"text",raw:s,text:s}}return bl(t,i,t[0],this.lexer,this.rules)}}emStrong(r,e,t=""){let n=this.rules.inline.emStrongLDelim.exec(r);if(!n||!n[1]&&!n[2]&&!n[3]&&!n[4])return;let i=n[0][0],s=t===i,a=e.length-r.length,o=a;for(;!this.options.pedantic&&o>0&&e[o-1]===i;)o--;let l=[...e.slice(Math.max(0,o-2),o)].at(-1)??"",O=l==="*"||l==="_"||!!this.rules.inline.punctuation.exec(l);o_);){if(u=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!u)continue;if(d=[...u].length,n[3]||n[4]){m+=d;continue}else if(n[5]||n[6]||Q){if(s&&(n[5]||n[6]))break;if(b%3&&!((b+d)%3)){g+=d;continue}}if(m-=d,m>0)continue;d=Math.min(d,d+m+g);let G=[...n[0]][0].length,Ze=r.slice(0,p+n.index+G+d);if(Math.min(p,d)%2){let lt=Ze.slice(1,-1);return{type:"em",raw:Ze,text:lt,tokens:this.lexer.inlineTokens(lt)}}let zt=Ze.slice(2,-2);return{type:"strong",raw:Ze,text:zt,tokens:this.lexer.inlineTokens(zt)}}}}codespan(r){let e=this.rules.inline.code.exec(r);if(e){let t=e[2].replace(this.rules.other.newLineCharGlobal," "),n=this.rules.other.nonSpaceChar.test(t),i=this.rules.other.startingSpaceChar.test(t)&&this.rules.other.endingSpaceChar.test(t);return n&&i&&(t=t.substring(1,t.length-1)),{type:"codespan",raw:e[0],text:t}}}br(r){let e=this.rules.inline.br.exec(r);if(e)return{type:"br",raw:e[0]}}del(r,e,t=""){let n=this.rules.inline.delLDelim.exec(r);if(n&&(!n[1]||!t||this.rules.inline.punctuation.exec(t))){let i=[...n[0]].length-1,s,a,o=i,l=this.rules.inline.delRDelim,O=Hp(this,e),c=e.length-r.length+i;if(Oh);){if(s=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!s||(a=[...s].length,a!==i))continue;if(n[3]||n[4]){o+=a;continue}if(o-=a,o>0)continue;a=Math.min(a,a+o);let p=[...n[0]][0].length,u=r.slice(0,i+n.index+p+a),d=u.slice(i,-i);return{type:"del",raw:u,text:d,tokens:this.lexer.inlineTokens(d)}}}}autolink(r){let e=this.rules.inline.autolink.exec(r);if(e){let t,n;return e[2]==="@"?(t=e[1],n="mailto:"+t):(t=e[1],n=t),{type:"link",raw:e[0],text:t,href:n,autolink:!0,tokens:[{type:"text",raw:t,text:t}]}}}url(r){let e;if(e=this.rules.inline.url.exec(r)){let t,n;if(e[2]==="@")t=e[0],n="mailto:"+t;else{let i;do i=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??"";while(i!==e[0]);t=e[0],e[1]==="www."?n="http://"+e[0]:n=e[0]}return{type:"link",raw:e[0],text:t,href:n,autolink:!0,tokens:[{type:"text",raw:t,text:t}]}}}inlineText(r){let e=this.rules.inline.text.exec(r);if(e){let t=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:t?e[0]:Dp(e[0]),escaped:t}}}},re=class yi{tokens;options;state;inlineQueue;tokenizer;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Me,this.options.tokenizer=this.options.tokenizer||new st,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,linkEmitted:!1,linkParenPossible:!0,top:!0};let t={other:Y,block:Sr.normal,inline:Rt.normal};this.options.pedantic?(t.block=Sr.pedantic,t.inline=Rt.pedantic):this.options.gfm&&(t.block=Sr.gfm,this.options.breaks?t.inline=Rt.breaks:t.inline=Rt.gfm),this.tokenizer.rules=t}static get rules(){return{block:Sr,inline:Rt}}static lex(e,t){return new yi(t).lex(e)}static lexInline(e,t){return new yi(t).inlineTokens(e)}lex(e){e=e.replace(Y.carriageReturn,` +`?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:t,tokens:this.lexer.inline(t)}}}text(r){let e=this.rules.block.text.exec(r);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(r){let e=this.rules.inline.escape.exec(r);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(r){let e=this.rules.inline.tag.exec(r);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(r){if(this.lexer.state.linkParenPossible===!1)return;let e=this.rules.inline.link.exec(r);if(e){let t=e[0].charAt(0)==="!"?2:1;if(!this.options.pedantic&&Pl(r,e[1],t,this.rules))return;let n=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;let o=me(n.slice(0,-1),"\\");if((n.length-o.length)%2===0)return}else{let o=Sl(e[2],"()");if(o===-2)return;if(o>-1){let l=(e[0].indexOf("!")===0?5:4)+e[1].length+o;e[2]=e[2].substring(0,o),e[0]=e[0].substring(0,l).trim(),e[3]=""}}let i=me(e[0].slice(0,-1),"\\");if((e[0].length-i.length)%2===0)return;let s=e[2],a="";if(this.options.pedantic){let o=this.rules.other.pedanticHrefTitle.exec(s);o&&(s=o[1],a=o[3])}else a=e[3]?e[3].slice(1,-1):"";return s=s.trim(),this.rules.other.startAngleBracket.test(s)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?s=s.slice(1):s=s.slice(1,-1)),kl(e,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:a&&a.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(r,e){let t;if((t=this.rules.inline.reflink.exec(r))||(t=this.rules.inline.nolink.exec(r))){let n=t[0].charAt(0)==="!"?2:1;if(!this.options.pedantic&&Pl(r,t[1],n,this.rules))return;let i=e[wr(t[2]||t[1])];if(!i){let s=t[0].charAt(0);return{type:"text",raw:s,text:s}}return kl(t,i,t[0],this.lexer,this.rules)}}emStrong(r,e,t=""){let n=this.rules.inline.emStrongLDelim.exec(r);if(!n||!n[1]&&!n[2]&&!n[3]&&!n[4])return;let i=n[0][0],s=t===i,a=e.length-r.length,o=a;for(;!this.options.pedantic&&o>0&&e[o-1]===i;)o--;let l=[...e.slice(Math.max(0,o-2),o)].at(-1)??"",O=l==="*"||l==="_"||!!this.rules.inline.punctuation.exec(l);o_);){if(u=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!u)continue;if(d=[...u].length,n[3]||n[4]){m+=d;continue}else if(n[5]||n[6]||Q){if(s&&(n[5]||n[6]))break;if(b%3&&!((b+d)%3)){g+=d;continue}}if(m-=d,m>0)continue;d=Math.min(d,d+m+g);let G=[...n[0]][0].length,Xe=r.slice(0,p+n.index+G+d);if(Math.min(p,d)%2){let Ot=Xe.slice(1,-1);return{type:"em",raw:Xe,text:Ot,tokens:this.lexer.inlineTokens(Ot)}}let qt=Xe.slice(2,-2);return{type:"strong",raw:Xe,text:qt,tokens:this.lexer.inlineTokens(qt)}}}}codespan(r){let e=this.rules.inline.code.exec(r);if(e){let t=e[2].replace(this.rules.other.newLineCharGlobal," "),n=this.rules.other.nonSpaceChar.test(t),i=this.rules.other.startingSpaceChar.test(t)&&this.rules.other.endingSpaceChar.test(t);return n&&i&&(t=t.substring(1,t.length-1)),{type:"codespan",raw:e[0],text:t}}}br(r){let e=this.rules.inline.br.exec(r);if(e)return{type:"br",raw:e[0]}}del(r,e,t=""){let n=this.rules.inline.delLDelim.exec(r);if(n&&(!n[1]||!t||this.rules.inline.punctuation.exec(t))){let i=[...n[0]].length-1,s,a,o=i,l=this.rules.inline.delRDelim,O=ef(this,e),c=e.length-r.length+i;if(Oh);){if(s=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!s||(a=[...s].length,a!==i))continue;if(n[3]||n[4]){o+=a;continue}if(o-=a,o>0)continue;a=Math.min(a,a+o);let p=[...n[0]][0].length,u=r.slice(0,i+n.index+p+a),d=u.slice(i,-i);return{type:"del",raw:u,text:d,tokens:this.lexer.inlineTokens(d)}}}}autolink(r){let e=this.rules.inline.autolink.exec(r);if(e){let t,n;return e[2]==="@"?(t=e[1],n="mailto:"+t):(t=e[1],n=t),{type:"link",raw:e[0],text:t,href:n,autolink:!0,tokens:[{type:"text",raw:t,text:t}]}}}url(r){let e;if(e=this.rules.inline.url.exec(r)){let t,n;if(e[2]==="@")t=e[0],n="mailto:"+t;else{let i;do i=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??"";while(i!==e[0]);t=e[0],e[1]==="www."?n="http://"+e[0]:n=e[0]}return{type:"link",raw:e[0],text:t,href:n,autolink:!0,tokens:[{type:"text",raw:t,text:t}]}}}inlineText(r){let e=this.rules.inline.text.exec(r);if(e){let t=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:t?e[0]:Fp(e[0]),escaped:t}}}},re=class vi{tokens;options;state;inlineQueue;tokenizer;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Ue,this.options.tokenizer=this.options.tokenizer||new at,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,linkEmitted:!1,linkParenPossible:!0,top:!0};let t={other:Y,block:kr.normal,inline:jt.normal};this.options.pedantic?(t.block=kr.pedantic,t.inline=jt.pedantic):this.options.gfm&&(t.block=kr.gfm,this.options.breaks?t.inline=jt.breaks:t.inline=jt.gfm),this.tokenizer.rules=t}static get rules(){return{block:kr,inline:jt}}static lex(e,t){return new vi(t).lex(e)}static lexInline(e,t){return new vi(t).inlineTokens(e)}lex(e){e=e.replace(Y.carriageReturn,` `),this.blockTokens(e,this.tokens);for(let t=0;t(s=o.call({lexer:this},e,t))?(e=e.substring(s.raw.length),t.push(s),!0):!1))continue;if(s=this.tokenizer.space(e)){e=e.substring(s.raw.length);let o=t.at(-1);s.raw.length===1&&o!==void 0?o.raw+=` `:t.push(s);continue}if(s=this.tokenizer.code(e)){e=e.substring(s.raw.length);let o=t.at(-1);o?.type==="paragraph"||o?.type==="text"?(o.raw+=(o.raw.endsWith(` `)?"":` @@ -73,7 +73,7 @@ ${g}`)?` ${Ve.replace(/^ {0,3}/,"")}`:g;h+=` `+s.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=o.text):t.push(s),n=a.length!==e.length,e=e.substring(s.raw.length);continue}if(s=this.tokenizer.text(e)){e=e.substring(s.raw.length);let o=t.at(-1);o?.type==="text"?(o.raw+=(o.raw.endsWith(` `)?"":` `)+s.raw,o.text+=` -`+s.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=o.text):t.push(s);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}linkInText(e){if(!e.includes("["))return!1;let t=this.tokenizer.rules.inline.link;for(let n of e.matchAll(this.tokenizer.rules.inline.blockSkip))if(t.test(n[0])&&e.charAt(n.index-1)!=="!")return!0;for(let n of e.matchAll(this.tokenizer.rules.inline.reflinkSearch)){let i=n[0],s=i.lastIndexOf("[");if(!(i.charAt(0)==="!"||!Object.hasOwn(this.tokens.links,xr(i.slice(s+1,-1))))&&!(s>1&&this.linkInText(i.slice(1,s-1))))return!0}return!1}inlineTokens(e,t=[]){this.tokenizer.lexer=this;let n=this.state.linkParenPossible;this.state.linkParenPossible=n&&e.includes(")");try{return this.#e(e,t)}finally{this.state.linkParenPossible=n}}#e(e,t){let n=e.includes("*")||e.includes("_")||e.includes("~")||this.options.hooks?.emStrongMask||this.tokenizer.emStrong!==st.prototype.emStrong||this.tokenizer.del!==st.prototype.del?this.#r(e):e;Bp(this.tokenizer,n);try{return this.#t(e,n,t)}finally{Np(this.tokenizer)}}#t(e,t,n){let i=!1,s="",a=1/0;for(;e;){if(e.length(o=O.call({lexer:this},e,n))?(e=e.substring(o.raw.length),n.push(o),!0):!1))continue;if(o=this.tokenizer.escape(e)){e=e.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.tag(e)){e=e.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.link(e)){e=e.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(o.raw.length);let O=n.at(-1);o.type==="text"&&O?.type==="text"?(O.raw+=o.raw,O.text+=o.text):n.push(o);continue}if(o=this.tokenizer.emStrong(e,t,s)){e=e.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.codespan(e)){e=e.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.br(e)){e=e.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.del(e,t,s)){e=e.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.autolink(e)){e=e.substring(o.raw.length),n.push(o);continue}if(!this.state.inLink&&(o=this.tokenizer.url(e))){e=e.substring(o.raw.length),n.push(o);continue}let l=e;if(this.options.extensions?.startInline){let O=1/0,c=e.slice(1),h;this.options.extensions.startInline.forEach(p=>{h=p.call({lexer:this},c),typeof h=="number"&&h>=0&&(O=Math.min(O,h))}),O<1/0&&O>=0&&(l=e.substring(0,O+1))}if(o=this.tokenizer.inlineText(l)){e=e.substring(o.raw.length),o.raw.slice(-1)!=="_"&&(s=o.raw.slice(-1)),i=!0;let O=n.at(-1);O?.type==="text"?(O.raw+=o.raw,O.text+=o.text):n.push(o);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return n}#r(e){let t=e;if(this.tokens.links&&e.includes("[")){let n=this.tokenizer.rules.inline.reflinkSearch,i=s=>{let a=s.lastIndexOf("[");if(!Object.hasOwn(this.tokens.links,xr(s.slice(a+1,-1))))return s;if(a>1&&s.charAt(0)!=="!"){let o=s.slice(1,a-1);if(this.linkInText(o))return"["+o.replace(n,i)+"]["+"a".repeat(s.length-a-2)+"]"}return"["+"a".repeat(s.length-2)+"]"};t=t.replace(n,i)}return t=t.replace(this.tokenizer.rules.inline.anyPunctuationOutsideCode,(n,i,s)=>s?"+".repeat(n.length):i?i+n.slice(i.length,-i.length).replace(/`/g,"+")+i:n),t=t.replace(this.tokenizer.rules.inline.blockSkip,(n,i,s)=>{let a=s?s.length:0;return n.slice(0,a)+"["+"a".repeat(n.length-a-2)+"]"}),t=this.options.hooks?.emStrongMask?.call({lexer:this},t)??t,t}infiniteLoopError(e){let t="Infinite loop on byte: "+e;if(this.options.silent)console.error(t);else throw new Error(t)}},wr=class{options;parser;constructor(r){this.options=r||Me}space(r){return""}code({text:r,lang:e,escaped:t}){let n=(e||"").match(Y.notSpaceStart)?.[0],i=r?r.replace(Y.endingNewline,"")+` +`+s.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=o.text):t.push(s);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}linkInText(e){if(!e.includes("["))return!1;let t=this.tokenizer.rules.inline.link;for(let n of e.matchAll(this.tokenizer.rules.inline.blockSkip))if(t.test(n[0])&&e.charAt(n.index-1)!=="!")return!0;for(let n of e.matchAll(this.tokenizer.rules.inline.reflinkSearch)){let i=n[0],s=i.lastIndexOf("[");if(!(i.charAt(0)==="!"||!Object.hasOwn(this.tokens.links,wr(i.slice(s+1,-1))))&&!(s>1&&this.linkInText(i.slice(1,s-1))))return!0}return!1}inlineTokens(e,t=[]){this.tokenizer.lexer=this;let n=this.state.linkParenPossible;this.state.linkParenPossible=n&&e.includes(")");try{return this.#e(e,t)}finally{this.state.linkParenPossible=n}}#e(e,t){let n=e.includes("*")||e.includes("_")||e.includes("~")||this.options.hooks?.emStrongMask||this.tokenizer.emStrong!==at.prototype.emStrong||this.tokenizer.del!==at.prototype.del?this.#r(e):e;Hp(this.tokenizer,n);try{return this.#t(e,n,t)}finally{Kp(this.tokenizer)}}#t(e,t,n){let i=!1,s="",a=1/0;for(;e;){if(e.length(o=O.call({lexer:this},e,n))?(e=e.substring(o.raw.length),n.push(o),!0):!1))continue;if(o=this.tokenizer.escape(e)){e=e.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.tag(e)){e=e.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.link(e)){e=e.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(o.raw.length);let O=n.at(-1);o.type==="text"&&O?.type==="text"?(O.raw+=o.raw,O.text+=o.text):n.push(o);continue}if(o=this.tokenizer.emStrong(e,t,s)){e=e.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.codespan(e)){e=e.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.br(e)){e=e.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.del(e,t,s)){e=e.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.autolink(e)){e=e.substring(o.raw.length),n.push(o);continue}if(!this.state.inLink&&(o=this.tokenizer.url(e))){e=e.substring(o.raw.length),n.push(o);continue}let l=e;if(this.options.extensions?.startInline){let O=1/0,c=e.slice(1),h;this.options.extensions.startInline.forEach(p=>{h=p.call({lexer:this},c),typeof h=="number"&&h>=0&&(O=Math.min(O,h))}),O<1/0&&O>=0&&(l=e.substring(0,O+1))}if(o=this.tokenizer.inlineText(l)){e=e.substring(o.raw.length),o.raw.slice(-1)!=="_"&&(s=o.raw.slice(-1)),i=!0;let O=n.at(-1);O?.type==="text"?(O.raw+=o.raw,O.text+=o.text):n.push(o);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return n}#r(e){let t=e;if(this.tokens.links&&e.includes("[")){let n=this.tokenizer.rules.inline.reflinkSearch,i=s=>{let a=s.lastIndexOf("[");if(!Object.hasOwn(this.tokens.links,wr(s.slice(a+1,-1))))return s;if(a>1&&s.charAt(0)!=="!"){let o=s.slice(1,a-1);if(this.linkInText(o))return"["+o.replace(n,i)+"]["+"a".repeat(s.length-a-2)+"]"}return"["+"a".repeat(s.length-2)+"]"};t=t.replace(n,i)}return t=t.replace(this.tokenizer.rules.inline.anyPunctuationOutsideCode,(n,i,s)=>s?"+".repeat(n.length):i?i+n.slice(i.length,-i.length).replace(/`/g,"+")+i:n),t=t.replace(this.tokenizer.rules.inline.blockSkip,(n,i,s)=>{let a=s?s.length:0;return n.slice(0,a)+"["+"a".repeat(n.length-a-2)+"]"}),t=this.options.hooks?.emStrongMask?.call({lexer:this},t)??t,t}infiniteLoopError(e){let t="Infinite loop on byte: "+e;if(this.options.silent)console.error(t);else throw new Error(t)}},yr=class{options;parser;constructor(r){this.options=r||Ue}space(r){return""}code({text:r,lang:e,escaped:t}){let n=(e||"").match(Y.notSpaceStart)?.[0],i=r?r.replace(Y.endingNewline,"")+` `:"";return n?'
'+(t?i:H(i,!0))+`
`:"
"+(t?i:H(i,!0))+`
`}blockquote({tokens:r}){return`
@@ -91,8 +91,8 @@ ${this.parser.parse(r)}
`}tablerow({text:r}){return` ${r} `}tablecell(r){let e=this.parser.parseInline(r.tokens),t=r.header?"th":"td";return(r.align?`<${t} align="${r.align}">`:`<${t}>`)+e+` -`}strong({tokens:r}){return`${this.parser.parseInline(r)}`}em({tokens:r}){return`${this.parser.parseInline(r)}`}codespan({text:r}){return`${H(r,!0)}`}br(r){return"
"}del({tokens:r}){return`${this.parser.parseInline(r)}`}link({href:r,title:e,text:t,tokens:n,autolink:i}){let s=i?H(t,!0):this.parser.parseInline(n),a=ml(r);if(a===null)return s;r=H(a,i);let o='
",o}image({href:r,title:e,text:t,tokens:n}){n&&(t=this.parser.parseInline(n,this.parser.textRenderer));let i=ml(r);if(i===null)return H(t);r=i;let s=`${H(t)}{let a=i[s].flat(1/0);ye(t,this.walkTokens(a,e))}):i.tokens&&ye(t,this.walkTokens(i.tokens,e))}}return t}use(...r){let e=this.defaults.extensions||{renderers:Object.create(null),childTokens:Object.create(null)};return r.forEach(t=>{let n={...t};if(n.async=this.defaults.async||n.async||!1,t.extensions&&(t.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if("renderer"in i){let s=e.renderers[i.name];s?e.renderers[i.name]=function(...a){let o=i.renderer.apply(this,a);return o===!1&&(o=s.apply(this,a)),o}:e.renderers[i.name]=i.renderer}if("tokenizer"in i){if(!i.level||i.level!=="block"&&i.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let s=e[i.level];s?s.unshift(i.tokenizer):e[i.level]=[i.tokenizer],i.start&&(i.level==="block"?e.startBlock?e.startBlock.push(i.start):e.startBlock=[i.start]:i.level==="inline"&&(e.startInline?e.startInline.push(i.start):e.startInline=[i.start]))}"childTokens"in i&&i.childTokens&&(e.childTokens[i.name]=i.childTokens)}),n.extensions=e),t.renderer){let i=this.defaults.renderer||new wr(this.defaults);for(let s in t.renderer){if(!(s in i))throw new Error(`renderer '${s}' does not exist`);if(["options","parser"].includes(s))continue;let a=s,o=t.renderer[a],l=i[a];i[a]=(...O)=>{let c=o.apply(i,O);return c===!1&&(c=l.apply(i,O)),c===!1?"":c??""}}n.renderer=i}if(t.tokenizer){let i=this.defaults.tokenizer||new st(this.defaults);for(let s in t.tokenizer){if(!(s in i))throw new Error(`tokenizer '${s}' does not exist`);if(["options","rules","lexer"].includes(s))continue;let a=s,o=t.tokenizer[a],l=i[a];i[a]=(...O)=>{let c=o.apply(i,O);return c===!1&&(c=l.apply(i,O)),c}}n.tokenizer=i}if(t.hooks){let i=this.defaults.hooks||new jt;for(let s in t.hooks){if(!(s in i))throw new Error(`hook '${s}' does not exist`);if(["options","block"].includes(s))continue;let a=s,o=t.hooks[a],l=i[a];jt.passThroughHooks.has(s)?i[a]=O=>{if(i.options.async&&jt.passThroughHooksRespectAsync.has(s))return(async()=>{let h=await o.call(i,O);return l.call(i,h)})();let c=o.call(i,O);return l.call(i,c)}:i[a]=(...O)=>{if(i.options.async)return(async()=>{let h=await o.apply(i,O);return h===!1&&(h=await l.apply(i,O)),h})();let c=o.apply(i,O);return c===!1&&(c=l.apply(i,O)),c}}n.hooks=i}if(t.walkTokens){let i=this.defaults.walkTokens,s=t.walkTokens;n.walkTokens=function(a){let o=[];return ye(o,s.call(this,a)),i&&ye(o,i.call(this,a)),o}}this.defaults={...this.defaults,...n}}),this}setOptions(r){return this.defaults={...this.defaults,...r},this}lexer(r,e){return re.lex(r,e??this.defaults)}parser(r,e){return ne.parse(r,e??this.defaults)}parseMarkdown(r){return(e,t)=>{let n={...t},i={...this.defaults,...n},s=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&n.async===!1)return s(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof e>"u"||e===null)return s(new Error("marked(): input parameter is undefined or null"));if(typeof e!="string")return s(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));if(i.hooks&&(i.hooks.options=i,i.hooks.block=r),i.async)return(async()=>{let a=i.hooks?await i.hooks.preprocess(e):e,o=await(i.hooks?await i.hooks.provideLexer(r):r?re.lex:re.lexInline)(a,i),l=i.hooks?await i.hooks.processAllTokens(o):o;i.walkTokens&&await Promise.all(this.walkTokens(l,i.walkTokens));let O=await(i.hooks?await i.hooks.provideParser(r):r?ne.parse:ne.parseInline)(l,i);return i.hooks?await i.hooks.postprocess(O):O})().catch(s);try{i.hooks&&(e=i.hooks.preprocess(e));let a=(i.hooks?i.hooks.provideLexer(r):r?re.lex:re.lexInline)(e,i);i.hooks&&(a=i.hooks.processAllTokens(a)),i.walkTokens&&this.walkTokens(a,i.walkTokens);let o=(i.hooks?i.hooks.provideParser(r):r?ne.parse:ne.parseInline)(a,i);return i.hooks&&(o=i.hooks.postprocess(o)),o}catch(a){return s(a)}}}onError(r,e){return t=>{if(t.message+=` -Please report this to https://github.com/markedjs/marked.`,r){let n="

An error occurred:

"+H(t.message+"",!0)+"
";return e?Promise.resolve(n):n}if(e)return Promise.reject(t);throw t}}},We=new qi;function j(r,e){return We.parse(r,e)}j.options=j.setOptions=function(r){return We.setOptions(r),j.defaults=We.defaults,kl(j.defaults),j};j.getDefaults=Xi;j.defaults=Me;function Jp(...r){return We.use(...r),j.defaults=We.defaults,kl(j.defaults),j}j.use=Jp;j.walkTokens=function(r,e){return We.walkTokens(r,e)};j.parseInline=We.parseInline;j.Parser=ne;j.parser=ne.parse;j.Renderer=wr;j.TextRenderer=zi;j.Lexer=re;j.lexer=re.lex;j.Tokenizer=st;j.Hooks=jt;j.parse=j;var Zd=j.options,Xd=j.setOptions,vd=j.walkTokens,Td=j.parseInline;var Rd=ne.parse,jd=re.lex;var Ai=/^ivy:\/\/res\/([A-Za-z0-9_-]{8,64})/,jl=/^ivy:\/\/note\/([A-Za-z0-9_-]{8,64})/;function oe(r){return r.replace(/[&<>"']/g,e=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[e])}function _l(r){return r.toLowerCase().trim().replace(/<[^>]+>/g,"").replace(/[^\p{L}\p{N}\s-]/gu,"").replace(/\s+/g,"-")}function ef(r){let e=new qi({gfm:!0,breaks:!1}),t=i=>{let s=Ai.exec(i);if(s)return r.resolveResource?.(s[1])||i;let a=jl.exec(i);return a?r.noteHref?.(a[1])??"#":i},n=0;return e.use({extensions:[{name:"wikilink",level:"inline",start:i=>i.indexOf("[["),tokenizer(i){let s=/^\[\[([^[\]\n]+?)\]\]/.exec(i);if(s)return{type:"wikilink",raw:s[0],inner:s[1]}},renderer(i){let s=hl(i.inner),a=oe(s.alias||s.target),o=r.resolveTitle?.(s.target)??"";if(!o)return`
${a}`;let l=(r.noteHref?.(o)??"#")+(s.heading?"#"+_l(s.heading):"");return`${a}`}},{name:"highlight",level:"inline",start:i=>i.indexOf("=="),tokenizer(i){let s=/^==([^=\n]+)==/.exec(i);if(s)return{type:"highlight",raw:s[0],text:s[1]}},renderer(i){return`${oe(i.text)}`}}],renderer:{heading({tokens:i,depth:s}){let a=this.parser.parseInline(i);return`${a} -`},image({href:i,title:s,text:a}){let o=Ai.exec(i),l=o?r.resourceKind?.(o[1]):void 0,O=oe(t(i)),c=s?` title="${oe(s)}"`:"";return l==="video"?``:l==="audio"?``:l==="file"?`\u{1F4CE} ${oe(a||"file")}`:`${oe(a)}`},link({href:i,title:s,tokens:a}){let o=this.parser.parseInline(a),l=Ai.exec(i),O=jl.exec(i),c=oe(t(i)),h=s?` title="${oe(s)}"`:"";if(O)return`${o}`;if(l)return`\u{1F4CE} ${o}`;let p=/^https?:\/\//i.test(i);return`${o}`},listitem(i){let s=this.parser.parse(i.tokens);if(i.task){let a=n++;s=s.replace(/^]*>\s*/,"");let o=r.interactiveTasks?"":" disabled";return`
  • ${s}
  • +`}strong({tokens:r}){return`${this.parser.parseInline(r)}`}em({tokens:r}){return`${this.parser.parseInline(r)}`}codespan({text:r}){return`${H(r,!0)}`}br(r){return"
    "}del({tokens:r}){return`${this.parser.parseInline(r)}`}link({href:r,title:e,text:t,tokens:n,autolink:i}){let s=i?H(t,!0):this.parser.parseInline(n),a=Ql(r);if(a===null)return s;r=H(a,i);let o='",o}image({href:r,title:e,text:t,tokens:n}){n&&(t=this.parser.parseInline(n,this.parser.textRenderer));let i=Ql(r);if(i===null)return H(t);r=i;let s=`${H(t)}{let a=i[s].flat(1/0);ye(t,this.walkTokens(a,e))}):i.tokens&&ye(t,this.walkTokens(i.tokens,e))}}return t}use(...r){let e=this.defaults.extensions||{renderers:Object.create(null),childTokens:Object.create(null)};return r.forEach(t=>{let n={...t};if(n.async=this.defaults.async||n.async||!1,t.extensions&&(t.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if("renderer"in i){let s=e.renderers[i.name];s?e.renderers[i.name]=function(...a){let o=i.renderer.apply(this,a);return o===!1&&(o=s.apply(this,a)),o}:e.renderers[i.name]=i.renderer}if("tokenizer"in i){if(!i.level||i.level!=="block"&&i.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let s=e[i.level];s?s.unshift(i.tokenizer):e[i.level]=[i.tokenizer],i.start&&(i.level==="block"?e.startBlock?e.startBlock.push(i.start):e.startBlock=[i.start]:i.level==="inline"&&(e.startInline?e.startInline.push(i.start):e.startInline=[i.start]))}"childTokens"in i&&i.childTokens&&(e.childTokens[i.name]=i.childTokens)}),n.extensions=e),t.renderer){let i=this.defaults.renderer||new yr(this.defaults);for(let s in t.renderer){if(!(s in i))throw new Error(`renderer '${s}' does not exist`);if(["options","parser"].includes(s))continue;let a=s,o=t.renderer[a],l=i[a];i[a]=(...O)=>{let c=o.apply(i,O);return c===!1&&(c=l.apply(i,O)),c===!1?"":c??""}}n.renderer=i}if(t.tokenizer){let i=this.defaults.tokenizer||new at(this.defaults);for(let s in t.tokenizer){if(!(s in i))throw new Error(`tokenizer '${s}' does not exist`);if(["options","rules","lexer"].includes(s))continue;let a=s,o=t.tokenizer[a],l=i[a];i[a]=(...O)=>{let c=o.apply(i,O);return c===!1&&(c=l.apply(i,O)),c}}n.tokenizer=i}if(t.hooks){let i=this.defaults.hooks||new _t;for(let s in t.hooks){if(!(s in i))throw new Error(`hook '${s}' does not exist`);if(["options","block"].includes(s))continue;let a=s,o=t.hooks[a],l=i[a];_t.passThroughHooks.has(s)?i[a]=O=>{if(i.options.async&&_t.passThroughHooksRespectAsync.has(s))return(async()=>{let h=await o.call(i,O);return l.call(i,h)})();let c=o.call(i,O);return l.call(i,c)}:i[a]=(...O)=>{if(i.options.async)return(async()=>{let h=await o.apply(i,O);return h===!1&&(h=await l.apply(i,O)),h})();let c=o.apply(i,O);return c===!1&&(c=l.apply(i,O)),c}}n.hooks=i}if(t.walkTokens){let i=this.defaults.walkTokens,s=t.walkTokens;n.walkTokens=function(a){let o=[];return ye(o,s.call(this,a)),i&&ye(o,i.call(this,a)),o}}this.defaults={...this.defaults,...n}}),this}setOptions(r){return this.defaults={...this.defaults,...r},this}lexer(r,e){return re.lex(r,e??this.defaults)}parser(r,e){return ne.parse(r,e??this.defaults)}parseMarkdown(r){return(e,t)=>{let n={...t},i={...this.defaults,...n},s=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&n.async===!1)return s(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof e>"u"||e===null)return s(new Error("marked(): input parameter is undefined or null"));if(typeof e!="string")return s(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));if(i.hooks&&(i.hooks.options=i,i.hooks.block=r),i.async)return(async()=>{let a=i.hooks?await i.hooks.preprocess(e):e,o=await(i.hooks?await i.hooks.provideLexer(r):r?re.lex:re.lexInline)(a,i),l=i.hooks?await i.hooks.processAllTokens(o):o;i.walkTokens&&await Promise.all(this.walkTokens(l,i.walkTokens));let O=await(i.hooks?await i.hooks.provideParser(r):r?ne.parse:ne.parseInline)(l,i);return i.hooks?await i.hooks.postprocess(O):O})().catch(s);try{i.hooks&&(e=i.hooks.preprocess(e));let a=(i.hooks?i.hooks.provideLexer(r):r?re.lex:re.lexInline)(e,i);i.hooks&&(a=i.hooks.processAllTokens(a)),i.walkTokens&&this.walkTokens(a,i.walkTokens);let o=(i.hooks?i.hooks.provideParser(r):r?ne.parse:ne.parseInline)(a,i);return i.hooks&&(o=i.hooks.postprocess(o)),o}catch(a){return s(a)}}}onError(r,e){return t=>{if(t.message+=` +Please report this to https://github.com/markedjs/marked.`,r){let n="

    An error occurred:

    "+H(t.message+"",!0)+"
    ";return e?Promise.resolve(n):n}if(e)return Promise.reject(t);throw t}}},Me=new Ei;function j(r,e){return Me.parse(r,e)}j.options=j.setOptions=function(r){return Me.setOptions(r),j.defaults=Me.defaults,xl(j.defaults),j};j.getDefaults=Ri;j.defaults=Ue;function rf(...r){return Me.use(...r),j.defaults=Me.defaults,xl(j.defaults),j}j.use=rf;j.walkTokens=function(r,e){return Me.walkTokens(r,e)};j.parseInline=Me.parseInline;j.Parser=ne;j.parser=ne.parse;j.Renderer=yr;j.TextRenderer=Li;j.Lexer=re;j.lexer=re.lex;j.Tokenizer=at;j.Hooks=_t;j.parse=j;var Rd=j.options,jd=j.setOptions,_d=j.walkTokens,Yd=j.parseInline;var Cd=ne.parse,zd=re.lex;var Wi=/^ivy:\/\/res\/([A-Za-z0-9_-]{8,64})/,Yl=/^ivy:\/\/note\/([A-Za-z0-9_-]{8,64})/;function oe(r){return r.replace(/[&<>"']/g,e=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[e])}function Cl(r){return r.toLowerCase().trim().replace(/<[^>]+>/g,"").replace(/[^\p{L}\p{N}\s-]/gu,"").replace(/\s+/g,"-")}function nf(r){let e=new Ei({gfm:!0,breaks:!1}),t=i=>{let s=Wi.exec(i);if(s)return r.resolveResource?.(s[1])||i;let a=Yl.exec(i);return a?r.noteHref?.(a[1])??"#":i},n=0;return e.use({extensions:[{name:"wikilink",level:"inline",start:i=>i.indexOf("[["),tokenizer(i){let s=/^\[\[([^[\]\n]+?)\]\]/.exec(i);if(s)return{type:"wikilink",raw:s[0],inner:s[1]}},renderer(i){let s=pl(i.inner),a=oe(s.alias||s.target),o=r.resolveTitle?.(s.target)??"";if(!o)return`
    ${a}`;let l=(r.noteHref?.(o)??"#")+(s.heading?"#"+Cl(s.heading):"");return`${a}`}},{name:"highlight",level:"inline",start:i=>i.indexOf("=="),tokenizer(i){let s=/^==([^=\n]+)==/.exec(i);if(s)return{type:"highlight",raw:s[0],text:s[1]}},renderer(i){return`${oe(i.text)}`}}],renderer:{heading({tokens:i,depth:s}){let a=this.parser.parseInline(i);return`${a} +`},image({href:i,title:s,text:a}){let o=Wi.exec(i),l=o?r.resourceKind?.(o[1]):void 0,O=oe(t(i)),c=s?` title="${oe(s)}"`:"";return l==="video"?``:l==="audio"?``:l==="file"?`\u{1F4CE} ${oe(a||"file")}`:`${oe(a)}`},link({href:i,title:s,tokens:a}){let o=this.parser.parseInline(a),l=Wi.exec(i),O=Yl.exec(i),c=oe(t(i)),h=s?` title="${oe(s)}"`:"";if(O)return`${o}`;if(l)return`\u{1F4CE} ${o}`;let p=/^https?:\/\//i.test(i);return`${o}`},listitem(i){let s=this.parser.parse(i.tokens);if(i.task){let a=n++;s=s.replace(/^]*>\s*/,"");let o=r.interactiveTasks?"":" disabled";return`
  • ${s}
  • `}return`
  • ${s}
  • -`}}}),{marked:e,resetTasks:()=>n=0}}var Yl=!1;function Cl(r,e={}){let{marked:t,resetTasks:n}=ef(e);n();let i=t.parse(r,{async:!1});return e.citations&&(i=i.replace(/\[(\d{1,2})\](?![^<]*<\/a>)/g,'$1')),!Yl&&typeof Gt.addHook=="function"&&(Gt.addHook("afterSanitizeAttributes",s=>{s.tagName==="A"&&s.getAttribute("target")==="_blank"&&s.setAttribute("rel","noopener noreferrer")}),Yl=!0),Gt.sanitize(i,{ADD_TAGS:["video","audio"],ADD_ATTR:["target","controls","preload","data-note","data-title","data-task","data-cite","loading"],ALLOWED_URI_REGEXP:/^(?:(?:https?|mailto|tel|blob):|\/|#|[^a-z]|[a-z+.-]+(?:[^a-z+.\-:]|$))/i})}function Ue(r){window.IvyAndroid?.postMessage(JSON.stringify(r))}var Xr="",ql=[],yr=new Map,vr={},Zr="",P=null,Al=new Mi;function zl(r,e){return`/res/${encodeURIComponent(r)}${e?"?thumb=1":""}`}var Ll={resolveResource:zl,resourceKind:r=>vr[r]??"image",resolveTitle:r=>yr.get(br(r.split("#")[0].split("|")[0]))??"",openNote:(r,e)=>Ue({type:"open",id:r,title:e}),renderBlock:r=>Cl(r,{resolveResource:zl,resourceKind:e=>vr[e],resolveTitle:e=>Ll.resolveTitle(e),noteHref:()=>"#"})};function tf(){return ql.filter(r=>r.id!==Xr&&r.title).map(r=>({title:r.title,detail:r.folder}))}function rf(r){return[hs(),vs(),Uo({top:!0}),Mo(),zo({base:tt,addKeymap:!0}),Ol,ll,X.lineWrapping,Fi("\u5F00\u59CB\u5199\u4F5C\u2026"),Ys({override:[cl(tf)],icons:!1,activateOnTyping:!0}),ve.of([{key:"Mod-b",run:e=>de(e,"**","\u52A0\u7C97")},{key:"Mod-i",run:e=>de(e,"*","\u659C\u4F53")},{key:"Mod-e",run:e=>de(e,"`","code")},{key:"Mod-Shift-x",run:e=>de(e,"~~","\u5220\u9664\u7EBF")},{key:"Mod-k",run:fi},{key:"Mod-Shift-k",run:di},{key:"Mod-Alt-1",run:e=>V(e,"# ")},{key:"Mod-Alt-2",run:e=>V(e,"## ")},{key:"Mod-Alt-3",run:e=>V(e,"### ")},{key:"Mod-Shift-7",run:e=>V(e,"1. ")},{key:"Mod-Shift-8",run:e=>V(e,"- ")},{key:"Mod-Shift-9",run:e=>V(e,"- [ ] ")},...js,...tn,...Bo,...us,fs,...ps]),ol(Ll),X.contentAttributes.of({class:"cm-live"}),Al.of(Qe.readOnly.of(r)),X.updateListener.of(e=>{if(e.focusChanged&&Ue({type:"focus",focused:e.view.hasFocus}),!e.docChanged)return;let t=e.state.doc.toString();Zr=t,Ue({type:"change",id:Xr,body:t})})]}var nf=document.getElementById("editor"),Li=-1,Ei=!1;function El(){if(Ei=!1,!P)return;let r=P.lineBlockAtHeight(48-P.documentTop),e=P.state.doc.lineAt(Math.min(r.from,P.state.doc.length)).number-1;e!==Li&&(Li=e,Ue({type:"scroll",line:e}))}window.addEventListener("scroll",()=>{Ei||(Ei=!0,requestAnimationFrame(El))},{passive:!0});window.ivy={load(r){Xr=r.id,Zr=r.body,r.fontSize&&document.documentElement.style.setProperty("--editor-size",`${r.fontSize}px`);let e=Qe.create({doc:r.body,extensions:rf(!!r.readonly)});P?P.setState(e):P=new X({state:e,parent:nf}),P.scrollDOM.scrollTop=0,document.scrollingElement?.scrollTo(0,0),Li=-1,El(),r.focus&&window.ivy.focus(!0)},setBody(r,e){if(!P||r!==Xr||e===Zr)return;let t=P.state.doc.toString();if(Zr=e,e===t)return;let n=0;for(;nn&&s>n&&t[i-1]===e[s-1];)i--,s--;P.dispatch({changes:{from:n,to:i,insert:e.slice(n,s)}})},setTitles(r){ql=r,yr=new Map;for(let e of r){let t=br(e.title);t&&!yr.has(t)&&yr.set(t,e.id)}P?.dispatch({})},setKinds(r){let e=JSON.stringify(r)!==JSON.stringify(vr);vr=r,e&&P?.dispatch({})},insert(r,e=!0){!P||P.state.readOnly||pi(P,r,e)},setTheme(r){document.documentElement.dataset.theme=r?"dark":"light"},setReadonly(r){P?.dispatch({effects:Al.reconfigure(Qe.readOnly.of(r))})},focus(r=!1){P&&(P.focus(),r&&P.dispatch({selection:{anchor:P.state.doc.length},scrollIntoView:!0}))},scrollToLine(r,e=!1){if(!P)return;let t=P.state.doc.line(Math.min(Math.max(1,r+1),P.state.doc.lines));P.dispatch({selection:{anchor:t.from},effects:X.scrollIntoView(t.from,{y:"start",yMargin:24})}),e&&P.focus()},command(r){if(P){switch(r){case"bold":de(P,"**","\u52A0\u7C97");break;case"italic":de(P,"*","\u659C\u4F53");break;case"strike":de(P,"~~","\u5220\u9664\u7EBF");break;case"code":de(P,"`","code");break;case"h1":V(P,"# ");break;case"h2":V(P,"## ");break;case"h3":V(P,"### ");break;case"list":V(P,"- ");break;case"ordered":V(P,"1. ");break;case"task":V(P,"- [ ] ");break;case"quote":V(P,"> ");break;case"link":fi(P);break;case"wiki":di(P);break;case"rule":pi(P,"---",!0);break;case"undo":import("./chunks/dist-6TNHQW23.js").then(e=>P&&e.undo(P));return;case"redo":import("./chunks/dist-6TNHQW23.js").then(e=>P&&e.redo(P));return;case"blur":P.contentDOM.blur();return}P.focus()}}};window.addEventListener("error",r=>Ue({type:"error",message:String(r.message)}));document.addEventListener("error",r=>{let e=r.target;e&&"src"in e&&e!==window&&Ue({type:"log",message:`failed to load ${e.src}`})},!0);Ue({type:"ready"}); +`}}}),{marked:e,resetTasks:()=>n=0}}var zl=!1;function ql(r,e={}){let{marked:t,resetTasks:n}=nf(e);n();let i=t.parse(r,{async:!1});return e.citations&&(i=i.replace(/\[(\d{1,2})\](?![^<]*<\/a>)/g,'$1')),!zl&&typeof It.addHook=="function"&&(It.addHook("afterSanitizeAttributes",s=>{s.tagName==="A"&&s.getAttribute("target")==="_blank"&&s.setAttribute("rel","noopener noreferrer")}),zl=!0),It.sanitize(i,{ADD_TAGS:["video","audio"],ADD_ATTR:["target","controls","preload","data-note","data-title","data-task","data-cite","loading"],ALLOWED_URI_REGEXP:/^(?:(?:https?|mailto|tel|blob):|\/|#|[^a-z]|[a-z+.-]+(?:[^a-z+.\-:]|$))/i})}function Ve(r){window.IvyAndroid?.postMessage(JSON.stringify(r))}var vr="",Ll=[],Zr=new Map,Tr={},Xr="",P=null,El=new _r,Wl=new _r,sf={zh:{placeholder:"\u5F00\u59CB\u5199\u4F5C\u2026",bold:"\u52A0\u7C97",italic:"\u659C\u4F53",strike:"\u5220\u9664\u7EBF"},en:{placeholder:"Start writing\u2026",bold:"bold",italic:"italic",strike:"strikethrough"}},Mi="zh",Ze=()=>sf[Mi];function Al(r,e){return`/res/${encodeURIComponent(r)}${e?"?thumb=1":""}`}var Ml={resolveResource:Al,resourceKind:r=>Tr[r]??"image",resolveTitle:r=>Zr.get(Sr(r.split("#")[0].split("|")[0]))??"",openNote:(r,e)=>Ve({type:"open",id:r,title:e}),renderBlock:r=>ql(r,{resolveResource:Al,resourceKind:e=>Tr[e],resolveTitle:e=>Ml.resolveTitle(e),noteHref:()=>"#"})};function af(){return Ll.filter(r=>r.id!==vr&&r.title).map(r=>({title:r.title,detail:r.folder}))}function of(r){return[ps(),Rs(),Go({top:!0}),Vo(),Ao({base:rt,addKeymap:!0}),hl,cl,X.lineWrapping,Wl.of(Yr(Ze().placeholder)),zs({override:[ul(af)],icons:!1,activateOnTyping:!0}),Te.of([{key:"Mod-b",run:e=>de(e,"**",Ze().bold)},{key:"Mod-i",run:e=>de(e,"*",Ze().italic)},{key:"Mod-e",run:e=>de(e,"`","code")},{key:"Mod-Shift-x",run:e=>de(e,"~~",Ze().strike)},{key:"Mod-k",run:gi},{key:"Mod-Shift-k",run:Qi},{key:"Mod-Alt-1",run:e=>V(e,"# ")},{key:"Mod-Alt-2",run:e=>V(e,"## ")},{key:"Mod-Alt-3",run:e=>V(e,"### ")},{key:"Mod-Shift-7",run:e=>V(e,"1. ")},{key:"Mod-Shift-8",run:e=>V(e,"- ")},{key:"Mod-Shift-9",run:e=>V(e,"- [ ] ")},...Ys,...sn,...Fo,...fs,ms,...ds]),Ol(Ml),X.contentAttributes.of({class:"cm-live"}),El.of(Qe.readOnly.of(r)),X.updateListener.of(e=>{if(e.focusChanged&&Ve({type:"focus",focused:e.view.hasFocus}),!e.docChanged)return;let t=e.state.doc.toString();Xr=t,Ve({type:"change",id:vr,body:t})})]}var lf=document.getElementById("editor"),Ui=-1,Vi=!1;function Ul(){if(Vi=!1,!P)return;let r=P.lineBlockAtHeight(48-P.documentTop),e=P.state.doc.lineAt(Math.min(r.from,P.state.doc.length)).number-1;e!==Ui&&(Ui=e,Ve({type:"scroll",line:e}))}window.addEventListener("scroll",()=>{Vi||(Vi=!0,requestAnimationFrame(Ul))},{passive:!0});window.ivy={load(r){vr=r.id,Xr=r.body,r.fontSize&&document.documentElement.style.setProperty("--editor-size",`${r.fontSize}px`);let e=Qe.create({doc:r.body,extensions:of(!!r.readonly)});P?P.setState(e):P=new X({state:e,parent:lf}),P.scrollDOM.scrollTop=0,document.scrollingElement?.scrollTo(0,0),Ui=-1,Ul(),r.focus&&window.ivy.focus(!0)},setBody(r,e){if(!P||r!==vr||e===Xr)return;let t=P.state.doc.toString();if(Xr=e,e===t)return;let n=0;for(;nn&&s>n&&t[i-1]===e[s-1];)i--,s--;P.dispatch({changes:{from:n,to:i,insert:e.slice(n,s)}})},setTitles(r){Ll=r,Zr=new Map;for(let e of r){let t=Sr(e.title);t&&!Zr.has(t)&&Zr.set(t,e.id)}P?.dispatch({})},setKinds(r){let e=JSON.stringify(r)!==JSON.stringify(Tr);Tr=r,e&&P?.dispatch({})},insert(r,e=!0){!P||P.state.readOnly||mi(P,r,e)},setLanguage(r){Mi=r==="en"?"en":"zh",document.documentElement.lang=Mi==="zh"?"zh-CN":"en",P?.dispatch({effects:Wl.reconfigure(Yr(Ze().placeholder))})},setTheme(r){document.documentElement.dataset.theme=r?"dark":"light"},setReadonly(r){P?.dispatch({effects:El.reconfigure(Qe.readOnly.of(r))})},focus(r=!1){P&&(P.focus(),r&&P.dispatch({selection:{anchor:P.state.doc.length},scrollIntoView:!0}))},scrollToLine(r,e=!1){if(!P)return;let t=P.state.doc.line(Math.min(Math.max(1,r+1),P.state.doc.lines));P.dispatch({selection:{anchor:t.from},effects:X.scrollIntoView(t.from,{y:"start",yMargin:24})}),e&&P.focus()},command(r){if(P){switch(r){case"bold":de(P,"**",Ze().bold);break;case"italic":de(P,"*",Ze().italic);break;case"strike":de(P,"~~",Ze().strike);break;case"code":de(P,"`","code");break;case"h1":V(P,"# ");break;case"h2":V(P,"## ");break;case"h3":V(P,"### ");break;case"list":V(P,"- ");break;case"ordered":V(P,"1. ");break;case"task":V(P,"- [ ] ");break;case"quote":V(P,"> ");break;case"link":gi(P);break;case"wiki":Qi(P);break;case"rule":mi(P,"---",!0);break;case"undo":import("./chunks/dist-6TNHQW23.js").then(e=>P&&e.undo(P));return;case"redo":import("./chunks/dist-6TNHQW23.js").then(e=>P&&e.redo(P));return;case"blur":P.contentDOM.blur();return}P.focus()}}};window.addEventListener("error",r=>Ve({type:"error",message:String(r.message)}));document.addEventListener("error",r=>{let e=r.target;e&&"src"in e&&e!==window&&Ve({type:"log",message:`failed to load ${e.src}`})},!0);Ve({type:"ready"}); diff --git a/app/src/main/kotlin/app/ivynote/android/IvyApp.kt b/app/src/main/kotlin/app/ivynote/android/IvyApp.kt index 1476910..f843a81 100644 --- a/app/src/main/kotlin/app/ivynote/android/IvyApp.kt +++ b/app/src/main/kotlin/app/ivynote/android/IvyApp.kt @@ -1,6 +1,7 @@ package app.ivynote.android import android.app.Application +import android.content.res.Configuration import android.os.Build import androidx.lifecycle.DefaultLifecycleObserver import androidx.lifecycle.LifecycleOwner @@ -8,6 +9,8 @@ import androidx.lifecycle.ProcessLifecycleOwner import app.ivynote.android.platform.KeystoreCredentialStore import app.ivynote.android.platform.SharedPrefsStore import app.ivynote.core.IvyHttp +import app.ivynote.core.Language +import app.ivynote.core.LanguageSettings import app.ivynote.core.LibraryCatalog import app.ivynote.core.OfficialRegions import app.ivynote.core.newEntityId @@ -17,7 +20,9 @@ import kotlinx.coroutines.SupervisorJob import kotlinx.coroutines.flow.MutableStateFlow import kotlinx.coroutines.flow.StateFlow import kotlinx.coroutines.flow.asStateFlow +import kotlinx.coroutines.launch import java.io.File +import java.util.Locale /** * Holds what outlives screens: the library catalog and the open library @@ -28,6 +33,12 @@ class IvyApp : Application() { private set lateinit var catalog: LibraryCatalog private set + lateinit var language: LanguageSettings + private set + + /** The system's locale (or this app's, set in the system settings), before ours replaces the default. */ + var systemLocale: Locale = Locale.getDefault() + private set /** For work that must finish after a screen is gone (pushing before sign-out). */ val appScope = CoroutineScope(SupervisorJob() + Dispatchers.Main) @@ -40,6 +51,13 @@ class IvyApp : Application() { instance = this IvyHttp.userAgent = "Ivynote-Android/${BuildConfig.VERSION_NAME} (Android ${Build.VERSION.RELEASE})" prefs = SharedPrefsStore(this) + systemLocale = systemLocales(resources.configuration).firstOrNull() ?: Locale.getDefault() + language = LanguageSettings(prefs, systemLocales(resources.configuration).map { it.toLanguageTag() }) + // TODO(server): once ivynote stores the account's language, send the + // choice here (PATCH /me) and pass `/me`'s value to accountOpened. + language.onAccountChoice = null + applyLocale(language.current.value) + appScope.launch { language.current.collect { applyLocale(it) } } // Official node addresses: the website's last answer, else the built-in ones. OfficialRegions.install(prefs) catalog = LibraryCatalog( @@ -53,6 +71,31 @@ class IvyApp : Application() { }) } + override fun onConfigurationChanged(newConfig: Configuration) { + super.onConfigurationChanged(newConfig) + // The system language changed: the framework has reset the default locale. + systemLocale = systemLocales(newConfig).firstOrNull() ?: systemLocale + language.systemChanged(systemLocales(newConfig).map { it.toLanguageTag() }) + applyLocale(language.current.value) + } + + /** + * Dates, relative times and number formats follow the interface + * language. The region stays the system's (it picks the sync node). + */ + private fun applyLocale(lang: Language) { + // The system's own English (en-GB dates); Chinese is always the simplified script. + val base = if (lang == Language.EN && systemLocale.language == "en") systemLocale else null + val locale = base ?: Locale.Builder().setLanguage(lang.tag).setRegion(systemLocale.country.takeIf { it.length == 2 } ?: "") + .apply { if (lang == Language.ZH) setScript("Hans") }.build() + Locale.setDefault(locale) + } + + private fun systemLocales(config: Configuration): List { + val list = config.locales + return (0 until list.size()).map { list[it] } + } + /** This install's HLC node and `device` name, e.g. `android-a1b2c3d4` (guide 6.2). */ val deviceId: String get() { diff --git a/app/src/main/kotlin/app/ivynote/android/LibrarySession.kt b/app/src/main/kotlin/app/ivynote/android/LibrarySession.kt index cea2a26..a04278b 100644 --- a/app/src/main/kotlin/app/ivynote/android/LibrarySession.kt +++ b/app/src/main/kotlin/app/ivynote/android/LibrarySession.kt @@ -88,7 +88,7 @@ class LibrarySession private constructor( val type = resolver.getType(uri) ?: name?.substringAfterLast('.', "")?.lowercase()?.let { MimeTypeMap.getSingleton().getMimeTypeFromExtension(it) } ?: "application/octet-stream" - (resolver.openInputStream(uri) ?: throw java.io.IOException("无法读取文件")).use { input -> + (resolver.openInputStream(uri) ?: throw java.io.IOException(app.ivynote.core.L10n.s.cannotReadFile)).use { input -> tmp.outputStream().use { input.copyTo(it) } } (name ?: fallbackName ?: defaultName(type)) to type diff --git a/app/src/main/kotlin/app/ivynote/android/MainActivity.kt b/app/src/main/kotlin/app/ivynote/android/MainActivity.kt index 9e2d379..db2d75c 100644 --- a/app/src/main/kotlin/app/ivynote/android/MainActivity.kt +++ b/app/src/main/kotlin/app/ivynote/android/MainActivity.kt @@ -5,6 +5,7 @@ import androidx.activity.ComponentActivity import androidx.activity.compose.setContent import androidx.activity.enableEdgeToEdge import app.ivynote.android.ui.IvyTheme +import app.ivynote.android.ui.ProvideStrings import app.ivynote.android.ui.RootScreen class MainActivity : ComponentActivity() { @@ -12,7 +13,7 @@ class MainActivity : ComponentActivity() { enableEdgeToEdge() super.onCreate(savedInstanceState) setContent { - IvyTheme { RootScreen() } + ProvideStrings { IvyTheme { RootScreen() } } } } } diff --git a/app/src/main/kotlin/app/ivynote/android/editor/EditorHost.kt b/app/src/main/kotlin/app/ivynote/android/editor/EditorHost.kt index b9539c0..f419eb5 100644 --- a/app/src/main/kotlin/app/ivynote/android/editor/EditorHost.kt +++ b/app/src/main/kotlin/app/ivynote/android/editor/EditorHost.kt @@ -121,6 +121,7 @@ class EditorHost(appContext: Context, private val session: LibrarySession) { sendTitles() refreshKinds() call("ivy.setTheme($dark)") + setLanguage(app.ivynote.core.L10n.language) val payload = buildJsonObject { put("id", note.id) put("body", note.body) @@ -175,6 +176,14 @@ class EditorHost(appContext: Context, private val session: LibrarySession) { fun setReadonly(ro: Boolean) = call("ivy.setReadonly($ro)") + /** The placeholder and the words formatting wraps around an empty selection. */ + fun setLanguage(language: app.ivynote.core.Language) { + if (language == sentLanguage) return + sentLanguage = language + call("ivy.setLanguage(${JsonPrimitive(language.tag)})") + } + private var sentLanguage: app.ivynote.core.Language? = null + fun setTheme(dark: Boolean) { this.dark = dark call("ivy.setTheme($dark)") @@ -302,6 +311,7 @@ class EditorHost(appContext: Context, private val session: LibrarySession) { view.destroy() queued.clear() sentKinds = "" + sentLanguage = null _webView.value = create() val id = noteId val note = id?.let { engine.notes[it] } diff --git a/app/src/main/kotlin/app/ivynote/android/ui/AccountSheet.kt b/app/src/main/kotlin/app/ivynote/android/ui/AccountSheet.kt index 7d6abf4..89676da 100644 --- a/app/src/main/kotlin/app/ivynote/android/ui/AccountSheet.kt +++ b/app/src/main/kotlin/app/ivynote/android/ui/AccountSheet.kt @@ -2,6 +2,7 @@ package app.ivynote.android.ui import android.content.Intent import android.net.Uri +import androidx.compose.foundation.clickable import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.Row @@ -52,54 +53,62 @@ fun AccountSheet(lib: LibrarySession, session: SessionStore, onDismiss: () -> Un val revision by engine.revision.collectAsState() var confirmSignOut by remember { mutableStateOf(false) } var signingOut by remember { mutableStateOf(false) } + var choosingLanguage by remember { mutableStateOf(false) } + val s = LocalStrings.current ModalBottomSheet(onDismissRequest = onDismiss, sheetState = rememberModalBottomSheetState(skipPartiallyExpanded = true), containerColor = c.canvas) { Column( Modifier.verticalScroll(rememberScrollState()).padding(horizontal = 20.dp).navigationBarsPadding().padding(bottom = 24.dp), verticalArrangement = Arrangement.spacedBy(14.dp), ) { - Text("账户", style = SerifTitle, fontSize = 20.sp, color = c.ink) + Text(s.account, style = SerifTitle, fontSize = 20.sp, color = c.ink) Card { - Field("名称", account.user.name) - Field("用户名", account.user.username) - if (account.user.email.isNotEmpty()) Field("邮箱", account.user.email) - Field("角色", if (account.user.isAdmin) "管理员" else "用户") + Field(s.name, account.user.name) + Field(s.username, account.user.username) + if (account.user.email.isNotEmpty()) Field(s.email, account.user.email) + Field(s.role, if (account.user.isAdmin) s.admin else s.user) + // The account's language: kept by the server, on all its devices. + Field(s.language, choiceLabel(IvyApp.instance.language.selected.collectAsState().value, s), onClick = { choosingLanguage = true }) } - Caption("同步 · ${lib.ref.name}") + Caption(s.syncSection(lib.ref.name)) Card { - Field("服务器", account.server.toString()) + Field(s.server, account.server.toString()) Row(Modifier.fillMaxWidth().padding(vertical = 8.dp), verticalAlignment = Alignment.CenterVertically) { - Text("状态", color = c.ink2, fontSize = 15.sp, modifier = Modifier.width(88.dp)) + Text(s.status, color = c.ink2, fontSize = 15.sp, modifier = Modifier.width(88.dp)) SyncStatusLine(engine, state) } - Field("笔记", remember(revision) { engine.liveNotes.size.toString() }) - Field("本设备", engine.device) + Field(s.notes, remember(revision) { engine.liveNotes.size.toString() }) + Field(s.thisDevice, engine.device) Row(horizontalArrangement = Arrangement.spacedBy(8.dp)) { OutlinedButton(onClick = { lib.engine.let { e -> app.appScope.launch { e.sync() } } }, enabled = state.status != SyncState.Status.SYNCING) { - Text("立即同步") + Text(s.syncNow) } if (account.user.isAdmin) { OutlinedButton(onClick = { runCatching { context.startActivity(Intent(Intent.ACTION_VIEW, Uri.parse(account.server.base + "/admin"))) } - }) { Text("打开管理后台") } + }) { Text(s.openAdmin) } } } } Surface(shape = RoundedCornerShape(16.dp), color = c.surface, modifier = Modifier.fillMaxWidth()) { TextButton(onClick = { confirmSignOut = true }, enabled = !signingOut, modifier = Modifier.padding(4.dp)) { - Text(if (signingOut) "正在退出…" else "退出登录", color = c.danger, fontWeight = FontWeight.Medium) + Text(if (signingOut) s.signingOut else s.signOut, color = c.danger, fontWeight = FontWeight.Medium) } } - Text("退出后,本设备上这个笔记库的副本会被删除;服务器上的数据不受影响。重新登录后会再次下载。", fontSize = 12.5.sp, color = c.muted) + Text(s.signOutHint, fontSize = 12.5.sp, color = c.muted) } } + if (choosingLanguage) { + LanguageDialog(onDismiss = { choosingLanguage = false }) + } + if (confirmSignOut) { val unsynced = state.pending + state.blocked ConfirmDialog( - title = "退出登录?", - message = if (unsynced > 0) "还有 $unsynced 条更改没有同步到服务器,退出后会丢失。" else "这台设备的登录令牌会被撤销,本地数据会被删除。", - confirm = "退出登录", + title = s.signOutTitle, + message = if (unsynced > 0) s.signOutUnsynced(unsynced) else s.signOutMessage, + confirm = s.signOut, onDismiss = { confirmSignOut = false }, ) { // Sync, revoke the token, then delete the local copy (guide 6.10). @@ -121,9 +130,9 @@ private fun Card(content: @Composable () -> Unit) { } @Composable -private fun Field(label: String, value: String) { +private fun Field(label: String, value: String, onClick: (() -> Unit)? = null) { val c = Ivy.colors - Row(Modifier.fillMaxWidth().padding(vertical = 8.dp), verticalAlignment = Alignment.CenterVertically) { + Row(Modifier.fillMaxWidth().then(if (onClick != null) Modifier.clickable(onClick = onClick) else Modifier).padding(vertical = 8.dp), verticalAlignment = Alignment.CenterVertically) { Text(label, color = c.ink2, fontSize = 15.sp, modifier = Modifier.width(88.dp)) Spacer(Modifier.width(4.dp)) Text(value, color = c.ink, fontSize = 15.sp, maxLines = 2, overflow = TextOverflow.Ellipsis) diff --git a/app/src/main/kotlin/app/ivynote/android/ui/Common.kt b/app/src/main/kotlin/app/ivynote/android/ui/Common.kt index bc3c4d7..f037efc 100644 --- a/app/src/main/kotlin/app/ivynote/android/ui/Common.kt +++ b/app/src/main/kotlin/app/ivynote/android/ui/Common.kt @@ -56,6 +56,7 @@ import androidx.compose.ui.unit.Dp import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp import app.ivynote.android.R +import app.ivynote.core.L10n import app.ivynote.core.LibraryRef import app.ivynote.core.SyncEngine import app.ivynote.core.SyncState @@ -66,8 +67,8 @@ import kotlinx.coroutines.delay fun TextInputDialog( title: String, initial: String = "", - placeholder: String = "名称", - confirm: String = "保存", + placeholder: String = L10n.s.name, + confirm: String = L10n.s.save, message: String? = null, onDismiss: () -> Unit, onConfirm: (String) -> Unit, @@ -92,7 +93,7 @@ fun TextInputDialog( } }, confirmButton = { TextButton(onClick = { onConfirm(value.text); onDismiss() }) { Text(confirm) } }, - dismissButton = { TextButton(onClick = onDismiss) { Text("取消") } }, + dismissButton = { TextButton(onClick = onDismiss) { Text(LocalStrings.current.cancel) } }, ) LaunchedEffect(Unit) { delay(100) @@ -118,7 +119,7 @@ fun ConfirmDialog( Text(confirm, color = if (destructive) Ivy.colors.danger else Ivy.colors.ivy) } }, - dismissButton = { TextButton(onClick = onDismiss) { Text("取消") } }, + dismissButton = { TextButton(onClick = onDismiss) { Text(LocalStrings.current.cancel) } }, ) } @@ -181,17 +182,18 @@ fun SyncStatusLine(engine: SyncEngine, state: SyncState, modifier: Modifier = Mo tick++ } } + val s = LocalStrings.current Column(modifier) { Row(verticalAlignment = Alignment.CenterVertically) { val (icon: ImageVector?, text: String, tint: Color) = when { - engine.isLocal -> Triple(Icons.Outlined.CloudOff, "仅保存在本机 · 未同步", c.muted) - state.status == SyncState.Status.SYNCING -> Triple(null, if (state.initial) "正在下载笔记…" else "同步中…", c.muted) + engine.isLocal -> Triple(Icons.Outlined.CloudOff, s.localUnsynced, c.muted) + state.status == SyncState.Status.SYNCING -> Triple(null, if (state.initial) s.downloadingNotes else s.syncing, c.muted) state.status == SyncState.Status.OFFLINE -> - Triple(Icons.Outlined.WifiOff, if (state.pending > 0) "离线 · ${state.pending} 条待同步" else "离线", c.warn) - state.status == SyncState.Status.ERROR -> Triple(Icons.Outlined.Warning, "同步出错", c.danger) - state.pending > 0 -> Triple(Icons.Outlined.Sync, "${state.pending} 条待同步", c.muted) - state.lastSyncAt > 0 -> Triple(Icons.Outlined.CloudDone, "已同步 · ${relative(state.lastSyncAt, tick)}", c.muted) - else -> Triple(null, "尚未同步", c.muted) + Triple(Icons.Outlined.WifiOff, if (state.pending > 0) s.offlinePending(state.pending) else s.offline, c.warn) + state.status == SyncState.Status.ERROR -> Triple(Icons.Outlined.Warning, s.syncError, c.danger) + state.pending > 0 -> Triple(Icons.Outlined.Sync, s.pending(state.pending), c.muted) + state.lastSyncAt > 0 -> Triple(Icons.Outlined.CloudDone, s.synced(relative(state.lastSyncAt, tick)), c.muted) + else -> Triple(null, s.neverSynced, c.muted) } if (state.status == SyncState.Status.SYNCING && !engine.isLocal) { CircularProgressIndicator(Modifier.size(11.dp), strokeWidth = 1.5.dp, color = c.muted) @@ -203,7 +205,7 @@ fun SyncStatusLine(engine: SyncEngine, state: SyncState, modifier: Modifier = Mo Text(text, fontSize = 12.5.sp, color = c.muted, maxLines = 1, overflow = TextOverflow.Ellipsis) } if (state.blocked > 0) { - Text("${state.blocked} 条更改被服务器拒绝", fontSize = 12.5.sp, color = c.warn) + Text(s.blocked(state.blocked), fontSize = 12.5.sp, color = c.warn) } } } @@ -211,23 +213,24 @@ fun SyncStatusLine(engine: SyncEngine, state: SyncState, modifier: Modifier = Mo @Suppress("UNUSED_PARAMETER") fun relative(at: Long, tick: Long = 0): String { val now = System.currentTimeMillis() - if (now - at < 60_000) return "刚刚" + if (now - at < 60_000) return L10n.s.justNow return DateUtils.getRelativeTimeSpanString(at, now, DateUtils.MINUTE_IN_MILLIS).toString() } -/** 今天 16:20、昨天、周几、10月29日、2025年3月1日 (guide 11.7). */ +/** 今天 16:20、昨天、周几、10月29日、2025年3月1日 (guide 11.7), in the interface language. */ fun shortDate(at: Long): String { + val s = L10n.s val now = java.util.Calendar.getInstance() val then = java.util.Calendar.getInstance().apply { timeInMillis = at } val days = ((startOfDay(now) - startOfDay(then)) / 86_400_000L).toInt() val time = String.format(java.util.Locale.ROOT, "%02d:%02d", then.get(java.util.Calendar.HOUR_OF_DAY), then.get(java.util.Calendar.MINUTE)) return when { days <= 0 -> time - days == 1 -> "昨天 $time" - days < 7 -> arrayOf("周日", "周一", "周二", "周三", "周四", "周五", "周六")[then.get(java.util.Calendar.DAY_OF_WEEK) - 1] + days == 1 -> s.yesterday(time) + days < 7 -> s.weekday(then.get(java.util.Calendar.DAY_OF_WEEK)) then.get(java.util.Calendar.YEAR) == now.get(java.util.Calendar.YEAR) -> - "${then.get(java.util.Calendar.MONTH) + 1}月${then.get(java.util.Calendar.DAY_OF_MONTH)}日" - else -> "${then.get(java.util.Calendar.YEAR)}年${then.get(java.util.Calendar.MONTH) + 1}月${then.get(java.util.Calendar.DAY_OF_MONTH)}日" + s.monthDay(then.get(java.util.Calendar.MONTH) + 1, then.get(java.util.Calendar.DAY_OF_MONTH)) + else -> s.yearMonthDay(then.get(java.util.Calendar.YEAR), then.get(java.util.Calendar.MONTH) + 1, then.get(java.util.Calendar.DAY_OF_MONTH)) } } diff --git a/app/src/main/kotlin/app/ivynote/android/ui/Language.kt b/app/src/main/kotlin/app/ivynote/android/ui/Language.kt new file mode 100644 index 0000000..8e8e9a4 --- /dev/null +++ b/app/src/main/kotlin/app/ivynote/android/ui/Language.kt @@ -0,0 +1,101 @@ +package app.ivynote.android.ui + +import androidx.compose.foundation.clickable +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.Row +import androidx.compose.foundation.layout.Spacer +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.heightIn +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.width +import androidx.compose.foundation.selection.selectableGroup +import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.material3.AlertDialog +import androidx.compose.material3.RadioButton +import androidx.compose.material3.RadioButtonDefaults +import androidx.compose.material3.Text +import androidx.compose.material3.TextButton +import androidx.compose.runtime.Composable +import androidx.compose.runtime.CompositionLocalProvider +import androidx.compose.runtime.collectAsState +import androidx.compose.runtime.getValue +import androidx.compose.runtime.staticCompositionLocalOf +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.draw.clip +import androidx.compose.ui.semantics.Role +import androidx.compose.ui.unit.dp +import androidx.compose.ui.unit.sp +import app.ivynote.android.IvyApp +import app.ivynote.core.L10n +import app.ivynote.core.Language +import app.ivynote.core.LanguageChoice +import app.ivynote.core.Strings + +/** + * The strings of the language in use. Static: a change recomposes everything + * below, so text built outside composables (with [L10n.s]) updates too. + */ +val LocalStrings = staticCompositionLocalOf { L10n.s } + +/** Provides the app's current language to [content]. */ +@Composable +fun ProvideStrings(content: @Composable () -> Unit) { + val language by IvyApp.instance.language.current.collectAsState() + CompositionLocalProvider(LocalStrings provides language.strings, content = content) +} + +/** Each language in its own name, so it can be found whatever the interface speaks. */ +val Language.nativeName: String + get() = when (this) { + Language.ZH -> "简体中文" + Language.EN -> "English" + } + +/** "跟随系统(English)", "简体中文". */ +fun choiceLabel(choice: LanguageChoice, s: Strings = L10n.s): String = when (choice) { + LanguageChoice.System -> s.followSystemWith(IvyApp.instance.language.systemLanguage.nativeName) + is LanguageChoice.Fixed -> choice.language.nativeName +} + +/** + * Picks the interface language: follow the system, or one language. Signed in + * to a synced library, the choice is the account's (guide: the account's + * language wins on every device); otherwise this device's. + */ +@Composable +fun LanguageDialog(onDismiss: () -> Unit) { + val s = LocalStrings.current + val c = Ivy.colors + val settings = IvyApp.instance.language + val selected by settings.selected.collectAsState() + AlertDialog( + onDismissRequest = onDismiss, + title = { Text(s.language) }, + text = { + Column(Modifier.selectableGroup(), verticalArrangement = Arrangement.spacedBy(2.dp)) { + for (choice in LanguageChoice.all) { + Row( + Modifier.fillMaxWidth().heightIn(min = 48.dp).clip(RoundedCornerShape(10.dp)) + .clickable(role = Role.RadioButton) { + settings.choose(choice) + onDismiss() + } + .padding(horizontal = 4.dp), + verticalAlignment = Alignment.CenterVertically, + ) { + RadioButton(selected = choice == selected, onClick = null, colors = RadioButtonDefaults.colors(selectedColor = c.ivy)) + Spacer(Modifier.width(12.dp)) + Text(choiceLabel(choice, s), color = c.ink, fontSize = 15.sp) + } + } + Text( + if (settings.hasAccount) s.languageAccountHint else s.languageDeviceHint, + color = c.muted, fontSize = 13.sp, modifier = Modifier.padding(top = 8.dp, start = 4.dp, end = 4.dp), + ) + } + }, + confirmButton = { TextButton(onClick = onDismiss) { Text(s.done) } }, + ) +} diff --git a/app/src/main/kotlin/app/ivynote/android/ui/LibrariesScreen.kt b/app/src/main/kotlin/app/ivynote/android/ui/LibrariesScreen.kt index d013a17..4a3d30d 100644 --- a/app/src/main/kotlin/app/ivynote/android/ui/LibrariesScreen.kt +++ b/app/src/main/kotlin/app/ivynote/android/ui/LibrariesScreen.kt @@ -30,6 +30,7 @@ import androidx.compose.material.icons.outlined.CloudUpload import androidx.compose.material.icons.outlined.Delete import androidx.compose.material.icons.outlined.Edit import androidx.compose.material.icons.outlined.FolderOpen +import androidx.compose.material.icons.outlined.Language import androidx.compose.material.icons.outlined.MoreVert import androidx.compose.material3.DropdownMenu import androidx.compose.material3.DropdownMenuItem @@ -57,6 +58,7 @@ import androidx.compose.ui.text.style.TextOverflow import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp import app.ivynote.android.IvyApp +import app.ivynote.core.L10n import app.ivynote.core.LibraryRef /** @@ -74,6 +76,8 @@ fun LibrariesScreen() { var creatingLocal by remember { mutableStateOf(false) } var renaming by remember { mutableStateOf(null) } var removing by remember { mutableStateOf(null) } + var choosingLanguage by remember { mutableStateOf(false) } + val s = LocalStrings.current // "Turn on sync" chosen inside a local library: continue here once it has closed. LaunchedEffect(pendingSync) { @@ -100,9 +104,9 @@ fun LibrariesScreen() { Column(Modifier.fillMaxWidth().padding(top = 24.dp, bottom = 12.dp), horizontalAlignment = Alignment.CenterHorizontally, verticalArrangement = Arrangement.spacedBy(8.dp)) { AppLogo(64.dp) - Text(if (libraries.isEmpty()) "常青笔记" else "笔记库", style = SerifTitle, fontSize = 26.sp, color = c.ink) + Text(if (libraries.isEmpty()) s.appName else s.libraries, style = SerifTitle, fontSize = 26.sp, color = c.ink) Text( - if (libraries.isEmpty()) "本地优先的 Markdown 笔记,在手机、电脑和网页间同步。" else "选择要打开的笔记库", + if (libraries.isEmpty()) s.welcome else s.pickLibrary, color = c.muted, fontSize = 14.sp, textAlign = TextAlign.Center, ) } @@ -125,14 +129,14 @@ fun LibrariesScreen() { item { Surface(shape = RoundedCornerShape(16.dp), color = c.surface, modifier = Modifier.padding(top = 8.dp)) { Column { - ActionRow(Icons.Outlined.Cloud, c.ivy, "登录云同步账户", "在多台设备间同步,支持官方节点和自建服务器") { cloud = "" } + ActionRow(Icons.Outlined.Cloud, c.ivy, s.connect, s.connectHint) { cloud = "" } HorizontalDivider(color = c.line, modifier = Modifier.padding(start = 64.dp)) - ActionRow(Icons.Outlined.Add, c.muted, "新建本地笔记库", "只保存在这台设备,无需账户,立即可用") { creatingLocal = true } + ActionRow(Icons.Outlined.Add, c.muted, s.newLocal, s.newLocalHint) { creatingLocal = true } } } } if (libraries.any { it.canTurnOnSync }) { - item { Caption("本地笔记库可以随时开启同步:注册新账户后,内容会自动上传。", Modifier.padding(horizontal = 8.dp)) } + item { Caption(s.canConvert, Modifier.padding(horizontal = 8.dp)) } } } else { // First run: syncing is the way in; local is the quiet alternative. @@ -144,8 +148,8 @@ fun LibrariesScreen() { } Spacer(Modifier.width(14.dp)) Column(Modifier.weight(1f)) { - Text("开始使用 · 多端同步", color = c.onIvy, fontWeight = FontWeight.SemiBold, fontSize = 16.sp) - Text("登录或注册,笔记在手机、电脑和网页间自动同步", color = c.onIvy.copy(alpha = 0.85f), fontSize = 13.sp) + Text(s.startCloud, color = c.onIvy, fontWeight = FontWeight.SemiBold, fontSize = 16.sp) + Text(s.startCloudHint, color = c.onIvy.copy(alpha = 0.85f), fontSize = 13.sp) } Icon(Icons.AutoMirrored.Filled.KeyboardArrowRight, null, tint = c.onIvy) } @@ -153,31 +157,43 @@ fun LibrariesScreen() { } item { Box(Modifier.fillMaxWidth(), contentAlignment = Alignment.Center) { - TextButton(onClick = { creatingLocal = true }) { Text("不登录,仅在本机使用", color = c.ink2) } + TextButton(onClick = { creatingLocal = true }) { Text(s.localOnly, color = c.ink2) } + } + } + } + // Language: before signing in, this device's choice. + item { + Box(Modifier.fillMaxWidth(), contentAlignment = Alignment.Center) { + TextButton(onClick = { choosingLanguage = true }) { + Icon(Icons.Outlined.Language, null, tint = c.muted, modifier = Modifier.size(16.dp)) + Spacer(Modifier.width(6.dp)) + Text(choiceLabel(IvyApp.instance.language.selected.collectAsState().value, s), color = c.muted, fontSize = 13.sp) } } } } } + if (choosingLanguage) { + LanguageDialog(onDismiss = { choosingLanguage = false }) + } if (creatingLocal) { TextInputDialog( - title = "新建本地笔记库", - initial = if (libraries.isEmpty()) "我的笔记" else "", - message = "笔记只保存在这台设备上,不会同步。", - confirm = "创建", + title = s.newLocal, + initial = if (libraries.isEmpty()) s.defaultLibraryName else "", + message = s.newLocalMessage, + confirm = s.create, onDismiss = { creatingLocal = false }, ) { name -> catalog.createLocal(name) } } renaming?.let { ref -> - TextInputDialog(title = "重命名笔记库", initial = ref.name, onDismiss = { renaming = null }) { name -> catalog.rename(ref.id, name) } + TextInputDialog(title = s.renameLibrary, initial = ref.name, onDismiss = { renaming = null }) { name -> catalog.rename(ref.id, name) } } removing?.let { ref -> ConfirmDialog( - title = "移除笔记库", - message = if (ref.isLocal) "将永久删除「${ref.name}」里的全部笔记,无法恢复。" - else "将从这台设备删除「${ref.name}」的本地副本和登录状态。服务器上的笔记不受影响,但尚未同步的更改会丢失。", - confirm = "移除", + title = s.removeLibrary, + message = if (ref.isLocal) s.removeLocalMessage(ref.name) else s.removeServerMessage(ref.name), + confirm = s.remove, onDismiss = { removing = null }, ) { catalog.remove(ref.id) @@ -191,6 +207,7 @@ fun LibrariesScreen() { private fun LibraryRow(ref: LibraryRef, onOpen: () -> Unit, onTurnOnSync: () -> Unit, onRename: () -> Unit, onRemove: () -> Unit) { val c = Ivy.colors var menu by remember { mutableStateOf(false) } + val s = LocalStrings.current Box { Row( Modifier.fillMaxWidth().combinedClickable(onClick = onOpen, onLongClick = { menu = true }).padding(start = 14.dp, top = 10.dp, bottom = 10.dp, end = 4.dp), @@ -202,23 +219,23 @@ private fun LibraryRow(ref: LibraryRef, onOpen: () -> Unit, onTurnOnSync: () -> Text(ref.name, fontWeight = FontWeight.Medium, fontSize = 16.sp, color = c.ink, maxLines = 1, overflow = TextOverflow.Ellipsis) Text(detail(ref), fontSize = 13.sp, color = c.muted, maxLines = 1, overflow = TextOverflow.Ellipsis) } - IconButton(onClick = { menu = true }) { Icon(Icons.Outlined.MoreVert, contentDescription = "更多", tint = c.faint) } + IconButton(onClick = { menu = true }) { Icon(Icons.Outlined.MoreVert, contentDescription = s.more, tint = c.faint) } } DropdownMenu(expanded = menu, onDismissRequest = { menu = false }) { - DropdownMenuItem(text = { Text("打开") }, leadingIcon = { Icon(Icons.Outlined.FolderOpen, null) }, onClick = { menu = false; onOpen() }) + DropdownMenuItem(text = { Text(s.open) }, leadingIcon = { Icon(Icons.Outlined.FolderOpen, null) }, onClick = { menu = false; onOpen() }) if (ref.canTurnOnSync) { - DropdownMenuItem(text = { Text("开启同步") }, leadingIcon = { Icon(Icons.Outlined.CloudUpload, null) }, onClick = { menu = false; onTurnOnSync() }) + DropdownMenuItem(text = { Text(s.turnOnSync) }, leadingIcon = { Icon(Icons.Outlined.CloudUpload, null) }, onClick = { menu = false; onTurnOnSync() }) } - DropdownMenuItem(text = { Text("重命名") }, leadingIcon = { Icon(Icons.Outlined.Edit, null) }, onClick = { menu = false; onRename() }) + DropdownMenuItem(text = { Text(s.rename) }, leadingIcon = { Icon(Icons.Outlined.Edit, null) }, onClick = { menu = false; onRename() }) HorizontalDivider() - DropdownMenuItem(text = { Text("移除", color = c.danger) }, leadingIcon = { Icon(Icons.Outlined.Delete, null, tint = c.danger) }, onClick = { menu = false; onRemove() }) + DropdownMenuItem(text = { Text(s.remove, color = c.danger) }, leadingIcon = { Icon(Icons.Outlined.Delete, null, tint = c.danger) }, onClick = { menu = false; onRemove() }) } } } private fun detail(ref: LibraryRef): String = when { - ref.migratedTo != null -> "已迁移到云端,确认无误后可以移除" - ref.isLocal -> "仅保存在本机 · 未同步" + ref.migratedTo != null -> L10n.s.migratedHint + ref.isLocal -> L10n.s.localUnsynced else -> { val host = ref.server?.host ?: "" ref.account?.let { "$host · @$it" } ?: host diff --git a/app/src/main/kotlin/app/ivynote/android/ui/LibraryScreen.kt b/app/src/main/kotlin/app/ivynote/android/ui/LibraryScreen.kt index d096a1c..01e42c5 100644 --- a/app/src/main/kotlin/app/ivynote/android/ui/LibraryScreen.kt +++ b/app/src/main/kotlin/app/ivynote/android/ui/LibraryScreen.kt @@ -161,7 +161,7 @@ fun LibraryScreen(lib: LibrarySession, session: SessionStore?) { val context = androidx.compose.ui.platform.LocalContext.current LaunchedEffect(refused) { val f = refused ?: return@LaunchedEffect - toast(context, "「${f.name}」未能上传:${f.message}", long = true) + toast(context, app.ivynote.core.L10n.s.uploadRefused(f.name, f.message), long = true) engine.clearUploadFailure() } @@ -169,21 +169,22 @@ fun LibraryScreen(lib: LibrarySession, session: SessionStore?) { AccountSheet(lib, session, onDismiss = { ui.showAccount = false }) } + val s = LocalStrings.current conflict?.let { c -> AlertDialog( onDismissRequest = { engine.clearConflict() }, - title = { Text("内容冲突") }, + title = { Text(s.conflictTitle) }, text = { - val name = engine.notes[c.noteId]?.let(::displayTitle) ?: "笔记" - Text("「$name」在其他设备上也改动了同一处。服务器保留了它的版本,你的修改已另存为冲突副本。") + val name = engine.notes[c.noteId]?.let(::displayTitle) ?: s.note + Text(s.conflictMessage(name)) }, confirmButton = { TextButton(onClick = { ui.reveal(c.copyId) engine.clearConflict() - }) { Text("打开副本") } + }) { Text(s.openCopy) } }, - dismissButton = { TextButton(onClick = { engine.clearConflict() }) { Text("好") } }, + dismissButton = { TextButton(onClick = { engine.clearConflict() }) { Text(s.ok) } }, ) } } @@ -197,6 +198,6 @@ fun EmptyPaper() { horizontalAlignment = Alignment.CenterHorizontally, ) { IvyLeaf(64.dp, alpha = 0.7f) - Text("像常春藤一样,你的笔记彼此相连、四季常青。", color = Ivy.colors.muted, fontSize = 14.sp) + Text(LocalStrings.current.tagline, color = Ivy.colors.muted, fontSize = 14.sp) } } diff --git a/app/src/main/kotlin/app/ivynote/android/ui/Media.kt b/app/src/main/kotlin/app/ivynote/android/ui/Media.kt index 0972db0..80ae4e9 100644 --- a/app/src/main/kotlin/app/ivynote/android/ui/Media.kt +++ b/app/src/main/kotlin/app/ivynote/android/ui/Media.kt @@ -103,6 +103,7 @@ import app.ivynote.android.LibrarySession import app.ivynote.android.editor.AttachmentLoader import app.ivynote.core.AddedFile import app.ivynote.core.ApiError +import app.ivynote.core.L10n import app.ivynote.core.Attachment import app.ivynote.core.AttachmentDetail import app.ivynote.core.MediaLibrary @@ -119,12 +120,12 @@ fun toast(context: Context, text: String, long: Boolean = false) = fun copyText(context: Context, text: String, label: String = "ivynote") { context.getSystemService(ClipboardManager::class.java)?.setPrimaryClip(ClipData.newPlainText(label, text)) // Android 13+ shows its own confirmation. - if (android.os.Build.VERSION.SDK_INT < 33) toast(context, "已复制") + if (android.os.Build.VERSION.SDK_INT < 33) toast(context, L10n.s.copied) } fun errorText(e: Throwable): String = when (e) { - is ApiError.Unreachable -> "需要联网" - is ApiError.Server -> if (e.code == 413) "文件超过服务器的上传上限" else e.message ?: "请求失败" + is ApiError.Unreachable -> L10n.s.needsNetwork + is ApiError.Server -> if (e.code == 413) L10n.s.fileTooLarge else e.message else -> e.message ?: e.javaClass.simpleName } @@ -165,12 +166,12 @@ fun rememberAttachmentPicker(lib: LibrarySession, onAdded: (AddedFile) -> Unit): try { val added = lib.addFile(u, name) onAdded(added) - if (added.queued) toast(context, "离线中,「${added.name}」将在联网后上传") - else if (added.duplicate) toast(context, "重复文件已合并") + if (added.queued) toast(context, L10n.s.queuedUpload(added.name)) + else if (added.duplicate) toast(context, L10n.s.duplicateMerged) } catch (e: kotlinx.coroutines.CancellationException) { throw e } catch (e: Exception) { - toast(context, "无法添加文件:${errorText(e)}", long = true) + toast(context, L10n.s.cannotAddFile(errorText(e)), long = true) } } } finally { @@ -200,14 +201,14 @@ fun rememberAttachmentPicker(lib: LibrarySession, onAdded: (AddedFile) -> Unit): try { camera.launch(shareUri(context, f)) } catch (_: android.content.ActivityNotFoundException) { - toast(context, "没有可用的相机应用") + toast(context, L10n.s.noCamera) } }, files = { try { files.launch(arrayOf("*/*")) } catch (_: android.content.ActivityNotFoundException) { - toast(context, "没有可用的文件选择器") + toast(context, L10n.s.noFilePicker) } }, ) @@ -261,6 +262,7 @@ private fun decodeSampled(file: File, maxPx: Int): Bitmap? { @Composable fun MediaScreen(lib: LibrarySession, onOpenNote: (String) -> Unit, onDismiss: () -> Unit) { val c = Ivy.colors + val s = LocalStrings.current val context = LocalContext.current val revision by lib.engine.revision.collectAsState() val adding by lib.adding.collectAsState() @@ -287,16 +289,16 @@ fun MediaScreen(lib: LibrarySession, onOpenNote: (String) -> Unit, onDismiss: () Dialog(onDismissRequest = onDismiss, properties = DialogProperties(usePlatformDefaultWidth = false, decorFitsSystemWindows = false)) { Column(Modifier.fillMaxSize().background(c.canvas).statusBarsPadding()) { Row(Modifier.fillMaxWidth().height(56.dp).padding(horizontal = 4.dp), verticalAlignment = Alignment.CenterVertically) { - IconButton(onClick = onDismiss) { Icon(Icons.AutoMirrored.Filled.ArrowBack, contentDescription = "返回", tint = c.ink2) } - Text("媒体库", style = SerifTitle, fontSize = 19.sp, color = c.ink, modifier = Modifier.weight(1f).padding(start = 4.dp)) + IconButton(onClick = onDismiss) { Icon(Icons.AutoMirrored.Filled.ArrowBack, contentDescription = s.back, tint = c.ink2) } + Text(s.mediaLibrary, style = SerifTitle, fontSize = 19.sp, color = c.ink, modifier = Modifier.weight(1f).padding(start = 4.dp)) if (adding > 0) CircularProgressIndicator(Modifier.size(18.dp), strokeWidth = 2.dp, color = c.muted) var menu by remember { mutableStateOf(false) } Box { - IconButton(onClick = { menu = true }) { Icon(Icons.Outlined.Upload, contentDescription = "上传", tint = c.ink2) } + IconButton(onClick = { menu = true }) { Icon(Icons.Outlined.Upload, contentDescription = s.upload, tint = c.ink2) } DropdownMenu(expanded = menu, onDismissRequest = { menu = false }) { - DropdownMenuItem(text = { Text("图片或视频") }, leadingIcon = { Icon(Icons.Outlined.Image, null) }, onClick = { menu = false; picker.photos() }) - DropdownMenuItem(text = { Text("拍照") }, leadingIcon = { Icon(Icons.Outlined.Image, null) }, onClick = { menu = false; picker.camera() }) - DropdownMenuItem(text = { Text("文件") }, leadingIcon = { Icon(Icons.Outlined.AttachFile, null) }, onClick = { menu = false; picker.files() }) + DropdownMenuItem(text = { Text(s.photoOrVideo) }, leadingIcon = { Icon(Icons.Outlined.Image, null) }, onClick = { menu = false; picker.photos() }) + DropdownMenuItem(text = { Text(s.camera) }, leadingIcon = { Icon(Icons.Outlined.Image, null) }, onClick = { menu = false; picker.camera() }) + DropdownMenuItem(text = { Text(s.file) }, leadingIcon = { Icon(Icons.Outlined.AttachFile, null) }, onClick = { menu = false; picker.files() }) } } } @@ -309,11 +311,11 @@ fun MediaScreen(lib: LibrarySession, onOpenNote: (String) -> Unit, onDismiss: () Icon(Icons.Outlined.Search, null, tint = c.faint, modifier = Modifier.size(18.dp)) Spacer(Modifier.width(8.dp)) Box(Modifier.weight(1f)) { - if (query.isEmpty()) Text("搜索文件名", color = c.faint, fontSize = 15.sp) + if (query.isEmpty()) Text(s.searchFiles, color = c.faint, fontSize = 15.sp) BasicTextField(query, { query = it }, singleLine = true, textStyle = TextStyle(color = c.ink, fontSize = 15.sp), cursorBrush = androidx.compose.ui.graphics.SolidColor(c.ivy), modifier = Modifier.fillMaxWidth()) } - if (query.isNotEmpty()) Icon(Icons.Outlined.Close, "清除", tint = c.faint, modifier = Modifier.size(18.dp).clip(CircleShape).clickable { query = "" }) + if (query.isNotEmpty()) Icon(Icons.Outlined.Close, s.clear, tint = c.faint, modifier = Modifier.size(18.dp).clip(CircleShape).clickable { query = "" }) } // Filters Row(Modifier.horizontalScroll(rememberScrollState()).padding(horizontal = 12.dp), horizontalArrangement = Arrangement.spacedBy(6.dp)) { @@ -329,19 +331,19 @@ fun MediaScreen(lib: LibrarySession, onOpenNote: (String) -> Unit, onDismiss: () } val l = listing if (l?.offline == true) { - Banner(Icons.Outlined.WifiOff, "离线中,显示的是本机同步下来的文件信息,修改需要联网。") + Banner(Icons.Outlined.WifiOff, s.mediaOffline) } else if (filter == MediaLibrary.Filter.ORPHANED && (l?.items?.isNotEmpty() == true)) { val days = l.orphanDays - Banner(Icons.Outlined.Delete, if (days > 0) "${l.items.size} 个文件没有被任何笔记引用,将在 $days 天后自动移入回收站。" else "${l.items.size} 个文件没有被任何笔记引用。") + Banner(Icons.Outlined.Delete, if (days > 0) s.orphanBanner(l.items.size, days) else s.orphanBannerNoDays(l.items.size)) } when { error != null && l == null -> Centered(error ?: "") l == null -> Box(Modifier.fillMaxSize(), contentAlignment = Alignment.Center) { CircularProgressIndicator(color = c.muted) } l.items.isEmpty() -> Centered( when { - query.isNotBlank() -> "没有找到「${query.trim()}」" - filter == MediaLibrary.Filter.TRASH -> "回收站是空的" - else -> "还没有文件。在笔记中插入图片或附件即可自动加入媒体库。" + query.isNotBlank() -> s.noResults(query.trim()) + filter == MediaLibrary.Filter.TRASH -> s.mediaTrashEmpty + else -> s.mediaEmpty }, ) else -> LazyVerticalGrid( @@ -384,18 +386,19 @@ private fun Centered(text: String) { @Composable private fun MediaCell(lib: LibrarySession, a: Attachment, onClick: () -> Unit) { val c = Ivy.colors + val s = LocalStrings.current val context = LocalContext.current Column(Modifier.clip(RoundedCornerShape(14.dp)).clickable(onClick = onClick)) { Box { AttachmentImage(lib.editor.media, a, thumb = true, modifier = Modifier.fillMaxWidth().aspectRatio(1f).clip(RoundedCornerShape(14.dp))) if (a.public) { - Icon(Icons.Outlined.Public, contentDescription = "已公开", tint = c.surface, + Icon(Icons.Outlined.Public, contentDescription = s.isPublic, tint = c.surface, modifier = Modifier.align(Alignment.TopEnd).padding(6.dp).size(20.dp).clip(CircleShape).background(c.ivy).padding(3.dp)) } } - Text(a.name.ifEmpty { "未命名" }, fontSize = 13.sp, color = c.ink, maxLines = 1, overflow = TextOverflow.Ellipsis, modifier = Modifier.padding(start = 2.dp, top = 6.dp)) + Text(a.name.ifEmpty { s.unnamed }, fontSize = 13.sp, color = c.ink, maxLines = 1, overflow = TextOverflow.Ellipsis, modifier = Modifier.padding(start = 2.dp, top = 6.dp)) Text( - formatSize(context, a.size) + " · " + if (a.refs > 0) "被 ${a.refs} 篇引用" else "未引用", + formatSize(context, a.size) + " · " + if (a.refs > 0) s.refs(a.refs) else s.unreferenced, fontSize = 11.5.sp, color = if (a.refs > 0) c.faint else c.warn, maxLines = 1, modifier = Modifier.padding(start = 2.dp), ) } @@ -406,6 +409,7 @@ private fun MediaCell(lib: LibrarySession, a: Attachment, onClick: () -> Unit) { @Composable fun MediaDetailSheet(lib: LibrarySession, initial: Attachment, onChanged: () -> Unit, onOpenNote: (String) -> Unit, onDismiss: () -> Unit) { val c = Ivy.colors + val s = LocalStrings.current val context = LocalContext.current val scope = rememberCoroutineScope() var detail by remember { mutableStateOf(null) } @@ -439,7 +443,7 @@ fun MediaDetailSheet(lib: LibrarySession, initial: Attachment, onChanged: () -> fun withFile(block: (File) -> Unit) { scope.launch { val f = withContext(Dispatchers.IO) { lib.editor.media.fetch(a.id, thumb = false) } - if (f == null) toast(context, "无法取得文件,请检查网络") else block(f) + if (f == null) toast(context, s.cannotGetFile) else block(f) } } @@ -459,19 +463,19 @@ fun MediaDetailSheet(lib: LibrarySession, initial: Attachment, onChanged: () -> } } Row(verticalAlignment = Alignment.CenterVertically) { - Text(a.name.ifEmpty { "未命名" }, style = SerifTitle, fontSize = 18.sp, color = c.ink, modifier = Modifier.weight(1f)) + Text(a.name.ifEmpty { s.unnamed }, style = SerifTitle, fontSize = 18.sp, color = c.ink, modifier = Modifier.weight(1f)) if (busy) CircularProgressIndicator(Modifier.size(18.dp), strokeWidth = 2.dp, color = c.muted) - if (!a.isTrashed) IconButton(onClick = { renaming = true }) { Icon(Icons.Outlined.Edit, contentDescription = "重命名", tint = c.ink2) } + if (!a.isTrashed) IconButton(onClick = { renaming = true }) { Icon(Icons.Outlined.Edit, contentDescription = s.rename, tint = c.ink2) } } - InfoLine("类型", a.mime.ifEmpty { a.kind }) - InfoLine("大小", formatSize(context, a.size) + if ((a.width ?: 0) > 0) " · ${a.width}×${a.height}" else "") - if (a.createdAt > 0) InfoLine("上传于", shortDate(a.createdAt)) - if (a.public) InfoLine("公网链接", a.publicUrl.ifEmpty { "已公开(/r/…)" }) - if (a.isTrashed) InfoLine("回收站", if (a.trashReason == "orphan") "未引用,已自动移入" else "已移入") + InfoLine(s.type, a.mime.ifEmpty { a.kind }) + InfoLine(s.size, formatSize(context, a.size) + if ((a.width ?: 0) > 0) " · ${a.width}×${a.height}" else "") + if (a.createdAt > 0) InfoLine(s.uploadedAt, shortDate(a.createdAt)) + if (a.public) InfoLine(s.publicUrl, a.publicUrl.ifEmpty { s.publicPlaceholder }, mono = true) + if (a.isTrashed) InfoLine(s.trash, if (a.trashReason == "orphan") s.trashedOrphan else s.trashedManual) // The notes that reference it. val notes = detail?.notes.orEmpty() - Text(if (notes.isEmpty()) "没有笔记引用它" else "被 ${notes.size} 篇笔记引用", fontSize = 13.sp, color = c.muted, fontWeight = FontWeight.Medium) + Text(if (notes.isEmpty()) s.noNotesReference else s.referencedBy(notes.size), fontSize = 13.sp, color = c.muted, fontWeight = FontWeight.Medium) for (n in notes) { Row( Modifier.fillMaxWidth().clip(RoundedCornerShape(10.dp)).clickable(enabled = lib.engine.notes[n.id] != null) { onOpenNote(n.id) } @@ -480,59 +484,59 @@ fun MediaDetailSheet(lib: LibrarySession, initial: Attachment, onChanged: () -> ) { Icon(Icons.Outlined.Description, null, tint = c.muted, modifier = Modifier.size(18.dp)) Spacer(Modifier.width(10.dp)) - Text(n.title.ifBlank { "无标题" }, color = if (n.title.isBlank()) c.muted else c.ink, fontSize = 15.sp, maxLines = 1, overflow = TextOverflow.Ellipsis) + Text(n.title.ifBlank { s.untitled }, color = if (n.title.isBlank()) c.muted else c.ink, fontSize = 15.sp, maxLines = 1, overflow = TextOverflow.Ellipsis) } } HorizontalDivider(color = c.line) // Actions - SheetAction(Icons.Outlined.ContentCopy, "复制引用") { + SheetAction(Icons.Outlined.ContentCopy, s.copyReference) { copyText(context, app.ivynote.core.Links.embed(a.id, a.name, a.kind)) } if (!a.isTrashed && media.canPublish) { - SheetAction(Icons.Outlined.Link, if (a.public) "复制公网链接" else "生成公网链接") { + SheetAction(Icons.Outlined.Link, if (a.public) s.copyPublicUrl else s.makePublicUrl) { act { copyText(context, media.publish(a.id)); detail = detail?.copy(attachment = a.copy(public = true)) ?: AttachmentDetail(a.copy(public = true)) } } - if (a.public) SheetAction(Icons.Outlined.LinkOff, "撤销公网链接") { + if (a.public) SheetAction(Icons.Outlined.LinkOff, s.revokePublicUrl) { act { val u = media.unpublish(a.id); detail = detail?.copy(attachment = u) ?: AttachmentDetail(u) } } } - SheetAction(Icons.Outlined.Share, "分享或保存原文件") { + SheetAction(Icons.Outlined.Share, s.shareOriginal) { withFile { f -> shareFile(context, f, a.name.ifEmpty { a.id }, a.mime) } } if (a.isTrashed) { - SheetAction(Icons.Outlined.Restore, "恢复") { act { val u = media.restore(a.id); detail = detail?.copy(attachment = u) ?: AttachmentDetail(u) } } - SheetAction(Icons.Outlined.DeleteForever, "永久删除", danger = true) { confirmPurge = true } + SheetAction(Icons.Outlined.Restore, s.restore) { act { val u = media.restore(a.id); detail = detail?.copy(attachment = u) ?: AttachmentDetail(u) } } + SheetAction(Icons.Outlined.DeleteForever, s.deleteForever, danger = true) { confirmPurge = true } } else { - SheetAction(Icons.Outlined.Delete, "移到回收站", danger = true) { + SheetAction(Icons.Outlined.Delete, s.moveToTrash, danger = true) { act { media.trash(a.id); onDismiss() } } } if (!media.canPublish) { - Text("本地笔记库的文件只保存在这台设备上。", fontSize = 12.5.sp, color = c.faint) + Text(s.localFilesHint, fontSize = 12.5.sp, color = c.faint) } else if (a.public) { - Text("公开的文件不再受登录保护,拿到链接的人都能打开。", fontSize = 12.5.sp, color = c.faint) + Text(s.publicFilesHint, fontSize = 12.5.sp, color = c.faint) } } } if (renaming) { - TextInputDialog(title = "重命名文件", initial = a.name, onDismiss = { renaming = false }) { name -> + TextInputDialog(title = s.renameFile, initial = a.name, onDismiss = { renaming = false }) { name -> act { val u = media.rename(a.id, name); detail = detail?.copy(attachment = u) ?: AttachmentDetail(u) } } } if (confirmPurge) { - ConfirmDialog("永久删除文件?", "「${a.name}」将被永久删除,引用它的笔记会显示为缺失。此操作无法撤销。", "永久删除", onDismiss = { confirmPurge = false }) { + ConfirmDialog(s.purgeFileTitle, s.purgeFileMessage(a.name), s.deleteForever, onDismiss = { confirmPurge = false }) { act { media.purge(a.id); onDismiss() } } } } @Composable -private fun InfoLine(label: String, value: String) { +private fun InfoLine(label: String, value: String, mono: Boolean = false) { val c = Ivy.colors Row { Text(label, fontSize = 13.sp, color = c.muted, modifier = Modifier.width(72.dp)) - Text(value, fontSize = 13.sp, color = c.ink2, fontFamily = if (label == "公网链接") FontFamily.Monospace else null) + Text(value, fontSize = 13.sp, color = c.ink2, fontFamily = if (mono) FontFamily.Monospace else null) } } diff --git a/app/src/main/kotlin/app/ivynote/android/ui/NoteScreen.kt b/app/src/main/kotlin/app/ivynote/android/ui/NoteScreen.kt index 82b36b2..9969f35 100644 --- a/app/src/main/kotlin/app/ivynote/android/ui/NoteScreen.kt +++ b/app/src/main/kotlin/app/ivynote/android/ui/NoteScreen.kt @@ -92,6 +92,7 @@ fun NoteScreen(ui: LibraryUiState, noteId: String, wide: Boolean, onBack: () -> val engine = lib.engine val host = lib.editor val c = Ivy.colors + val s = LocalStrings.current val dark = isSystemInDarkTheme() val revision by engine.revision.collectAsState() val focused by host.focused.collectAsState() @@ -123,6 +124,7 @@ fun NoteScreen(ui: LibraryUiState, noteId: String, wide: Boolean, onBack: () -> host.open(n, focus = n.body.isEmpty() && n.title.isEmpty() && !n.isTrashed) } LaunchedEffect(dark) { host.setTheme(dark) } + LaunchedEffect(s) { host.setLanguage(app.ivynote.core.L10n.language) } LaunchedEffect(note.body) { host.bodyChanged(noteId, note.body) } LaunchedEffect(note.isTrashed) { host.setReadonly(note.isTrashed) } // New and uploaded files: embeds render as their kind. @@ -133,7 +135,7 @@ fun NoteScreen(ui: LibraryUiState, noteId: String, wide: Boolean, onBack: () -> Row(Modifier.fillMaxWidth().height(56.dp).padding(horizontal = 4.dp), verticalAlignment = Alignment.CenterVertically) { if (!wide) { IconButton(onClick = { host.hideKeyboard(); onBack() }) { - Icon(Icons.AutoMirrored.Filled.ArrowBack, contentDescription = "返回", tint = c.ink2) + Icon(Icons.AutoMirrored.Filled.ArrowBack, contentDescription = s.back, tint = c.ink2) } } else { Spacer(Modifier.width(12.dp)) @@ -158,23 +160,23 @@ fun NoteScreen(ui: LibraryUiState, noteId: String, wide: Boolean, onBack: () -> } } if (focused && !wide) { - TextButton(onClick = { host.hideKeyboard() }) { Text("完成", color = c.ivy, fontWeight = FontWeight.SemiBold) } + TextButton(onClick = { host.hideKeyboard() }) { Text(s.done, color = c.ivy, fontWeight = FontWeight.SemiBold) } } if (!note.isTrashed) { - IconButton(onClick = { sharing = true }) { Icon(Icons.Outlined.IosShare, contentDescription = "分享", tint = c.ink2) } + IconButton(onClick = { sharing = true }) { Icon(Icons.Outlined.IosShare, contentDescription = s.share, tint = c.ink2) } } - IconButton(onClick = { outline = true }) { Icon(Icons.Outlined.Toc, contentDescription = "大纲", tint = c.ink2) } + IconButton(onClick = { outline = true }) { Icon(Icons.Outlined.Toc, contentDescription = s.outline, tint = c.ink2) } Box { - IconButton(onClick = { menu = true }) { Icon(Icons.Outlined.MoreVert, contentDescription = "更多", tint = c.ink2) } + IconButton(onClick = { menu = true }) { Icon(Icons.Outlined.MoreVert, contentDescription = s.more, tint = c.ink2) } DropdownMenu(expanded = menu, onDismissRequest = { menu = false }) { if (!note.isTrashed) { - DropdownMenuItem(text = { Text("标签…") }, leadingIcon = { Icon(Icons.Outlined.Sell, null) }, + DropdownMenuItem(text = { Text(s.tagsEllipsis) }, leadingIcon = { Icon(Icons.Outlined.Sell, null) }, onClick = { menu = false; tagging = true }) } - DropdownMenuItem(text = { Text(if (linkCount > 0) "反向链接($linkCount)" else "反向链接") }, leadingIcon = { Icon(Icons.Outlined.Link, null) }, + DropdownMenuItem(text = { Text(if (linkCount > 0) s.backlinksMenu(linkCount) else s.backlinks) }, leadingIcon = { Icon(Icons.Outlined.Link, null) }, onClick = { menu = false; backlinks = true }) if (!engine.isLocal) { - DropdownMenuItem(text = { Text("历史版本") }, leadingIcon = { Icon(Icons.Outlined.History, null) }, + DropdownMenuItem(text = { Text(s.history) }, leadingIcon = { Icon(Icons.Outlined.History, null) }, onClick = { menu = false; history = true }) } HorizontalDivider() @@ -193,12 +195,12 @@ fun NoteScreen(ui: LibraryUiState, noteId: String, wide: Boolean, onBack: () -> ) { Icon(Icons.Outlined.Delete, null, tint = c.warnInk, modifier = Modifier.size(18.dp)) Spacer(Modifier.width(8.dp)) - Text("这篇笔记在回收站中", color = c.warnInk, fontSize = 14.sp, modifier = Modifier.weight(1f)) - TextButton(onClick = { engine.updateNote(note.id, SyncEngine.NotePatch(trashed = false)) }) { Text("恢复", color = c.warnInk) } + Text(s.noteInTrash, color = c.warnInk, fontSize = 14.sp, modifier = Modifier.weight(1f)) + TextButton(onClick = { engine.updateNote(note.id, SyncEngine.NotePatch(trashed = false)) }) { Text(s.restore, color = c.warnInk) } TextButton(onClick = { ui.selection = null engine.deleteNote(note.id) - }) { Text("永久删除", color = c.danger) } + }) { Text(s.deleteForever, color = c.danger) } } } @@ -209,7 +211,7 @@ fun NoteScreen(ui: LibraryUiState, noteId: String, wide: Boolean, onBack: () -> Row(Modifier.fillMaxWidth().padding(start = 20.dp, end = 12.dp, bottom = 6.dp), verticalAlignment = Alignment.CenterVertically) { NoteTagsRow(note, engine, editable = !note.isTrashed, onEdit = { tagging = true }, modifier = Modifier.weight(1f)) if (linkCount > 0) { - Text("$linkCount 条反向链接", fontSize = 12.5.sp, color = c.ivy, + Text(s.backlinksCount(linkCount), fontSize = 12.5.sp, color = c.ivy, modifier = Modifier.clip(RoundedCornerShape(8.dp)).clickable { backlinks = true }.padding(horizontal = 6.dp, vertical = 3.dp)) } } @@ -232,7 +234,7 @@ fun NoteScreen(ui: LibraryUiState, noteId: String, wide: Boolean, onBack: () -> } if (renaming) { - TextInputDialog(title = "重命名笔记", initial = note.title, placeholder = "无标题", onDismiss = { renaming = false }) { t -> + TextInputDialog(title = s.renameNote, initial = note.title, placeholder = s.untitled, onDismiss = { renaming = false }) { t -> engine.updateNote(note.id, SyncEngine.NotePatch(title = cleanTitle(t))) } } @@ -294,23 +296,24 @@ private fun EditorView(host: app.ivynote.android.editor.EditorHost, modifier: Mo @Composable private fun FormatBar(host: app.ivynote.android.editor.EditorHost, modifier: Modifier = Modifier, attach: (String) -> Unit) { val c = Ivy.colors + val s = LocalStrings.current val files: List> = listOf( - Triple("photo", Icons.Outlined.Image, "图片"), - Triple("camera", Icons.Outlined.PhotoCamera, "拍照"), - Triple("file", Icons.Outlined.AttachFile, "附件"), + Triple("photo", Icons.Outlined.Image, s.formatPhoto), + Triple("camera", Icons.Outlined.PhotoCamera, s.formatCamera), + Triple("file", Icons.Outlined.AttachFile, s.formatAttachment), ) val items: List> = listOf( - Triple("h1", Icons.Outlined.Title, "标题"), - Triple("bold", Icons.Outlined.FormatBold, "加粗"), - Triple("italic", Icons.Outlined.FormatItalic, "斜体"), - Triple("task", Icons.Outlined.CheckBox, "待办"), - Triple("list", Icons.AutoMirrored.Filled.FormatListBulleted, "列表"), - Triple("ordered", Icons.Outlined.FormatListNumbered, "编号"), - Triple("quote", Icons.Outlined.FormatQuote, "引用"), - Triple("code", Icons.Outlined.Code, "代码"), - Triple("wiki", Icons.Outlined.AddLink, "双链"), - Triple("link", Icons.Outlined.Link, "链接"), - Triple("strike", Icons.Outlined.StrikethroughS, "删除线"), + Triple("h1", Icons.Outlined.Title, s.formatHeading), + Triple("bold", Icons.Outlined.FormatBold, s.formatBold), + Triple("italic", Icons.Outlined.FormatItalic, s.formatItalic), + Triple("task", Icons.Outlined.CheckBox, s.formatTask), + Triple("list", Icons.AutoMirrored.Filled.FormatListBulleted, s.formatList), + Triple("ordered", Icons.Outlined.FormatListNumbered, s.formatOrdered), + Triple("quote", Icons.Outlined.FormatQuote, s.formatQuote), + Triple("code", Icons.Outlined.Code, s.formatCode), + Triple("wiki", Icons.Outlined.AddLink, s.formatWikiLink), + Triple("link", Icons.Outlined.Link, s.formatLink), + Triple("strike", Icons.Outlined.StrikethroughS, s.formatStrike), ) androidx.compose.material3.Surface( modifier = modifier.heightIn(min = 48.dp), @@ -328,8 +331,8 @@ private fun FormatBar(host: app.ivynote.android.editor.EditorHost, modifier: Mod IconButton(onClick = { host.command(cmd) }) { Icon(icon, contentDescription = label, tint = c.ink2) } } } - IconButton(onClick = { host.command("undo") }) { Icon(Icons.AutoMirrored.Filled.Undo, contentDescription = "撤销", tint = c.ink2) } - IconButton(onClick = { host.hideKeyboard() }) { Icon(Icons.Outlined.KeyboardHide, contentDescription = "收起键盘", tint = c.ink2) } + IconButton(onClick = { host.command("undo") }) { Icon(Icons.AutoMirrored.Filled.Undo, contentDescription = s.undo, tint = c.ink2) } + IconButton(onClick = { host.hideKeyboard() }) { Icon(Icons.Outlined.KeyboardHide, contentDescription = s.hideKeyboard, tint = c.ink2) } } } } @@ -339,12 +342,13 @@ private fun FormatBar(host: app.ivynote.android.editor.EditorHost, modifier: Mod @Composable private fun OutlineSheet(body: String, topLine: Int, onPick: (Int) -> Unit, onDismiss: () -> Unit) { val c = Ivy.colors + val s = LocalStrings.current val headings = remember(body) { Outline.headings(body) } val current = Outline.current(headings, topLine) val top = headings.minOfOrNull { it.level } ?: 1 ModalBottomSheet(onDismissRequest = onDismiss, sheetState = rememberModalBottomSheetState(skipPartiallyExpanded = false), containerColor = c.surface) { Row(Modifier.padding(horizontal = 24.dp, vertical = 4.dp), verticalAlignment = Alignment.CenterVertically) { - Text("大纲", fontWeight = FontWeight.SemiBold, fontSize = 16.sp, color = c.ink) + Text(s.outline, fontWeight = FontWeight.SemiBold, fontSize = 16.sp, color = c.ink) if (headings.isNotEmpty()) { Spacer(Modifier.width(6.dp)) Text("${headings.size}", fontSize = 13.sp, color = c.faint) @@ -352,8 +356,8 @@ private fun OutlineSheet(body: String, topLine: Int, onPick: (Int) -> Unit, onDi } if (headings.isEmpty()) { Column(Modifier.padding(24.dp)) { - Text("还没有标题", color = c.muted, fontWeight = FontWeight.Medium) - Text("以 # 开头的行会出现在这里。", color = c.faint, fontSize = 13.sp) + Text(s.noHeadings, color = c.muted, fontWeight = FontWeight.Medium) + Text(s.noHeadingsHint, color = c.faint, fontSize = 13.sp) } } else { HorizontalDivider(color = c.line, modifier = Modifier.padding(top = 8.dp)) diff --git a/app/src/main/kotlin/app/ivynote/android/ui/NoteSheets.kt b/app/src/main/kotlin/app/ivynote/android/ui/NoteSheets.kt index 80b180a..586244f 100644 --- a/app/src/main/kotlin/app/ivynote/android/ui/NoteSheets.kt +++ b/app/src/main/kotlin/app/ivynote/android/ui/NoteSheets.kt @@ -73,6 +73,7 @@ import androidx.compose.ui.window.DialogProperties import app.ivynote.android.IvyApp import app.ivynote.android.LibrarySession import app.ivynote.core.ApiError +import app.ivynote.core.L10n import app.ivynote.core.Links import app.ivynote.core.Note import app.ivynote.core.Revision @@ -88,18 +89,19 @@ import java.io.File @Composable fun BacklinksSheet(engine: SyncEngine, note: Note, onOpen: (String) -> Unit, onDismiss: () -> Unit) { val c = Ivy.colors + val s = LocalStrings.current val revision by engine.revision.collectAsState() val links = remember(revision, note.id) { Links.backlinks(note.id, engine.notes.values) } ModalBottomSheet(onDismissRequest = onDismiss, sheetState = rememberModalBottomSheetState(), containerColor = c.surface) { Row(Modifier.padding(horizontal = 24.dp, vertical = 4.dp), verticalAlignment = Alignment.CenterVertically) { - Text("反向链接", fontWeight = FontWeight.SemiBold, fontSize = 16.sp, color = c.ink) + Text(s.backlinks, fontWeight = FontWeight.SemiBold, fontSize = 16.sp, color = c.ink) Spacer(Modifier.width(6.dp)) Text("${links.size}", fontSize = 13.sp, color = c.faint) } if (links.isEmpty()) { Column(Modifier.padding(24.dp)) { - Text("还没有笔记链接到这里", color = c.muted, fontWeight = FontWeight.Medium) - Text("在其他笔记中输入 [[${displayTitle(note)}]] 即可链接到这篇笔记。", color = c.faint, fontSize = 13.sp) + Text(s.noBacklinks, color = c.muted, fontWeight = FontWeight.Medium) + Text(s.noBacklinksHint(displayTitle(note)), color = c.faint, fontSize = 13.sp) } } else { HorizontalDivider(color = c.line, modifier = Modifier.padding(top = 8.dp)) @@ -136,6 +138,7 @@ fun BacklinksSheet(engine: SyncEngine, note: Note, onOpen: (String) -> Unit, onD @Composable fun HistoryScreen(lib: LibrarySession, note: Note, onDismiss: () -> Unit) { val c = Ivy.colors + val s = LocalStrings.current val context = LocalContext.current val api = lib.api val scope = rememberCoroutineScope() @@ -167,23 +170,23 @@ fun HistoryScreen(lib: LibrarySession, note: Note, onDismiss: () -> Unit) { Column(Modifier.fillMaxSize().background(c.surface).statusBarsPadding()) { Row(Modifier.fillMaxWidth().height(56.dp).padding(horizontal = 4.dp), verticalAlignment = Alignment.CenterVertically) { IconButton(onClick = { if (picked != null) picked = null else onDismiss() }) { - Icon(Icons.AutoMirrored.Filled.ArrowBack, contentDescription = "返回", tint = c.ink2) + Icon(Icons.AutoMirrored.Filled.ArrowBack, contentDescription = s.back, tint = c.ink2) } Column(Modifier.weight(1f).padding(start = 4.dp)) { - Text("历史版本", style = SerifTitle, fontSize = 18.sp, color = c.ink) + Text(s.history, style = SerifTitle, fontSize = 18.sp, color = c.ink) Text(displayTitle(note), fontSize = 12.sp, color = c.faint, maxLines = 1, overflow = TextOverflow.Ellipsis) } val p = picked if (p != null && p.rev != list?.firstOrNull()?.rev) { - TextButton(enabled = preview != null, onClick = { confirm = true }) { Text("恢复此版本", color = c.ivy, fontWeight = FontWeight.SemiBold) } + TextButton(enabled = preview != null, onClick = { confirm = true }) { Text(s.restoreVersion, color = c.ivy, fontWeight = FontWeight.SemiBold) } } } val l = list when { - api == null -> EmptyState(Icons.Outlined.History, "本地笔记库没有历史版本", "历史版本保存在同步服务器上。") - error != null && l == null -> EmptyState(Icons.Outlined.WifiOff, "无法载入历史版本", error ?: "") + api == null -> EmptyState(Icons.Outlined.History, s.localNoHistory, s.localNoHistoryHint) + error != null && l == null -> EmptyState(Icons.Outlined.WifiOff, s.historyLoadFailed, error ?: "") l == null -> Box(Modifier.fillMaxSize(), contentAlignment = Alignment.Center) { CircularProgressIndicator(color = c.muted) } - l.isEmpty() -> EmptyState(Icons.Outlined.History, "暂无历史版本", "编辑并同步后,这里会出现保存过的版本。") + l.isEmpty() -> EmptyState(Icons.Outlined.History, s.noHistory, s.noHistoryHint) picked != null -> { val r = preview if (r == null) { @@ -192,7 +195,7 @@ fun HistoryScreen(lib: LibrarySession, note: Note, onDismiss: () -> Unit) { Column(Modifier.fillMaxSize().verticalScroll(rememberScrollState()).padding(horizontal = 24.dp, vertical = 12.dp).navigationBarsPadding()) { Text(revisionLabel(r, l.first().rev == r.rev), fontSize = 12.5.sp, color = c.faint) Spacer(Modifier.height(8.dp)) - Text(r.title.ifBlank { "无标题" }, style = SerifTitle, fontSize = 22.sp, color = if (r.title.isBlank()) c.muted else c.ink) + Text(r.title.ifBlank { s.untitled }, style = SerifTitle, fontSize = 22.sp, color = if (r.title.isBlank()) c.muted else c.ink) Spacer(Modifier.height(12.dp)) SelectionContainer { Text(r.body.orEmpty(), fontFamily = FontFamily.Monospace, fontSize = 13.5.sp, color = c.ink2, lineHeight = 20.sp) @@ -209,11 +212,11 @@ fun HistoryScreen(lib: LibrarySession, note: Note, onDismiss: () -> Unit) { ) { Column(Modifier.weight(1f)) { Text(fullDate(r.createdAt), fontSize = 15.sp, color = c.ink, fontWeight = if (current) FontWeight.SemiBold else FontWeight.Normal) - Text(listOf(r.device.ifEmpty { "未知设备" }, formatSize(context, r.size), r.title.ifBlank { "无标题" }).joinToString(" · "), + Text(listOf(r.device.ifEmpty { s.unknownDevice }, formatSize(context, r.size), r.title.ifBlank { s.untitled }).joinToString(" · "), fontSize = 12.5.sp, color = c.faint, maxLines = 1, overflow = TextOverflow.Ellipsis) } if (current) { - Text("当前版本", fontSize = 12.sp, color = c.ivyInk, + Text(s.currentVersion, fontSize = 12.sp, color = c.ivyInk, modifier = Modifier.clip(RoundedCornerShape(50)).background(c.ivySoft).padding(horizontal = 8.dp, vertical = 2.dp)) } } @@ -224,10 +227,10 @@ fun HistoryScreen(lib: LibrarySession, note: Note, onDismiss: () -> Unit) { } if (confirm) { val r = preview - ConfirmDialog("恢复此版本?", "当前内容会被替换,但仍会保留在历史版本中。", "恢复", destructive = false, onDismiss = { confirm = false }) { + ConfirmDialog(s.restoreVersionTitle, s.restoreVersionMessage, s.restore, destructive = false, onDismiss = { confirm = false }) { if (r != null) { lib.engine.updateNote(note.id, SyncEngine.NotePatch(title = r.title, body = r.body.orEmpty())) - toast(context, "已恢复为历史版本") + toast(context, s.restoredVersion) scope.launch { lib.engine.sync() } onDismiss() } @@ -236,11 +239,11 @@ fun HistoryScreen(lib: LibrarySession, note: Note, onDismiss: () -> Unit) { } private fun revisionLabel(r: Revision, current: Boolean): String = - fullDate(r.createdAt) + (if (r.device.isNotEmpty()) " · ${r.device}" else "") + if (current) " · 当前版本" else "" + fullDate(r.createdAt) + (if (r.device.isNotEmpty()) " · ${r.device}" else "") + if (current) " · " + L10n.s.currentVersion else "" -/** 2026年11月6日 16:20, for lists where the exact moment matters. */ +/** 2026年11月6日 16:20 / Nov 6, 2026 16:20, for lists where the exact moment matters. */ fun fullDate(at: Long): String = - java.text.SimpleDateFormat("yyyy年M月d日 HH:mm", java.util.Locale.CHINA).format(java.util.Date(at)) + java.text.SimpleDateFormat(L10n.s.dateTimePattern, L10n.s.locale).format(java.util.Date(at)) @Composable private fun EmptyState(icon: androidx.compose.ui.graphics.vector.ImageVector, title: String, hint: String) { @@ -263,6 +266,7 @@ private fun EmptyState(icon: androidx.compose.ui.graphics.vector.ImageVector, ti @Composable fun ShareSheet(lib: LibrarySession, note: Note, onDismiss: () -> Unit) { val c = Ivy.colors + val s = LocalStrings.current val context = LocalContext.current val scope = rememberCoroutineScope() val api = lib.api @@ -323,7 +327,7 @@ fun ShareSheet(lib: LibrarySession, note: Note, onDismiss: () -> Unit) { a.exportNote(note.id, public = true) } catch (e: ApiError) { if (!e.isTransient) throw e - toast(context, "离线中,附件没有替换为公网链接") + toast(context, s.offlineNoPublicLinks) local } } @@ -349,17 +353,17 @@ fun ShareSheet(lib: LibrarySession, note: Note, onDismiss: () -> Unit) { ModalBottomSheet(onDismissRequest = onDismiss, sheetState = rememberModalBottomSheetState(skipPartiallyExpanded = true), containerColor = c.surface) { Column(Modifier.fillMaxWidth().verticalScroll(rememberScrollState()).padding(horizontal = 20.dp).padding(bottom = 28.dp), verticalArrangement = Arrangement.spacedBy(16.dp)) { - Text("分享笔记", style = SerifTitle, fontSize = 19.sp, color = c.ink) + Text(s.shareNote, style = SerifTitle, fontSize = 19.sp, color = c.ink) when { - api == null -> Text("本地笔记库不能生成公开链接,可以复制或导出笔记。", fontSize = 13.sp, color = c.muted) + api == null -> Text(s.localNoShare, fontSize = 13.sp, color = c.muted) loading -> Box(Modifier.fillMaxWidth().padding(16.dp), contentAlignment = Alignment.Center) { CircularProgressIndicator(color = c.muted) } - offline -> Text("分享链接需要联网。", fontSize = 13.sp, color = c.muted) + offline -> Text(s.shareNeedsNetwork, fontSize = 13.sp, color = c.muted) else -> { Row(verticalAlignment = Alignment.CenterVertically) { Column(Modifier.weight(1f)) { - Text("公开链接", fontSize = 15.sp, fontWeight = FontWeight.Medium, color = c.ink) - Text("拿到链接和访问密码的人可以阅读这篇笔记", fontSize = 12.5.sp, color = c.muted) + Text(s.publicLink, fontSize = 15.sp, fontWeight = FontWeight.Medium, color = c.ink) + Text(s.publicLinkHint, fontSize = 12.5.sp, color = c.muted) } Switch( checked = live || asking && !changing, @@ -387,64 +391,64 @@ fun ShareSheet(lib: LibrarySession, note: Note, onDismiss: () -> Unit) { Icon(Icons.Outlined.Lock, null, tint = c.ivy, modifier = Modifier.size(15.dp).padding(top = 2.dp)) Spacer(Modifier.width(8.dp)) Text( - if (share?.enabled == true && share?.hasPassword == false) "这个链接是在要求密码之前创建的,设置密码后才能继续访问。" - else "为保护你的隐私,公开链接必须设置至少 6 位的访问密码。", + if (share?.enabled == true && share?.hasPassword == false) s.legacyShare + else s.needPassword, fontSize = 12.5.sp, color = c.muted, ) } Row(verticalAlignment = Alignment.CenterVertically) { OutlinedTextField( value = password, onValueChange = { password = it.take(72) }, singleLine = true, - placeholder = { Text("新密码(至少 6 位)") }, + placeholder = { Text(s.newPasswordPlaceholder) }, textStyle = androidx.compose.ui.text.TextStyle(fontFamily = FontFamily.Monospace, fontSize = 15.sp), isError = err != null, modifier = Modifier.weight(1f), ) - TextButton(onClick = { password = Share.generatePassword() }) { Text("随机生成") } + TextButton(onClick = { password = Share.generatePassword() }) { Text(s.generate) } } if (err != null) Text(err, color = c.danger, fontSize = 12.sp) Row(Modifier.fillMaxWidth(), horizontalArrangement = Arrangement.End) { - if (changing) TextButton(onClick = { changing = false; password = "" }) { Text("取消") } - InkButton(if (changing) "保存" else "生成链接", busy = saving, enabled = Share.passwordError(password) == null, + if (changing) TextButton(onClick = { changing = false; password = "" }) { Text(s.cancel) } + InkButton(if (changing) s.save else s.createLink, busy = saving, enabled = Share.passwordError(password) == null, onClick = { save(enabled = true, newPassword = password) }) } } } - val s = share - AnimatedVisibility(live && s != null) { - if (s == null) return@AnimatedVisibility + val sh = share + AnimatedVisibility(live && sh != null) { + if (sh == null) return@AnimatedVisibility Column(verticalArrangement = Arrangement.spacedBy(12.dp)) { Row( Modifier.fillMaxWidth().clip(RoundedCornerShape(12.dp)).background(c.sunken).padding(start = 12.dp), verticalAlignment = Alignment.CenterVertically, ) { Text(link, fontFamily = FontFamily.Monospace, fontSize = 12.5.sp, color = c.ink2, maxLines = 1, overflow = TextOverflow.Ellipsis, modifier = Modifier.weight(1f)) - TextButton(onClick = { copyText(context, link) }) { Text("复制链接") } + TextButton(onClick = { copyText(context, link) }) { Text(s.copyLink) } } - if (s.expired) Text("分享已过期", color = c.danger, fontSize = 12.sp) + if (sh.expired) Text(s.shareExpired, color = c.danger, fontSize = 12.sp) Row( Modifier.fillMaxWidth().clip(RoundedCornerShape(12.dp)).background(c.sunken).padding(start = 12.dp), verticalAlignment = Alignment.CenterVertically, ) { Icon(Icons.Outlined.Lock, null, tint = c.ivy, modifier = Modifier.size(14.dp)) Spacer(Modifier.width(8.dp)) - if (s.password.isNotEmpty()) { - Text(s.password, fontFamily = FontFamily.Monospace, fontWeight = FontWeight.Medium, fontSize = 14.sp, color = c.ink, modifier = Modifier.weight(1f)) - IconButton(onClick = { copyText(context, s.password) }) { Icon(Icons.Outlined.ContentCopy, contentDescription = "复制密码", tint = c.ink2, modifier = Modifier.size(16.dp)) } + if (sh.password.isNotEmpty()) { + Text(sh.password, fontFamily = FontFamily.Monospace, fontWeight = FontWeight.Medium, fontSize = 14.sp, color = c.ink, modifier = Modifier.weight(1f)) + IconButton(onClick = { copyText(context, sh.password) }) { Icon(Icons.Outlined.ContentCopy, contentDescription = s.copyPassword, tint = c.ink2, modifier = Modifier.size(16.dp)) } } else { - Text("已设置访问密码", fontSize = 13.sp, color = c.muted, modifier = Modifier.weight(1f)) + Text(s.passwordSet, fontSize = 13.sp, color = c.muted, modifier = Modifier.weight(1f)) } - if (!changing) TextButton(onClick = { changing = true; password = Share.generatePassword() }) { Text("修改密码", fontSize = 12.5.sp) } + if (!changing) TextButton(onClick = { changing = true; password = Share.generatePassword() }) { Text(s.changePassword, fontSize = 12.5.sp) } } - if (s.password.isNotEmpty()) { - InkButton("复制链接和密码", modifier = Modifier.fillMaxWidth(), onClick = { copyText(context, Share.message(title, link, s.password)) }) + if (sh.password.isNotEmpty()) { + InkButton(s.copyLinkAndPassword, modifier = Modifier.fillMaxWidth(), onClick = { copyText(context, Share.message(title, link, sh.password)) }) } Row(verticalAlignment = Alignment.CenterVertically) { - Text("有效期", fontSize = 13.sp, color = c.muted) + Text(s.expires, fontSize = 13.sp, color = c.muted) Spacer(Modifier.width(8.dp)) - ExpiryPicker(s, enabled = !saving) { days -> save(days = days) } + ExpiryPicker(sh, enabled = !saving) { days -> save(days = days) } Spacer(Modifier.weight(1f)) - Text("${s.views} 次访问", fontSize = 12.5.sp, color = c.faint) + Text(s.views(sh.views), fontSize = 12.5.sp, color = c.faint) } } } @@ -453,22 +457,22 @@ fun ShareSheet(lib: LibrarySession, note: Note, onDismiss: () -> Unit) { HorizontalDivider(color = c.line) Column(verticalArrangement = Arrangement.spacedBy(2.dp)) { - Text("复制或导出", fontSize = 15.sp, fontWeight = FontWeight.Medium, color = c.ink) + Text(s.copyOrExport, fontSize = 15.sp, fontWeight = FontWeight.Medium, color = c.ink) Text( - if (api != null && !offline && state.status != app.ivynote.core.SyncState.Status.OFFLINE) "附件会自动公开并替换为公网链接,方便粘贴到博客、公众号等地方。" - else "离线时附件不会替换为公网链接。", + if (api != null && !offline && state.status != app.ivynote.core.SyncState.Status.OFFLINE) s.copyAsHint + else s.copyAsOffline, fontSize = 12.5.sp, color = c.muted, ) } if (exporting) Box(Modifier.fillMaxWidth(), contentAlignment = Alignment.Center) { CircularProgressIndicator(Modifier.size(20.dp), strokeWidth = 2.dp, color = c.muted) } - SheetAction(Icons.Outlined.ContentCopy, "复制 Markdown", enabled = !exporting) { export { md -> copyText(context, md) } } - SheetAction(Icons.Outlined.Share, "发送到其他应用", enabled = !exporting) { + SheetAction(Icons.Outlined.ContentCopy, s.copyMarkdown, enabled = !exporting) { export { md -> copyText(context, md) } } + SheetAction(Icons.Outlined.Share, s.sendToApp, enabled = !exporting) { export { md -> val intent = Intent(Intent.ACTION_SEND).setType("text/plain").putExtra(Intent.EXTRA_SUBJECT, title).putExtra(Intent.EXTRA_TEXT, md) context.startActivity(Intent.createChooser(intent, title)) } } - SheetAction(Icons.Outlined.FileDownload, "导出 .md 文件", enabled = !exporting) { + SheetAction(Icons.Outlined.FileDownload, s.exportMd, enabled = !exporting) { export { md -> val name = title.replace(Regex("[\\\\/:*?\"<>|]"), "-") + ".md" val tmp = File(IvyApp.instance.transferDir(), "export-" + System.nanoTime()).apply { writeText(md) } @@ -486,16 +490,17 @@ fun ShareSheet(lib: LibrarySession, note: Note, onDismiss: () -> Unit) { @Composable private fun ExpiryPicker(share: Share, enabled: Boolean, onPick: (Int) -> Unit) { val c = Ivy.colors + val s = LocalStrings.current var open by remember { mutableStateOf(false) } val label = when { - share.expiresAt == 0L -> "永久有效" - else -> "至 " + java.text.SimpleDateFormat("M月d日", java.util.Locale.CHINA).format(java.util.Date(share.expiresAt)) + share.expiresAt == 0L -> s.neverExpires + else -> s.until(java.text.SimpleDateFormat(s.monthDayPattern, s.locale).format(java.util.Date(share.expiresAt))) } Box { Text(label, fontSize = 13.sp, color = if (enabled) c.ivy else c.faint, modifier = Modifier.clip(RoundedCornerShape(8.dp)).clickable(enabled = enabled) { open = true }.padding(horizontal = 6.dp, vertical = 4.dp)) DropdownMenu(expanded = open, onDismissRequest = { open = false }) { - for ((days, text) in listOf(1 to "1 天", 7 to "7 天", 30 to "30 天", -1 to "永久有效")) { + for ((days, text) in listOf(1 to s.days(1), 7 to s.days(7), 30 to s.days(30), -1 to s.neverExpires)) { DropdownMenuItem(text = { Text(text) }, onClick = { open = false; onPick(days) }) } } diff --git a/app/src/main/kotlin/app/ivynote/android/ui/Root.kt b/app/src/main/kotlin/app/ivynote/android/ui/Root.kt index ee2ad6b..cef7ba1 100644 --- a/app/src/main/kotlin/app/ivynote/android/ui/Root.kt +++ b/app/src/main/kotlin/app/ivynote/android/ui/Root.kt @@ -26,6 +26,7 @@ import androidx.compose.ui.unit.dp import app.ivynote.android.IvyApp import app.ivynote.android.LibrarySession import app.ivynote.core.DocumentStore +import app.ivynote.core.LanguageSettings import app.ivynote.core.LibraryRef import app.ivynote.core.SessionStore import app.ivynote.core.StoredAccount @@ -87,6 +88,15 @@ fun OpenLibrary(ref: LibraryRef, account: StoredAccount?, session: SessionStore? var library by remember { mutableStateOf(null) } var openError by remember { mutableStateOf(null) } + // Signed in: the account's language comes first (LanguageSettings). + if (account != null) { + val key = LanguageSettings.accountKey(account.server, account.user.id) + DisposableEffect(key) { + app.language.accountOpened(key) + onDispose { app.language.accountClosed(key) } + } + } + LaunchedEffect(ref.id, account?.user?.id) { val file = app.catalog.storeFile(ref.id) if (account != null) { @@ -135,9 +145,10 @@ fun OpenLibrary(ref: LibraryRef, account: StoredAccount?, session: SessionStore? verticalArrangement = Arrangement.spacedBy(16.dp, Alignment.CenterVertically), horizontalAlignment = Alignment.CenterHorizontally, ) { - Text("无法打开本地数据", style = SerifTitle) + val s = LocalStrings.current + Text(s.cannotOpenData, style = SerifTitle) Text(openError ?: "", color = Ivy.colors.muted, textAlign = TextAlign.Center) - InkButton("返回笔记库列表", onClick = { app.catalog.open(null) }) + InkButton(s.backToLibraries, onClick = { app.catalog.open(null) }) } } else { Loading() diff --git a/app/src/main/kotlin/app/ivynote/android/ui/ShelfPane.kt b/app/src/main/kotlin/app/ivynote/android/ui/ShelfPane.kt index a86e432..4ace49a 100644 --- a/app/src/main/kotlin/app/ivynote/android/ui/ShelfPane.kt +++ b/app/src/main/kotlin/app/ivynote/android/ui/ShelfPane.kt @@ -41,6 +41,7 @@ import androidx.compose.material.icons.outlined.Description import androidx.compose.material.icons.outlined.Edit import androidx.compose.material.icons.outlined.Folder import androidx.compose.material.icons.outlined.FolderOpen +import androidx.compose.material.icons.outlined.Language import androidx.compose.material.icons.outlined.ManageAccounts import androidx.compose.material.icons.outlined.MoreHoriz import androidx.compose.material.icons.outlined.PhotoLibrary @@ -116,8 +117,10 @@ fun ShelfPane(ui: LibraryUiState, session: SessionStore?, wide: Boolean, modifie var movingNote by remember { mutableStateOf(null) } var confirmEmpty by remember { mutableStateOf(false) } var editingTag by remember { mutableStateOf(null) } + val s = LocalStrings.current - val rows = remember(revision, ui.expanded, sortBy, limits.toMap()) { + // The labels (置顶, 笔记, 回收站…) are in the interface language. + val rows = remember(revision, ui.expanded, sortBy, limits.toMap(), s) { Shelf.build(engine.folders.values, engine.notes.values, engine.tags.values, ui.expanded, sortBy, limits) } val actions = ShelfActions( @@ -167,11 +170,11 @@ fun ShelfPane(ui: LibraryUiState, session: SessionStore?, wide: Boolean, modifie contentColor = Ivy.colors.canvas, shape = CircleShape, modifier = Modifier.align(Alignment.BottomEnd).navigationBarsPadding().padding(20.dp), - ) { Icon(Icons.Outlined.Edit, contentDescription = "新建笔记") } + ) { Icon(Icons.Outlined.Edit, contentDescription = s.newNote) } } newFolderParent?.let { parent -> - TextInputDialog(title = if (parent.isEmpty()) "新建笔记本" else "新建子笔记本", confirm = "创建", onDismiss = { newFolderParent = null }) { name -> + TextInputDialog(title = if (parent.isEmpty()) s.newFolder else s.newSubfolder, confirm = s.create, onDismiss = { newFolderParent = null }) { name -> val n = name.trim().take(100) if (n.isNotEmpty()) { engine.createFolder(n, parent) @@ -180,18 +183,18 @@ fun ShelfPane(ui: LibraryUiState, session: SessionStore?, wide: Boolean, modifie } } renamingFolder?.let { f -> - TextInputDialog(title = "重命名笔记本", initial = f.name, onDismiss = { renamingFolder = null }) { name -> + TextInputDialog(title = s.renameFolder, initial = f.name, onDismiss = { renamingFolder = null }) { name -> val n = name.trim().take(100) if (n.isNotEmpty()) engine.renameFolder(f.id, n) } } deletingFolder?.let { f -> - ConfirmDialog("删除笔记本?", "「${f.name}」的子笔记本会一起删除,其中的笔记移到回收站。", "删除", onDismiss = { deletingFolder = null }) { + ConfirmDialog(s.deleteFolderTitle, s.deleteFolderMessage(f.name), s.delete, onDismiss = { deletingFolder = null }) { engine.deleteFolder(f.id) } } renamingNote?.let { n -> - TextInputDialog(title = "重命名笔记", initial = n.title, placeholder = "无标题", onDismiss = { renamingNote = null }) { title -> + TextInputDialog(title = s.renameNote, initial = n.title, placeholder = s.untitled, onDismiss = { renamingNote = null }) { title -> engine.updateNote(n.id, SyncEngine.NotePatch(title = cleanTitle(title))) } } @@ -200,7 +203,7 @@ fun ShelfPane(ui: LibraryUiState, session: SessionStore?, wide: Boolean, modifie } editingTag?.let { t -> TagEditDialog(engine, t, onDismiss = { editingTag = null }) } if (confirmEmpty) { - ConfirmDialog("清空回收站?", "回收站中的全部笔记将被永久删除,此操作无法撤销。", "清空回收站", onDismiss = { confirmEmpty = false }) { + ConfirmDialog(s.emptyTrashTitle, s.emptyTrashMessage, s.emptyTrash, onDismiss = { confirmEmpty = false }) { if (ui.selectedNote?.let { engine.notes[it]?.isTrashed } == true) ui.selection = null engine.emptyTrash() } @@ -233,6 +236,9 @@ private fun LibraryHeader(ui: LibraryUiState, session: SessionStore?, state: app val libraries by catalog.libraries.collectAsState() val ref = ui.lib.ref var open by remember { mutableStateOf(false) } + var choosingLanguage by remember { mutableStateOf(false) } + val s = LocalStrings.current + if (choosingLanguage) LanguageDialog(onDismiss = { choosingLanguage = false }) Box(Modifier.padding(horizontal = 10.dp, vertical = 6.dp)) { Row( Modifier.fillMaxWidth().clip(RoundedCornerShape(14.dp)).clickable { open = true }.padding(horizontal = 6.dp, vertical = 8.dp), @@ -244,10 +250,10 @@ private fun LibraryHeader(ui: LibraryUiState, session: SessionStore?, state: app Text(ref.name, style = SerifTitle, fontSize = 19.sp, maxLines = 1, overflow = TextOverflow.Ellipsis, color = Ivy.colors.ink) SyncStatusLine(ui.lib.engine, state) } - Icon(Icons.Outlined.UnfoldMore, contentDescription = "切换笔记库", tint = Ivy.colors.faint, modifier = Modifier.size(18.dp)) + Icon(Icons.Outlined.UnfoldMore, contentDescription = s.switchLibrary, tint = Ivy.colors.faint, modifier = Modifier.size(18.dp)) } DropdownMenu(expanded = open, onDismissRequest = { open = false }) { - Caption("笔记库", Modifier.padding(horizontal = 12.dp, vertical = 4.dp)) + Caption(s.libraries, Modifier.padding(horizontal = 12.dp, vertical = 4.dp)) for (l in libraries) { DropdownMenuItem( text = { Text(l.name, maxLines = 1, overflow = TextOverflow.Ellipsis) }, @@ -260,15 +266,17 @@ private fun LibraryHeader(ui: LibraryUiState, session: SessionStore?, state: app } HorizontalDivider() if (!ref.isLocal && session != null) { - DropdownMenuItem(text = { Text("账户与同步…") }, leadingIcon = { Icon(Icons.Outlined.ManageAccounts, null) }, + DropdownMenuItem(text = { Text(s.accountAndSync) }, leadingIcon = { Icon(Icons.Outlined.ManageAccounts, null) }, onClick = { open = false; ui.showAccount = true }) } else if (catalog.library(ref.id)?.canTurnOnSync == true) { - DropdownMenuItem(text = { Text("开启多端同步…") }, leadingIcon = { Icon(Icons.Outlined.CloudUpload, null) }, + DropdownMenuItem(text = { Text(s.turnOnSyncEllipsis) }, leadingIcon = { Icon(Icons.Outlined.CloudUpload, null) }, onClick = { open = false; catalog.turnOnSync(ref.id) }) } - DropdownMenuItem(text = { Text("媒体库") }, leadingIcon = { Icon(Icons.Outlined.PhotoLibrary, null) }, + DropdownMenuItem(text = { Text(s.mediaLibrary) }, leadingIcon = { Icon(Icons.Outlined.PhotoLibrary, null) }, onClick = { open = false; ui.showMedia = true }) - DropdownMenuItem(text = { Text("管理笔记库…") }, leadingIcon = { Icon(Icons.Outlined.Book, null) }, + DropdownMenuItem(text = { Text(s.language) }, leadingIcon = { Icon(Icons.Outlined.Language, null) }, + onClick = { open = false; choosingLanguage = true }) + DropdownMenuItem(text = { Text(s.manageLibraries) }, leadingIcon = { Icon(Icons.Outlined.Book, null) }, onClick = { open = false; catalog.open(null) }) } } @@ -285,7 +293,7 @@ private fun SearchField(query: String, onChange: (String) -> Unit) { Icon(Icons.Outlined.Search, contentDescription = null, tint = c.faint, modifier = Modifier.size(18.dp)) Spacer(Modifier.width(8.dp)) Box(Modifier.weight(1f)) { - if (query.isEmpty()) Text("搜索笔记", color = c.faint, fontSize = 15.sp) + if (query.isEmpty()) Text(LocalStrings.current.searchNotes, color = c.faint, fontSize = 15.sp) BasicTextField( value = query, onValueChange = onChange, @@ -296,7 +304,7 @@ private fun SearchField(query: String, onChange: (String) -> Unit) { ) } if (query.isNotEmpty()) { - Icon(Icons.Outlined.Close, contentDescription = "清除", tint = c.faint, + Icon(Icons.Outlined.Close, contentDescription = LocalStrings.current.clear, tint = c.faint, modifier = Modifier.size(18.dp).clip(CircleShape).clickable { onChange("") }) } } @@ -362,7 +370,7 @@ private fun RowContent(row: Shelf.Row, engine: SyncEngine, onHeadingMenu: () -> } Shelf.Kind.HEADING -> Row(Modifier.fillMaxWidth().padding(start = 8.dp, top = 6.dp), verticalAlignment = Alignment.CenterVertically) { Text(row.label, fontSize = 12.5.sp, fontWeight = FontWeight.SemiBold, color = c.muted, modifier = Modifier.weight(1f)) - IconButton(onClick = onHeadingMenu) { Icon(Icons.Outlined.MoreHoriz, contentDescription = "排序与新建", tint = c.muted) } + IconButton(onClick = onHeadingMenu) { Icon(Icons.Outlined.MoreHoriz, contentDescription = LocalStrings.current.sortAndNew, tint = c.muted) } } Shelf.Kind.CREATE -> Row(Modifier.padding(start = 8.dp), verticalAlignment = Alignment.CenterVertically) { Icon(Icons.Outlined.Add, null, tint = c.muted, modifier = Modifier.size(20.dp)) @@ -370,7 +378,7 @@ private fun RowContent(row: Shelf.Row, engine: SyncEngine, onHeadingMenu: () -> Text(row.label, color = c.muted, fontSize = 15.sp) } Shelf.Kind.MORE -> Row(Modifier.padding(start = indent(row.depth) + 30.dp), verticalAlignment = Alignment.CenterVertically) { - Text("再显示 ${minOf(row.count, Shelf.PAGE)} 篇(共 ${row.count} 篇未显示)", color = c.ivy, fontSize = 13.5.sp) + Text(LocalStrings.current.showMore(minOf(row.count, Shelf.PAGE), row.count), color = c.ivy, fontSize = 13.5.sp) } else -> Row(Modifier.fillMaxWidth().padding(start = 4.dp + indent(row.depth), end = 10.dp), verticalAlignment = Alignment.CenterVertically) { Box(Modifier.width(20.dp), contentAlignment = Alignment.Center) { @@ -386,7 +394,7 @@ private fun RowContent(row: Shelf.Row, engine: SyncEngine, onHeadingMenu: () -> val untitled = row.kind == Shelf.Kind.NOTE && row.label.isBlank() Text( when { - untitled -> "无标题" + untitled -> LocalStrings.current.untitled row.kind == Shelf.Kind.TAG -> "#" + row.label else -> row.label }, @@ -403,7 +411,7 @@ private fun RowContent(row: Shelf.Row, engine: SyncEngine, onHeadingMenu: () -> } if (note != null && note.pinned && !note.isTrashed && row.parent != Shelf.PINNED_KEY) { Spacer(Modifier.width(6.dp)) - Icon(Icons.Filled.PushPin, contentDescription = "置顶", tint = c.warn, modifier = Modifier.size(13.dp)) + Icon(Icons.Filled.PushPin, contentDescription = LocalStrings.current.pinned, tint = c.warn, modifier = Modifier.size(13.dp)) } if (row.count > 0) { Spacer(Modifier.width(6.dp)) @@ -419,7 +427,7 @@ private fun indent(depth: Int) = (minOf(depth, 4) * 16 + maxOf(depth - 4, 0) * 8 @Composable private fun Chevron(open: Boolean, modifier: Modifier = Modifier) { val angle by animateFloatAsState(if (open) 90f else 0f, label = "chevron") - Icon(Icons.AutoMirrored.Filled.KeyboardArrowRight, contentDescription = if (open) "收起" else "展开", + Icon(Icons.AutoMirrored.Filled.KeyboardArrowRight, contentDescription = if (open) LocalStrings.current.collapse else LocalStrings.current.expand, tint = Ivy.colors.faint, modifier = modifier.size(18.dp).rotate(angle)) } @@ -454,30 +462,32 @@ private fun RowMenu( } when (row.kind) { Shelf.Kind.HEADING -> { - Caption("排序", Modifier.padding(horizontal = 12.dp, vertical = 4.dp)) - for (s in Shelf.SortBy.entries) { + val s = LocalStrings.current + Caption(s.sort, Modifier.padding(horizontal = 12.dp, vertical = 4.dp)) + for (option in Shelf.SortBy.entries) { DropdownMenuItem( - text = { Text(s.label) }, - leadingIcon = { if (s == sortBy) Icon(Icons.Outlined.Check, null, tint = Ivy.colors.ivy) else Spacer(Modifier.size(24.dp)) }, - onClick = { close(); onSort(s) }, + text = { Text(option.label) }, + leadingIcon = { if (option == sortBy) Icon(Icons.Outlined.Check, null, tint = Ivy.colors.ivy) else Spacer(Modifier.size(24.dp)) }, + onClick = { close(); onSort(option) }, ) } HorizontalDivider() - item("新建笔记", Icons.Outlined.Edit) { actions.newNote("") }() - item("新建笔记本", Icons.Outlined.CreateNewFolder) { actions.newFolder("") }() + item(s.newNote, Icons.Outlined.Edit) { actions.newNote("") }() + item(s.newFolder, Icons.Outlined.CreateNewFolder) { actions.newFolder("") }() } Shelf.Kind.FOLDER -> row.folder?.let { f -> - item("新建笔记", Icons.Outlined.Edit) { actions.newNote(f.id) }() - item("新建子笔记本", Icons.Outlined.CreateNewFolder) { actions.newFolder(f.id) }() - item("重命名", Icons.Outlined.Edit) { actions.renameFolder(f) }() - item("删除", Icons.Outlined.Delete, danger = true) { actions.deleteFolder(f) }() + val s = LocalStrings.current + item(s.newNote, Icons.Outlined.Edit) { actions.newNote(f.id) }() + item(s.newSubfolder, Icons.Outlined.CreateNewFolder) { actions.newFolder(f.id) }() + item(s.rename, Icons.Outlined.Edit) { actions.renameFolder(f) }() + item(s.delete, Icons.Outlined.Delete, danger = true) { actions.deleteFolder(f) }() } Shelf.Kind.NOTE -> row.note?.let { n -> NoteMenuItems(n, ui, engine, actions, close) } Shelf.Kind.TAG -> row.tag?.let { t -> - item("编辑标签…", Icons.Outlined.Edit) { actions.editTag(t) }() + item(LocalStrings.current.editTagEllipsis, Icons.Outlined.Edit) { actions.editTag(t) }() } Shelf.Kind.GROUP -> if (row.key == Shelf.TRASH_KEY) { - item("清空回收站", Icons.Outlined.DeleteForever, danger = true) { actions.emptyTrash() }() + item(LocalStrings.current.emptyTrash, Icons.Outlined.DeleteForever, danger = true) { actions.emptyTrash() }() } else -> Unit } @@ -487,26 +497,27 @@ private fun RowMenu( @Composable fun NoteMenuItems(n: Note, ui: LibraryUiState, engine: SyncEngine, actions: ShelfActions?, close: () -> Unit) { val c = Ivy.colors + val s = LocalStrings.current fun clearIfSelected() { if (ui.selectedNote == n.id) ui.selection = null } if (n.isTrashed) { - DropdownMenuItem(text = { Text("恢复") }, leadingIcon = { Icon(Icons.Outlined.Restore, null) }, + DropdownMenuItem(text = { Text(s.restore) }, leadingIcon = { Icon(Icons.Outlined.Restore, null) }, onClick = { close(); engine.updateNote(n.id, SyncEngine.NotePatch(trashed = false)) }) - DropdownMenuItem(text = { Text("永久删除", color = c.danger) }, leadingIcon = { Icon(Icons.Outlined.DeleteForever, null, tint = c.danger) }, + DropdownMenuItem(text = { Text(s.deleteForever, color = c.danger) }, leadingIcon = { Icon(Icons.Outlined.DeleteForever, null, tint = c.danger) }, onClick = { close(); clearIfSelected(); engine.deleteNote(n.id) }) } else { - DropdownMenuItem(text = { Text(if (n.pinned) "取消置顶" else "置顶") }, leadingIcon = { Icon(Icons.Outlined.PushPin, null) }, + DropdownMenuItem(text = { Text(if (n.pinned) s.unpin else s.pin) }, leadingIcon = { Icon(Icons.Outlined.PushPin, null) }, onClick = { close(); engine.updateNote(n.id, SyncEngine.NotePatch(pinned = !n.pinned)) }) if (actions != null) { - DropdownMenuItem(text = { Text("重命名") }, leadingIcon = { Icon(Icons.Outlined.Edit, null) }, + DropdownMenuItem(text = { Text(s.rename) }, leadingIcon = { Icon(Icons.Outlined.Edit, null) }, onClick = { close(); actions.renameNote(n) }) - DropdownMenuItem(text = { Text("移动到…") }, leadingIcon = { Icon(Icons.Outlined.Folder, null) }, + DropdownMenuItem(text = { Text(s.moveToEllipsis) }, leadingIcon = { Icon(Icons.Outlined.Folder, null) }, onClick = { close(); actions.moveNote(n) }) } - DropdownMenuItem(text = { Text("复制笔记") }, leadingIcon = { Icon(Icons.Outlined.ContentCopy, null) }, + DropdownMenuItem(text = { Text(s.duplicateNote) }, leadingIcon = { Icon(Icons.Outlined.ContentCopy, null) }, onClick = { close(); engine.duplicateNote(n.id)?.let { ui.reveal(it.id) } }) - DropdownMenuItem(text = { Text("移到回收站", color = c.danger) }, leadingIcon = { Icon(Icons.Outlined.Delete, null, tint = c.danger) }, + DropdownMenuItem(text = { Text(s.moveToTrash, color = c.danger) }, leadingIcon = { Icon(Icons.Outlined.Delete, null, tint = c.danger) }, onClick = { close(); clearIfSelected(); engine.updateNote(n.id, SyncEngine.NotePatch(trashed = true)) }) } } @@ -517,13 +528,14 @@ fun MoveDialog(engine: SyncEngine, note: Note, onDismiss: () -> Unit) { val c = Ivy.colors val revision by engine.revision.collectAsState() val folders = remember(revision) { Shelf.flatFolders(engine.folders.values) } + val s = LocalStrings.current androidx.compose.material3.AlertDialog( onDismissRequest = onDismiss, - title = { Text("移动到") }, + title = { Text(s.moveTo) }, text = { LazyColumn(Modifier.heightIn(max = 420.dp)) { item { - FolderOption("无笔记本", 0, note.folderId.isEmpty() || engine.folders[note.folderId] == null) { + FolderOption(s.noNotebook, 0, note.folderId.isEmpty() || engine.folders[note.folderId] == null) { engine.updateNote(note.id, SyncEngine.NotePatch(folderId = "")); onDismiss() } } @@ -534,7 +546,7 @@ fun MoveDialog(engine: SyncEngine, note: Note, onDismiss: () -> Unit) { } } }, - confirmButton = { androidx.compose.material3.TextButton(onClick = onDismiss) { Text("取消", color = c.ink2) } }, + confirmButton = { androidx.compose.material3.TextButton(onClick = onDismiss) { Text(s.cancel, color = c.ink2) } }, ) } @@ -561,7 +573,7 @@ private fun SearchResults(engine: SyncEngine, revision: Long, query: String, onO val hits = remember(revision, query) { Search.run(engine.notes.values, query) } if (hits.isEmpty()) { Column(Modifier.fillMaxSize().padding(32.dp), horizontalAlignment = Alignment.CenterHorizontally, verticalArrangement = Arrangement.spacedBy(8.dp)) { - Text("没有找到「${query.trim()}」", color = c.muted) + Text(LocalStrings.current.noResults(query.trim()), color = c.muted) } return } diff --git a/app/src/main/kotlin/app/ivynote/android/ui/SignIn.kt b/app/src/main/kotlin/app/ivynote/android/ui/SignIn.kt index b86f305..655bc5c 100644 --- a/app/src/main/kotlin/app/ivynote/android/ui/SignIn.kt +++ b/app/src/main/kotlin/app/ivynote/android/ui/SignIn.kt @@ -70,6 +70,8 @@ import app.ivynote.android.IvyApp import app.ivynote.android.platform.SqliteDocumentStore import app.ivynote.core.ApiClient import app.ivynote.core.ApiError +import app.ivynote.core.L10n +import app.ivynote.core.LanguageSettings import app.ivynote.core.LibraryMigrator import app.ivynote.core.LibraryRef import app.ivynote.core.OfficialRegions @@ -85,7 +87,6 @@ import kotlinx.coroutines.async import kotlinx.coroutines.launch import kotlinx.coroutines.withContext import kotlinx.coroutines.withTimeoutOrNull -import java.util.Locale import java.util.TimeZone private enum class Mode { REGISTER, LOGIN } @@ -102,11 +103,13 @@ private enum class Mode { REGISTER, LOGIN } @Composable fun CloudSignInScreen(promoting: LibraryRef?, onBack: () -> Unit) { val c = Ivy.colors + val s = LocalStrings.current val app = IvyApp.instance val catalog = app.catalog val scope = rememberCoroutineScope() - var server by remember { mutableStateOf(SyncRegion.preferred(Locale.getDefault().country, TimeZone.getDefault().id).server) } + // By the system's region, not the interface language (ours replaces the default locale). + var server by remember { mutableStateOf(SyncRegion.preferred(app.systemLocale.country, TimeZone.getDefault().id).server) } var info by remember { mutableStateOf(null) } var probing by remember { mutableStateOf(false) } var probeError by remember { mutableStateOf(null) } @@ -168,7 +171,7 @@ fun CloudSignInScreen(promoting: LibraryRef?, onBack: () -> Unit) { val libraryName = when { promoting != null -> promoting.name - region != null -> "我的笔记" + region != null -> s.defaultLibraryName else -> info?.siteName?.trim()?.takeIf { it.isNotEmpty() && it.lowercase() != "ivynote" } ?: server.host } @@ -188,17 +191,17 @@ fun CloudSignInScreen(promoting: LibraryRef?, onBack: () -> Unit) { catalog.markMigrated(local.id, ref.id) if (result.rejected.isNotEmpty()) { // Opened anyway; the local library keeps everything. - android.widget.Toast.makeText(app, "${result.rejected.size} 项未能迁移,原内容仍保留在本地笔记库中。", android.widget.Toast.LENGTH_LONG).show() + android.widget.Toast.makeText(app, L10n.s.migrationRejected(result.rejected.size), android.widget.Toast.LENGTH_LONG).show() } if (result.failedFiles.isNotEmpty()) { - android.widget.Toast.makeText(app, "${result.failedFiles.size} 个文件未能上传,原文件仍保留在本地笔记库中。", android.widget.Toast.LENGTH_LONG).show() + android.widget.Toast.makeText(app, L10n.s.migrationFilesFailed(result.failedFiles.size), android.widget.Toast.LENGTH_LONG).show() } } catch (e: CancellationException) { throw e } catch (e: LibraryMigrator.AccountNotEmpty) { migrationError = e.message } catch (e: Exception) { - migrationError = "迁移中断:${e.message}。账户已经创建,点「继续迁移」会从中断处继续,已上传的内容不会重复。" + migrationError = L10n.s.migrationInterrupted(e.message ?: e.javaClass.simpleName) } finally { migrating = false } @@ -225,6 +228,8 @@ fun CloudSignInScreen(promoting: LibraryRef?, onBack: () -> Unit) { api.login(identity.trim(), password) } password = "" + // A new account starts with the language in use now. + if (registering) app.language.registered(LanguageSettings.accountKey(target, user.id)) if (promoting != null) { newAccount = Triple(target, token, user) migrate(promoting) @@ -234,7 +239,7 @@ fun CloudSignInScreen(promoting: LibraryRef?, onBack: () -> Unit) { } catch (e: CancellationException) { throw e } catch (e: ApiError) { - error = if (e.status == 401 && !registering) "用户名或密码错误" else e.message + error = if (e.status == 401 && !registering) L10n.s.wrongCredentials else e.message } catch (e: Exception) { error = e.message } finally { @@ -245,13 +250,13 @@ fun CloudSignInScreen(promoting: LibraryRef?, onBack: () -> Unit) { Column(Modifier.fillMaxSize().background(c.canvas).systemBarsPadding().imePadding()) { Row(Modifier.fillMaxWidth().height(56.dp).padding(horizontal = 4.dp), verticalAlignment = Alignment.CenterVertically) { - IconButton(onClick = onBack) { Icon(Icons.AutoMirrored.Filled.ArrowBack, contentDescription = "返回", tint = c.ink2) } - Text(if (promoting == null) "登录常青笔记" else "开启多端同步", style = SerifTitle, fontSize = 18.sp, color = c.ink) + IconButton(onClick = onBack) { Icon(Icons.AutoMirrored.Filled.ArrowBack, contentDescription = s.back, tint = c.ink2) } + Text(if (promoting == null) s.signInTitle else s.turnOnSyncTitle, style = SerifTitle, fontSize = 18.sp, color = c.ink) } Box(Modifier.fillMaxSize().verticalScroll(rememberScrollState()), contentAlignment = Alignment.TopCenter) { Column(Modifier.widthIn(max = 440.dp).fillMaxWidth().padding(horizontal = 20.dp, vertical = 12.dp), verticalArrangement = Arrangement.spacedBy(14.dp)) { if (migrating || migrationError != null) { - Caption("开启多端同步") + Caption(s.turnOnSyncTitle) FormCard { if (migrating) { Row(verticalAlignment = Alignment.CenterVertically) { @@ -263,20 +268,20 @@ fun CloudSignInScreen(promoting: LibraryRef?, onBack: () -> Unit) { LinearProgressIndicator(progress = { progressShare(progress) }, modifier = Modifier.fillMaxWidth(), color = c.ivy, trackColor = c.sunken) } else { Text(migrationError ?: "", color = c.danger) - TextButton(onClick = { promoting?.let { p -> scope.launch { migrate(p) } } }) { Text("继续迁移", color = c.ivy) } + TextButton(onClick = { promoting?.let { p -> scope.launch { migrate(p) } } }) { Text(s.continueMigration, color = c.ivy) } } } return@Column } // The sync node - Caption("同步节点") + Caption(s.syncNode) Box { FormCard(Modifier.clickable { serverMenu = true }) { Row(verticalAlignment = Alignment.CenterVertically) { Icon(if (region == null) Icons.Outlined.Dns else Icons.Outlined.Public, null, tint = c.ivy) Spacer(Modifier.width(10.dp)) - Text(region?.let { "常青笔记 · ${it.title}" } ?: server.host, color = c.ink, maxLines = 1, overflow = TextOverflow.Ellipsis, modifier = Modifier.weight(1f)) + Text(region?.let { s.officialRegion(it.title) } ?: server.host, color = c.ink, maxLines = 1, overflow = TextOverflow.Ellipsis, modifier = Modifier.weight(1f)) when { probing -> CircularProgressIndicator(Modifier.size(16.dp), strokeWidth = 2.dp, color = c.muted) info != null -> Icon(Icons.Outlined.CheckCircle, null, tint = c.ok, modifier = Modifier.size(18.dp)) @@ -289,31 +294,31 @@ fun CloudSignInScreen(promoting: LibraryRef?, onBack: () -> Unit) { DropdownMenu(expanded = serverMenu, onDismissRequest = { serverMenu = false }) { for (r in SyncRegion.entries) { DropdownMenuItem( - text = { Text("常青笔记 · ${r.title}") }, + text = { Text(s.officialRegion(r.title)) }, leadingIcon = { if (region == r) Icon(Icons.Outlined.Check, null, tint = c.ivy) else Spacer(Modifier.size(24.dp)) }, onClick = { serverMenu = false; server = r.server }, ) } HorizontalDivider() - DropdownMenuItem(text = { Text("自定义服务器…") }, leadingIcon = { Icon(Icons.Outlined.Dns, null) }, + DropdownMenuItem(text = { Text(s.customServerEllipsis) }, leadingIcon = { Icon(Icons.Outlined.Dns, null) }, onClick = { serverMenu = false; custom = true }) } } when { probeError != null -> Row(verticalAlignment = Alignment.CenterVertically) { - Text(if (region != null) "暂时无法连接这个节点" else probeError ?: "", color = c.danger, fontSize = 13.sp, modifier = Modifier.weight(1f)) - TextButton(onClick = { probeRun++ }) { Text("重试", color = c.ivy) } + Text(if (region != null) s.nodeUnreachable else probeError ?: "", color = c.danger, fontSize = 13.sp, modifier = Modifier.weight(1f)) + TextButton(onClick = { probeRun++ }) { Text(s.retry, color = c.ivy) } } - promoting == null -> Caption("笔记先保存在本机,联网时自动同步到你的所有设备。") - else -> Caption("注册一个新账户,「${promoting.name}」会上传到云端,之后在所有设备上同步。") + promoting == null -> Caption(s.signInHint) + else -> Caption(s.promoteHint(promoting.name)) } if (promoting == null && canRegister) { SingleChoiceSegmentedButtonRow(Modifier.fillMaxWidth()) { SegmentedButton(selected = mode == Mode.REGISTER, onClick = { mode = Mode.REGISTER; error = null }, - shape = SegmentedButtonDefaults.itemShape(0, 2)) { Text("注册") } + shape = SegmentedButtonDefaults.itemShape(0, 2)) { Text(s.register) } SegmentedButton(selected = mode == Mode.LOGIN, onClick = { mode = Mode.LOGIN; error = null }, - shape = SegmentedButtonDefaults.itemShape(1, 2)) { Text("登录") } + shape = SegmentedButtonDefaults.itemShape(1, 2)) { Text(s.login) } } } @@ -328,19 +333,19 @@ fun CloudSignInScreen(promoting: LibraryRef?, onBack: () -> Unit) { ) when { error != null -> Text(error ?: "", color = c.danger, fontSize = 13.sp) - info?.hasUsers == false && region == null -> Caption("这台服务器还没有账户。你创建的第一个账户将成为管理员。") - promoting != null && info?.canRegister == false -> Text("这台服务器没有开放注册。", color = c.danger, fontSize = 13.sp) + info?.hasUsers == false && region == null -> Caption(s.firstAdmin) + promoting != null && info?.canRegister == false -> Text(s.registrationClosed, color = c.danger, fontSize = 13.sp) } val canSubmit = if (registering) canRegister && username.isNotEmpty() && password.isNotEmpty() else identity.isNotEmpty() && password.isNotEmpty() InkButton( - text = if (promoting != null) "注册并开启同步" else if (mode == Mode.LOGIN) "登录" else "注册", + text = if (promoting != null) s.registerAndSync else if (mode == Mode.LOGIN) s.login else s.register, onClick = ::submit, enabled = canSubmit && !probing && info != null, busy = busy, modifier = Modifier.fillMaxWidth().height(44.dp), ) if (promoting != null) { - Caption("本地笔记库只能迁移到新注册的账户。已有账户的话,可以先登录,再在网页版或桌面端的「设置 → 导入」中导入本笔记库导出的内容。") + Caption(s.promoteNote) } } } @@ -357,10 +362,10 @@ fun CloudSignInScreen(promoting: LibraryRef?, onBack: () -> Unit) { } private fun progressText(p: LibraryMigrator.Progress?): String = when (p?.phase) { - null, LibraryMigrator.Progress.Phase.CHECK -> "正在准备…" - LibraryMigrator.Progress.Phase.FILES -> "正在上传文件 ${p.done}/${p.total}" - LibraryMigrator.Progress.Phase.NOTES -> "正在上传笔记 ${p.done}/${p.total}" - LibraryMigrator.Progress.Phase.DONE -> "迁移完成,正在打开…" + null, LibraryMigrator.Progress.Phase.CHECK -> L10n.s.preparing + LibraryMigrator.Progress.Phase.FILES -> L10n.s.uploadingFiles(p.done, p.total) + LibraryMigrator.Progress.Phase.NOTES -> L10n.s.uploadingNotes(p.done, p.total) + LibraryMigrator.Progress.Phase.DONE -> L10n.s.migrationDone } private fun progressShare(p: LibraryMigrator.Progress?): Float = when (p?.phase) { @@ -385,6 +390,7 @@ private fun CustomServerDialog(onDismiss: () -> Unit, onPick: (ServerAddress, Se var checking by remember { mutableStateOf(false) } var error by remember { mutableStateOf(null) } val parsed = ServerAddress.parseOrNull(address) + val s = LocalStrings.current fun connect() { if (checking) return @@ -411,7 +417,7 @@ private fun CustomServerDialog(onDismiss: () -> Unit, onPick: (ServerAddress, Se AlertDialog( onDismissRequest = onDismiss, - title = { Text("自定义服务器") }, + title = { Text(s.customServer) }, text = { Column(verticalArrangement = Arrangement.spacedBy(8.dp)) { OutlinedTextField( @@ -425,17 +431,17 @@ private fun CustomServerDialog(onDismiss: () -> Unit, onPick: (ServerAddress, Se ) when { error != null -> Text(error ?: "", color = c.danger, fontSize = 13.sp) - parsed?.isInsecure == true -> Text("使用 http 连接时,密码和笔记以明文传输,请只在可信的局域网内使用。", color = c.warn, fontSize = 13.sp) - else -> Text("连接你自己或团队部署的常青笔记服务器。", color = c.muted, fontSize = 13.sp) + parsed?.isInsecure == true -> Text(s.insecureWarning, color = c.warn, fontSize = 13.sp) + else -> Text(s.customServerHint, color = c.muted, fontSize = 13.sp) } } }, confirmButton = { TextButton(onClick = ::connect, enabled = address.isNotBlank() && !checking) { - if (checking) CircularProgressIndicator(Modifier.size(16.dp), strokeWidth = 2.dp) else Text("使用这个服务器") + if (checking) CircularProgressIndicator(Modifier.size(16.dp), strokeWidth = 2.dp) else Text(s.useServer) } }, - dismissButton = { TextButton(onClick = onDismiss) { Text("取消") } }, + dismissButton = { TextButton(onClick = onDismiss) { Text(s.cancel) } }, ) } @@ -443,6 +449,7 @@ private fun CustomServerDialog(onDismiss: () -> Unit, onPick: (ServerAddress, Se @Composable fun SignInScreen(ref: LibraryRef, session: SessionStore) { val c = Ivy.colors + val s = LocalStrings.current val catalog = IvyApp.instance.catalog val notice by session.notice.collectAsState() val scope = rememberCoroutineScope() @@ -486,12 +493,13 @@ fun SignInScreen(ref: LibraryRef, session: SessionStore) { val api = session.client(server) val (token, user) = if (mode == Mode.LOGIN) api.login(identity.trim(), password) else api.register(username.trim(), password, email.trim(), displayName.trim()) + if (mode == Mode.REGISTER) IvyApp.instance.language.registered(LanguageSettings.accountKey(server, user.id)) session.signIn(server, token, user) password = "" } catch (e: CancellationException) { throw e } catch (e: ApiError) { - error = if (e.status == 401 && mode == Mode.LOGIN) "用户名或密码错误" else e.message + error = if (e.status == 401 && mode == Mode.LOGIN) L10n.s.wrongCredentials else e.message } catch (e: Exception) { error = e.message } finally { @@ -502,7 +510,7 @@ fun SignInScreen(ref: LibraryRef, session: SessionStore) { Column(Modifier.fillMaxSize().background(c.canvas).systemBarsPadding().imePadding()) { Row(Modifier.fillMaxWidth().height(56.dp).padding(horizontal = 4.dp), verticalAlignment = Alignment.CenterVertically) { - IconButton(onClick = { catalog.open(null) }) { Icon(Icons.Outlined.Book, contentDescription = "笔记库", tint = c.ink2) } + IconButton(onClick = { catalog.open(null) }) { Icon(Icons.Outlined.Book, contentDescription = s.libraries, tint = c.ink2) } Text(ref.name, style = SerifTitle, fontSize = 18.sp, color = c.ink, maxLines = 1, overflow = TextOverflow.Ellipsis) } Box(Modifier.fillMaxSize().verticalScroll(rememberScrollState()), contentAlignment = Alignment.TopCenter) { @@ -512,8 +520,8 @@ fun SignInScreen(ref: LibraryRef, session: SessionStore) { horizontalAlignment = Alignment.CenterHorizontally, ) { IvyLeaf(68.dp) - Text(info?.siteName?.takeIf { it.isNotBlank() } ?: "常青笔记", style = SerifTitle, fontSize = 26.sp, color = c.ink) - Text("本地优先的 Markdown 笔记", color = c.muted, fontSize = 14.sp) + Text(info?.siteName?.takeIf { it.isNotBlank() } ?: s.appName, style = SerifTitle, fontSize = 26.sp, color = c.ink) + Text(s.slogan, color = c.muted, fontSize = 14.sp) notice?.takeIf { mode == Mode.LOGIN }?.let { Surface(color = c.warnSoft, shape = RoundedCornerShape(12.dp), modifier = Modifier.fillMaxWidth()) { Text(it, color = c.warnInk, fontSize = 14.sp, modifier = Modifier.padding(12.dp)) @@ -522,9 +530,9 @@ fun SignInScreen(ref: LibraryRef, session: SessionStore) { val current = info if (current == null) { if (probeError != null) { - Text("无法连接服务器", fontWeight = FontWeight.SemiBold, color = c.ink) + Text(s.cannotConnect, fontWeight = FontWeight.SemiBold, color = c.ink) Text(probeError ?: "", color = c.muted, fontSize = 13.sp, textAlign = TextAlign.Center) - InkButton("重试", onClick = { probeRun++ }) + InkButton(s.retry, onClick = { probeRun++ }) } else { CircularProgressIndicator(color = c.muted) } @@ -533,9 +541,9 @@ fun SignInScreen(ref: LibraryRef, session: SessionStore) { if (current.canRegister && current.hasUsers) { SingleChoiceSegmentedButtonRow(Modifier.fillMaxWidth()) { SegmentedButton(selected = mode == Mode.LOGIN, onClick = { mode = Mode.LOGIN; error = null }, - shape = SegmentedButtonDefaults.itemShape(0, 2)) { Text("登录") } + shape = SegmentedButtonDefaults.itemShape(0, 2)) { Text(s.login) } SegmentedButton(selected = mode == Mode.REGISTER, onClick = { mode = Mode.REGISTER; error = null }, - shape = SegmentedButtonDefaults.itemShape(1, 2)) { Text("注册") } + shape = SegmentedButtonDefaults.itemShape(1, 2)) { Text(s.register) } } } AccountFields( @@ -549,11 +557,11 @@ fun SignInScreen(ref: LibraryRef, session: SessionStore) { ) when { error != null -> Text(error ?: "", color = c.danger, fontSize = 13.sp) - !current.hasUsers -> Caption("这台服务器还没有账户。你创建的第一个账户将成为管理员。") - server.isInsecure -> Text("使用 http 连接,密码和笔记以明文传输。", color = c.warn, fontSize = 13.sp) + !current.hasUsers -> Caption(s.firstAdmin) + server.isInsecure -> Text(s.httpWarning, color = c.warn, fontSize = 13.sp) } val canSubmit = if (mode == Mode.LOGIN) identity.isNotEmpty() && password.isNotEmpty() else username.isNotEmpty() && password.isNotEmpty() - InkButton(if (mode == Mode.LOGIN) "登录" else "创建账户", onClick = ::submit, enabled = canSubmit, busy = busy, + InkButton(if (mode == Mode.LOGIN) s.login else s.createAccount, onClick = ::submit, enabled = canSubmit, busy = busy, modifier = Modifier.fillMaxWidth().height(44.dp)) Text(server.toString(), color = c.faint, fontSize = 12.sp) } @@ -571,24 +579,25 @@ private fun AccountFields( password: String, onPassword: (String) -> Unit, onSubmit: () -> Unit, ) { + val s = LocalStrings.current val plain = KeyboardOptions(autoCorrectEnabled = false, keyboardType = KeyboardType.Ascii, imeAction = ImeAction.Next) Column(verticalArrangement = Arrangement.spacedBy(10.dp)) { if (login) { - OutlinedTextField(identity, onIdentity, label = { Text("用户名或邮箱") }, singleLine = true, keyboardOptions = plain, + OutlinedTextField(identity, onIdentity, label = { Text(s.usernameOrEmail) }, singleLine = true, keyboardOptions = plain, modifier = Modifier.fillMaxWidth()) } else { - OutlinedTextField(username, onUsername, label = { Text("用户名") }, singleLine = true, keyboardOptions = plain, + OutlinedTextField(username, onUsername, label = { Text(s.username) }, singleLine = true, keyboardOptions = plain, modifier = Modifier.fillMaxWidth()) - OutlinedTextField(email, onEmail, label = { Text("邮箱(可选)") }, singleLine = true, + OutlinedTextField(email, onEmail, label = { Text(s.emailOptional) }, singleLine = true, keyboardOptions = plain.copy(keyboardType = KeyboardType.Email), modifier = Modifier.fillMaxWidth()) if (displayName != null) { - OutlinedTextField(displayName, onDisplayName, label = { Text("显示名(可选)") }, singleLine = true, + OutlinedTextField(displayName, onDisplayName, label = { Text(s.displayNameOptional) }, singleLine = true, keyboardOptions = KeyboardOptions(imeAction = ImeAction.Next), modifier = Modifier.fillMaxWidth()) } } OutlinedTextField( password, onPassword, - label = { Text(if (login) "密码" else "密码(至少 8 位)") }, + label = { Text(if (login) s.password else s.passwordMin8) }, singleLine = true, visualTransformation = PasswordVisualTransformation(), keyboardOptions = KeyboardOptions(keyboardType = KeyboardType.Password, imeAction = ImeAction.Done, autoCorrectEnabled = false), diff --git a/app/src/main/kotlin/app/ivynote/android/ui/Tags.kt b/app/src/main/kotlin/app/ivynote/android/ui/Tags.kt index 4bdfc6e..e6ffe74 100644 --- a/app/src/main/kotlin/app/ivynote/android/ui/Tags.kt +++ b/app/src/main/kotlin/app/ivynote/android/ui/Tags.kt @@ -64,10 +64,6 @@ import app.ivynote.core.Tag /** The six tag colors of the web client (`--tag-*-fg`), "" for none. */ val TAG_COLORS = listOf("", "green", "blue", "amber", "pink", "purple", "gray") -private val TAG_NAMES = mapOf( - "" to "无", "green" to "绿", "blue" to "蓝", "amber" to "琥珀", "pink" to "粉", "purple" to "紫", "gray" to "灰", -) - @Composable fun tagColor(color: String): Color { val dark = Ivy.colors.dark @@ -114,7 +110,7 @@ fun NoteTagsRow(note: Note, engine: SyncEngine, editable: Boolean, onEdit: () -> ) { Icon(Icons.Outlined.Add, null, tint = c.faint, modifier = Modifier.size(14.dp)) Spacer(Modifier.width(2.dp)) - Text("标签", fontSize = 12.5.sp, color = c.faint) + Text(LocalStrings.current.tags, fontSize = 12.5.sp, color = c.faint) } } } @@ -138,6 +134,7 @@ fun TagPickerSheet(engine: SyncEngine, noteId: String, onDismiss: () -> Unit) { val shown = if (key.isEmpty()) all else all.filter { Links.normalizeTitle(it.name).contains(key) } val exact = engine.tagNamed(clean) val full = note.tags.size >= SyncEngine.MAX_NOTE_TAGS + val s = LocalStrings.current fun submit() { if (clean.isEmpty()) return @@ -148,7 +145,7 @@ fun TagPickerSheet(engine: SyncEngine, noteId: String, onDismiss: () -> Unit) { ModalBottomSheet(onDismissRequest = onDismiss, sheetState = rememberModalBottomSheetState(skipPartiallyExpanded = true), containerColor = c.surface) { Row(Modifier.padding(horizontal = 24.dp, vertical = 4.dp), verticalAlignment = Alignment.CenterVertically) { - Text("标签", fontWeight = FontWeight.SemiBold, fontSize = 16.sp, color = c.ink, modifier = Modifier.weight(1f)) + Text(s.tags, fontWeight = FontWeight.SemiBold, fontSize = 16.sp, color = c.ink, modifier = Modifier.weight(1f)) Text("${note.tags.size}/${SyncEngine.MAX_NOTE_TAGS}", fontSize = 13.sp, color = c.faint) } Row( @@ -159,7 +156,7 @@ fun TagPickerSheet(engine: SyncEngine, noteId: String, onDismiss: () -> Unit) { Icon(Icons.Outlined.Search, null, tint = c.faint, modifier = Modifier.size(18.dp)) Spacer(Modifier.width(8.dp)) Box(Modifier.weight(1f)) { - if (query.isEmpty()) Text("搜索或创建标签", color = c.faint, fontSize = 15.sp) + if (query.isEmpty()) Text(s.searchOrCreateTag, color = c.faint, fontSize = 15.sp) BasicTextField( value = query, onValueChange = { query = it.take(60) }, @@ -172,18 +169,18 @@ fun TagPickerSheet(engine: SyncEngine, noteId: String, onDismiss: () -> Unit) { ) } if (query.isNotEmpty()) { - Icon(Icons.Outlined.Close, contentDescription = "清除", tint = c.faint, + Icon(Icons.Outlined.Close, contentDescription = s.clear, tint = c.faint, modifier = Modifier.size(18.dp).clip(CircleShape).clickable { query = "" }) } } - if (full) Text("一篇笔记最多 ${SyncEngine.MAX_NOTE_TAGS} 个标签", color = c.warn, fontSize = 12.5.sp, modifier = Modifier.padding(horizontal = 24.dp)) + if (full) Text(s.maxTags(SyncEngine.MAX_NOTE_TAGS), color = c.warn, fontSize = 12.5.sp, modifier = Modifier.padding(horizontal = 24.dp)) LazyColumn(Modifier.fillMaxWidth().heightIn(max = 420.dp), contentPadding = androidx.compose.foundation.layout.PaddingValues(bottom = 24.dp)) { if (clean.isNotEmpty() && exact == null) { item(key = "create") { PickerRow(enabled = !full, onClick = { submit() }) { Icon(Icons.Outlined.Add, null, tint = c.ivy, modifier = Modifier.size(20.dp)) Spacer(Modifier.width(12.dp)) - Text("创建「$clean」", color = c.ivy, fontSize = 15.sp, modifier = Modifier.weight(1f)) + Text(s.createTag(clean), color = c.ivy, fontSize = 15.sp, modifier = Modifier.weight(1f)) } } } @@ -197,11 +194,11 @@ fun TagPickerSheet(engine: SyncEngine, noteId: String, onDismiss: () -> Unit) { Box(Modifier.size(10.dp).clip(CircleShape).background(tagColor(t.color))) Spacer(Modifier.width(8.dp)) Text(t.name, color = c.ink, fontSize = 15.sp, maxLines = 1, overflow = TextOverflow.Ellipsis, modifier = Modifier.weight(1f)) - IconButton(onClick = { editing = t }) { Icon(Icons.Outlined.Edit, contentDescription = "编辑标签", tint = c.faint, modifier = Modifier.size(18.dp)) } + IconButton(onClick = { editing = t }) { Icon(Icons.Outlined.Edit, contentDescription = s.editTag, tint = c.faint, modifier = Modifier.size(18.dp)) } } } if (all.isEmpty() && clean.isEmpty()) { - item { Text("还没有标签。输入名称即可创建。", color = c.muted, fontSize = 14.sp, modifier = Modifier.padding(24.dp)) } + item { Text(s.noTags, color = c.muted, fontSize = 14.sp, modifier = Modifier.padding(24.dp)) } } } } @@ -227,46 +224,47 @@ fun TagEditDialog(engine: SyncEngine, tag: Tag, onDismiss: () -> Unit) { var confirmDelete by remember { mutableStateOf(false) } val clean = SyncEngine.cleanTagName(name) val clash = engine.tagNamed(clean)?.takeIf { it.id != tag.id } + val s = LocalStrings.current AlertDialog( onDismissRequest = onDismiss, - title = { Text("编辑标签") }, + title = { Text(s.editTag) }, text = { Column(verticalArrangement = Arrangement.spacedBy(14.dp)) { OutlinedTextField( value = name, onValueChange = { name = it.take(60) }, singleLine = true, - label = { Text("名称") }, prefix = { Text("#") }, + label = { Text(s.name) }, prefix = { Text("#") }, isError = clash != null, - supportingText = if (clash != null) ({ Text("已有同名标签") }) else null, + supportingText = if (clash != null) ({ Text(s.tagExists) }) else null, modifier = Modifier.fillMaxWidth(), ) - Text("颜色", fontSize = 13.sp, color = c.muted) + Text(s.color, fontSize = 13.sp, color = c.muted) FlowRow(horizontalArrangement = Arrangement.spacedBy(10.dp), verticalArrangement = Arrangement.spacedBy(10.dp)) { for (k in TAG_COLORS) { val fg = tagColor(k) Box( Modifier.size(34.dp).clip(CircleShape).background(fg.copy(alpha = if (k.isEmpty()) 0.08f else 0.85f)) .border(2.dp, if (k == color) c.ink else Color.Transparent, CircleShape) - .clickable(onClickLabel = TAG_NAMES[k]) { color = k }, + .clickable(onClickLabel = s.tagColor(k)) { color = k }, contentAlignment = Alignment.Center, ) { - if (k == color) Icon(Icons.Outlined.Check, contentDescription = TAG_NAMES[k], tint = if (k.isEmpty()) c.ink else c.surface, modifier = Modifier.size(16.dp)) + if (k == color) Icon(Icons.Outlined.Check, contentDescription = s.tagColor(k), tint = if (k.isEmpty()) c.ink else c.surface, modifier = Modifier.size(16.dp)) } } } HorizontalDivider(color = c.line) - TextButton(onClick = { confirmDelete = true }) { Text("删除标签", color = c.danger) } + TextButton(onClick = { confirmDelete = true }) { Text(s.deleteTag, color = c.danger) } } }, confirmButton = { TextButton(enabled = clean.isNotEmpty() && clash == null, onClick = { engine.updateTag(tag.id, name = clean, color = color) onDismiss() - }) { Text("保存") } + }) { Text(s.save) } }, - dismissButton = { TextButton(onClick = onDismiss) { Text("取消") } }, + dismissButton = { TextButton(onClick = onDismiss) { Text(s.cancel) } }, ) if (confirmDelete) { - ConfirmDialog("删除标签?", "「#${tag.name}」会从所有笔记上移除,笔记本身不受影响。", "删除", onDismiss = { confirmDelete = false }) { + ConfirmDialog(s.deleteTagTitle, s.deleteTagMessage(tag.name), s.delete, onDismiss = { confirmDelete = false }) { engine.deleteTag(tag.id) onDismiss() } diff --git a/core/src/main/kotlin/app/ivynote/core/ApiClient.kt b/core/src/main/kotlin/app/ivynote/core/ApiClient.kt index 80b07ff..367c060 100644 --- a/core/src/main/kotlin/app/ivynote/core/ApiClient.kt +++ b/core/src/main/kotlin/app/ivynote/core/ApiClient.kt @@ -153,6 +153,8 @@ class ApiClient( fun headers(json: Boolean): Map = buildMap { put("Accept", "application/json") put("User-Agent", IvyHttp.userAgent) + // The interface language, so server messages can match it. + put("Accept-Language", L10n.language.tag) token?.let { put("Authorization", "Bearer $it") } if (json) put("Content-Type", "application/json") } diff --git a/core/src/main/kotlin/app/ivynote/core/ApiError.kt b/core/src/main/kotlin/app/ivynote/core/ApiError.kt index 3cac9ad..f564a14 100644 --- a/core/src/main/kotlin/app/ivynote/core/ApiError.kt +++ b/core/src/main/kotlin/app/ivynote/core/ApiError.kt @@ -1,15 +1,21 @@ package app.ivynote.core /** What can go wrong talking to a server (guide 5.1). */ -sealed class ApiError(message: String) : Exception(message) { +sealed class ApiError : Exception() { /** The server answered with an error status and `{"error": "..."}`. */ - class Server(val code: Int, val serverMessage: String) : ApiError(describe(code, serverMessage)) + class Server(val code: Int, val serverMessage: String) : ApiError() { + override val message: String get() = describe(code, serverMessage) + } /** No answer: offline, DNS, TLS, timeout. Work offline, retry later. */ - class Unreachable(val detail: String) : ApiError("无法连接服务器:$detail") + class Unreachable(val detail: String) : ApiError() { + override val message: String get() = L10n.s.unreachable(detail) + } /** The server answered, but not with what an Ivynote server sends. */ - class InvalidResponse : ApiError("这个地址不是常青笔记服务器") + class InvalidResponse : ApiError() { + override val message: String get() = L10n.s.notIvynote + } val status: Int? get() = (this as? Server)?.code @@ -26,9 +32,9 @@ sealed class ApiError(message: String) : Exception(message) { companion object { private fun describe(status: Int, message: String): String = when { - status == 429 -> "尝试次数过多,请 15 分钟后再试" - status >= 500 -> "服务器暂时不可用($status)" - message.isEmpty() -> "请求失败($status)" + status == 429 -> L10n.s.tooManyAttempts + status >= 500 -> L10n.s.serverUnavailable(status) + message.isEmpty() -> L10n.s.requestFailedStatus(status) else -> message } } diff --git a/core/src/main/kotlin/app/ivynote/core/Language.kt b/core/src/main/kotlin/app/ivynote/core/Language.kt new file mode 100644 index 0000000..46cd4ab --- /dev/null +++ b/core/src/main/kotlin/app/ivynote/core/Language.kt @@ -0,0 +1,192 @@ +package app.ivynote.core + +import kotlinx.coroutines.flow.MutableStateFlow +import kotlinx.coroutines.flow.StateFlow +import kotlinx.coroutines.flow.asStateFlow + +/** + * The languages of the interface: Chinese first, English second, as on the + * web (`client/packages/core/src/i18n.ts`). [tag] is the value the web keeps + * in `ivy.lang` and the one the server is expected to store for an account. + */ +enum class Language(val tag: String) { + ZH("zh"), + EN("en"); + + val strings: Strings get() = when (this) { + ZH -> ZhStrings + EN -> EnStrings + } + + companion object { + /** `zh`, `zh-Hans-CN`, `zh_TW`, `en-GB`… to a supported language; null for any other. */ + fun fromTag(tag: String?): Language? { + val primary = tag?.trim()?.lowercase()?.split('-', '_')?.firstOrNull()?.takeIf { it.isNotEmpty() } ?: return null + return entries.firstOrNull { it.tag == primary } + } + + /** + * The first supported language in the system's preference list + * (most preferred first). English when none is, as the world's + * common second language; Chinese users always have a `zh` entry. + */ + fun fromSystem(tags: List): Language = tags.firstNotNullOfOrNull(::fromTag) ?: EN + } +} + +/** A language choice: follow the system, or one language. */ +sealed interface LanguageChoice { + data object System : LanguageChoice + data class Fixed(val language: Language) : LanguageChoice + + /** `system`, `zh`, `en`: how it is stored, and sent to the server. */ + val tag: String get() = when (this) { + System -> SYSTEM_TAG + is Fixed -> language.tag + } + + companion object { + const val SYSTEM_TAG = "system" + + fun fromTag(tag: String?): LanguageChoice? = when { + tag == null -> null + tag == SYSTEM_TAG -> System + else -> Language.fromTag(tag)?.let(::Fixed) + } + + val all: List = listOf(System) + Language.entries.map(::Fixed) + } +} + +/** The strings of the current language, for code without a UI context (errors, shelf labels). */ +object L10n { + @Volatile + var language: Language = Language.ZH + + val s: Strings get() = language.strings +} + +/** + * Which language the interface speaks, in this order: + * + * 1. the signed-in account's choice, when a synced library is open + * (kept by the server, so it follows the user to every device); + * 2. the choice made on this device, remembered across launches; + * 3. the system's language (the first supported one in its list). + * + * Choosing in settings sets this device's choice and, when an account is + * open, the account's. A newly registered account starts with the language + * in use at that moment. + * + * Until the server stores the language (pending in ivynote), the account's + * choice is kept on this device per account; [onAccountChoice] is where it + * will be sent, and [accountOpened] takes the server's value once `/me` + * carries it. + */ +class LanguageSettings( + private val prefs: KeyValueStore, + systemTags: List, +) { + private var systemTags: List = systemTags + + /** The open account: its key and its choice, if any. */ + private var account: String? = null + private var accountChoice: LanguageChoice? = null + + /** Called when the user changes an account's language: send it to the server. */ + var onAccountChoice: ((accountKey: String, choice: LanguageChoice) -> Unit)? = null + + private val _current = MutableStateFlow(resolve()) + /** The language in use. */ + val current: StateFlow = _current.asStateFlow() + + init { + L10n.language = _current.value + } + + /** This device's choice; [LanguageChoice.System] until the user picks one. */ + val deviceChoice: LanguageChoice + get() = LanguageChoice.fromTag(prefs.getString(DEVICE_KEY)) ?: LanguageChoice.System + + /** What the settings page shows as selected. */ + val choice: LanguageChoice + get() = accountChoice ?: deviceChoice + + private val _selected = MutableStateFlow(choice) + /** [choice], observable. */ + val selected: StateFlow = _selected.asStateFlow() + + /** The system's own language, for "follow the system". */ + val systemLanguage: Language get() = Language.fromSystem(systemTags) + + /** Whether an account is open, so a choice is saved to it too. */ + val hasAccount: Boolean get() = account != null + + /** The system language changed (or the app's per-app language in system settings). */ + fun systemChanged(tags: List) { + systemTags = tags + update() + } + + /** The user picked a language in settings. */ + fun choose(choice: LanguageChoice) { + if (choice == LanguageChoice.System) prefs.remove(DEVICE_KEY) else prefs.putString(DEVICE_KEY, choice.tag) + account?.let { key -> + accountChoice = choice + prefs.putString(ACCOUNT_KEY_PREFIX + key, choice.tag) + onAccountChoice?.invoke(key, choice) + } + update() + } + + /** + * A synced library opened with a signed-in account. [serverChoice] is + * the account's language as the server has it, once it does; until then + * the choice kept on this device for this account applies, if any. + */ + fun accountOpened(accountKey: String, serverChoice: LanguageChoice? = null) { + account = accountKey + if (serverChoice != null) prefs.putString(ACCOUNT_KEY_PREFIX + accountKey, serverChoice.tag) + accountChoice = serverChoice ?: LanguageChoice.fromTag(prefs.getString(ACCOUNT_KEY_PREFIX + accountKey)) + update() + } + + /** The account's library closed (switched, signed out): back to this device's choice. */ + fun accountClosed(accountKey: String) { + if (account != accountKey) return + account = null + accountChoice = null + update() + } + + /** + * A new account was registered: it starts with the language in use now, + * as a fixed choice. Returns it, for the registration request. + */ + fun registered(accountKey: String): Language { + val language = _current.value + prefs.putString(ACCOUNT_KEY_PREFIX + accountKey, language.tag) + if (account == accountKey) accountChoice = LanguageChoice.Fixed(language) + return language + } + + private fun resolve(): Language = when (val c = accountChoice ?: deviceChoice) { + LanguageChoice.System -> Language.fromSystem(systemTags) + is LanguageChoice.Fixed -> c.language + } + + private fun update() { + val language = resolve() + L10n.language = language + _selected.value = choice + _current.value = language + } + + companion object { + const val DEVICE_KEY = "ivy.language" + const val ACCOUNT_KEY_PREFIX = "ivy.language.account." + + /** An account across devices: its server and user id. */ + fun accountKey(server: ServerAddress, userId: String): String = "${server.base}|$userId" + } +} diff --git a/core/src/main/kotlin/app/ivynote/core/LibraryCatalog.kt b/core/src/main/kotlin/app/ivynote/core/LibraryCatalog.kt index b2e1184..64f043f 100644 --- a/core/src/main/kotlin/app/ivynote/core/LibraryCatalog.kt +++ b/core/src/main/kotlin/app/ivynote/core/LibraryCatalog.kt @@ -82,7 +82,7 @@ class LibraryCatalog( // Changes fun createLocal(name: String): LibraryRef = - add(LibraryRef(id = newId(), kind = LibraryRef.Kind.LOCAL, name = clean(name, "我的笔记"), createdAt = now(), openedAt = now())) + add(LibraryRef(id = newId(), kind = LibraryRef.Kind.LOCAL, name = clean(name, L10n.s.defaultLibraryName), createdAt = now(), openedAt = now())) fun createServer(server: ServerAddress, name: String): LibraryRef = add(LibraryRef(id = newId(), kind = LibraryRef.Kind.SERVER, name = clean(name, server.host), server = server, createdAt = now(), openedAt = now())) diff --git a/core/src/main/kotlin/app/ivynote/core/LibraryMigrator.kt b/core/src/main/kotlin/app/ivynote/core/LibraryMigrator.kt index 6b4e63a..daff870 100644 --- a/core/src/main/kotlin/app/ivynote/core/LibraryMigrator.kt +++ b/core/src/main/kotlin/app/ivynote/core/LibraryMigrator.kt @@ -54,7 +54,9 @@ class LibraryMigrator( val failedFiles: List = emptyList(), ) - class AccountNotEmpty : Exception("这个账户里已经有笔记。本地笔记库只能迁移到新注册的空账户。") + class AccountNotEmpty : Exception() { + override val message: String get() = L10n.s.accountNotEmpty + } suspend fun run(content: Content, progress: suspend (Progress) -> Unit = {}): Result { val folders = parentsFirst(content.folders.filter { !it.deleted }) diff --git a/core/src/main/kotlin/app/ivynote/core/Links.kt b/core/src/main/kotlin/app/ivynote/core/Links.kt index 08c15ba..18931cb 100644 --- a/core/src/main/kotlin/app/ivynote/core/Links.kt +++ b/core/src/main/kotlin/app/ivynote/core/Links.kt @@ -96,7 +96,7 @@ object Links { * plain files, an embed for images, video and audio. Brackets leave the name. */ fun embed(id: String, name: String, kind: String): String { - val label = name.replace("[", "").replace("]", "").replace("\n", " ").trim().ifEmpty { "附件" } + val label = name.replace("[", "").replace("]", "").replace("\n", " ").trim().ifEmpty { L10n.s.attachment } return if (kind == "file") "[$label](ivy://res/$id)" else "![$label](ivy://res/$id)" } } diff --git a/core/src/main/kotlin/app/ivynote/core/MediaLibrary.kt b/core/src/main/kotlin/app/ivynote/core/MediaLibrary.kt index 36a5369..9ba15a6 100644 --- a/core/src/main/kotlin/app/ivynote/core/MediaLibrary.kt +++ b/core/src/main/kotlin/app/ivynote/core/MediaLibrary.kt @@ -8,9 +8,20 @@ package app.ivynote.core */ class MediaLibrary(private val engine: SyncEngine, private val api: ApiClient?) { - enum class Filter(val label: String, val kind: String = "") { - ALL("全部"), IMAGE("图片", "image"), VIDEO("视频", "video"), AUDIO("音频", "audio"), - FILE("文件", "file"), ORPHANED("未引用"), TRASH("回收站"), + enum class Filter(val kind: String = "") { + ALL, IMAGE("image"), VIDEO("video"), AUDIO("audio"), FILE("file"), ORPHANED, TRASH; + + val label: String get() = with(L10n.s) { + when (this@Filter) { + ALL -> filterAll + IMAGE -> filterImages + VIDEO -> filterVideo + AUDIO -> filterAudio + FILE -> filterFiles + ORPHANED -> unreferenced + TRASH -> trash + } + } } data class Listing( @@ -77,7 +88,7 @@ class MediaLibrary(private val engine: SyncEngine, private val api: ApiClient?) if (!e.isTransient) throw e } } - val a = engine.attachments[id] ?: throw ApiError.Server(404, "文件不存在") + val a = engine.attachments[id] ?: throw ApiError.Server(404, L10n.s.fileNotFound) val ids = engine.attachmentRefs()[id].orEmpty() val notes = ids.mapNotNull { engine.notes[it] }.map { NoteRef(it.id, it.title, it.folderId) } return AttachmentDetail(a.copy(refs = notes.size), notes) @@ -85,7 +96,7 @@ class MediaLibrary(private val engine: SyncEngine, private val api: ApiClient?) suspend fun rename(id: String, name: String): Attachment { val clean = name.trim().replace('\n', ' ') - if (clean.isEmpty()) throw ApiError.Server(400, "名称不能为空") + if (clean.isEmpty()) throw ApiError.Server(400, L10n.s.nameEmpty) return change(id, { it.renameAttachment(id, clean) }) { it.copy(name = clean) } } @@ -103,14 +114,14 @@ class MediaLibrary(private val engine: SyncEngine, private val api: ApiClient?) /** The public address, made on first use (guide 8.3: no longer behind sign-in). */ suspend fun publish(id: String): String { - val api = api ?: throw ApiError.Server(400, "本地笔记库没有公网链接") + val api = api ?: throw ApiError.Server(400, L10n.s.localNoPublicLink) val url = api.publishAttachment(id) engine.attachments[id]?.let { engine.putAttachment(it.copy(public = true)) } return url } suspend fun unpublish(id: String): Attachment { - val api = api ?: throw ApiError.Server(400, "本地笔记库没有公网链接") + val api = api ?: throw ApiError.Server(400, L10n.s.localNoPublicLink) return api.unpublishAttachment(id).also { engine.putAttachment(it) } } @@ -118,7 +129,7 @@ class MediaLibrary(private val engine: SyncEngine, private val api: ApiClient?) val updated = if (api != null) { remote(api) } else { - val a = engine.attachments[id] ?: throw ApiError.Server(404, "文件不存在") + val a = engine.attachments[id] ?: throw ApiError.Server(404, L10n.s.fileNotFound) local(a).copy(updatedAt = nowMillis()) } engine.putAttachment(updated) diff --git a/core/src/main/kotlin/app/ivynote/core/Models.kt b/core/src/main/kotlin/app/ivynote/core/Models.kt index 04748e7..8af4882 100644 --- a/core/src/main/kotlin/app/ivynote/core/Models.kt +++ b/core/src/main/kotlin/app/ivynote/core/Models.kt @@ -45,11 +45,11 @@ object Validation { private val usernamePattern = Regex("[A-Za-z0-9][A-Za-z0-9_.\\-]{1,31}") fun username(s: String): String? = - if (usernamePattern.matches(s)) null else "用户名为 2–32 位字母、数字、_ . -,以字母或数字开头" + if (usernamePattern.matches(s)) null else L10n.s.usernameRule fun password(s: String): String? = when { - s.codePointCount(0, s.length) < 8 -> "密码至少 8 个字符" - s.toByteArray(Charsets.UTF_8).size > 72 -> "密码最多 72 字节" + s.codePointCount(0, s.length) < 8 -> L10n.s.passwordTooShort + s.toByteArray(Charsets.UTF_8).size > 72 -> L10n.s.passwordTooLong else -> null } } diff --git a/core/src/main/kotlin/app/ivynote/core/Remote.kt b/core/src/main/kotlin/app/ivynote/core/Remote.kt index f68a57e..0507c29 100644 --- a/core/src/main/kotlin/app/ivynote/core/Remote.kt +++ b/core/src/main/kotlin/app/ivynote/core/Remote.kt @@ -68,8 +68,8 @@ data class Share( const val MAX_PASSWORD_BYTES = 72 fun passwordError(p: String): String? = when { - p.length < MIN_PASSWORD -> "密码至少 $MIN_PASSWORD 位" - p.toByteArray(Charsets.UTF_8).size > MAX_PASSWORD_BYTES -> "密码最多 $MAX_PASSWORD_BYTES 字节" + p.length < MIN_PASSWORD -> L10n.s.sharePasswordMin(MIN_PASSWORD) + p.toByteArray(Charsets.UTF_8).size > MAX_PASSWORD_BYTES -> L10n.s.sharePasswordMax(MAX_PASSWORD_BYTES) else -> null } @@ -81,6 +81,6 @@ data class Share( } /** The message the web copies with 复制链接和密码. */ - fun message(title: String, link: String, password: String): String = "$title\n链接:$link\n密码:$password" + fun message(title: String, link: String, password: String): String = L10n.s.shareMessage(title, link, password) } } diff --git a/core/src/main/kotlin/app/ivynote/core/ServerAddress.kt b/core/src/main/kotlin/app/ivynote/core/ServerAddress.kt index fe6909c..4b4efbb 100644 --- a/core/src/main/kotlin/app/ivynote/core/ServerAddress.kt +++ b/core/src/main/kotlin/app/ivynote/core/ServerAddress.kt @@ -18,11 +18,19 @@ import okhttp3.HttpUrl.Companion.toHttpUrlOrNull @Serializable(with = ServerAddressSerializer::class) class ServerAddress private constructor(val base: String, val host: String, val scheme: String) { - sealed class ParseError(message: String) : Exception(message) { - data object Empty : ParseError("请填写服务器地址") - data object Invalid : ParseError("服务器地址无效") - data class UnsupportedScheme(val scheme: String) : ParseError("不支持的协议:$scheme") - data class InsecureRemote(val host: String) : ParseError("$host 不是局域网地址,必须使用 https://") + sealed class ParseError : Exception() { + data object Empty : ParseError() + data object Invalid : ParseError() + data class UnsupportedScheme(val scheme: String) : ParseError() + data class InsecureRemote(val host: String) : ParseError() + + override val message: String + get() = when (this) { + Empty -> L10n.s.serverEmpty + Invalid -> L10n.s.serverInvalid + is UnsupportedScheme -> L10n.s.unsupportedScheme(scheme) + is InsecureRemote -> L10n.s.insecureRemote(host) + } } /** `{server}/api/v1`. */ diff --git a/core/src/main/kotlin/app/ivynote/core/SessionStore.kt b/core/src/main/kotlin/app/ivynote/core/SessionStore.kt index c1fee96..fed06fe 100644 --- a/core/src/main/kotlin/app/ivynote/core/SessionStore.kt +++ b/core/src/main/kotlin/app/ivynote/core/SessionStore.kt @@ -101,7 +101,7 @@ class SessionStore( // The token is no longer valid. Local notes and the outbox are kept // (guide 5.1): signing in again resumes syncing them. runCatching { store.clear() } - _notice.value = if (error.status == 403) error.message ?: "账户不可用" else "登录已过期,请重新登录" + _notice.value = if (error.status == 403) error.message ?: L10n.s.accountUnavailable else L10n.s.sessionExpired _offline.value = false _state.value = State.SignedOut } diff --git a/core/src/main/kotlin/app/ivynote/core/Shelf.kt b/core/src/main/kotlin/app/ivynote/core/Shelf.kt index e7e219c..d5cea4c 100644 --- a/core/src/main/kotlin/app/ivynote/core/Shelf.kt +++ b/core/src/main/kotlin/app/ivynote/core/Shelf.kt @@ -15,8 +15,14 @@ object Shelf { /** Notes shown per branch before a "show more" row. */ const val PAGE = 100 - enum class SortBy(val label: String) { - UPDATED("更新时间"), CREATED("创建时间"), TITLE("标题"); + enum class SortBy { + UPDATED, CREATED, TITLE; + + val label: String get() = when (this) { + UPDATED -> L10n.s.sortUpdated + CREATED -> L10n.s.sortCreated + TITLE -> L10n.s.sortTitle + } } enum class Kind { GROUP, HEADING, SECTION, CREATE, FOLDER, TAG, NOTE, MORE } @@ -159,23 +165,23 @@ object Shelf { val pinned = live.filter { it.pinned } if (pinned.isNotEmpty()) { val open = closedKey(PINNED_KEY) !in expanded - rows += Row(key = PINNED_KEY, kind = Kind.SECTION, depth = 0, parent = "", label = "置顶", count = pinned.size, + rows += Row(key = PINNED_KEY, kind = Kind.SECTION, depth = 0, parent = "", label = L10n.s.pinned, count = pinned.size, expandable = true, open = open) if (open) noteRows(pinned, PINNED_KEY, 0) } - rows += Row(key = "h:notes", kind = Kind.HEADING, depth = 0, parent = "", label = "笔记", folderId = "") + rows += Row(key = "h:notes", kind = Kind.HEADING, depth = 0, parent = "", label = L10n.s.notes, folderId = "") if (folders.isNotEmpty()) { folderRows("", 0) } else { - rows += Row(key = "h:create", kind = Kind.CREATE, depth = 0, parent = "", label = "新建笔记本") + rows += Row(key = "h:create", kind = Kind.CREATE, depth = 0, parent = "", label = L10n.s.createFolderRow) } // Notes outside any notebook sit below them, like files at the root of a drive. noteRows(filed[""].orEmpty(), "", 0, folderId = "") if (tags.isNotEmpty()) { val open = TAGS_KEY in expanded - rows += Row(key = TAGS_KEY, kind = Kind.GROUP, depth = 0, parent = "", label = "标签", expandable = true, open = open, gap = true) + rows += Row(key = TAGS_KEY, kind = Kind.GROUP, depth = 0, parent = "", label = L10n.s.tags, expandable = true, open = open, gap = true) if (open) { for (tag in tags.sortedWith { a, b -> compareTitles(a.name, b.name) }) { val key = "t:" + tag.id @@ -187,7 +193,7 @@ object Shelf { } } } - group(TRASH_KEY, "回收站", trashed, trash = true, gap = tags.isEmpty()) + group(TRASH_KEY, L10n.s.trash, trashed, trash = true, gap = tags.isEmpty()) return rows } @@ -239,4 +245,4 @@ object Shelf { } } -fun displayTitle(n: Note): String = n.title.ifBlank { "无标题" } +fun displayTitle(n: Note): String = n.title.ifBlank { L10n.s.untitled } diff --git a/core/src/main/kotlin/app/ivynote/core/Strings.kt b/core/src/main/kotlin/app/ivynote/core/Strings.kt new file mode 100644 index 0000000..dc149d5 --- /dev/null +++ b/core/src/main/kotlin/app/ivynote/core/Strings.kt @@ -0,0 +1,1032 @@ +package app.ivynote.core + +import java.util.Locale + +/** + * Every string the app shows, in each [Language]. One interface, so a string + * missing from a language does not compile. Wording follows the web client's + * dictionary (`client/packages/core/src/i18n.ts`) where both have it. + */ +interface Strings { + /** For dates, numbers and sorting in this language. */ + val locale: Locale + + // Common + val appName: String + val slogan: String + val tagline: String + val name: String + val save: String + val cancel: String + val create: String + val delete: String + val remove: String + val rename: String + val open: String + val retry: String + val done: String + val back: String + val more: String + val clear: String + val ok: String + val copied: String + val restore: String + val deleteForever: String + val untitled: String + val unnamed: String + val note: String + val notes: String + val tags: String + val trash: String + val pinned: String + val needsNetwork: String + val requestFailed: String + val cannotReadFile: String + + // Language + val language: String + val followSystem: String + fun followSystemWith(language: String): String + val languageAccountHint: String + val languageDeviceHint: String + + // Dates + val justNow: String + fun yesterday(time: String): String + fun weekday(dayOfWeek: Int): String + fun monthDay(month: Int, day: Int): String + fun yearMonthDay(year: Int, month: Int, day: Int): String + /** For [java.text.SimpleDateFormat]: a moment with the time. */ + val dateTimePattern: String + /** For [java.text.SimpleDateFormat]: a day this year. */ + val monthDayPattern: String + + // Sync status (guide 11.7) + val localUnsynced: String + val downloadingNotes: String + val syncing: String + val offline: String + fun offlinePending(n: Int): String + val syncError: String + fun pending(n: Int): String + fun synced(ago: String): String + val neverSynced: String + fun blocked(n: Int): String + + // Libraries + val libraries: String + val welcome: String + val pickLibrary: String + val connect: String + val connectHint: String + val newLocal: String + val newLocalHint: String + val newLocalMessage: String + val canConvert: String + val startCloud: String + val startCloudHint: String + val localOnly: String + val defaultLibraryName: String + val renameLibrary: String + val removeLibrary: String + fun removeLocalMessage(name: String): String + fun removeServerMessage(name: String): String + val turnOnSync: String + val migratedHint: String + val cannotOpenData: String + val backToLibraries: String + + // Account + val account: String + val username: String + val email: String + val role: String + val admin: String + val user: String + fun syncSection(library: String): String + val server: String + val status: String + val thisDevice: String + val syncNow: String + val openAdmin: String + val signingOut: String + val signOut: String + val signOutHint: String + val signOutTitle: String + fun signOutUnsynced(n: Int): String + val signOutMessage: String + + // Library and shelf + fun uploadRefused(name: String, message: String): String + val conflictTitle: String + fun conflictMessage(title: String): String + val openCopy: String + val newNote: String + val newFolder: String + val newSubfolder: String + val renameFolder: String + val deleteFolderTitle: String + fun deleteFolderMessage(name: String): String + val renameNote: String + val emptyTrashTitle: String + val emptyTrashMessage: String + val emptyTrash: String + val switchLibrary: String + val accountAndSync: String + val turnOnSyncEllipsis: String + val mediaLibrary: String + val manageLibraries: String + val searchNotes: String + val sortAndNew: String + fun showMore(next: Int, hidden: Int): String + val collapse: String + val expand: String + val sort: String + val sortUpdated: String + val sortCreated: String + val sortTitle: String + val createFolderRow: String + val editTagEllipsis: String + val pin: String + val unpin: String + val moveToEllipsis: String + val moveTo: String + val duplicateNote: String + val duplicateSuffix: String + val moveToTrash: String + val noNotebook: String + fun noResults(query: String): String + + // Note + val share: String + val outline: String + val tagsEllipsis: String + val backlinks: String + fun backlinksMenu(n: Int): String + fun backlinksCount(n: Int): String + val history: String + val noteInTrash: String + val formatPhoto: String + val formatCamera: String + val formatAttachment: String + val formatHeading: String + val formatBold: String + val formatItalic: String + val formatTask: String + val formatList: String + val formatOrdered: String + val formatQuote: String + val formatCode: String + val formatWikiLink: String + val formatLink: String + val formatStrike: String + val undo: String + val hideKeyboard: String + val noHeadings: String + val noHeadingsHint: String + val noBacklinks: String + fun noBacklinksHint(title: String): String + + // Tags + fun tagColor(color: String): String + val searchOrCreateTag: String + fun maxTags(n: Int): String + fun createTag(name: String): String + val editTag: String + val noTags: String + val tagExists: String + val color: String + val deleteTag: String + val deleteTagTitle: String + fun deleteTagMessage(name: String): String + + // History + val restoreVersion: String + val localNoHistory: String + val localNoHistoryHint: String + val historyLoadFailed: String + val noHistory: String + val noHistoryHint: String + val unknownDevice: String + val currentVersion: String + val restoreVersionTitle: String + val restoreVersionMessage: String + val restoredVersion: String + + // Sharing + val offlineNoPublicLinks: String + val shareNote: String + val localNoShare: String + val shareNeedsNetwork: String + val publicLink: String + val publicLinkHint: String + val legacyShare: String + val needPassword: String + val newPasswordPlaceholder: String + val generate: String + val createLink: String + val copyLink: String + val shareExpired: String + val copyPassword: String + val passwordSet: String + val changePassword: String + val copyLinkAndPassword: String + val expires: String + fun views(n: Int): String + val copyOrExport: String + val copyAsHint: String + val copyAsOffline: String + val copyMarkdown: String + val sendToApp: String + val exportMd: String + val neverExpires: String + fun until(date: String): String + fun days(n: Int): String + fun shareMessage(title: String, link: String, password: String): String + fun sharePasswordMin(n: Int): String + fun sharePasswordMax(n: Int): String + + // Media + val fileTooLarge: String + fun queuedUpload(name: String): String + val duplicateMerged: String + fun cannotAddFile(error: String): String + val noCamera: String + val noFilePicker: String + val upload: String + val photoOrVideo: String + val camera: String + val file: String + val searchFiles: String + val mediaOffline: String + fun orphanBanner(n: Int, days: Int): String + fun orphanBannerNoDays(n: Int): String + val mediaTrashEmpty: String + val mediaEmpty: String + val isPublic: String + fun refs(n: Int): String + val unreferenced: String + val cannotGetFile: String + val type: String + val size: String + val uploadedAt: String + val publicUrl: String + val publicPlaceholder: String + val trashedOrphan: String + val trashedManual: String + val noNotesReference: String + fun referencedBy(n: Int): String + val copyReference: String + val copyPublicUrl: String + val makePublicUrl: String + val revokePublicUrl: String + val shareOriginal: String + val localFilesHint: String + val publicFilesHint: String + val renameFile: String + val purgeFileTitle: String + fun purgeFileMessage(name: String): String + val filterAll: String + val filterImages: String + val filterVideo: String + val filterAudio: String + val filterFiles: String + val attachment: String + val fileNotFound: String + val nameEmpty: String + val localNoPublicLink: String + + // Sign in + val wrongCredentials: String + val signInTitle: String + val turnOnSyncTitle: String + val continueMigration: String + val syncNode: String + val regionCn: String + val regionGlobal: String + fun officialRegion(region: String): String + val customServerEllipsis: String + val nodeUnreachable: String + val signInHint: String + fun promoteHint(name: String): String + val register: String + val login: String + val firstAdmin: String + val registrationClosed: String + val registerAndSync: String + val promoteNote: String + fun migrationRejected(n: Int): String + fun migrationFilesFailed(n: Int): String + fun migrationInterrupted(error: String): String + val preparing: String + fun uploadingFiles(done: Int, total: Int): String + fun uploadingNotes(done: Int, total: Int): String + val migrationDone: String + val customServer: String + val insecureWarning: String + val customServerHint: String + val useServer: String + val cannotConnect: String + val httpWarning: String + val createAccount: String + val usernameOrEmail: String + val emailOptional: String + val displayNameOptional: String + val password: String + val passwordMin8: String + + // Errors and checks (core) + fun unreachable(detail: String): String + val notIvynote: String + val tooManyAttempts: String + fun serverUnavailable(status: Int): String + fun requestFailedStatus(status: Int): String + val accountNotEmpty: String + val accountUnavailable: String + val sessionExpired: String + val usernameRule: String + val passwordTooShort: String + val passwordTooLong: String + val serverEmpty: String + val serverInvalid: String + fun unsupportedScheme(scheme: String): String + fun insecureRemote(host: String): String +} + +object ZhStrings : Strings { + override val locale: Locale = Locale.SIMPLIFIED_CHINESE + + override val appName = "常青笔记" + override val slogan = "本地优先的 Markdown 笔记" + override val tagline = "像常春藤一样,你的笔记彼此相连、四季常青。" + override val name = "名称" + override val save = "保存" + override val cancel = "取消" + override val create = "创建" + override val delete = "删除" + override val remove = "移除" + override val rename = "重命名" + override val open = "打开" + override val retry = "重试" + override val done = "完成" + override val back = "返回" + override val more = "更多" + override val clear = "清除" + override val ok = "好" + override val copied = "已复制" + override val restore = "恢复" + override val deleteForever = "永久删除" + override val untitled = "无标题" + override val unnamed = "未命名" + override val note = "笔记" + override val notes = "笔记" + override val tags = "标签" + override val trash = "回收站" + override val pinned = "置顶" + override val needsNetwork = "需要联网" + override val requestFailed = "请求失败" + override val cannotReadFile = "无法读取文件" + + override val language = "语言 · Language" + override val followSystem = "跟随系统" + override fun followSystemWith(language: String) = "跟随系统($language)" + override val languageAccountHint = "保存在你的账户中,在登录这个账户的所有设备上生效。" + override val languageDeviceHint = "只对这台设备生效。登录同步账户后,以账户的语言设置为准。" + + override val justNow = "刚刚" + override fun yesterday(time: String) = "昨天 $time" + override fun weekday(dayOfWeek: Int) = listOf("周日", "周一", "周二", "周三", "周四", "周五", "周六")[(dayOfWeek - 1).mod(7)] + override fun monthDay(month: Int, day: Int) = "${month}月${day}日" + override fun yearMonthDay(year: Int, month: Int, day: Int) = "${year}年${month}月${day}日" + override val dateTimePattern = "yyyy年M月d日 HH:mm" + override val monthDayPattern = "M月d日" + + override val localUnsynced = "仅保存在本机 · 未同步" + override val downloadingNotes = "正在下载笔记…" + override val syncing = "同步中…" + override val offline = "离线" + override fun offlinePending(n: Int) = "离线 · $n 条待同步" + override val syncError = "同步出错" + override fun pending(n: Int) = "$n 条待同步" + override fun synced(ago: String) = "已同步 · $ago" + override val neverSynced = "尚未同步" + override fun blocked(n: Int) = "$n 条更改被服务器拒绝" + + override val libraries = "笔记库" + override val welcome = "本地优先的 Markdown 笔记,在手机、电脑和网页间同步。" + override val pickLibrary = "选择要打开的笔记库" + override val connect = "登录云同步账户" + override val connectHint = "在多台设备间同步,支持官方节点和自建服务器" + override val newLocal = "新建本地笔记库" + override val newLocalHint = "只保存在这台设备,无需账户,立即可用" + override val newLocalMessage = "笔记只保存在这台设备上,不会同步。" + override val canConvert = "本地笔记库可以随时开启同步:注册新账户后,内容会自动上传。" + override val startCloud = "开始使用 · 多端同步" + override val startCloudHint = "登录或注册,笔记在手机、电脑和网页间自动同步" + override val localOnly = "不登录,仅在本机使用" + override val defaultLibraryName = "我的笔记" + override val renameLibrary = "重命名笔记库" + override val removeLibrary = "移除笔记库" + override fun removeLocalMessage(name: String) = "将永久删除「$name」里的全部笔记,无法恢复。" + override fun removeServerMessage(name: String) = "将从这台设备删除「$name」的本地副本和登录状态。服务器上的笔记不受影响,但尚未同步的更改会丢失。" + override val turnOnSync = "开启同步" + override val migratedHint = "已迁移到云端,确认无误后可以移除" + override val cannotOpenData = "无法打开本地数据" + override val backToLibraries = "返回笔记库列表" + + override val account = "账户" + override val username = "用户名" + override val email = "邮箱" + override val role = "角色" + override val admin = "管理员" + override val user = "用户" + override fun syncSection(library: String) = "同步 · $library" + override val server = "服务器" + override val status = "状态" + override val thisDevice = "本设备" + override val syncNow = "立即同步" + override val openAdmin = "打开管理后台" + override val signingOut = "正在退出…" + override val signOut = "退出登录" + override val signOutHint = "退出后,本设备上这个笔记库的副本会被删除;服务器上的数据不受影响。重新登录后会再次下载。" + override val signOutTitle = "退出登录?" + override fun signOutUnsynced(n: Int) = "还有 $n 条更改没有同步到服务器,退出后会丢失。" + override val signOutMessage = "这台设备的登录令牌会被撤销,本地数据会被删除。" + + override fun uploadRefused(name: String, message: String) = "「$name」未能上传:$message" + override val conflictTitle = "内容冲突" + override fun conflictMessage(title: String) = "「$title」在其他设备上也改动了同一处。服务器保留了它的版本,你的修改已另存为冲突副本。" + override val openCopy = "打开副本" + override val newNote = "新建笔记" + override val newFolder = "新建笔记本" + override val newSubfolder = "新建子笔记本" + override val renameFolder = "重命名笔记本" + override val deleteFolderTitle = "删除笔记本?" + override fun deleteFolderMessage(name: String) = "「$name」的子笔记本会一起删除,其中的笔记移到回收站。" + override val renameNote = "重命名笔记" + override val emptyTrashTitle = "清空回收站?" + override val emptyTrashMessage = "回收站中的全部笔记将被永久删除,此操作无法撤销。" + override val emptyTrash = "清空回收站" + override val switchLibrary = "切换笔记库" + override val accountAndSync = "账户与同步…" + override val turnOnSyncEllipsis = "开启多端同步…" + override val mediaLibrary = "媒体库" + override val manageLibraries = "管理笔记库…" + override val searchNotes = "搜索笔记" + override val sortAndNew = "排序与新建" + override fun showMore(next: Int, hidden: Int) = "再显示 $next 篇(共 $hidden 篇未显示)" + override val collapse = "收起" + override val expand = "展开" + override val sort = "排序" + override val sortUpdated = "更新时间" + override val sortCreated = "创建时间" + override val sortTitle = "标题" + override val createFolderRow = "新建笔记本" + override val editTagEllipsis = "编辑标签…" + override val pin = "置顶" + override val unpin = "取消置顶" + override val moveToEllipsis = "移动到…" + override val moveTo = "移动到" + override val duplicateNote = "复制笔记" + override val duplicateSuffix = " 副本" + override val moveToTrash = "移到回收站" + override val noNotebook = "无笔记本" + override fun noResults(query: String) = "没有找到「$query」" + + override val share = "分享" + override val outline = "大纲" + override val tagsEllipsis = "标签…" + override val backlinks = "反向链接" + override fun backlinksMenu(n: Int) = "反向链接($n)" + override fun backlinksCount(n: Int) = "$n 条反向链接" + override val history = "历史版本" + override val noteInTrash = "这篇笔记在回收站中" + override val formatPhoto = "图片" + override val formatCamera = "拍照" + override val formatAttachment = "附件" + override val formatHeading = "标题" + override val formatBold = "加粗" + override val formatItalic = "斜体" + override val formatTask = "待办" + override val formatList = "列表" + override val formatOrdered = "编号" + override val formatQuote = "引用" + override val formatCode = "代码" + override val formatWikiLink = "双链" + override val formatLink = "链接" + override val formatStrike = "删除线" + override val undo = "撤销" + override val hideKeyboard = "收起键盘" + override val noHeadings = "还没有标题" + override val noHeadingsHint = "以 # 开头的行会出现在这里。" + override val noBacklinks = "还没有笔记链接到这里" + override fun noBacklinksHint(title: String) = "在其他笔记中输入 [[$title]] 即可链接到这篇笔记。" + + override fun tagColor(color: String) = when (color) { + "green" -> "绿" + "blue" -> "蓝" + "amber" -> "琥珀" + "pink" -> "粉" + "purple" -> "紫" + "gray" -> "灰" + else -> "无" + } + override val searchOrCreateTag = "搜索或创建标签" + override fun maxTags(n: Int) = "一篇笔记最多 $n 个标签" + override fun createTag(name: String) = "创建「$name」" + override val editTag = "编辑标签" + override val noTags = "还没有标签。输入名称即可创建。" + override val tagExists = "已有同名标签" + override val color = "颜色" + override val deleteTag = "删除标签" + override val deleteTagTitle = "删除标签?" + override fun deleteTagMessage(name: String) = "「#$name」会从所有笔记上移除,笔记本身不受影响。" + + override val restoreVersion = "恢复此版本" + override val localNoHistory = "本地笔记库没有历史版本" + override val localNoHistoryHint = "历史版本保存在同步服务器上。" + override val historyLoadFailed = "无法载入历史版本" + override val noHistory = "暂无历史版本" + override val noHistoryHint = "编辑并同步后,这里会出现保存过的版本。" + override val unknownDevice = "未知设备" + override val currentVersion = "当前版本" + override val restoreVersionTitle = "恢复此版本?" + override val restoreVersionMessage = "当前内容会被替换,但仍会保留在历史版本中。" + override val restoredVersion = "已恢复为历史版本" + + override val offlineNoPublicLinks = "离线中,附件没有替换为公网链接" + override val shareNote = "分享笔记" + override val localNoShare = "本地笔记库不能生成公开链接,可以复制或导出笔记。" + override val shareNeedsNetwork = "分享链接需要联网。" + override val publicLink = "公开链接" + override val publicLinkHint = "拿到链接和访问密码的人可以阅读这篇笔记" + override val legacyShare = "这个链接是在要求密码之前创建的,设置密码后才能继续访问。" + override val needPassword = "为保护你的隐私,公开链接必须设置至少 6 位的访问密码。" + override val newPasswordPlaceholder = "新密码(至少 6 位)" + override val generate = "随机生成" + override val createLink = "生成链接" + override val copyLink = "复制链接" + override val shareExpired = "分享已过期" + override val copyPassword = "复制密码" + override val passwordSet = "已设置访问密码" + override val changePassword = "修改密码" + override val copyLinkAndPassword = "复制链接和密码" + override val expires = "有效期" + override fun views(n: Int) = "$n 次访问" + override val copyOrExport = "复制或导出" + override val copyAsHint = "附件会自动公开并替换为公网链接,方便粘贴到博客、公众号等地方。" + override val copyAsOffline = "离线时附件不会替换为公网链接。" + override val copyMarkdown = "复制 Markdown" + override val sendToApp = "发送到其他应用" + override val exportMd = "导出 .md 文件" + override val neverExpires = "永久有效" + override fun until(date: String) = "至 $date" + override fun days(n: Int) = "$n 天" + override fun shareMessage(title: String, link: String, password: String) = "$title\n链接:$link\n密码:$password" + override fun sharePasswordMin(n: Int) = "密码至少 $n 位" + override fun sharePasswordMax(n: Int) = "密码最多 $n 字节" + + override val fileTooLarge = "文件超过服务器的上传上限" + override fun queuedUpload(name: String) = "离线中,「$name」将在联网后上传" + override val duplicateMerged = "重复文件已合并" + override fun cannotAddFile(error: String) = "无法添加文件:$error" + override val noCamera = "没有可用的相机应用" + override val noFilePicker = "没有可用的文件选择器" + override val upload = "上传" + override val photoOrVideo = "图片或视频" + override val camera = "拍照" + override val file = "文件" + override val searchFiles = "搜索文件名" + override val mediaOffline = "离线中,显示的是本机同步下来的文件信息,修改需要联网。" + override fun orphanBanner(n: Int, days: Int) = "$n 个文件没有被任何笔记引用,将在 $days 天后自动移入回收站。" + override fun orphanBannerNoDays(n: Int) = "$n 个文件没有被任何笔记引用。" + override val mediaTrashEmpty = "回收站是空的" + override val mediaEmpty = "还没有文件。在笔记中插入图片或附件即可自动加入媒体库。" + override val isPublic = "已公开" + override fun refs(n: Int) = "被 $n 篇引用" + override val unreferenced = "未引用" + override val cannotGetFile = "无法取得文件,请检查网络" + override val type = "类型" + override val size = "大小" + override val uploadedAt = "上传于" + override val publicUrl = "公网链接" + override val publicPlaceholder = "已公开(/r/…)" + override val trashedOrphan = "未引用,已自动移入" + override val trashedManual = "已移入" + override val noNotesReference = "没有笔记引用它" + override fun referencedBy(n: Int) = "被 $n 篇笔记引用" + override val copyReference = "复制引用" + override val copyPublicUrl = "复制公网链接" + override val makePublicUrl = "生成公网链接" + override val revokePublicUrl = "撤销公网链接" + override val shareOriginal = "分享或保存原文件" + override val localFilesHint = "本地笔记库的文件只保存在这台设备上。" + override val publicFilesHint = "公开的文件不再受登录保护,拿到链接的人都能打开。" + override val renameFile = "重命名文件" + override val purgeFileTitle = "永久删除文件?" + override fun purgeFileMessage(name: String) = "「$name」将被永久删除,引用它的笔记会显示为缺失。此操作无法撤销。" + override val filterAll = "全部" + override val filterImages = "图片" + override val filterVideo = "视频" + override val filterAudio = "音频" + override val filterFiles = "文件" + override val attachment = "附件" + override val fileNotFound = "文件不存在" + override val nameEmpty = "名称不能为空" + override val localNoPublicLink = "本地笔记库没有公网链接" + + override val wrongCredentials = "用户名或密码错误" + override val signInTitle = "登录常青笔记" + override val turnOnSyncTitle = "开启多端同步" + override val continueMigration = "继续迁移" + override val syncNode = "同步节点" + override val regionCn = "中国大陆" + override val regionGlobal = "全球" + override fun officialRegion(region: String) = "常青笔记 · $region" + override val customServerEllipsis = "自定义服务器…" + override val nodeUnreachable = "暂时无法连接这个节点" + override val signInHint = "笔记先保存在本机,联网时自动同步到你的所有设备。" + override fun promoteHint(name: String) = "注册一个新账户,「$name」会上传到云端,之后在所有设备上同步。" + override val register = "注册" + override val login = "登录" + override val firstAdmin = "这台服务器还没有账户。你创建的第一个账户将成为管理员。" + override val registrationClosed = "这台服务器没有开放注册。" + override val registerAndSync = "注册并开启同步" + override val promoteNote = "本地笔记库只能迁移到新注册的账户。已有账户的话,可以先登录,再在网页版或桌面端的「设置 → 导入」中导入本笔记库导出的内容。" + override fun migrationRejected(n: Int) = "$n 项未能迁移,原内容仍保留在本地笔记库中。" + override fun migrationFilesFailed(n: Int) = "$n 个文件未能上传,原文件仍保留在本地笔记库中。" + override fun migrationInterrupted(error: String) = "迁移中断:$error。账户已经创建,点「继续迁移」会从中断处继续,已上传的内容不会重复。" + override val preparing = "正在准备…" + override fun uploadingFiles(done: Int, total: Int) = "正在上传文件 $done/$total" + override fun uploadingNotes(done: Int, total: Int) = "正在上传笔记 $done/$total" + override val migrationDone = "迁移完成,正在打开…" + override val customServer = "自定义服务器" + override val insecureWarning = "使用 http 连接时,密码和笔记以明文传输,请只在可信的局域网内使用。" + override val customServerHint = "连接你自己或团队部署的常青笔记服务器。" + override val useServer = "使用这个服务器" + override val cannotConnect = "无法连接服务器" + override val httpWarning = "使用 http 连接,密码和笔记以明文传输。" + override val createAccount = "创建账户" + override val usernameOrEmail = "用户名或邮箱" + override val emailOptional = "邮箱(可选)" + override val displayNameOptional = "显示名(可选)" + override val password = "密码" + override val passwordMin8 = "密码(至少 8 位)" + + override fun unreachable(detail: String) = "无法连接服务器:$detail" + override val notIvynote = "这个地址不是常青笔记服务器" + override val tooManyAttempts = "尝试次数过多,请 15 分钟后再试" + override fun serverUnavailable(status: Int) = "服务器暂时不可用($status)" + override fun requestFailedStatus(status: Int) = "请求失败($status)" + override val accountNotEmpty = "这个账户里已经有笔记。本地笔记库只能迁移到新注册的空账户。" + override val accountUnavailable = "账户不可用" + override val sessionExpired = "登录已过期,请重新登录" + override val usernameRule = "用户名为 2–32 位字母、数字、_ . -,以字母或数字开头" + override val passwordTooShort = "密码至少 8 个字符" + override val passwordTooLong = "密码最多 72 字节" + override val serverEmpty = "请填写服务器地址" + override val serverInvalid = "服务器地址无效" + override fun unsupportedScheme(scheme: String) = "不支持的协议:$scheme" + override fun insecureRemote(host: String) = "$host 不是局域网地址,必须使用 https://" +} + +object EnStrings : Strings { + override val locale: Locale = Locale.ENGLISH + + /** "1 note", "2 notes". */ + private fun count(n: Int, one: String, many: String = one + "s") = "$n ${if (n == 1) one else many}" + + override val appName = "Ivynote" + override val slogan = "Local-first Markdown notes" + override val tagline = "Like ivy, your notes stay connected and evergreen." + override val name = "Name" + override val save = "Save" + override val cancel = "Cancel" + override val create = "Create" + override val delete = "Delete" + override val remove = "Remove" + override val rename = "Rename" + override val open = "Open" + override val retry = "Retry" + override val done = "Done" + override val back = "Back" + override val more = "More" + override val clear = "Clear" + override val ok = "OK" + override val copied = "Copied" + override val restore = "Restore" + override val deleteForever = "Delete forever" + override val untitled = "Untitled" + override val unnamed = "Unnamed" + override val note = "Note" + override val notes = "Notes" + override val tags = "Tags" + override val trash = "Trash" + override val pinned = "Pinned" + override val needsNetwork = "Needs a connection" + override val requestFailed = "Request failed" + override val cannotReadFile = "Could not read the file" + + override val language = "Language · 语言" + override val followSystem = "System default" + override fun followSystemWith(language: String) = "System default ($language)" + override val languageAccountHint = "Saved in your account, on every device signed in to it." + override val languageDeviceHint = "For this device only. Once you sign in to a synced account, the account’s language applies." + + override val justNow = "just now" + override fun yesterday(time: String) = "Yesterday $time" + override fun weekday(dayOfWeek: Int) = listOf("Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat")[(dayOfWeek - 1).mod(7)] + private val months = listOf("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec") + override fun monthDay(month: Int, day: Int) = "${months[(month - 1).mod(12)]} $day" + override fun yearMonthDay(year: Int, month: Int, day: Int) = "${months[(month - 1).mod(12)]} $day, $year" + override val dateTimePattern = "MMM d, yyyy HH:mm" + override val monthDayPattern = "MMM d" + + override val localUnsynced = "On this device only · not synced" + override val downloadingNotes = "Downloading notes…" + override val syncing = "Syncing…" + override val offline = "Offline" + override fun offlinePending(n: Int) = "Offline · ${count(n, "change")} to sync" + override val syncError = "Sync error" + override fun pending(n: Int) = "${count(n, "change")} to sync" + override fun synced(ago: String) = "Synced · $ago" + override val neverSynced = "Not synced yet" + override fun blocked(n: Int) = "${count(n, "change")} refused by the server" + + override val libraries = "Libraries" + override val welcome = "Local-first Markdown notes that sync across your phone, computer and the web." + override val pickLibrary = "Pick a library to open" + override val connect = "Sign in to sync" + override val connectHint = "Sync across devices, on the official service or your own server" + override val newLocal = "New local library" + override val newLocalHint = "Stays on this device, no account, ready right away" + override val newLocalMessage = "Notes stay on this device and do not sync." + override val canConvert = "A local library can turn on sync at any time: create an account and its content is uploaded." + override val startCloud = "Get started · Sync everywhere" + override val startCloudHint = "Sign in or sign up; notes sync across your phone, computer and the web" + override val localOnly = "Use on this device only, without an account" + override val defaultLibraryName = "My notes" + override val renameLibrary = "Rename library" + override val removeLibrary = "Remove library" + override fun removeLocalMessage(name: String) = "All notes in “$name” will be deleted for good. This cannot be undone." + override fun removeServerMessage(name: String) = "The copy of “$name” on this device and its sign-in will be removed. Notes on the server are not affected, but changes not synced yet are lost." + override val turnOnSync = "Turn on sync" + override val migratedHint = "Moved to the cloud; remove it once you have checked" + override val cannotOpenData = "Could not open the local data" + override val backToLibraries = "Back to libraries" + + override val account = "Account" + override val username = "Username" + override val email = "Email" + override val role = "Role" + override val admin = "Admin" + override val user = "User" + override fun syncSection(library: String) = "Sync · $library" + override val server = "Server" + override val status = "Status" + override val thisDevice = "This device" + override val syncNow = "Sync now" + override val openAdmin = "Open admin console" + override val signingOut = "Signing out…" + override val signOut = "Sign out" + override val signOutHint = "Signing out deletes this library’s copy on this device; the data on the server is not affected and downloads again when you sign back in." + override val signOutTitle = "Sign out?" + override fun signOutUnsynced(n: Int) = "${count(n, "change")} not synced to the server yet will be lost." + override val signOutMessage = "This device’s sign-in token is revoked and the local data deleted." + + override fun uploadRefused(name: String, message: String) = "“$name” could not be uploaded: $message" + override val conflictTitle = "Conflict" + override fun conflictMessage(title: String) = "“$title” was changed in the same place on another device. The server kept that version; your edit was saved as a conflict copy." + override val openCopy = "Open copy" + override val newNote = "New note" + override val newFolder = "New notebook" + override val newSubfolder = "New sub-notebook" + override val renameFolder = "Rename notebook" + override val deleteFolderTitle = "Delete notebook?" + override fun deleteFolderMessage(name: String) = "The sub-notebooks of “$name” are deleted too; its notes go to the trash." + override val renameNote = "Rename note" + override val emptyTrashTitle = "Empty trash?" + override val emptyTrashMessage = "All notes in the trash will be deleted for good. This cannot be undone." + override val emptyTrash = "Empty trash" + override val switchLibrary = "Switch library" + override val accountAndSync = "Account and sync…" + override val turnOnSyncEllipsis = "Turn on sync…" + override val mediaLibrary = "Media library" + override val manageLibraries = "Manage libraries…" + override val searchNotes = "Search notes" + override val sortAndNew = "Sort and new" + override fun showMore(next: Int, hidden: Int) = "Show $next more ($hidden not shown)" + override val collapse = "Collapse" + override val expand = "Expand" + override val sort = "Sort" + override val sortUpdated = "Last updated" + override val sortCreated = "Date created" + override val sortTitle = "Title" + override val createFolderRow = "New notebook" + override val editTagEllipsis = "Edit tag…" + override val pin = "Pin" + override val unpin = "Unpin" + override val moveToEllipsis = "Move to…" + override val moveTo = "Move to" + override val duplicateNote = "Duplicate" + override val duplicateSuffix = " copy" + override val moveToTrash = "Move to trash" + override val noNotebook = "No notebook" + override fun noResults(query: String) = "Nothing found for “$query”" + + override val share = "Share" + override val outline = "Outline" + override val tagsEllipsis = "Tags…" + override val backlinks = "Backlinks" + override fun backlinksMenu(n: Int) = "Backlinks ($n)" + override fun backlinksCount(n: Int) = count(n, "backlink") + override val history = "History" + override val noteInTrash = "This note is in the trash" + override val formatPhoto = "Photo" + override val formatCamera = "Take photo" + override val formatAttachment = "Attachment" + override val formatHeading = "Heading" + override val formatBold = "Bold" + override val formatItalic = "Italic" + override val formatTask = "Task" + override val formatList = "List" + override val formatOrdered = "Numbered list" + override val formatQuote = "Quote" + override val formatCode = "Code" + override val formatWikiLink = "Wiki link" + override val formatLink = "Link" + override val formatStrike = "Strikethrough" + override val undo = "Undo" + override val hideKeyboard = "Hide keyboard" + override val noHeadings = "No headings yet" + override val noHeadingsHint = "Lines starting with # show up here." + override val noBacklinks = "No notes link here yet" + override fun noBacklinksHint(title: String) = "Type [[$title]] in another note to link to this one." + + override fun tagColor(color: String) = when (color) { + "green" -> "Green" + "blue" -> "Blue" + "amber" -> "Amber" + "pink" -> "Pink" + "purple" -> "Purple" + "gray" -> "Gray" + else -> "None" + } + override val searchOrCreateTag = "Search or create a tag" + override fun maxTags(n: Int) = "A note can have at most $n tags" + override fun createTag(name: String) = "Create “$name”" + override val editTag = "Edit tag" + override val noTags = "No tags yet. Type a name to create one." + override val tagExists = "A tag with this name exists" + override val color = "Color" + override val deleteTag = "Delete tag" + override val deleteTagTitle = "Delete tag?" + override fun deleteTagMessage(name: String) = "“#$name” is removed from all notes; the notes themselves are not affected." + + override val restoreVersion = "Restore this version" + override val localNoHistory = "Local libraries have no history" + override val localNoHistoryHint = "Saved versions are kept on the sync server." + override val historyLoadFailed = "Could not load the history" + override val noHistory = "No saved versions yet" + override val noHistoryHint = "Versions show up here after you edit and sync." + override val unknownDevice = "Unknown device" + override val currentVersion = "Current version" + override val restoreVersionTitle = "Restore this version?" + override val restoreVersionMessage = "The current text is replaced, but stays in the history." + override val restoredVersion = "Restored the saved version" + + override val offlineNoPublicLinks = "Offline: attachments were not replaced with public links" + override val shareNote = "Share note" + override val localNoShare = "Local libraries cannot make public links; you can copy or export the note." + override val shareNeedsNetwork = "Sharing needs a connection." + override val publicLink = "Public link" + override val publicLinkHint = "Anyone with the link and the password can read this note" + override val legacyShare = "This link was created before passwords were required. Set one to reopen it." + override val needPassword = "To protect your privacy, a public link needs a password of at least 6 characters." + override val newPasswordPlaceholder = "New password (6+ characters)" + override val generate = "Generate" + override val createLink = "Create link" + override val copyLink = "Copy link" + override val shareExpired = "This share has expired" + override val copyPassword = "Copy password" + override val passwordSet = "Password set" + override val changePassword = "Change password" + override val copyLinkAndPassword = "Copy link and password" + override val expires = "Expires" + override fun views(n: Int) = count(n, "view") + override val copyOrExport = "Copy or export" + override val copyAsHint = "Attachments are made public and replaced with their public links, ready to paste into a blog or newsletter." + override val copyAsOffline = "Offline, attachments are not replaced with public links." + override val copyMarkdown = "Copy Markdown" + override val sendToApp = "Send to another app" + override val exportMd = "Export .md file" + override val neverExpires = "Never" + override fun until(date: String) = "Until $date" + override fun days(n: Int) = count(n, "day") + override fun shareMessage(title: String, link: String, password: String) = "$title\nLink: $link\nPassword: $password" + override fun sharePasswordMin(n: Int) = "At least $n characters" + override fun sharePasswordMax(n: Int) = "At most $n bytes" + + override val fileTooLarge = "The file is larger than the server allows" + override fun queuedUpload(name: String) = "Offline: “$name” will upload once you are online" + override val duplicateMerged = "Duplicate file merged" + override fun cannotAddFile(error: String) = "Could not add the file: $error" + override val noCamera = "No camera app available" + override val noFilePicker = "No file picker available" + override val upload = "Upload" + override val photoOrVideo = "Photo or video" + override val camera = "Take photo" + override val file = "File" + override val searchFiles = "Search file names" + override val mediaOffline = "Offline: showing the file details synced to this device; changes need a connection." + override fun orphanBanner(n: Int, days: Int) = "${count(n, "file")} not used by any note will move to the trash in ${count(days, "day")}." + override fun orphanBannerNoDays(n: Int) = "${count(n, "file")} not used by any note." + override val mediaTrashEmpty = "The trash is empty" + override val mediaEmpty = "No files yet. Images and attachments added to notes show up here." + override val isPublic = "Public" + override fun refs(n: Int) = "In ${count(n, "note")}" + override val unreferenced = "Unused" + override val cannotGetFile = "Could not get the file; check your connection" + override val type = "Type" + override val size = "Size" + override val uploadedAt = "Uploaded" + override val publicUrl = "Public link" + override val publicPlaceholder = "Public (/r/…)" + override val trashedOrphan = "Unused, moved automatically" + override val trashedManual = "Moved" + override val noNotesReference = "No note uses it" + override fun referencedBy(n: Int) = "Used in ${count(n, "note")}" + override val copyReference = "Copy reference" + override val copyPublicUrl = "Copy public link" + override val makePublicUrl = "Make public link" + override val revokePublicUrl = "Revoke public link" + override val shareOriginal = "Share or save the original" + override val localFilesHint = "Files of a local library stay on this device." + override val publicFilesHint = "Public files are no longer protected by sign-in: anyone with the link can open them." + override val renameFile = "Rename file" + override val purgeFileTitle = "Delete file forever?" + override fun purgeFileMessage(name: String) = "“$name” will be deleted for good; notes using it will show it as missing. This cannot be undone." + override val filterAll = "All" + override val filterImages = "Images" + override val filterVideo = "Video" + override val filterAudio = "Audio" + override val filterFiles = "Files" + override val attachment = "attachment" + override val fileNotFound = "File not found" + override val nameEmpty = "The name cannot be empty" + override val localNoPublicLink = "Local libraries have no public links" + + override val wrongCredentials = "Wrong username or password" + override val signInTitle = "Sign in to Ivynote" + override val turnOnSyncTitle = "Turn on sync" + override val continueMigration = "Continue" + override val syncNode = "Sync service" + override val regionCn = "Mainland China" + override val regionGlobal = "Global" + override fun officialRegion(region: String) = "Ivynote · $region" + override val customServerEllipsis = "Custom server…" + override val nodeUnreachable = "This service cannot be reached right now" + override val signInHint = "Notes are saved on this device first and sync to all your devices when online." + override fun promoteHint(name: String) = "Create a new account: “$name” is uploaded to the cloud and syncs on all your devices." + override val register = "Sign up" + override val login = "Sign in" + override val firstAdmin = "This server has no accounts yet. The first account you create becomes its admin." + override val registrationClosed = "This server does not accept sign-ups." + override val registerAndSync = "Sign up and turn on sync" + override val promoteNote = "A local library can only move to a newly created account. With an existing account, sign in and import this library’s export in Settings → Import on the web or desktop app." + override fun migrationRejected(n: Int) = "${count(n, "item")} could not be moved; the local library still has everything." + override fun migrationFilesFailed(n: Int) = "${count(n, "file")} could not be uploaded; the local library still has the originals." + override fun migrationInterrupted(error: String) = "Moving stopped: $error. The account exists; tap Continue to resume where it stopped, without uploading anything twice." + override val preparing = "Preparing…" + override fun uploadingFiles(done: Int, total: Int) = "Uploading files $done/$total" + override fun uploadingNotes(done: Int, total: Int) = "Uploading notes $done/$total" + override val migrationDone = "Done, opening…" + override val customServer = "Custom server" + override val insecureWarning = "Over http, passwords and notes travel unencrypted. Use it only on a local network you trust." + override val customServerHint = "Connect to an Ivynote server you or your team run." + override val useServer = "Use this server" + override val cannotConnect = "Cannot reach the server" + override val httpWarning = "Connected over http: passwords and notes travel unencrypted." + override val createAccount = "Create account" + override val usernameOrEmail = "Username or email" + override val emailOptional = "Email (optional)" + override val displayNameOptional = "Display name (optional)" + override val password = "Password" + override val passwordMin8 = "Password (8+ characters)" + + override fun unreachable(detail: String) = "Cannot reach the server: $detail" + override val notIvynote = "This address is not an Ivynote server" + override val tooManyAttempts = "Too many attempts; try again in 15 minutes" + override fun serverUnavailable(status: Int) = "The server is unavailable right now ($status)" + override fun requestFailedStatus(status: Int) = "Request failed ($status)" + override val accountNotEmpty = "This account already has notes. A local library can only move to a new, empty account." + override val accountUnavailable = "This account is not available" + override val sessionExpired = "Your session has expired; please sign in again" + override val usernameRule = "Usernames have 2–32 letters, digits, _ . or -, starting with a letter or digit" + override val passwordTooShort = "The password needs at least 8 characters" + override val passwordTooLong = "The password can be at most 72 bytes" + override val serverEmpty = "Enter the server address" + override val serverInvalid = "The server address is not valid" + override fun unsupportedScheme(scheme: String) = "Unsupported protocol: $scheme" + override fun insecureRemote(host: String) = "$host is not on the local network; use https://" +} diff --git a/core/src/main/kotlin/app/ivynote/core/SyncEngine.kt b/core/src/main/kotlin/app/ivynote/core/SyncEngine.kt index d6e0281..ee01a93 100644 --- a/core/src/main/kotlin/app/ivynote/core/SyncEngine.kt +++ b/core/src/main/kotlin/app/ivynote/core/SyncEngine.kt @@ -551,7 +551,7 @@ class SyncEngine( /** A copy next to the original, titled ` 副本` (guide 3.2). */ fun duplicateNote(id: String): Note? { val n = _notes[id] ?: return null - val title = (n.title.ifBlank { "无标题" } + " 副本").take(300) + val title = (n.title.ifBlank { L10n.s.untitled } + L10n.s.duplicateSuffix).take(300) return createNote(title = title, body = n.body, folderId = n.folderId, tags = n.tags) } @@ -787,7 +787,7 @@ class SyncEngine( } catch (e: ApiError.Server) { if (!refused(e.code)) throw e // One bad file must not hold back everything else. - val msg = if (e.code == 413) "文件超过服务器的上传上限" else e.message ?: "rejected" + val msg = if (e.code == 413) L10n.s.fileTooLarge else e.message ?: "rejected" _uploads[up.id] = up.copy(failed = msg) _uploadFailure.value = UploadFailure(up.name, msg) updateCounts() diff --git a/core/src/main/kotlin/app/ivynote/core/SyncRegion.kt b/core/src/main/kotlin/app/ivynote/core/SyncRegion.kt index c2de1ef..c83572a 100644 --- a/core/src/main/kotlin/app/ivynote/core/SyncRegion.kt +++ b/core/src/main/kotlin/app/ivynote/core/SyncRegion.kt @@ -9,9 +9,11 @@ package app.ivynote.core * address without a client release ([OfficialRegions]). [server] is the * address in effect now. */ -enum class SyncRegion(val id: String, val title: String, address: String) { - CN("cn", "中国大陆", "https://web.ivynote.net"), - GLOBAL("global", "全球", "https://web.ivynote.app"); +enum class SyncRegion(val id: String, address: String) { + CN("cn", "https://web.ivynote.net"), + GLOBAL("global", "https://web.ivynote.app"); + + val title: String get() = if (this == CN) L10n.s.regionCn else L10n.s.regionGlobal /** Built into the client; used whenever the website has said nothing else. */ val defaultServer: ServerAddress = ServerAddress.parse(address) diff --git a/core/src/test/kotlin/app/ivynote/core/LanguageTest.kt b/core/src/test/kotlin/app/ivynote/core/LanguageTest.kt new file mode 100644 index 0000000..679323c --- /dev/null +++ b/core/src/test/kotlin/app/ivynote/core/LanguageTest.kt @@ -0,0 +1,110 @@ +package app.ivynote.core + +import kotlin.test.AfterTest +import kotlin.test.Test +import kotlin.test.assertEquals +import kotlin.test.assertNull + +class LanguageTest { + private val prefs = MemoryKeyValueStore() + private val alice = "https://web.ivynote.app|u1" + private val bob = "https://web.ivynote.app|u2" + + @AfterTest + fun reset() { + L10n.language = Language.ZH + } + + @Test + fun systemTags() { + assertEquals(Language.ZH, Language.fromTag("zh-Hans-CN")) + assertEquals(Language.ZH, Language.fromTag("zh_TW")) + assertEquals(Language.EN, Language.fromTag("en-GB")) + assertNull(Language.fromTag("ja-JP")) + assertNull(Language.fromTag("")) + // The first supported language in the list wins; none falls back to English. + assertEquals(Language.ZH, Language.fromSystem(listOf("ja-JP", "zh-CN", "en-US"))) + assertEquals(Language.EN, Language.fromSystem(listOf("en-US", "zh-CN"))) + assertEquals(Language.EN, Language.fromSystem(listOf("fr-FR"))) + assertEquals(Language.EN, Language.fromSystem(emptyList())) + } + + @Test + fun followsTheSystemUntilChosen() { + val s = LanguageSettings(prefs, listOf("en-US")) + assertEquals(Language.EN, s.current.value) + assertEquals(Language.EN, L10n.language) + assertEquals(LanguageChoice.System, s.choice) + s.systemChanged(listOf("zh-CN")) + assertEquals(Language.ZH, s.current.value) + } + + @Test + fun aManualChoiceIsRemembered() { + LanguageSettings(prefs, listOf("en-US")).choose(LanguageChoice.Fixed(Language.ZH)) + val again = LanguageSettings(prefs, listOf("en-US")) + assertEquals(Language.ZH, again.current.value) + assertEquals(LanguageChoice.Fixed(Language.ZH), again.choice) + // Back to following the system. + again.choose(LanguageChoice.System) + assertEquals(Language.EN, LanguageSettings(prefs, listOf("en-US")).current.value) + } + + @Test + fun theAccountsChoiceComesFirst() { + val s = LanguageSettings(prefs, listOf("zh-CN")) + s.choose(LanguageChoice.Fixed(Language.ZH)) + // From the server (once it stores the language). + s.accountOpened(alice, serverChoice = LanguageChoice.Fixed(Language.EN)) + assertEquals(Language.EN, s.current.value) + s.accountClosed(alice) + assertEquals(Language.ZH, s.current.value) + // Kept on this device for the account until the server says otherwise. + s.accountOpened(alice) + assertEquals(Language.EN, s.current.value) + // An account with no choice: this device's choice. + s.accountClosed(alice) + s.accountOpened(bob) + assertEquals(Language.ZH, s.current.value) + } + + @Test + fun choosingWhileSignedInSetsTheAccountToo() { + val sent = mutableListOf<Pair<String, LanguageChoice>>() + val s = LanguageSettings(prefs, listOf("zh-CN")) + s.onAccountChoice = { key, choice -> sent += key to choice } + s.accountOpened(alice) + s.choose(LanguageChoice.Fixed(Language.EN)) + assertEquals(listOf<Pair<String, LanguageChoice>>(alice to LanguageChoice.Fixed(Language.EN)), sent) + assertEquals(Language.EN, s.current.value) + s.accountClosed(alice) + // The device remembers it as well. + assertEquals(Language.EN, s.current.value) + assertEquals(LanguageChoice.Fixed(Language.EN), s.deviceChoice) + } + + @Test + fun aNewAccountStartsWithTheLanguageInUse() { + val s = LanguageSettings(prefs, listOf("en-US")) + assertEquals(Language.EN, s.registered(alice)) + // The system changes later; the account keeps its language. + s.systemChanged(listOf("zh-CN")) + s.accountOpened(alice) + assertEquals(Language.EN, s.current.value) + assertEquals(LanguageChoice.Fixed(Language.EN), s.choice) + } + + @Test + fun coreMessagesFollowTheLanguage() { + val s = LanguageSettings(prefs, listOf("en-US")) + assertEquals("Wrong username or password", L10n.s.wrongCredentials) + assertEquals("Global", SyncRegion.GLOBAL.title) + assertEquals("Enter the server address", ServerAddress.ParseError.Empty.message) + assertEquals("Request failed (418)", ApiError.Server(418, "").message) + s.choose(LanguageChoice.Fixed(Language.ZH)) + assertEquals("全球", SyncRegion.GLOBAL.title) + assertEquals("请填写服务器地址", ServerAddress.ParseError.Empty.message) + assertEquals("1 change to sync", EnStrings.pending(1)) + assertEquals("2 changes to sync", EnStrings.pending(2)) + } +} diff --git a/editor-web/main.ts b/editor-web/main.ts index 41efafd..c67b074 100644 --- a/editor-web/main.ts +++ b/editor-web/main.ts @@ -3,7 +3,7 @@ // Kept in step with the Apple client's EditorWeb/main.ts. // // Kotlin → JS: window.ivy.load / setBody / setTitles / setKinds / setTheme / -// setReadonly / focus / command / scrollToLine / insert +// setLanguage / setReadonly / focus / command / scrollToLine / insert // JS → Kotlin: IvyAndroid.postMessage(JSON.stringify({ type, ... })) // ready the page can take a document // change {id, body} the user edited the note @@ -61,6 +61,17 @@ let kinds: Record<string, string> = {}; let lastEmitted = ''; let view: EditorView | null = null; const roConf = new Compartment(); +const placeholderConf = new Compartment(); + +// --- the interface language (setLanguage): the placeholder, and the words +// formatting wraps around an empty selection --- + +const words = { + zh: { placeholder: '开始写作…', bold: '加粗', italic: '斜体', strike: '删除线' }, + en: { placeholder: 'Start writing…', bold: 'bold', italic: 'italic', strike: 'strikethrough' } +}; +let lang: keyof typeof words = 'zh'; +const w = () => words[lang]; /** Same-origin path the native scheme handler answers with the attachment. */ function resource(id: string, thumb?: boolean): string { @@ -95,13 +106,13 @@ function extensions(readonly: boolean) { markdownHighlight, baseTheme, EditorView.lineWrapping, - placeholder('开始写作…'), + placeholderConf.of(placeholder(w().placeholder)), autocompletion({ override: [wikiCompletion(completions)], icons: false, activateOnTyping: true }), keymap.of([ - { key: 'Mod-b', run: (v) => toggleWrap(v, '**', '加粗') }, - { key: 'Mod-i', run: (v) => toggleWrap(v, '*', '斜体') }, + { key: 'Mod-b', run: (v) => toggleWrap(v, '**', w().bold) }, + { key: 'Mod-i', run: (v) => toggleWrap(v, '*', w().italic) }, { key: 'Mod-e', run: (v) => toggleWrap(v, '`', 'code') }, - { key: 'Mod-Shift-x', run: (v) => toggleWrap(v, '~~', '删除线') }, + { key: 'Mod-Shift-x', run: (v) => toggleWrap(v, '~~', w().strike) }, { key: 'Mod-k', run: insertLink }, { key: 'Mod-Shift-k', run: insertWiki }, { key: 'Mod-Alt-1', run: (v) => toggleLinePrefix(v, '# ') }, @@ -215,6 +226,13 @@ window.ivy = { insertText(view, text, block); }, + /** `zh` or `en`, as the app's interface. */ + setLanguage(l: string) { + lang = l === 'en' ? 'en' : 'zh'; + document.documentElement.lang = lang === 'zh' ? 'zh-CN' : 'en'; + view?.dispatch({ effects: placeholderConf.reconfigure(placeholder(w().placeholder)) }); + }, + setTheme(dark: boolean) { document.documentElement.dataset.theme = dark ? 'dark' : 'light'; }, @@ -241,9 +259,9 @@ window.ivy = { command(name: string) { if (!view) return; switch (name) { - case 'bold': toggleWrap(view, '**', '加粗'); break; - case 'italic': toggleWrap(view, '*', '斜体'); break; - case 'strike': toggleWrap(view, '~~', '删除线'); break; + case 'bold': toggleWrap(view, '**', w().bold); break; + case 'italic': toggleWrap(view, '*', w().italic); break; + case 'strike': toggleWrap(view, '~~', w().strike); break; case 'code': toggleWrap(view, '`', 'code'); break; case 'h1': toggleLinePrefix(view, '# '); break; case 'h2': toggleLinePrefix(view, '## '); break; From c46bf16f4c66607c2a5d949a17ae0029352e2950 Mon Sep 17 00:00:00 2001 From: Claude <noreply@anthropic.com> Date: Fri, 6 Nov 2026 18:25:03 +0000 Subject: [PATCH 2/5] Import L10n and Language where a property named app shadows the package Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NZ7eDkNbqLj8z7BEXeW8wW --- app/src/main/kotlin/app/ivynote/android/LibrarySession.kt | 3 ++- .../main/kotlin/app/ivynote/android/editor/EditorHost.kt | 8 +++++--- .../main/kotlin/app/ivynote/android/ui/LibraryScreen.kt | 3 ++- app/src/main/kotlin/app/ivynote/android/ui/NoteScreen.kt | 3 ++- 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/app/src/main/kotlin/app/ivynote/android/LibrarySession.kt b/app/src/main/kotlin/app/ivynote/android/LibrarySession.kt index a04278b..cb324aa 100644 --- a/app/src/main/kotlin/app/ivynote/android/LibrarySession.kt +++ b/app/src/main/kotlin/app/ivynote/android/LibrarySession.kt @@ -9,6 +9,7 @@ import app.ivynote.android.editor.AttachmentLoader import app.ivynote.android.editor.EditorHost import app.ivynote.android.platform.SqliteDocumentStore import app.ivynote.android.platform.networkAvailable +import app.ivynote.core.L10n import app.ivynote.core.AddedFile import app.ivynote.core.ApiClient import app.ivynote.core.ApiError @@ -88,7 +89,7 @@ class LibrarySession private constructor( val type = resolver.getType(uri) ?: name?.substringAfterLast('.', "")?.lowercase()?.let { MimeTypeMap.getSingleton().getMimeTypeFromExtension(it) } ?: "application/octet-stream" - (resolver.openInputStream(uri) ?: throw java.io.IOException(app.ivynote.core.L10n.s.cannotReadFile)).use { input -> + (resolver.openInputStream(uri) ?: throw java.io.IOException(L10n.s.cannotReadFile)).use { input -> tmp.outputStream().use { input.copyTo(it) } } (name ?: fallbackName ?: defaultName(type)) to type diff --git a/app/src/main/kotlin/app/ivynote/android/editor/EditorHost.kt b/app/src/main/kotlin/app/ivynote/android/editor/EditorHost.kt index f419eb5..4b50fbc 100644 --- a/app/src/main/kotlin/app/ivynote/android/editor/EditorHost.kt +++ b/app/src/main/kotlin/app/ivynote/android/editor/EditorHost.kt @@ -27,6 +27,8 @@ import androidx.webkit.WebViewFeature import app.ivynote.android.BuildConfig import app.ivynote.android.IvyApp import app.ivynote.android.LibrarySession +import app.ivynote.core.L10n +import app.ivynote.core.Language import app.ivynote.core.Attachment import app.ivynote.core.IvyJson import app.ivynote.core.Note @@ -121,7 +123,7 @@ class EditorHost(appContext: Context, private val session: LibrarySession) { sendTitles() refreshKinds() call("ivy.setTheme($dark)") - setLanguage(app.ivynote.core.L10n.language) + setLanguage(L10n.language) val payload = buildJsonObject { put("id", note.id) put("body", note.body) @@ -177,12 +179,12 @@ class EditorHost(appContext: Context, private val session: LibrarySession) { fun setReadonly(ro: Boolean) = call("ivy.setReadonly($ro)") /** The placeholder and the words formatting wraps around an empty selection. */ - fun setLanguage(language: app.ivynote.core.Language) { + fun setLanguage(language: Language) { if (language == sentLanguage) return sentLanguage = language call("ivy.setLanguage(${JsonPrimitive(language.tag)})") } - private var sentLanguage: app.ivynote.core.Language? = null + private var sentLanguage: Language? = null fun setTheme(dark: Boolean) { this.dark = dark diff --git a/app/src/main/kotlin/app/ivynote/android/ui/LibraryScreen.kt b/app/src/main/kotlin/app/ivynote/android/ui/LibraryScreen.kt index 01e42c5..a81047c 100644 --- a/app/src/main/kotlin/app/ivynote/android/ui/LibraryScreen.kt +++ b/app/src/main/kotlin/app/ivynote/android/ui/LibraryScreen.kt @@ -39,6 +39,7 @@ import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp import app.ivynote.android.IvyApp import app.ivynote.android.LibrarySession +import app.ivynote.core.L10n import app.ivynote.core.SessionStore import app.ivynote.core.Shelf import app.ivynote.core.displayTitle @@ -161,7 +162,7 @@ fun LibraryScreen(lib: LibrarySession, session: SessionStore?) { val context = androidx.compose.ui.platform.LocalContext.current LaunchedEffect(refused) { val f = refused ?: return@LaunchedEffect - toast(context, app.ivynote.core.L10n.s.uploadRefused(f.name, f.message), long = true) + toast(context, L10n.s.uploadRefused(f.name, f.message), long = true) engine.clearUploadFailure() } diff --git a/app/src/main/kotlin/app/ivynote/android/ui/NoteScreen.kt b/app/src/main/kotlin/app/ivynote/android/ui/NoteScreen.kt index 9969f35..4243004 100644 --- a/app/src/main/kotlin/app/ivynote/android/ui/NoteScreen.kt +++ b/app/src/main/kotlin/app/ivynote/android/ui/NoteScreen.kt @@ -75,6 +75,7 @@ import androidx.compose.ui.text.style.TextOverflow import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp import androidx.compose.ui.viewinterop.AndroidView +import app.ivynote.core.L10n import app.ivynote.core.Links import app.ivynote.core.Outline import app.ivynote.core.SyncEngine @@ -124,7 +125,7 @@ fun NoteScreen(ui: LibraryUiState, noteId: String, wide: Boolean, onBack: () -> host.open(n, focus = n.body.isEmpty() && n.title.isEmpty() && !n.isTrashed) } LaunchedEffect(dark) { host.setTheme(dark) } - LaunchedEffect(s) { host.setLanguage(app.ivynote.core.L10n.language) } + LaunchedEffect(s) { host.setLanguage(L10n.language) } LaunchedEffect(note.body) { host.bodyChanged(noteId, note.body) } LaunchedEffect(note.isTrashed) { host.setReadonly(note.isTrashed) } // New and uploaded files: embeds render as their kind. From 29112fd3229284b0313c2110da31fa7a8f2cb5b5 Mon Sep 17 00:00:00 2001 From: Claude <noreply@anthropic.com> Date: Fri, 6 Nov 2026 18:29:48 +0000 Subject: [PATCH 3/5] Keep the interface language on the account, as the server now does User.language (from /me and sign-in) comes first when a synced library is open; "" means not set and falls back to this device's choice, then the system. Choosing in settings while signed in sends PATCH /me {language} ("follow the system" clears it); a change made offline is kept as pending, wins over the server's older value and is sent on the next open or return to the foreground. Registration sends the language in use. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NZ7eDkNbqLj8z7BEXeW8wW --- README.md | 9 +-- .../main/kotlin/app/ivynote/android/IvyApp.kt | 3 - .../kotlin/app/ivynote/android/ui/Root.kt | 31 ++++++-- .../kotlin/app/ivynote/android/ui/SignIn.kt | 4 -- .../main/kotlin/app/ivynote/core/ApiClient.kt | 8 ++- .../main/kotlin/app/ivynote/core/Language.kt | 72 +++++++++---------- .../main/kotlin/app/ivynote/core/Models.kt | 2 + .../kotlin/app/ivynote/core/SessionStore.kt | 26 +++++++ .../kotlin/app/ivynote/core/ApiClientTest.kt | 15 ++++ .../kotlin/app/ivynote/core/LanguageTest.kt | 55 +++++++------- 10 files changed, 146 insertions(+), 79 deletions(-) diff --git a/README.md b/README.md index fe9fcba..5bc2e3c 100644 --- a/README.md +++ b/README.md @@ -80,10 +80,11 @@ repository does not keep a copy. The language follows the system (the first supported one in its list, English otherwise) until one is picked under 语言 · Language (library menu, libraries list, account sheet); the choice is remembered. Signed in - to a synced library, the account's language comes first; a new account - starts with the language in use when it was registered (`LanguageSettings`). - Until the server stores it, the account's language is kept on this device - per account; `IvyApp` marks where it will be sent and read. + to a synced library, the account's language (`User.language`) comes first; + choosing there also saves it to the account (`PATCH /me {language}`, kept + as pending and sent later when offline; "follow the system" clears it). + A new account is registered with the language in use (`language` in + `POST /auth/register`). See guide §界面语言 and `LanguageSettings`. ## Layout diff --git a/app/src/main/kotlin/app/ivynote/android/IvyApp.kt b/app/src/main/kotlin/app/ivynote/android/IvyApp.kt index f843a81..adbf8d9 100644 --- a/app/src/main/kotlin/app/ivynote/android/IvyApp.kt +++ b/app/src/main/kotlin/app/ivynote/android/IvyApp.kt @@ -53,9 +53,6 @@ class IvyApp : Application() { prefs = SharedPrefsStore(this) systemLocale = systemLocales(resources.configuration).firstOrNull() ?: Locale.getDefault() language = LanguageSettings(prefs, systemLocales(resources.configuration).map { it.toLanguageTag() }) - // TODO(server): once ivynote stores the account's language, send the - // choice here (PATCH /me) and pass `/me`'s value to accountOpened. - language.onAccountChoice = null applyLocale(language.current.value) appScope.launch { language.current.collect { applyLocale(it) } } // Official node addresses: the website's last answer, else the built-in ones. diff --git a/app/src/main/kotlin/app/ivynote/android/ui/Root.kt b/app/src/main/kotlin/app/ivynote/android/ui/Root.kt index cef7ba1..f9f5470 100644 --- a/app/src/main/kotlin/app/ivynote/android/ui/Root.kt +++ b/app/src/main/kotlin/app/ivynote/android/ui/Root.kt @@ -17,6 +17,7 @@ import androidx.compose.runtime.getValue import androidx.compose.runtime.key import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.remember +import androidx.compose.runtime.rememberCoroutineScope import androidx.compose.runtime.setValue import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier @@ -80,6 +81,13 @@ fun LibraryRoot(ref: LibraryRef) { } } +/** Sends a language change made on this device (maybe offline) to the account. */ +private suspend fun pushLanguage(session: SessionStore, key: String) { + val language = IvyApp.instance.language + val tag = language.pendingTag(key) ?: return + if (session.pushLanguage(tag)) language.pushed(key, tag) +} + /** Opens a library's database and drives it with the app's foreground and background. */ @Composable fun OpenLibrary(ref: LibraryRef, account: StoredAccount?, session: SessionStore?) { @@ -88,13 +96,20 @@ fun OpenLibrary(ref: LibraryRef, account: StoredAccount?, session: SessionStore? var library by remember { mutableStateOf<LibrarySession?>(null) } var openError by remember { mutableStateOf<String?>(null) } - // Signed in: the account's language comes first (LanguageSettings). - if (account != null) { + // Signed in: the account's language comes first (LanguageSettings), the + // server's value as `/me` last returned it. + if (account != null && session != null) { val key = LanguageSettings.accountKey(account.server, account.user.id) + val scope = rememberCoroutineScope() DisposableEffect(key) { - app.language.accountOpened(key) - onDispose { app.language.accountClosed(key) } + app.language.onAccountChoice = { k, _ -> if (k == key) scope.launch { pushLanguage(session, key) } } + scope.launch { pushLanguage(session, key) } + onDispose { + app.language.onAccountChoice = null + app.language.accountClosed(key) + } } + LaunchedEffect(key, account.user.language) { app.language.accountOpened(key, account.user.language) } } LaunchedEffect(ref.id, account?.user?.id) { @@ -121,7 +136,13 @@ fun OpenLibrary(ref: LibraryRef, account: StoredAccount?, session: SessionStore? app.foreground.collect { fg -> if (fg) { lib.activate() - session?.let { launch { it.refresh() } } + session?.let { s -> + launch { + s.refresh() + // Back online: a language change made offline goes out now. + account?.let { a -> pushLanguage(s, LanguageSettings.accountKey(a.server, a.user.id)) } + } + } } else { lib.deactivate() if (!ref.isLocal) app.appScope.launch { lib.flush() } diff --git a/app/src/main/kotlin/app/ivynote/android/ui/SignIn.kt b/app/src/main/kotlin/app/ivynote/android/ui/SignIn.kt index 655bc5c..b5ff440 100644 --- a/app/src/main/kotlin/app/ivynote/android/ui/SignIn.kt +++ b/app/src/main/kotlin/app/ivynote/android/ui/SignIn.kt @@ -71,7 +71,6 @@ import app.ivynote.android.platform.SqliteDocumentStore import app.ivynote.core.ApiClient import app.ivynote.core.ApiError import app.ivynote.core.L10n -import app.ivynote.core.LanguageSettings import app.ivynote.core.LibraryMigrator import app.ivynote.core.LibraryRef import app.ivynote.core.OfficialRegions @@ -228,8 +227,6 @@ fun CloudSignInScreen(promoting: LibraryRef?, onBack: () -> Unit) { api.login(identity.trim(), password) } password = "" - // A new account starts with the language in use now. - if (registering) app.language.registered(LanguageSettings.accountKey(target, user.id)) if (promoting != null) { newAccount = Triple(target, token, user) migrate(promoting) @@ -493,7 +490,6 @@ fun SignInScreen(ref: LibraryRef, session: SessionStore) { val api = session.client(server) val (token, user) = if (mode == Mode.LOGIN) api.login(identity.trim(), password) else api.register(username.trim(), password, email.trim(), displayName.trim()) - if (mode == Mode.REGISTER) IvyApp.instance.language.registered(LanguageSettings.accountKey(server, user.id)) session.signIn(server, token, user) password = "" } catch (e: CancellationException) { diff --git a/core/src/main/kotlin/app/ivynote/core/ApiClient.kt b/core/src/main/kotlin/app/ivynote/core/ApiClient.kt index 367c060..9e5216a 100644 --- a/core/src/main/kotlin/app/ivynote/core/ApiClient.kt +++ b/core/src/main/kotlin/app/ivynote/core/ApiClient.kt @@ -44,12 +44,14 @@ class ApiClient( return r.token to r.user } - suspend fun register(username: String, password: String, email: String = "", displayName: String = ""): Pair<String, User> { + /** [language]: the interface language at sign-up; it becomes the account's. */ + suspend fun register(username: String, password: String, email: String = "", displayName: String = "", language: String = L10n.language.tag): Pair<String, User> { val body = buildJsonObject { put("username", username) put("password", password) if (email.isNotEmpty()) put("email", email) if (displayName.isNotEmpty()) put("displayName", displayName) + if (language.isNotEmpty()) put("language", language) } val r: AuthResponse = send("POST", "auth/register", body, AuthResponse.serializer()) return r.token to r.user @@ -62,6 +64,10 @@ class ApiClient( suspend fun me(): User = get("me") + /** Sets the account's interface language; "" clears it (follow the device). */ + suspend fun setLanguage(language: String): User = + send("PATCH", "me", buildJsonObject { put("language", language) }, User.serializer()) + // Sync (guide 5.4) override suspend fun snapshot(): PullResponse = get("sync/snapshot") diff --git a/core/src/main/kotlin/app/ivynote/core/Language.kt b/core/src/main/kotlin/app/ivynote/core/Language.kt index 46cd4ab..9d5d3c1 100644 --- a/core/src/main/kotlin/app/ivynote/core/Language.kt +++ b/core/src/main/kotlin/app/ivynote/core/Language.kt @@ -67,21 +67,18 @@ object L10n { } /** - * Which language the interface speaks, in this order: + * Which language the interface speaks, in this order (guide §界面语言): * - * 1. the signed-in account's choice, when a synced library is open - * (kept by the server, so it follows the user to every device); - * 2. the choice made on this device, remembered across launches; - * 3. the system's language (the first supported one in its list). + * 1. the signed-in account's language (`User.language`, kept by the server, + * the same on every device), when a synced library is open and it is set; + * 2. the choice made on this device, remembered across launches and sign-outs; + * 3. the system's language (the first supported one in its list, else English). * * Choosing in settings sets this device's choice and, when an account is - * open, the account's. A newly registered account starts with the language - * in use at that moment. - * - * Until the server stores the language (pending in ivynote), the account's - * choice is kept on this device per account; [onAccountChoice] is where it - * will be sent, and [accountOpened] takes the server's value once `/me` - * carries it. + * open, the account's (`PATCH /me {language}`; "follow the system" clears + * it). A change made offline is kept as pending and sent once the server can + * be reached ([pendingTag], [pushed]). A new account is registered with the + * language in use at that moment. */ class LanguageSettings( private val prefs: KeyValueStore, @@ -89,12 +86,12 @@ class LanguageSettings( ) { private var systemTags: List<String> = systemTags - /** The open account: its key and its choice, if any. */ + /** The open account: its key and its language, if it has one. */ private var account: String? = null - private var accountChoice: LanguageChoice? = null + private var accountLanguage: Language? = null - /** Called when the user changes an account's language: send it to the server. */ - var onAccountChoice: ((accountKey: String, choice: LanguageChoice) -> Unit)? = null + /** Called when the user changes the open account's language: send [tag] to the server. */ + var onAccountChoice: ((accountKey: String, tag: String) -> Unit)? = null private val _current = MutableStateFlow(resolve()) /** The language in use. */ @@ -110,7 +107,7 @@ class LanguageSettings( /** What the settings page shows as selected. */ val choice: LanguageChoice - get() = accountChoice ?: deviceChoice + get() = accountLanguage?.let(LanguageChoice::Fixed) ?: deviceChoice private val _selected = MutableStateFlow(choice) /** [choice], observable. */ @@ -132,22 +129,24 @@ class LanguageSettings( fun choose(choice: LanguageChoice) { if (choice == LanguageChoice.System) prefs.remove(DEVICE_KEY) else prefs.putString(DEVICE_KEY, choice.tag) account?.let { key -> - accountChoice = choice - prefs.putString(ACCOUNT_KEY_PREFIX + key, choice.tag) - onAccountChoice?.invoke(key, choice) + // "Follow the system" clears the account's language. + val tag = (choice as? LanguageChoice.Fixed)?.language?.tag ?: "" + accountLanguage = (choice as? LanguageChoice.Fixed)?.language + prefs.putString(PENDING_KEY_PREFIX + key, tag) + onAccountChoice?.invoke(key, tag) } update() } /** - * A synced library opened with a signed-in account. [serverChoice] is - * the account's language as the server has it, once it does; until then - * the choice kept on this device for this account applies, if any. + * A synced library is open with a signed-in account, or its account was + * refreshed. [serverLanguage] is `User.language` ("" when not set). A + * change not sent yet wins over it. */ - fun accountOpened(accountKey: String, serverChoice: LanguageChoice? = null) { + fun accountOpened(accountKey: String, serverLanguage: String) { account = accountKey - if (serverChoice != null) prefs.putString(ACCOUNT_KEY_PREFIX + accountKey, serverChoice.tag) - accountChoice = serverChoice ?: LanguageChoice.fromTag(prefs.getString(ACCOUNT_KEY_PREFIX + accountKey)) + val tag = pendingTag(accountKey) ?: serverLanguage + accountLanguage = Language.fromTag(tag) update() } @@ -155,22 +154,19 @@ class LanguageSettings( fun accountClosed(accountKey: String) { if (account != accountKey) return account = null - accountChoice = null + accountLanguage = null update() } - /** - * A new account was registered: it starts with the language in use now, - * as a fixed choice. Returns it, for the registration request. - */ - fun registered(accountKey: String): Language { - val language = _current.value - prefs.putString(ACCOUNT_KEY_PREFIX + accountKey, language.tag) - if (account == accountKey) accountChoice = LanguageChoice.Fixed(language) - return language + /** A language change for the account not yet saved on the server ("" clears it), if any. */ + fun pendingTag(accountKey: String): String? = prefs.getString(PENDING_KEY_PREFIX + accountKey) + + /** The server took [tag]; a newer pending change stays. */ + fun pushed(accountKey: String, tag: String) { + if (pendingTag(accountKey) == tag) prefs.remove(PENDING_KEY_PREFIX + accountKey) } - private fun resolve(): Language = when (val c = accountChoice ?: deviceChoice) { + private fun resolve(): Language = accountLanguage ?: when (val c = deviceChoice) { LanguageChoice.System -> Language.fromSystem(systemTags) is LanguageChoice.Fixed -> c.language } @@ -184,7 +180,7 @@ class LanguageSettings( companion object { const val DEVICE_KEY = "ivy.language" - const val ACCOUNT_KEY_PREFIX = "ivy.language.account." + const val PENDING_KEY_PREFIX = "ivy.language.pending." /** An account across devices: its server and user id. */ fun accountKey(server: ServerAddress, userId: String): String = "${server.base}|$userId" diff --git a/core/src/main/kotlin/app/ivynote/core/Models.kt b/core/src/main/kotlin/app/ivynote/core/Models.kt index 8af4882..8f768b0 100644 --- a/core/src/main/kotlin/app/ivynote/core/Models.kt +++ b/core/src/main/kotlin/app/ivynote/core/Models.kt @@ -25,6 +25,8 @@ data class User( val role: String = "user", val status: String = "active", val aiAvailable: Boolean = false, + /** The interface language the user chose (`zh`, `en`…); "" follows the device. */ + val language: String = "", ) { val name: String get() = displayName.ifEmpty { username } val isAdmin: Boolean get() = role == "admin" diff --git a/core/src/main/kotlin/app/ivynote/core/SessionStore.kt b/core/src/main/kotlin/app/ivynote/core/SessionStore.kt index fed06fe..06c3cb2 100644 --- a/core/src/main/kotlin/app/ivynote/core/SessionStore.kt +++ b/core/src/main/kotlin/app/ivynote/core/SessionStore.kt @@ -83,6 +83,32 @@ class SessionStore( _state.value = State.SignedIn(account) } + /** + * Saves the account's interface language on the server (`PATCH /me`). + * False when it could not be sent (offline): the caller tries again later. + */ + suspend fun pushLanguage(tag: String): Boolean { + val current = account ?: return false + val api = api ?: return false + return try { + val user = api.setLanguage(tag) + if (account?.token == current.token) { + val updated = current.copy(user = user) + runCatching { store.save(updated) } + _state.value = State.SignedIn(updated) + } + true + } catch (e: CancellationException) { + throw e + } catch (e: ApiError) { + if (e.endsSession) expire(e) + // A refused tag will not succeed later either. + !e.isTransient + } catch (e: Exception) { + false + } + } + /** Revokes this device's token (best effort) and forgets the account. */ suspend fun signOut() { api?.let { runCatching { it.logout() } } diff --git a/core/src/test/kotlin/app/ivynote/core/ApiClientTest.kt b/core/src/test/kotlin/app/ivynote/core/ApiClientTest.kt index 67f9458..eda0384 100644 --- a/core/src/test/kotlin/app/ivynote/core/ApiClientTest.kt +++ b/core/src/test/kotlin/app/ivynote/core/ApiClientTest.kt @@ -49,6 +49,21 @@ class ApiClientTest { assertEquals("application/json", req.headers["Content-Type"]) } + @Test fun registerSendsTheInterfaceLanguage() = runTest { + val stub = StubTransport(mutableMapOf("POST /api/v1/auth/register" to (200 to """{"token":"tok","user":$USER_JSON}"""))) + ApiClient(server, transport = stub).register("ivy", "secret123", language = "en") + val req = stub.sent.single() + assertEquals("""{"username":"ivy","password":"secret123","language":"en"}""", req.body!!.decodeToString()) + assertEquals(L10n.language.tag, req.headers["Accept-Language"]) + } + + @Test fun setLanguagePatchesMe() = runTest { + val user = USER_JSON.replace("\"features\":{}", "\"features\":{},\"language\":\"en\"") + val stub = StubTransport(mutableMapOf("PATCH /api/v1/me" to (200 to user))) + assertEquals("en", ApiClient(server, "tok", stub).setLanguage("en").language) + assertEquals("""{"language":"en"}""", stub.sent.single().body!!.decodeToString()) + } + @Test fun errorsCarryTheServerMessage() = runTest { val stub = StubTransport(mutableMapOf("GET /api/v1/me" to (401 to """{"error":"unauthorized","status":401}"""))) val e = assertFailsWith<ApiError.Server> { ApiClient(server, "bad", stub).me() } diff --git a/core/src/test/kotlin/app/ivynote/core/LanguageTest.kt b/core/src/test/kotlin/app/ivynote/core/LanguageTest.kt index 679323c..9259be1 100644 --- a/core/src/test/kotlin/app/ivynote/core/LanguageTest.kt +++ b/core/src/test/kotlin/app/ivynote/core/LanguageTest.kt @@ -51,47 +51,54 @@ class LanguageTest { } @Test - fun theAccountsChoiceComesFirst() { + fun theAccountsLanguageComesFirst() { val s = LanguageSettings(prefs, listOf("zh-CN")) s.choose(LanguageChoice.Fixed(Language.ZH)) - // From the server (once it stores the language). - s.accountOpened(alice, serverChoice = LanguageChoice.Fixed(Language.EN)) + s.accountOpened(alice, serverLanguage = "en") assertEquals(Language.EN, s.current.value) + assertEquals(LanguageChoice.Fixed(Language.EN), s.choice) s.accountClosed(alice) assertEquals(Language.ZH, s.current.value) - // Kept on this device for the account until the server says otherwise. - s.accountOpened(alice) - assertEquals(Language.EN, s.current.value) - // An account with no choice: this device's choice. - s.accountClosed(alice) - s.accountOpened(bob) + // No language on the account (""): this device's choice. + s.accountOpened(bob, serverLanguage = "") + assertEquals(Language.ZH, s.current.value) + // A tag this app does not speak counts as none. + s.accountClosed(bob) + s.accountOpened(bob, serverLanguage = "fr") assertEquals(Language.ZH, s.current.value) } @Test fun choosingWhileSignedInSetsTheAccountToo() { - val sent = mutableListOf<Pair<String, LanguageChoice>>() + val sent = mutableListOf<String>() val s = LanguageSettings(prefs, listOf("zh-CN")) - s.onAccountChoice = { key, choice -> sent += key to choice } - s.accountOpened(alice) + s.onAccountChoice = { key, tag -> sent += "$key=$tag" } + s.accountOpened(alice, serverLanguage = "") s.choose(LanguageChoice.Fixed(Language.EN)) - assertEquals(listOf<Pair<String, LanguageChoice>>(alice to LanguageChoice.Fixed(Language.EN)), sent) + assertEquals(listOf("$alice=en"), sent) assertEquals(Language.EN, s.current.value) - s.accountClosed(alice) - // The device remembers it as well. + // Not sent yet (offline): it wins over the server's older value. + assertEquals("en", s.pendingTag(alice)) + s.accountOpened(alice, serverLanguage = "zh") assertEquals(Language.EN, s.current.value) - assertEquals(LanguageChoice.Fixed(Language.EN), s.deviceChoice) + s.pushed(alice, "en") + assertNull(s.pendingTag(alice)) + // Following the system clears the account's language. + s.choose(LanguageChoice.System) + assertEquals("$alice=", sent.last()) + assertEquals(Language.ZH, s.current.value) + s.accountClosed(alice) + assertEquals(LanguageChoice.System, s.deviceChoice) } @Test - fun aNewAccountStartsWithTheLanguageInUse() { - val s = LanguageSettings(prefs, listOf("en-US")) - assertEquals(Language.EN, s.registered(alice)) - // The system changes later; the account keeps its language. - s.systemChanged(listOf("zh-CN")) - s.accountOpened(alice) - assertEquals(Language.EN, s.current.value) - assertEquals(LanguageChoice.Fixed(Language.EN), s.choice) + fun aPushedChangeDoesNotClearANewerOne() { + val s = LanguageSettings(prefs, listOf("zh-CN")) + s.accountOpened(alice, serverLanguage = "") + s.choose(LanguageChoice.Fixed(Language.EN)) + s.choose(LanguageChoice.Fixed(Language.ZH)) + s.pushed(alice, "en") + assertEquals("zh", s.pendingTag(alice)) } @Test From 2632431e2da0b82cdf30a4064290cc2b411ac555 Mon Sep 17 00:00:00 2001 From: Claude <noreply@anthropic.com> Date: Fri, 6 Nov 2026 18:34:02 +0000 Subject: [PATCH 4/5] Rebuild the editor page from ivynote main; keep the next library's language callback The shared editor now follows <html lang>, which setLanguage sets, so its link, task and completion words follow the interface too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NZ7eDkNbqLj8z7BEXeW8wW --- app/src/main/assets/editor/main.js | 126 +++++++++--------- .../kotlin/app/ivynote/android/ui/Root.kt | 6 +- 2 files changed, 67 insertions(+), 65 deletions(-) diff --git a/app/src/main/assets/editor/main.js b/app/src/main/assets/editor/main.js index 004ec4d..dd5c1e1 100644 --- a/app/src/main/assets/editor/main.js +++ b/app/src/main/assets/editor/main.js @@ -1,9 +1,9 @@ -import{$ as R,A as ve,B as X,C as Te,D as Ki,E as Yr,F as Ji,G as Cr,H as zr,I as es,Ia as fs,J as ts,K as rs,L as K,M as Re,N as ut,O as le,P as M,Q as Et,R as Wt,S as Mt,T as ns,U as Oe,V as f,W as is,X as Ut,Y as qr,Z as ss,_ as Be,a as Gi,aa as as,b as jr,ba as ce,c as W,ca as Ar,d as ct,da as Vt,e as J,ea as $e,f as At,fa as os,g as Z,ga as ls,h as Ie,ha as Ne,i as ie,ia as Os,j as ge,ja as he,k as _r,ka as Gt,l as Ii,la as cs,m as q,ma as hs,n as Di,na as us,o as A,p as Qe,q as ht,r as Bi,s as Ni,t as Fi,tc as ds,u as De,uc as ms,v as I,w as ee,x as v,y as Hi,ya as ps,z as Lt}from"./chunks/chunk-GJGDCSZU.js";import{a as It}from"./chunks/chunk-TO3N6BD7.js";import"./chunks/chunk-Y6SLVHK3.js";var Fe=class{constructor(e,t,n,i){this.state=e,this.pos=t,this.explicit=n,this.view=i,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(e){let t=R(this.state).resolveInner(this.pos,-1);for(;t&&e.indexOf(t.name)<0;)t=t.parent;return t?{from:t.from,to:this.pos,text:this.state.sliceDoc(t.from,this.pos),type:t.type}:null}matchBefore(e){let t=this.state.doc.lineAt(this.pos),n=Math.max(t.from,this.pos-250),i=t.text.slice(n-t.from,this.pos-t.from),s=i.search(ys(e,!1));return s<0?null:{from:n+s,to:this.pos,text:i.slice(s)}}get aborted(){return this.abortListeners==null}addEventListener(e,t,n){e=="abort"&&this.abortListeners&&(this.abortListeners.push(t),n&&n.onDocChange&&(this.abortOnDocChange=!0))}};function gs(r){let e=Object.keys(r).join(""),t=/\w/.test(e);return t&&(e=e.replace(/\w/g,"")),`[${t?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function Vl(r){let e=Object.create(null),t=Object.create(null);for(let{label:i}of r){e[i[0]]=!0;for(let s=1;s<i.length;s++)t[i[s]]=!0}let n=gs(e)+gs(t)+"*$";return[new RegExp("^"+n),new RegExp(n)]}function Hr(r){let e=r.map(i=>typeof i=="string"?{label:i}:i),[t,n]=e.every(i=>/^\w+$/.test(i.label))?[/\w*$/,/\w+$/]:Vl(e);return i=>{let s=i.matchBefore(n);return s||i.explicit?{from:s?s.from:i.pos,options:e,validFor:t}:null}}function ws(r,e){return t=>{for(let n=R(t.state).resolveInner(t.pos,-1);n;n=n.parent){if(r.indexOf(n.name)>-1)return null;if(n.type.isTop)break}return e(t)}}var Bt=class{constructor(e,t,n,i){this.completion=e,this.source=t,this.match=n,this.score=i}};function _e(r){return r.selection.main.from}function ys(r,e){var t;let{source:n}=r,i=e&&n[0]!="^",s=n[n.length-1]!="$";return!i&&!s?r:new RegExp(`${i?"^":""}(?:${n})${s?"$":""}`,(t=r.flags)!==null&&t!==void 0?t:r.ignoreCase?"i":"")}var Kr=Ii.define();function Gl(r,e,t,n){let{main:i}=r.selection,s=t-i.from,a=n-i.from;return{...r.changeByRange(o=>{if(o!=i&&t!=n&&r.sliceDoc(o.from+s,o.from+a)!=r.sliceDoc(t,n))return{range:o};let l=r.toText(e);return{changes:{from:o.from+s,to:n==i.from?o.to:o.from+a,insert:l},range:Z.cursor(o.from+s+l.length)}}),scrollIntoView:!0,userEvent:"input.complete"}}var Qs=new WeakMap;function Il(r){if(!Array.isArray(r))return r;let e=Qs.get(r);return e||Qs.set(r,e=Hr(r)),e}var Nt=q.define(),pt=q.define(),Mr=class{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let t=0;t<e.length;){let n=W(e,t),i=J(n);this.chars.push(n);let s=e.slice(t,t+i),a=s.toUpperCase();this.folded.push(W(a==s?s.toLowerCase():a,0)),t+=i}this.astral=e.length!=this.chars.length}ret(e,t){return this.score=e,this.matched=t,this}match(e){if(this.pattern.length==0)return this.ret(-100,[]);if(e.length<this.pattern.length)return null;let{chars:t,folded:n,any:i,precise:s,byWord:a}=this;if(t.length==1){let Q=W(e,0),k=J(Q),y=k==e.length?0:-100;if(Q!=t[0])if(Q==n[0])y+=-200;else return null;return this.ret(y,[0,k])}let o=e.indexOf(this.pattern);if(o==0)return this.ret(e.length==this.pattern.length?0:-100,[0,this.pattern.length]);let l=t.length,O=0;if(o<0){for(let Q=0,k=Math.min(e.length,200);Q<k&&O<l;){let y=W(e,Q);(y==t[O]||y==n[O])&&(i[O++]=Q),Q+=J(y)}if(O<l)return null}let c=0,h=0,p=!1,u=0,d=-1,m=-1,g=/[a-z]/.test(e),b=!0;for(let Q=0,k=Math.min(e.length,200),y=0;Q<k&&h<l;){let w=W(e,Q);o<0&&(c<l&&w==t[c]&&(s[c++]=Q),u<l&&(w==t[u]||w==n[u]?(u==0&&(d=Q),m=Q+1,u++):u=0));let _,G=w<255?w>=48&&w<=57||w>=97&&w<=122?2:w>=65&&w<=90?1:0:(_=ct(w))!=_.toLowerCase()?1:_!=_.toUpperCase()?2:0;(!Q||G==1&&g||y==0&&G!=0)&&(t[h]==w||n[h]==w&&(p=!0)?a[h++]=Q:a.length&&(b=!1)),y=G,Q+=J(w)}return h==l&&a[0]==0&&b?this.result(-100+(p?-200:0),a,e):u==l&&d==0?this.ret(-200-e.length+(m==e.length?0:-100),[0,m]):o>-1?this.ret(-700-e.length,[o,o+this.pattern.length]):u==l?this.ret(-900-e.length,[d,m]):h==l?this.result(-100+(p?-200:0)+-700+(b?0:-1100),a,e):t.length==2?null:this.result((i[0]?-700:0)+-200+-1100,i,e)}result(e,t,n){let i=[],s=0;for(let a of t){let o=a+(this.astral?J(W(n,a)):1);s&&i[s-1]==a?i[s-1]=o:(i[s++]=a,i[s++]=o)}return this.ret(e-n.length,i)}},Ur=class{constructor(e){this.pattern=e,this.matched=[],this.score=0,this.folded=e.toLowerCase()}match(e){if(e.length<this.pattern.length)return null;let t=e.slice(0,this.pattern.length),n=t==this.pattern?0:t.toLowerCase()==this.folded?-200:null;return n==null?null:(this.matched=[0,t.length],this.score=n+(e.length==this.pattern.length?0:-100),this)}},C=Ie.define({combine(r){return ht(r,{activateOnTyping:!0,activateOnCompletion:()=>!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:Dl,filterStrict:!1,compareCompletions:(e,t)=>(e.sortText||e.label).localeCompare(t.sortText||t.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(e,t)=>e&&t,closeOnBlur:(e,t)=>e&&t,icons:(e,t)=>e&&t,tooltipClass:(e,t)=>n=>$s(e(n),t(n)),optionClass:(e,t)=>n=>$s(e(n),t(n)),addToOptions:(e,t)=>e.concat(t),filterStrict:(e,t)=>e||t})}});function $s(r,e){return r?e?r+" "+e:r:e}function Dl(r,e,t,n,i,s){let a=r.textDirection==Hi.RTL,o=a,l=!1,O="top",c,h,p=e.left-i.left,u=i.right-e.right,d=n.right-n.left,m=n.bottom-n.top;if(o&&p<Math.min(d,u)?o=!1:!o&&u<Math.min(d,p)&&(o=!0),d<=(o?p:u))c=Math.max(i.top,Math.min(t.top,i.bottom-m))-e.top,h=Math.min(400,o?p:u);else{l=!0,h=Math.min(400,(a?e.right:i.right-e.left)-30);let Q=i.bottom-e.bottom;Q>=m||Q>e.top?c=t.bottom-e.top:(O="bottom",c=e.bottom-t.top)}let g=(e.bottom-e.top)/s.offsetHeight,b=(e.right-e.left)/s.offsetWidth;return{style:`${O}: ${c/g}px; max-width: ${h/b}px`,class:"cm-completionInfo-"+(l?a?"left-narrow":"right-narrow":o?"left":"right")}}var Jr=q.define();function Bl(r){let e=r.addToOptions.slice();return r.icons&&e.push({render(t){let n=document.createElement("div");return n.classList.add("cm-completionIcon"),t.type&&n.classList.add(...t.type.split(/\s+/g).map(i=>"cm-completionIcon-"+i)),n.setAttribute("aria-hidden","true"),n},position:20}),e.push({render(t,n,i,s){let a=document.createElement("span");a.className="cm-completionLabel";let o=t.displayLabel||t.label,l=0;for(let O=0;O<s.length;){let c=s[O++],h=s[O++];c>l&&a.appendChild(document.createTextNode(o.slice(l,c)));let p=a.appendChild(document.createElement("span"));p.appendChild(document.createTextNode(o.slice(c,h))),p.className="cm-completionMatchedText",l=h}return l<o.length&&a.appendChild(document.createTextNode(o.slice(l))),a},position:50},{render(t){if(!t.detail)return null;let n=document.createElement("span");return n.className="cm-completionDetail",n.textContent=t.detail,n},position:80}),e.sort((t,n)=>t.position-n.position).map(t=>t.render)}function Lr(r,e,t){if(r<=t)return{from:0,to:r};if(e<0&&(e=0),e<=r>>1){let i=Math.floor(e/t);return{from:i*t,to:(i+1)*t}}let n=Math.ceil((r-e)/t);return{from:r-n*t,to:r-(n-1)*t}}var Vr=class{constructor(e,t,n){this.view=e,this.stateField=t,this.applyCompletion=n,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:l=>this.placeInfo(l),key:this},this.space=null,this.currentClass="";let i=e.state.field(t),{options:s,selected:a}=i.open,o=e.state.facet(C);this.optionContent=Bl(o),this.optionClass=o.optionClass,this.tooltipClass=o.tooltipClass,this.range=Lr(s.length,a,o.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",l=>{let{options:O}=e.state.field(t).open;for(let c=l.target,h;c&&c!=this.dom;c=c.parentNode)if(c.nodeName=="LI"&&(h=/-(\d+)$/.exec(c.id))&&+h[1]<O.length){this.applyCompletion(e,O[+h[1]]),l.preventDefault();return}if(l.target==this.list){let c=this.list.classList.contains("cm-completionListIncompleteTop")&&l.clientY<this.list.firstChild.getBoundingClientRect().top?this.range.from-1:this.list.classList.contains("cm-completionListIncompleteBottom")&&l.clientY>this.list.lastChild.getBoundingClientRect().bottom?this.range.to:null;c!=null&&(e.dispatch({effects:Jr.of(c)}),l.preventDefault())}}),this.dom.addEventListener("focusout",l=>{let O=e.state.field(this.stateField,!1);O&&O.tooltip&&e.state.facet(C).closeOnBlur&&l.relatedTarget!=e.contentDOM&&e.dispatch({effects:pt.of(null)})}),this.showOptions(s,i.id)}mount(){this.updateSel()}showOptions(e,t){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e,t,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}update(e){var t;let n=e.state.field(this.stateField),i=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),n!=i){let{options:s,selected:a,disabled:o}=n.open;(!i.open||i.open.options!=s)&&(this.range=Lr(s.length,a,e.state.facet(C).maxRenderedOptions),this.showOptions(s,n.id)),this.updateSel(),o!=((t=i.open)===null||t===void 0?void 0:t.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!o)}}updateTooltipClass(e){let t=this.tooltipClass(e);if(t!=this.currentClass){for(let n of this.currentClass.split(" "))n&&this.dom.classList.remove(n);for(let n of t.split(" "))n&&this.dom.classList.add(n);this.currentClass=t}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),t=e.open;(t.selected>-1&&t.selected<this.range.from||t.selected>=this.range.to)&&(this.range=Lr(t.options.length,t.selected,this.view.state.facet(C).maxRenderedOptions),this.showOptions(t.options,e.id));let n=this.updateSelectedOption(t.selected);if(n){this.destroyInfo();let{completion:i}=t.options[t.selected],{info:s}=i;if(!s)return;let a=typeof s=="string"?document.createTextNode(s):s(i);if(!a)return;"then"in a?a.then(o=>{o&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(o,i)}).catch(o=>Lt(this.view.state,o,"completion info")):(this.addInfoPane(a,i),n.setAttribute("aria-describedby",this.info.id))}}addInfoPane(e,t){this.destroyInfo();let n=this.info=document.createElement("div");if(n.className="cm-tooltip cm-completionInfo",n.id="cm-completionInfo-"+Math.floor(Math.random()*65535).toString(16),e.nodeType!=null)n.appendChild(e),this.infoDestroy=null;else{let{dom:i,destroy:s}=e;n.appendChild(i),this.infoDestroy=s||null}this.dom.appendChild(n),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let t=null;for(let n=this.list.firstChild,i=this.range.from;n;n=n.nextSibling,i++)n.nodeName!="LI"||!n.id?i--:i==e?n.hasAttribute("aria-selected")||(n.setAttribute("aria-selected","true"),t=n):n.hasAttribute("aria-selected")&&(n.removeAttribute("aria-selected"),n.removeAttribute("aria-describedby"));return t&&Fl(this.list,t),t}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let t=this.dom.getBoundingClientRect(),n=this.info.getBoundingClientRect(),i=e.getBoundingClientRect(),s=this.space;if(!s){let a=this.dom.ownerDocument.documentElement;s={left:0,top:0,right:a.clientWidth,bottom:a.clientHeight}}return i.top>Math.min(s.bottom,t.bottom)-10||i.bottom<Math.max(s.top,t.top)+10?null:this.view.state.facet(C).positionInfo(this.view,t,i,n,s,this.dom)}placeInfo(e){this.info&&(e?(e.style&&(this.info.style.cssText=e.style),this.info.className="cm-tooltip cm-completionInfo "+(e.class||"")):this.info.style.cssText="top: -1e6px")}createListBox(e,t,n){let i=document.createElement("ul");i.id=t,i.setAttribute("role","listbox"),i.setAttribute("aria-expanded","true"),i.setAttribute("aria-label",this.view.state.phrase("Completions")),i.addEventListener("mousedown",a=>{a.target==i&&a.preventDefault()});let s=null;for(let a=n.from;a<n.to;a++){let{completion:o,match:l}=e[a],{section:O}=o;if(O){let p=typeof O=="string"?O:O.name;if(p!=s&&(a>n.from||n.from==0))if(s=p,typeof O!="string"&&O.header)i.appendChild(O.header(O));else{let u=i.appendChild(document.createElement("completion-section"));u.textContent=p}}let c=i.appendChild(document.createElement("li"));c.id=t+"-"+a,c.setAttribute("role","option");let h=this.optionClass(o);h&&(c.className=h);for(let p of this.optionContent){let u=p(o,this.view.state,this.view,l);u&&c.appendChild(u)}}return n.from&&i.classList.add("cm-completionListIncompleteTop"),n.to<e.length&&i.classList.add("cm-completionListIncompleteBottom"),i}destroyInfo(){this.info&&(this.infoDestroy&&this.infoDestroy(),this.info.remove(),this.info=null)}destroy(){this.destroyInfo()}};function Nl(r,e){return t=>new Vr(t,r,e)}function Fl(r,e){let t=r.getBoundingClientRect(),n=e.getBoundingClientRect(),i=t.height/r.offsetHeight;n.top<t.top?r.scrollTop-=(t.top-n.top)/i:n.bottom>t.bottom&&(r.scrollTop+=(n.bottom-t.bottom)/i)}function bs(r){return(r.boost||0)*100+(r.apply?10:0)+(r.info?5:0)+(r.type?1:0)}function Hl(r,e){let t=[],n=null,i=null,s=c=>{t.push(c);let{section:h}=c.completion;if(h){n||(n=[]);let p=typeof h=="string"?h:h.name;n.some(u=>u.name==p)||n.push(typeof h=="string"?{name:p}:h)}},a=e.facet(C);for(let c of r)if(c.hasResult()){let h=c.result.getMatch;if(c.result.filter===!1)for(let p of c.result.options)s(new Bt(p,c.source,h?h(p):[],1e9-t.length));else{let p=e.sliceDoc(c.from,c.to),u,d=a.filterStrict?new Ur(p):new Mr(p);for(let m of c.result.options)if(u=d.match(m.label)){let g=m.displayLabel?h?h(m,u.matched):[]:u.matched,b=u.score+(m.boost||0);if(s(new Bt(m,c.source,g,b)),typeof m.section=="object"&&m.section.rank==="dynamic"){let{name:Q}=m.section;i||(i=Object.create(null)),i[Q]=Math.max(b,i[Q]||-1e9)}}}}if(n){let c=Object.create(null),h=0,p=(u,d)=>(u.rank==="dynamic"&&d.rank==="dynamic"?i[d.name]-i[u.name]:0)||(typeof u.rank=="number"?u.rank:1e9)-(typeof d.rank=="number"?d.rank:1e9)||(u.name<d.name?-1:1);for(let u of n.sort(p))h-=1e5,c[u.name]=h;for(let u of t){let{section:d}=u.completion;d&&(u.score+=c[typeof d=="string"?d:d.name])}}let o=[],l=null,O=a.compareCompletions;for(let c of t.sort((h,p)=>p.score-h.score||O(h.completion,p.completion))){let h=c.completion;!l||l.label!=h.label||l.detail!=h.detail||l.type!=null&&h.type!=null&&l.type!=h.type||l.apply!=h.apply||l.boost!=h.boost?o.push(c):bs(c.completion)>bs(l)&&(o[o.length-1]=c),l=c.completion}return o}var Gr=class r{constructor(e,t,n,i,s,a){this.options=e,this.attrs=t,this.tooltip=n,this.timestamp=i,this.selected=s,this.disabled=a}setSelected(e,t){return e==this.selected||e>=this.options.length?this:new r(this.options,Ss(t,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,t,n,i,s,a){if(i&&!a&&e.some(O=>O.isPending))return i.setDisabled();let o=Hl(e,t);if(!o.length)return i&&e.some(O=>O.isPending)?i.setDisabled():null;let l=t.facet(C).selectOnOpen?0:-1;if(i&&i.selected!=l&&i.selected!=-1){let O=i.options[i.selected].completion;for(let c=0;c<o.length;c++)if(o[c].completion==O){l=c;break}}return new r(o,Ss(n,l),{pos:e.reduce((O,c)=>c.hasResult()?Math.min(O,c.from):O,1e8),create:nO,above:s.aboveCursor},i?i.timestamp:Date.now(),l,!1)}map(e){return new r(this.options,this.attrs,{...this.tooltip,pos:e.mapPos(this.tooltip.pos)},this.timestamp,this.selected,this.disabled)}setDisabled(){return new r(this.options,this.attrs,this.tooltip,this.timestamp,this.selected,!0)}},Ir=class r{constructor(e,t,n){this.active=e,this.id=t,this.open=n}static start(){return new r(tO,"cm-ac-"+Math.floor(Math.random()*2e6).toString(36),null)}update(e){let{state:t}=e,n=t.facet(C),s=(n.override||t.languageDataAt("autocomplete",_e(t)).map(Il)).map(l=>(this.active.find(c=>c.source==l)||new ue(l,this.active.some(c=>c.state!=0)?1:0)).update(e,n));s.length==this.active.length&&s.every((l,O)=>l==this.active[O])&&(s=this.active);let a=this.open,o=e.effects.some(l=>l.is(en));a&&e.docChanged&&(a=a.map(e.changes)),e.selection||s.some(l=>l.hasResult()&&e.changes.touchesRange(l.from,l.to))||!Kl(s,this.active)||o?a=Gr.build(s,t,this.id,a,n,o):a&&a.disabled&&!s.some(l=>l.isPending)&&(a=null),!a&&s.every(l=>!l.isPending)&&s.some(l=>l.hasResult())&&(s=s.map(l=>l.hasResult()?new ue(l.source,0):l));for(let l of e.effects)l.is(Jr)&&(a=a&&a.setSelected(l.value,this.id));return s==this.active&&a==this.open?this:new r(s,this.id,a)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?Jl:eO}};function Kl(r,e){if(r==e)return!0;for(let t=0,n=0;;){for(;t<r.length&&!r[t].hasResult();)t++;for(;n<e.length&&!e[n].hasResult();)n++;let i=t==r.length,s=n==e.length;if(i||s)return i==s;if(r[t++].result!=e[n++].result)return!1}}var Jl={"aria-autocomplete":"list"},eO={};function Ss(r,e){let t={"aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":r};return e>-1&&(t["aria-activedescendant"]=r+"-"+e),t}var tO=[];function Zs(r,e){if(r.isUserEvent("input.complete")){let n=r.annotation(Kr);if(n&&e.activateOnCompletion(n))return 12}let t=r.isUserEvent("input.type");return t&&e.activateOnTyping?5:t?1:r.isUserEvent("delete.backward")?2:r.selection?8:r.docChanged?16:0}var ue=class r{constructor(e,t,n=!1){this.source=e,this.state=t,this.explicit=n}hasResult(){return!1}get isPending(){return this.state==1}update(e,t){let n=Zs(e,t),i=this;(n&8||n&16&&this.touches(e))&&(i=new r(i.source,0)),n&4&&i.state==0&&(i=new r(this.source,1)),i=i.updateFor(e,n);for(let s of e.effects)if(s.is(Nt))i=new r(i.source,1,s.value);else if(s.is(pt))i=new r(i.source,0);else if(s.is(en))for(let a of s.value)a.source==i.source&&(i=a);return i}updateFor(e,t){return this.map(e.changes)}map(e){return this}touches(e){return e.changes.touchesRange(_e(e.state))}},Ft=class r extends ue{constructor(e,t,n,i,s,a){super(e,3,t),this.limit=n,this.result=i,this.from=s,this.to=a}hasResult(){return!0}updateFor(e,t){var n;if(!(t&3))return this.map(e.changes);let i=this.result;i.map&&!e.changes.empty&&(i=i.map(i,e.changes));let s=e.changes.mapPos(this.from),a=e.changes.mapPos(this.to,1),o=_e(e.state);if(o>a||!i||t&2&&(_e(e.startState)==this.from||o<this.limit))return new ue(this.source,t&4?1:0);let l=e.changes.mapPos(this.limit);return rO(i.validFor,e.state,s,a)?new r(this.source,this.explicit,l,i,s,a):i.update&&(i=i.update(i,s,a,new Fe(e.state,o,!1)))?new r(this.source,this.explicit,l,i,i.from,(n=i.to)!==null&&n!==void 0?n:_e(e.state)):new ue(this.source,1,this.explicit)}map(e){if(e.empty)return this;let t=this.result.map?this.result.map(this.result,e):this.result;return t?new r(this.source,this.explicit,e.mapPos(this.limit),t,e.mapPos(this.from),e.mapPos(this.to,1)):new ue(this.source,0)}touches(e){return e.changes.touchesRange(this.from,this.to)}};function rO(r,e,t,n){if(!r)return!1;let i=e.sliceDoc(t,n);return typeof r=="function"?r(i,t,n,e):ys(r,!0).test(i)}var en=q.define({map(r,e){return r.map(t=>t.map(e))}}),U=ie.define({create(){return Ir.start()},update(r,e){return r.update(e)},provide:r=>[Ji.from(r,e=>e.tooltip),X.contentAttributes.from(r,e=>e.attrs)]});function tn(r,e){let t=e.completion.apply||e.completion.label,n=r.state.field(U).active.find(i=>i.source==e.source);return n instanceof Ft?(typeof t=="string"?r.dispatch({...Gl(r.state,t,n.from,n.to),annotations:Kr.of(e.completion)}):t(r,e.completion,n.from,n.to),!0):!1}var nO=Nl(U,tn);function Dt(r,e="option"){return t=>{let n=t.state.field(U,!1);if(!n||!n.open||n.open.disabled||Date.now()-n.open.timestamp<t.state.facet(C).interactionDelay)return!1;let i=1,s;e=="page"&&(s=Cr(t,n.open.tooltip))&&(i=Math.max(2,Math.floor(s.dom.offsetHeight/s.dom.querySelector("li").offsetHeight)-1));let{length:a}=n.open.options,o=n.open.selected>-1?n.open.selected+i*(r?1:-1):r?0:a-1;return o<0?o=e=="page"?0:a-1:o>=a&&(o=e=="page"?a-1:0),t.dispatch({effects:Jr.of(o)}),!0}}var iO=r=>{let e=r.state.field(U,!1);return r.state.readOnly||!e||!e.open||e.open.selected<0||e.open.disabled||Date.now()-e.open.timestamp<r.state.facet(C).interactionDelay?!1:tn(r,e.open.options[e.open.selected])},Er=r=>r.state.field(U,!1)?(r.dispatch({effects:Nt.of(!0)}),!0):!1,sO=r=>{let e=r.state.field(U,!1);return!e||!e.active.some(t=>t.state!=0)?!1:(r.dispatch({effects:pt.of(null)}),!0)},Dr=class{constructor(e,t){this.active=e,this.context=t,this.time=Date.now(),this.updates=[],this.done=void 0}},aO=50,oO=1e3,lO=ve.fromClass(class{constructor(r){this.view=r,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let e of r.state.field(U).active)e.isPending&&this.startQuery(e)}update(r){let e=r.state.field(U),t=r.state.facet(C);if(!r.selectionSet&&!r.docChanged&&r.startState.field(U)==e)return;let n=r.transactions.some(s=>{let a=Zs(s,t);return a&8||(s.selection||s.docChanged)&&!(a&3)});for(let s=0;s<this.running.length;s++){let a=this.running[s];if(n||a.context.abortOnDocChange&&r.docChanged||a.updates.length+r.transactions.length>aO&&Date.now()-a.time>oO){for(let o of a.context.abortListeners)try{o()}catch(l){Lt(this.view.state,l)}a.context.abortListeners=null,this.running.splice(s--,1)}else a.updates.push(...r.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),r.transactions.some(s=>s.effects.some(a=>a.is(Nt)))&&(this.pendingStart=!0);let i=this.pendingStart?50:t.activateOnTypingDelay;if(this.debounceUpdate=e.active.some(s=>s.isPending&&!this.running.some(a=>a.active.source==s.source))?setTimeout(()=>this.startUpdate(),i):-1,this.composing!=0)for(let s of r.transactions)s.isUserEvent("input.type")?this.composing=2:this.composing==2&&s.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:r}=this.view,e=r.field(U);for(let t of e.active)t.isPending&&!this.running.some(n=>n.active.source==t.source)&&this.startQuery(t);this.running.length&&e.open&&e.open.disabled&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(C).updateSyncTime))}startQuery(r){let{state:e}=this.view,t=_e(e),n=new Fe(e,t,r.explicit,this.view),i=new Dr(r,n);this.running.push(i),Promise.resolve(r.source(n)).then(s=>{i.context.aborted||(i.done=s||null,this.scheduleAccept())},s=>{this.view.dispatch({effects:pt.of(null)}),Lt(this.view.state,s)})}scheduleAccept(){this.running.every(r=>r.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(C).updateSyncTime))}accept(){var r;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],t=this.view.state.facet(C),n=this.view.state.field(U);for(let i=0;i<this.running.length;i++){let s=this.running[i];if(s.done===void 0)continue;if(this.running.splice(i--,1),s.done){let o=_e(s.updates.length?s.updates[0].startState:this.view.state),l=Math.min(o,s.done.from+(s.active.explicit?0:1)),O=new Ft(s.active.source,s.active.explicit,l,s.done,s.done.from,(r=s.done.to)!==null&&r!==void 0?r:o);for(let c of s.updates)O=O.update(c,t);if(O.hasResult()){e.push(O);continue}}let a=n.active.find(o=>o.source==s.active.source);if(a&&a.isPending)if(s.done==null){let o=new ue(s.active.source,0);for(let l of s.updates)o=o.update(l,t);o.isPending||e.push(o)}else this.startQuery(a)}(e.length||n.open&&n.open.disabled)&&this.view.dispatch({effects:en.of(e)})}},{eventHandlers:{blur(r){let e=this.view.state.field(U,!1);if(e&&e.tooltip&&this.view.state.facet(C).closeOnBlur){let t=e.open&&Cr(this.view,e.open.tooltip);(!t||!t.dom.contains(r.relatedTarget))&&setTimeout(()=>this.view.dispatch({effects:pt.of(null)}),10)}},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:Nt.of(!1)}),20),this.composing=0}}}),OO=typeof navigator=="object"&&/Win/.test(navigator.platform),cO=ge.highest(X.domEventHandlers({keydown(r,e){let t=e.state.field(U,!1);if(!t||!t.open||t.open.disabled||t.open.selected<0||!r.key||r.key.length>1||r.ctrlKey&&!(OO&&r.altKey)||r.metaKey)return!1;let n=t.open.options[t.open.selected],i=t.active.find(a=>a.source==n.source),s=n.completion.commitCharacters||i.result.commitCharacters;return s&&s.indexOf(r.key)>-1&&tn(e,n),!1}})),Xs=X.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"\xB7\xB7\xB7"',opacity:.5,display:"block",textAlign:"center",cursor:"pointer"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box",whiteSpace:"pre-line"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'\u0192'"}},".cm-completionIcon-class":{"&:after":{content:"'\u25CB'"}},".cm-completionIcon-interface":{"&:after":{content:"'\u25CC'"}},".cm-completionIcon-variable":{"&:after":{content:"'\u{1D465}'"}},".cm-completionIcon-constant":{"&:after":{content:"'\u{1D436}'"}},".cm-completionIcon-type":{"&:after":{content:"'\u{1D461}'"}},".cm-completionIcon-enum":{"&:after":{content:"'\u222A'"}},".cm-completionIcon-property":{"&:after":{content:"'\u25A1'"}},".cm-completionIcon-keyword":{"&:after":{content:"'\u{1F511}\uFE0E'"}},".cm-completionIcon-namespace":{"&:after":{content:"'\u25A2'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}}),Br=class{constructor(e,t,n,i){this.field=e,this.line=t,this.from=n,this.to=i}},Nr=class r{constructor(e,t,n){this.field=e,this.from=t,this.to=n}map(e){let t=e.mapPos(this.from,-1,At.TrackDel),n=e.mapPos(this.to,1,At.TrackDel);return t==null||n==null?null:new r(this.field,t,n)}},Fr=class r{constructor(e,t){this.lines=e,this.fieldPositions=t}instantiate(e,t){let n=[],i=[t],s=e.doc.lineAt(t),a=/^\s*/.exec(s.text)[0];for(let l of this.lines){if(n.length){let O=a,c=/^\t*/.exec(l)[0].length;for(let h=0;h<c;h++)O+=e.facet(Vt);i.push(t+O.length-c),l=O+l.slice(c)}n.push(l),t+=l.length+1}let o=this.fieldPositions.map(l=>new Nr(l.field,i[l.line]+l.from,i[l.line]+l.to));return{text:n,ranges:o}}static parse(e){let t=[],n=[],i=[],s;for(let a of e.split(/\r\n?|\n/)){for(;s=/[#$]\{(?:(\d+)(?::([^{}]*))?|((?:\\[{}]|[^{}])*))\}/.exec(a);){let o=s[1]?+s[1]:null,l=s[2]||s[3]||"",O=-1;o===0&&(o=1e9);let c=l.replace(/\\[{}]/g,h=>h[1]);for(let h=0;h<t.length;h++)(o!=null?t[h].seq==o:c&&t[h].name==c)&&(O=h);if(O<0){let h=0;for(;h<t.length&&(o==null||t[h].seq!=null&&t[h].seq<o);)h++;t.splice(h,0,{seq:o,name:c}),O=h;for(let p of i)p.field>=O&&p.field++}for(let h of i)if(h.line==n.length&&h.from>s.index){let p=s[2]?3+(s[1]||"").length:2;h.from-=p,h.to-=p}i.push(new Br(O,n.length,s.index,s.index+c.length)),a=a.slice(0,s.index)+l+a.slice(s.index+s[0].length)}a=a.replace(/\\([{}])/g,(o,l,O)=>{for(let c of i)c.line==n.length&&c.from>O&&(c.from--,c.to--);return l}),n.push(a)}return new r(n,i)}},hO=v.widget({widget:new class extends ee{toDOM(){let r=document.createElement("span");return r.className="cm-snippetFieldPosition",r}ignoreEvent(){return!1}}}),uO=v.mark({class:"cm-snippetField"}),He=class r{constructor(e,t){this.ranges=e,this.active=t,this.deco=v.set(e.map(n=>(n.from==n.to?hO:uO).range(n.from,n.to)),!0)}map(e){let t=[];for(let n of this.ranges){let i=n.map(e);if(!i)return null;t.push(i)}return new r(t,this.active)}selectionInsideField(e){return e.ranges.every(t=>this.ranges.some(n=>n.field==this.active&&n.from<=t.from&&n.to>=t.to))}},mt=q.define({map(r,e){return r&&r.map(e)}}),pO=q.define(),ft=ie.define({create(){return null},update(r,e){for(let t of e.effects){if(t.is(mt))return t.value;if(t.is(pO)&&r)return new He(r.ranges,t.value)}return r&&e.docChanged&&(r=r.map(e.changes)),r&&e.selection&&!r.selectionInsideField(e.selection)&&(r=null),r},provide:r=>X.decorations.from(r,e=>e?e.deco:v.none)});function rn(r,e){return Z.create(r.filter(t=>t.field==e).map(t=>Z.range(t.from,t.to)))}function fO(r){let e=Fr.parse(r);return(t,n,i,s)=>{let{text:a,ranges:o}=e.instantiate(t.state,i),{main:l}=t.state.selection,O={changes:{from:i,to:s==l.from?l.to:s,insert:Gi.of(a)},scrollIntoView:!0,annotations:n?[Kr.of(n),Di.userEvent.of("input.complete")]:void 0};if(o.length&&(O.selection=rn(o,0)),o.some(c=>c.field>0)){let c=new He(o,0),h=O.effects=[mt.of(c)];t.state.field(ft,!1)===void 0&&h.push(q.appendConfig.of([ft,$O,bO,Xs]))}t.dispatch(t.state.update(O))}}function vs(r){return({state:e,dispatch:t})=>{let n=e.field(ft,!1);if(!n||r<0&&n.active==0)return!1;let i=n.active+r,s=r>0&&!n.ranges.some(a=>a.field==i+r);return t(e.update({selection:rn(n.ranges,i),effects:mt.of(s?null:new He(n.ranges,i)),scrollIntoView:!0})),!0}}var dO=({state:r,dispatch:e})=>r.field(ft,!1)?(e(r.update({effects:mt.of(null)})),!0):!1,mO=vs(1),gO=vs(-1);var QO=[{key:"Tab",run:mO,shift:gO},{key:"Escape",run:dO}],ks=Ie.define({combine(r){return r.length?r[0]:QO}}),$O=ge.highest(Te.compute([ks],r=>r.facet(ks)));function L(r,e){return{...e,apply:fO(r)}}var bO=X.domEventHandlers({mousedown(r,e){let t=e.state.field(ft,!1),n;if(!t||(n=e.posAtCoords({x:r.clientX,y:r.clientY}))==null)return!1;let i=t.ranges.find(s=>s.from<=n&&s.to>=n);return!i||i.field==t.active?!1:(e.dispatch({selection:rn(t.ranges,i.field),effects:mt.of(t.ranges.some(s=>s.field>i.field)?new He(t.ranges,i.field):null),scrollIntoView:!0}),!0)}});var dt={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},je=q.define({map(r,e){let t=e.mapPos(r,-1,At.TrackAfter);return t??void 0}}),nn=new class extends Bi{};nn.startSide=1;nn.endSide=-1;var Ts=ie.define({create(){return Ni.empty},update(r,e){if(r=r.map(e.changes),e.selection){let t=e.state.doc.lineAt(e.selection.main.head);r=r.update({filter:n=>n>=t.from&&n<=t.to})}for(let t of e.effects)t.is(je)&&(r=r.update({add:[nn.range(t.value,t.value+1)]}));return r}});function Rs(){return[kO,Ts]}var Wr="()[]{}<>\xAB\xBB\xBB\xAB\uFF3B\uFF3D\uFF5B\uFF5D";function js(r){for(let e=0;e<Wr.length;e+=2)if(Wr.charCodeAt(e)==r)return Wr.charAt(e+1);return ct(r<128?r:r+1)}function _s(r,e){return r.languageDataAt("closeBrackets",e)[0]||dt}var SO=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),kO=X.inputHandler.of((r,e,t,n)=>{if((SO?r.composing:r.compositionStarted)||r.state.readOnly)return!1;let i=r.state.selection.main;if(n.length>2||n.length==2&&J(W(n,0))==1||e!=i.from||t!=i.to)return!1;let s=xO(r.state,n);return s?(r.dispatch(s),!0):!1}),PO=({state:r,dispatch:e})=>{if(r.readOnly)return!1;let n=_s(r,r.selection.main.head).brackets||dt.brackets,i=null,s=r.changeByRange(a=>{if(a.empty){let o=wO(r.doc,a.head);for(let l of n)if(l==o&&Ht(r.doc,a.head)==js(W(l,0)))return{changes:{from:a.head-l.length,to:a.head+l.length},range:Z.cursor(a.head-l.length)}}return{range:i=a}});return i||e(r.update(s,{scrollIntoView:!0,userEvent:"delete.backward"})),!i},Ys=[{key:"Backspace",run:PO}];function xO(r,e){let t=_s(r,r.selection.main.head),n=t.brackets||dt.brackets;for(let i of n){let s=js(W(i,0));if(e==i)return s==i?XO(r,i,n.indexOf(i+i+i)>-1,t):yO(r,i,s,t.before||dt.before);if(e==s&&Cs(r,r.selection.main.from))return ZO(r,i,s)}return null}function Cs(r,e){let t=!1;return r.field(Ts).between(0,r.doc.length,n=>{n==e&&(t=!0)}),t}function Ht(r,e){let t=r.sliceString(e,e+2);return t.slice(0,J(W(t,0)))}function wO(r,e){let t=r.sliceString(e-2,e);return J(W(t,0))==t.length?t:t.slice(1)}function yO(r,e,t,n){let i=null,s=r.changeByRange(a=>{if(!a.empty)return{changes:[{insert:e,from:a.from},{insert:t,from:a.to}],effects:je.of(a.to+e.length),range:Z.range(a.anchor+e.length,a.head+e.length)};let o=Ht(r.doc,a.head);return!o||/\s/.test(o)||n.indexOf(o)>-1?{changes:{insert:e+t,from:a.head},effects:je.of(a.head+e.length),range:Z.cursor(a.head+e.length)}:{range:i=a}});return i?null:r.update(s,{scrollIntoView:!0,userEvent:"input.type"})}function ZO(r,e,t){let n=null,i=r.changeByRange(s=>s.empty&&Ht(r.doc,s.head)==t?{changes:{from:s.head,to:s.head+t.length,insert:t},range:Z.cursor(s.head+t.length)}:n={range:s});return n?null:r.update(i,{scrollIntoView:!0,userEvent:"input.type"})}function XO(r,e,t,n){let i=n.stringPrefixes||dt.stringPrefixes,s=null,a=r.changeByRange(o=>{if(!o.empty)return{changes:[{insert:e,from:o.from},{insert:e,from:o.to}],effects:je.of(o.to+e.length),range:Z.range(o.anchor+e.length,o.head+e.length)};let l=o.head,O=Ht(r.doc,l),c;if(O==e){if(Ps(r,l))return{changes:{insert:e+e,from:l},effects:je.of(l+e.length),range:Z.cursor(l+e.length)};if(Cs(r,l)){let p=t&&r.sliceDoc(l,l+e.length*3)==e+e+e?e+e+e:e;return{changes:{from:l,to:l+p.length,insert:p},range:Z.cursor(l+p.length)}}}else{if(t&&r.sliceDoc(l-2*e.length,l)==e+e&&(c=xs(r,l-2*e.length,i))>-1&&Ps(r,c))return{changes:{insert:e+e+e+e,from:l},effects:je.of(l+e.length),range:Z.cursor(l+e.length)};if(r.charCategorizer(l)(O)!=A.Word&&xs(r,l,i)>-1&&!vO(r,l,e,i))return{changes:{insert:e+e,from:l},effects:je.of(l+e.length),range:Z.cursor(l+e.length)}}return{range:s=o}});return s?null:r.update(a,{scrollIntoView:!0,userEvent:"input.type"})}function Ps(r,e){let t=R(r).resolveInner(e+1);return t.parent&&t.from==e}function vO(r,e,t,n){let i=R(r).resolveInner(e,-1),s=n.reduce((a,o)=>Math.max(a,o.length),0);for(let a=0;a<5;a++){let o=r.sliceDoc(i.from,Math.min(i.to,i.from+t.length+s)),l=o.indexOf(t);if(!l||l>-1&&n.indexOf(o.slice(0,l))>-1){let c=i.firstChild;for(;c&&c.from==i.from&&c.to-c.from>t.length+l;){if(r.sliceDoc(c.to-t.length,c.to)==t)return!1;c=c.firstChild}return!0}let O=i.to==e&&i.parent;if(!O)break;i=O}return!1}function xs(r,e,t){let n=r.charCategorizer(e);if(n(r.sliceDoc(e-1,e))!=A.Word)return e;for(let i of t){let s=e-i.length;if(r.sliceDoc(s,e)==i&&n(r.sliceDoc(s-1,s))!=A.Word)return s}return-1}function zs(r={}){return[cO,U,C.of(r),lO,TO,Xs]}var sn=[{key:"Ctrl-Space",run:Er},{mac:"Alt-`",run:Er},{mac:"Alt-i",run:Er},{key:"Escape",run:sO},{key:"ArrowDown",run:Dt(!0)},{key:"ArrowUp",run:Dt(!1)},{key:"PageDown",run:Dt(!0,"page")},{key:"PageUp",run:Dt(!1,"page")},{key:"Enter",run:iO}],TO=ge.highest(Te.computeN([C],r=>r.facet(C).defaultKeymap?[sn]:[]));var er=class r{static create(e,t,n,i,s){let a=i+(i<<8)+e+(t<<4)|0;return new r(e,t,n,a,s,[],[])}constructor(e,t,n,i,s,a,o){this.type=e,this.value=t,this.from=n,this.hash=i,this.end=s,this.children=a,this.positions=o,this.blankFirstLine=!1,this.hashProp=[[K.contextHash,i]]}addChild(e,t){e.prop(K.contextHash)!=this.hash&&(e=new M(e.type,e.children,e.positions,e.length,this.hashProp)),this.children.push(e),this.positions.push(t)}toTree(e,t=this.end){let n=this.children.length-1;return n>=0&&(t=Math.max(t,this.positions[n]+this.children[n].length+this.from)),new M(e.types[this.type],this.children,this.positions,t-this.from).balance({makeTree:(i,s,a)=>new M(Re.none,i,s,a,this.hashProp)})}},$;(function(r){r[r.Document=1]="Document",r[r.CodeBlock=2]="CodeBlock",r[r.FencedCode=3]="FencedCode",r[r.Blockquote=4]="Blockquote",r[r.HorizontalRule=5]="HorizontalRule",r[r.BulletList=6]="BulletList",r[r.OrderedList=7]="OrderedList",r[r.ListItem=8]="ListItem",r[r.ATXHeading1=9]="ATXHeading1",r[r.ATXHeading2=10]="ATXHeading2",r[r.ATXHeading3=11]="ATXHeading3",r[r.ATXHeading4=12]="ATXHeading4",r[r.ATXHeading5=13]="ATXHeading5",r[r.ATXHeading6=14]="ATXHeading6",r[r.SetextHeading1=15]="SetextHeading1",r[r.SetextHeading2=16]="SetextHeading2",r[r.HTMLBlock=17]="HTMLBlock",r[r.LinkReference=18]="LinkReference",r[r.Paragraph=19]="Paragraph",r[r.CommentBlock=20]="CommentBlock",r[r.ProcessingInstructionBlock=21]="ProcessingInstructionBlock",r[r.Escape=22]="Escape",r[r.Entity=23]="Entity",r[r.HardBreak=24]="HardBreak",r[r.Emphasis=25]="Emphasis",r[r.StrongEmphasis=26]="StrongEmphasis",r[r.Link=27]="Link",r[r.Image=28]="Image",r[r.InlineCode=29]="InlineCode",r[r.HTMLTag=30]="HTMLTag",r[r.Comment=31]="Comment",r[r.ProcessingInstruction=32]="ProcessingInstruction",r[r.Autolink=33]="Autolink",r[r.HeaderMark=34]="HeaderMark",r[r.QuoteMark=35]="QuoteMark",r[r.ListMark=36]="ListMark",r[r.LinkMark=37]="LinkMark",r[r.EmphasisMark=38]="EmphasisMark",r[r.CodeMark=39]="CodeMark",r[r.CodeText=40]="CodeText",r[r.CodeInfo=41]="CodeInfo",r[r.LinkTitle=42]="LinkTitle",r[r.LinkLabel=43]="LinkLabel",r[r.URL=44]="URL"})($||($={}));var ln=class{constructor(e,t){this.start=e,this.content=t,this.marks=[],this.parsers=[]}},On=class{constructor(){this.text="",this.baseIndent=0,this.basePos=0,this.depth=0,this.markers=[],this.pos=0,this.indent=0,this.next=-1}forward(){this.basePos>this.pos&&this.forwardInner()}forwardInner(){let e=this.skipSpace(this.basePos);this.indent=this.countIndent(e,this.pos,this.indent),this.pos=e,this.next=e==this.text.length?-1:this.text.charCodeAt(e)}skipSpace(e){return Qt(this.text,e)}reset(e){for(this.text=e,this.baseIndent=this.basePos=this.pos=this.indent=0,this.forwardInner(),this.depth=1;this.markers.length;)this.markers.pop()}moveBase(e){this.basePos=e,this.baseIndent=this.countIndent(e,this.pos,this.indent)}moveBaseColumn(e){this.baseIndent=e,this.basePos=this.findColumn(e)}addMarker(e){this.markers.push(e)}countIndent(e,t=0,n=0){for(let i=t;i<e;i++)n+=this.text.charCodeAt(i)==9?4-n%4:1;return n}findColumn(e){let t=0;for(let n=0;t<this.text.length&&n<e;t++)n+=this.text.charCodeAt(t)==9?4-n%4:1;return t}scrub(){if(!this.baseIndent)return this.text;let e="";for(let t=0;t<this.basePos;t++)e+=" ";return e+this.text.slice(this.basePos)}};function qs(r,e,t){if(t.pos==t.text.length||r!=e.block&&t.indent>=e.stack[t.depth+1].value+t.baseIndent)return!0;if(t.indent>=t.baseIndent+4)return!1;let n=(r.type==$.OrderedList?Sn:bn)(t,e,!1);return n>0&&(r.type!=$.BulletList||$n(t,e,!1)<0)&&t.text.charCodeAt(t.pos+n-1)==r.value}var Bs={[$.Blockquote](r,e,t){return t.next!=62?!1:(t.markers.push(T($.QuoteMark,e.lineStart+t.pos,e.lineStart+t.pos+1)),t.moveBase(t.pos+(D(t.text.charCodeAt(t.pos+1))?2:1)),r.end=e.lineStart+t.text.length,!0)},[$.ListItem](r,e,t){return(t.next<0?r.blankFirstLine&&r.children.length==1:t.indent<t.baseIndent+r.value)?!1:(t.moveBaseColumn(t.baseIndent+r.value),!0)},[$.OrderedList]:qs,[$.BulletList]:qs,[$.Document](){return!0}};function D(r){return r==32||r==9||r==10||r==13}function Qt(r,e=0){for(;e<r.length&&D(r.charCodeAt(e));)e++;return e}function As(r,e,t){for(;e>t&&D(r.charCodeAt(e-1));)e--;return e}function Ns(r){if(r.next!=96&&r.next!=126)return-1;let e=r.pos+1;for(;e<r.text.length&&r.text.charCodeAt(e)==r.next;)e++;if(e<r.pos+3)return-1;if(r.next==96){for(let t=e;t<r.text.length;t++)if(r.text.charCodeAt(t)==96)return-1}return e}function Fs(r){return r.next!=62?-1:r.text.charCodeAt(r.pos+1)==32?2:1}function $n(r,e,t){if(r.next!=42&&r.next!=45&&r.next!=95)return-1;let n=1;for(let i=r.pos+1;i<r.text.length;i++){let s=r.text.charCodeAt(i);if(s==r.next)n++;else if(!D(s))return-1}return t&&r.next==45&&Js(r)>-1&&r.depth==e.stack.length&&e.parser.leafBlockParsers.indexOf(na.SetextHeading)>-1||n<3?-1:1}function Hs(r,e){for(let t=r.stack.length-1;t>=0;t--)if(r.stack[t].type==e)return!0;return!1}function bn(r,e,t){return(r.next==45||r.next==43||r.next==42)&&(r.pos==r.text.length-1||D(r.text.charCodeAt(r.pos+1)))&&(!t||Hs(e,$.BulletList)||r.skipSpace(r.pos+2)<r.text.length)?1:-1}function Sn(r,e,t){let n=r.pos,i=r.next;for(;i>=48&&i<=57;){n++;if(n==r.text.length)return-1;i=r.text.charCodeAt(n)}return n==r.pos||n>r.pos+9||i!=46&&i!=41||n<r.text.length-1&&!D(r.text.charCodeAt(n+1))||t&&!Hs(e,$.OrderedList)&&(r.skipSpace(n+1)==r.text.length||n>r.pos+1||r.next!=49)?-1:n+1-r.pos}function Ks(r){if(r.next!=35)return-1;let e=r.pos+1;for(;e<r.text.length&&r.text.charCodeAt(e)==35;)e++;if(e<r.text.length&&!D(r.text.charCodeAt(e)))return-1;let t=e-r.pos;return t>6?-1:t}function Js(r){if(r.next!=45&&r.next!=61||r.indent>=r.baseIndent+4)return-1;let e=r.pos+1;for(;e<r.text.length&&r.text.charCodeAt(e)==r.next;)e++;let t=e;for(;e<r.text.length&&D(r.text.charCodeAt(e));)e++;return e==r.text.length?t:-1}var cn=/^[ \t]*$/,ea=/-->/,ta=/\?>/,hn=[[/^<(?:script|pre|style|textarea)(?:\s|>|$)/i,/<\/(?:script|pre|style|textarea)>/i],[/^\s*<!--/,ea],[/^\s*<\?/,ta],[/^\s*<![A-Z]/,/>/],[/^\s*<!\[CDATA\[/,/\]\]>/],[/^\s*<\/?(?:address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h1|h2|h3|h4|h5|h6|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul)(?:\s|\/?>|$)/i,cn],[/^\s*(?:<\/[a-z][\w-]*\s*>|<[a-z][\w-]*(\s+[a-z:_][\w-.]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*>)\s*$/i,cn]];function ra(r,e,t){if(r.next!=60)return-1;let n=r.text.slice(r.pos);for(let i=0,s=hn.length-(t?1:0);i<s;i++)if(hn[i][0].test(n))return i;return-1}function Ls(r,e){let t=r.countIndent(e,r.pos,r.indent),n=r.skipSpace(e),i=r.countIndent(n,e,t);return i>=t+5||n==r.text.length?t+1:i}function be(r,e,t){let n=r.length-1;n>=0&&r[n].to==e&&r[n].type==$.CodeText?r[n].to=t:r.push(T($.CodeText,e,t))}var Kt={LinkReference:void 0,IndentedCode(r,e){let t=e.baseIndent+4;if(e.indent<t)return!1;let n=e.findColumn(t),i=r.lineStart+n,s=r.lineStart+e.text.length,a=[],o=[];for(be(a,i,s);r.nextLine()&&e.depth>=r.stack.length;)if(e.pos==e.text.length){be(o,r.lineStart-1,r.lineStart);for(let l of e.markers)o.push(l)}else{if(e.indent<t)break;{if(o.length){for(let O of o)O.type==$.CodeText?be(a,O.from,O.to):a.push(O);o=[]}be(a,r.lineStart-1,r.lineStart);for(let O of e.markers)a.push(O);s=r.lineStart+e.text.length;let l=r.lineStart+e.findColumn(e.baseIndent+4);l<s&&be(a,l,s)}}return o.length&&(o=o.filter(l=>l.type!=$.CodeText),o.length&&(e.markers=o.concat(e.markers))),r.addNode(r.buffer.writeElements(a,-i).finish($.CodeBlock,s-i),i),!0},FencedCode(r,e){let t=Ns(e);if(t<0)return!1;let n=r.lineStart+e.pos,i=e.next,s=t-e.pos,a=e.skipSpace(t),o=As(e.text,e.text.length,a),l=[T($.CodeMark,n,n+s)];a<o&&l.push(T($.CodeInfo,r.lineStart+a,r.lineStart+o));for(let O=!0,c=!0,h=!1;r.nextLine()&&e.depth>=r.stack.length;O=!1){let p=e.pos;if(e.indent-e.baseIndent<4)for(;p<e.text.length&&e.text.charCodeAt(p)==i;)p++;if(p-e.pos>=s&&e.skipSpace(p)==e.text.length){for(let u of e.markers)l.push(u);c&&h&&be(l,r.lineStart-1,r.lineStart),l.push(T($.CodeMark,r.lineStart+e.pos,r.lineStart+p)),r.nextLine();break}else{h=!0,O||(be(l,r.lineStart-1,r.lineStart),c=!1);for(let m of e.markers)l.push(m);let u=r.lineStart+e.basePos,d=r.lineStart+e.text.length;u<d&&(be(l,u,d),c=!1)}}return r.addNode(r.buffer.writeElements(l,-n).finish($.FencedCode,r.prevLineEnd()-n),n),!0},Blockquote(r,e){let t=Fs(e);return t<0?!1:(r.startContext($.Blockquote,e.pos),r.addNode($.QuoteMark,r.lineStart+e.pos,r.lineStart+e.pos+1),e.moveBase(e.pos+t),null)},HorizontalRule(r,e){if($n(e,r,!1)<0)return!1;let t=r.lineStart+e.pos;return r.nextLine(),r.addNode($.HorizontalRule,t),!0},BulletList(r,e){let t=bn(e,r,!1);if(t<0)return!1;r.block.type!=$.BulletList&&r.startContext($.BulletList,e.basePos,e.next);let n=Ls(e,e.pos+1);return r.startContext($.ListItem,e.basePos,n-e.baseIndent),r.addNode($.ListMark,r.lineStart+e.pos,r.lineStart+e.pos+t),e.moveBaseColumn(n),r.block.blankFirstLine=n>=e.text.length,null},OrderedList(r,e){let t=Sn(e,r,!1);if(t<0)return!1;r.block.type!=$.OrderedList&&r.startContext($.OrderedList,e.basePos,e.text.charCodeAt(e.pos+t-1));let n=Ls(e,e.pos+t);return r.startContext($.ListItem,e.basePos,n-e.baseIndent),r.addNode($.ListMark,r.lineStart+e.pos,r.lineStart+e.pos+t),e.moveBaseColumn(n),r.block.blankFirstLine=n==e.text.length,null},ATXHeading(r,e){let t=Ks(e);if(t<0)return!1;let n=e.pos,i=r.lineStart+n,s=As(e.text,e.text.length,n),a=s;for(;a>n&&e.text.charCodeAt(a-1)==e.next;)a--;(a==s||a==n||!D(e.text.charCodeAt(a-1)))&&(a=e.text.length);let o=r.buffer.write($.HeaderMark,0,t).writeElements(r.parser.parseInline(e.text.slice(n+t+1,a),i+t+1),-i);a<e.text.length&&o.write($.HeaderMark,a-n,s-n);let l=o.finish($.ATXHeading1-1+t,e.text.length-n);return r.nextLine(),r.addNode(l,i),!0},HTMLBlock(r,e){let t=ra(e,r,!1);if(t<0)return!1;let n=r.lineStart+e.pos,i=hn[t][1],s=[],a=i!=cn;for(;!i.test(e.text)&&r.nextLine();){if(e.depth<r.stack.length){a=!1;break}for(let O of e.markers)s.push(O)}a&&r.nextLine();let o=i==ea?$.CommentBlock:i==ta?$.ProcessingInstructionBlock:$.HTMLBlock,l=r.prevLineEnd();return r.addNode(r.buffer.writeElements(s,-n).finish(o,l-n),n),!0},SetextHeading:void 0},un=class{constructor(e){this.stage=0,this.elts=[],this.pos=0,this.start=e.start,this.advance(e.content)}nextLine(e,t,n){if(this.stage==-1)return!1;let i=n.content+` -`+t.scrub(),s=this.advance(i);return s>-1&&s<i.length?this.complete(e,n,s):!1}finish(e,t){return(this.stage==2||this.stage==3)&&Qt(t.content,this.pos)==t.content.length?this.complete(e,t,t.content.length):!1}complete(e,t,n){return e.addLeafElement(t,T($.LinkReference,this.start,this.start+n,this.elts)),!0}nextStage(e){return e?(this.pos=e.to-this.start,this.elts.push(e),this.stage++,!0):(e===!1&&(this.stage=-1),!1)}advance(e){for(;;){if(this.stage==-1)return-1;if(this.stage==0){if(!this.nextStage(la(e,this.pos,this.start,!0)))return-1;if(e.charCodeAt(this.pos)!=58)return this.stage=-1;this.elts.push(T($.LinkMark,this.pos+this.start,this.pos+this.start+1)),this.pos++}else if(this.stage==1){if(!this.nextStage(aa(e,Qt(e,this.pos),this.start)))return-1}else if(this.stage==2){let t=Qt(e,this.pos),n=0;if(t>this.pos){let i=oa(e,t,this.start);if(i){let s=an(e,i.to-this.start);s>0&&(this.nextStage(i),n=s)}}return n||(n=an(e,this.pos)),n>0&&n<e.length?n:-1}else return an(e,this.pos)}}};function an(r,e){for(;e<r.length;e++){let t=r.charCodeAt(e);if(t==10)break;if(!D(t))return-1}return e}var pn=class{nextLine(e,t,n){let i=t.depth<e.stack.length?-1:Js(t),s=t.next;if(i<0)return!1;let a=T($.HeaderMark,e.lineStart+t.pos,e.lineStart+i);return e.nextLine(),e.addLeafElement(n,T(s==61?$.SetextHeading1:$.SetextHeading2,n.start,e.prevLineEnd(),[...e.parser.parseInline(n.content,n.start),a])),!0}finish(){return!1}},na={LinkReference(r,e){return e.content.charCodeAt(0)==91?new un(e):null},SetextHeading(){return new pn}},RO=[(r,e)=>Ks(e)>=0,(r,e)=>Ns(e)>=0,(r,e)=>Fs(e)>=0,(r,e)=>bn(e,r,!0)>=0,(r,e)=>Sn(e,r,!0)>=0,(r,e)=>$n(e,r,!0)>=0,(r,e)=>ra(e,r,!0)>=0],jO={text:"",end:0},fn=class{constructor(e,t,n,i){this.parser=e,this.input=t,this.ranges=i,this.line=new On,this.atEnd=!1,this.reusePlaceholders=new Map,this.stoppedAt=null,this.rangeI=0,this.to=i[i.length-1].to,this.lineStart=this.absoluteLineStart=this.absoluteLineEnd=i[0].from,this.block=er.create($.Document,0,this.lineStart,0,0),this.stack=[this.block],this.fragments=n.length?new gn(n,t):null,this.readLine()}get parsedPos(){return this.absoluteLineStart}advance(){if(this.stoppedAt!=null&&this.absoluteLineStart>this.stoppedAt)return this.finish();let{line:e}=this;for(;;){for(let n=0;;){let i=e.depth<this.stack.length?this.stack[this.stack.length-1]:null;for(;n<e.markers.length&&(!i||e.markers[n].from<i.end);){let s=e.markers[n++];this.addNode(s.type,s.from,s.to)}if(!i)break;this.finishContext()}if(e.pos<e.text.length)break;if(!this.nextLine())return this.finish()}if(this.fragments&&this.reuseFragment(e.basePos))return null;e:for(;;){for(let n of this.parser.blockParsers)if(n){let i=n(this,e);if(i!=!1){if(i==!0)return null;e.forward();continue e}}break}if(e.pos==e.text.length)return this.nextLine()?null:this.finish();let t=new ln(this.lineStart+e.pos,e.text.slice(e.pos));for(let n of this.parser.leafBlockParsers)if(n){let i=n(this,t);i&&t.parsers.push(i)}e:for(;this.nextLine()&&e.pos!=e.text.length;){if(e.indent<e.baseIndent+4){for(let n of this.parser.endLeafBlock)if(n(this,e,t))break e}for(let n of t.parsers)if(n.nextLine(this,e,t))return null;t.content+=` -`+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 new 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=ca(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=jO;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 n=this.absoluteLineStart,i=this.rangeI;for(;this.ranges[i].to<t.end;){i++;let s=this.ranges[i].from,a=this.lineChunkAt(s);t.end=s+a.length,t.text=t.text.slice(0,this.ranges[i-1].to-n)+a,n=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 i=this.stack[e.depth],s=this.parser.skipContextMarkup[i.type];if(!s)throw new Error("Unhandled block context "+$[i.type]);let a=this.line.markers.length;if(!s(i,this,e)){this.line.markers.length>a&&(i.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==` -`?"":t;else{let i=t.indexOf(` -`);n=i<0?t:t.slice(0,i)}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=er.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 M(this.parser.nodeSet.types[e],Ke,Ke,(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(mn(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?ia(this.ranges,0,e.topNode,this.ranges[0].from,this.reusePlaceholders):e}finishLeaf(e){for(let n of e.parsers)if(n.finish(this,e))return;let t=mn(this.parser.parseInline(e.content,e.start),e.marks);this.addNode(this.buffer.writeElements(t,-e.start).finish($.Paragraph,e.content.length),e.start)}elt(e,t,n,i){return typeof e=="string"?T(this.parser.getNodeType(e),t,n,i):new rr(e,t)}get buffer(){return new tr(this.parser.nodeSet)}};function ia(r,e,t,n,i){let s=r[e].to,a=[],o=[],l=t.from+n;function O(c,h){for(;h?c>=s:c>s;){let p=r[e+1].from-s;n+=p,c+=p,e++,s=r[e].to}}for(let c=t.firstChild;c;c=c.nextSibling){O(c.from+n,!0);let h=c.from+n,p,u=i.get(c.tree);u?p=u:c.to+n>s?(p=ia(r,e,c,n,i),O(c.to+n,!1)):p=c.toTree(),a.push(p),o.push(h-l)}return O(t.to+n,!1),new M(t.type,a,o,t.to+n-l,t.tree?t.tree.propValues:void 0)}var bt=class r extends Wt{constructor(e,t,n,i,s,a,o,l,O){super(),this.nodeSet=e,this.blockParsers=t,this.leafBlockParsers=n,this.blockNames=i,this.endLeafBlock=s,this.skipContextMarkup=a,this.inlineParsers=o,this.inlineNames=l,this.wrappers=O,this.nodeTypes=Object.create(null);for(let c of e.types)this.nodeTypes[c.name]=c.id}createParse(e,t,n){let i=new fn(this,e,t,n);for(let s of this.wrappers)i=s(i,e,t,n);return i}configure(e){let t=dn(e);if(!t)return this;let{nodeSet:n,skipContextMarkup:i}=this,s=this.blockParsers.slice(),a=this.leafBlockParsers.slice(),o=this.blockNames.slice(),l=this.inlineParsers.slice(),O=this.inlineNames.slice(),c=this.endLeafBlock.slice(),h=this.wrappers;if(gt(t.defineNodes)){i=Object.assign({},i);let p=n.types.slice(),u;for(let d of t.defineNodes){let{name:m,block:g,composite:b,style:Q}=typeof d=="string"?{name:d}:d;if(p.some(w=>w.name==m))continue;b&&(i[p.length]=(w,_,G)=>b(_,G,w.value));let k=p.length,y=b?["Block","BlockContext"]:g?k>=$.ATXHeading1&&k<=$.SetextHeading2?["Block","LeafBlock","Heading"]:["Block","LeafBlock"]:void 0;p.push(Re.define({id:k,name:m,props:y&&[[K.group,y]]})),Q&&(u||(u={}),Array.isArray(Q)||Q instanceof ns?u[m]=Q:Object.assign(u,Q))}n=new ut(p),u&&(n=n.extend(Oe(u)))}if(gt(t.props)&&(n=n.extend(...t.props)),gt(t.remove))for(let p of t.remove){let u=this.blockNames.indexOf(p),d=this.inlineNames.indexOf(p);u>-1&&(s[u]=a[u]=void 0),d>-1&&(l[d]=void 0)}if(gt(t.parseBlock))for(let p of t.parseBlock){let u=o.indexOf(p.name);if(u>-1)s[u]=p.parse,a[u]=p.leaf;else{let d=p.before?Jt(o,p.before):p.after?Jt(o,p.after)+1:o.length-1;s.splice(d,0,p.parse),a.splice(d,0,p.leaf),o.splice(d,0,p.name)}p.endLeaf&&c.push(p.endLeaf)}if(gt(t.parseInline))for(let p of t.parseInline){let u=O.indexOf(p.name);if(u>-1)l[u]=p.parse;else{let d=p.before?Jt(O,p.before):p.after?Jt(O,p.after)+1:O.length-1;l.splice(d,0,p.parse),O.splice(d,0,p.name)}}return t.wrap&&(h=h.concat(t.wrap)),new r(n,s,a,o,c,i,l,O,h)}getNodeType(e){let t=this.nodeTypes[e];if(t==null)throw new RangeError(`Unknown node type '${e}'`);return t}parseInline(e,t){let n=new ze(this,e,t);e:for(let i=t;i<n.end;){let s=n.char(i);for(let a of this.inlineParsers)if(a){let o=a(n,s,i);if(o>=0){i=o;continue e}}i++}return n.resolveMarkers(0)}};function gt(r){return r!=null&&r.length>0}function dn(r){if(!Array.isArray(r))return r;if(r.length==0)return null;let e=dn(r[0]);if(r.length==1)return e;let t=dn(r.slice(1));if(!t||!e)return e||t;let n=(a,o)=>(a||Ke).concat(o||Ke),i=e.wrap,s=t.wrap;return{props:n(e.props,t.props),defineNodes:n(e.defineNodes,t.defineNodes),parseBlock:n(e.parseBlock,t.parseBlock),parseInline:n(e.parseInline,t.parseInline),remove:n(e.remove,t.remove),wrap:i?s?(a,o,l,O)=>i(s(a,o,l,O),o,l,O):i:s}}function Jt(r,e){let t=r.indexOf(e);if(t<0)throw new RangeError(`Position specified relative to unknown parser ${e}`);return t}var sa=[Re.none];for(let r=1,e;e=$[r];r++)sa[r]=Re.define({id:r,name:e,props:r>=$.Escape?[]:[[K.group,r in Bs?["Block","BlockContext"]:["Block","LeafBlock"]]],top:e=="Document"});var Ke=[],tr=class{constructor(e){this.nodeSet=e,this.content=[],this.nodes=[]}write(e,t,n,i=0){return this.content.push(e,t,n,4+i*4),this}writeElements(e,t=0){for(let n of e)n.writeTo(this,t);return this}finish(e,t){return M.build({buffer:this.content,nodeSet:this.nodeSet,reused:this.nodes,topID:e,length:t})}},Ce=class{constructor(e,t,n,i=Ke){this.type=e,this.from=t,this.to=n,this.children=i}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 tr(e).writeElements(this.children,-this.from).finish(this.type,this.to-this.from)}},rr=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 Ke}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 T(r,e,t,n){return new Ce(r,e,t,n)}var kn={resolve:"Emphasis",mark:"EmphasisMark"},Pn={resolve:"Emphasis",mark:"EmphasisMark"},Ye={},nr={},E=class{constructor(e,t,n,i,s=n-t){this.type=e,this.from=t,this.to=n,this.side=i,this.size=s}},Es="!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~",St=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\u2010-\u2027]/;try{St=new RegExp("[\\p{S}|\\p{P}]","u")}catch{}var on={Escape(r,e,t){if(e!=92||t==r.end-1)return-1;let n=r.char(t+1);for(let i=0;i<Es.length;i++)if(Es.charCodeAt(i)==n)return r.append(T($.Escape,t,t+2));return-1},Entity(r,e,t){if(e!=38)return-1;let n=/^(?:#\d+|#x[a-f\d]+|\w+);/i.exec(r.slice(t+1,t+31));return n?r.append(T($.Entity,t,t+1+n[0].length)):-1},InlineCode(r,e,t){if(e!=96||t&&r.char(t-1)==96)return-1;let n=t+1;for(;n<r.end&&r.char(n)==96;)n++;let i=n-t,s=0;for(;n<r.end;n++)if(r.char(n)==96){if(s++,s==i&&r.char(n+1)!=96)return r.append(T($.InlineCode,t,n+1,[T($.CodeMark,t,t+i),T($.CodeMark,n+1-i,n+1)]))}else s=0;return-1},HTMLTag(r,e,t){if(e!=60||t==r.end-1)return-1;let n=r.slice(t+1,r.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(n);if(i)return r.append(T($.Autolink,t,t+1+i[0].length,[T($.LinkMark,t,t+1),T($.URL,t+1,t+i[0].length),T($.LinkMark,t+i[0].length,t+1+i[0].length)]));let s=/^!--(?:-?>|[^]*?-->)/.exec(n);if(s)return r.append(T($.Comment,t,t+1+s[0].length));let a=/^\?[^]*?\?>/.exec(n);if(a)return r.append(T($.ProcessingInstruction,t,t+1+a[0].length));let o=/^(?:![A-Z][^]*?>|!\[CDATA\[[^]*?\]\]>|\/[a-zA-Z][\w-]*\s*>|[a-zA-Z][\w-]*(\s+[a-zA-Z:_][\w-.:]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*\/?>)/.exec(n);return o?r.append(T($.HTMLTag,t,t+1+o[0].length)):-1},Emphasis(r,e,t){if(e!=95&&e!=42)return-1;let n=t+1;for(;r.char(n)==e;)n++;let i=r.slice(t-1,t),s=r.slice(n,n+1),a=St.test(i),o=St.test(s),l=/\s|^$/.test(i),O=/\s|^$/.test(s),c=!O&&(!o||l||a),h=!l&&(!a||O||o),p=c&&(e==42||!h||a),u=h&&(e==42||!c||o);return r.append(new E(e==95?kn:Pn,t,n,(p?1:0)|(u?2:0)))},HardBreak(r,e,t){if(e==92&&r.char(t+1)==10)return r.append(T($.HardBreak,t,t+2));if(e==32){let n=t+1;for(;r.char(n)==32;)n++;if(r.char(n)==10&&n>=t+2)return r.append(T($.HardBreak,t,n+1))}return-1},Link(r,e,t){return e==91?r.append(new E(Ye,t,t+1,1)):-1},Image(r,e,t){return e==33&&r.char(t+1)==91?r.append(new E(nr,t,t+2,1)):-1},LinkEnd(r,e,t){if(e!=93)return-1;for(let n=r.parts.length-1;n>=0;n--){let i=r.parts[n];if(i instanceof E&&(i.type==Ye||i.type==nr)){if(!i.side||r.skipSpace(i.to)==t&&!/[(\[]/.test(r.slice(t+1,t+2)))return r.parts[n]=null,-1;let s=r.takeContent(n),a=r.parts[n]=_O(r,s,i.type==Ye?$.Link:$.Image,i.from,t+1);if(i.type==Ye)for(let o=0;o<n;o++){let l=r.parts[o];l instanceof E&&l.type==Ye&&(l.side=0)}return a.to}}return-1}};function _O(r,e,t,n,i){let{text:s}=r,a=r.char(i),o=i;if(e.unshift(T($.LinkMark,n,n+(t==$.Image?2:1))),e.push(T($.LinkMark,i-1,i)),a==40){let l=r.skipSpace(i+1),O=aa(s,l-r.offset,r.offset),c;O&&(l=r.skipSpace(O.to),l!=O.to&&(c=oa(s,l-r.offset,r.offset),c&&(l=r.skipSpace(c.to)))),r.char(l)==41&&(e.push(T($.LinkMark,i,i+1)),o=l+1,O&&e.push(O),c&&e.push(c),e.push(T($.LinkMark,l,o)))}else if(a==91){let l=la(s,i-r.offset,r.offset,!1);l&&(e.push(l),o=l.to)}return T(t,n,o,e)}function aa(r,e,t){if(r.charCodeAt(e)==60){for(let i=e+1,s=!1;i<r.length;i++){let a=r.charCodeAt(i);if(a==62&&!s)return T($.URL,e+t,i+1+t);if(a==60&&!s||a==10)return!1;s=a==92}return null}else{let i=0,s=e;for(let a=!1;s<r.length;s++){let o=r.charCodeAt(s);if(D(o))break;if(a)a=!1;else if(o==40)i++;else if(o==41){if(!i)break;i--}else o==92&&(a=!0)}return s>e?T($.URL,e+t,s+t):s==r.length?null:!1}}function oa(r,e,t){let n=r.charCodeAt(e);if(n!=39&&n!=34&&n!=40)return!1;let i=n==40?41:n;for(let s=e+1,a=!1;s<r.length;s++){let o=r.charCodeAt(s);if(a)a=!1;else{if(o==i)return T($.LinkTitle,e+t,s+1+t);o==92&&(a=!0)}}return null}function la(r,e,t,n){for(let i=!1,s=e+1,a=Math.min(r.length,s+999);s<a;s++){let o=r.charCodeAt(s);if(i)i=!1;else{if(o==93)return n?!1:T($.LinkLabel,e+t,s+1+t);if(n&&!D(o)&&(n=!1),o==91)return!1;o==92&&(i=!0)}}return null}var ze=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,i,s){return this.append(new E(e,t,n,(i?1:0)|(s?2:0)))}get hasOpenLink(){for(let e=this.parts.length-1;e>=0;e--){let t=this.parts[e];if(t instanceof E&&(t.type==Ye||t.type==nr))return!0}return!1}addElement(e){return this.append(e)}resolveMarkers(e){for(let n=e;n<this.parts.length;n++){let i=this.parts[n];if(!(i instanceof E&&i.type.resolve&&i.side&2))continue;let s=i.type==kn||i.type==Pn,a=i.to-i.from,o,l=n-1;for(;l>=e;l--){let m=this.parts[l];if(m instanceof E&&m.side&1&&m.type==i.type&&!(s&&(i.side&1||m.side&2)&&(m.size+i.size)%3==0&&(m.size%3||i.size%3))){o=m;break}}if(!o)continue;let O=i.type.resolve,c=[],h=o.from,p=i.to;if(s){let m=Math.min(2,o.to-o.from,a);h=o.to-m,p=i.from+m,O=m==1?"Emphasis":"StrongEmphasis"}o.type.mark&&c.push(this.elt(o.type.mark,h,o.to));for(let m=l+1;m<n;m++)this.parts[m]instanceof Ce&&c.push(this.parts[m]),this.parts[m]=null;i.type.mark&&c.push(this.elt(i.type.mark,i.from,p));let u=this.elt(O,h,p,c);this.parts[l]=s&&o.from!=h?new E(o.type,o.from,h,o.side,o.size):null,(this.parts[n]=s&&i.to!=p?new E(i.type,p,i.to,i.side,i.size):null)?this.parts.splice(n,0,u):this.parts[n]=u}let t=[];for(let n=e;n<this.parts.length;n++){let i=this.parts[n];i instanceof Ce&&t.push(i)}return t}findOpeningDelimiter(e){for(let t=this.parts.length-1;t>=0;t--){let n=this.parts[t];if(n instanceof E&&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 E?t:null}skipSpace(e){return Qt(this.text,e-this.offset)+this.offset}elt(e,t,n,i){return typeof e=="string"?T(this.parser.getNodeType(e),t,n,i):new rr(e,t)}};ze.linkStart=Ye;ze.imageStart=nr;ze.emphasisAsterisk=Pn;ze.emphasisUnderscore=kn;function mn(r,e){if(!e.length)return r;if(!r.length)return e;let t=r.slice(),n=0;for(let i of e){for(;n<t.length&&t[n].to<i.to;)n++;if(n<t.length&&t[n].from<i.from){let s=t[n];s instanceof Ce&&(t[n]=new Ce(s.type,s.from,s.to,mn(s.children,[i])))}else t.splice(n++,0,i)}return t}var Oa=[$.CodeBlock,$.ListItem,$.OrderedList,$.BulletList],gn=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 s=this.fragment.to;for(;s>0&&this.input.read(s-1,s)!=` -`;)s--;this.fragmentEnd=s?s-1:0}let n=this.cursor;n||(n=this.cursor=this.fragment.tree.cursor(le.IncludeAnonymous|le.IgnoreMounts),n.firstChild());let i=e+this.fragment.offset;for(;n.to<=i;)if(!n.parent())return!1;for(;;){if(n.from>=i)return this.fragment.from<=t;if(!n.childAfter(i))return!1}}matches(e){let t=this.cursor.tree;for(;t&&t.type.isAnonymous&&t.children[0]instanceof M;)t=t.children[0];return t&&t.prop(K.contextHash)==e}takeNodes(e){let t=this.cursor,n=this.fragment.offset,i=this.fragmentEnd-(this.fragment.openEnd?1:0),s=e.absoluteLineStart,a=s,o=e.block.children.length,l=e.lineStart-e.block.from>>2,O=a,c=o;e:for(;;){if(t.to-n>Math.min(i,e.to)||t.type.isAnonymous&&t.tree&&(t.to-t.from>l||!YO(t.tree))){if(t.type.isAnonymous&&t.firstChild())continue;break}let h=ca(t.from-n,e.ranges);if(t.to-n<=e.ranges[e.rangeI].to)e.addNode(t.tree,h);else{let p=new M(e.parser.nodeSet.types[$.Paragraph],[],[],0,e.block.hashProp);e.reusePlaceholders.set(p,t.tree),e.addNode(p,h)}for((t.type.isAnonymous||t.type.is("Block"))&&(t.type.isAnonymous||Oa.indexOf(t.type.id)<0?(a=t.to-n,o=e.block.children.length):(a=O,o=c),O=t.to-n,c=e.block.children.length);;){if(t.nextSibling())continue e;if(!t.parent()||!t.type.isAnonymous)break e}}for(;e.block.children.length>o;)e.block.children.pop(),e.block.positions.pop();return a-s}};function YO(r){for(;r.type.isAnonymous;){let e=r.children[r.children.length-1];if(e instanceof M)r=e;else return!1}return r.type.is("Block")&&Oa.indexOf(r.type.id)<0}function ca(r,e){let t=r;for(let n=1;n<e.length;n++){let i=e[n-1].to,s=e[n].from;i<r&&(t-=s-i)}return t}var CO=Oe({"Blockquote/...":f.quote,HorizontalRule:f.contentSeparator,"ATXHeading1/... SetextHeading1/...":f.heading1,"ATXHeading2/... SetextHeading2/...":f.heading2,"ATXHeading3/...":f.heading3,"ATXHeading4/...":f.heading4,"ATXHeading5/...":f.heading5,"ATXHeading6/...":f.heading6,"Comment CommentBlock":f.comment,Escape:f.escape,Entity:f.character,"Emphasis/...":f.emphasis,"StrongEmphasis/...":f.strong,"Link/... Image/...":f.link,"OrderedList/... BulletList/...":f.list,"BlockQuote/...":f.quote,"InlineCode CodeText":f.monospace,"URL Autolink":f.url,"HeaderMark HardBreak QuoteMark ListMark LinkMark EmphasisMark CodeMark":f.processingInstruction,"CodeInfo LinkLabel":f.labelName,LinkTitle:f.string,Paragraph:f.content}),ha=new bt(new ut(sa).extend(CO),Object.keys(Kt).map(r=>Kt[r]),Object.keys(Kt).map(r=>na[r]),Object.keys(Kt),RO,Bs,Object.keys(on).map(r=>on[r]),Object.keys(on),[]);function zO(r,e,t){let n=[];for(let i=r.firstChild,s=e;;i=i.nextSibling){let a=i?i.from:t;if(a>s&&n.push({from:s,to:a}),!i)break;s=i.to}return n}function ua(r){let{codeParser:e,htmlParser:t}=r;return{wrap:Mt((i,s)=>{let a=i.type.id;if(e&&(a==$.CodeBlock||a==$.FencedCode)){let o="";if(a==$.FencedCode){let O=i.node.getChild($.CodeInfo);O&&(o=s.read(O.from,O.to))}let l=e(o);if(l)return{parser:l,overlay:O=>O.type.id==$.CodeText,bracketed:a==$.FencedCode}}else if(t&&(a==$.HTMLBlock||a==$.HTMLTag||a==$.CommentBlock))return{parser:t,overlay:zO(i.node,i.from,i.to)};return null})}}var qO={resolve:"Strikethrough",mark:"StrikethroughMark"},AO={defineNodes:[{name:"Strikethrough",style:{"Strikethrough/...":f.strikethrough}},{name:"StrikethroughMark",style:f.processingInstruction}],parseInline:[{name:"Strikethrough",parse(r,e,t){if(e!=126||r.char(t+1)!=126||r.char(t+2)==126)return-1;let n=r.slice(t-1,t),i=r.slice(t+2,t+3),s=/\s|^$/.test(n),a=/\s|^$/.test(i),o=St.test(n),l=St.test(i);return r.addDelimiter(qO,t,t+2,!a&&(!l||s||o),!s&&(!o||a||l))},after:"Emphasis"}]};function $t(r,e,t=0,n,i=0){let s=0,a=!0,o=-1,l=-1,O=!1,c=()=>{n.push(r.elt("TableCell",i+o,i+l,r.parser.parseInline(e.slice(o,l),i+o)))};for(let h=t;h<e.length;h++){let p=e.charCodeAt(h);p==124&&!O?((!a||o>-1)&&s++,a=!1,n&&(o>-1&&c(),n.push(r.elt("TableDelimiter",h+i,h+i+1))),o=l=-1):(O||p!=32&&p!=9)&&(o<0&&(o=h),l=h+1),O=!O&&p==92}return o>-1&&(s++,n&&c()),s}function Ws(r,e){for(let t=e;t<r.length;t++){let n=r.charCodeAt(t);if(n==124)return!0;n==92&&t++}return!1}var pa=/^[>\s]*\|?(\s*:?-+:?\s*\|)+(\s*:?-+:?\s*)?$/,ir=class{constructor(){this.rows=null}nextLine(e,t,n){if(this.rows==null){this.rows=!1;let i;if((t.next==45||t.next==58||t.next==124)&&pa.test(i=t.text.slice(t.pos))){let s=[];$t(e,n.content,0,s,n.start)==$t(e,i,0)&&(this.rows=[e.elt("TableHeader",n.start,n.start+n.content.length,s),e.elt("TableDelimiter",e.lineStart+t.pos,e.lineStart+t.text.length)])}}else if(this.rows){let i=[];$t(e,t.text,t.pos,i,e.lineStart),this.rows.push(e.elt("TableRow",e.lineStart+t.pos,e.lineStart+t.text.length,i))}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}},LO={defineNodes:[{name:"Table",block:!0},{name:"TableHeader",style:{"TableHeader/...":f.heading}},"TableRow",{name:"TableCell",style:f.content},{name:"TableDelimiter",style:f.processingInstruction}],parseBlock:[{name:"Table",leaf(r,e){return Ws(e.content,0)?new ir:null},endLeaf(r,e,t){if(t.parsers.some(i=>i instanceof ir)||!Ws(e.text,e.basePos))return!1;let n=r.peekLine();return pa.test(n)&&$t(r,e.text,e.basePos)==$t(r,n,e.basePos)},before:"SetextHeading"}]},Qn=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}},EO={defineNodes:[{name:"Task",block:!0,style:f.list},{name:"TaskMarker",style:f.atom}],parseBlock:[{name:"TaskList",leaf(r,e){return/^\[[ xX]\][ \t]/.test(e.content)&&r.parentType().name=="ListItem"?new Qn:null},after:"SetextHeading"}]},Ms=/(www\.)|(https?:\/\/)|([\w.+-]{1,100}@)|(mailto:|xmpp:)/gy,Us=/[\w-]+(\.[\w-]+)+(:\d+)?(\/[^\s<]*)?/gy,WO=/[\w-]+\.[\w-]+($|[/:])/,Vs=/[\w.+-]+@[\w-]+(\.[\w.-]+)+/gy,Gs=/\/[a-zA-Z\d@.]+/gy;function Is(r,e,t,n){let i=0;for(let s=e;s<t;s++)r[s]==n&&i++;return i}function MO(r,e){Us.lastIndex=e;let t=Us.exec(r);if(!t||WO.exec(t[0])[0].indexOf("_")>-1)return-1;let n=e+t[0].length;for(;;){let i=r[n-1],s;if(/[?!.,:*_~]/.test(i)||i==")"&&Is(r,e,n,")")>Is(r,e,n,"("))n--;else if(i==";"&&(s=/&(?:#\d+|#x[a-f\d]+|\w+);$/.exec(r.slice(e,n))))n=e+s.index;else break}return n}function Ds(r,e){Vs.lastIndex=e;let t=Vs.exec(r);if(!t)return-1;let n=t[0][t[0].length-1];return n=="_"||n=="-"?-1:e+t[0].length-(n=="."?1:0)}var UO={parseInline:[{name:"Autolink",parse(r,e,t){let n=t-r.offset;if(n&&/\w/.test(r.text[n-1]))return-1;Ms.lastIndex=n;let i=Ms.exec(r.text),s=-1;if(!i)return-1;if(i[1]||i[2]){if(s=MO(r.text,n+i[0].length),s>-1&&r.hasOpenLink){let a=/([^\[\]]|\[[^\]]*\])*/.exec(r.text.slice(n,s));s=n+a[0].length}}else i[3]?s=Ds(r.text,n):(s=Ds(r.text,n+i[0].length),s>-1&&i[0]=="xmpp:"&&(Gs.lastIndex=s,i=Gs.exec(r.text),i&&(s=i.index+i[0].length)));return s<0?-1:(r.addElement(r.elt("URL",t,s+r.offset)),s+r.offset)}}]},fa=[LO,EO,AO,UO];function da(r,e,t){return(n,i,s)=>{if(i!=r||n.char(s+1)==r)return-1;let a=[n.elt(t,s,s+1)];for(let o=s+1;o<n.end;o++){let l=n.char(o);if(l==r)return n.addElement(n.elt(e,s,o+1,a.concat(n.elt(t,o,o+1))));if(l==92&&a.push(n.elt("Escape",o,o+++2)),D(l))break}return-1}}var ma={defineNodes:[{name:"Superscript",style:f.special(f.content)},{name:"SuperscriptMark",style:f.processingInstruction}],parseInline:[{name:"Superscript",parse:da(94,"Superscript","SuperscriptMark")}]},ga={defineNodes:[{name:"Subscript",style:f.special(f.content)},{name:"SubscriptMark",style:f.processingInstruction}],parseInline:[{name:"Subscript",parse:da(126,"Subscript","SubscriptMark")}]},Qa={defineNodes:[{name:"Emoji",style:f.character}],parseInline:[{name:"Emoji",parse(r,e,t){let n;return e!=58||!(n=/^[a-zA-Z_0-9]+:/.exec(r.slice(t+1,r.end)))?-1:r.addElement(r.elt("Emoji",t,t+1+n[0].length))}}]};var yn=class r{constructor(e,t,n,i,s,a,o,l,O,c=0,h){this.p=e,this.stack=t,this.state=n,this.reducePos=i,this.pos=s,this.score=a,this.buffer=o,this.bufferBase=l,this.curContext=O,this.lookAhead=c,this.parent=h}toString(){return`[${this.stack.filter((e,t)=>t%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,t,n=0){let i=e.parser.context;return new r(e,[],t,n,n,0,[],0,i?new sr(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,t){this.stack.push(this.state,t,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var t;let n=e>>19,i=e&65535,{parser:s}=this.p,a=this.reducePos<this.pos-25&&this.setLookAhead(this.pos),o=s.dynamicPrecedence(i);if(o&&(this.score+=o),n==0){i<s.minRepeatTerm&&this.reducePos<this.pos&&(this.reducePos=this.pos),this.pushState(s.getGoto(this.state,i,!0),this.reducePos),i<s.minRepeatTerm&&this.storeNode(i,this.reducePos,this.reducePos,a?8:4,!0),this.reduceContext(i,this.reducePos);return}let l=this.stack.length-(n-1)*3-(e&262144?6:0),O=l?this.stack[l-2]:this.p.ranges[0].from;i<s.minRepeatTerm&&O==this.reducePos&&this.reducePos<this.pos&&(this.reducePos=this.pos);let c=this.reducePos-O;c>=2e3&&!(!((t=this.p.parser.nodeSet.types[i])===null||t===void 0)&&t.isAnonymous)&&(O==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=c):this.p.lastBigReductionSize<c&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=O,this.p.lastBigReductionSize=c));let h=l?this.stack[l-1]:0,p=this.bufferBase+this.buffer.length-h;if(i<s.minRepeatTerm||e&131072){let u=s.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(i,O,u,p+4,!0)}if(e&262144)this.state=this.stack[l];else{let u=this.stack[l-3];this.state=s.getGoto(u,i,!0)}for(;this.stack.length>l;)this.stack.pop();this.reduceContext(i,O)}storeNode(e,t,n,i=4,s=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let a=this.buffer.length;if(a>0&&this.buffer[a-4]==0&&this.buffer[a-1]>-1){if(t==n)return;if(this.buffer[a-2]>=t){this.buffer[a-2]=n;return}}}if(!s||this.pos==n)this.buffer.push(e,t,n,i);else{let a=this.buffer.length;if(a>0&&(this.buffer[a-4]!=0||this.buffer[a-1]<0)){let o=!1;for(let l=a;l>0&&this.buffer[l-2]>n;l-=4)if(this.buffer[l-1]>=0){o=!0;break}if(o)for(;a>0&&this.buffer[a-2]>n;)this.buffer[a]=this.buffer[a-4],this.buffer[a+1]=this.buffer[a-3],this.buffer[a+2]=this.buffer[a-2],this.buffer[a+3]=this.buffer[a-1],a-=4,i>4&&(i-=4)}this.buffer[a]=e,this.buffer[a+1]=t,this.buffer[a+2]=n,this.buffer[a+3]=i}}shift(e,t,n,i){if(e&131072)this.pushState(e&65535,this.pos);else if((e&262144)==0){let s=e,{parser:a}=this.p;this.pos=i;let o=a.stateFlag(s,1);!o&&(i>n||t<=a.maxNode)&&(this.reducePos=i),this.pushState(s,o?n:Math.min(n,this.reducePos)),this.shiftContext(t,n),t<=a.maxNode&&this.buffer.push(t,n,i,4)}else this.pos=i,this.shiftContext(t,n),t<=this.p.parser.maxNode&&this.buffer.push(t,n,i,4)}apply(e,t,n,i){e&65536?this.reduce(e):this.shift(e,t,n,i)}useNode(e,t,n){let i=this.p.reused.length-1;(i<0||this.p.reused[i]!=e)&&(this.p.reused.push(e),i++);let s=this.reducePos=this.pos=n+e.length;this.pushState(t,n),this.buffer.push(i,n,s,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,t=e.buffer.length;for(t&&e.buffer[t-4]==0&&(t-=4);t>0&&e.buffer[t-2]>e.reducePos;)t-=4;let n=e.buffer.slice(t),i=e.bufferBase+t;for(;e&&i==e.bufferBase;)e=e.parent;return new r(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,n,i,this.curContext,this.lookAhead,e)}recoverByDelete(e,t){let n=e<=this.p.parser.maxNode;n&&this.storeNode(e,this.pos,t,4),this.storeNode(0,this.pos,t,n?8:4),this.pos=this.reducePos=t,this.score-=190}canShift(e){for(let t=new Zn(this);;){let n=this.p.parser.stateSlot(t.state,4)||this.p.parser.hasAction(t.state,e);if(n==0)return!1;if((n&65536)==0)return!0;t.reduce(n)}}recoverByInsert(e){if(this.stack.length>=300)return[];let t=this.p.parser.nextStates(this.state);if(t.length>8||this.stack.length>=120){let i=[];for(let s=0,a;s<t.length;s+=2)(a=t[s+1])!=this.state&&this.p.parser.hasAction(a,e)&&i.push(t[s],a);if(this.stack.length<120)for(let s=0;i.length<8&&s<t.length;s+=2){let a=t[s+1];i.some((o,l)=>l&1&&o==a)||i.push(t[s],a)}t=i}let n=[];for(let i=0;i<t.length&&n.length<4;i+=2){let s=t[i+1];if(s==this.state)continue;let a=this.split();a.pushState(s,this.pos),a.storeNode(0,a.pos,a.pos,4,!0),a.shiftContext(t[i],this.pos),a.reducePos=this.pos,a.score-=200,n.push(a)}return n}forceReduce(){let{parser:e}=this.p,t=e.stateSlot(this.state,5);if((t&65536)==0)return!1;if(!e.validAction(this.state,t)){let n=t>>19,i=t&65535,s=this.stack.length-n*3;if(s<0||e.getGoto(this.stack[s],i,!1)<0){let a=this.findForcedReduction();if(a==null)return!1;t=a}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(t),!0}findForcedReduction(){let{parser:e}=this.p,t=[],n=(i,s)=>{if(!t.includes(i))return t.push(i),e.allActions(i,a=>{if(!(a&393216))if(a&65536){let o=(a>>19)-s;if(o>1){let l=a&65535,O=this.stack.length-o*3;if(O>=0&&e.getGoto(this.stack[O],l,!1)>=0)return o<<19|65536|l}}else{let o=n(a,s+1);if(o!=null)return o}})};return n(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let t=0;t<this.stack.length;t+=3)if(this.stack[t]!=e.stack[t])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(e){return this.p.parser.dialect.flags[e]}shiftContext(e,t){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,e,this,this.p.stream.reset(t)))}reduceContext(e,t){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,e,this,this.p.stream.reset(t)))}emitContext(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-3)&&this.storeNode(this.curContext.hash,this.reducePos,this.reducePos,-3,!0)}emitLookAhead(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-4)&&this.buffer.push(this.lookAhead,this.pos,this.pos,-4)}updateContext(e){if(e!=this.curContext.context){let t=new sr(this.curContext.tracker,e);t.hash!=this.curContext.hash&&this.emitContext(),this.curContext=t}}setLookAhead(e){return e<=this.lookAhead?!1:(this.emitLookAhead(),this.lookAhead=e,!0)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}},sr=class{constructor(e,t){this.tracker=e,this.context=t,this.hash=e.strict?e.hash(t):0}},Zn=class{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let t=e&65535,n=e>>19;n==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(n-1)*3;let i=this.start.p.parser.getGoto(this.stack[this.base-3],t,!0);this.state=i}},Xn=class r{constructor(e,t,n){this.stack=e,this.pos=t,this.index=n,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(e,t=e.bufferBase+e.buffer.length){return new r(e,t,t-e.bufferBase)}maybeNext(){let e=this.stack.parent;e!=null&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new r(this.stack,this.pos,this.index)}};function kt(r,e=Uint16Array){if(typeof r!="string")return r;let t=null;for(let n=0,i=0;n<r.length;){let s=0;for(;;){let a=r.charCodeAt(n++),o=!1;if(a==126){s=65535;break}a>=92&&a--,a>=34&&a--;let l=a-32;if(l>=46&&(l-=46,o=!0),s+=l,o)break;s*=46}t?t[i++]=s:t=new e(s)}return t}var Je=class{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}},$a=new Je,vn=class{constructor(e,t){this.input=e,this.ranges=t,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=$a,this.rangeIndex=0,this.pos=this.chunkPos=t[0].from,this.range=t[0],this.end=t[t.length-1].to,this.readNext()}resolveOffset(e,t){let n=this.range,i=this.rangeIndex,s=this.pos+e;for(;s<n.from;){if(!i)return null;let a=this.ranges[--i];s-=n.from-a.to,n=a}for(;t<0?s>n.to:s>=n.to;){if(i==this.ranges.length-1)return null;let a=this.ranges[++i];s+=a.from-n.to,n=a}return s}clipPos(e){if(e>=this.range.from&&e<this.range.to)return e;for(let t of this.ranges)if(t.to>e)return Math.max(e,t.from);return this.end}peek(e){let t=this.chunkOff+e,n,i;if(t>=0&&t<this.chunk.length)n=this.pos+e,i=this.chunk.charCodeAt(t);else{let s=this.resolveOffset(e,1);if(s==null)return-1;if(n=s,n>=this.chunk2Pos&&n<this.chunk2Pos+this.chunk2.length)i=this.chunk2.charCodeAt(n-this.chunk2Pos);else{let a=this.rangeIndex,o=this.range;for(;o.to<=n;)o=this.ranges[++a];this.chunk2=this.input.chunk(this.chunk2Pos=n),n+this.chunk2.length>o.to&&(this.chunk2=this.chunk2.slice(0,o.to-n)),i=this.chunk2.charCodeAt(0)}}return n>=this.token.lookAhead&&(this.token.lookAhead=n+1),i}acceptToken(e,t=0){let n=t?this.resolveOffset(t,-1):this.pos;if(n==null||n<this.token.start)throw new RangeError("Token end out of bounds");this.token.value=e,this.token.end=n}acceptTokenTo(e,t){this.token.value=e,this.token.end=t}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:e,chunkPos:t}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=e,this.chunk2Pos=t,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let e=this.input.chunk(this.pos),t=this.pos+e.length;this.chunk=t>this.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,t){if(t?(this.token=t,t.start=e,t.lookAhead=e+1,t.value=t.extended=-1):this.token=$a,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e<this.range.from;)this.range=this.ranges[--this.rangeIndex];for(;e>=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e<this.chunkPos+this.chunk.length?this.chunkOff=e-this.chunkPos:(this.chunk="",this.chunkOff=0),this.readNext()}return this}read(e,t){if(e>=this.chunkPos&&t<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,t-this.chunkPos);if(e>=this.chunk2Pos&&t<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,t-this.chunk2Pos);if(e>=this.range.from&&t<=this.range.to)return this.input.read(e,t);let n="";for(let i of this.ranges){if(i.from>=t)break;i.to>e&&(n+=this.input.read(Math.max(i.from,e),Math.min(i.to,t)))}return n}},Se=class{constructor(e,t){this.data=e,this.id=t}token(e,t){let{parser:n}=t.p;xa(this.data,e,t,this.id,n.data,n.tokenPrecTable)}};Se.prototype.contextual=Se.prototype.fallback=Se.prototype.extend=!1;var ke=class{constructor(e,t,n){this.precTable=t,this.elseToken=n,this.data=typeof e=="string"?kt(e):e}token(e,t){let n=e.pos,i=0;for(;;){let s=e.next<0,a=e.resolveOffset(1,1);if(xa(this.data,e,t,0,this.data,this.precTable),e.token.value>-1)break;if(this.elseToken==null)return;if(s||i++,a==null)break;e.reset(a,e.token)}i&&(e.reset(n,e.token),e.acceptToken(this.elseToken,i))}};ke.prototype.contextual=Se.prototype.fallback=Se.prototype.extend=!1;var z=class{constructor(e,t={}){this.token=e,this.contextual=!!t.contextual,this.fallback=!!t.fallback,this.extend=!!t.extend}};function xa(r,e,t,n,i,s){let a=0,o=1<<n,{dialect:l}=t.p.parser;e:for(;(o&r[a])!=0;){let O=r[a+1];for(let u=a+3;u<O;u+=2)if((r[u+1]&o)>0){let d=r[u];if(l.allows(d)&&(e.token.value==-1||e.token.value==d||GO(d,e.token.value,i,s))){e.acceptToken(d);break}}let c=e.next,h=0,p=r[a+2];if(e.next<0&&p>h&&r[O+p*3-3]==65535){a=r[O+p*3-1];continue e}for(;h<p;){let u=h+p>>1,d=O+u+(u<<1),m=r[d],g=r[d+1]||65536;if(c<m)p=u;else if(c>=g)h=u+1;else{a=r[d+2],e.advance();continue e}}break}}function ba(r,e,t){for(let n=e,i;(i=r[n])!=65535;n++)if(i==t)return n-e;return-1}function GO(r,e,t,n){let i=ba(t,n,e);return i<0||ba(t,n,r)<i}var B=typeof process<"u"&&process.env&&/\bparse\b/.test(process.env.LOG),xn=null;function Sa(r,e,t){let n=r.cursor(le.IncludeAnonymous);for(n.moveTo(e);;)if(!(t<0?n.childBefore(e):n.childAfter(e)))for(;;){if((t<0?n.to<e:n.from>e)&&!n.type.isError)return t<0?Math.max(0,Math.min(n.to-1,e-25)):Math.min(r.length,Math.max(n.from+1,e+25));if(t<0?n.prevSibling():n.nextSibling())break;if(!n.parent())return t<0?0:r.length}}var Tn=class{constructor(e,t){this.fragments=e,this.minRepeat=t,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.lastRepeat=null,this.lastRepeatPos=-1,this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?Sa(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?Sa(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(e<this.nextStart)return null;for(;this.fragment&&this.safeTo<=e;)this.nextFragment();if(!this.fragment)return null;for(;;){let t=this.trees.length-1;if(t<0)return this.nextFragment(),null;if(e<this.safeFrom)return null;let n=this.trees[t],i=this.index[t];if(i==n.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let s=n.children[i],a=this.start[t]+n.positions[i];if(a>e)return this.nextStart=a,null;if(s instanceof M){let o=a>this.lastRepeatPos&&s.type.id>=this.minRepeat;if(a==e||o){let l=a+s.length,O;if(a>=this.safeFrom&&l<=this.safeTo&&(!(O=s.prop(K.lookAhead))||l+O<this.fragment.to)&&(o&&(this.lastRepeat=s,this.lastRepeatPos=a),a==e))return s}this.index[t]++,a+s.length>=Math.max(this.safeFrom,e)&&(this.trees.push(s),this.start.push(a),this.index.push(0))}else this.index[t]++,this.nextStart=a+s.length}}},Rn=class{constructor(e,t){this.stream=t,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(n=>new Je)}getActions(e){let t=0,n=null,{parser:i}=e.p,{tokenizers:s}=i,a=i.stateSlot(e.state,3),o=e.curContext?e.curContext.hash:0,l=0;for(let O=0;O<s.length;O++){if((1<<O&a)==0)continue;let c=s[O],h=this.tokens[O];if(!(n&&!c.fallback)&&((c.contextual||h.start!=e.pos||h.mask!=a||h.context!=o)&&(this.updateCachedToken(h,c,e),h.mask=a,h.context=o),h.lookAhead>h.end+25&&(l=Math.max(h.lookAhead,l)),h.value!=0)){let p=t;if(h.extended>-1&&(t=this.addActions(e,h.extended,h.end,t)),t=this.addActions(e,h.value,h.end,t),!c.extend&&(n=h,t>p))break}}for(;this.actions.length>t;)this.actions.pop();return l&&e.setLookAhead(l),!n&&e.pos==this.stream.end&&(n=new Je,n.value=e.p.parser.eofTerm,n.start=n.end=e.pos,t=this.addActions(e,n.value,n.end,t)),this.mainToken=n,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let t=new Je,{pos:n,p:i}=e;return t.start=n,t.end=Math.min(n+1,i.stream.end),t.value=n==i.stream.end?i.parser.eofTerm:0,t}updateCachedToken(e,t,n){let i=this.stream.clipPos(n.pos);if(t.token(this.stream.reset(i,e),n),e.value>-1){let{parser:s}=n.p;for(let a=0;a<s.specialized.length;a++)if(s.specialized[a]==e.value){let o=s.specializers[a](this.stream.read(e.start,e.end),n);if(o>=0&&n.p.parser.dialect.allows(o>>1)){(o&1)==0?e.value=o>>1:e.extended=o>>1;break}}}else e.value=0,e.end=this.stream.clipPos(i+1)}putAction(e,t,n,i){for(let s=0;s<i;s+=3)if(this.actions[s]==e)return i;return this.actions[i++]=e,this.actions[i++]=t,this.actions[i++]=n,i}addActions(e,t,n,i){let{state:s}=e,{parser:a}=e.p,{data:o}=a;for(let l=0;l<2;l++)for(let O=a.stateSlot(s,l?2:1);;O+=3){if(o[O]==65535)if(o[O+1]==1)O=pe(o,O+2);else{i==0&&o[O+1]==2&&(i=this.putAction(pe(o,O+2),t,n,i));break}o[O]==t&&(i=this.putAction(pe(o,O+1),t,n,i))}return i}},jn=class{constructor(e,t,n,i){this.parser=e,this.input=t,this.ranges=i,this.recovering=0,this.nextStackID=9812,this.minStackPos=0,this.reused=[],this.stoppedAt=null,this.lastBigReductionStart=-1,this.lastBigReductionSize=0,this.bigReductionCount=0,this.stream=new vn(t,i),this.tokens=new Rn(e,this.stream),this.topTerm=e.top[1];let{from:s}=i[0];this.stacks=[yn.start(this,e.top[0],s)],this.fragments=n.length&&this.stream.end-s>e.bufferLength*4?new Tn(n,e.minRepeatTerm):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,t=this.minStackPos,n=this.stacks=[],i,s;if(this.bigReductionCount>300&&e.length==1){let[a]=e;for(;a.forceReduce()&&a.stack.length&&a.stack[a.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let a=0;a<e.length;a++){let o=e[a];for(;;){if(this.tokens.mainToken=null,o.pos>t)n.push(o);else{if(this.advanceStack(o,n,e))continue;{i||(i=[],s=[]),i.push(o);let l=this.tokens.getMainToken(o);s.push(l.value,l.end)}}break}}if(!n.length){let a=i&&IO(i);if(a)return B&&console.log("Finish with "+this.stackID(a)),this.stackToTree(a);if(this.parser.strict)throw B&&i&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+t);this.recovering||(this.recovering=5)}if(this.recovering&&i){let a=this.stoppedAt!=null&&i[0].pos>this.stoppedAt?i[0]:this.runRecovery(i,s,n);if(a)return B&&console.log("Force-finish "+this.stackID(a)),this.stackToTree(a.forceAll())}if(this.recovering){let a=this.recovering==1?1:this.recovering*3;if(n.length>a)for(n.sort((o,l)=>l.score-o.score);n.length>a;)n.pop();n.some(o=>o.reducePos>t)&&this.recovering--}else if(n.length>1){e:for(let a=0;a<n.length-1;a++){let o=n[a];for(let l=a+1;l<n.length;l++){let O=n[l];if(o.sameState(O)||o.buffer.length>500&&O.buffer.length>500)if((o.score-O.score||o.buffer.length-O.buffer.length)>0)n.splice(l--,1);else{n.splice(a--,1);continue e}}}n.length>12&&(n.sort((a,o)=>o.score-a.score),n.splice(12,n.length-12))}this.minStackPos=n[0].pos;for(let a=1;a<n.length;a++)n[a].pos<this.minStackPos&&(this.minStackPos=n[a].pos);return null}stopAt(e){if(this.stoppedAt!=null&&this.stoppedAt<e)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=e}tryReuse(e,t,n,i){if(!n)return null;let s=e.curContext&&e.curContext.tracker.strict,a=s?e.curContext.hash:0;for(;n;){let o=this.parser.nodeSet.types[n.type.id]!=n.type?-1:this.parser.getGoto(e.state,n.type.id);if(o>-1&&n.length&&(!s||(n.prop(K.contextHash)||0)==a))return e.useNode(n,o,t),n;if(n.children.length==0||n.positions[0]>0)break;let l=n.children[0];if(l instanceof M&&(!i||l.type.id>=this.parser.minRepeatTerm))n=l;else break}return null}advanceStack(e,t,n){let i=e.pos,{parser:s}=this,a=B?this.stackID(e)+" -> ":"";if(this.stoppedAt!=null&&i>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let O=e.reducePos<i&&e.buffer.length&&e.buffer[e.buffer.length-2]<=e.reducePos&&this.fragments.lastRepeatPos==e.reducePos&&this.tryReuse(e,e.reducePos,this.fragments.lastRepeat,!0)||this.tryReuse(e,i,this.fragments.nodeAt(i),!1);if(O)return B&&console.log(a+this.stackID(e)+` (via reuse of ${s.getName(O.type.id)})`),!0}let o=s.stateSlot(e.state,4);if(o>0)return e.reduce(o),B&&console.log(a+this.stackID(e)+` (via always-reduce ${s.getName(o&65535)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let l=this.tokens.getActions(e);for(let O=0;O<l.length;){let c=l[O++],h=l[O++],p=l[O++],u=O==l.length||!n,d=u?e:e.split(),m=this.tokens.mainToken;if(d.apply(c,h,m?m.start:d.pos,p),B&&console.log(a+this.stackID(d)+` (via ${(c&65536)==0?"shift":`reduce of ${s.getName(c&65535)}`} for ${s.getName(h)} @ ${i}${d==e?"":", split"})`),u)return!0;d.pos>i?t.push(d):n.push(d)}return!1}advanceFully(e,t){let n=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>n)return ka(e,t),!0}}runRecovery(e,t,n){let i=null,s=!1;for(let a=0;a<e.length;a++){let o=e[a],l=t[a<<1],O=t[(a<<1)+1],c=B?this.stackID(o)+" -> ":"";if(o.deadEnd&&(s||(s=!0,o.restart(),B&&console.log(c+this.stackID(o)+" (restarted)"),this.advanceFully(o,n))))continue;let h=o.split(),p=c;for(let u=0;u<10&&h.forceReduce()&&(B&&console.log(p+this.stackID(h)+" (via force-reduce)"),!this.advanceFully(h,n));u++)B&&(p=this.stackID(h)+" -> ");for(let u of o.recoverByInsert(l))B&&console.log(c+this.stackID(u)+" (via recover-insert)"),this.advanceFully(u,n);this.stream.end>o.pos?(O==o.pos&&(O++,l=0),o.recoverByDelete(l,O),B&&console.log(c+this.stackID(o)+` (via recover-delete ${this.parser.getName(l)})`),ka(o,n)):(!i||i.score<h.score)&&(i=h)}return i}stackToTree(e){return e.close(),M.build({buffer:Xn.create(e),nodeSet:this.parser.nodeSet,topID:this.topTerm,maxBufferLength:this.parser.bufferLength,reused:this.reused,start:this.ranges[0].from,length:e.pos-this.ranges[0].from,minRepeatType:this.parser.minRepeatTerm})}stackID(e){let t=(xn||(xn=new WeakMap)).get(e);return t||xn.set(e,t=String.fromCodePoint(this.nextStackID++)),t+e}};function ka(r,e){for(let t=0;t<e.length;t++){let n=e[t];if(n.pos==r.pos&&n.sameState(r)){e[t].score<r.score&&(e[t]=r);return}}e.push(r)}var _n=class{constructor(e,t,n){this.source=e,this.flags=t,this.disabled=n}allows(e){return!this.disabled||this.disabled[e]==0}},wn=r=>r,et=class{constructor(e){this.start=e.start,this.shift=e.shift||wn,this.reduce=e.reduce||wn,this.reuse=e.reuse||wn,this.hash=e.hash||(()=>0),this.strict=e.strict!==!1}},Pe=class r extends Wt{constructor(e){if(super(),this.wrappers=[],e.version!=14)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let t=e.nodeNames.split(" ");this.minRepeatTerm=t.length;for(let o=0;o<e.repeatNodeCount;o++)t.push("");let n=Object.keys(e.topRules).map(o=>e.topRules[o][1]),i=[];for(let o=0;o<t.length;o++)i.push([]);function s(o,l,O){i[o].push([l,l.deserialize(String(O))])}if(e.nodeProps)for(let o of e.nodeProps){let l=o[0];typeof l=="string"&&(l=K[l]);for(let O=1;O<o.length;){let c=o[O++];if(c>=0)s(c,l,o[O++]);else{let h=o[O+-c];for(let p=-c;p>0;p--)s(o[O++],l,h);O++}}}this.nodeSet=new ut(t.map((o,l)=>Re.define({name:l>=this.minRepeatTerm?void 0:o,id:l,props:i[l],top:n.indexOf(l)>-1,error:l==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(l)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=1024;let a=kt(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let o=0;o<this.specializerSpecs.length;o++)this.specialized[o]=this.specializerSpecs[o].term;this.specializers=this.specializerSpecs.map(Pa),this.states=kt(e.states,Uint32Array),this.data=kt(e.stateData),this.goto=kt(e.goto),this.maxTerm=e.maxTerm,this.tokenizers=e.tokenizers.map(o=>typeof o=="number"?new Se(a,o):o),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,t,n){let i=new jn(this,e,t,n);for(let s of this.wrappers)i=s(i,e,t,n);return i}getGoto(e,t,n=!1){let i=this.goto;if(t>=i[0])return-1;for(let s=i[t+1];;){let a=i[s++],o=a&1,l=i[s++];if(o&&n)return l;for(let O=s+(a>>1);s<O;s++)if(i[s]==e)return l;if(o)return-1}}hasAction(e,t){let n=this.data;for(let i=0;i<2;i++)for(let s=this.stateSlot(e,i?2:1),a;;s+=3){if((a=n[s])==65535)if(n[s+1]==1)a=n[s=pe(n,s+2)];else{if(n[s+1]==2)return pe(n,s+2);break}if(a==t||a==0)return pe(n,s+1)}return 0}stateSlot(e,t){return this.states[e*6+t]}stateFlag(e,t){return(this.stateSlot(e,0)&t)>0}validAction(e,t){return!!this.allActions(e,n=>n==t?!0:null)}allActions(e,t){let n=this.stateSlot(e,4),i=n?t(n):void 0;for(let s=this.stateSlot(e,1);i==null;s+=3){if(this.data[s]==65535)if(this.data[s+1]==1)s=pe(this.data,s+2);else break;i=t(pe(this.data,s+1))}return i}nextStates(e){let t=[];for(let n=this.stateSlot(e,1);;n+=3){if(this.data[n]==65535)if(this.data[n+1]==1)n=pe(this.data,n+2);else break;if((this.data[n+2]&1)==0){let i=this.data[n+1];t.some((s,a)=>a&1&&s==i)||t.push(this.data[n],i)}}return t}configure(e){let t=Object.assign(Object.create(r.prototype),this);if(e.props&&(t.nodeSet=this.nodeSet.extend(...e.props)),e.top){let n=this.topRules[e.top];if(!n)throw new RangeError(`Invalid top rule name ${e.top}`);t.top=n}return e.tokenizers&&(t.tokenizers=this.tokenizers.map(n=>{let i=e.tokenizers.find(s=>s.from==n);return i?i.to:n})),e.specializers&&(t.specializers=this.specializers.slice(),t.specializerSpecs=this.specializerSpecs.map((n,i)=>{let s=e.specializers.find(o=>o.from==n.external);if(!s)return n;let a=Object.assign(Object.assign({},n),{external:s.to});return t.specializers[i]=Pa(a),a})),e.contextTracker&&(t.context=e.contextTracker),e.dialect&&(t.dialect=this.parseDialect(e.dialect)),e.strict!=null&&(t.strict=e.strict),e.wrap&&(t.wrappers=t.wrappers.concat(e.wrap)),e.bufferLength!=null&&(t.bufferLength=e.bufferLength),t}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let t=this.dynamicPrecedences;return t==null?0:t[e]||0}parseDialect(e){let t=Object.keys(this.dialects),n=t.map(()=>!1);if(e)for(let s of e.split(" ")){let a=t.indexOf(s);a>=0&&(n[a]=!0)}let i=null;for(let s=0;s<t.length;s++)if(!n[s])for(let a=this.dialects[t[s]],o;(o=this.data[a++])!=65535;)(i||(i=new Uint8Array(this.maxTerm+1)))[o]=1;return new _n(e,n,i)}static deserialize(e){return new r(e)}};function pe(r,e){return r[e]|r[e+1]<<16}function IO(r){let e=null;for(let t of r){let n=t.p.stoppedAt;(t.pos==t.p.stream.end||n!=null&&t.pos>n)&&t.p.parser.stateFlag(t.state,2)&&(!e||e.score<t.score)&&(e=t)}return e}function Pa(r){if(r.external){let e=r.extend?1:0;return(t,n)=>r.external(t,n)<<1|e}return r.get}var DO=55,BO=1,NO=56,FO=2,HO=57,KO=3,wa=4,JO=5,An=6,_a=7,Ya=8,Ca=9,za=10,ec=11,tc=12,rc=13,Yn=58,nc=14,ic=15,ya=59,qa=21,sc=23,Aa=24,ac=25,zn=27,La=28,oc=29,lc=32,Oc=35,cc=37,hc=38,uc=0,pc=1,fc={area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},dc={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},Za={dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}};function mc(r){return r==45||r==46||r==58||r>=65&&r<=90||r==95||r>=97&&r<=122||r>=161}var Xa=null,va=null,Ta=0;function qn(r,e){let t=r.pos+e;if(Ta==t&&va==r)return Xa;let n=r.peek(e),i="";for(;mc(n);)i+=String.fromCharCode(n),n=r.peek(++e);return va=r,Ta=t,Xa=i?i.toLowerCase():n==gc||n==Qc?void 0:null}var Ea=60,ar=62,Ln=47,gc=63,Qc=33,$c=45;function Ra(r,e){this.name=r,this.parent=e}var bc=[An,za,_a,Ya,Ca],Sc=new et({start:null,shift(r,e,t,n){return bc.indexOf(e)>-1?new Ra(qn(n,1)||"",r):r},reduce(r,e){return e==qa&&r?r.parent:r},reuse(r,e,t,n){let i=e.type.id;return i==An||i==cc?new Ra(qn(n,1)||"",r):r},strict:!1}),kc=new z((r,e)=>{if(r.next!=Ea){r.next<0&&e.context&&r.acceptToken(Yn);return}r.advance();let t=r.next==Ln;t&&r.advance();let n=qn(r,0);if(n===void 0)return;if(!n)return r.acceptToken(t?ic:nc);let i=e.context?e.context.name:null;if(t){if(n==i)return r.acceptToken(ec);if(i&&dc[i])return r.acceptToken(Yn,-2);if(e.dialectEnabled(uc))return r.acceptToken(tc);for(let s=e.context;s;s=s.parent)if(s.name==n)return;r.acceptToken(rc)}else{if(n=="script")return r.acceptToken(_a);if(n=="style")return r.acceptToken(Ya);if(n=="textarea")return r.acceptToken(Ca);if(fc.hasOwnProperty(n))return r.acceptToken(za);i&&Za[i]&&Za[i][n]?r.acceptToken(Yn,-1):r.acceptToken(An)}},{contextual:!0}),Pc=new z(r=>{for(let e=0,t=0;;t++){if(r.next<0){t&&r.acceptToken(ya);break}if(r.next==$c)e++;else if(r.next==ar&&e>=2){t>=3&&r.acceptToken(ya,-2);break}else e=0;r.advance()}});function xc(r){for(;r;r=r.parent)if(r.name=="svg"||r.name=="math")return!0;return!1}var wc=new z((r,e)=>{if(r.next==Ln&&r.peek(1)==ar){let t=e.dialectEnabled(pc)||xc(e.context);r.acceptToken(t?JO:wa,2)}else r.next==ar&&r.acceptToken(wa,1)});function En(r,e,t){let n=2+r.length;return new z(i=>{for(let s=0,a=0,o=0;;o++){if(i.next<0){o&&i.acceptToken(e);break}if(s==0&&i.next==Ea||s==1&&i.next==Ln||s>=2&&s<n&&i.next==r.charCodeAt(s-2))s++,a++;else if(s==n&&i.next==ar){o>a?i.acceptToken(e,-a):i.acceptToken(t,-(a-2));break}else if((i.next==10||i.next==13)&&o){i.acceptToken(e,1);break}else s=a=0;i.advance()}})}var yc=En("script",DO,BO),Zc=En("style",NO,FO),Xc=En("textarea",HO,KO),vc=Oe({"Text RawText IncompleteTag IncompleteCloseTag":f.content,"StartTag StartCloseTag SelfClosingEndTag EndTag":f.angleBracket,TagName:f.tagName,"MismatchedCloseTag/TagName":[f.tagName,f.invalid],AttributeName:f.attributeName,"AttributeValue UnquotedAttributeValue":f.attributeValue,Is:f.definitionOperator,"EntityReference CharacterReference":f.character,Comment:f.blockComment,ProcessingInst:f.processingInstruction,DoctypeDecl:f.documentMeta}),Wa=Pe.deserialize({version:14,states:",xOVO!rOOO!ZQ#tO'#CrO!`Q#tO'#C{O!eQ#tO'#DOO!jQ#tO'#DRO!oQ#tO'#DTO!tOaO'#CqO#PObO'#CqO#[OdO'#CqO$kO!rO'#CqOOO`'#Cq'#CqO$rO$fO'#DUO$zQ#tO'#DWO%PQ#tO'#DXOOO`'#Dl'#DlOOO`'#DZ'#DZQVO!rOOO%UQ&rO,59^O%aQ&rO,59gO%lQ&rO,59jO%wQ&rO,59mO&SQ&rO,59oOOOa'#D_'#D_O&_OaO'#CyO&jOaO,59]OOOb'#D`'#D`O&rObO'#C|O&}ObO,59]OOOd'#Da'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X~OQ!ZO![!XO~O!ZlORsX![sX~OR!]O![!XO~O![!XO~P#gOg!_O~O!]sO!f!aO~OS!bO~OS!cO~Oj!dOShXThXihX~OS!fOT!gOiyO~OS!hOT!gOiyO~OS!iOT!gOiyO~OS!jOT!gOiyO~OS!gOT!gOiyO~Og!kO~Og!lO~Og!mO~OS!nO~Ol!qO!a!oO!c!pO~OS!rO~OS!sO~OS!tO~Ob!uOc!uOd!uO!a!wO!b!uO~Ob!xOc!xOd!xO!c!wO!d!xO~Ob!uOc!uOd!uO!a!{O!b!uO~Ob!xOc!xOd!xO!c!{O!d!xO~OT~cbd!ey|!e~",goto:"%q!aPPPPPPPPPPPPPPPPPPPPP!b!hP!nPP!zP!}#Q#T#Z#^#a#g#j#m#s#y!bP!b!bP$P$V$m$s$y%P%V%]%cPPPPPPPP%iX^OX`pXUOX`pezabcde{!O!Q!S!UR!q!dRhUR!XhXVOX`pRkVR!XkXWOX`pRnWR!XnXXOX`pQrXR!XpXYOX`pQ`ORx`Q{aQ!ObQ!QcQ!SdQ!UeZ!e{!O!Q!S!UQ!v!oR!z!vQ!y!pR!|!yQgUR!VgQjVR!YjQmWR![mQpXR!^pQtZR!`tS_O`ToXp",nodeNames:"\u26A0 StartCloseTag StartCloseTag StartCloseTag EndTag SelfClosingEndTag StartTag StartTag StartTag StartTag StartTag StartCloseTag StartCloseTag StartCloseTag IncompleteTag IncompleteCloseTag Document Text EntityReference CharacterReference InvalidEntity Element OpenTag TagName Attribute AttributeName Is AttributeValue UnquotedAttributeValue ScriptText CloseTag OpenTag StyleText CloseTag OpenTag TextareaText CloseTag OpenTag CloseTag SelfClosingTag Comment ProcessingInst MismatchedCloseTag CloseTag DoctypeDecl",maxTerm:68,context:Sc,nodeProps:[["closedBy",-10,1,2,3,7,8,9,10,11,12,13,"EndTag",6,"EndTag SelfClosingEndTag",-4,22,31,34,37,"CloseTag"],["openedBy",4,"StartTag StartCloseTag",5,"StartTag",-4,30,33,36,38,"OpenTag"],["group",-10,14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x!`!5k!`!a!7r!a;'S!5k;'S;=`!8V<%lO!5kq!7yS!dpyPOv(Vx;'S(V;'S;=`(h<%lO(Vq!8YP;=`<%l!5ka!8bX!b`Or!8]rs!6Vsv!8]vw!6Vw!a!8]!a!b!8}!b;'S!8];'S;=`!:V<%lO!8]a!9SX!b`Or!8]rs!6Vsv!8]vw!6Vw!`!8]!`!a!9o!a;'S!8];'S;=`!:V<%lO!8]a!9vT!b`yPOr)esv)ew;'S)e;'S;=`)y<%lO)ea!:YP;=`<%l!8]!R!:dY!b`!dpOr!4trs!5ksv!4tvw!6Vwx!8]x!`!4t!`!a!;S!a;'S!4t;'S;=`!;r<%lO!4t!R!;]V!b`!dpyPOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!;uP;=`<%l!4t!V!<TXjSaP!b`!dpOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X",tokenizers:[yc,Zc,Xc,wc,kc,Pc,0,1,2,3,4,5],topRules:{Document:[0,16]},dialects:{noMatch:0,selfClosing:515},tokenPrec:517});function Ma(r,e){let t=Object.create(null);for(let n of r.getChildren(Aa)){let i=n.getChild(ac),s=n.getChild(zn)||n.getChild(La);i&&(t[e.read(i.from,i.to)]=s?s.type.id==zn?e.read(s.from+1,s.to-1):e.read(s.from,s.to):"")}return t}function ja(r,e){let t=r.getChild(sc);return t?e.read(t.from,t.to):" "}function Cn(r,e,t){let n;for(let i of t)if(!i.attrs||i.attrs(n||(n=Ma(r.node.parent.firstChild,e))))return{parser:i.parser,bracketed:!0};return null}function Wn(r=[],e=[]){let t=[],n=[],i=[],s=[];for(let o of r)(o.tag=="script"?t:o.tag=="style"?n:o.tag=="textarea"?i:s).push(o);let a=e.length?Object.create(null):null;for(let o of e)(a[o.name]||(a[o.name]=[])).push(o);return Mt((o,l)=>{let O=o.type.id;if(O==oc)return Cn(o,l,t);if(O==lc)return Cn(o,l,n);if(O==Oc)return Cn(o,l,i);if(O==qa&&s.length){let c=o.node,h=c.firstChild,p=h&&ja(h,l),u;if(p){for(let d of s)if(d.tag==p&&(!d.attrs||d.attrs(u||(u=Ma(h,l))))){let m=c.lastChild,g=m.type.id==hc?m.from:c.to;if(g>h.to)return{parser:d.parser,overlay:[{from:h.to,to:g}]}}}}if(a&&O==Aa){let c=o.node,h;if(h=c.firstChild){let p=a[l.read(h.from,h.to)];if(p)for(let u of p){if(u.tagName&&u.tagName!=ja(c.parent,l))continue;let d=c.lastChild;if(d.type.id==zn){let m=d.from+1,g=d.lastChild,b=d.to-(g&&g.isError?0:1);if(b>m)return{parser:u.parser,overlay:[{from:m,to:b}],bracketed:!0}}else if(d.type.id==La)return{parser:u.parser,overlay:[{from:d.from,to:d.to}]}}}}return null})}var Tc=148,Ua=1,Rc=149,jc=150,Ia=2,_c=151,Yc=3,Cc=4,zc=152,Da=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],qc=58,Ac=40,Ba=95,Lc=91,or=45,Ec=46,Wc=35,Mc=37,Uc=38,Vc=92,Gc=10,Ic=42;function Pt(r){return r>=65&&r<=90||r>=97&&r<=122||r>=161}function Mn(r){return r>=48&&r<=57}function Va(r){return Mn(r)||r>=97&&r<=102||r>=65&&r<=70}var Na=(r,e,t)=>(n,i)=>{for(let s=!1,a=0,o=0;;o++){let{next:l}=n;if(Pt(l)||l==or||l==Ba||s&&Mn(l))!s&&(l!=or||o>0)&&(s=!0),a===o&&l==or&&a++,n.advance();else if(l==Vc&&n.peek(1)!=Gc){if(n.advance(),Va(n.next)){do n.advance();while(Va(n.next));n.next==32&&n.advance()}else n.next>-1&&n.advance();s=!0}else{s&&n.acceptToken(a>=2&&i.canShift(Ia)?e:l==Ac?t:r);break}}},Dc=new z(Na(Rc,Ia,jc),{contextual:!0}),Bc=new z(Na(_c,Yc,Cc),{contextual:!0}),Nc=new z(r=>{if(Da.includes(r.peek(-1))){let{next:e}=r;(Pt(e)||e==Ba||e==Wc||e==Ec||e==Ic||e==Lc||e==qc&&Pt(r.peek(1))||e==or||e==Uc)&&r.acceptToken(Tc)}}),Fc=new z(r=>{if(!Da.includes(r.peek(-1))){let{next:e}=r;if(e==Mc&&(r.advance(),r.acceptToken(Ua)),Pt(e)){do r.advance();while(Pt(r.next)||Mn(r.next));r.acceptToken(Ua)}}});function Ga(r){let e=r.length;return(e==4||e==5||e==7||e==9)&&/^#[a-f\d]+$/i.test(r)?zc:-1}var Hc=Oe({"AtKeyword import charset namespace keyframes media supports font-feature-values":f.definitionKeyword,"from to selector scope MatchFlag":f.keyword,NamespaceName:f.namespace,KeyframeName:f.labelName,KeyframeRangeName:f.operatorKeyword,TagName:f.tagName,ClassName:f.className,PseudoClassName:f.constant(f.className),IdName:f.labelName,"FeatureName PropertyName":f.propertyName,AttributeName:f.attributeName,NumberLiteral:f.number,KeywordQuery:f.keyword,UnaryQueryOp:f.operatorKeyword,"CallTag ValueName FontName":f.atom,VariableName:f.variableName,Callee:f.operatorKeyword,Unit:f.unit,"UniversalSelector NestingSelector":f.definitionOperator,"MatchOp CompareOp":f.compareOperator,"ChildOp SiblingOp, LogicOp":f.logicOperator,BinOp:f.arithmeticOperator,Important:f.modifier,Comment:f.blockComment,ColorLiteral:f.color,"ParenthesizedContent StringLiteral":f.string,":":f.punctuation,PseudoOp:f.derefOperator,"; , |":f.separator,"( )":f.paren,"[ ]":f.squareBracket,"{ }":f.brace}),Kc={__proto__:null,lang:44,"nth-child":44,"nth-last-child":44,"nth-of-type":44,"nth-last-of-type":44,dir:44,"host-context":44,if:88,url:158,"url-prefix":158,domain:158,regexp:158},Jc={__proto__:null,or:102,and:102,not:112,only:112,layer:212},eh={__proto__:null,selector:118,style:124,layer:208},th={__proto__:null,"@import":204,"@media":216,"@charset":220,"@namespace":224,"@keyframes":230,"@supports":242,"@scope":246,"@font-feature-values":252},rh={__proto__:null,to:249},Fa=Pe.deserialize({version:14,states:"MrQYQdOOO$TQdOOP$[O`OOO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ector . ClassName PseudoClassSelector : :: PseudoClassName PseudoClassName ) ( ArgList ValueName ParenthesizedValue AtKeyword ; ] [ BracketedValue } { BracedValue ColorLiteral NumberLiteral StringLiteral BinaryExpression BinOp CallExpression Callee IfExpression if ArgList IfBranch KeywordQuery FeatureQuery FeatureName BinaryQuery LogicOp ComparisonQuery ColorLiteral CompareOp UnaryQuery UnaryQueryOp ParenthesizedQuery SelectorQuery selector ParenthesizedSelector StyleQuery style ParenthesedQuery CallQuery ArgList PropertyName , PropertyName UnaryQuery ParenthesedQuery BinaryQuery ParenthesedQuery ParenthesedQuery StyleFeature PropertyName StyleRange PseudoQuery CallLiteral CallTag ParenthesizedContent PseudoClassName ArgList IdSelector IdName AttributeSelector AttributeName NamespacedAttribute NamespaceName AttributeName MatchOp MatchFlag ChildSelector ChildOp DescendantSelector SiblingSelector SiblingOp Block Declaration PropertyName Important ImportStatement import Layer layer LayerName layer MediaStatement media CharsetStatement charset NamespaceStatement namespace NamespaceName KeyframesStatement keyframes KeyframeName KeyframeList KeyframeSelector KeyframeRangeName SupportsStatement supports ScopeStatement scope to FontFeatureStatement font-feature-values FontName AtRule Styles",maxTerm:176,nodeProps:[["isolate",-2,5,38,""],["openedBy",23,"(",30,"[",33,"{"],["closedBy",24,")",31,"]",34,"}"]],propSources:[Hc],skippedNodes:[0,5,130],repeatNodeCount:17,tokenData:"IO~R!bOX%ZX^&R^p%Zpq&Rqr)ers)vst+jtu/wuv%Zvw0qwx1Sxy2qyz3Sz{3X{|3r|}8e}!O8v!O!P9e!P!Q9|!Q![:u![!];p!]!^<l!^!_<}!_!`=y!`!a>^!a!b%Z!b!c?_!c!k%Z!k!lAl!l!u%Z!u!vAl!v!}%Z!}#OA}#O#P%Z#P#QB`#Q#R/w#R#]%Z#]#^Bq#^#g%Z#g#hAl#h#o%Z#o#pGU#p#qGg#q#rHO#r#sHa#s#y%Z#y#z&R#z$f%Z$f$g&R$g#BY%Z#BY#BZ&R#BZ$IS%Z$IS$I_&R$I_$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O%jfGlU$gUOy%jz!_%j!_!`0^!`;'S%j;'S;=`%{<%lO%jjHTSqYOy%jz;'S%j;'S;=`%{<%lO%jfHfU#SQOy%jz!_%j!_!`0^!`;'S%j;'S;=`%{<%lO%j`H{P;=`<%l%Z",tokenizers:[Nc,Fc,Dc,Bc,1,2,3,4,new ke("m~RRYZ[z{a~~g~aO$c~~dP!P!Qg~lO$d~~",28,156)],topRules:{StyleSheet:[0,6],Styles:[1,129]},dynamicPrecedences:{97:1},specialized:[{term:172,get:(r,e)=>Ga(r)<<1,external:Ga},{term:150,get:r=>Kc[r]||-1},{term:151,get:r=>Jc[r]||-1},{term:4,get:r=>eh[r]||-1},{term:28,get:r=>th[r]||-1},{term:149,get:r=>rh[r]||-1}],tokenPrec:2433});var Un=null;function Vn(){if(!Un&&typeof document=="object"&&document.body){let{style:r}=document.body,e=[],t=new Set;for(let n in r)n!="cssText"&&n!="cssFloat"&&typeof r[n]=="string"&&(/[A-Z]/.test(n)&&(n=n.replace(/[A-Z]/g,i=>"-"+i.toLowerCase())),t.has(n)||(e.push(n),t.add(n)));Un=e.sort().map(n=>({type:"property",label:n,apply:n+": "}))}return Un||[]}var Ha=["active","after","any-link","autofill","backdrop","before","checked","cue","default","defined","disabled","empty","enabled","file-selector-button","first","first-child","first-letter","first-line","first-of-type","focus","focus-visible","focus-within","fullscreen","has","host","host-context","hover","in-range","indeterminate","invalid","is","lang","last-child","last-of-type","left","link","marker","modal","not","nth-child","nth-last-child","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","part","placeholder","placeholder-shown","read-only","read-write","required","right","root","scope","selection","slotted","target","target-text","valid","visited","where"].map(r=>({type:"class",label:r})),Ka=["above","absolute","activeborder","additive","activecaption","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","antialiased","appworkspace","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic-abegede-gez","ethiopic-halehame-aa-er","ethiopic-halehame-gez","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","graytext","grid","groove","hand","hard-light","help","hidden","hide","higher","highlight","highlighttext","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","justify","keep-all","landscape","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-hexadecimal","lower-latin","lower-norwegian","lowercase","ltr","luminosity","manipulation","match","matrix","matrix3d","medium","menu","menutext","message-box","middle","min-intrinsic","mix","monospace","move","multiple","multiple_mask_images","multiply","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","opacity","open-quote","optimizeLegibility","optimizeSpeed","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","text","text-bottom","text-top","textarea","textfield","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","to","top","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-latin","uppercase","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"].map(r=>({type:"keyword",label:r})).concat(["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"].map(r=>({type:"constant",label:r}))),nh=["a","abbr","address","article","aside","b","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","dd","del","details","dfn","dialog","div","dl","dt","em","figcaption","figure","footer","form","header","hgroup","h1","h2","h3","h4","h5","h6","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","main","meter","nav","ol","output","p","pre","ruby","section","select","small","source","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","tr","u","ul"].map(r=>({type:"type",label:r})),ih=["@charset","@color-profile","@container","@counter-style","@font-face","@font-feature-values","@font-palette-values","@import","@keyframes","@layer","@media","@namespace","@page","@position-try","@property","@scope","@starting-style","@supports","@view-transition"].map(r=>({type:"keyword",label:r})),fe=/^(\w[\w-]*|-\w[\w-]*|)$/,sh=/^-(-[\w-]*)?$/;function ah(r,e){var t;if((r.name=="("||r.type.isError)&&(r=r.parent||r),r.name!="ArgList")return!1;let n=(t=r.parent)===null||t===void 0?void 0:t.firstChild;return n?.name!="Callee"?!1:e.sliceString(n.from,n.to)=="var"}var Ja=new Et,oh=["Declaration"];function lh(r){for(let e=r;;){if(e.type.isTop)return e;if(!(e=e.parent))return r}}function eo(r,e,t){if(e.to-e.from>4096){let n=Ja.get(e);if(n)return n;let i=[],s=new Set,a=e.cursor(le.IncludeAnonymous);if(a.firstChild())do for(let o of eo(r,a.node,t))s.has(o.label)||(s.add(o.label),i.push(o));while(a.nextSibling());return Ja.set(e,i),i}else{let n=[],i=new Set;return e.cursor().iterate(s=>{var a;if(t(s)&&s.matchContext(oh)&&((a=s.node.nextSibling)===null||a===void 0?void 0:a.name)==":"){let o=r.sliceString(s.from,s.to);i.has(o)||(i.add(o),n.push({label:o,type:"variable"}))}}),n}}var Oh=r=>e=>{let{state:t,pos:n}=e,i=R(t).resolveInner(n,-1),s=i.type.isError&&i.from==i.to-1&&t.doc.sliceString(i.from,i.to)=="-";if(i.name=="PropertyName"||(s||i.name=="TagName")&&/^(Block|Styles)$/.test(i.resolve(i.to).name))return{from:i.from,options:Vn(),validFor:fe};if(i.name=="ValueName")return{from:i.from,options:Ka,validFor:fe};if(i.name=="PseudoClassName")return{from:i.from,options:Ha,validFor:fe};if(r(i)||(e.explicit||s)&&ah(i,t.doc))return{from:r(i)||s?i.from:n,options:eo(t.doc,lh(i),r),validFor:sh};if(i.name=="TagName"){for(let{parent:l}=i;l;l=l.parent)if(l.name=="Block")return{from:i.from,options:Vn(),validFor:fe};return{from:i.from,options:nh,validFor:fe}}if(i.name=="AtKeyword")return{from:i.from,options:ih,validFor:fe};if(!e.explicit)return null;let a=i.resolve(n),o=a.childBefore(n);return o&&o.name==":"&&a.name=="PseudoClassSelector"?{from:n,options:Ha,validFor:fe}:o&&o.name==":"&&a.name=="Declaration"||a.name=="ArgList"?{from:n,options:Ka,validFor:fe}:a.name=="Block"||a.name=="Styles"?{from:n,options:Vn(),validFor:fe}:null},ch=Oh(r=>r.name=="VariableName"),xt=Be.define({name:"css",parser:Fa.configure({props:[$e.add({Declaration:Ne()}),he.add({"Block KeyframeList":Gt})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"}},indentOnInput:/^\s*\}$/,wordChars:"-"}});function to(){return new ce(xt,xt.data.of({autocomplete:ch}))}var hh=317,uh=318,ro=1,ph=2,fh=3,dh=4,mh=319,gh=321,Qh=322,$h=5,bh=6,Sh=0,In=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],no=125,kh=59,Dn=47,Ph=42,xh=43,wh=45,yh=60,Zh=44,Xh=63,vh=46,Th=91,Rh=new et({start:!1,shift(r,e){return e==$h||e==bh||e==gh?r:e==Qh},strict:!1}),jh=new z((r,e)=>{let{next:t}=r;(t==no||t==-1||e.context)&&r.acceptToken(mh)},{contextual:!0,fallback:!0}),_h=new z((r,e)=>{let{next:t}=r,n;In.indexOf(t)>-1||t==Dn&&((n=r.peek(1))==Dn||n==Ph)||t!=no&&t!=kh&&t!=-1&&!e.context&&r.acceptToken(hh)},{contextual:!0}),Yh=new z((r,e)=>{r.next==Th&&!e.context&&r.acceptToken(uh)},{contextual:!0}),Ch=new z((r,e)=>{let{next:t}=r;if(t==xh||t==wh){if(r.advance(),t==r.next){r.advance();let n=!e.context&&e.canShift(ro);r.acceptToken(n?ro:ph)}}else t==Xh&&r.peek(1)==vh&&(r.advance(),r.advance(),(r.next<48||r.next>57)&&r.acceptToken(fh))},{contextual:!0});function Gn(r,e){return r>=65&&r<=90||r>=97&&r<=122||r==95||r>=192||!e&&r>=48&&r<=57}var zh=new z((r,e)=>{if(r.next!=yh||!e.dialectEnabled(Sh)||(r.advance(),r.next==Dn))return;let t=0;for(;In.indexOf(r.next)>-1;)r.advance(),t++;if(Gn(r.next,!0)){for(r.advance(),t++;Gn(r.next,!1);)r.advance(),t++;for(;In.indexOf(r.next)>-1;)r.advance(),t++;if(r.next==Zh)return;for(let n=0;;n++){if(n==7){if(!Gn(r.next,!0))return;break}if(r.next!="extends".charCodeAt(n))break;r.advance(),t++}}r.acceptToken(dh,-t)}),qh=Oe({"get set async static":f.modifier,"for while do if else switch try catch finally return throw break continue default case defer":f.controlKeyword,"in of await yield void typeof delete instanceof as satisfies":f.operatorKeyword,"let var const using function class extends":f.definitionKeyword,"import export from":f.moduleKeyword,"with debugger new":f.keyword,TemplateString:f.special(f.string),super:f.atom,BooleanLiteral:f.bool,this:f.self,null:f.null,Star:f.modifier,VariableName:f.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":f.function(f.variableName),VariableDefinition:f.definition(f.variableName),Label:f.labelName,PropertyName:f.propertyName,PrivatePropertyName:f.special(f.propertyName),"CallExpression/MemberExpression/PropertyName":f.function(f.propertyName),"FunctionDeclaration/VariableDefinition":f.function(f.definition(f.variableName)),"ClassDeclaration/VariableDefinition":f.definition(f.className),"NewExpression/VariableName":f.className,PropertyDefinition:f.definition(f.propertyName),PrivatePropertyDefinition:f.definition(f.special(f.propertyName)),UpdateOp:f.updateOperator,"LineComment Hashbang":f.lineComment,BlockComment:f.blockComment,Number:f.number,String:f.string,Escape:f.escape,ArithOp:f.arithmeticOperator,LogicOp:f.logicOperator,BitOp:f.bitwiseOperator,CompareOp:f.compareOperator,RegExp:f.regexp,Equals:f.definitionOperator,Arrow:f.function(f.punctuation),": Spread":f.punctuation,"( )":f.paren,"[ ]":f.squareBracket,"{ }":f.brace,"InterpolationStart InterpolationEnd":f.special(f.brace),".":f.derefOperator,", ;":f.separator,"@":f.meta,TypeName:f.typeName,TypeDefinition:f.definition(f.typeName),"type enum interface implements namespace module declare":f.definitionKeyword,"abstract global Privacy readonly override":f.modifier,"is keyof unique infer asserts":f.operatorKeyword,JSXAttributeValue:f.attributeValue,JSXText:f.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":f.angleBracket,"JSXIdentifier JSXNameSpacedName":f.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":f.attributeName,"JSXBuiltin/JSXIdentifier":f.standard(f.tagName)}),Ah={__proto__:null,export:20,as:25,from:33,default:36,async:41,function:42,in:52,out:55,const:56,extends:60,this:64,true:72,false:72,null:84,void:88,typeof:92,super:108,new:142,delete:154,yield:163,await:167,class:172,public:237,private:237,protected:237,readonly:239,instanceof:258,satisfies:261,import:294,keyof:351,unique:355,infer:361,asserts:397,is:399,abstract:419,implements:421,type:423,let:426,var:428,using:431,interface:437,enum:441,namespace:447,module:449,declare:453,global:457,defer:473,for:478,of:487,while:490,with:494,do:498,if:502,else:504,switch:508,case:514,try:520,catch:524,finally:528,return:532,throw:536,break:540,continue:544,debugger:548},Lh={__proto__:null,async:129,get:131,set:133,declare:195,public:197,private:197,protected:197,static:199,abstract:201,override:203,readonly:209,accessor:211,new:403},Eh={__proto__:null,"<":193},io=Pe.deserialize({version:14,states:"$GSQ%TQlOOO%[QlOOO'_QpOOP(lO`OOO*zQ!0MxO'#CiO+RO#tO'#CjO+aO&jO'#CjO+oO#@ItO'#DaO.QQlO'#DgO.bQlO'#DrO%[QlO'#DzO0fQlO'#ESOOQ!0Lf'#E['#E[O1PQ`O'#EXOOQO'#Ep'#EpOOQO'#Im'#ImO1XQ`O'#GtO1dQ`O'#EoO1iQ`O'#EoO3hQ!0MxO'#JsO6[Q!0MxO'#JtO6uQ`O'#F^O6zQ,UO'#FuOOQ!0Lf'#Fg'#FgO7VO7dO'#FgO9XQMhO'#F}O9`Q`O'#F|OOQ!0Lf'#Jt'#JtOOQ!0Lb'#Js'#JsO9eQ`O'#GxOOQ['#K`'#K`O9pQ`O'#IZO9uQ!0LrO'#I[OOQ['#Ja'#JaOOQ['#I`'#I`Q`QlOOQ`QlOOO9}Q!L^O'#DvO:UQlO'#EOO:]QlO'#EQO9kQ`O'#GtO:dQMhO'#CoO:rQ`O'#EnO:}Q`O'#EzO;hQMhO'#FfO;xQ`O'#GtOOQO'#Ka'#KaO;}Q`O'#KaO<]Q`O'#G|O<]Q`O'#G}O<]Q`O'#HPO9kQ`O'#HSO=SQ`O'#HVO>kQ`O'#CeO>{Q`O'#HdO?TQ`O'#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g]!qQ!r'a-g1q5}Q#p]R'j<XR)g$dY!uQ'a-g1q5}Q'l!rS'v!v!yS'x!z6PS-v'm'nQ-x'oR3V-wT#kZ%eS#jZ%eS%km,qU(h#h#i#lS.[(i(jQ.`(kQ0v+`Q3[.]U3].^._.aS7U3^3_R9b7Vd#^W#W#Z%h(U(_*Z+[.V/or#gZm#h#i#l%e(i(j(k+`.].^._.a3^3_7VS*^$x*cQ/v*_Q2W,qQ2m-WQ4b/rQ6s2fQ7u4cQ9Y6tT=n'X+^V#aW%h*ZU#`W%h*ZS(V#W(_U([#Z+[/oS-]'X+^T.Q(U.VV'_!e%i*[Q$lfR)y$qT)n$l)oR4X/WT*`$x*cT*i${*ZQ0y+hQ1i,XQ3a.hQ5v1kQ6R1sQ7Z3eQ8t6UQ9e7YQ:`8sQ:r9dQ;]:bQ;e:tQ;p;^R;s;fnqOXst!Z#d%m&r&t&u&w,u,z2^2aQ&l!VR,j&itmOXst!U!V!Z#d%m&i&r&t&u&w,u,z2^2aR,q&oT%lm,qR1m,ZR,i&gQ&U|S,P&V&WR1`,QR+u&PT&p!W&sT&q!W&sT2`,z2a",nodeNames:"\u26A0 ArithOp ArithOp ?. JSXStartTag LineComment BlockComment Script Hashbang ExportDeclaration export Star as VariableName String Escape from ; default FunctionDeclaration async function VariableDefinition > < TypeParamList in out const TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewTarget new NewExpression ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression TypeArgList CompareOp < declare Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty VariableDefinition Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression InstantiationExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast < ArrowFunction TypeParamList SequenceExpression InstantiationExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate asserts is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var using TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration defer ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement SingleExpression SingleClassItem",maxTerm:381,context:Rh,nodeProps:[["isolate",-8,5,6,14,37,39,51,53,55,""],["group",-26,9,17,19,68,208,212,216,217,219,222,225,235,238,244,246,248,250,253,259,265,267,269,271,273,275,276,"Statement",-34,13,14,32,35,36,42,51,54,55,57,62,70,72,76,80,82,84,85,110,111,121,122,137,140,142,143,144,145,146,148,149,168,170,172,"Expression",-23,31,33,37,41,43,45,174,176,178,179,181,182,183,185,186,187,189,190,191,202,204,206,207,"Type",-3,88,103,109,"ClassItem"],["openedBy",23,"<",38,"InterpolationStart",56,"[",60,"{",73,"(",161,"JSXStartCloseTag"],["closedBy",-2,24,169,">",40,"InterpolationEnd",50,"]",61,"}",74,")",166,"JSXEndTag"]],propSources:[qh],skippedNodes:[0,5,6,279],repeatNodeCount:37,tokenData:"$Fq07[R!bOX%ZXY+gYZ-yZ[+g[]%Z]^.c^p%Zpq+gqr/mrs3cst:_tuEruvJSvwLkwx! Yxy!'iyz!(sz{!)}{|!,q|}!.O}!O!,q!O!P!/Y!P!Q!9j!Q!R#:O!R![#<_![!]#I_!]!^#Jk!^!_#Ku!_!`$![!`!a$$v!a!b$*T!b!c$,r!c!}Er!}#O$-|#O#P$/W#P#Q$4o#Q#R$5y#R#SEr#S#T$7W#T#o$8b#o#p$<r#p#q$=h#q#r$>x#r#s$@U#s$f%Z$f$g+g$g#BYEr#BY#BZ$A`#BZ$ISEr$IS$I_$A`$I_$I|Er$I|$I}$Dk$I}$JO$Dk$JO$JTEr$JT$JU$A`$JU$KVEr$KV$KW$A`$KW&FUEr&FU&FV$A`&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$A`?HUOEr(n%d_$j&j(Xp([!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z&j&hT$j&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c&j&zP;=`<%l&c'|'U]$j&j([!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!b(SU([!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!b(iP;=`<%l'}'|(oP;=`<%l&}'[(y]$j&j(XpOY(rYZ&cZr(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P~$RO(d~~",141,341),new ke("j~RQYZXz{^~^O(R~~aP!P!Qd~iO(S~~",25,324)],topRules:{Script:[0,7],SingleExpression:[1,277],SingleClassItem:[2,278]},dialects:{jsx:0,ts:15179},dynamicPrecedences:{80:1,82:1,94:1,170:1,200:1},specialized:[{term:328,get:r=>Ah[r]||-1},{term:344,get:r=>Lh[r]||-1},{term:95,get:r=>Eh[r]||-1}],tokenPrec:15205});var lo=[L("function ${name}(${params}) {\n ${}\n}",{label:"function",detail:"definition",type:"keyword"}),L("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}",{label:"for",detail:"loop",type:"keyword"}),L("for (let ${name} of ${collection}) {\n ${}\n}",{label:"for",detail:"of loop",type:"keyword"}),L("do {\n ${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),L("while (${}) {\n ${}\n}",{label:"while",detail:"loop",type:"keyword"}),L(`try { +import{$ as R,A as ve,B as X,C as Te,D as Ji,E as Yr,F as es,G as zr,H as qr,I as ts,Ia as ds,J as rs,K as ns,L as K,M as Re,N as pt,O as le,P as M,Q as Wt,R as Mt,S as Ut,T as is,U as Oe,V as f,W as ss,X as Vt,Y as Ar,Z as as,_ as Ne,a as Ii,aa as os,b as _r,ba as ce,c as W,ca as Lr,d as ht,da as Gt,e as J,ea as $e,f as Lt,fa as ls,g as Z,ga as Os,h as De,ha as Fe,i as ie,ia as cs,j as ge,ja as he,k as Cr,ka as It,l as Di,la as hs,m as q,ma as us,n as Bi,na as ps,o as A,p as Qe,q as ut,r as Ni,s as Fi,t as Hi,tc as ms,u as Be,uc as gs,v as I,w as ee,x as v,y as Ki,ya as fs,z as Et}from"./chunks/chunk-GJGDCSZU.js";import{a as Dt}from"./chunks/chunk-TO3N6BD7.js";import"./chunks/chunk-Y6SLVHK3.js";var He=class{constructor(e,r,n,i){this.state=e,this.pos=r,this.explicit=n,this.view=i,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(e){let r=R(this.state).resolveInner(this.pos,-1);for(;r&&e.indexOf(r.name)<0;)r=r.parent;return r?{from:r.from,to:this.pos,text:this.state.sliceDoc(r.from,this.pos),type:r.type}:null}matchBefore(e){let r=this.state.doc.lineAt(this.pos),n=Math.max(r.from,this.pos-250),i=r.text.slice(n-r.from,this.pos-r.from),s=i.search(Zs(e,!1));return s<0?null:{from:n+s,to:this.pos,text:i.slice(s)}}get aborted(){return this.abortListeners==null}addEventListener(e,r,n){e=="abort"&&this.abortListeners&&(this.abortListeners.push(r),n&&n.onDocChange&&(this.abortOnDocChange=!0))}};function Qs(t){let e=Object.keys(t).join(""),r=/\w/.test(e);return r&&(e=e.replace(/\w/g,"")),`[${r?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function Gl(t){let e=Object.create(null),r=Object.create(null);for(let{label:i}of t){e[i[0]]=!0;for(let s=1;s<i.length;s++)r[i[s]]=!0}let n=Qs(e)+Qs(r)+"*$";return[new RegExp("^"+n),new RegExp(n)]}function Kr(t){let e=t.map(i=>typeof i=="string"?{label:i}:i),[r,n]=e.every(i=>/^\w+$/.test(i.label))?[/\w*$/,/\w+$/]:Gl(e);return i=>{let s=i.matchBefore(n);return s||i.explicit?{from:s?s.from:i.pos,options:e,validFor:r}:null}}function ys(t,e){return r=>{for(let n=R(r.state).resolveInner(r.pos,-1);n;n=n.parent){if(t.indexOf(n.name)>-1)return null;if(n.type.isTop)break}return e(r)}}var Nt=class{constructor(e,r,n,i){this.completion=e,this.source=r,this.match=n,this.score=i}};function _e(t){return t.selection.main.from}function Zs(t,e){var r;let{source:n}=t,i=e&&n[0]!="^",s=n[n.length-1]!="$";return!i&&!s?t:new RegExp(`${i?"^":""}(?:${n})${s?"$":""}`,(r=t.flags)!==null&&r!==void 0?r:t.ignoreCase?"i":"")}var Jr=Di.define();function Il(t,e,r,n){let{main:i}=t.selection,s=r-i.from,a=n-i.from;return{...t.changeByRange(o=>{if(o!=i&&r!=n&&t.sliceDoc(o.from+s,o.from+a)!=t.sliceDoc(r,n))return{range:o};let l=t.toText(e);return{changes:{from:o.from+s,to:n==i.from?o.to:o.from+a,insert:l},range:Z.cursor(o.from+s+l.length)}}),scrollIntoView:!0,userEvent:"input.complete"}}var $s=new WeakMap;function Dl(t){if(!Array.isArray(t))return t;let e=$s.get(t);return e||$s.set(t,e=Kr(t)),e}var Ft=q.define(),ft=q.define(),Ur=class{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let r=0;r<e.length;){let n=W(e,r),i=J(n);this.chars.push(n);let s=e.slice(r,r+i),a=s.toUpperCase();this.folded.push(W(a==s?s.toLowerCase():a,0)),r+=i}this.astral=e.length!=this.chars.length}ret(e,r){return this.score=e,this.matched=r,this}match(e){if(this.pattern.length==0)return this.ret(-100,[]);if(e.length<this.pattern.length)return null;let{chars:r,folded:n,any:i,precise:s,byWord:a}=this;if(r.length==1){let Q=W(e,0),k=J(Q),y=k==e.length?0:-100;if(Q!=r[0])if(Q==n[0])y+=-200;else return null;return this.ret(y,[0,k])}let o=e.indexOf(this.pattern);if(o==0)return this.ret(e.length==this.pattern.length?0:-100,[0,this.pattern.length]);let l=r.length,O=0;if(o<0){for(let Q=0,k=Math.min(e.length,200);Q<k&&O<l;){let y=W(e,Q);(y==r[O]||y==n[O])&&(i[O++]=Q),Q+=J(y)}if(O<l)return null}let c=0,h=0,p=!1,u=0,d=-1,m=-1,g=/[a-z]/.test(e),b=!0;for(let Q=0,k=Math.min(e.length,200),y=0;Q<k&&h<l;){let w=W(e,Q);o<0&&(c<l&&w==r[c]&&(s[c++]=Q),u<l&&(w==r[u]||w==n[u]?(u==0&&(d=Q),m=Q+1,u++):u=0));let _,G=w<255?w>=48&&w<=57||w>=97&&w<=122?2:w>=65&&w<=90?1:0:(_=ht(w))!=_.toLowerCase()?1:_!=_.toUpperCase()?2:0;(!Q||G==1&&g||y==0&&G!=0)&&(r[h]==w||n[h]==w&&(p=!0)?a[h++]=Q:a.length&&(b=!1)),y=G,Q+=J(w)}return h==l&&a[0]==0&&b?this.result(-100+(p?-200:0),a,e):u==l&&d==0?this.ret(-200-e.length+(m==e.length?0:-100),[0,m]):o>-1?this.ret(-700-e.length,[o,o+this.pattern.length]):u==l?this.ret(-900-e.length,[d,m]):h==l?this.result(-100+(p?-200:0)+-700+(b?0:-1100),a,e):r.length==2?null:this.result((i[0]?-700:0)+-200+-1100,i,e)}result(e,r,n){let i=[],s=0;for(let a of r){let o=a+(this.astral?J(W(n,a)):1);s&&i[s-1]==a?i[s-1]=o:(i[s++]=a,i[s++]=o)}return this.ret(e-n.length,i)}},Vr=class{constructor(e){this.pattern=e,this.matched=[],this.score=0,this.folded=e.toLowerCase()}match(e){if(e.length<this.pattern.length)return null;let r=e.slice(0,this.pattern.length),n=r==this.pattern?0:r.toLowerCase()==this.folded?-200:null;return n==null?null:(this.matched=[0,r.length],this.score=n+(e.length==this.pattern.length?0:-100),this)}},Y=De.define({combine(t){return ut(t,{activateOnTyping:!0,activateOnCompletion:()=>!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:Bl,filterStrict:!1,compareCompletions:(e,r)=>(e.sortText||e.label).localeCompare(r.sortText||r.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(e,r)=>e&&r,closeOnBlur:(e,r)=>e&&r,icons:(e,r)=>e&&r,tooltipClass:(e,r)=>n=>bs(e(n),r(n)),optionClass:(e,r)=>n=>bs(e(n),r(n)),addToOptions:(e,r)=>e.concat(r),filterStrict:(e,r)=>e||r})}});function bs(t,e){return t?e?t+" "+e:t:e}function Bl(t,e,r,n,i,s){let a=t.textDirection==Ki.RTL,o=a,l=!1,O="top",c,h,p=e.left-i.left,u=i.right-e.right,d=n.right-n.left,m=n.bottom-n.top;if(o&&p<Math.min(d,u)?o=!1:!o&&u<Math.min(d,p)&&(o=!0),d<=(o?p:u))c=Math.max(i.top,Math.min(r.top,i.bottom-m))-e.top,h=Math.min(400,o?p:u);else{l=!0,h=Math.min(400,(a?e.right:i.right-e.left)-30);let Q=i.bottom-e.bottom;Q>=m||Q>e.top?c=r.bottom-e.top:(O="bottom",c=e.bottom-r.top)}let g=(e.bottom-e.top)/s.offsetHeight,b=(e.right-e.left)/s.offsetWidth;return{style:`${O}: ${c/g}px; max-width: ${h/b}px`,class:"cm-completionInfo-"+(l?a?"left-narrow":"right-narrow":o?"left":"right")}}var en=q.define();function Nl(t){let e=t.addToOptions.slice();return t.icons&&e.push({render(r){let n=document.createElement("div");return n.classList.add("cm-completionIcon"),r.type&&n.classList.add(...r.type.split(/\s+/g).map(i=>"cm-completionIcon-"+i)),n.setAttribute("aria-hidden","true"),n},position:20}),e.push({render(r,n,i,s){let a=document.createElement("span");a.className="cm-completionLabel";let o=r.displayLabel||r.label,l=0;for(let O=0;O<s.length;){let c=s[O++],h=s[O++];c>l&&a.appendChild(document.createTextNode(o.slice(l,c)));let p=a.appendChild(document.createElement("span"));p.appendChild(document.createTextNode(o.slice(c,h))),p.className="cm-completionMatchedText",l=h}return l<o.length&&a.appendChild(document.createTextNode(o.slice(l))),a},position:50},{render(r){if(!r.detail)return null;let n=document.createElement("span");return n.className="cm-completionDetail",n.textContent=r.detail,n},position:80}),e.sort((r,n)=>r.position-n.position).map(r=>r.render)}function Er(t,e,r){if(t<=r)return{from:0,to:t};if(e<0&&(e=0),e<=t>>1){let i=Math.floor(e/r);return{from:i*r,to:(i+1)*r}}let n=Math.ceil((t-e)/r);return{from:t-n*r,to:t-(n-1)*r}}var Gr=class{constructor(e,r,n){this.view=e,this.stateField=r,this.applyCompletion=n,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:l=>this.placeInfo(l),key:this},this.space=null,this.currentClass="";let i=e.state.field(r),{options:s,selected:a}=i.open,o=e.state.facet(Y);this.optionContent=Nl(o),this.optionClass=o.optionClass,this.tooltipClass=o.tooltipClass,this.range=Er(s.length,a,o.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",l=>{let{options:O}=e.state.field(r).open;for(let c=l.target,h;c&&c!=this.dom;c=c.parentNode)if(c.nodeName=="LI"&&(h=/-(\d+)$/.exec(c.id))&&+h[1]<O.length){this.applyCompletion(e,O[+h[1]]),l.preventDefault();return}if(l.target==this.list){let c=this.list.classList.contains("cm-completionListIncompleteTop")&&l.clientY<this.list.firstChild.getBoundingClientRect().top?this.range.from-1:this.list.classList.contains("cm-completionListIncompleteBottom")&&l.clientY>this.list.lastChild.getBoundingClientRect().bottom?this.range.to:null;c!=null&&(e.dispatch({effects:en.of(c)}),l.preventDefault())}}),this.dom.addEventListener("focusout",l=>{let O=e.state.field(this.stateField,!1);O&&O.tooltip&&e.state.facet(Y).closeOnBlur&&l.relatedTarget!=e.contentDOM&&e.dispatch({effects:ft.of(null)})}),this.showOptions(s,i.id)}mount(){this.updateSel()}showOptions(e,r){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e,r,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}update(e){var r;let n=e.state.field(this.stateField),i=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),n!=i){let{options:s,selected:a,disabled:o}=n.open;(!i.open||i.open.options!=s)&&(this.range=Er(s.length,a,e.state.facet(Y).maxRenderedOptions),this.showOptions(s,n.id)),this.updateSel(),o!=((r=i.open)===null||r===void 0?void 0:r.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!o)}}updateTooltipClass(e){let r=this.tooltipClass(e);if(r!=this.currentClass){for(let n of this.currentClass.split(" "))n&&this.dom.classList.remove(n);for(let n of r.split(" "))n&&this.dom.classList.add(n);this.currentClass=r}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),r=e.open;(r.selected>-1&&r.selected<this.range.from||r.selected>=this.range.to)&&(this.range=Er(r.options.length,r.selected,this.view.state.facet(Y).maxRenderedOptions),this.showOptions(r.options,e.id));let n=this.updateSelectedOption(r.selected);if(n){this.destroyInfo();let{completion:i}=r.options[r.selected],{info:s}=i;if(!s)return;let a=typeof s=="string"?document.createTextNode(s):s(i);if(!a)return;"then"in a?a.then(o=>{o&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(o,i)}).catch(o=>Et(this.view.state,o,"completion info")):(this.addInfoPane(a,i),n.setAttribute("aria-describedby",this.info.id))}}addInfoPane(e,r){this.destroyInfo();let n=this.info=document.createElement("div");if(n.className="cm-tooltip cm-completionInfo",n.id="cm-completionInfo-"+Math.floor(Math.random()*65535).toString(16),e.nodeType!=null)n.appendChild(e),this.infoDestroy=null;else{let{dom:i,destroy:s}=e;n.appendChild(i),this.infoDestroy=s||null}this.dom.appendChild(n),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let r=null;for(let n=this.list.firstChild,i=this.range.from;n;n=n.nextSibling,i++)n.nodeName!="LI"||!n.id?i--:i==e?n.hasAttribute("aria-selected")||(n.setAttribute("aria-selected","true"),r=n):n.hasAttribute("aria-selected")&&(n.removeAttribute("aria-selected"),n.removeAttribute("aria-describedby"));return r&&Hl(this.list,r),r}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let r=this.dom.getBoundingClientRect(),n=this.info.getBoundingClientRect(),i=e.getBoundingClientRect(),s=this.space;if(!s){let a=this.dom.ownerDocument.documentElement;s={left:0,top:0,right:a.clientWidth,bottom:a.clientHeight}}return i.top>Math.min(s.bottom,r.bottom)-10||i.bottom<Math.max(s.top,r.top)+10?null:this.view.state.facet(Y).positionInfo(this.view,r,i,n,s,this.dom)}placeInfo(e){this.info&&(e?(e.style&&(this.info.style.cssText=e.style),this.info.className="cm-tooltip cm-completionInfo "+(e.class||"")):this.info.style.cssText="top: -1e6px")}createListBox(e,r,n){let i=document.createElement("ul");i.id=r,i.setAttribute("role","listbox"),i.setAttribute("aria-expanded","true"),i.setAttribute("aria-label",this.view.state.phrase("Completions")),i.addEventListener("mousedown",a=>{a.target==i&&a.preventDefault()});let s=null;for(let a=n.from;a<n.to;a++){let{completion:o,match:l}=e[a],{section:O}=o;if(O){let p=typeof O=="string"?O:O.name;if(p!=s&&(a>n.from||n.from==0))if(s=p,typeof O!="string"&&O.header)i.appendChild(O.header(O));else{let u=i.appendChild(document.createElement("completion-section"));u.textContent=p}}let c=i.appendChild(document.createElement("li"));c.id=r+"-"+a,c.setAttribute("role","option");let h=this.optionClass(o);h&&(c.className=h);for(let p of this.optionContent){let u=p(o,this.view.state,this.view,l);u&&c.appendChild(u)}}return n.from&&i.classList.add("cm-completionListIncompleteTop"),n.to<e.length&&i.classList.add("cm-completionListIncompleteBottom"),i}destroyInfo(){this.info&&(this.infoDestroy&&this.infoDestroy(),this.info.remove(),this.info=null)}destroy(){this.destroyInfo()}};function Fl(t,e){return r=>new Gr(r,t,e)}function Hl(t,e){let r=t.getBoundingClientRect(),n=e.getBoundingClientRect(),i=r.height/t.offsetHeight;n.top<r.top?t.scrollTop-=(r.top-n.top)/i:n.bottom>r.bottom&&(t.scrollTop+=(n.bottom-r.bottom)/i)}function Ss(t){return(t.boost||0)*100+(t.apply?10:0)+(t.info?5:0)+(t.type?1:0)}function Kl(t,e){let r=[],n=null,i=null,s=c=>{r.push(c);let{section:h}=c.completion;if(h){n||(n=[]);let p=typeof h=="string"?h:h.name;n.some(u=>u.name==p)||n.push(typeof h=="string"?{name:p}:h)}},a=e.facet(Y);for(let c of t)if(c.hasResult()){let h=c.result.getMatch;if(c.result.filter===!1)for(let p of c.result.options)s(new Nt(p,c.source,h?h(p):[],1e9-r.length));else{let p=e.sliceDoc(c.from,c.to),u,d=a.filterStrict?new Vr(p):new Ur(p);for(let m of c.result.options)if(u=d.match(m.label)){let g=m.displayLabel?h?h(m,u.matched):[]:u.matched,b=u.score+(m.boost||0);if(s(new Nt(m,c.source,g,b)),typeof m.section=="object"&&m.section.rank==="dynamic"){let{name:Q}=m.section;i||(i=Object.create(null)),i[Q]=Math.max(b,i[Q]||-1e9)}}}}if(n){let c=Object.create(null),h=0,p=(u,d)=>(u.rank==="dynamic"&&d.rank==="dynamic"?i[d.name]-i[u.name]:0)||(typeof u.rank=="number"?u.rank:1e9)-(typeof d.rank=="number"?d.rank:1e9)||(u.name<d.name?-1:1);for(let u of n.sort(p))h-=1e5,c[u.name]=h;for(let u of r){let{section:d}=u.completion;d&&(u.score+=c[typeof d=="string"?d:d.name])}}let o=[],l=null,O=a.compareCompletions;for(let c of r.sort((h,p)=>p.score-h.score||O(h.completion,p.completion))){let h=c.completion;!l||l.label!=h.label||l.detail!=h.detail||l.type!=null&&h.type!=null&&l.type!=h.type||l.apply!=h.apply||l.boost!=h.boost?o.push(c):Ss(c.completion)>Ss(l)&&(o[o.length-1]=c),l=c.completion}return o}var Ir=class t{constructor(e,r,n,i,s,a){this.options=e,this.attrs=r,this.tooltip=n,this.timestamp=i,this.selected=s,this.disabled=a}setSelected(e,r){return e==this.selected||e>=this.options.length?this:new t(this.options,ks(r,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,r,n,i,s,a){if(i&&!a&&e.some(O=>O.isPending))return i.setDisabled();let o=Kl(e,r);if(!o.length)return i&&e.some(O=>O.isPending)?i.setDisabled():null;let l=r.facet(Y).selectOnOpen?0:-1;if(i&&i.selected!=l&&i.selected!=-1){let O=i.options[i.selected].completion;for(let c=0;c<o.length;c++)if(o[c].completion==O){l=c;break}}return new t(o,ks(n,l),{pos:e.reduce((O,c)=>c.hasResult()?Math.min(O,c.from):O,1e8),create:iO,above:s.aboveCursor},i?i.timestamp:Date.now(),l,!1)}map(e){return new t(this.options,this.attrs,{...this.tooltip,pos:e.mapPos(this.tooltip.pos)},this.timestamp,this.selected,this.disabled)}setDisabled(){return new t(this.options,this.attrs,this.tooltip,this.timestamp,this.selected,!0)}},Dr=class t{constructor(e,r,n){this.active=e,this.id=r,this.open=n}static start(){return new t(rO,"cm-ac-"+Math.floor(Math.random()*2e6).toString(36),null)}update(e){let{state:r}=e,n=r.facet(Y),s=(n.override||r.languageDataAt("autocomplete",_e(r)).map(Dl)).map(l=>(this.active.find(c=>c.source==l)||new ue(l,this.active.some(c=>c.state!=0)?1:0)).update(e,n));s.length==this.active.length&&s.every((l,O)=>l==this.active[O])&&(s=this.active);let a=this.open,o=e.effects.some(l=>l.is(tn));a&&e.docChanged&&(a=a.map(e.changes)),e.selection||s.some(l=>l.hasResult()&&e.changes.touchesRange(l.from,l.to))||!Jl(s,this.active)||o?a=Ir.build(s,r,this.id,a,n,o):a&&a.disabled&&!s.some(l=>l.isPending)&&(a=null),!a&&s.every(l=>!l.isPending)&&s.some(l=>l.hasResult())&&(s=s.map(l=>l.hasResult()?new ue(l.source,0):l));for(let l of e.effects)l.is(en)&&(a=a&&a.setSelected(l.value,this.id));return s==this.active&&a==this.open?this:new t(s,this.id,a)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?eO:tO}};function Jl(t,e){if(t==e)return!0;for(let r=0,n=0;;){for(;r<t.length&&!t[r].hasResult();)r++;for(;n<e.length&&!e[n].hasResult();)n++;let i=r==t.length,s=n==e.length;if(i||s)return i==s;if(t[r++].result!=e[n++].result)return!1}}var eO={"aria-autocomplete":"list"},tO={};function ks(t,e){let r={"aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":t};return e>-1&&(r["aria-activedescendant"]=t+"-"+e),r}var rO=[];function Xs(t,e){if(t.isUserEvent("input.complete")){let n=t.annotation(Jr);if(n&&e.activateOnCompletion(n))return 12}let r=t.isUserEvent("input.type");return r&&e.activateOnTyping?5:r?1:t.isUserEvent("delete.backward")?2:t.selection?8:t.docChanged?16:0}var ue=class t{constructor(e,r,n=!1){this.source=e,this.state=r,this.explicit=n}hasResult(){return!1}get isPending(){return this.state==1}update(e,r){let n=Xs(e,r),i=this;(n&8||n&16&&this.touches(e))&&(i=new t(i.source,0)),n&4&&i.state==0&&(i=new t(this.source,1)),i=i.updateFor(e,n);for(let s of e.effects)if(s.is(Ft))i=new t(i.source,1,s.value);else if(s.is(ft))i=new t(i.source,0);else if(s.is(tn))for(let a of s.value)a.source==i.source&&(i=a);return i}updateFor(e,r){return this.map(e.changes)}map(e){return this}touches(e){return e.changes.touchesRange(_e(e.state))}},Ht=class t extends ue{constructor(e,r,n,i,s,a){super(e,3,r),this.limit=n,this.result=i,this.from=s,this.to=a}hasResult(){return!0}updateFor(e,r){var n;if(!(r&3))return this.map(e.changes);let i=this.result;i.map&&!e.changes.empty&&(i=i.map(i,e.changes));let s=e.changes.mapPos(this.from),a=e.changes.mapPos(this.to,1),o=_e(e.state);if(o>a||!i||r&2&&(_e(e.startState)==this.from||o<this.limit))return new ue(this.source,r&4?1:0);let l=e.changes.mapPos(this.limit);return nO(i.validFor,e.state,s,a)?new t(this.source,this.explicit,l,i,s,a):i.update&&(i=i.update(i,s,a,new He(e.state,o,!1)))?new t(this.source,this.explicit,l,i,i.from,(n=i.to)!==null&&n!==void 0?n:_e(e.state)):new ue(this.source,1,this.explicit)}map(e){if(e.empty)return this;let r=this.result.map?this.result.map(this.result,e):this.result;return r?new t(this.source,this.explicit,e.mapPos(this.limit),r,e.mapPos(this.from),e.mapPos(this.to,1)):new ue(this.source,0)}touches(e){return e.changes.touchesRange(this.from,this.to)}};function nO(t,e,r,n){if(!t)return!1;let i=e.sliceDoc(r,n);return typeof t=="function"?t(i,r,n,e):Zs(t,!0).test(i)}var tn=q.define({map(t,e){return t.map(r=>r.map(e))}}),U=ie.define({create(){return Dr.start()},update(t,e){return t.update(e)},provide:t=>[es.from(t,e=>e.tooltip),X.contentAttributes.from(t,e=>e.attrs)]});function rn(t,e){let r=e.completion.apply||e.completion.label,n=t.state.field(U).active.find(i=>i.source==e.source);return n instanceof Ht?(typeof r=="string"?t.dispatch({...Il(t.state,r,n.from,n.to),annotations:Jr.of(e.completion)}):r(t,e.completion,n.from,n.to),!0):!1}var iO=Fl(U,rn);function Bt(t,e="option"){return r=>{let n=r.state.field(U,!1);if(!n||!n.open||n.open.disabled||Date.now()-n.open.timestamp<r.state.facet(Y).interactionDelay)return!1;let i=1,s;e=="page"&&(s=zr(r,n.open.tooltip))&&(i=Math.max(2,Math.floor(s.dom.offsetHeight/s.dom.querySelector("li").offsetHeight)-1));let{length:a}=n.open.options,o=n.open.selected>-1?n.open.selected+i*(t?1:-1):t?0:a-1;return o<0?o=e=="page"?0:a-1:o>=a&&(o=e=="page"?a-1:0),r.dispatch({effects:en.of(o)}),!0}}var sO=t=>{let e=t.state.field(U,!1);return t.state.readOnly||!e||!e.open||e.open.selected<0||e.open.disabled||Date.now()-e.open.timestamp<t.state.facet(Y).interactionDelay?!1:rn(t,e.open.options[e.open.selected])},Wr=t=>t.state.field(U,!1)?(t.dispatch({effects:Ft.of(!0)}),!0):!1,aO=t=>{let e=t.state.field(U,!1);return!e||!e.active.some(r=>r.state!=0)?!1:(t.dispatch({effects:ft.of(null)}),!0)},Br=class{constructor(e,r){this.active=e,this.context=r,this.time=Date.now(),this.updates=[],this.done=void 0}},oO=50,lO=1e3,OO=ve.fromClass(class{constructor(t){this.view=t,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let e of t.state.field(U).active)e.isPending&&this.startQuery(e)}update(t){let e=t.state.field(U),r=t.state.facet(Y);if(!t.selectionSet&&!t.docChanged&&t.startState.field(U)==e)return;let n=t.transactions.some(s=>{let a=Xs(s,r);return a&8||(s.selection||s.docChanged)&&!(a&3)});for(let s=0;s<this.running.length;s++){let a=this.running[s];if(n||a.context.abortOnDocChange&&t.docChanged||a.updates.length+t.transactions.length>oO&&Date.now()-a.time>lO){for(let o of a.context.abortListeners)try{o()}catch(l){Et(this.view.state,l)}a.context.abortListeners=null,this.running.splice(s--,1)}else a.updates.push(...t.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),t.transactions.some(s=>s.effects.some(a=>a.is(Ft)))&&(this.pendingStart=!0);let i=this.pendingStart?50:r.activateOnTypingDelay;if(this.debounceUpdate=e.active.some(s=>s.isPending&&!this.running.some(a=>a.active.source==s.source))?setTimeout(()=>this.startUpdate(),i):-1,this.composing!=0)for(let s of t.transactions)s.isUserEvent("input.type")?this.composing=2:this.composing==2&&s.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:t}=this.view,e=t.field(U);for(let r of e.active)r.isPending&&!this.running.some(n=>n.active.source==r.source)&&this.startQuery(r);this.running.length&&e.open&&e.open.disabled&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(Y).updateSyncTime))}startQuery(t){let{state:e}=this.view,r=_e(e),n=new He(e,r,t.explicit,this.view),i=new Br(t,n);this.running.push(i),Promise.resolve(t.source(n)).then(s=>{i.context.aborted||(i.done=s||null,this.scheduleAccept())},s=>{this.view.dispatch({effects:ft.of(null)}),Et(this.view.state,s)})}scheduleAccept(){this.running.every(t=>t.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(Y).updateSyncTime))}accept(){var t;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],r=this.view.state.facet(Y),n=this.view.state.field(U);for(let i=0;i<this.running.length;i++){let s=this.running[i];if(s.done===void 0)continue;if(this.running.splice(i--,1),s.done){let o=_e(s.updates.length?s.updates[0].startState:this.view.state),l=Math.min(o,s.done.from+(s.active.explicit?0:1)),O=new Ht(s.active.source,s.active.explicit,l,s.done,s.done.from,(t=s.done.to)!==null&&t!==void 0?t:o);for(let c of s.updates)O=O.update(c,r);if(O.hasResult()){e.push(O);continue}}let a=n.active.find(o=>o.source==s.active.source);if(a&&a.isPending)if(s.done==null){let o=new ue(s.active.source,0);for(let l of s.updates)o=o.update(l,r);o.isPending||e.push(o)}else this.startQuery(a)}(e.length||n.open&&n.open.disabled)&&this.view.dispatch({effects:tn.of(e)})}},{eventHandlers:{blur(t){let e=this.view.state.field(U,!1);if(e&&e.tooltip&&this.view.state.facet(Y).closeOnBlur){let r=e.open&&zr(this.view,e.open.tooltip);(!r||!r.dom.contains(t.relatedTarget))&&setTimeout(()=>this.view.dispatch({effects:ft.of(null)}),10)}},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:Ft.of(!1)}),20),this.composing=0}}}),cO=typeof navigator=="object"&&/Win/.test(navigator.platform),hO=ge.highest(X.domEventHandlers({keydown(t,e){let r=e.state.field(U,!1);if(!r||!r.open||r.open.disabled||r.open.selected<0||!t.key||t.key.length>1||t.ctrlKey&&!(cO&&t.altKey)||t.metaKey)return!1;let n=r.open.options[r.open.selected],i=r.active.find(a=>a.source==n.source),s=n.completion.commitCharacters||i.result.commitCharacters;return s&&s.indexOf(t.key)>-1&&rn(e,n),!1}})),vs=X.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"\xB7\xB7\xB7"',opacity:.5,display:"block",textAlign:"center",cursor:"pointer"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box",whiteSpace:"pre-line"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'\u0192'"}},".cm-completionIcon-class":{"&:after":{content:"'\u25CB'"}},".cm-completionIcon-interface":{"&:after":{content:"'\u25CC'"}},".cm-completionIcon-variable":{"&:after":{content:"'\u{1D465}'"}},".cm-completionIcon-constant":{"&:after":{content:"'\u{1D436}'"}},".cm-completionIcon-type":{"&:after":{content:"'\u{1D461}'"}},".cm-completionIcon-enum":{"&:after":{content:"'\u222A'"}},".cm-completionIcon-property":{"&:after":{content:"'\u25A1'"}},".cm-completionIcon-keyword":{"&:after":{content:"'\u{1F511}\uFE0E'"}},".cm-completionIcon-namespace":{"&:after":{content:"'\u25A2'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}}),Nr=class{constructor(e,r,n,i){this.field=e,this.line=r,this.from=n,this.to=i}},Fr=class t{constructor(e,r,n){this.field=e,this.from=r,this.to=n}map(e){let r=e.mapPos(this.from,-1,Lt.TrackDel),n=e.mapPos(this.to,1,Lt.TrackDel);return r==null||n==null?null:new t(this.field,r,n)}},Hr=class t{constructor(e,r){this.lines=e,this.fieldPositions=r}instantiate(e,r){let n=[],i=[r],s=e.doc.lineAt(r),a=/^\s*/.exec(s.text)[0];for(let l of this.lines){if(n.length){let O=a,c=/^\t*/.exec(l)[0].length;for(let h=0;h<c;h++)O+=e.facet(Gt);i.push(r+O.length-c),l=O+l.slice(c)}n.push(l),r+=l.length+1}let o=this.fieldPositions.map(l=>new Fr(l.field,i[l.line]+l.from,i[l.line]+l.to));return{text:n,ranges:o}}static parse(e){let r=[],n=[],i=[],s;for(let a of e.split(/\r\n?|\n/)){for(;s=/[#$]\{(?:(\d+)(?::([^{}]*))?|((?:\\[{}]|[^{}])*))\}/.exec(a);){let o=s[1]?+s[1]:null,l=s[2]||s[3]||"",O=-1;o===0&&(o=1e9);let c=l.replace(/\\[{}]/g,h=>h[1]);for(let h=0;h<r.length;h++)(o!=null?r[h].seq==o:c&&r[h].name==c)&&(O=h);if(O<0){let h=0;for(;h<r.length&&(o==null||r[h].seq!=null&&r[h].seq<o);)h++;r.splice(h,0,{seq:o,name:c}),O=h;for(let p of i)p.field>=O&&p.field++}for(let h of i)if(h.line==n.length&&h.from>s.index){let p=s[2]?3+(s[1]||"").length:2;h.from-=p,h.to-=p}i.push(new Nr(O,n.length,s.index,s.index+c.length)),a=a.slice(0,s.index)+l+a.slice(s.index+s[0].length)}a=a.replace(/\\([{}])/g,(o,l,O)=>{for(let c of i)c.line==n.length&&c.from>O&&(c.from--,c.to--);return l}),n.push(a)}return new t(n,i)}},uO=v.widget({widget:new class extends ee{toDOM(){let t=document.createElement("span");return t.className="cm-snippetFieldPosition",t}ignoreEvent(){return!1}}}),pO=v.mark({class:"cm-snippetField"}),Ke=class t{constructor(e,r){this.ranges=e,this.active=r,this.deco=v.set(e.map(n=>(n.from==n.to?uO:pO).range(n.from,n.to)),!0)}map(e){let r=[];for(let n of this.ranges){let i=n.map(e);if(!i)return null;r.push(i)}return new t(r,this.active)}selectionInsideField(e){return e.ranges.every(r=>this.ranges.some(n=>n.field==this.active&&n.from<=r.from&&n.to>=r.to))}},gt=q.define({map(t,e){return t&&t.map(e)}}),fO=q.define(),dt=ie.define({create(){return null},update(t,e){for(let r of e.effects){if(r.is(gt))return r.value;if(r.is(fO)&&t)return new Ke(t.ranges,r.value)}return t&&e.docChanged&&(t=t.map(e.changes)),t&&e.selection&&!t.selectionInsideField(e.selection)&&(t=null),t},provide:t=>X.decorations.from(t,e=>e?e.deco:v.none)});function nn(t,e){return Z.create(t.filter(r=>r.field==e).map(r=>Z.range(r.from,r.to)))}function dO(t){let e=Hr.parse(t);return(r,n,i,s)=>{let{text:a,ranges:o}=e.instantiate(r.state,i),{main:l}=r.state.selection,O={changes:{from:i,to:s==l.from?l.to:s,insert:Ii.of(a)},scrollIntoView:!0,annotations:n?[Jr.of(n),Bi.userEvent.of("input.complete")]:void 0};if(o.length&&(O.selection=nn(o,0)),o.some(c=>c.field>0)){let c=new Ke(o,0),h=O.effects=[gt.of(c)];r.state.field(dt,!1)===void 0&&h.push(q.appendConfig.of([dt,bO,SO,vs]))}r.dispatch(r.state.update(O))}}function Ts(t){return({state:e,dispatch:r})=>{let n=e.field(dt,!1);if(!n||t<0&&n.active==0)return!1;let i=n.active+t,s=t>0&&!n.ranges.some(a=>a.field==i+t);return r(e.update({selection:nn(n.ranges,i),effects:gt.of(s?null:new Ke(n.ranges,i)),scrollIntoView:!0})),!0}}var mO=({state:t,dispatch:e})=>t.field(dt,!1)?(e(t.update({effects:gt.of(null)})),!0):!1,gO=Ts(1),QO=Ts(-1);var $O=[{key:"Tab",run:gO,shift:QO},{key:"Escape",run:mO}],Ps=De.define({combine(t){return t.length?t[0]:$O}}),bO=ge.highest(Te.compute([Ps],t=>t.facet(Ps)));function L(t,e){return{...e,apply:dO(t)}}var SO=X.domEventHandlers({mousedown(t,e){let r=e.state.field(dt,!1),n;if(!r||(n=e.posAtCoords({x:t.clientX,y:t.clientY}))==null)return!1;let i=r.ranges.find(s=>s.from<=n&&s.to>=n);return!i||i.field==r.active?!1:(e.dispatch({selection:nn(r.ranges,i.field),effects:gt.of(r.ranges.some(s=>s.field>i.field)?new Ke(r.ranges,i.field):null),scrollIntoView:!0}),!0)}});var mt={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},je=q.define({map(t,e){let r=e.mapPos(t,-1,Lt.TrackAfter);return r??void 0}}),sn=new class extends Ni{};sn.startSide=1;sn.endSide=-1;var Rs=ie.define({create(){return Fi.empty},update(t,e){if(t=t.map(e.changes),e.selection){let r=e.state.doc.lineAt(e.selection.main.head);t=t.update({filter:n=>n>=r.from&&n<=r.to})}for(let r of e.effects)r.is(je)&&(t=t.update({add:[sn.range(r.value,r.value+1)]}));return t}});function js(){return[PO,Rs]}var Mr="()[]{}<>\xAB\xBB\xBB\xAB\uFF3B\uFF3D\uFF5B\uFF5D";function _s(t){for(let e=0;e<Mr.length;e+=2)if(Mr.charCodeAt(e)==t)return Mr.charAt(e+1);return ht(t<128?t:t+1)}function Cs(t,e){return t.languageDataAt("closeBrackets",e)[0]||mt}var kO=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),PO=X.inputHandler.of((t,e,r,n)=>{if((kO?t.composing:t.compositionStarted)||t.state.readOnly)return!1;let i=t.state.selection.main;if(n.length>2||n.length==2&&J(W(n,0))==1||e!=i.from||r!=i.to)return!1;let s=wO(t.state,n);return s?(t.dispatch(s),!0):!1}),xO=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=Cs(t,t.selection.main.head).brackets||mt.brackets,i=null,s=t.changeByRange(a=>{if(a.empty){let o=yO(t.doc,a.head);for(let l of n)if(l==o&&Kt(t.doc,a.head)==_s(W(l,0)))return{changes:{from:a.head-l.length,to:a.head+l.length},range:Z.cursor(a.head-l.length)}}return{range:i=a}});return i||e(t.update(s,{scrollIntoView:!0,userEvent:"delete.backward"})),!i},Ys=[{key:"Backspace",run:xO}];function wO(t,e){let r=Cs(t,t.selection.main.head),n=r.brackets||mt.brackets;for(let i of n){let s=_s(W(i,0));if(e==i)return s==i?vO(t,i,n.indexOf(i+i+i)>-1,r):ZO(t,i,s,r.before||mt.before);if(e==s&&zs(t,t.selection.main.from))return XO(t,i,s)}return null}function zs(t,e){let r=!1;return t.field(Rs).between(0,t.doc.length,n=>{n==e&&(r=!0)}),r}function Kt(t,e){let r=t.sliceString(e,e+2);return r.slice(0,J(W(r,0)))}function yO(t,e){let r=t.sliceString(e-2,e);return J(W(r,0))==r.length?r:r.slice(1)}function ZO(t,e,r,n){let i=null,s=t.changeByRange(a=>{if(!a.empty)return{changes:[{insert:e,from:a.from},{insert:r,from:a.to}],effects:je.of(a.to+e.length),range:Z.range(a.anchor+e.length,a.head+e.length)};let o=Kt(t.doc,a.head);return!o||/\s/.test(o)||n.indexOf(o)>-1?{changes:{insert:e+r,from:a.head},effects:je.of(a.head+e.length),range:Z.cursor(a.head+e.length)}:{range:i=a}});return i?null:t.update(s,{scrollIntoView:!0,userEvent:"input.type"})}function XO(t,e,r){let n=null,i=t.changeByRange(s=>s.empty&&Kt(t.doc,s.head)==r?{changes:{from:s.head,to:s.head+r.length,insert:r},range:Z.cursor(s.head+r.length)}:n={range:s});return n?null:t.update(i,{scrollIntoView:!0,userEvent:"input.type"})}function vO(t,e,r,n){let i=n.stringPrefixes||mt.stringPrefixes,s=null,a=t.changeByRange(o=>{if(!o.empty)return{changes:[{insert:e,from:o.from},{insert:e,from:o.to}],effects:je.of(o.to+e.length),range:Z.range(o.anchor+e.length,o.head+e.length)};let l=o.head,O=Kt(t.doc,l),c;if(O==e){if(xs(t,l))return{changes:{insert:e+e,from:l},effects:je.of(l+e.length),range:Z.cursor(l+e.length)};if(zs(t,l)){let p=r&&t.sliceDoc(l,l+e.length*3)==e+e+e?e+e+e:e;return{changes:{from:l,to:l+p.length,insert:p},range:Z.cursor(l+p.length)}}}else{if(r&&t.sliceDoc(l-2*e.length,l)==e+e&&(c=ws(t,l-2*e.length,i))>-1&&xs(t,c))return{changes:{insert:e+e+e+e,from:l},effects:je.of(l+e.length),range:Z.cursor(l+e.length)};if(t.charCategorizer(l)(O)!=A.Word&&ws(t,l,i)>-1&&!TO(t,l,e,i))return{changes:{insert:e+e,from:l},effects:je.of(l+e.length),range:Z.cursor(l+e.length)}}return{range:s=o}});return s?null:t.update(a,{scrollIntoView:!0,userEvent:"input.type"})}function xs(t,e){let r=R(t).resolveInner(e+1);return r.parent&&r.from==e}function TO(t,e,r,n){let i=R(t).resolveInner(e,-1),s=n.reduce((a,o)=>Math.max(a,o.length),0);for(let a=0;a<5;a++){let o=t.sliceDoc(i.from,Math.min(i.to,i.from+r.length+s)),l=o.indexOf(r);if(!l||l>-1&&n.indexOf(o.slice(0,l))>-1){let c=i.firstChild;for(;c&&c.from==i.from&&c.to-c.from>r.length+l;){if(t.sliceDoc(c.to-r.length,c.to)==r)return!1;c=c.firstChild}return!0}let O=i.to==e&&i.parent;if(!O)break;i=O}return!1}function ws(t,e,r){let n=t.charCategorizer(e);if(n(t.sliceDoc(e-1,e))!=A.Word)return e;for(let i of r){let s=e-i.length;if(t.sliceDoc(s,e)==i&&n(t.sliceDoc(s-1,s))!=A.Word)return s}return-1}function qs(t={}){return[hO,U,Y.of(t),OO,RO,vs]}var an=[{key:"Ctrl-Space",run:Wr},{mac:"Alt-`",run:Wr},{mac:"Alt-i",run:Wr},{key:"Escape",run:aO},{key:"ArrowDown",run:Bt(!0)},{key:"ArrowUp",run:Bt(!1)},{key:"PageDown",run:Bt(!0,"page")},{key:"PageUp",run:Bt(!1,"page")},{key:"Enter",run:sO}],RO=ge.highest(Te.computeN([Y],t=>t.facet(Y).defaultKeymap?[an]:[]));var tr=class t{static create(e,r,n,i,s){let a=i+(i<<8)+e+(r<<4)|0;return new t(e,r,n,a,s,[],[])}constructor(e,r,n,i,s,a,o){this.type=e,this.value=r,this.from=n,this.hash=i,this.end=s,this.children=a,this.positions=o,this.blankFirstLine=!1,this.hashProp=[[K.contextHash,i]]}addChild(e,r){e.prop(K.contextHash)!=this.hash&&(e=new M(e.type,e.children,e.positions,e.length,this.hashProp)),this.children.push(e),this.positions.push(r)}toTree(e,r=this.end){let n=this.children.length-1;return n>=0&&(r=Math.max(r,this.positions[n]+this.children[n].length+this.from)),new M(e.types[this.type],this.children,this.positions,r-this.from).balance({makeTree:(i,s,a)=>new M(Re.none,i,s,a,this.hashProp)})}},$;(function(t){t[t.Document=1]="Document",t[t.CodeBlock=2]="CodeBlock",t[t.FencedCode=3]="FencedCode",t[t.Blockquote=4]="Blockquote",t[t.HorizontalRule=5]="HorizontalRule",t[t.BulletList=6]="BulletList",t[t.OrderedList=7]="OrderedList",t[t.ListItem=8]="ListItem",t[t.ATXHeading1=9]="ATXHeading1",t[t.ATXHeading2=10]="ATXHeading2",t[t.ATXHeading3=11]="ATXHeading3",t[t.ATXHeading4=12]="ATXHeading4",t[t.ATXHeading5=13]="ATXHeading5",t[t.ATXHeading6=14]="ATXHeading6",t[t.SetextHeading1=15]="SetextHeading1",t[t.SetextHeading2=16]="SetextHeading2",t[t.HTMLBlock=17]="HTMLBlock",t[t.LinkReference=18]="LinkReference",t[t.Paragraph=19]="Paragraph",t[t.CommentBlock=20]="CommentBlock",t[t.ProcessingInstructionBlock=21]="ProcessingInstructionBlock",t[t.Escape=22]="Escape",t[t.Entity=23]="Entity",t[t.HardBreak=24]="HardBreak",t[t.Emphasis=25]="Emphasis",t[t.StrongEmphasis=26]="StrongEmphasis",t[t.Link=27]="Link",t[t.Image=28]="Image",t[t.InlineCode=29]="InlineCode",t[t.HTMLTag=30]="HTMLTag",t[t.Comment=31]="Comment",t[t.ProcessingInstruction=32]="ProcessingInstruction",t[t.Autolink=33]="Autolink",t[t.HeaderMark=34]="HeaderMark",t[t.QuoteMark=35]="QuoteMark",t[t.ListMark=36]="ListMark",t[t.LinkMark=37]="LinkMark",t[t.EmphasisMark=38]="EmphasisMark",t[t.CodeMark=39]="CodeMark",t[t.CodeText=40]="CodeText",t[t.CodeInfo=41]="CodeInfo",t[t.LinkTitle=42]="LinkTitle",t[t.LinkLabel=43]="LinkLabel",t[t.URL=44]="URL"})($||($={}));var On=class{constructor(e,r){this.start=e,this.content=r,this.marks=[],this.parsers=[]}},cn=class{constructor(){this.text="",this.baseIndent=0,this.basePos=0,this.depth=0,this.markers=[],this.pos=0,this.indent=0,this.next=-1}forward(){this.basePos>this.pos&&this.forwardInner()}forwardInner(){let e=this.skipSpace(this.basePos);this.indent=this.countIndent(e,this.pos,this.indent),this.pos=e,this.next=e==this.text.length?-1:this.text.charCodeAt(e)}skipSpace(e){return $t(this.text,e)}reset(e){for(this.text=e,this.baseIndent=this.basePos=this.pos=this.indent=0,this.forwardInner(),this.depth=1;this.markers.length;)this.markers.pop()}moveBase(e){this.basePos=e,this.baseIndent=this.countIndent(e,this.pos,this.indent)}moveBaseColumn(e){this.baseIndent=e,this.basePos=this.findColumn(e)}addMarker(e){this.markers.push(e)}countIndent(e,r=0,n=0){for(let i=r;i<e;i++)n+=this.text.charCodeAt(i)==9?4-n%4:1;return n}findColumn(e){let r=0;for(let n=0;r<this.text.length&&n<e;r++)n+=this.text.charCodeAt(r)==9?4-n%4:1;return r}scrub(){if(!this.baseIndent)return this.text;let e="";for(let r=0;r<this.basePos;r++)e+=" ";return e+this.text.slice(this.basePos)}};function As(t,e,r){if(r.pos==r.text.length||t!=e.block&&r.indent>=e.stack[r.depth+1].value+r.baseIndent)return!0;if(r.indent>=r.baseIndent+4)return!1;let n=(t.type==$.OrderedList?kn:Sn)(r,e,!1);return n>0&&(t.type!=$.BulletList||bn(r,e,!1)<0)&&r.text.charCodeAt(r.pos+n-1)==t.value}var Ns={[$.Blockquote](t,e,r){return r.next!=62?!1:(r.markers.push(T($.QuoteMark,e.lineStart+r.pos,e.lineStart+r.pos+1)),r.moveBase(r.pos+(D(r.text.charCodeAt(r.pos+1))?2:1)),t.end=e.lineStart+r.text.length,!0)},[$.ListItem](t,e,r){return(r.next<0?t.blankFirstLine&&t.children.length==1:r.indent<r.baseIndent+t.value)?!1:(r.moveBaseColumn(r.baseIndent+t.value),!0)},[$.OrderedList]:As,[$.BulletList]:As,[$.Document](){return!0}};function D(t){return t==32||t==9||t==10||t==13}function $t(t,e=0){for(;e<t.length&&D(t.charCodeAt(e));)e++;return e}function Ls(t,e,r){for(;e>r&&D(t.charCodeAt(e-1));)e--;return e}function Fs(t){if(t.next!=96&&t.next!=126)return-1;let e=t.pos+1;for(;e<t.text.length&&t.text.charCodeAt(e)==t.next;)e++;if(e<t.pos+3)return-1;if(t.next==96){for(let r=e;r<t.text.length;r++)if(t.text.charCodeAt(r)==96)return-1}return e}function Hs(t){return t.next!=62?-1:t.text.charCodeAt(t.pos+1)==32?2:1}function bn(t,e,r){if(t.next!=42&&t.next!=45&&t.next!=95)return-1;let n=1;for(let i=t.pos+1;i<t.text.length;i++){let s=t.text.charCodeAt(i);if(s==t.next)n++;else if(!D(s))return-1}return r&&t.next==45&&ea(t)>-1&&t.depth==e.stack.length&&e.parser.leafBlockParsers.indexOf(ia.SetextHeading)>-1||n<3?-1:1}function Ks(t,e){for(let r=t.stack.length-1;r>=0;r--)if(t.stack[r].type==e)return!0;return!1}function Sn(t,e,r){return(t.next==45||t.next==43||t.next==42)&&(t.pos==t.text.length-1||D(t.text.charCodeAt(t.pos+1)))&&(!r||Ks(e,$.BulletList)||t.skipSpace(t.pos+2)<t.text.length)?1:-1}function kn(t,e,r){let n=t.pos,i=t.next;for(;i>=48&&i<=57;){n++;if(n==t.text.length)return-1;i=t.text.charCodeAt(n)}return n==t.pos||n>t.pos+9||i!=46&&i!=41||n<t.text.length-1&&!D(t.text.charCodeAt(n+1))||r&&!Ks(e,$.OrderedList)&&(t.skipSpace(n+1)==t.text.length||n>t.pos+1||t.next!=49)?-1:n+1-t.pos}function Js(t){if(t.next!=35)return-1;let e=t.pos+1;for(;e<t.text.length&&t.text.charCodeAt(e)==35;)e++;if(e<t.text.length&&!D(t.text.charCodeAt(e)))return-1;let r=e-t.pos;return r>6?-1:r}function ea(t){if(t.next!=45&&t.next!=61||t.indent>=t.baseIndent+4)return-1;let e=t.pos+1;for(;e<t.text.length&&t.text.charCodeAt(e)==t.next;)e++;let r=e;for(;e<t.text.length&&D(t.text.charCodeAt(e));)e++;return e==t.text.length?r:-1}var hn=/^[ \t]*$/,ta=/-->/,ra=/\?>/,un=[[/^<(?:script|pre|style|textarea)(?:\s|>|$)/i,/<\/(?:script|pre|style|textarea)>/i],[/^\s*<!--/,ta],[/^\s*<\?/,ra],[/^\s*<![A-Z]/,/>/],[/^\s*<!\[CDATA\[/,/\]\]>/],[/^\s*<\/?(?:address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h1|h2|h3|h4|h5|h6|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul)(?:\s|\/?>|$)/i,hn],[/^\s*(?:<\/[a-z][\w-]*\s*>|<[a-z][\w-]*(\s+[a-z:_][\w-.]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*>)\s*$/i,hn]];function na(t,e,r){if(t.next!=60)return-1;let n=t.text.slice(t.pos);for(let i=0,s=un.length-(r?1:0);i<s;i++)if(un[i][0].test(n))return i;return-1}function Es(t,e){let r=t.countIndent(e,t.pos,t.indent),n=t.skipSpace(e),i=t.countIndent(n,e,r);return i>=r+5||n==t.text.length?r+1:i}function be(t,e,r){let n=t.length-1;n>=0&&t[n].to==e&&t[n].type==$.CodeText?t[n].to=r:t.push(T($.CodeText,e,r))}var Jt={LinkReference:void 0,IndentedCode(t,e){let r=e.baseIndent+4;if(e.indent<r)return!1;let n=e.findColumn(r),i=t.lineStart+n,s=t.lineStart+e.text.length,a=[],o=[];for(be(a,i,s);t.nextLine()&&e.depth>=t.stack.length;)if(e.pos==e.text.length){be(o,t.lineStart-1,t.lineStart);for(let l of e.markers)o.push(l)}else{if(e.indent<r)break;{if(o.length){for(let O of o)O.type==$.CodeText?be(a,O.from,O.to):a.push(O);o=[]}be(a,t.lineStart-1,t.lineStart);for(let O of e.markers)a.push(O);s=t.lineStart+e.text.length;let l=t.lineStart+e.findColumn(e.baseIndent+4);l<s&&be(a,l,s)}}return o.length&&(o=o.filter(l=>l.type!=$.CodeText),o.length&&(e.markers=o.concat(e.markers))),t.addNode(t.buffer.writeElements(a,-i).finish($.CodeBlock,s-i),i),!0},FencedCode(t,e){let r=Fs(e);if(r<0)return!1;let n=t.lineStart+e.pos,i=e.next,s=r-e.pos,a=e.skipSpace(r),o=Ls(e.text,e.text.length,a),l=[T($.CodeMark,n,n+s)];a<o&&l.push(T($.CodeInfo,t.lineStart+a,t.lineStart+o));for(let O=!0,c=!0,h=!1;t.nextLine()&&e.depth>=t.stack.length;O=!1){let p=e.pos;if(e.indent-e.baseIndent<4)for(;p<e.text.length&&e.text.charCodeAt(p)==i;)p++;if(p-e.pos>=s&&e.skipSpace(p)==e.text.length){for(let u of e.markers)l.push(u);c&&h&&be(l,t.lineStart-1,t.lineStart),l.push(T($.CodeMark,t.lineStart+e.pos,t.lineStart+p)),t.nextLine();break}else{h=!0,O||(be(l,t.lineStart-1,t.lineStart),c=!1);for(let m of e.markers)l.push(m);let u=t.lineStart+e.basePos,d=t.lineStart+e.text.length;u<d&&(be(l,u,d),c=!1)}}return t.addNode(t.buffer.writeElements(l,-n).finish($.FencedCode,t.prevLineEnd()-n),n),!0},Blockquote(t,e){let r=Hs(e);return r<0?!1:(t.startContext($.Blockquote,e.pos),t.addNode($.QuoteMark,t.lineStart+e.pos,t.lineStart+e.pos+1),e.moveBase(e.pos+r),null)},HorizontalRule(t,e){if(bn(e,t,!1)<0)return!1;let r=t.lineStart+e.pos;return t.nextLine(),t.addNode($.HorizontalRule,r),!0},BulletList(t,e){let r=Sn(e,t,!1);if(r<0)return!1;t.block.type!=$.BulletList&&t.startContext($.BulletList,e.basePos,e.next);let n=Es(e,e.pos+1);return t.startContext($.ListItem,e.basePos,n-e.baseIndent),t.addNode($.ListMark,t.lineStart+e.pos,t.lineStart+e.pos+r),e.moveBaseColumn(n),t.block.blankFirstLine=n>=e.text.length,null},OrderedList(t,e){let r=kn(e,t,!1);if(r<0)return!1;t.block.type!=$.OrderedList&&t.startContext($.OrderedList,e.basePos,e.text.charCodeAt(e.pos+r-1));let n=Es(e,e.pos+r);return t.startContext($.ListItem,e.basePos,n-e.baseIndent),t.addNode($.ListMark,t.lineStart+e.pos,t.lineStart+e.pos+r),e.moveBaseColumn(n),t.block.blankFirstLine=n==e.text.length,null},ATXHeading(t,e){let r=Js(e);if(r<0)return!1;let n=e.pos,i=t.lineStart+n,s=Ls(e.text,e.text.length,n),a=s;for(;a>n&&e.text.charCodeAt(a-1)==e.next;)a--;(a==s||a==n||!D(e.text.charCodeAt(a-1)))&&(a=e.text.length);let o=t.buffer.write($.HeaderMark,0,r).writeElements(t.parser.parseInline(e.text.slice(n+r+1,a),i+r+1),-i);a<e.text.length&&o.write($.HeaderMark,a-n,s-n);let l=o.finish($.ATXHeading1-1+r,e.text.length-n);return t.nextLine(),t.addNode(l,i),!0},HTMLBlock(t,e){let r=na(e,t,!1);if(r<0)return!1;let n=t.lineStart+e.pos,i=un[r][1],s=[],a=i!=hn;for(;!i.test(e.text)&&t.nextLine();){if(e.depth<t.stack.length){a=!1;break}for(let O of e.markers)s.push(O)}a&&t.nextLine();let o=i==ta?$.CommentBlock:i==ra?$.ProcessingInstructionBlock:$.HTMLBlock,l=t.prevLineEnd();return t.addNode(t.buffer.writeElements(s,-n).finish(o,l-n),n),!0},SetextHeading:void 0},pn=class{constructor(e){this.stage=0,this.elts=[],this.pos=0,this.start=e.start,this.advance(e.content)}nextLine(e,r,n){if(this.stage==-1)return!1;let i=n.content+` +`+r.scrub(),s=this.advance(i);return s>-1&&s<i.length?this.complete(e,n,s):!1}finish(e,r){return(this.stage==2||this.stage==3)&&$t(r.content,this.pos)==r.content.length?this.complete(e,r,r.content.length):!1}complete(e,r,n){return e.addLeafElement(r,T($.LinkReference,this.start,this.start+n,this.elts)),!0}nextStage(e){return e?(this.pos=e.to-this.start,this.elts.push(e),this.stage++,!0):(e===!1&&(this.stage=-1),!1)}advance(e){for(;;){if(this.stage==-1)return-1;if(this.stage==0){if(!this.nextStage(Oa(e,this.pos,this.start,!0)))return-1;if(e.charCodeAt(this.pos)!=58)return this.stage=-1;this.elts.push(T($.LinkMark,this.pos+this.start,this.pos+this.start+1)),this.pos++}else if(this.stage==1){if(!this.nextStage(oa(e,$t(e,this.pos),this.start)))return-1}else if(this.stage==2){let r=$t(e,this.pos),n=0;if(r>this.pos){let i=la(e,r,this.start);if(i){let s=on(e,i.to-this.start);s>0&&(this.nextStage(i),n=s)}}return n||(n=on(e,this.pos)),n>0&&n<e.length?n:-1}else return on(e,this.pos)}}};function on(t,e){for(;e<t.length;e++){let r=t.charCodeAt(e);if(r==10)break;if(!D(r))return-1}return e}var fn=class{nextLine(e,r,n){let i=r.depth<e.stack.length?-1:ea(r),s=r.next;if(i<0)return!1;let a=T($.HeaderMark,e.lineStart+r.pos,e.lineStart+i);return e.nextLine(),e.addLeafElement(n,T(s==61?$.SetextHeading1:$.SetextHeading2,n.start,e.prevLineEnd(),[...e.parser.parseInline(n.content,n.start),a])),!0}finish(){return!1}},ia={LinkReference(t,e){return e.content.charCodeAt(0)==91?new pn(e):null},SetextHeading(){return new fn}},jO=[(t,e)=>Js(e)>=0,(t,e)=>Fs(e)>=0,(t,e)=>Hs(e)>=0,(t,e)=>Sn(e,t,!0)>=0,(t,e)=>kn(e,t,!0)>=0,(t,e)=>bn(e,t,!0)>=0,(t,e)=>na(e,t,!0)>=0],_O={text:"",end:0},dn=class{constructor(e,r,n,i){this.parser=e,this.input=r,this.ranges=i,this.line=new cn,this.atEnd=!1,this.reusePlaceholders=new Map,this.stoppedAt=null,this.rangeI=0,this.to=i[i.length-1].to,this.lineStart=this.absoluteLineStart=this.absoluteLineEnd=i[0].from,this.block=tr.create($.Document,0,this.lineStart,0,0),this.stack=[this.block],this.fragments=n.length?new Qn(n,r):null,this.readLine()}get parsedPos(){return this.absoluteLineStart}advance(){if(this.stoppedAt!=null&&this.absoluteLineStart>this.stoppedAt)return this.finish();let{line:e}=this;for(;;){for(let n=0;;){let i=e.depth<this.stack.length?this.stack[this.stack.length-1]:null;for(;n<e.markers.length&&(!i||e.markers[n].from<i.end);){let s=e.markers[n++];this.addNode(s.type,s.from,s.to)}if(!i)break;this.finishContext()}if(e.pos<e.text.length)break;if(!this.nextLine())return this.finish()}if(this.fragments&&this.reuseFragment(e.basePos))return null;e:for(;;){for(let n of this.parser.blockParsers)if(n){let i=n(this,e);if(i!=!1){if(i==!0)return null;e.forward();continue e}}break}if(e.pos==e.text.length)return this.nextLine()?null:this.finish();let r=new On(this.lineStart+e.pos,e.text.slice(e.pos));for(let n of this.parser.leafBlockParsers)if(n){let i=n(this,r);i&&r.parsers.push(i)}e:for(;this.nextLine()&&e.pos!=e.text.length;){if(e.indent<e.baseIndent+4){for(let n of this.parser.endLeafBlock)if(n(this,e,r))break e}for(let n of r.parsers)if(n.nextLine(this,e,r))return null;r.content+=` +`+e.scrub();for(let n of e.markers)r.marks.push(n)}return this.finishLeaf(r),null}stopAt(e){if(this.stoppedAt!=null&&this.stoppedAt<e)throw new 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 r=this.fragments.takeNodes(this);return r?(this.absoluteLineStart+=r,this.lineStart=ha(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 r=_O;if(r.end=e,e>=this.to)r.text="";else if(r.text=this.lineChunkAt(e),r.end+=r.text.length,this.ranges.length>1){let n=this.absoluteLineStart,i=this.rangeI;for(;this.ranges[i].to<r.end;){i++;let s=this.ranges[i].from,a=this.lineChunkAt(s);r.end=s+a.length,r.text=r.text.slice(0,this.ranges[i-1].to-n)+a,n=r.end-r.text.length}}return r}readLine(){let{line:e}=this,{text:r,end:n}=this.scanLine(this.absoluteLineStart);for(this.absoluteLineEnd=n,e.reset(r);e.depth<this.stack.length;e.depth++){let i=this.stack[e.depth],s=this.parser.skipContextMarkup[i.type];if(!s)throw new Error("Unhandled block context "+$[i.type]);let a=this.line.markers.length;if(!s(i,this,e)){this.line.markers.length>a&&(i.end=this.line.markers[this.line.markers.length-1].to),e.forward();break}e.forward()}}lineChunkAt(e){let r=this.input.chunk(e),n;if(this.input.lineChunks)n=r==` +`?"":r;else{let i=r.indexOf(` +`);n=i<0?r:r.slice(0,i)}return e+n.length>this.to?n.slice(0,this.to-e):n}prevLineEnd(){return this.atEnd?this.lineStart:this.lineStart-1}startContext(e,r,n=0){this.block=tr.create(e,n,this.lineStart+r,this.block.hash,this.lineStart+this.line.text.length),this.stack.push(this.block)}startComposite(e,r,n=0){this.startContext(this.parser.getNodeType(e),r,n)}addNode(e,r,n){typeof e=="number"&&(e=new M(this.parser.nodeSet.types[e],Je,Je,(n??this.prevLineEnd())-r)),this.block.addChild(e,r-this.block.from)}addElement(e){this.block.addChild(e.toTree(this.parser.nodeSet),e.from-this.block.from)}addLeafElement(e,r){this.addNode(this.buffer.writeElements(gn(r.children,e.marks),-r.from).finish(r.type,r.to-r.from),r.from)}finishContext(){let e=this.stack.pop(),r=this.stack[this.stack.length-1];r.addChild(e.toTree(this.parser.nodeSet),e.from-r.from),this.block=r}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?sa(this.ranges,0,e.topNode,this.ranges[0].from,this.reusePlaceholders):e}finishLeaf(e){for(let n of e.parsers)if(n.finish(this,e))return;let r=gn(this.parser.parseInline(e.content,e.start),e.marks);this.addNode(this.buffer.writeElements(r,-e.start).finish($.Paragraph,e.content.length),e.start)}elt(e,r,n,i){return typeof e=="string"?T(this.parser.getNodeType(e),r,n,i):new nr(e,r)}get buffer(){return new rr(this.parser.nodeSet)}};function sa(t,e,r,n,i){let s=t[e].to,a=[],o=[],l=r.from+n;function O(c,h){for(;h?c>=s:c>s;){let p=t[e+1].from-s;n+=p,c+=p,e++,s=t[e].to}}for(let c=r.firstChild;c;c=c.nextSibling){O(c.from+n,!0);let h=c.from+n,p,u=i.get(c.tree);u?p=u:c.to+n>s?(p=sa(t,e,c,n,i),O(c.to+n,!1)):p=c.toTree(),a.push(p),o.push(h-l)}return O(r.to+n,!1),new M(r.type,a,o,r.to+n-l,r.tree?r.tree.propValues:void 0)}var St=class t extends Mt{constructor(e,r,n,i,s,a,o,l,O){super(),this.nodeSet=e,this.blockParsers=r,this.leafBlockParsers=n,this.blockNames=i,this.endLeafBlock=s,this.skipContextMarkup=a,this.inlineParsers=o,this.inlineNames=l,this.wrappers=O,this.nodeTypes=Object.create(null);for(let c of e.types)this.nodeTypes[c.name]=c.id}createParse(e,r,n){let i=new dn(this,e,r,n);for(let s of this.wrappers)i=s(i,e,r,n);return i}configure(e){let r=mn(e);if(!r)return this;let{nodeSet:n,skipContextMarkup:i}=this,s=this.blockParsers.slice(),a=this.leafBlockParsers.slice(),o=this.blockNames.slice(),l=this.inlineParsers.slice(),O=this.inlineNames.slice(),c=this.endLeafBlock.slice(),h=this.wrappers;if(Qt(r.defineNodes)){i=Object.assign({},i);let p=n.types.slice(),u;for(let d of r.defineNodes){let{name:m,block:g,composite:b,style:Q}=typeof d=="string"?{name:d}:d;if(p.some(w=>w.name==m))continue;b&&(i[p.length]=(w,_,G)=>b(_,G,w.value));let k=p.length,y=b?["Block","BlockContext"]:g?k>=$.ATXHeading1&&k<=$.SetextHeading2?["Block","LeafBlock","Heading"]:["Block","LeafBlock"]:void 0;p.push(Re.define({id:k,name:m,props:y&&[[K.group,y]]})),Q&&(u||(u={}),Array.isArray(Q)||Q instanceof is?u[m]=Q:Object.assign(u,Q))}n=new pt(p),u&&(n=n.extend(Oe(u)))}if(Qt(r.props)&&(n=n.extend(...r.props)),Qt(r.remove))for(let p of r.remove){let u=this.blockNames.indexOf(p),d=this.inlineNames.indexOf(p);u>-1&&(s[u]=a[u]=void 0),d>-1&&(l[d]=void 0)}if(Qt(r.parseBlock))for(let p of r.parseBlock){let u=o.indexOf(p.name);if(u>-1)s[u]=p.parse,a[u]=p.leaf;else{let d=p.before?er(o,p.before):p.after?er(o,p.after)+1:o.length-1;s.splice(d,0,p.parse),a.splice(d,0,p.leaf),o.splice(d,0,p.name)}p.endLeaf&&c.push(p.endLeaf)}if(Qt(r.parseInline))for(let p of r.parseInline){let u=O.indexOf(p.name);if(u>-1)l[u]=p.parse;else{let d=p.before?er(O,p.before):p.after?er(O,p.after)+1:O.length-1;l.splice(d,0,p.parse),O.splice(d,0,p.name)}}return r.wrap&&(h=h.concat(r.wrap)),new t(n,s,a,o,c,i,l,O,h)}getNodeType(e){let r=this.nodeTypes[e];if(r==null)throw new RangeError(`Unknown node type '${e}'`);return r}parseInline(e,r){let n=new ze(this,e,r);e:for(let i=r;i<n.end;){let s=n.char(i);for(let a of this.inlineParsers)if(a){let o=a(n,s,i);if(o>=0){i=o;continue e}}i++}return n.resolveMarkers(0)}};function Qt(t){return t!=null&&t.length>0}function mn(t){if(!Array.isArray(t))return t;if(t.length==0)return null;let e=mn(t[0]);if(t.length==1)return e;let r=mn(t.slice(1));if(!r||!e)return e||r;let n=(a,o)=>(a||Je).concat(o||Je),i=e.wrap,s=r.wrap;return{props:n(e.props,r.props),defineNodes:n(e.defineNodes,r.defineNodes),parseBlock:n(e.parseBlock,r.parseBlock),parseInline:n(e.parseInline,r.parseInline),remove:n(e.remove,r.remove),wrap:i?s?(a,o,l,O)=>i(s(a,o,l,O),o,l,O):i:s}}function er(t,e){let r=t.indexOf(e);if(r<0)throw new RangeError(`Position specified relative to unknown parser ${e}`);return r}var aa=[Re.none];for(let t=1,e;e=$[t];t++)aa[t]=Re.define({id:t,name:e,props:t>=$.Escape?[]:[[K.group,t in Ns?["Block","BlockContext"]:["Block","LeafBlock"]]],top:e=="Document"});var Je=[],rr=class{constructor(e){this.nodeSet=e,this.content=[],this.nodes=[]}write(e,r,n,i=0){return this.content.push(e,r,n,4+i*4),this}writeElements(e,r=0){for(let n of e)n.writeTo(this,r);return this}finish(e,r){return M.build({buffer:this.content,nodeSet:this.nodeSet,reused:this.nodes,topID:e,length:r})}},Ye=class{constructor(e,r,n,i=Je){this.type=e,this.from=r,this.to=n,this.children=i}writeTo(e,r){let n=e.content.length;e.writeElements(this.children,r),e.content.push(this.type,this.from+r,this.to+r,e.content.length+4-n)}toTree(e){return new rr(e).writeElements(this.children,-this.from).finish(this.type,this.to-this.from)}},nr=class{constructor(e,r){this.tree=e,this.from=r}get to(){return this.from+this.tree.length}get type(){return this.tree.type.id}get children(){return Je}writeTo(e,r){e.nodes.push(this.tree),e.content.push(e.nodes.length-1,this.from+r,this.to+r,-1)}toTree(){return this.tree}};function T(t,e,r,n){return new Ye(t,e,r,n)}var Pn={resolve:"Emphasis",mark:"EmphasisMark"},xn={resolve:"Emphasis",mark:"EmphasisMark"},Ce={},ir={},E=class{constructor(e,r,n,i,s=n-r){this.type=e,this.from=r,this.to=n,this.side=i,this.size=s}},Ws="!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~",kt=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\u2010-\u2027]/;try{kt=new RegExp("[\\p{S}|\\p{P}]","u")}catch{}var ln={Escape(t,e,r){if(e!=92||r==t.end-1)return-1;let n=t.char(r+1);for(let i=0;i<Ws.length;i++)if(Ws.charCodeAt(i)==n)return t.append(T($.Escape,r,r+2));return-1},Entity(t,e,r){if(e!=38)return-1;let n=/^(?:#\d+|#x[a-f\d]+|\w+);/i.exec(t.slice(r+1,r+31));return n?t.append(T($.Entity,r,r+1+n[0].length)):-1},InlineCode(t,e,r){if(e!=96||r&&t.char(r-1)==96)return-1;let n=r+1;for(;n<t.end&&t.char(n)==96;)n++;let i=n-r,s=0;for(;n<t.end;n++)if(t.char(n)==96){if(s++,s==i&&t.char(n+1)!=96)return t.append(T($.InlineCode,r,n+1,[T($.CodeMark,r,r+i),T($.CodeMark,n+1-i,n+1)]))}else s=0;return-1},HTMLTag(t,e,r){if(e!=60||r==t.end-1)return-1;let n=t.slice(r+1,t.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(n);if(i)return t.append(T($.Autolink,r,r+1+i[0].length,[T($.LinkMark,r,r+1),T($.URL,r+1,r+i[0].length),T($.LinkMark,r+i[0].length,r+1+i[0].length)]));let s=/^!--(?:-?>|[^]*?-->)/.exec(n);if(s)return t.append(T($.Comment,r,r+1+s[0].length));let a=/^\?[^]*?\?>/.exec(n);if(a)return t.append(T($.ProcessingInstruction,r,r+1+a[0].length));let o=/^(?:![A-Z][^]*?>|!\[CDATA\[[^]*?\]\]>|\/[a-zA-Z][\w-]*\s*>|[a-zA-Z][\w-]*(\s+[a-zA-Z:_][\w-.:]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*\/?>)/.exec(n);return o?t.append(T($.HTMLTag,r,r+1+o[0].length)):-1},Emphasis(t,e,r){if(e!=95&&e!=42)return-1;let n=r+1;for(;t.char(n)==e;)n++;let i=t.slice(r-1,r),s=t.slice(n,n+1),a=kt.test(i),o=kt.test(s),l=/\s|^$/.test(i),O=/\s|^$/.test(s),c=!O&&(!o||l||a),h=!l&&(!a||O||o),p=c&&(e==42||!h||a),u=h&&(e==42||!c||o);return t.append(new E(e==95?Pn:xn,r,n,(p?1:0)|(u?2:0)))},HardBreak(t,e,r){if(e==92&&t.char(r+1)==10)return t.append(T($.HardBreak,r,r+2));if(e==32){let n=r+1;for(;t.char(n)==32;)n++;if(t.char(n)==10&&n>=r+2)return t.append(T($.HardBreak,r,n+1))}return-1},Link(t,e,r){return e==91?t.append(new E(Ce,r,r+1,1)):-1},Image(t,e,r){return e==33&&t.char(r+1)==91?t.append(new E(ir,r,r+2,1)):-1},LinkEnd(t,e,r){if(e!=93)return-1;for(let n=t.parts.length-1;n>=0;n--){let i=t.parts[n];if(i instanceof E&&(i.type==Ce||i.type==ir)){if(!i.side||t.skipSpace(i.to)==r&&!/[(\[]/.test(t.slice(r+1,r+2)))return t.parts[n]=null,-1;let s=t.takeContent(n),a=t.parts[n]=CO(t,s,i.type==Ce?$.Link:$.Image,i.from,r+1);if(i.type==Ce)for(let o=0;o<n;o++){let l=t.parts[o];l instanceof E&&l.type==Ce&&(l.side=0)}return a.to}}return-1}};function CO(t,e,r,n,i){let{text:s}=t,a=t.char(i),o=i;if(e.unshift(T($.LinkMark,n,n+(r==$.Image?2:1))),e.push(T($.LinkMark,i-1,i)),a==40){let l=t.skipSpace(i+1),O=oa(s,l-t.offset,t.offset),c;O&&(l=t.skipSpace(O.to),l!=O.to&&(c=la(s,l-t.offset,t.offset),c&&(l=t.skipSpace(c.to)))),t.char(l)==41&&(e.push(T($.LinkMark,i,i+1)),o=l+1,O&&e.push(O),c&&e.push(c),e.push(T($.LinkMark,l,o)))}else if(a==91){let l=Oa(s,i-t.offset,t.offset,!1);l&&(e.push(l),o=l.to)}return T(r,n,o,e)}function oa(t,e,r){if(t.charCodeAt(e)==60){for(let i=e+1,s=!1;i<t.length;i++){let a=t.charCodeAt(i);if(a==62&&!s)return T($.URL,e+r,i+1+r);if(a==60&&!s||a==10)return!1;s=a==92}return null}else{let i=0,s=e;for(let a=!1;s<t.length;s++){let o=t.charCodeAt(s);if(D(o))break;if(a)a=!1;else if(o==40)i++;else if(o==41){if(!i)break;i--}else o==92&&(a=!0)}return s>e?T($.URL,e+r,s+r):s==t.length?null:!1}}function la(t,e,r){let n=t.charCodeAt(e);if(n!=39&&n!=34&&n!=40)return!1;let i=n==40?41:n;for(let s=e+1,a=!1;s<t.length;s++){let o=t.charCodeAt(s);if(a)a=!1;else{if(o==i)return T($.LinkTitle,e+r,s+1+r);o==92&&(a=!0)}}return null}function Oa(t,e,r,n){for(let i=!1,s=e+1,a=Math.min(t.length,s+999);s<a;s++){let o=t.charCodeAt(s);if(i)i=!1;else{if(o==93)return n?!1:T($.LinkLabel,e+r,s+1+r);if(n&&!D(o)&&(n=!1),o==91)return!1;o==92&&(i=!0)}}return null}var ze=class{constructor(e,r,n){this.parser=e,this.text=r,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,r){return this.text.slice(e-this.offset,r-this.offset)}append(e){return this.parts.push(e),e.to}addDelimiter(e,r,n,i,s){return this.append(new E(e,r,n,(i?1:0)|(s?2:0)))}get hasOpenLink(){for(let e=this.parts.length-1;e>=0;e--){let r=this.parts[e];if(r instanceof E&&(r.type==Ce||r.type==ir))return!0}return!1}addElement(e){return this.append(e)}resolveMarkers(e){for(let n=e;n<this.parts.length;n++){let i=this.parts[n];if(!(i instanceof E&&i.type.resolve&&i.side&2))continue;let s=i.type==Pn||i.type==xn,a=i.to-i.from,o,l=n-1;for(;l>=e;l--){let m=this.parts[l];if(m instanceof E&&m.side&1&&m.type==i.type&&!(s&&(i.side&1||m.side&2)&&(m.size+i.size)%3==0&&(m.size%3||i.size%3))){o=m;break}}if(!o)continue;let O=i.type.resolve,c=[],h=o.from,p=i.to;if(s){let m=Math.min(2,o.to-o.from,a);h=o.to-m,p=i.from+m,O=m==1?"Emphasis":"StrongEmphasis"}o.type.mark&&c.push(this.elt(o.type.mark,h,o.to));for(let m=l+1;m<n;m++)this.parts[m]instanceof Ye&&c.push(this.parts[m]),this.parts[m]=null;i.type.mark&&c.push(this.elt(i.type.mark,i.from,p));let u=this.elt(O,h,p,c);this.parts[l]=s&&o.from!=h?new E(o.type,o.from,h,o.side,o.size):null,(this.parts[n]=s&&i.to!=p?new E(i.type,p,i.to,i.side,i.size):null)?this.parts.splice(n,0,u):this.parts[n]=u}let r=[];for(let n=e;n<this.parts.length;n++){let i=this.parts[n];i instanceof Ye&&r.push(i)}return r}findOpeningDelimiter(e){for(let r=this.parts.length-1;r>=0;r--){let n=this.parts[r];if(n instanceof E&&n.type==e&&n.side&1)return r}return null}takeContent(e){let r=this.resolveMarkers(e);return this.parts.length=e,r}getDelimiterAt(e){let r=this.parts[e];return r instanceof E?r:null}skipSpace(e){return $t(this.text,e-this.offset)+this.offset}elt(e,r,n,i){return typeof e=="string"?T(this.parser.getNodeType(e),r,n,i):new nr(e,r)}};ze.linkStart=Ce;ze.imageStart=ir;ze.emphasisAsterisk=xn;ze.emphasisUnderscore=Pn;function gn(t,e){if(!e.length)return t;if(!t.length)return e;let r=t.slice(),n=0;for(let i of e){for(;n<r.length&&r[n].to<i.to;)n++;if(n<r.length&&r[n].from<i.from){let s=r[n];s instanceof Ye&&(r[n]=new Ye(s.type,s.from,s.to,gn(s.children,[i])))}else r.splice(n++,0,i)}return r}var ca=[$.CodeBlock,$.ListItem,$.OrderedList,$.BulletList],Qn=class{constructor(e,r){this.fragments=e,this.input=r,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,r){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 s=this.fragment.to;for(;s>0&&this.input.read(s-1,s)!=` +`;)s--;this.fragmentEnd=s?s-1:0}let n=this.cursor;n||(n=this.cursor=this.fragment.tree.cursor(le.IncludeAnonymous|le.IgnoreMounts),n.firstChild());let i=e+this.fragment.offset;for(;n.to<=i;)if(!n.parent())return!1;for(;;){if(n.from>=i)return this.fragment.from<=r;if(!n.childAfter(i))return!1}}matches(e){let r=this.cursor.tree;for(;r&&r.type.isAnonymous&&r.children[0]instanceof M;)r=r.children[0];return r&&r.prop(K.contextHash)==e}takeNodes(e){let r=this.cursor,n=this.fragment.offset,i=this.fragmentEnd-(this.fragment.openEnd?1:0),s=e.absoluteLineStart,a=s,o=e.block.children.length,l=e.lineStart-e.block.from>>2,O=a,c=o;e:for(;;){if(r.to-n>Math.min(i,e.to)||r.type.isAnonymous&&r.tree&&(r.to-r.from>l||!YO(r.tree))){if(r.type.isAnonymous&&r.firstChild())continue;break}let h=ha(r.from-n,e.ranges);if(r.to-n<=e.ranges[e.rangeI].to)e.addNode(r.tree,h);else{let p=new M(e.parser.nodeSet.types[$.Paragraph],[],[],0,e.block.hashProp);e.reusePlaceholders.set(p,r.tree),e.addNode(p,h)}for((r.type.isAnonymous||r.type.is("Block"))&&(r.type.isAnonymous||ca.indexOf(r.type.id)<0?(a=r.to-n,o=e.block.children.length):(a=O,o=c),O=r.to-n,c=e.block.children.length);;){if(r.nextSibling())continue e;if(!r.parent()||!r.type.isAnonymous)break e}}for(;e.block.children.length>o;)e.block.children.pop(),e.block.positions.pop();return a-s}};function YO(t){for(;t.type.isAnonymous;){let e=t.children[t.children.length-1];if(e instanceof M)t=e;else return!1}return t.type.is("Block")&&ca.indexOf(t.type.id)<0}function ha(t,e){let r=t;for(let n=1;n<e.length;n++){let i=e[n-1].to,s=e[n].from;i<t&&(r-=s-i)}return r}var zO=Oe({"Blockquote/...":f.quote,HorizontalRule:f.contentSeparator,"ATXHeading1/... SetextHeading1/...":f.heading1,"ATXHeading2/... SetextHeading2/...":f.heading2,"ATXHeading3/...":f.heading3,"ATXHeading4/...":f.heading4,"ATXHeading5/...":f.heading5,"ATXHeading6/...":f.heading6,"Comment CommentBlock":f.comment,Escape:f.escape,Entity:f.character,"Emphasis/...":f.emphasis,"StrongEmphasis/...":f.strong,"Link/... Image/...":f.link,"OrderedList/... BulletList/...":f.list,"BlockQuote/...":f.quote,"InlineCode CodeText":f.monospace,"URL Autolink":f.url,"HeaderMark HardBreak QuoteMark ListMark LinkMark EmphasisMark CodeMark":f.processingInstruction,"CodeInfo LinkLabel":f.labelName,LinkTitle:f.string,Paragraph:f.content}),ua=new St(new pt(aa).extend(zO),Object.keys(Jt).map(t=>Jt[t]),Object.keys(Jt).map(t=>ia[t]),Object.keys(Jt),jO,Ns,Object.keys(ln).map(t=>ln[t]),Object.keys(ln),[]);function qO(t,e,r){let n=[];for(let i=t.firstChild,s=e;;i=i.nextSibling){let a=i?i.from:r;if(a>s&&n.push({from:s,to:a}),!i)break;s=i.to}return n}function pa(t){let{codeParser:e,htmlParser:r}=t;return{wrap:Ut((i,s)=>{let a=i.type.id;if(e&&(a==$.CodeBlock||a==$.FencedCode)){let o="";if(a==$.FencedCode){let O=i.node.getChild($.CodeInfo);O&&(o=s.read(O.from,O.to))}let l=e(o);if(l)return{parser:l,overlay:O=>O.type.id==$.CodeText,bracketed:a==$.FencedCode}}else if(r&&(a==$.HTMLBlock||a==$.HTMLTag||a==$.CommentBlock))return{parser:r,overlay:qO(i.node,i.from,i.to)};return null})}}var AO={resolve:"Strikethrough",mark:"StrikethroughMark"},LO={defineNodes:[{name:"Strikethrough",style:{"Strikethrough/...":f.strikethrough}},{name:"StrikethroughMark",style:f.processingInstruction}],parseInline:[{name:"Strikethrough",parse(t,e,r){if(e!=126||t.char(r+1)!=126||t.char(r+2)==126)return-1;let n=t.slice(r-1,r),i=t.slice(r+2,r+3),s=/\s|^$/.test(n),a=/\s|^$/.test(i),o=kt.test(n),l=kt.test(i);return t.addDelimiter(AO,r,r+2,!a&&(!l||s||o),!s&&(!o||a||l))},after:"Emphasis"}]};function bt(t,e,r=0,n,i=0){let s=0,a=!0,o=-1,l=-1,O=!1,c=()=>{n.push(t.elt("TableCell",i+o,i+l,t.parser.parseInline(e.slice(o,l),i+o)))};for(let h=r;h<e.length;h++){let p=e.charCodeAt(h);p==124&&!O?((!a||o>-1)&&s++,a=!1,n&&(o>-1&&c(),n.push(t.elt("TableDelimiter",h+i,h+i+1))),o=l=-1):(O||p!=32&&p!=9)&&(o<0&&(o=h),l=h+1),O=!O&&p==92}return o>-1&&(s++,n&&c()),s}function Ms(t,e){for(let r=e;r<t.length;r++){let n=t.charCodeAt(r);if(n==124)return!0;n==92&&r++}return!1}var fa=/^[>\s]*\|?(\s*:?-+:?\s*\|)+(\s*:?-+:?\s*)?$/,sr=class{constructor(){this.rows=null}nextLine(e,r,n){if(this.rows==null){this.rows=!1;let i;if((r.next==45||r.next==58||r.next==124)&&fa.test(i=r.text.slice(r.pos))){let s=[];bt(e,n.content,0,s,n.start)==bt(e,i,0)&&(this.rows=[e.elt("TableHeader",n.start,n.start+n.content.length,s),e.elt("TableDelimiter",e.lineStart+r.pos,e.lineStart+r.text.length)])}}else if(this.rows){let i=[];bt(e,r.text,r.pos,i,e.lineStart),this.rows.push(e.elt("TableRow",e.lineStart+r.pos,e.lineStart+r.text.length,i))}return!1}finish(e,r){return this.rows?(e.addLeafElement(r,e.elt("Table",r.start,r.start+r.content.length,this.rows)),!0):!1}},EO={defineNodes:[{name:"Table",block:!0},{name:"TableHeader",style:{"TableHeader/...":f.heading}},"TableRow",{name:"TableCell",style:f.content},{name:"TableDelimiter",style:f.processingInstruction}],parseBlock:[{name:"Table",leaf(t,e){return Ms(e.content,0)?new sr:null},endLeaf(t,e,r){if(r.parsers.some(i=>i instanceof sr)||!Ms(e.text,e.basePos))return!1;let n=t.peekLine();return fa.test(n)&&bt(t,e.text,e.basePos)==bt(t,n,e.basePos)},before:"SetextHeading"}]},$n=class{nextLine(){return!1}finish(e,r){return e.addLeafElement(r,e.elt("Task",r.start,r.start+r.content.length,[e.elt("TaskMarker",r.start,r.start+3),...e.parser.parseInline(r.content.slice(3),r.start+3)])),!0}},WO={defineNodes:[{name:"Task",block:!0,style:f.list},{name:"TaskMarker",style:f.atom}],parseBlock:[{name:"TaskList",leaf(t,e){return/^\[[ xX]\][ \t]/.test(e.content)&&t.parentType().name=="ListItem"?new $n:null},after:"SetextHeading"}]},Us=/(www\.)|(https?:\/\/)|([\w.+-]{1,100}@)|(mailto:|xmpp:)/gy,Vs=/[\w-]+(\.[\w-]+)+(:\d+)?(\/[^\s<]*)?/gy,MO=/[\w-]+\.[\w-]+($|[/:])/,Gs=/[\w.+-]+@[\w-]+(\.[\w.-]+)+/gy,Is=/\/[a-zA-Z\d@.]+/gy;function Ds(t,e,r,n){let i=0;for(let s=e;s<r;s++)t[s]==n&&i++;return i}function UO(t,e){Vs.lastIndex=e;let r=Vs.exec(t);if(!r||MO.exec(r[0])[0].indexOf("_")>-1)return-1;let n=e+r[0].length;for(;;){let i=t[n-1],s;if(/[?!.,:*_~]/.test(i)||i==")"&&Ds(t,e,n,")")>Ds(t,e,n,"("))n--;else if(i==";"&&(s=/&(?:#\d+|#x[a-f\d]+|\w+);$/.exec(t.slice(e,n))))n=e+s.index;else break}return n}function Bs(t,e){Gs.lastIndex=e;let r=Gs.exec(t);if(!r)return-1;let n=r[0][r[0].length-1];return n=="_"||n=="-"?-1:e+r[0].length-(n=="."?1:0)}var VO={parseInline:[{name:"Autolink",parse(t,e,r){let n=r-t.offset;if(n&&/\w/.test(t.text[n-1]))return-1;Us.lastIndex=n;let i=Us.exec(t.text),s=-1;if(!i)return-1;if(i[1]||i[2]){if(s=UO(t.text,n+i[0].length),s>-1&&t.hasOpenLink){let a=/([^\[\]]|\[[^\]]*\])*/.exec(t.text.slice(n,s));s=n+a[0].length}}else i[3]?s=Bs(t.text,n):(s=Bs(t.text,n+i[0].length),s>-1&&i[0]=="xmpp:"&&(Is.lastIndex=s,i=Is.exec(t.text),i&&(s=i.index+i[0].length)));return s<0?-1:(t.addElement(t.elt("URL",r,s+t.offset)),s+t.offset)}}]},da=[EO,WO,LO,VO];function ma(t,e,r){return(n,i,s)=>{if(i!=t||n.char(s+1)==t)return-1;let a=[n.elt(r,s,s+1)];for(let o=s+1;o<n.end;o++){let l=n.char(o);if(l==t)return n.addElement(n.elt(e,s,o+1,a.concat(n.elt(r,o,o+1))));if(l==92&&a.push(n.elt("Escape",o,o+++2)),D(l))break}return-1}}var ga={defineNodes:[{name:"Superscript",style:f.special(f.content)},{name:"SuperscriptMark",style:f.processingInstruction}],parseInline:[{name:"Superscript",parse:ma(94,"Superscript","SuperscriptMark")}]},Qa={defineNodes:[{name:"Subscript",style:f.special(f.content)},{name:"SubscriptMark",style:f.processingInstruction}],parseInline:[{name:"Subscript",parse:ma(126,"Subscript","SubscriptMark")}]},$a={defineNodes:[{name:"Emoji",style:f.character}],parseInline:[{name:"Emoji",parse(t,e,r){let n;return e!=58||!(n=/^[a-zA-Z_0-9]+:/.exec(t.slice(r+1,t.end)))?-1:t.addElement(t.elt("Emoji",r,r+1+n[0].length))}}]};var Zn=class t{constructor(e,r,n,i,s,a,o,l,O,c=0,h){this.p=e,this.stack=r,this.state=n,this.reducePos=i,this.pos=s,this.score=a,this.buffer=o,this.bufferBase=l,this.curContext=O,this.lookAhead=c,this.parent=h}toString(){return`[${this.stack.filter((e,r)=>r%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,r,n=0){let i=e.parser.context;return new t(e,[],r,n,n,0,[],0,i?new ar(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,r){this.stack.push(this.state,r,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var r;let n=e>>19,i=e&65535,{parser:s}=this.p,a=this.reducePos<this.pos-25&&this.setLookAhead(this.pos),o=s.dynamicPrecedence(i);if(o&&(this.score+=o),n==0){i<s.minRepeatTerm&&this.reducePos<this.pos&&(this.reducePos=this.pos),this.pushState(s.getGoto(this.state,i,!0),this.reducePos),i<s.minRepeatTerm&&this.storeNode(i,this.reducePos,this.reducePos,a?8:4,!0),this.reduceContext(i,this.reducePos);return}let l=this.stack.length-(n-1)*3-(e&262144?6:0),O=l?this.stack[l-2]:this.p.ranges[0].from;i<s.minRepeatTerm&&O==this.reducePos&&this.reducePos<this.pos&&(this.reducePos=this.pos);let c=this.reducePos-O;c>=2e3&&!(!((r=this.p.parser.nodeSet.types[i])===null||r===void 0)&&r.isAnonymous)&&(O==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=c):this.p.lastBigReductionSize<c&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=O,this.p.lastBigReductionSize=c));let h=l?this.stack[l-1]:0,p=this.bufferBase+this.buffer.length-h;if(i<s.minRepeatTerm||e&131072){let u=s.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(i,O,u,p+4,!0)}if(e&262144)this.state=this.stack[l];else{let u=this.stack[l-3];this.state=s.getGoto(u,i,!0)}for(;this.stack.length>l;)this.stack.pop();this.reduceContext(i,O)}storeNode(e,r,n,i=4,s=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let a=this.buffer.length;if(a>0&&this.buffer[a-4]==0&&this.buffer[a-1]>-1){if(r==n)return;if(this.buffer[a-2]>=r){this.buffer[a-2]=n;return}}}if(!s||this.pos==n)this.buffer.push(e,r,n,i);else{let a=this.buffer.length;if(a>0&&(this.buffer[a-4]!=0||this.buffer[a-1]<0)){let o=!1;for(let l=a;l>0&&this.buffer[l-2]>n;l-=4)if(this.buffer[l-1]>=0){o=!0;break}if(o)for(;a>0&&this.buffer[a-2]>n;)this.buffer[a]=this.buffer[a-4],this.buffer[a+1]=this.buffer[a-3],this.buffer[a+2]=this.buffer[a-2],this.buffer[a+3]=this.buffer[a-1],a-=4,i>4&&(i-=4)}this.buffer[a]=e,this.buffer[a+1]=r,this.buffer[a+2]=n,this.buffer[a+3]=i}}shift(e,r,n,i){if(e&131072)this.pushState(e&65535,this.pos);else if((e&262144)==0){let s=e,{parser:a}=this.p;this.pos=i;let o=a.stateFlag(s,1);!o&&(i>n||r<=a.maxNode)&&(this.reducePos=i),this.pushState(s,o?n:Math.min(n,this.reducePos)),this.shiftContext(r,n),r<=a.maxNode&&this.buffer.push(r,n,i,4)}else this.pos=i,this.shiftContext(r,n),r<=this.p.parser.maxNode&&this.buffer.push(r,n,i,4)}apply(e,r,n,i){e&65536?this.reduce(e):this.shift(e,r,n,i)}useNode(e,r,n){let i=this.p.reused.length-1;(i<0||this.p.reused[i]!=e)&&(this.p.reused.push(e),i++);let s=this.reducePos=this.pos=n+e.length;this.pushState(r,n),this.buffer.push(i,n,s,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,r=e.buffer.length;for(r&&e.buffer[r-4]==0&&(r-=4);r>0&&e.buffer[r-2]>e.reducePos;)r-=4;let n=e.buffer.slice(r),i=e.bufferBase+r;for(;e&&i==e.bufferBase;)e=e.parent;return new t(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,n,i,this.curContext,this.lookAhead,e)}recoverByDelete(e,r){let n=e<=this.p.parser.maxNode;n&&this.storeNode(e,this.pos,r,4),this.storeNode(0,this.pos,r,n?8:4),this.pos=this.reducePos=r,this.score-=190}canShift(e){for(let r=new Xn(this);;){let n=this.p.parser.stateSlot(r.state,4)||this.p.parser.hasAction(r.state,e);if(n==0)return!1;if((n&65536)==0)return!0;r.reduce(n)}}recoverByInsert(e){if(this.stack.length>=300)return[];let r=this.p.parser.nextStates(this.state);if(r.length>8||this.stack.length>=120){let i=[];for(let s=0,a;s<r.length;s+=2)(a=r[s+1])!=this.state&&this.p.parser.hasAction(a,e)&&i.push(r[s],a);if(this.stack.length<120)for(let s=0;i.length<8&&s<r.length;s+=2){let a=r[s+1];i.some((o,l)=>l&1&&o==a)||i.push(r[s],a)}r=i}let n=[];for(let i=0;i<r.length&&n.length<4;i+=2){let s=r[i+1];if(s==this.state)continue;let a=this.split();a.pushState(s,this.pos),a.storeNode(0,a.pos,a.pos,4,!0),a.shiftContext(r[i],this.pos),a.reducePos=this.pos,a.score-=200,n.push(a)}return n}forceReduce(){let{parser:e}=this.p,r=e.stateSlot(this.state,5);if((r&65536)==0)return!1;if(!e.validAction(this.state,r)){let n=r>>19,i=r&65535,s=this.stack.length-n*3;if(s<0||e.getGoto(this.stack[s],i,!1)<0){let a=this.findForcedReduction();if(a==null)return!1;r=a}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(r),!0}findForcedReduction(){let{parser:e}=this.p,r=[],n=(i,s)=>{if(!r.includes(i))return r.push(i),e.allActions(i,a=>{if(!(a&393216))if(a&65536){let o=(a>>19)-s;if(o>1){let l=a&65535,O=this.stack.length-o*3;if(O>=0&&e.getGoto(this.stack[O],l,!1)>=0)return o<<19|65536|l}}else{let o=n(a,s+1);if(o!=null)return o}})};return n(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let r=0;r<this.stack.length;r+=3)if(this.stack[r]!=e.stack[r])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(e){return this.p.parser.dialect.flags[e]}shiftContext(e,r){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,e,this,this.p.stream.reset(r)))}reduceContext(e,r){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,e,this,this.p.stream.reset(r)))}emitContext(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-3)&&this.storeNode(this.curContext.hash,this.reducePos,this.reducePos,-3,!0)}emitLookAhead(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-4)&&this.buffer.push(this.lookAhead,this.pos,this.pos,-4)}updateContext(e){if(e!=this.curContext.context){let r=new ar(this.curContext.tracker,e);r.hash!=this.curContext.hash&&this.emitContext(),this.curContext=r}}setLookAhead(e){return e<=this.lookAhead?!1:(this.emitLookAhead(),this.lookAhead=e,!0)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}},ar=class{constructor(e,r){this.tracker=e,this.context=r,this.hash=e.strict?e.hash(r):0}},Xn=class{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let r=e&65535,n=e>>19;n==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(n-1)*3;let i=this.start.p.parser.getGoto(this.stack[this.base-3],r,!0);this.state=i}},vn=class t{constructor(e,r,n){this.stack=e,this.pos=r,this.index=n,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(e,r=e.bufferBase+e.buffer.length){return new t(e,r,r-e.bufferBase)}maybeNext(){let e=this.stack.parent;e!=null&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new t(this.stack,this.pos,this.index)}};function Pt(t,e=Uint16Array){if(typeof t!="string")return t;let r=null;for(let n=0,i=0;n<t.length;){let s=0;for(;;){let a=t.charCodeAt(n++),o=!1;if(a==126){s=65535;break}a>=92&&a--,a>=34&&a--;let l=a-32;if(l>=46&&(l-=46,o=!0),s+=l,o)break;s*=46}r?r[i++]=s:r=new e(s)}return r}var et=class{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}},ba=new et,Tn=class{constructor(e,r){this.input=e,this.ranges=r,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=ba,this.rangeIndex=0,this.pos=this.chunkPos=r[0].from,this.range=r[0],this.end=r[r.length-1].to,this.readNext()}resolveOffset(e,r){let n=this.range,i=this.rangeIndex,s=this.pos+e;for(;s<n.from;){if(!i)return null;let a=this.ranges[--i];s-=n.from-a.to,n=a}for(;r<0?s>n.to:s>=n.to;){if(i==this.ranges.length-1)return null;let a=this.ranges[++i];s+=a.from-n.to,n=a}return s}clipPos(e){if(e>=this.range.from&&e<this.range.to)return e;for(let r of this.ranges)if(r.to>e)return Math.max(e,r.from);return this.end}peek(e){let r=this.chunkOff+e,n,i;if(r>=0&&r<this.chunk.length)n=this.pos+e,i=this.chunk.charCodeAt(r);else{let s=this.resolveOffset(e,1);if(s==null)return-1;if(n=s,n>=this.chunk2Pos&&n<this.chunk2Pos+this.chunk2.length)i=this.chunk2.charCodeAt(n-this.chunk2Pos);else{let a=this.rangeIndex,o=this.range;for(;o.to<=n;)o=this.ranges[++a];this.chunk2=this.input.chunk(this.chunk2Pos=n),n+this.chunk2.length>o.to&&(this.chunk2=this.chunk2.slice(0,o.to-n)),i=this.chunk2.charCodeAt(0)}}return n>=this.token.lookAhead&&(this.token.lookAhead=n+1),i}acceptToken(e,r=0){let n=r?this.resolveOffset(r,-1):this.pos;if(n==null||n<this.token.start)throw new RangeError("Token end out of bounds");this.token.value=e,this.token.end=n}acceptTokenTo(e,r){this.token.value=e,this.token.end=r}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:e,chunkPos:r}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=e,this.chunk2Pos=r,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let e=this.input.chunk(this.pos),r=this.pos+e.length;this.chunk=r>this.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,r){if(r?(this.token=r,r.start=e,r.lookAhead=e+1,r.value=r.extended=-1):this.token=ba,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e<this.range.from;)this.range=this.ranges[--this.rangeIndex];for(;e>=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e<this.chunkPos+this.chunk.length?this.chunkOff=e-this.chunkPos:(this.chunk="",this.chunkOff=0),this.readNext()}return this}read(e,r){if(e>=this.chunkPos&&r<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,r-this.chunkPos);if(e>=this.chunk2Pos&&r<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,r-this.chunk2Pos);if(e>=this.range.from&&r<=this.range.to)return this.input.read(e,r);let n="";for(let i of this.ranges){if(i.from>=r)break;i.to>e&&(n+=this.input.read(Math.max(i.from,e),Math.min(i.to,r)))}return n}},Se=class{constructor(e,r){this.data=e,this.id=r}token(e,r){let{parser:n}=r.p;wa(this.data,e,r,this.id,n.data,n.tokenPrecTable)}};Se.prototype.contextual=Se.prototype.fallback=Se.prototype.extend=!1;var ke=class{constructor(e,r,n){this.precTable=r,this.elseToken=n,this.data=typeof e=="string"?Pt(e):e}token(e,r){let n=e.pos,i=0;for(;;){let s=e.next<0,a=e.resolveOffset(1,1);if(wa(this.data,e,r,0,this.data,this.precTable),e.token.value>-1)break;if(this.elseToken==null)return;if(s||i++,a==null)break;e.reset(a,e.token)}i&&(e.reset(n,e.token),e.acceptToken(this.elseToken,i))}};ke.prototype.contextual=Se.prototype.fallback=Se.prototype.extend=!1;var z=class{constructor(e,r={}){this.token=e,this.contextual=!!r.contextual,this.fallback=!!r.fallback,this.extend=!!r.extend}};function wa(t,e,r,n,i,s){let a=0,o=1<<n,{dialect:l}=r.p.parser;e:for(;(o&t[a])!=0;){let O=t[a+1];for(let u=a+3;u<O;u+=2)if((t[u+1]&o)>0){let d=t[u];if(l.allows(d)&&(e.token.value==-1||e.token.value==d||IO(d,e.token.value,i,s))){e.acceptToken(d);break}}let c=e.next,h=0,p=t[a+2];if(e.next<0&&p>h&&t[O+p*3-3]==65535){a=t[O+p*3-1];continue e}for(;h<p;){let u=h+p>>1,d=O+u+(u<<1),m=t[d],g=t[d+1]||65536;if(c<m)p=u;else if(c>=g)h=u+1;else{a=t[d+2],e.advance();continue e}}break}}function Sa(t,e,r){for(let n=e,i;(i=t[n])!=65535;n++)if(i==r)return n-e;return-1}function IO(t,e,r,n){let i=Sa(r,n,e);return i<0||Sa(r,n,t)<i}var B=typeof process<"u"&&process.env&&/\bparse\b/.test(process.env.LOG),wn=null;function ka(t,e,r){let n=t.cursor(le.IncludeAnonymous);for(n.moveTo(e);;)if(!(r<0?n.childBefore(e):n.childAfter(e)))for(;;){if((r<0?n.to<e:n.from>e)&&!n.type.isError)return r<0?Math.max(0,Math.min(n.to-1,e-25)):Math.min(t.length,Math.max(n.from+1,e+25));if(r<0?n.prevSibling():n.nextSibling())break;if(!n.parent())return r<0?0:t.length}}var Rn=class{constructor(e,r){this.fragments=e,this.minRepeat=r,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.lastRepeat=null,this.lastRepeatPos=-1,this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?ka(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?ka(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(e<this.nextStart)return null;for(;this.fragment&&this.safeTo<=e;)this.nextFragment();if(!this.fragment)return null;for(;;){let r=this.trees.length-1;if(r<0)return this.nextFragment(),null;if(e<this.safeFrom)return null;let n=this.trees[r],i=this.index[r];if(i==n.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let s=n.children[i],a=this.start[r]+n.positions[i];if(a>e)return this.nextStart=a,null;if(s instanceof M){let o=a>this.lastRepeatPos&&s.type.id>=this.minRepeat;if(a==e||o){let l=a+s.length,O;if(a>=this.safeFrom&&l<=this.safeTo&&(!(O=s.prop(K.lookAhead))||l+O<this.fragment.to)&&(o&&(this.lastRepeat=s,this.lastRepeatPos=a),a==e))return s}this.index[r]++,a+s.length>=Math.max(this.safeFrom,e)&&(this.trees.push(s),this.start.push(a),this.index.push(0))}else this.index[r]++,this.nextStart=a+s.length}}},jn=class{constructor(e,r){this.stream=r,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(n=>new et)}getActions(e){let r=0,n=null,{parser:i}=e.p,{tokenizers:s}=i,a=i.stateSlot(e.state,3),o=e.curContext?e.curContext.hash:0,l=0;for(let O=0;O<s.length;O++){if((1<<O&a)==0)continue;let c=s[O],h=this.tokens[O];if(!(n&&!c.fallback)&&((c.contextual||h.start!=e.pos||h.mask!=a||h.context!=o)&&(this.updateCachedToken(h,c,e),h.mask=a,h.context=o),h.lookAhead>h.end+25&&(l=Math.max(h.lookAhead,l)),h.value!=0)){let p=r;if(h.extended>-1&&(r=this.addActions(e,h.extended,h.end,r)),r=this.addActions(e,h.value,h.end,r),!c.extend&&(n=h,r>p))break}}for(;this.actions.length>r;)this.actions.pop();return l&&e.setLookAhead(l),!n&&e.pos==this.stream.end&&(n=new et,n.value=e.p.parser.eofTerm,n.start=n.end=e.pos,r=this.addActions(e,n.value,n.end,r)),this.mainToken=n,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let r=new et,{pos:n,p:i}=e;return r.start=n,r.end=Math.min(n+1,i.stream.end),r.value=n==i.stream.end?i.parser.eofTerm:0,r}updateCachedToken(e,r,n){let i=this.stream.clipPos(n.pos);if(r.token(this.stream.reset(i,e),n),e.value>-1){let{parser:s}=n.p;for(let a=0;a<s.specialized.length;a++)if(s.specialized[a]==e.value){let o=s.specializers[a](this.stream.read(e.start,e.end),n);if(o>=0&&n.p.parser.dialect.allows(o>>1)){(o&1)==0?e.value=o>>1:e.extended=o>>1;break}}}else e.value=0,e.end=this.stream.clipPos(i+1)}putAction(e,r,n,i){for(let s=0;s<i;s+=3)if(this.actions[s]==e)return i;return this.actions[i++]=e,this.actions[i++]=r,this.actions[i++]=n,i}addActions(e,r,n,i){let{state:s}=e,{parser:a}=e.p,{data:o}=a;for(let l=0;l<2;l++)for(let O=a.stateSlot(s,l?2:1);;O+=3){if(o[O]==65535)if(o[O+1]==1)O=pe(o,O+2);else{i==0&&o[O+1]==2&&(i=this.putAction(pe(o,O+2),r,n,i));break}o[O]==r&&(i=this.putAction(pe(o,O+1),r,n,i))}return i}},_n=class{constructor(e,r,n,i){this.parser=e,this.input=r,this.ranges=i,this.recovering=0,this.nextStackID=9812,this.minStackPos=0,this.reused=[],this.stoppedAt=null,this.lastBigReductionStart=-1,this.lastBigReductionSize=0,this.bigReductionCount=0,this.stream=new Tn(r,i),this.tokens=new jn(e,this.stream),this.topTerm=e.top[1];let{from:s}=i[0];this.stacks=[Zn.start(this,e.top[0],s)],this.fragments=n.length&&this.stream.end-s>e.bufferLength*4?new Rn(n,e.minRepeatTerm):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,r=this.minStackPos,n=this.stacks=[],i,s;if(this.bigReductionCount>300&&e.length==1){let[a]=e;for(;a.forceReduce()&&a.stack.length&&a.stack[a.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let a=0;a<e.length;a++){let o=e[a];for(;;){if(this.tokens.mainToken=null,o.pos>r)n.push(o);else{if(this.advanceStack(o,n,e))continue;{i||(i=[],s=[]),i.push(o);let l=this.tokens.getMainToken(o);s.push(l.value,l.end)}}break}}if(!n.length){let a=i&&DO(i);if(a)return B&&console.log("Finish with "+this.stackID(a)),this.stackToTree(a);if(this.parser.strict)throw B&&i&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+r);this.recovering||(this.recovering=5)}if(this.recovering&&i){let a=this.stoppedAt!=null&&i[0].pos>this.stoppedAt?i[0]:this.runRecovery(i,s,n);if(a)return B&&console.log("Force-finish "+this.stackID(a)),this.stackToTree(a.forceAll())}if(this.recovering){let a=this.recovering==1?1:this.recovering*3;if(n.length>a)for(n.sort((o,l)=>l.score-o.score);n.length>a;)n.pop();n.some(o=>o.reducePos>r)&&this.recovering--}else if(n.length>1){e:for(let a=0;a<n.length-1;a++){let o=n[a];for(let l=a+1;l<n.length;l++){let O=n[l];if(o.sameState(O)||o.buffer.length>500&&O.buffer.length>500)if((o.score-O.score||o.buffer.length-O.buffer.length)>0)n.splice(l--,1);else{n.splice(a--,1);continue e}}}n.length>12&&(n.sort((a,o)=>o.score-a.score),n.splice(12,n.length-12))}this.minStackPos=n[0].pos;for(let a=1;a<n.length;a++)n[a].pos<this.minStackPos&&(this.minStackPos=n[a].pos);return null}stopAt(e){if(this.stoppedAt!=null&&this.stoppedAt<e)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=e}tryReuse(e,r,n,i){if(!n)return null;let s=e.curContext&&e.curContext.tracker.strict,a=s?e.curContext.hash:0;for(;n;){let o=this.parser.nodeSet.types[n.type.id]!=n.type?-1:this.parser.getGoto(e.state,n.type.id);if(o>-1&&n.length&&(!s||(n.prop(K.contextHash)||0)==a))return e.useNode(n,o,r),n;if(n.children.length==0||n.positions[0]>0)break;let l=n.children[0];if(l instanceof M&&(!i||l.type.id>=this.parser.minRepeatTerm))n=l;else break}return null}advanceStack(e,r,n){let i=e.pos,{parser:s}=this,a=B?this.stackID(e)+" -> ":"";if(this.stoppedAt!=null&&i>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let O=e.reducePos<i&&e.buffer.length&&e.buffer[e.buffer.length-2]<=e.reducePos&&this.fragments.lastRepeatPos==e.reducePos&&this.tryReuse(e,e.reducePos,this.fragments.lastRepeat,!0)||this.tryReuse(e,i,this.fragments.nodeAt(i),!1);if(O)return B&&console.log(a+this.stackID(e)+` (via reuse of ${s.getName(O.type.id)})`),!0}let o=s.stateSlot(e.state,4);if(o>0)return e.reduce(o),B&&console.log(a+this.stackID(e)+` (via always-reduce ${s.getName(o&65535)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let l=this.tokens.getActions(e);for(let O=0;O<l.length;){let c=l[O++],h=l[O++],p=l[O++],u=O==l.length||!n,d=u?e:e.split(),m=this.tokens.mainToken;if(d.apply(c,h,m?m.start:d.pos,p),B&&console.log(a+this.stackID(d)+` (via ${(c&65536)==0?"shift":`reduce of ${s.getName(c&65535)}`} for ${s.getName(h)} @ ${i}${d==e?"":", split"})`),u)return!0;d.pos>i?r.push(d):n.push(d)}return!1}advanceFully(e,r){let n=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>n)return Pa(e,r),!0}}runRecovery(e,r,n){let i=null,s=!1;for(let a=0;a<e.length;a++){let o=e[a],l=r[a<<1],O=r[(a<<1)+1],c=B?this.stackID(o)+" -> ":"";if(o.deadEnd&&(s||(s=!0,o.restart(),B&&console.log(c+this.stackID(o)+" (restarted)"),this.advanceFully(o,n))))continue;let h=o.split(),p=c;for(let u=0;u<10&&h.forceReduce()&&(B&&console.log(p+this.stackID(h)+" (via force-reduce)"),!this.advanceFully(h,n));u++)B&&(p=this.stackID(h)+" -> ");for(let u of o.recoverByInsert(l))B&&console.log(c+this.stackID(u)+" (via recover-insert)"),this.advanceFully(u,n);this.stream.end>o.pos?(O==o.pos&&(O++,l=0),o.recoverByDelete(l,O),B&&console.log(c+this.stackID(o)+` (via recover-delete ${this.parser.getName(l)})`),Pa(o,n)):(!i||i.score<h.score)&&(i=h)}return i}stackToTree(e){return e.close(),M.build({buffer:vn.create(e),nodeSet:this.parser.nodeSet,topID:this.topTerm,maxBufferLength:this.parser.bufferLength,reused:this.reused,start:this.ranges[0].from,length:e.pos-this.ranges[0].from,minRepeatType:this.parser.minRepeatTerm})}stackID(e){let r=(wn||(wn=new WeakMap)).get(e);return r||wn.set(e,r=String.fromCodePoint(this.nextStackID++)),r+e}};function Pa(t,e){for(let r=0;r<e.length;r++){let n=e[r];if(n.pos==t.pos&&n.sameState(t)){e[r].score<t.score&&(e[r]=t);return}}e.push(t)}var Cn=class{constructor(e,r,n){this.source=e,this.flags=r,this.disabled=n}allows(e){return!this.disabled||this.disabled[e]==0}},yn=t=>t,tt=class{constructor(e){this.start=e.start,this.shift=e.shift||yn,this.reduce=e.reduce||yn,this.reuse=e.reuse||yn,this.hash=e.hash||(()=>0),this.strict=e.strict!==!1}},Pe=class t extends Mt{constructor(e){if(super(),this.wrappers=[],e.version!=14)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let r=e.nodeNames.split(" ");this.minRepeatTerm=r.length;for(let o=0;o<e.repeatNodeCount;o++)r.push("");let n=Object.keys(e.topRules).map(o=>e.topRules[o][1]),i=[];for(let o=0;o<r.length;o++)i.push([]);function s(o,l,O){i[o].push([l,l.deserialize(String(O))])}if(e.nodeProps)for(let o of e.nodeProps){let l=o[0];typeof l=="string"&&(l=K[l]);for(let O=1;O<o.length;){let c=o[O++];if(c>=0)s(c,l,o[O++]);else{let h=o[O+-c];for(let p=-c;p>0;p--)s(o[O++],l,h);O++}}}this.nodeSet=new pt(r.map((o,l)=>Re.define({name:l>=this.minRepeatTerm?void 0:o,id:l,props:i[l],top:n.indexOf(l)>-1,error:l==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(l)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=1024;let a=Pt(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let o=0;o<this.specializerSpecs.length;o++)this.specialized[o]=this.specializerSpecs[o].term;this.specializers=this.specializerSpecs.map(xa),this.states=Pt(e.states,Uint32Array),this.data=Pt(e.stateData),this.goto=Pt(e.goto),this.maxTerm=e.maxTerm,this.tokenizers=e.tokenizers.map(o=>typeof o=="number"?new Se(a,o):o),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,r,n){let i=new _n(this,e,r,n);for(let s of this.wrappers)i=s(i,e,r,n);return i}getGoto(e,r,n=!1){let i=this.goto;if(r>=i[0])return-1;for(let s=i[r+1];;){let a=i[s++],o=a&1,l=i[s++];if(o&&n)return l;for(let O=s+(a>>1);s<O;s++)if(i[s]==e)return l;if(o)return-1}}hasAction(e,r){let n=this.data;for(let i=0;i<2;i++)for(let s=this.stateSlot(e,i?2:1),a;;s+=3){if((a=n[s])==65535)if(n[s+1]==1)a=n[s=pe(n,s+2)];else{if(n[s+1]==2)return pe(n,s+2);break}if(a==r||a==0)return pe(n,s+1)}return 0}stateSlot(e,r){return this.states[e*6+r]}stateFlag(e,r){return(this.stateSlot(e,0)&r)>0}validAction(e,r){return!!this.allActions(e,n=>n==r?!0:null)}allActions(e,r){let n=this.stateSlot(e,4),i=n?r(n):void 0;for(let s=this.stateSlot(e,1);i==null;s+=3){if(this.data[s]==65535)if(this.data[s+1]==1)s=pe(this.data,s+2);else break;i=r(pe(this.data,s+1))}return i}nextStates(e){let r=[];for(let n=this.stateSlot(e,1);;n+=3){if(this.data[n]==65535)if(this.data[n+1]==1)n=pe(this.data,n+2);else break;if((this.data[n+2]&1)==0){let i=this.data[n+1];r.some((s,a)=>a&1&&s==i)||r.push(this.data[n],i)}}return r}configure(e){let r=Object.assign(Object.create(t.prototype),this);if(e.props&&(r.nodeSet=this.nodeSet.extend(...e.props)),e.top){let n=this.topRules[e.top];if(!n)throw new RangeError(`Invalid top rule name ${e.top}`);r.top=n}return e.tokenizers&&(r.tokenizers=this.tokenizers.map(n=>{let i=e.tokenizers.find(s=>s.from==n);return i?i.to:n})),e.specializers&&(r.specializers=this.specializers.slice(),r.specializerSpecs=this.specializerSpecs.map((n,i)=>{let s=e.specializers.find(o=>o.from==n.external);if(!s)return n;let a=Object.assign(Object.assign({},n),{external:s.to});return r.specializers[i]=xa(a),a})),e.contextTracker&&(r.context=e.contextTracker),e.dialect&&(r.dialect=this.parseDialect(e.dialect)),e.strict!=null&&(r.strict=e.strict),e.wrap&&(r.wrappers=r.wrappers.concat(e.wrap)),e.bufferLength!=null&&(r.bufferLength=e.bufferLength),r}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let r=this.dynamicPrecedences;return r==null?0:r[e]||0}parseDialect(e){let r=Object.keys(this.dialects),n=r.map(()=>!1);if(e)for(let s of e.split(" ")){let a=r.indexOf(s);a>=0&&(n[a]=!0)}let i=null;for(let s=0;s<r.length;s++)if(!n[s])for(let a=this.dialects[r[s]],o;(o=this.data[a++])!=65535;)(i||(i=new Uint8Array(this.maxTerm+1)))[o]=1;return new Cn(e,n,i)}static deserialize(e){return new t(e)}};function pe(t,e){return t[e]|t[e+1]<<16}function DO(t){let e=null;for(let r of t){let n=r.p.stoppedAt;(r.pos==r.p.stream.end||n!=null&&r.pos>n)&&r.p.parser.stateFlag(r.state,2)&&(!e||e.score<r.score)&&(e=r)}return e}function xa(t){if(t.external){let e=t.extend?1:0;return(r,n)=>t.external(r,n)<<1|e}return t.get}var BO=55,NO=1,FO=56,HO=2,KO=57,JO=3,ya=4,ec=5,Ln=6,Ca=7,Ya=8,za=9,qa=10,tc=11,rc=12,nc=13,Yn=58,ic=14,sc=15,Za=59,Aa=21,ac=23,La=24,oc=25,qn=27,Ea=28,lc=29,Oc=32,cc=35,hc=37,uc=38,pc=0,fc=1,dc={area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},mc={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},Xa={dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}};function gc(t){return t==45||t==46||t==58||t>=65&&t<=90||t==95||t>=97&&t<=122||t>=161}var va=null,Ta=null,Ra=0;function An(t,e){let r=t.pos+e;if(Ra==r&&Ta==t)return va;let n=t.peek(e),i="";for(;gc(n);)i+=String.fromCharCode(n),n=t.peek(++e);return Ta=t,Ra=r,va=i?i.toLowerCase():n==Qc||n==$c?void 0:null}var Wa=60,or=62,En=47,Qc=63,$c=33,bc=45;function ja(t,e){this.name=t,this.parent=e}var Sc=[Ln,qa,Ca,Ya,za],kc=new tt({start:null,shift(t,e,r,n){return Sc.indexOf(e)>-1?new ja(An(n,1)||"",t):t},reduce(t,e){return e==Aa&&t?t.parent:t},reuse(t,e,r,n){let i=e.type.id;return i==Ln||i==hc?new ja(An(n,1)||"",t):t},strict:!1}),Pc=new z((t,e)=>{if(t.next!=Wa){t.next<0&&e.context&&t.acceptToken(Yn);return}t.advance();let r=t.next==En;r&&t.advance();let n=An(t,0);if(n===void 0)return;if(!n)return t.acceptToken(r?sc:ic);let i=e.context?e.context.name:null;if(r){if(n==i)return t.acceptToken(tc);if(i&&mc[i])return t.acceptToken(Yn,-2);if(e.dialectEnabled(pc))return t.acceptToken(rc);for(let s=e.context;s;s=s.parent)if(s.name==n)return;t.acceptToken(nc)}else{if(n=="script")return t.acceptToken(Ca);if(n=="style")return t.acceptToken(Ya);if(n=="textarea")return t.acceptToken(za);if(dc.hasOwnProperty(n))return t.acceptToken(qa);i&&Xa[i]&&Xa[i][n]?t.acceptToken(Yn,-1):t.acceptToken(Ln)}},{contextual:!0}),xc=new z(t=>{for(let e=0,r=0;;r++){if(t.next<0){r&&t.acceptToken(Za);break}if(t.next==bc)e++;else if(t.next==or&&e>=2){r>=3&&t.acceptToken(Za,-2);break}else e=0;t.advance()}});function wc(t){for(;t;t=t.parent)if(t.name=="svg"||t.name=="math")return!0;return!1}var yc=new z((t,e)=>{if(t.next==En&&t.peek(1)==or){let r=e.dialectEnabled(fc)||wc(e.context);t.acceptToken(r?ec:ya,2)}else t.next==or&&t.acceptToken(ya,1)});function Wn(t,e,r){let n=2+t.length;return new z(i=>{for(let s=0,a=0,o=0;;o++){if(i.next<0){o&&i.acceptToken(e);break}if(s==0&&i.next==Wa||s==1&&i.next==En||s>=2&&s<n&&i.next==t.charCodeAt(s-2))s++,a++;else if(s==n&&i.next==or){o>a?i.acceptToken(e,-a):i.acceptToken(r,-(a-2));break}else if((i.next==10||i.next==13)&&o){i.acceptToken(e,1);break}else s=a=0;i.advance()}})}var Zc=Wn("script",BO,NO),Xc=Wn("style",FO,HO),vc=Wn("textarea",KO,JO),Tc=Oe({"Text RawText IncompleteTag IncompleteCloseTag":f.content,"StartTag StartCloseTag SelfClosingEndTag EndTag":f.angleBracket,TagName:f.tagName,"MismatchedCloseTag/TagName":[f.tagName,f.invalid],AttributeName:f.attributeName,"AttributeValue UnquotedAttributeValue":f.attributeValue,Is:f.definitionOperator,"EntityReference CharacterReference":f.character,Comment:f.blockComment,ProcessingInst:f.processingInstruction,DoctypeDecl:f.documentMeta}),Ma=Pe.deserialize({version:14,states:",xOVO!rOOO!ZQ#tO'#CrO!`Q#tO'#C{O!eQ#tO'#DOO!jQ#tO'#DRO!oQ#tO'#DTO!tOaO'#CqO#PObO'#CqO#[OdO'#CqO$kO!rO'#CqOOO`'#Cq'#CqO$rO$fO'#DUO$zQ#tO'#DWO%PQ#tO'#DXOOO`'#Dl'#DlOOO`'#DZ'#DZQVO!rOOO%UQ&rO,59^O%aQ&rO,59gO%lQ&rO,59jO%wQ&rO,59mO&SQ&rO,59oOOOa'#D_'#D_O&_OaO'#CyO&jOaO,59]OOOb'#D`'#D`O&rObO'#C|O&}ObO,59]OOOd'#Da'#DaO'VOdO'#DPO'bOdO,59]OOO`'#Db'#DbO'jO!rO,59]O'qQ#tO'#DSOOO`,59],59]OOOp'#Dc'#DcO'vO$fO,59pOOO`,59p,59pO(OQ#|O,59rO(TQ#|O,59sOOO`-E7X-E7XO(YQ&rO'#CtOOQW'#D['#D[O(hQ&rO1G.xOOOa1G.x1G.xOOO`1G/Z1G/ZO(sQ&rO1G/ROOOb1G/R1G/RO)OQ&rO1G/UO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!b!uO~Ob!xOc!xOd!xO!c!wO!d!xO~Ob!uOc!uOd!uO!a!{O!b!uO~Ob!xOc!xOd!xO!c!{O!d!xO~OT~cbd!ey|!e~",goto:"%q!aPPPPPPPPPPPPPPPPPPPPP!b!hP!nPP!zP!}#Q#T#Z#^#a#g#j#m#s#y!bP!b!bP$P$V$m$s$y%P%V%]%cPPPPPPPP%iX^OX`pXUOX`pezabcde{!O!Q!S!UR!q!dRhUR!XhXVOX`pRkVR!XkXWOX`pRnWR!XnXXOX`pQrXR!XpXYOX`pQ`ORx`Q{aQ!ObQ!QcQ!SdQ!UeZ!e{!O!Q!S!UQ!v!oR!z!vQ!y!pR!|!yQgUR!VgQjVR!YjQmWR![mQpXR!^pQtZR!`tS_O`ToXp",nodeNames:"\u26A0 StartCloseTag StartCloseTag StartCloseTag EndTag SelfClosingEndTag StartTag StartTag StartTag StartTag StartTag StartCloseTag StartCloseTag StartCloseTag IncompleteTag IncompleteCloseTag Document Text EntityReference CharacterReference InvalidEntity Element OpenTag TagName Attribute AttributeName Is AttributeValue UnquotedAttributeValue ScriptText CloseTag OpenTag StyleText CloseTag OpenTag TextareaText CloseTag OpenTag CloseTag SelfClosingTag Comment ProcessingInst MismatchedCloseTag CloseTag DoctypeDecl",maxTerm:68,context:kc,nodeProps:[["closedBy",-10,1,2,3,7,8,9,10,11,12,13,"EndTag",6,"EndTag SelfClosingEndTag",-4,22,31,34,37,"CloseTag"],["openedBy",4,"StartTag StartCloseTag",5,"StartTag",-4,30,33,36,38,"OpenTag"],["group",-10,14,15,18,19,20,21,40,41,42,43,"Entity",17,"Entity TextContent",-3,29,32,35,"TextContent Entity"],["isolate",-11,22,30,31,33,34,36,37,38,39,42,43,"ltr",-3,27,28,40,""]],propSources:[Tc],skippedNodes:[0],repeatNodeCount:9,tokenData:"!<p!aR!YOX$qXY,QYZ,QZ[$q[]&X]^,Q^p$qpq,Qqr-_rs3_sv-_vw3}wxHYx}-_}!OH{!O!P-_!P!Q$q!Q![-_![!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r)esv)ew;'S)e;'S;=`)y<%lO)ea!:YP;=`<%l!8]!R!:dY!b`!dpOr!4trs!5ksv!4tvw!6Vwx!8]x!`!4t!`!a!;S!a;'S!4t;'S;=`!;r<%lO!4t!R!;]V!b`!dpyPOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!;uP;=`<%l!4t!V!<TXjSaP!b`!dpOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X",tokenizers:[Zc,Xc,vc,yc,Pc,xc,0,1,2,3,4,5],topRules:{Document:[0,16]},dialects:{noMatch:0,selfClosing:515},tokenPrec:517});function Ua(t,e){let r=Object.create(null);for(let n of t.getChildren(La)){let i=n.getChild(oc),s=n.getChild(qn)||n.getChild(Ea);i&&(r[e.read(i.from,i.to)]=s?s.type.id==qn?e.read(s.from+1,s.to-1):e.read(s.from,s.to):"")}return r}function _a(t,e){let r=t.getChild(ac);return r?e.read(r.from,r.to):" "}function zn(t,e,r){let n;for(let i of r)if(!i.attrs||i.attrs(n||(n=Ua(t.node.parent.firstChild,e))))return{parser:i.parser,bracketed:!0};return null}function Mn(t=[],e=[]){let r=[],n=[],i=[],s=[];for(let o of t)(o.tag=="script"?r:o.tag=="style"?n:o.tag=="textarea"?i:s).push(o);let a=e.length?Object.create(null):null;for(let o of e)(a[o.name]||(a[o.name]=[])).push(o);return Ut((o,l)=>{let O=o.type.id;if(O==lc)return zn(o,l,r);if(O==Oc)return zn(o,l,n);if(O==cc)return zn(o,l,i);if(O==Aa&&s.length){let c=o.node,h=c.firstChild,p=h&&_a(h,l),u;if(p){for(let d of s)if(d.tag==p&&(!d.attrs||d.attrs(u||(u=Ua(h,l))))){let m=c.lastChild,g=m.type.id==uc?m.from:c.to;if(g>h.to)return{parser:d.parser,overlay:[{from:h.to,to:g}]}}}}if(a&&O==La){let c=o.node,h;if(h=c.firstChild){let p=a[l.read(h.from,h.to)];if(p)for(let u of p){if(u.tagName&&u.tagName!=_a(c.parent,l))continue;let d=c.lastChild;if(d.type.id==qn){let m=d.from+1,g=d.lastChild,b=d.to-(g&&g.isError?0:1);if(b>m)return{parser:u.parser,overlay:[{from:m,to:b}],bracketed:!0}}else if(d.type.id==Ea)return{parser:u.parser,overlay:[{from:d.from,to:d.to}]}}}}return null})}var Rc=148,Va=1,jc=149,_c=150,Da=2,Cc=151,Yc=3,zc=4,qc=152,Ba=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],Ac=58,Lc=40,Na=95,Ec=91,lr=45,Wc=46,Mc=35,Uc=37,Vc=38,Gc=92,Ic=10,Dc=42;function xt(t){return t>=65&&t<=90||t>=97&&t<=122||t>=161}function Un(t){return t>=48&&t<=57}function Ga(t){return Un(t)||t>=97&&t<=102||t>=65&&t<=70}var Fa=(t,e,r)=>(n,i)=>{for(let s=!1,a=0,o=0;;o++){let{next:l}=n;if(xt(l)||l==lr||l==Na||s&&Un(l))!s&&(l!=lr||o>0)&&(s=!0),a===o&&l==lr&&a++,n.advance();else if(l==Gc&&n.peek(1)!=Ic){if(n.advance(),Ga(n.next)){do n.advance();while(Ga(n.next));n.next==32&&n.advance()}else n.next>-1&&n.advance();s=!0}else{s&&n.acceptToken(a>=2&&i.canShift(Da)?e:l==Lc?r:t);break}}},Bc=new z(Fa(jc,Da,_c),{contextual:!0}),Nc=new z(Fa(Cc,Yc,zc),{contextual:!0}),Fc=new z(t=>{if(Ba.includes(t.peek(-1))){let{next:e}=t;(xt(e)||e==Na||e==Mc||e==Wc||e==Dc||e==Ec||e==Ac&&xt(t.peek(1))||e==lr||e==Vc)&&t.acceptToken(Rc)}}),Hc=new z(t=>{if(!Ba.includes(t.peek(-1))){let{next:e}=t;if(e==Uc&&(t.advance(),t.acceptToken(Va)),xt(e)){do t.advance();while(xt(t.next)||Un(t.next));t.acceptToken(Va)}}});function Ia(t){let e=t.length;return(e==4||e==5||e==7||e==9)&&/^#[a-f\d]+$/i.test(t)?qc:-1}var Kc=Oe({"AtKeyword import charset namespace keyframes media supports font-feature-values":f.definitionKeyword,"from to selector scope MatchFlag":f.keyword,NamespaceName:f.namespace,KeyframeName:f.labelName,KeyframeRangeName:f.operatorKeyword,TagName:f.tagName,ClassName:f.className,PseudoClassName:f.constant(f.className),IdName:f.labelName,"FeatureName PropertyName":f.propertyName,AttributeName:f.attributeName,NumberLiteral:f.number,KeywordQuery:f.keyword,UnaryQueryOp:f.operatorKeyword,"CallTag ValueName FontName":f.atom,VariableName:f.variableName,Callee:f.operatorKeyword,Unit:f.unit,"UniversalSelector NestingSelector":f.definitionOperator,"MatchOp CompareOp":f.compareOperator,"ChildOp SiblingOp, LogicOp":f.logicOperator,BinOp:f.arithmeticOperator,Important:f.modifier,Comment:f.blockComment,ColorLiteral:f.color,"ParenthesizedContent StringLiteral":f.string,":":f.punctuation,PseudoOp:f.derefOperator,"; , |":f.separator,"( )":f.paren,"[ ]":f.squareBracket,"{ }":f.brace}),Jc={__proto__:null,lang:44,"nth-child":44,"nth-last-child":44,"nth-of-type":44,"nth-last-of-type":44,dir:44,"host-context":44,if:88,url:158,"url-prefix":158,domain:158,regexp:158},eh={__proto__:null,or:102,and:102,not:112,only:112,layer:212},th={__proto__:null,selector:118,style:124,layer:208},rh={__proto__:null,"@import":204,"@media":216,"@charset":220,"@namespace":224,"@keyframes":230,"@supports":242,"@scope":246,"@font-feature-values":252},nh={__proto__:null,to:249},Ha=Pe.deserialize({version:14,states:"MrQYQdOOO$TQdOOP$[O`OOO%XQaO'#CfOOQP'#Ce'#CeO%`QdO'#CgO%eQ`O'#CgO%jQaO'#FrO&eQdO'#CkO'XQaO'#CcO'cQdO'#CnOOQP'#ES'#ESOOQP'#ER'#ERO'nQdO'#ETO'yQdO'#E[O'yQdO'#E_OOQP'#Fr'#FrO)`QhO'#FQOOQS'#Fq'#FqOOQS'#FT'#FTQYQdOOO)gQdO'#EeO*vQhO'#EkO)gQdO'#EmO*}QdO'#EoO+YQdO'#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#[%PQ$}#ZQ&e${R'd&dR$g!rQ'R%{R(['yR#OhR#QiR$s#QS&[$r&]R(Q'[V&Y$r&]'[R#YlQ#`rR%S#`QdOSpP!SU!kdp%PR%P#[Q%]#p[&l%]&r'i'r'x(bQ&r%aQ'i&mQ'r&wQ'x'OR(b(VQ$[!mQ$^!nQ$`!oV%v$[$^$`Q&Q$iR'X&QQ&v%iS'q&v(WR(W'rQ&n%]R'j&nQ&j%YR'h&jQ!RXR#l!RQ&d${R'c&dQ#]oS%Q#]%RR%R#^Q'z'RR(]'zQ$m!yR&U$mQ&]$rR'_&]Q']&[R(R']Q#XlR$y#XQ$P!cR%f$P_cOPdp!S#[%P^XOPdp!S#[%PQ!_^Q!`_Q#h}Q#i!OQ#j!PQ#k!QQ$u#SQ%Y#oR'g&iR%^#pQ!reQ!{g[$X!m!n!o$[$^$`Q${#Zh%[#p%]%a&m&r&w'O'i'r'x(V(bQ%`#uQ%z$cS&b${&dQ&h%WQ'b&cR'|'T]$Z!m!n!o$[$^$`Q!caU!yf!r$gQ#RjQ#x!bS#|!c$PQ$R!dQ%d#}Q%e$OQ%i$SS&O$i&QQ&T$lR'o&uQ#{!bW%s$W%m&z'uQ&t%bQ'w&}Q(U'mR(d(ZQ%u$WQ&y%mQ't&zR(Y'uR%k$SR%Z#oQqPR#n!SQ!zfQ$f!rR%}$g",nodeNames:"\u26A0 Unit VariableName VariableName QueryCallee Comment StyleSheet RuleSet UniversalSelector TagSelector TagName NamespacedTagSelector NamespaceName TagName NestingSelector ClassSelector . ClassName PseudoClassSelector : :: PseudoClassName PseudoClassName ) ( ArgList ValueName ParenthesizedValue AtKeyword ; ] [ BracketedValue } { BracedValue ColorLiteral NumberLiteral StringLiteral BinaryExpression BinOp CallExpression Callee IfExpression if ArgList IfBranch KeywordQuery FeatureQuery FeatureName BinaryQuery LogicOp ComparisonQuery ColorLiteral CompareOp UnaryQuery UnaryQueryOp ParenthesizedQuery SelectorQuery selector ParenthesizedSelector StyleQuery style ParenthesedQuery CallQuery ArgList PropertyName , PropertyName UnaryQuery ParenthesedQuery BinaryQuery ParenthesedQuery ParenthesedQuery StyleFeature PropertyName StyleRange PseudoQuery CallLiteral CallTag ParenthesizedContent PseudoClassName ArgList IdSelector IdName AttributeSelector AttributeName NamespacedAttribute NamespaceName AttributeName MatchOp MatchFlag ChildSelector ChildOp DescendantSelector SiblingSelector SiblingOp Block Declaration PropertyName Important ImportStatement import Layer layer LayerName layer MediaStatement media CharsetStatement charset NamespaceStatement namespace NamespaceName KeyframesStatement keyframes KeyframeName KeyframeList KeyframeSelector KeyframeRangeName SupportsStatement supports ScopeStatement scope to FontFeatureStatement font-feature-values FontName AtRule Styles",maxTerm:176,nodeProps:[["isolate",-2,5,38,""],["openedBy",23,"(",30,"[",33,"{"],["closedBy",24,")",31,"]",34,"}"]],propSources:[Kc],skippedNodes:[0,5,130],repeatNodeCount:17,tokenData:"IO~R!bOX%ZX^&R^p%Zpq&Rqr)ers)vst+jtu/wuv%Zvw0qwx1Sxy2qyz3Sz{3X{|3r|}8e}!O8v!O!P9e!P!Q9|!Q![:u![!];p!]!^<l!^!_<}!_!`=y!`!a>^!a!b%Z!b!c?_!c!k%Z!k!lAl!l!u%Z!u!vAl!v!}%Z!}#OA}#O#P%Z#P#QB`#Q#R/w#R#]%Z#]#^Bq#^#g%Z#g#hAl#h#o%Z#o#pGU#p#qGg#q#rHO#r#sHa#s#y%Z#y#z&R#z$f%Z$f$g&R$g#BY%Z#BY#BZ&R#BZ$IS%Z$IS$I_&R$I_$I|%Z$I|$JO&R$JO$JT%Z$JT$JU&R$JU$KV%Z$KV$KW&R$KW&FU%Z&FU&FV&R&FV;'S%Z;'S;=`Hx<%lO%Z`%^SOy%jz;'S%j;'S;=`%{<%lO%j`%oS!r`Oy%jz;'S%j;'S;=`%{<%lO%j`&OP;=`<%l%j~&Wh$`~OX%jX^'r^p%jpq'rqy%jz#y%j#y#z'r#z$f%j$f$g'r$g#BY%j#BY#BZ'r#BZ$IS%j$I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amicPrecedences:{97:1},specialized:[{term:172,get:(t,e)=>Ia(t)<<1,external:Ia},{term:150,get:t=>Jc[t]||-1},{term:151,get:t=>eh[t]||-1},{term:4,get:t=>th[t]||-1},{term:28,get:t=>rh[t]||-1},{term:149,get:t=>nh[t]||-1}],tokenPrec:2433});var Vn=null;function Gn(){if(!Vn&&typeof document=="object"&&document.body){let{style:t}=document.body,e=[],r=new Set;for(let n in t)n!="cssText"&&n!="cssFloat"&&typeof t[n]=="string"&&(/[A-Z]/.test(n)&&(n=n.replace(/[A-Z]/g,i=>"-"+i.toLowerCase())),r.has(n)||(e.push(n),r.add(n)));Vn=e.sort().map(n=>({type:"property",label:n,apply:n+": "}))}return Vn||[]}var Ka=["active","after","any-link","autofill","backdrop","before","checked","cue","default","defined","disabled","empty","enabled","file-selector-button","first","first-child","first-letter","first-line","first-of-type","focus","focus-visible","focus-within","fullscreen","has","host","host-context","hover","in-range","indeterminate","invalid","is","lang","last-child","last-of-type","left","link","marker","modal","not","nth-child","nth-last-child","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","part","placeholder","placeholder-shown","read-only","read-write","required","right","root","scope","selection","slotted","target","target-text","valid","visited","where"].map(t=>({type:"class",label:t})),Ja=["above","absolute","activeborder","additive","activecaption","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","antialiased","appworkspace","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic-abegede-gez","ethiopic-halehame-aa-er","ethiopic-halehame-gez","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","graytext","grid","groove","hand","hard-light","help","hidden","hide","higher","highlight","highlighttext","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","justify","keep-all","landscape","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-hexadecimal","lower-latin","lower-norwegian","lowercase","ltr","luminosity","manipulation","match","matrix","matrix3d","medium","menu","menutext","message-box","middle","min-intrinsic","mix","monospace","move","multiple","multiple_mask_images","multiply","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","opacity","open-quote","optimizeLegibility","optimizeSpeed","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","text","text-bottom","text-top","textarea","textfield","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","to","top","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-latin","uppercase","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"].map(t=>({type:"keyword",label:t})).concat(["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"].map(t=>({type:"constant",label:t}))),ih=["a","abbr","address","article","aside","b","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","dd","del","details","dfn","dialog","div","dl","dt","em","figcaption","figure","footer","form","header","hgroup","h1","h2","h3","h4","h5","h6","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","main","meter","nav","ol","output","p","pre","ruby","section","select","small","source","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","tr","u","ul"].map(t=>({type:"type",label:t})),sh=["@charset","@color-profile","@container","@counter-style","@font-face","@font-feature-values","@font-palette-values","@import","@keyframes","@layer","@media","@namespace","@page","@position-try","@property","@scope","@starting-style","@supports","@view-transition"].map(t=>({type:"keyword",label:t})),fe=/^(\w[\w-]*|-\w[\w-]*|)$/,ah=/^-(-[\w-]*)?$/;function oh(t,e){var r;if((t.name=="("||t.type.isError)&&(t=t.parent||t),t.name!="ArgList")return!1;let n=(r=t.parent)===null||r===void 0?void 0:r.firstChild;return n?.name!="Callee"?!1:e.sliceString(n.from,n.to)=="var"}var eo=new Wt,lh=["Declaration"];function Oh(t){for(let e=t;;){if(e.type.isTop)return e;if(!(e=e.parent))return t}}function to(t,e,r){if(e.to-e.from>4096){let n=eo.get(e);if(n)return n;let i=[],s=new Set,a=e.cursor(le.IncludeAnonymous);if(a.firstChild())do for(let o of to(t,a.node,r))s.has(o.label)||(s.add(o.label),i.push(o));while(a.nextSibling());return eo.set(e,i),i}else{let n=[],i=new Set;return e.cursor().iterate(s=>{var a;if(r(s)&&s.matchContext(lh)&&((a=s.node.nextSibling)===null||a===void 0?void 0:a.name)==":"){let o=t.sliceString(s.from,s.to);i.has(o)||(i.add(o),n.push({label:o,type:"variable"}))}}),n}}var ch=t=>e=>{let{state:r,pos:n}=e,i=R(r).resolveInner(n,-1),s=i.type.isError&&i.from==i.to-1&&r.doc.sliceString(i.from,i.to)=="-";if(i.name=="PropertyName"||(s||i.name=="TagName")&&/^(Block|Styles)$/.test(i.resolve(i.to).name))return{from:i.from,options:Gn(),validFor:fe};if(i.name=="ValueName")return{from:i.from,options:Ja,validFor:fe};if(i.name=="PseudoClassName")return{from:i.from,options:Ka,validFor:fe};if(t(i)||(e.explicit||s)&&oh(i,r.doc))return{from:t(i)||s?i.from:n,options:to(r.doc,Oh(i),t),validFor:ah};if(i.name=="TagName"){for(let{parent:l}=i;l;l=l.parent)if(l.name=="Block")return{from:i.from,options:Gn(),validFor:fe};return{from:i.from,options:ih,validFor:fe}}if(i.name=="AtKeyword")return{from:i.from,options:sh,validFor:fe};if(!e.explicit)return null;let a=i.resolve(n),o=a.childBefore(n);return o&&o.name==":"&&a.name=="PseudoClassSelector"?{from:n,options:Ka,validFor:fe}:o&&o.name==":"&&a.name=="Declaration"||a.name=="ArgList"?{from:n,options:Ja,validFor:fe}:a.name=="Block"||a.name=="Styles"?{from:n,options:Gn(),validFor:fe}:null},hh=ch(t=>t.name=="VariableName"),wt=Ne.define({name:"css",parser:Ha.configure({props:[$e.add({Declaration:Fe()}),he.add({"Block KeyframeList":It})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"}},indentOnInput:/^\s*\}$/,wordChars:"-"}});function ro(){return new ce(wt,wt.data.of({autocomplete:hh}))}var uh=317,ph=318,no=1,fh=2,dh=3,mh=4,gh=319,Qh=321,$h=322,bh=5,Sh=6,kh=0,Dn=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],io=125,Ph=59,Bn=47,xh=42,wh=43,yh=45,Zh=60,Xh=44,vh=63,Th=46,Rh=91,jh=new tt({start:!1,shift(t,e){return e==bh||e==Sh||e==Qh?t:e==$h},strict:!1}),_h=new z((t,e)=>{let{next:r}=t;(r==io||r==-1||e.context)&&t.acceptToken(gh)},{contextual:!0,fallback:!0}),Ch=new z((t,e)=>{let{next:r}=t,n;Dn.indexOf(r)>-1||r==Bn&&((n=t.peek(1))==Bn||n==xh)||r!=io&&r!=Ph&&r!=-1&&!e.context&&t.acceptToken(uh)},{contextual:!0}),Yh=new z((t,e)=>{t.next==Rh&&!e.context&&t.acceptToken(ph)},{contextual:!0}),zh=new z((t,e)=>{let{next:r}=t;if(r==wh||r==yh){if(t.advance(),r==t.next){t.advance();let n=!e.context&&e.canShift(no);t.acceptToken(n?no:fh)}}else r==vh&&t.peek(1)==Th&&(t.advance(),t.advance(),(t.next<48||t.next>57)&&t.acceptToken(dh))},{contextual:!0});function In(t,e){return t>=65&&t<=90||t>=97&&t<=122||t==95||t>=192||!e&&t>=48&&t<=57}var qh=new z((t,e)=>{if(t.next!=Zh||!e.dialectEnabled(kh)||(t.advance(),t.next==Bn))return;let r=0;for(;Dn.indexOf(t.next)>-1;)t.advance(),r++;if(In(t.next,!0)){for(t.advance(),r++;In(t.next,!1);)t.advance(),r++;for(;Dn.indexOf(t.next)>-1;)t.advance(),r++;if(t.next==Xh)return;for(let n=0;;n++){if(n==7){if(!In(t.next,!0))return;break}if(t.next!="extends".charCodeAt(n))break;t.advance(),r++}}t.acceptToken(mh,-r)}),Ah=Oe({"get set async static":f.modifier,"for while do if else switch try catch finally return throw break continue default case defer":f.controlKeyword,"in of await yield void typeof delete instanceof as satisfies":f.operatorKeyword,"let var const using function class extends":f.definitionKeyword,"import export from":f.moduleKeyword,"with debugger new":f.keyword,TemplateString:f.special(f.string),super:f.atom,BooleanLiteral:f.bool,this:f.self,null:f.null,Star:f.modifier,VariableName:f.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":f.function(f.variableName),VariableDefinition:f.definition(f.variableName),Label:f.labelName,PropertyName:f.propertyName,PrivatePropertyName:f.special(f.propertyName),"CallExpression/MemberExpression/PropertyName":f.function(f.propertyName),"FunctionDeclaration/VariableDefinition":f.function(f.definition(f.variableName)),"ClassDeclaration/VariableDefinition":f.definition(f.className),"NewExpression/VariableName":f.className,PropertyDefinition:f.definition(f.propertyName),PrivatePropertyDefinition:f.definition(f.special(f.propertyName)),UpdateOp:f.updateOperator,"LineComment Hashbang":f.lineComment,BlockComment:f.blockComment,Number:f.number,String:f.string,Escape:f.escape,ArithOp:f.arithmeticOperator,LogicOp:f.logicOperator,BitOp:f.bitwiseOperator,CompareOp:f.compareOperator,RegExp:f.regexp,Equals:f.definitionOperator,Arrow:f.function(f.punctuation),": Spread":f.punctuation,"( )":f.paren,"[ ]":f.squareBracket,"{ }":f.brace,"InterpolationStart InterpolationEnd":f.special(f.brace),".":f.derefOperator,", ;":f.separator,"@":f.meta,TypeName:f.typeName,TypeDefinition:f.definition(f.typeName),"type enum interface implements namespace module declare":f.definitionKeyword,"abstract global Privacy readonly override":f.modifier,"is keyof unique infer asserts":f.operatorKeyword,JSXAttributeValue:f.attributeValue,JSXText:f.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":f.angleBracket,"JSXIdentifier JSXNameSpacedName":f.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":f.attributeName,"JSXBuiltin/JSXIdentifier":f.standard(f.tagName)}),Lh={__proto__:null,export:20,as:25,from:33,default:36,async:41,function:42,in:52,out:55,const:56,extends:60,this:64,true:72,false:72,null:84,void:88,typeof:92,super:108,new:142,delete:154,yield:163,await:167,class:172,public:237,private:237,protected:237,readonly:239,instanceof:258,satisfies:261,import:294,keyof:351,unique:355,infer:361,asserts:397,is:399,abstract:419,implements:421,type:423,let:426,var:428,using:431,interface:437,enum:441,namespace:447,module:449,declare:453,global:457,defer:473,for:478,of:487,while:490,with:494,do:498,if:502,else:504,switch:508,case:514,try:520,catch:524,finally:528,return:532,throw:536,break:540,continue:544,debugger:548},Eh={__proto__:null,async:129,get:131,set:133,declare:195,public:197,private:197,protected:197,static:199,abstract:201,override:203,readonly:209,accessor:211,new:403},Wh={__proto__:null,"<":193},so=Pe.deserialize({version:14,states:"$GSQ%TQlOOO%[QlOOO'_QpOOP(lO`OOO*zQ!0MxO'#CiO+RO#tO'#CjO+aO&jO'#CjO+oO#@ItO'#DaO.QQlO'#DgO.bQlO'#DrO%[QlO'#DzO0fQlO'#ESOOQ!0Lf'#E['#E[O1PQ`O'#EXOOQO'#Ep'#EpOOQO'#Im'#ImO1XQ`O'#GtO1dQ`O'#EoO1iQ`O'#EoO3hQ!0MxO'#JsO6[Q!0MxO'#JtO6uQ`O'#F^O6zQ,UO'#FuOOQ!0Lf'#Fg'#FgO7VO7dO'#FgO9XQMhO'#F}O9`Q`O'#F|OOQ!0Lf'#Jt'#JtOOQ!0Lb'#Js'#JsO9eQ`O'#GxOOQ['#K`'#K`O9pQ`O'#IZO9uQ!0LrO'#I[OOQ['#Ja'#JaOOQ['#I`'#I`Q`QlOOQ`QlOOO9}Q!L^O'#DvO:UQlO'#EOO:]QlO'#EQO9kQ`O'#GtO:dQMhO'#CoO:rQ`O'#EnO:}Q`O'#EzO;hQMhO'#FfO;xQ`O'#GtOOQO'#Ka'#KaO;}Q`O'#KaO<]Q`O'#G|O<]Q`O'#G}O<]Q`O'#HPO9kQ`O'#HSO=SQ`O'#HVO>kQ`O'#CeO>{Q`O'#HdO?TQ`O'#HjO?TQ`O'#HlO`QlO'#HnO?TQ`O'#HpO?TQ`O'#HsO?YQ`O'#HyO?_Q!0LsO'#IPO%[QlO'#IRO?jQ!0LsO'#ITO?uQ!0LsO'#IVO9uQ!0LrO'#IXO@QQ!0MxO'#CiOASQpO'#DlQOQ`OOO%[QlO'#EQOAjQ`O'#ETO:dQMhO'#EnOAuQ`O'#EnOBQQ!bO'#FfOOQ['#Cg'#CgOOQ!0Lb'#Dq'#DqOOQ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rQ6s2fQ7u4cQ9Y6tT=n'X+^V#aW%h*ZU#`W%h*ZS(V#W(_U([#Z+[/oS-]'X+^T.Q(U.VV'_!e%i*[Q$lfR)y$qT)n$l)oR4X/WT*`$x*cT*i${*ZQ0y+hQ1i,XQ3a.hQ5v1kQ6R1sQ7Z3eQ8t6UQ9e7YQ:`8sQ:r9dQ;]:bQ;e:tQ;p;^R;s;fnqOXst!Z#d%m&r&t&u&w,u,z2^2aQ&l!VR,j&itmOXst!U!V!Z#d%m&i&r&t&u&w,u,z2^2aR,q&oT%lm,qR1m,ZR,i&gQ&U|S,P&V&WR1`,QR+u&PT&p!W&sT&q!W&sT2`,z2a",nodeNames:"\u26A0 ArithOp ArithOp ?. JSXStartTag LineComment BlockComment Script Hashbang ExportDeclaration export Star as VariableName String Escape from ; default FunctionDeclaration async function VariableDefinition > < TypeParamList in out const TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewTarget new NewExpression ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression TypeArgList CompareOp < declare Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty VariableDefinition Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression InstantiationExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast < ArrowFunction TypeParamList SequenceExpression InstantiationExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate asserts is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var using TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration defer ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement SingleExpression SingleClassItem",maxTerm:381,context:jh,nodeProps:[["isolate",-8,5,6,14,37,39,51,53,55,""],["group",-26,9,17,19,68,208,212,216,217,219,222,225,235,238,244,246,248,250,253,259,265,267,269,271,273,275,276,"Statement",-34,13,14,32,35,36,42,51,54,55,57,62,70,72,76,80,82,84,85,110,111,121,122,137,140,142,143,144,145,146,148,149,168,170,172,"Expression",-23,31,33,37,41,43,45,174,176,178,179,181,182,183,185,186,187,189,190,191,202,204,206,207,"Type",-3,88,103,109,"ClassItem"],["openedBy",23,"<",38,"InterpolationStart",56,"[",60,"{",73,"(",161,"JSXStartCloseTag"],["closedBy",-2,24,169,">",40,"InterpolationEnd",50,"]",61,"}",74,")",166,"JSXEndTag"]],propSources:[Ah],skippedNodes:[0,5,6,279],repe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[OX%ZXY+gYZ&cZ[+g[p%Zpq+gqr%Zrs&}st%ZtuEruw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$f%Z$f$g+g$g#BYEr#BY#BZ$A`#BZ$ISEr$IS$I_$A`$I_$JTEr$JT$JU$A`$JU$KVEr$KV$KW$A`$KW&FUEr&FU&FV$A`&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$A`?HUOEr07[$D|k$j&j(Xp([!b(O0/l$^#t(U,2j(f$I[OY%ZYZ&cZr%Zrs&}st%ZtuEruw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$g%Z$g;'SEr;'S;=`I|<%lOEr",tokenizers:[Ch,Yh,zh,qh,2,3,4,5,6,7,8,9,10,11,12,13,14,_h,new ke("$S~RRtu[#O#Pg#S#T#|~_P#o#pb~gOx~~jVO#i!P#i#j!U#j#l!P#l#m!q#m;'S!P;'S;=`#v<%lO!P~!UO!U~~!XS!Q![!e!c!i!e#T#Z!e#o#p#Z~!hR!Q![!q!c!i!q#T#Z!q~!tR!Q![!}!c!i!}#T#Z!}~#QR!Q![!P!c!i!P#T#Z!P~#^R!Q![#g!c!i#g#T#Z#g~#jS!Q![#g!c!i#g#T#Z#g#q#r!P~#yP;=`<%l!P~$RO(d~~",141,341),new ke("j~RQYZXz{^~^O(R~~aP!P!Qd~iO(S~~",25,324)],topRules:{Script:[0,7],SingleExpression:[1,277],SingleClassItem:[2,278]},dialects:{jsx:0,ts:15179},dynamicPrecedences:{80:1,82:1,94:1,170:1,200:1},specialized:[{term:328,get:t=>Lh[t]||-1},{term:344,get:t=>Eh[t]||-1},{term:95,get:t=>Wh[t]||-1}],tokenPrec:15205});var Oo=[L("function ${name}(${params}) {\n ${}\n}",{label:"function",detail:"definition",type:"keyword"}),L("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}",{label:"for",detail:"loop",type:"keyword"}),L("for (let ${name} of ${collection}) {\n ${}\n}",{label:"for",detail:"of loop",type:"keyword"}),L("do {\n ${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),L("while (${}) {\n ${}\n}",{label:"while",detail:"loop",type:"keyword"}),L(`try { \${} } catch (\${error}) { \${} @@ -15,84 +15,84 @@ import{$ as R,A as ve,B as X,C as Te,D as Ki,E as Yr,F as Ji,G as Cr,H as zr,I a constructor(\${params}) { \${} } -}`,{label:"class",detail:"definition",type:"keyword"}),L('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),L('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],Wh=lo.concat([L("interface ${name} {\n ${}\n}",{label:"interface",detail:"definition",type:"keyword"}),L("type ${name} = ${type}",{label:"type",detail:"definition",type:"keyword"}),L("enum ${name} {\n ${}\n}",{label:"enum",detail:"definition",type:"keyword"})]),so=new Et,Oo=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function wt(r){return(e,t)=>{let n=e.node.getChild("VariableDefinition");return n&&t(n,r),!0}}var Mh=["FunctionDeclaration"],Uh={FunctionDeclaration:wt("function"),ClassDeclaration:wt("class"),ClassExpression:()=>!0,EnumDeclaration:wt("constant"),TypeAliasDeclaration:wt("type"),NamespaceDeclaration:wt("namespace"),VariableDefinition(r,e){r.matchContext(Mh)||e(r,"variable")},TypeDefinition(r,e){e(r,"type")},__proto__:null};function co(r,e){let t=so.get(e);if(t)return t;let n=[],i=!0;function s(a,o){let l=r.sliceString(a.from,a.to);n.push({label:l,type:o})}return e.cursor(le.IncludeAnonymous).iterate(a=>{if(i)i=!1;else if(a.name){let o=Uh[a.name];if(o&&o(a,s)||Oo.has(a.name))return!1}else if(a.to-a.from>8192){for(let o of co(r,a.node))n.push(o);return!1}}),so.set(e,n),n}var ao=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,ho=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName","JSXText","JSXAttributeValue","JSXOpenTag","JSXCloseTag","JSXSelfClosingTag",".","?."];function Vh(r){let e=R(r.state).resolveInner(r.pos,-1);if(ho.indexOf(e.name)>-1)return null;let t=e.name=="VariableName"||e.to-e.from<20&&ao.test(r.state.sliceDoc(e.from,e.to));if(!t&&!r.explicit)return null;let n=[];for(let i=e;i;i=i.parent)Oo.has(i.name)&&(n=n.concat(co(r.state.doc,i)));return{options:n,from:t?e.from:r.pos,validFor:ao}}var te=Be.define({name:"javascript",parser:io.configure({props:[$e.add({IfStatement:Ne({except:/^\s*({|else\b)/}),TryStatement:Ne({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:ls,SwitchBody:r=>{let e=r.textAfter,t=/^\s*\}/.test(e),n=/^\s*(case|default)\b/.test(e);return r.baseIndent+(t?0:n?1:2)*r.unit},Block:os({closing:"}"}),ArrowFunction:r=>r.baseIndent+r.unit,"TemplateString BlockComment":()=>null,"Statement Property":Ne({except:/^\s*{/}),JSXElement(r){let e=/^\s*<\//.test(r.textAfter);return r.lineIndent(r.node.from)+(e?0:r.unit)},JSXEscape(r){let e=/\s*\}/.test(r.textAfter);return r.lineIndent(r.node.from)+(e?0:r.unit)},"JSXOpenTag JSXSelfClosingTag"(r){return r.column(r.node.from)+r.unit}}),he.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":Gt,BlockComment(r){return{from:r.from+2,to:r.to-2}},JSXElement(r){let e=r.firstChild;if(!e||e.name=="JSXSelfClosingTag")return null;let t=r.lastChild;return{from:e.to,to:t.type.isError?r.to:t.from}},"JSXSelfClosingTag JSXOpenTag"(r){var e;let t=(e=r.firstChild)===null||e===void 0?void 0:e.nextSibling,n=r.lastChild;return!t||t.type.isError?null:{from:t.to,to:n.type.isError?r.to:n.from}}})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),uo={test:r=>/^JSX/.test(r.name),facet:Ut({commentTokens:{block:{open:"{/*",close:"*/}"}}})},Bn=te.configure({dialect:"ts"},"typescript"),Nn=te.configure({dialect:"jsx",props:[qr.add(r=>r.isTop?[uo]:void 0)]}),Fn=te.configure({dialect:"jsx ts",props:[qr.add(r=>r.isTop?[uo]:void 0)]},"typescript"),po=r=>({label:r,type:"keyword"}),fo="break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ").map(po),Gh=fo.concat(["declare","implements","private","protected","public"].map(po));function mo(r={}){let e=r.jsx?r.typescript?Fn:Nn:r.typescript?Bn:te,t=r.typescript?Wh.concat(Gh):lo.concat(fo);return new ce(e,[te.data.of({autocomplete:ws(ho,Hr(t))}),te.data.of({autocomplete:Vh}),r.jsx?Bh:[]])}function Ih(r){for(;;){if(r.name=="JSXOpenTag"||r.name=="JSXSelfClosingTag"||r.name=="JSXFragmentTag")return r;if(r.name=="JSXEscape"||!r.parent)return null;r=r.parent}}function oo(r,e,t=r.length){for(let n=e?.firstChild;n;n=n.nextSibling)if(n.name=="JSXIdentifier"||n.name=="JSXBuiltin"||n.name=="JSXNamespacedName"||n.name=="JSXMemberExpression")return r.sliceString(n.from,Math.min(n.to,t));return""}var Dh=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),Bh=X.inputHandler.of((r,e,t,n,i)=>{if((Dh?r.composing:r.compositionStarted)||r.state.readOnly||e!=t||n!=">"&&n!="/"||!te.isActiveAt(r.state,e,-1))return!1;let s=i(),{state:a}=s,o=a.changeByRange(l=>{var O;let{head:c}=l,h=R(a).resolveInner(c-1,-1),p;if(h.name=="JSXStartTag"&&(h=h.parent),!(a.doc.sliceString(c-1,c)!=n||h.name=="JSXAttributeValue"&&h.to>c)){if(n==">"&&h.name=="JSXFragmentTag")return{range:l,changes:{from:c,insert:"</>"}};if(n=="/"&&h.name=="JSXStartCloseTag"){let u=h.parent,d=u.parent;if(d&&u.from==c-2&&((p=oo(a.doc,d.firstChild,c))||((O=d.firstChild)===null||O===void 0?void 0:O.name)=="JSXFragmentTag")){let m=`${p}>`;return{range:Z.cursor(c+m.length,-1),changes:{from:c,insert:m}}}}else if(n==">"){let u=Ih(h);if(u&&u.name=="JSXOpenTag"&&!/^\/?>|^<\//.test(a.doc.sliceString(c,c+2))&&(p=oo(a.doc,u,c)))return{range:l,changes:{from:c,insert:`</${p}>`}}}}return{range:l}});return o.changes.empty?!1:(r.dispatch([s,a.update(o,{userEvent:"input.complete",scrollIntoView:!0})]),!0)});var yt=["_blank","_self","_top","_parent"],Hn=["ascii","utf-8","utf-16","latin1","latin1"],Kn=["get","post","put","delete"],Jn=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],N=["true","false"],S={},Nh={a:{attrs:{href:null,ping:null,type:null,media:null,target:yt,hreflang:null}},abbr:S,address:S,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:null,hreflang:null,type:null,shape:["default","rect","circle","poly"]}},article:S,aside:S,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["autoplay"],loop:["loop"],controls:["controls"]}},b:S,base:{attrs:{href:null,target:yt}},bdi:S,bdo:S,blockquote:{attrs:{cite:null}},body:S,br:S,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["autofocus"],disabled:["autofocus"],formenctype:Jn,formmethod:Kn,formnovalidate:["novalidate"],formtarget:yt,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:S,center:S,cite:S,code:S,col:{attrs:{span:null}},colgroup:{attrs:{span:null}},command:{attrs:{type:["command","checkbox","radio"],label:null,icon:null,radiogroup:null,command:null,title:null,disabled:["disabled"],checked:["checked"]}},data:{attrs:{value:null}},datagrid:{attrs:{disabled:["disabled"],multiple:["multiple"]}},datalist:{attrs:{data:null}},dd:S,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["open"]}},dfn:S,div:S,dl:S,dt:S,em:S,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["disabled"],form:null,name:null}},figcaption:S,figure:S,footer:S,form:{attrs:{action:null,name:null,"accept-charset":Hn,autocomplete:["on","off"],enctype:Jn,method:Kn,novalidate:["novalidate"],target:yt}},h1:S,h2:S,h3:S,h4:S,h5:S,h6:S,head:{children:["title","base","link","style","meta","script","noscript","command"]},header:S,hgroup:S,hr:S,html:{attrs:{manifest:null}},i:S,iframe:{attrs:{src:null,srcdoc:null,name:null,width:null,height:null,sandbox:["allow-top-navigation","allow-same-origin","allow-forms","allow-scripts"],seamless:["seamless"]}},img:{attrs:{alt:null,src:null,ismap:null,usemap:null,width:null,height:null,crossorigin:["anonymous","use-credentials"]}},input:{attrs:{alt:null,dirname:null,form:null,formaction:null,height:null,list:null,max:null,maxlength:null,min:null,name:null,pattern:null,placeholder:null,size:null,src:null,step:null,value:null,width:null,accept:["audio/*","video/*","image/*"],autocomplete:["on","off"],autofocus:["autofocus"],checked:["checked"],disabled:["disabled"],formenctype:Jn,formmethod:Kn,formnovalidate:["novalidate"],formtarget:yt,multiple:["multiple"],readonly:["readonly"],required:["required"],type:["hidden","text","search","tel","url","email","password","datetime","date","month","week","time","datetime-local","number","range","color","checkbox","radio","file","submit","image","reset","button"]}},ins:{attrs:{cite:null,datetime:null}},kbd:S,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["autofocus"],disabled:["disabled"],keytype:["RSA"]}},label:{attrs:{for:null,form:null}},legend:S,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:null,media:null,sizes:["all","16x16","16x16 32x32","16x16 32x32 64x64"]}},map:{attrs:{name:null}},mark:S,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:Hn,name:["viewport","application-name","author","description","generator","keywords"],"http-equiv":["content-language","content-type","default-style","refresh"]}},meter:{attrs:{value:null,min:null,low:null,high:null,max:null,optimum:null}},nav:S,noscript:S,object:{attrs:{data:null,type:null,name:null,usemap:null,form:null,width:null,height:null,typemustmatch:["typemustmatch"]}},ol:{attrs:{reversed:["reversed"],start:null,type:["1","a","A","i","I"]},children:["li","script","template","ul","ol"]},optgroup:{attrs:{disabled:["disabled"],label:null}},option:{attrs:{disabled:["disabled"],label:null,selected:["selected"],value:null}},output:{attrs:{for:null,form:null,name:null}},p:S,param:{attrs:{name:null,value:null}},pre:S,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:S,rt:S,ruby:S,samp:S,script:{attrs:{type:["text/javascript"],src:null,async:["async"],defer:["defer"],charset:Hn}},section:S,select:{attrs:{form:null,name:null,size:null,autofocus:["autofocus"],disabled:["disabled"],multiple:["multiple"]}},slot:{attrs:{name:null}},small:S,source:{attrs:{src:null,type:null,media:null}},span:S,strong:S,style:{attrs:{type:["text/css"],media:null,scoped:null}},sub:S,summary:S,sup:S,table:S,tbody:S,td:{attrs:{colspan:null,rowspan:null,headers:null}},template:S,textarea:{attrs:{dirname:null,form:null,maxlength:null,name:null,placeholder:null,rows:null,cols:null,autofocus:["autofocus"],disabled:["disabled"],readonly:["readonly"],required:["required"],wrap:["soft","hard"]}},tfoot:S,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:["row","col","rowgroup","colgroup"]}},thead:S,time:{attrs:{datetime:null}},title:S,tr:S,track:{attrs:{src:null,label:null,default:null,kind:["subtitles","captions","descriptions","chapters","metadata"],srclang:null}},ul:{children:["li","script","template","ul","ol"]},var:S,video:{attrs:{src:null,poster:null,width:null,height:null,crossorigin:["anonymous","use-credentials"],preload:["auto","metadata","none"],autoplay:["autoplay"],mediagroup:["movie"],muted:["muted"],controls:["controls"]}},wbr:S},bo={accesskey:null,class:null,contenteditable:N,contextmenu:null,dir:["ltr","rtl","auto"],draggable:["true","false","auto"],dropzone:["copy","move","link","string:","file:"],hidden:["hidden"],id:null,inert:["inert"],itemid:null,itemprop:null,itemref:null,itemscope:["itemscope"],itemtype:null,lang:["ar","bn","de","en-GB","en-US","es","fr","hi","id","ja","pa","pt","ru","tr","zh"],spellcheck:N,autocorrect:N,autocapitalize:N,style:null,tabindex:null,title:null,translate:["yes","no"],rel:["stylesheet","alternate","author","bookmark","help","license","next","nofollow","noreferrer","prefetch","prev","search","tag"],role:"alert application article banner button cell checkbox complementary contentinfo dialog document feed figure form grid gridcell heading img list listbox listitem main navigation region row rowgroup search switch tab table tabpanel textbox timer".split(" "),"aria-activedescendant":null,"aria-atomic":N,"aria-autocomplete":["inline","list","both","none"],"aria-busy":N,"aria-checked":["true","false","mixed","undefined"],"aria-controls":null,"aria-describedby":null,"aria-disabled":N,"aria-dropeffect":null,"aria-expanded":["true","false","undefined"],"aria-flowto":null,"aria-grabbed":["true","false","undefined"],"aria-haspopup":N,"aria-hidden":N,"aria-invalid":["true","false","grammar","spelling"],"aria-label":null,"aria-labelledby":null,"aria-level":null,"aria-live":["off","polite","assertive"],"aria-multiline":N,"aria-multiselectable":N,"aria-owns":null,"aria-posinset":null,"aria-pressed":["true","false","mixed","undefined"],"aria-readonly":N,"aria-relevant":null,"aria-required":N,"aria-selected":["true","false","undefined"],"aria-setsize":null,"aria-sort":["ascending","descending","none","other"],"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null},So="beforeunload copy cut dragstart dragover dragleave dragenter dragend drag paste focus blur change click load mousedown mouseenter mouseleave mouseup keydown keyup resize scroll unload".split(" ").map(r=>"on"+r);for(let r of So)bo[r]=null;var qe=class{constructor(e,t){this.tags={...Nh,...e},this.globalAttrs={...bo,...t},this.allTags=Object.keys(this.tags),this.globalAttrNames=Object.keys(this.globalAttrs)}};qe.default=new qe;function Ae(r,e,t=r.length){if(!e)return"";let n=e.firstChild,i=n&&n.getChild("TagName");return i?r.sliceString(i.from,Math.min(i.to,t)):""}function tt(r,e=!1){for(;r;r=r.parent)if(r.name=="Element")if(e)e=!1;else return r;return null}function ko(r,e,t){let n=t.tags[Ae(r,tt(e))];return n?.children||t.allTags}function ei(r,e){let t=[];for(let n=tt(e);n&&!n.type.isTop;n=tt(n.parent)){let i=Ae(r,n);if(i&&n.lastChild.name=="CloseTag")break;i&&t.indexOf(i)<0&&(e.name=="EndTag"||e.from>=n.firstChild.to)&&t.push(i)}return t}var Po=/^[:\-\.\w\u00b7-\uffff]*$/;function go(r,e,t,n,i){let s=/\s*>/.test(r.sliceDoc(i,i+5))?"":">",a=tt(t,t.name=="StartTag"||t.name=="TagName");return{from:n,to:i,options:ko(r.doc,a,e).map(o=>({label:o,type:"type"})).concat(ei(r.doc,t).map((o,l)=>({label:"/"+o,apply:"/"+o+s,type:"type",boost:99-l}))),validFor:/^\/?[:\-\.\w\u00b7-\uffff]*$/}}function Qo(r,e,t,n){let i=/\s*>/.test(r.sliceDoc(n,n+5))?"":">";return{from:t,to:n,options:ei(r.doc,e).map((s,a)=>({label:s,apply:s+i,type:"type",boost:99-a})),validFor:Po}}function Fh(r,e,t,n){let i=[],s=0;for(let a of ko(r.doc,t,e))i.push({label:"<"+a,type:"type"});for(let a of ei(r.doc,t))i.push({label:"</"+a+">",type:"type",boost:99-s++});return{from:n,to:n,options:i,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}function Hh(r,e,t,n,i){let s=tt(t),a=s?e.tags[Ae(r.doc,s)]:null,o=a&&a.attrs?Object.keys(a.attrs):[],l=a&&a.globalAttrs===!1?o:o.length?o.concat(e.globalAttrNames):e.globalAttrNames;return{from:n,to:i,options:l.map(O=>({label:O,type:"property"})),validFor:Po}}function Kh(r,e,t,n,i){var s;let a=(s=t.parent)===null||s===void 0?void 0:s.getChild("AttributeName"),o=[],l;if(a){let O=r.sliceDoc(a.from,a.to),c=e.globalAttrs[O];if(!c){let h=tt(t),p=h?e.tags[Ae(r.doc,h)]:null;c=p?.attrs&&p.attrs[O]}if(c){let h=r.sliceDoc(n,i).toLowerCase(),p='"',u='"';/^['"]/.test(h)?(l=h[0]=='"'?/^[^"]*$/:/^[^']*$/,p="",u=r.sliceDoc(i,i+1)==h[0]?"":h[0],h=h.slice(1),n++):l=/^[^\s<>='"]*$/;for(let d of c)o.push({label:d,apply:p+d+u,type:"constant"})}}return{from:n,to:i,options:o,validFor:l}}function xo(r,e){let{state:t,pos:n}=e,i=R(t).resolveInner(n,-1),s=i.resolve(n);for(let a=n,o;s==i&&(o=i.childBefore(a));){let l=o.lastChild;if(!l||!l.type.isError||l.from<l.to)break;s=i=o,a=l.from}return i.name=="TagName"?i.parent&&/CloseTag$/.test(i.parent.name)?Qo(t,i,i.from,n):go(t,r,i,i.from,n):i.name=="StartTag"||i.name=="IncompleteTag"?go(t,r,i,n,n):i.name=="StartCloseTag"||i.name=="IncompleteCloseTag"?Qo(t,i,n,n):i.name=="OpenTag"||i.name=="SelfClosingTag"||i.name=="AttributeName"?Hh(t,r,i,i.name=="AttributeName"?i.from:n,n):i.name=="Is"||i.name=="AttributeValue"||i.name=="UnquotedAttributeValue"?Kh(t,r,i,i.name=="Is"?n:i.from,n):e.explicit&&(s.name=="Element"||s.name=="Text"||s.name=="Document")?Fh(t,r,i,n):null}function wo(r){return xo(qe.default,r)}function Jh(r){let{extraTags:e,extraGlobalAttributes:t}=r,n=t||e?new qe(e,t):qe.default;return i=>xo(n,i)}var eu=te.parser.configure({top:"SingleExpression"}),yo=[{tag:"script",attrs:r=>r.type=="text/typescript"||r.lang=="ts",parser:Bn.parser},{tag:"script",attrs:r=>r.type=="text/babel"||r.type=="text/jsx",parser:Nn.parser},{tag:"script",attrs:r=>r.type=="text/typescript-jsx",parser:Fn.parser},{tag:"script",attrs(r){return/^(importmap|speculationrules|application\/(.+\+)?json)$/i.test(r.type)},parser:eu},{tag:"script",attrs(r){return!r.type||/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(r.type)},parser:te.parser},{tag:"style",attrs(r){return(!r.lang||r.lang=="css")&&(!r.type||/^(text\/)?(x-)?(stylesheet|css)$/i.test(r.type))},parser:xt.parser}],Zo=[{name:"style",parser:xt.parser.configure({top:"Styles"})}].concat(So.map(r=>({name:r,parser:te.parser}))),Xo=Be.define({name:"html",parser:Wa.configure({props:[$e.add({Element(r){let e=/^(\s*)(<\/)?/.exec(r.textAfter);return r.node.to<=r.pos+e[0].length?r.continue():r.lineIndent(r.node.from)+(e[2]?0:r.unit)},"OpenTag CloseTag SelfClosingTag"(r){return r.column(r.node.from)+r.unit},Document(r){if(r.pos+/\s*/.exec(r.textAfter)[0].length<r.node.to)return r.continue();let e=null,t;for(let n=r.node;;){let i=n.lastChild;if(!i||i.name!="Element"||i.to!=n.to)break;e=n=i}return e&&!((t=e.lastChild)&&(t.name=="CloseTag"||t.name=="SelfClosingTag"))?r.lineIndent(e.from)+r.unit:null}}),he.add({Element(r){let e=r.firstChild,t=r.lastChild;return!e||e.name!="OpenTag"?null:{from:e.to,to:t.name=="CloseTag"?t.from:r.to}}}),us.add({"OpenTag CloseTag":r=>r.getChild("TagName")})]}),languageData:{commentTokens:{block:{open:"<!--",close:"-->"}},indentOnInput:/^\s*<\/\w+\W$/,wordChars:"-_"}}),lr=Xo.configure({wrap:Wn(yo,Zo)});function vo(r={}){let e="",t;r.matchClosingTags===!1&&(e="noMatch"),r.selfClosingTags===!0&&(e=(e?e+" ":"")+"selfClosing"),(r.nestedLanguages&&r.nestedLanguages.length||r.nestedAttributes&&r.nestedAttributes.length)&&(t=Wn((r.nestedLanguages||[]).concat(yo),(r.nestedAttributes||[]).concat(Zo)));let n=t?Xo.configure({wrap:t,dialect:e}):e?lr.configure({dialect:e}):lr;return new ce(n,[lr.data.of({autocomplete:Jh(r)}),r.autoCloseTags!==!1?ru:[],mo().support,to().support])}var $o=new Set("area base br col command embed frame hr img input keygen link meta param source track wbr menuitem".split(" "));function tu(r,e,t){for(var n;;){if(((n=e.lastChild)===null||n===void 0?void 0:n.name)!="CloseTag")return!1;let i=e.parent;if(!i||Ae(r,i)!=t)return!0;e=i}}var ru=X.inputHandler.of((r,e,t,n,i)=>{if(r.composing||r.state.readOnly||e!=t||n!=">"&&n!="/"||!lr.isActiveAt(r.state,e,-1))return!1;let s=i(),{state:a}=s,o=a.changeByRange(l=>{var O;let c=a.doc.sliceString(l.from-1,l.to)==n,{head:h}=l,p=R(a).resolveInner(h,-1),u;if(c&&n==">"&&p.name=="EndTag"){let d=p.parent;if((u=Ae(a.doc,d.parent,h))&&!$o.has(u)&&!tu(a.doc,d.parent,u)){let m=h+(a.doc.sliceString(h,h+1)===">"?1:0),g=`</${u}>`;return{range:l,changes:{from:h,to:m,insert:g}}}}else if(c&&n=="/"&&p.name=="IncompleteCloseTag"){let d=p.parent;if(p.from==h-2&&((O=d.lastChild)===null||O===void 0?void 0:O.name)!="CloseTag"&&(u=Ae(a.doc,d,h))&&!$o.has(u)){let m=h+(a.doc.sliceString(h,h+1)===">"?1:0),g=`${u}>`;return{range:Z.cursor(h+g.length,-1),changes:{from:h,to:m,insert:g}}}}return{range:l}});return o.changes.empty?!1:(r.dispatch([s,a.update(o,{userEvent:"input.complete",scrollIntoView:!0})]),!0)});var jo=Ut({commentTokens:{block:{open:"<!--",close:"-->"}}}),_o=new K,Yo=ha.configure({props:[he.add(r=>!r.is("Block")||r.is("Document")||ni(r)!=null||nu(r)?void 0:(e,t)=>({from:t.doc.lineAt(e.from).to,to:e.to})),_o.add(ni),$e.add({Document:()=>null}),is.add({Document:jo})]});function ni(r){let e=/^(?:ATX|Setext)Heading(\d)$/.exec(r.name);return e?+e[1]:void 0}function nu(r){return r.name=="OrderedList"||r.name=="BulletList"}function iu(r,e){let t=r;for(;;){let n=t.nextSibling,i;if(!n||(i=ni(n.type))!=null&&i<=e)break;t=n}return t.to}var su=Os.of((r,e,t)=>{for(let n=R(r).resolveInner(t,-1);n&&!(n.from<e);n=n.parent){let i=n.type.prop(_o);if(i==null)continue;let s=iu(n,i);if(s>t)return{from:t,to:s}}return null});function ii(r){return new ss(jo,r,[],"markdown")}var au=ii(Yo),ou=Yo.configure([fa,ga,ma,Qa,{props:[he.add({Table:(r,e)=>({from:e.doc.lineAt(r.from).to,to:r.to})})]}]),rt=ii(ou);function lu(r,e){return t=>{if(t&&r){let n=null;if(t=/\S*/.exec(t)[0],typeof r=="function"?n=r(t):n=Ar.matchLanguageName(r,t,!0),n instanceof Ar)return n.support?n.support.language.parser:as.getSkippingParser(n.load());if(n)return n.parser}return e?e.parser:null}}var Zt=class{constructor(e,t,n,i,s,a,o){this.node=e,this.from=t,this.to=n,this.spaceBefore=i,this.spaceAfter=s,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}else{for(let i=this.to-this.from-n.length-this.spaceAfter.length;i>0;i--)n+=" ";return n+(t?this.spaceAfter:"")}}marker(e,t){let n=this.node.name=="OrderedList"?String(+zo(this.item,e)[2]+t):"";return this.spaceBefore+n+this.type+this.spaceAfter}};function Co(r,e){let t=[],n=[];for(let i=r;i;i=i.parent){if(i.name=="FencedCode")return n;(i.name=="ListItem"||i.name=="Blockquote")&&t.push(i)}for(let i=t.length-1;i>=0;i--){let s=t[i],a,o=e.lineAt(s.from),l=s.from-o.from;if(s.name=="Blockquote"&&(a=/^ *>( ?)/.exec(o.text.slice(l))))n.push(new Zt(s,l,l+a[0].length,"",a[1],">",null));else if(s.name=="ListItem"&&s.parent.name=="OrderedList"&&(a=/^( *)\d+([.)])( *)/.exec(o.text.slice(l)))){let O=a[3],c=a[0].length;O.length>=4&&(O=O.slice(0,O.length-4),c-=4),n.push(new Zt(s.parent,l,l+c,a[1],O,a[2],s))}else if(s.name=="ListItem"&&s.parent.name=="BulletList"&&(a=/^( *)([-+*])( {1,4}\[[ xX]\])?( +)/.exec(o.text.slice(l)))){let O=a[4],c=a[0].length;O.length>4&&(O=O.slice(0,O.length-4),c-=4);let h=a[2];a[3]&&(h+=a[3].replace(/[xX]/," ")),n.push(new Zt(s.parent,l,l+c,a[1],O,h,s))}}return n}function zo(r,e){return/^(\s*)(\d+)(?=[.)])/.exec(e.sliceString(r.from,r.from+10))}function ti(r,e,t,n=0){for(let i=-1,s=r;;){if(s.name=="ListItem"){let o=zo(s,e),l=+o[2];if(i>=0){if(l!=i+1)return;t.push({from:s.from+o[1].length,to:s.from+o[0].length,insert:String(i+2+n)})}i=l}let a=s.nextSibling;if(!a)break;s=a}}function si(r,e){let t=/^[ \t]*/.exec(r)[0].length;if(!t||e.facet(Vt)!=" ")return r;let n=De(r,4,t),i="";for(let s=n;s>0;)s>=4?(i+=" ",s-=4):(i+=" ",s--);return i+r.slice(t)}var Ou=(r={})=>({state:e,dispatch:t})=>{let n=R(e),{doc:i}=e,s=null,a=e.changeByRange(o=>{if(!o.empty||!rt.isActiveAt(e,o.from,-1)&&!rt.isActiveAt(e,o.from,1))return s={range:o};let l=o.from,O=i.lineAt(l),c=Co(n.resolveInner(l,-1),i);for(;c.length&&c[c.length-1].from>l-O.from;)c.pop();if(!c.length)return s={range:o};let h=c[c.length-1];if(h.to-h.spaceAfter.length>l-O.from)return s={range:o};let p=l>=h.to-h.spaceAfter.length&&!/\S/.test(O.text.slice(h.to));if(h.item&&p){if(h.item.from<O.from&&!/^[\s>]*$/.test(O.text.slice(0,h.to)))return s={range:o};let b=h.node.firstChild,Q=h.node.getChild("ListItem","ListItem");if(b.to>=l||Q&&Q.to<l||O.from>0&&!/[^\s>]/.test(i.lineAt(O.from-1).text)||r.nonTightLists===!1){let k=c.length>1?c[c.length-2]:null,y,w="";k&&k.item?(y=O.from+k.from,w=k.marker(i,1)):y=O.from+(k?k.to:0);let _=[{from:y,to:l,insert:w}];return h.node.name=="OrderedList"&&ti(h.item,i,_,-2),k&&k.node.name=="OrderedList"&&ti(k.item,i,_),{range:Z.cursor(y+w.length),changes:_}}else{let k=Ro(c,e,O);return{range:Z.cursor(l+k.length+1),changes:{from:O.from,insert:k+e.lineBreak}}}}if(h.node.name=="Blockquote"&&p&&O.from){let b=i.lineAt(O.from-1),Q=/>\s*$/.exec(b.text);if(Q&&Q.index==h.from){let k=e.changes([{from:b.from+Q.index,to:b.to},{from:O.from+h.from,to:O.to}]);return{range:o.map(k),changes:k}}}let u=[];h.node.name=="OrderedList"&&ti(h.item,i,u);let d=h.item&&h.item.from<O.from,m="";if(!d||/^[\s\d.)\-+*>]*/.exec(O.text)[0].length>=h.to)for(let b=0,Q=c.length-1;b<=Q;b++)m+=b==Q&&!d?c[b].marker(i,1):c[b].blank(b<Q?De(O.text,4,c[b+1].from)-m.length:null);let g=l;for(;g>O.from&&/\s/.test(O.text.charAt(g-O.from-1));)g--;return m=si(m,e),hu(h.node,e.doc)&&(m=Ro(c,e,O)+e.lineBreak+m),u.push({from:g,to:l,insert:e.lineBreak+m}),{range:Z.cursor(g+m.length+1),changes:u}});return s?!1:(t(e.update(a,{scrollIntoView:!0,userEvent:"input"})),!0)},cu=Ou();function To(r){return r.name=="QuoteMark"||r.name=="ListMark"}function hu(r,e){if(r.name!="OrderedList"&&r.name!="BulletList")return!1;let t=r.firstChild,n=r.getChild("ListItem","ListItem");if(!n)return!1;let i=e.lineAt(t.to),s=e.lineAt(n.from),a=/^[\s>]*$/.test(i.text);return i.number+(a?0:1)<s.number}function Ro(r,e,t){let n="";for(let i=0,s=r.length-2;i<=s;i++)n+=r[i].blank(i<s?De(t.text,4,r[i+1].from)-n.length:null,i<s);return si(n,e)}function uu(r,e){let t=r.resolveInner(e,-1),n=e;To(t)&&(n=t.from,t=t.parent);for(let i;i=t.childBefore(n);)if(To(i))n=i.from;else if(i.name=="OrderedList"||i.name=="BulletList")t=i.lastChild,n=t.to;else break;return t}var pu=({state:r,dispatch:e})=>{let t=R(r),n=null,i=r.changeByRange(s=>{let a=s.from,{doc:o}=r;if(s.empty&&rt.isActiveAt(r,s.from)){let l=o.lineAt(a),O=Co(uu(t,a),o);if(O.length){let c=O[O.length-1],h=c.to-c.spaceAfter.length+(c.spaceAfter?1:0);if(a-l.from>h&&!/\S/.test(l.text.slice(h,a-l.from)))return{range:Z.cursor(l.from+h),changes:{from:l.from+h,to:a}};if(a-l.from==h&&(c.item&&l.from<=c.item.from||/^[\s>]*$/.test(l.text.slice(0,c.to)))){let p=l.from+c.from;if(c.item&&c.node.from<c.item.from&&/\S/.test(l.text.slice(c.from,c.to))){let u=c.blank(De(l.text,4,c.to)-De(l.text,4,c.from));return p==l.from&&(u=si(u,r)),{range:Z.cursor(p+u.length),changes:{from:p,to:l.from+c.to,insert:u}}}if(p<a)return{range:Z.cursor(p),changes:{from:p,to:a}}}}}return n={range:s}});return n?!1:(e(r.update(i,{scrollIntoView:!0,userEvent:"delete"})),!0)},fu=[{key:"Enter",run:cu},{key:"Backspace",run:pu}],qo=vo({matchClosingTags:!1});function Ao(r={}){let{codeLanguages:e,defaultCodeLanguage:t,addKeymap:n=!0,base:{parser:i}=au,completeHTMLTags:s=!0,pasteURLAsLink:a=!0,htmlTagLanguage:o=qo}=r;if(!(i instanceof bt))throw new RangeError("Base parser provided to `markdown` should be a Markdown parser");let l=r.extensions?[r.extensions]:[],O=[o.support,su],c;a&&O.push(Qu),t instanceof ce?(O.push(t.support),c=t.language):t&&(c=t);let h=e||c?lu(e,c):void 0;l.push(ua({codeParser:h,htmlParser:o.language.parser})),n&&O.push(ge.high(Te.of(fu)));let p=ii(i.configure(l));return s&&O.push(p.data.of({autocomplete:du})),new ce(p,O)}function du(r){let{state:e,pos:t}=r,n=/<[:\-\.\w\u00b7-\uffff]*$/.exec(e.sliceDoc(t-25,t));if(!n)return null;let i=R(e).resolveInner(t,-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:t-n[0].length,to:t,options:mu(),validFor:/^<[:\-\.\w\u00b7-\uffff]*$/}}var ri=null;function mu(){if(ri)return ri;let r=wo(new Fe(Qe.create({extensions:qo}),0,!0));return ri=r?r.options:[]}var gu=/code|horizontalrule|html|link|comment|processing|escape|entity|image|mark|url/i,Qu=X.domEventHandlers({paste:(r,e)=>{var t;let{main:n}=e.state.selection;if(n.empty)return!1;let i=(t=r.clipboardData)===null||t===void 0?void 0:t.getData("text/plain");if(!i||!/^(https?:\/\/|mailto:|xmpp:|www\.)/.test(i)||(/^www\./.test(i)&&(i="https://"+i),!rt.isActiveAt(e.state,n.from,1)))return!1;let s=R(e.state),a=!1;return s.iterate({from:n.from,to:n.to,enter:o=>{(o.from>n.from||gu.test(o.name))&&(a=!0)},leave:o=>{o.to<n.to&&(a=!0)}}),a?!1:(e.dispatch({changes:[{from:n.from,insert:"["},{from:n.to,insert:`](${i})`}],userEvent:"input.paste",scrollIntoView:!0}),!0)}});var Lo=typeof String.prototype.normalize=="function"?r=>r.normalize("NFKD"):r=>r,we=class{constructor(e,t,n=0,i=e.length,s,a){this.test=a,this.value={from:0,to:0,precise:!1},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(n,i),this.bufferStart=n,this.normalize=s?o=>s(Lo(o)):Lo,this.query=this.normalize(t)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return W(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let t=ct(e),n=this.bufferStart+this.bufferPos;this.bufferPos+=J(e);let i=this.normalize(t);if(i.length)for(let s=0,a=n,o=!0;;s++){let l=i.charCodeAt(s),O=this.match(l,a,o,this.bufferPos+this.bufferStart,s==i.length-1);if(O)return this.value=O,this;if(s==i.length-1)break;o&&s<t.length&&t.charCodeAt(s)==l?a++:o=!1}}}match(e,t,n,i,s){let a=null;for(let o=0;o<this.matches.length;){let l=this.matches[o],O=!1;this.query.charCodeAt(l.index)==e&&(l.index==this.query.length-1?a={from:l.from,to:i,precise:s&&l.precise}:(l.index++,O=!0)),O?o++:this.matches.splice(o,1)}return this.query.charCodeAt(0)==e&&(this.query.length==1?a={from:t,to:i,precise:n&&s}:this.matches.push({from:t,index:1,precise:n})),a&&this.test&&!this.test(a.from,a.to,this.buffer,this.bufferStart)&&(a=null),a}};typeof Symbol<"u"&&(we.prototype[Symbol.iterator]=function(){return this});var Mo={from:-1,to:-1,match:/.*/.exec(""),precise:!0},ui="gm"+(/x/.unicode==null?"":"u"),hr=class{constructor(e,t,n,i=0,s=e.length){if(this.text=e,this.to=s,this.curLine="",this.done=!1,this.value=Mo,/\\[sWDnr]|\n|\r|\[\^/.test(t))return new pr(e,t,n,i,s);this.re=new RegExp(t,ui+(n?.ignoreCase?"i":"")),this.test=n?.test,this.iter=e.iter();let a=e.lineAt(i);this.curLineStart=a.from,this.matchPos=fr(e,i),this.getLine(this.curLineStart)}getLine(e){this.iter.next(e),this.iter.lineBreak?this.curLine="":(this.curLine=this.iter.value,this.curLineStart+this.curLine.length>this.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let t=this.matchPos<=this.to&&this.re.exec(this.curLine);if(t){let n=this.curLineStart+t.index,i=n+t[0].length;if(this.matchPos=fr(this.text,i+(n==i?1:0)),n==this.curLineStart+this.curLine.length&&this.nextLine(),(n<i||n>this.value.to)&&(!this.test||this.test(n,i,t)))return this.value={from:n,to:i,precise:!0,match:t},this;e=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length<this.to)this.nextLine(),e=0;else return this.done=!0,this}}},ai=new WeakMap,ur=class r{constructor(e,t){this.from=e,this.text=t}get to(){return this.from+this.text.length}static get(e,t,n){let i=ai.get(e);if(!i||i.from>=n||i.to<=t){let o=new r(t,e.sliceString(t,n));return ai.set(e,o),o}if(i.from==t&&i.to==n)return i;let{text:s,from:a}=i;return a>t&&(s=e.sliceString(t,a)+s,a=t),i.to<n&&(s+=e.sliceString(i.to,n)),ai.set(e,new r(a,s)),new r(t,s.slice(t-a,n-a))}},pr=class{constructor(e,t,n,i,s){this.text=e,this.to=s,this.done=!1,this.value=Mo,this.matchPos=fr(e,i),this.re=new RegExp(t,ui+(n?.ignoreCase?"i":"")),this.test=n?.test,this.flat=ur.get(e,i,this.chunkEnd(i+5e3))}chunkEnd(e){return e>=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,t=this.re.exec(this.flat.text);if(t&&!t[0]&&t.index==e&&(this.re.lastIndex=e+1,t=this.re.exec(this.flat.text)),t){let n=this.flat.from+t.index,i=n+t[0].length;if((this.flat.to>=this.to||t.index+t[0].length<=this.flat.text.length-10)&&(!this.test||this.test(n,i,t)))return this.value={from:n,to:i,precise:!0,match:t},this.matchPos=fr(this.text,i+(n==i?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=ur.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}};typeof Symbol<"u"&&(hr.prototype[Symbol.iterator]=pr.prototype[Symbol.iterator]=function(){return this});function $u(r){try{return new RegExp(r,ui),!0}catch{return!1}}function fr(r,e){if(e>=r.length)return e;let t=r.lineAt(e),n;for(;e<t.to&&(n=t.text.charCodeAt(e-t.from))>=56320&&n<57344;)e++;return e}var bu=r=>{let e=rs(r,"cm-goto-line");if(e){let a=e.dom.querySelector("input[type=text]");return a&&a.select(),!0}let{state:t}=r,n=String(t.doc.lineAt(r.state.selection.main.head).number),{close:i,result:s}=ts(r,{class:"cm-goto-line",label:t.phrase("Go to line"),input:{type:"text",name:"line",value:n},focus:!0,submitLabel:t.phrase("go")});return s.then(a=>{let o=a&&/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(a.elements.line.value);if(!o){r.dispatch({effects:i});return}let l=t.doc.lineAt(t.selection.main.head),[,O,c,h,p]=o,u=h?+h.slice(1):0,d=c?+c:l.number;if(c&&p){let b=d/100;O&&(b=b*(O=="-"?-1:1)+l.number/t.doc.lines),d=Math.round(t.doc.lines*b)}else c&&O&&(d=d*(O=="-"?-1:1)+l.number);let m=t.doc.line(Math.max(1,Math.min(t.doc.lines,d))),g=Z.cursor(m.from+Math.max(0,Math.min(u,m.length)));r.dispatch({effects:[i,X.scrollIntoView(g.from,{y:"center"})],selection:g})}),!0},Su={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},Uo=Ie.define({combine(r){return ht(r,Su,{highlightWordAroundCursor:(e,t)=>e||t,minSelectionLength:Math.min,maxMatches:Math.min})}});function Vo(r){let e=[yu,wu];return r&&e.push(Uo.of(r)),e}var ku=v.mark({class:"cm-selectionMatch"}),Pu=v.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function Eo(r,e,t,n){return(t==0||r(e.sliceDoc(t-1,t))!=A.Word)&&(n==e.doc.length||r(e.sliceDoc(n,n+1))!=A.Word)}function xu(r,e,t,n){return r(e.sliceDoc(t,t+1))==A.Word&&r(e.sliceDoc(n-1,n))==A.Word}var wu=ve.fromClass(class{constructor(r){this.decorations=this.getDeco(r)}update(r){(r.selectionSet||r.docChanged||r.viewportChanged)&&(this.decorations=this.getDeco(r.view))}getDeco(r){let e=r.state.facet(Uo),{state:t}=r,n=t.selection;if(n.ranges.length>1)return v.none;let i=n.main,s,a=null;if(i.empty){if(!e.highlightWordAroundCursor)return v.none;let l=t.wordAt(i.head);if(!l)return v.none;a=t.charCategorizer(i.head),s=t.sliceDoc(l.from,l.to)}else{let l=i.to-i.from;if(l<e.minSelectionLength||l>200)return v.none;if(e.wholeWords){if(s=t.sliceDoc(i.from,i.to),a=t.charCategorizer(i.head),!(Eo(a,t,i.from,i.to)&&xu(a,t,i.from,i.to)))return v.none}else if(s=t.sliceDoc(i.from,i.to),!s)return v.none}let o=[];for(let l of r.visibleRanges){let O=new we(t.doc,s,l.from,l.to);for(;!O.next().done;){let{from:c,to:h}=O.value;if((!a||Eo(a,t,c,h))&&(i.empty&&c<=i.from&&h>=i.to?o.push(Pu.range(c,h)):(c>=i.to||h<=i.from)&&o.push(ku.range(c,h)),o.length>e.maxMatches))return v.none}}return v.set(o)}},{decorations:r=>r.decorations}),yu=X.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),Zu=({state:r,dispatch:e})=>{let{selection:t}=r,n=Z.create(t.ranges.map(i=>r.wordAt(i.head)||Z.cursor(i.head)),t.mainIndex);return n.eq(t)?!1:(e(r.update({selection:n})),!0)};function Xu(r,e){let{main:t,ranges:n}=r.selection,i=r.wordAt(t.head),s=i&&i.from==t.from&&i.to==t.to;for(let a=!1,o=new we(r.doc,e,n[n.length-1].to);;)if(o.next(),o.done){if(a)return null;o=new we(r.doc,e,0,Math.max(0,n[n.length-1].from-1)),a=!0}else{if(a&&n.some(l=>l.from==o.value.from))continue;if(s){let l=r.wordAt(o.value.from);if(!l||l.from!=o.value.from||l.to!=o.value.to)continue}return o.value}}var vu=({state:r,dispatch:e})=>{let{ranges:t}=r.selection;if(t.some(s=>s.from===s.to))return Zu({state:r,dispatch:e});let n=r.sliceDoc(t[0].from,t[0].to);if(r.selection.ranges.some(s=>r.sliceDoc(s.from,s.to)!=n))return!1;let i=Xu(r,n);return i?(e(r.update({selection:r.selection.addRange(Z.range(i.from,i.to),!1),effects:X.scrollIntoView(i.to)})),!0):!1},Le=Ie.define({combine(r){return ht(r,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new ci(e),scrollToMatch:e=>X.scrollIntoView(e)})}});function Go(r){return r?[Le.of(r),hi]:hi}var dr=class{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||"",this.valid=!!this.search&&(!this.regexp||$u(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord,this.test=e.test}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(t,n)=>n=="n"?` -`:n=="r"?"\r":n=="t"?" ":"\\")}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord&&this.test==e.test}create(){return this.regexp?new li(this):new oi(this)}getCursor(e,t=0,n){let i=e.doc?e:Qe.create({doc:e});return n==null&&(n=i.doc.length),this.regexp?it(this,i,t,n):nt(this,i,t,n)}},mr=class{constructor(e){this.spec=e}};function Tu(r,e,t){return(n,i,s,a)=>{if(t&&!t(n,i,s,a))return!1;let o=n>=a&&i<=a+s.length?s.slice(n-a,i-a):e.doc.sliceString(n,i);return r(o,e,n,i)}}function nt(r,e,t,n){let i;return r.wholeWord&&(i=Ru(e.doc,e.charCategorizer(e.selection.main.head))),r.test&&(i=Tu(r.test,e,i)),new we(e.doc,r.unquoted,t,n,r.caseSensitive?void 0:s=>s.toLowerCase(),i)}function Ru(r,e){return(t,n,i,s)=>((s>t||s+i.length<n)&&(s=Math.max(0,t-2),i=r.sliceString(s,Math.min(r.length,n+2))),(e(gr(i,t-s))!=A.Word||e(Qr(i,t-s))!=A.Word)&&(e(Qr(i,n-s))!=A.Word||e(gr(i,n-s))!=A.Word))}var oi=class extends mr{constructor(e){super(e)}nextMatch(e,t,n){let i=nt(this.spec,e,n,e.doc.length).nextOverlapping();if(i.done){let s=Math.min(e.doc.length,t+this.spec.unquoted.length);i=nt(this.spec,e,0,s).nextOverlapping()}return i.done||i.value.from==t&&i.value.to==n?null:i.value}prevMatchInRange(e,t,n){for(let i=n;;){let s=Math.max(t,i-1e4-this.spec.unquoted.length),a=nt(this.spec,e,s,i),o=null;for(;!a.nextOverlapping().done;)o=a.value;if(o)return o;if(s==t)return null;i-=1e4}}prevMatch(e,t,n){let i=this.prevMatchInRange(e,0,t);return i||(i=this.prevMatchInRange(e,Math.max(0,n-this.spec.unquoted.length),e.doc.length)),i&&(i.from!=t||i.to!=n)?i:null}getReplacement(e){return this.spec.unquote(this.spec.replace)}matchAll(e,t){let n=nt(this.spec,e,0,e.doc.length),i=[];for(;!n.next().done;){if(i.length>=t)return null;i.push(n.value)}return i}highlight(e,t,n,i){let s=nt(this.spec,e,Math.max(0,t-this.spec.unquoted.length),Math.min(n+this.spec.unquoted.length,e.doc.length));for(;!s.next().done;)i(s.value.from,s.value.to)}};function ju(r,e,t){return(n,i,s)=>(!t||t(n,i,s))&&r(s[0],e,n,i)}function it(r,e,t,n){let i;return r.wholeWord&&(i=_u(e.charCategorizer(e.selection.main.head))),r.test&&(i=ju(r.test,e,i)),new hr(e.doc,r.search,{ignoreCase:!r.caseSensitive,test:i},t,n)}function gr(r,e){return r.slice(jr(r,e,!1),e)}function Qr(r,e){return r.slice(e,jr(r,e))}function _u(r){return(e,t,n)=>!n[0].length||(r(gr(n.input,n.index))!=A.Word||r(Qr(n.input,n.index))!=A.Word)&&(r(Qr(n.input,n.index+n[0].length))!=A.Word||r(gr(n.input,n.index+n[0].length))!=A.Word)}var li=class extends mr{nextMatch(e,t,n){let i=it(this.spec,e,n,e.doc.length).next();return i.done&&(i=it(this.spec,e,0,t).next()),i.done?null:i.value}prevMatchInRange(e,t,n){for(let i=1;;i++){let s=Math.max(t,n-i*1e4),a=it(this.spec,e,s,n),o=null;for(;!a.next().done;)o=a.value;if(o&&(s==t||o.from>s+10))return o;if(s==t)return null}}prevMatch(e,t,n){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,n,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&]|\d+)/g,(t,n)=>{if(n=="&")return e.match[0];if(n=="$")return"$";for(let i=n.length;i>0;i--){let s=+n.slice(0,i);if(s>0&&s<e.match.length)return e.match[s]+n.slice(i)}return t})}matchAll(e,t){let n=it(this.spec,e,0,e.doc.length),i=[];for(;!n.next().done;){if(i.length>=t)return null;i.push(n.value)}return i}highlight(e,t,n,i){let s=it(this.spec,e,Math.max(0,t-250),Math.min(n+250,e.doc.length));for(;!s.next().done;)i(s.value.from,s.value.to)}},vt=q.define(),pi=q.define(),xe=ie.define({create(r){return new Xt(Oi(r).create(),null)},update(r,e){for(let t of e.effects)t.is(vt)?r=new Xt(t.value.create(),r.panel):t.is(pi)&&(r=new Xt(r.query,t.value?fi:null));return r},provide:r=>es.from(r,e=>e.panel)});var Xt=class{constructor(e,t){this.query=e,this.panel=t}},Yu=v.mark({class:"cm-searchMatch"}),Cu=v.mark({class:"cm-searchMatch cm-searchMatch-selected"}),zu=ve.fromClass(class{constructor(r){this.view=r,this.decorations=this.highlight(r.state.field(xe))}update(r){let e=r.state.field(xe);(e!=r.startState.field(xe)||r.docChanged||r.selectionSet||r.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:r,panel:e}){if(!e||!r.spec.valid)return v.none;let{view:t}=this,n=new Fi;for(let i=0,s=t.visibleRanges,a=s.length;i<a;i++){let{from:o,to:l}=s[i];for(;i<a-1&&l>s[i+1].from-500;)l=s[++i].to;r.highlight(t.state,o,l,(O,c)=>{let h=t.state.selection.ranges.some(p=>p.from==O&&p.to==c);n.add(O,c,h?Cu:Yu)})}return n.finish()}},{decorations:r=>r.decorations});function Tt(r){return e=>{let t=e.state.field(xe,!1);return t&&t.query.spec.valid?r(e,t):Bo(e)}}var $r=Tt((r,{query:e})=>{let{to:t}=r.state.selection.main,n=e.nextMatch(r.state,t,t);if(!n)return!1;let i=Z.single(n.from,n.to),s=r.state.facet(Le);return r.dispatch({selection:i,effects:[di(r,n),s.scrollToMatch(i.main,r)],userEvent:"select.search"}),Do(r),!0}),br=Tt((r,{query:e})=>{let{state:t}=r,{from:n}=t.selection.main,i=e.prevMatch(t,n,n);if(!i)return!1;let s=Z.single(i.from,i.to),a=r.state.facet(Le);return r.dispatch({selection:s,effects:[di(r,i),a.scrollToMatch(s.main,r)],userEvent:"select.search"}),Do(r),!0}),qu=Tt((r,{query:e})=>{let t=e.matchAll(r.state,1e3);return!t||!t.length?!1:(r.dispatch({selection:Z.create(t.map(n=>Z.range(n.from,n.to))),userEvent:"select.search.matches"}),!0)}),Au=({state:r,dispatch:e})=>{let t=r.selection;if(t.ranges.length>1||t.main.empty)return!1;let{from:n,to:i}=t.main,s=[],a=0;for(let o=new we(r.doc,r.sliceDoc(n,i));!o.next().done;){if(s.length>1e3)return!1;o.value.from==n&&(a=s.length),s.push(Z.range(o.value.from,o.value.to))}return e(r.update({selection:Z.create(s,a),userEvent:"select.search.matches"})),!0},Wo=Tt((r,{query:e})=>{let{state:t}=r,{from:n,to:i}=t.selection.main;if(t.readOnly)return!1;let s=e.nextMatch(t,n,n);if(!s)return!1;let a=s,o=[],l,O,c=[];a.precise?a.from==n&&a.to==i&&(O=t.toText(e.getReplacement(a)),o.push({from:a.from,to:a.to,insert:O}),a=e.nextMatch(t,a.from,a.to),c.push(X.announce.of(t.phrase("replaced match on line $",t.doc.lineAt(n).number)+"."))):a=e.nextMatch(t,a.from,a.to);let h=r.state.changes(o);return a&&(l=Z.single(a.from,a.to).map(h),c.push(di(r,a)),c.push(t.facet(Le).scrollToMatch(l.main,r))),r.dispatch({changes:h,selection:l,effects:c,userEvent:"input.replace"}),!0}),Lu=Tt((r,{query:e})=>{if(r.state.readOnly)return!1;let t=[];for(let i of e.matchAll(r.state,1e9)){let{from:s,to:a,precise:o}=i;o&&t.push({from:s,to:a,insert:e.getReplacement(i)})}if(!t.length)return!1;let n=r.state.phrase("replaced $ matches",t.length)+".";return r.dispatch({changes:t,effects:X.announce.of(n),userEvent:"input.replace.all"}),!0});function fi(r){return r.state.facet(Le).createPanel(r)}function Oi(r,e){var t,n,i,s,a;let o=r.selection.main,l=o.empty||o.to>o.from+100?"":r.sliceDoc(o.from,o.to);if(e&&!l)return e;let O=r.facet(Le);return new dr({search:((t=e?.literal)!==null&&t!==void 0?t:O.literal)?l:l.replace(/\n/g,"\\n"),caseSensitive:(n=e?.caseSensitive)!==null&&n!==void 0?n:O.caseSensitive,literal:(i=e?.literal)!==null&&i!==void 0?i:O.literal,regexp:(s=e?.regexp)!==null&&s!==void 0?s:O.regexp,wholeWord:(a=e?.wholeWord)!==null&&a!==void 0?a:O.wholeWord})}function Io(r){let e=zr(r,fi);return e&&e.dom.querySelector("[main-field]")}function Do(r){let e=Io(r);e&&e==r.root.activeElement&&e.select()}var Bo=r=>{let e=r.state.field(xe,!1);if(e&&e.panel){let t=Io(r);if(t&&t!=r.root.activeElement){let n=Oi(r.state,e.query.spec);n.valid&&r.dispatch({effects:vt.of(n)}),t.focus(),t.select()}}else r.dispatch({effects:[pi.of(!0),e?vt.of(Oi(r.state,e.query.spec)):q.appendConfig.of(hi)]});return!0},No=r=>{let e=r.state.field(xe,!1);if(!e||!e.panel)return!1;let t=zr(r,fi);return t&&t.dom.contains(r.root.activeElement)&&r.focus(),r.dispatch({effects:pi.of(!1)}),!0},Fo=[{key:"Mod-f",run:Bo,scope:"editor search-panel"},{key:"F3",run:$r,shift:br,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:$r,shift:br,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:No,scope:"editor search-panel"},{key:"Mod-Shift-l",run:Au},{key:"Mod-Alt-g",run:bu},{key:"Mod-d",run:vu,preventDefault:!0}],ci=class{constructor(e){this.view=e;let t=this.query=e.state.field(xe).query.spec;this.commit=this.commit.bind(this),this.searchField=I("input",{value:t.search,placeholder:F(e,"Find"),"aria-label":F(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=I("input",{value:t.replace,placeholder:F(e,"Replace"),"aria-label":F(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=I("input",{type:"checkbox",name:"case",form:"",checked:t.caseSensitive,onchange:this.commit}),this.reField=I("input",{type:"checkbox",name:"re",form:"",checked:t.regexp,onchange:this.commit}),this.wordField=I("input",{type:"checkbox",name:"word",form:"",checked:t.wholeWord,onchange:this.commit});function n(i,s,a){return I("button",{class:"cm-button",name:i,onclick:s,type:"button"},a)}this.dom=I("div",{onkeydown:i=>this.keydown(i),class:"cm-search"},[this.searchField,n("next",()=>$r(e),[F(e,"next")]),n("prev",()=>br(e),[F(e,"previous")]),n("select",()=>qu(e),[F(e,"all")]),I("label",null,[this.caseField,F(e,"match case")]),I("label",null,[this.reField,F(e,"regexp")]),I("label",null,[this.wordField,F(e,"by word")]),...e.state.readOnly?[]:[I("br"),this.replaceField,n("replace",()=>Wo(e),[F(e,"replace")]),n("replaceAll",()=>Lu(e),[F(e,"replace all")])],I("button",{name:"close",onclick:()=>No(e),"aria-label":F(e,"close"),type:"button"},["\xD7"])])}commit(){let e=new dr({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:vt.of(e)}))}keydown(e){Ki(this.view,e,"search-panel")?e.preventDefault():e.keyCode==13&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?br:$r)(this.view)):e.keyCode==13&&e.target==this.replaceField&&(e.preventDefault(),Wo(this.view))}update(e){for(let t of e.transactions)for(let n of t.effects)n.is(vt)&&!n.value.eq(this.query)&&this.setQuery(n.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(Le).top}};function F(r,e){return r.state.phrase(e)}var Or=30,cr=/[\s\.,:;?!]/;function di(r,{from:e,to:t}){let n=r.state.doc.lineAt(e),i=r.state.doc.lineAt(t).to,s=Math.max(n.from,e-Or),a=Math.min(i,t+Or),o=r.state.sliceDoc(s,a);if(s!=n.from){for(let l=0;l<Or;l++)if(!cr.test(o[l+1])&&cr.test(o[l])){o=o.slice(l);break}}if(a!=i){for(let l=o.length-1;l>o.length-Or;l--)if(!cr.test(o[l-1])&&cr.test(o[l])){o=o.slice(0,l);break}}return X.announce.of(`${r.state.phrase("current match")}. ${o} ${r.state.phrase("on line")} ${n.number}.`)}var Eu=X.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),hi=[xe,ge.low(zu),Eu];function de(r,e,t=""){let n=r.state.changeByRange(i=>{let{from:s,to:a}=i,o=r.state.sliceDoc(s-e.length,s),l=r.state.sliceDoc(a,a+e.length);if(o===e&&l===e)return{changes:[{from:s-e.length,to:s,insert:""},{from:a,to:a+e.length,insert:""}],range:Z.range(s-e.length,a-e.length)};let O=r.state.sliceDoc(s,a)||t;return{changes:{from:s,to:a,insert:e+O+e},range:Z.range(s+e.length,s+e.length+O.length)}});return r.dispatch(n,{scrollIntoView:!0,userEvent:"input"}),r.focus(),!0}function V(r,e){let{state:t}=r,n=[],i=new Set;for(let a of t.selection.ranges)for(let o=t.doc.lineAt(a.from).number;o<=t.doc.lineAt(a.to).number;o++)i.add(o);let s=/^(\s*)(#{1,6}\s+|>\s?|[-*+]\s+\[[ xX]\]\s+|[-*+]\s+|\d+[.)]\s+)?/;for(let a of i){let o=t.doc.line(a),l=s.exec(o.text),O=l[1],c=l[2]??"",h=o.from+O.length,p=h+c.length;n.push({from:h,to:p,insert:c===e?"":e})}return r.dispatch({changes:n,scrollIntoView:!0,userEvent:"input"}),r.focus(),!0}function mi(r,e,t=!1){let{state:n}=r,i=n.selection.main,s=e;if(t){let a=n.doc.lineAt(i.from);i.from===a.from||(s=` +}`,{label:"class",detail:"definition",type:"keyword"}),L('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),L('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],Mh=Oo.concat([L("interface ${name} {\n ${}\n}",{label:"interface",detail:"definition",type:"keyword"}),L("type ${name} = ${type}",{label:"type",detail:"definition",type:"keyword"}),L("enum ${name} {\n ${}\n}",{label:"enum",detail:"definition",type:"keyword"})]),ao=new Wt,co=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function yt(t){return(e,r)=>{let n=e.node.getChild("VariableDefinition");return n&&r(n,t),!0}}var Uh=["FunctionDeclaration"],Vh={FunctionDeclaration:yt("function"),ClassDeclaration:yt("class"),ClassExpression:()=>!0,EnumDeclaration:yt("constant"),TypeAliasDeclaration:yt("type"),NamespaceDeclaration:yt("namespace"),VariableDefinition(t,e){t.matchContext(Uh)||e(t,"variable")},TypeDefinition(t,e){e(t,"type")},__proto__:null};function ho(t,e){let r=ao.get(e);if(r)return r;let n=[],i=!0;function s(a,o){let l=t.sliceString(a.from,a.to);n.push({label:l,type:o})}return e.cursor(le.IncludeAnonymous).iterate(a=>{if(i)i=!1;else if(a.name){let o=Vh[a.name];if(o&&o(a,s)||co.has(a.name))return!1}else if(a.to-a.from>8192){for(let o of ho(t,a.node))n.push(o);return!1}}),ao.set(e,n),n}var oo=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,uo=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName","JSXText","JSXAttributeValue","JSXOpenTag","JSXCloseTag","JSXSelfClosingTag",".","?."];function Gh(t){let e=R(t.state).resolveInner(t.pos,-1);if(uo.indexOf(e.name)>-1)return null;let r=e.name=="VariableName"||e.to-e.from<20&&oo.test(t.state.sliceDoc(e.from,e.to));if(!r&&!t.explicit)return null;let n=[];for(let i=e;i;i=i.parent)co.has(i.name)&&(n=n.concat(ho(t.state.doc,i)));return{options:n,from:r?e.from:t.pos,validFor:oo}}var te=Ne.define({name:"javascript",parser:so.configure({props:[$e.add({IfStatement:Fe({except:/^\s*({|else\b)/}),TryStatement:Fe({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:Os,SwitchBody:t=>{let e=t.textAfter,r=/^\s*\}/.test(e),n=/^\s*(case|default)\b/.test(e);return t.baseIndent+(r?0:n?1:2)*t.unit},Block:ls({closing:"}"}),ArrowFunction:t=>t.baseIndent+t.unit,"TemplateString BlockComment":()=>null,"Statement Property":Fe({except:/^\s*{/}),JSXElement(t){let e=/^\s*<\//.test(t.textAfter);return t.lineIndent(t.node.from)+(e?0:t.unit)},JSXEscape(t){let e=/\s*\}/.test(t.textAfter);return t.lineIndent(t.node.from)+(e?0:t.unit)},"JSXOpenTag JSXSelfClosingTag"(t){return t.column(t.node.from)+t.unit}}),he.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":It,BlockComment(t){return{from:t.from+2,to:t.to-2}},JSXElement(t){let e=t.firstChild;if(!e||e.name=="JSXSelfClosingTag")return null;let r=t.lastChild;return{from:e.to,to:r.type.isError?t.to:r.from}},"JSXSelfClosingTag JSXOpenTag"(t){var e;let r=(e=t.firstChild)===null||e===void 0?void 0:e.nextSibling,n=t.lastChild;return!r||r.type.isError?null:{from:r.to,to:n.type.isError?t.to:n.from}}})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),po={test:t=>/^JSX/.test(t.name),facet:Vt({commentTokens:{block:{open:"{/*",close:"*/}"}}})},Nn=te.configure({dialect:"ts"},"typescript"),Fn=te.configure({dialect:"jsx",props:[Ar.add(t=>t.isTop?[po]:void 0)]}),Hn=te.configure({dialect:"jsx ts",props:[Ar.add(t=>t.isTop?[po]:void 0)]},"typescript"),fo=t=>({label:t,type:"keyword"}),mo="break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ").map(fo),Ih=mo.concat(["declare","implements","private","protected","public"].map(fo));function go(t={}){let e=t.jsx?t.typescript?Hn:Fn:t.typescript?Nn:te,r=t.typescript?Mh.concat(Ih):Oo.concat(mo);return new ce(e,[te.data.of({autocomplete:ys(uo,Kr(r))}),te.data.of({autocomplete:Gh}),t.jsx?Nh:[]])}function Dh(t){for(;;){if(t.name=="JSXOpenTag"||t.name=="JSXSelfClosingTag"||t.name=="JSXFragmentTag")return t;if(t.name=="JSXEscape"||!t.parent)return null;t=t.parent}}function lo(t,e,r=t.length){for(let n=e?.firstChild;n;n=n.nextSibling)if(n.name=="JSXIdentifier"||n.name=="JSXBuiltin"||n.name=="JSXNamespacedName"||n.name=="JSXMemberExpression")return t.sliceString(n.from,Math.min(n.to,r));return""}var Bh=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),Nh=X.inputHandler.of((t,e,r,n,i)=>{if((Bh?t.composing:t.compositionStarted)||t.state.readOnly||e!=r||n!=">"&&n!="/"||!te.isActiveAt(t.state,e,-1))return!1;let s=i(),{state:a}=s,o=a.changeByRange(l=>{var O;let{head:c}=l,h=R(a).resolveInner(c-1,-1),p;if(h.name=="JSXStartTag"&&(h=h.parent),!(a.doc.sliceString(c-1,c)!=n||h.name=="JSXAttributeValue"&&h.to>c)){if(n==">"&&h.name=="JSXFragmentTag")return{range:l,changes:{from:c,insert:"</>"}};if(n=="/"&&h.name=="JSXStartCloseTag"){let u=h.parent,d=u.parent;if(d&&u.from==c-2&&((p=lo(a.doc,d.firstChild,c))||((O=d.firstChild)===null||O===void 0?void 0:O.name)=="JSXFragmentTag")){let m=`${p}>`;return{range:Z.cursor(c+m.length,-1),changes:{from:c,insert:m}}}}else if(n==">"){let u=Dh(h);if(u&&u.name=="JSXOpenTag"&&!/^\/?>|^<\//.test(a.doc.sliceString(c,c+2))&&(p=lo(a.doc,u,c)))return{range:l,changes:{from:c,insert:`</${p}>`}}}}return{range:l}});return o.changes.empty?!1:(t.dispatch([s,a.update(o,{userEvent:"input.complete",scrollIntoView:!0})]),!0)});var Zt=["_blank","_self","_top","_parent"],Kn=["ascii","utf-8","utf-16","latin1","latin1"],Jn=["get","post","put","delete"],ei=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],N=["true","false"],S={},Fh={a:{attrs:{href:null,ping:null,type:null,media:null,target:Zt,hreflang:null}},abbr:S,address:S,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:null,hreflang:null,type:null,shape:["default","rect","circle","poly"]}},article:S,aside:S,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["autoplay"],loop:["loop"],controls:["controls"]}},b:S,base:{attrs:{href:null,target:Zt}},bdi:S,bdo:S,blockquote:{attrs:{cite:null}},body:S,br:S,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["autofocus"],disabled:["autofocus"],formenctype:ei,formmethod:Jn,formnovalidate:["novalidate"],formtarget:Zt,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:S,center:S,cite:S,code:S,col:{attrs:{span:null}},colgroup:{attrs:{span:null}},command:{attrs:{type:["command","checkbox","radio"],label:null,icon:null,radiogroup:null,command:null,title:null,disabled:["disabled"],checked:["checked"]}},data:{attrs:{value:null}},datagrid:{attrs:{disabled:["disabled"],multiple:["multiple"]}},datalist:{attrs:{data:null}},dd:S,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["open"]}},dfn:S,div:S,dl:S,dt:S,em:S,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["disabled"],form:null,name:null}},figcaption:S,figure:S,footer:S,form:{attrs:{action:null,name:null,"accept-charset":Kn,autocomplete:["on","off"],enctype:ei,method:Jn,novalidate:["novalidate"],target:Zt}},h1:S,h2:S,h3:S,h4:S,h5:S,h6:S,head:{children:["title","base","link","style","meta","script","noscript","command"]},header:S,hgroup:S,hr:S,html:{attrs:{manifest:null}},i:S,iframe:{attrs:{src:null,srcdoc:null,name:null,width:null,height:null,sandbox:["allow-top-navigation","allow-same-origin","allow-forms","allow-scripts"],seamless:["seamless"]}},img:{attrs:{alt:null,src:null,ismap:null,usemap:null,width:null,height:null,crossorigin:["anonymous","use-credentials"]}},input:{attrs:{alt:null,dirname:null,form:null,formaction:null,height:null,list:null,max:null,maxlength:null,min:null,name:null,pattern:null,placeholder:null,size:null,src:null,step:null,value:null,width:null,accept:["audio/*","video/*","image/*"],autocomplete:["on","off"],autofocus:["autofocus"],checked:["checked"],disabled:["disabled"],formenctype:ei,formmethod:Jn,formnovalidate:["novalidate"],formtarget:Zt,multiple:["multiple"],readonly:["readonly"],required:["required"],type:["hidden","text","search","tel","url","email","password","datetime","date","month","week","time","datetime-local","number","range","color","checkbox","radio","file","submit","image","reset","button"]}},ins:{attrs:{cite:null,datetime:null}},kbd:S,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["autofocus"],disabled:["disabled"],keytype:["RSA"]}},label:{attrs:{for:null,form:null}},legend:S,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:null,media:null,sizes:["all","16x16","16x16 32x32","16x16 32x32 64x64"]}},map:{attrs:{name:null}},mark:S,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:Kn,name:["viewport","application-name","author","description","generator","keywords"],"http-equiv":["content-language","content-type","default-style","refresh"]}},meter:{attrs:{value:null,min:null,low:null,high:null,max:null,optimum:null}},nav:S,noscript:S,object:{attrs:{data:null,type:null,name:null,usemap:null,form:null,width:null,height:null,typemustmatch:["typemustmatch"]}},ol:{attrs:{reversed:["reversed"],start:null,type:["1","a","A","i","I"]},children:["li","script","template","ul","ol"]},optgroup:{attrs:{disabled:["disabled"],label:null}},option:{attrs:{disabled:["disabled"],label:null,selected:["selected"],value:null}},output:{attrs:{for:null,form:null,name:null}},p:S,param:{attrs:{name:null,value:null}},pre:S,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:S,rt:S,ruby:S,samp:S,script:{attrs:{type:["text/javascript"],src:null,async:["async"],defer:["defer"],charset:Kn}},section:S,select:{attrs:{form:null,name:null,size:null,autofocus:["autofocus"],disabled:["disabled"],multiple:["multiple"]}},slot:{attrs:{name:null}},small:S,source:{attrs:{src:null,type:null,media:null}},span:S,strong:S,style:{attrs:{type:["text/css"],media:null,scoped:null}},sub:S,summary:S,sup:S,table:S,tbody:S,td:{attrs:{colspan:null,rowspan:null,headers:null}},template:S,textarea:{attrs:{dirname:null,form:null,maxlength:null,name:null,placeholder:null,rows:null,cols:null,autofocus:["autofocus"],disabled:["disabled"],readonly:["readonly"],required:["required"],wrap:["soft","hard"]}},tfoot:S,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:["row","col","rowgroup","colgroup"]}},thead:S,time:{attrs:{datetime:null}},title:S,tr:S,track:{attrs:{src:null,label:null,default:null,kind:["subtitles","captions","descriptions","chapters","metadata"],srclang:null}},ul:{children:["li","script","template","ul","ol"]},var:S,video:{attrs:{src:null,poster:null,width:null,height:null,crossorigin:["anonymous","use-credentials"],preload:["auto","metadata","none"],autoplay:["autoplay"],mediagroup:["movie"],muted:["muted"],controls:["controls"]}},wbr:S},So={accesskey:null,class:null,contenteditable:N,contextmenu:null,dir:["ltr","rtl","auto"],draggable:["true","false","auto"],dropzone:["copy","move","link","string:","file:"],hidden:["hidden"],id:null,inert:["inert"],itemid:null,itemprop:null,itemref:null,itemscope:["itemscope"],itemtype:null,lang:["ar","bn","de","en-GB","en-US","es","fr","hi","id","ja","pa","pt","ru","tr","zh"],spellcheck:N,autocorrect:N,autocapitalize:N,style:null,tabindex:null,title:null,translate:["yes","no"],rel:["stylesheet","alternate","author","bookmark","help","license","next","nofollow","noreferrer","prefetch","prev","search","tag"],role:"alert application article banner button cell checkbox complementary contentinfo dialog document feed figure form grid gridcell heading img list listbox listitem main navigation region row rowgroup search switch tab table tabpanel textbox timer".split(" "),"aria-activedescendant":null,"aria-atomic":N,"aria-autocomplete":["inline","list","both","none"],"aria-busy":N,"aria-checked":["true","false","mixed","undefined"],"aria-controls":null,"aria-describedby":null,"aria-disabled":N,"aria-dropeffect":null,"aria-expanded":["true","false","undefined"],"aria-flowto":null,"aria-grabbed":["true","false","undefined"],"aria-haspopup":N,"aria-hidden":N,"aria-invalid":["true","false","grammar","spelling"],"aria-label":null,"aria-labelledby":null,"aria-level":null,"aria-live":["off","polite","assertive"],"aria-multiline":N,"aria-multiselectable":N,"aria-owns":null,"aria-posinset":null,"aria-pressed":["true","false","mixed","undefined"],"aria-readonly":N,"aria-relevant":null,"aria-required":N,"aria-selected":["true","false","undefined"],"aria-setsize":null,"aria-sort":["ascending","descending","none","other"],"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null},ko="beforeunload copy cut dragstart dragover dragleave dragenter dragend drag paste focus blur change click load mousedown mouseenter mouseleave mouseup keydown keyup resize scroll unload".split(" ").map(t=>"on"+t);for(let t of ko)So[t]=null;var qe=class{constructor(e,r){this.tags={...Fh,...e},this.globalAttrs={...So,...r},this.allTags=Object.keys(this.tags),this.globalAttrNames=Object.keys(this.globalAttrs)}};qe.default=new qe;function Ae(t,e,r=t.length){if(!e)return"";let n=e.firstChild,i=n&&n.getChild("TagName");return i?t.sliceString(i.from,Math.min(i.to,r)):""}function rt(t,e=!1){for(;t;t=t.parent)if(t.name=="Element")if(e)e=!1;else return t;return null}function Po(t,e,r){let n=r.tags[Ae(t,rt(e))];return n?.children||r.allTags}function ti(t,e){let r=[];for(let n=rt(e);n&&!n.type.isTop;n=rt(n.parent)){let i=Ae(t,n);if(i&&n.lastChild.name=="CloseTag")break;i&&r.indexOf(i)<0&&(e.name=="EndTag"||e.from>=n.firstChild.to)&&r.push(i)}return r}var xo=/^[:\-\.\w\u00b7-\uffff]*$/;function Qo(t,e,r,n,i){let s=/\s*>/.test(t.sliceDoc(i,i+5))?"":">",a=rt(r,r.name=="StartTag"||r.name=="TagName");return{from:n,to:i,options:Po(t.doc,a,e).map(o=>({label:o,type:"type"})).concat(ti(t.doc,r).map((o,l)=>({label:"/"+o,apply:"/"+o+s,type:"type",boost:99-l}))),validFor:/^\/?[:\-\.\w\u00b7-\uffff]*$/}}function $o(t,e,r,n){let i=/\s*>/.test(t.sliceDoc(n,n+5))?"":">";return{from:r,to:n,options:ti(t.doc,e).map((s,a)=>({label:s,apply:s+i,type:"type",boost:99-a})),validFor:xo}}function Hh(t,e,r,n){let i=[],s=0;for(let a of Po(t.doc,r,e))i.push({label:"<"+a,type:"type"});for(let a of ti(t.doc,r))i.push({label:"</"+a+">",type:"type",boost:99-s++});return{from:n,to:n,options:i,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}function Kh(t,e,r,n,i){let s=rt(r),a=s?e.tags[Ae(t.doc,s)]:null,o=a&&a.attrs?Object.keys(a.attrs):[],l=a&&a.globalAttrs===!1?o:o.length?o.concat(e.globalAttrNames):e.globalAttrNames;return{from:n,to:i,options:l.map(O=>({label:O,type:"property"})),validFor:xo}}function Jh(t,e,r,n,i){var s;let a=(s=r.parent)===null||s===void 0?void 0:s.getChild("AttributeName"),o=[],l;if(a){let O=t.sliceDoc(a.from,a.to),c=e.globalAttrs[O];if(!c){let h=rt(r),p=h?e.tags[Ae(t.doc,h)]:null;c=p?.attrs&&p.attrs[O]}if(c){let h=t.sliceDoc(n,i).toLowerCase(),p='"',u='"';/^['"]/.test(h)?(l=h[0]=='"'?/^[^"]*$/:/^[^']*$/,p="",u=t.sliceDoc(i,i+1)==h[0]?"":h[0],h=h.slice(1),n++):l=/^[^\s<>='"]*$/;for(let d of c)o.push({label:d,apply:p+d+u,type:"constant"})}}return{from:n,to:i,options:o,validFor:l}}function wo(t,e){let{state:r,pos:n}=e,i=R(r).resolveInner(n,-1),s=i.resolve(n);for(let a=n,o;s==i&&(o=i.childBefore(a));){let l=o.lastChild;if(!l||!l.type.isError||l.from<l.to)break;s=i=o,a=l.from}return i.name=="TagName"?i.parent&&/CloseTag$/.test(i.parent.name)?$o(r,i,i.from,n):Qo(r,t,i,i.from,n):i.name=="StartTag"||i.name=="IncompleteTag"?Qo(r,t,i,n,n):i.name=="StartCloseTag"||i.name=="IncompleteCloseTag"?$o(r,i,n,n):i.name=="OpenTag"||i.name=="SelfClosingTag"||i.name=="AttributeName"?Kh(r,t,i,i.name=="AttributeName"?i.from:n,n):i.name=="Is"||i.name=="AttributeValue"||i.name=="UnquotedAttributeValue"?Jh(r,t,i,i.name=="Is"?n:i.from,n):e.explicit&&(s.name=="Element"||s.name=="Text"||s.name=="Document")?Hh(r,t,i,n):null}function yo(t){return wo(qe.default,t)}function eu(t){let{extraTags:e,extraGlobalAttributes:r}=t,n=r||e?new qe(e,r):qe.default;return i=>wo(n,i)}var tu=te.parser.configure({top:"SingleExpression"}),Zo=[{tag:"script",attrs:t=>t.type=="text/typescript"||t.lang=="ts",parser:Nn.parser},{tag:"script",attrs:t=>t.type=="text/babel"||t.type=="text/jsx",parser:Fn.parser},{tag:"script",attrs:t=>t.type=="text/typescript-jsx",parser:Hn.parser},{tag:"script",attrs(t){return/^(importmap|speculationrules|application\/(.+\+)?json)$/i.test(t.type)},parser:tu},{tag:"script",attrs(t){return!t.type||/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(t.type)},parser:te.parser},{tag:"style",attrs(t){return(!t.lang||t.lang=="css")&&(!t.type||/^(text\/)?(x-)?(stylesheet|css)$/i.test(t.type))},parser:wt.parser}],Xo=[{name:"style",parser:wt.parser.configure({top:"Styles"})}].concat(ko.map(t=>({name:t,parser:te.parser}))),vo=Ne.define({name:"html",parser:Ma.configure({props:[$e.add({Element(t){let e=/^(\s*)(<\/)?/.exec(t.textAfter);return t.node.to<=t.pos+e[0].length?t.continue():t.lineIndent(t.node.from)+(e[2]?0:t.unit)},"OpenTag CloseTag SelfClosingTag"(t){return t.column(t.node.from)+t.unit},Document(t){if(t.pos+/\s*/.exec(t.textAfter)[0].length<t.node.to)return t.continue();let e=null,r;for(let n=t.node;;){let i=n.lastChild;if(!i||i.name!="Element"||i.to!=n.to)break;e=n=i}return e&&!((r=e.lastChild)&&(r.name=="CloseTag"||r.name=="SelfClosingTag"))?t.lineIndent(e.from)+t.unit:null}}),he.add({Element(t){let e=t.firstChild,r=t.lastChild;return!e||e.name!="OpenTag"?null:{from:e.to,to:r.name=="CloseTag"?r.from:t.to}}}),ps.add({"OpenTag CloseTag":t=>t.getChild("TagName")})]}),languageData:{commentTokens:{block:{open:"<!--",close:"-->"}},indentOnInput:/^\s*<\/\w+\W$/,wordChars:"-_"}}),Or=vo.configure({wrap:Mn(Zo,Xo)});function To(t={}){let e="",r;t.matchClosingTags===!1&&(e="noMatch"),t.selfClosingTags===!0&&(e=(e?e+" ":"")+"selfClosing"),(t.nestedLanguages&&t.nestedLanguages.length||t.nestedAttributes&&t.nestedAttributes.length)&&(r=Mn((t.nestedLanguages||[]).concat(Zo),(t.nestedAttributes||[]).concat(Xo)));let n=r?vo.configure({wrap:r,dialect:e}):e?Or.configure({dialect:e}):Or;return new ce(n,[Or.data.of({autocomplete:eu(t)}),t.autoCloseTags!==!1?nu:[],go().support,ro().support])}var bo=new Set("area base br col command embed frame hr img input keygen link meta param source track wbr menuitem".split(" "));function ru(t,e,r){for(var n;;){if(((n=e.lastChild)===null||n===void 0?void 0:n.name)!="CloseTag")return!1;let i=e.parent;if(!i||Ae(t,i)!=r)return!0;e=i}}var nu=X.inputHandler.of((t,e,r,n,i)=>{if(t.composing||t.state.readOnly||e!=r||n!=">"&&n!="/"||!Or.isActiveAt(t.state,e,-1))return!1;let s=i(),{state:a}=s,o=a.changeByRange(l=>{var O;let c=a.doc.sliceString(l.from-1,l.to)==n,{head:h}=l,p=R(a).resolveInner(h,-1),u;if(c&&n==">"&&p.name=="EndTag"){let d=p.parent;if((u=Ae(a.doc,d.parent,h))&&!bo.has(u)&&!ru(a.doc,d.parent,u)){let m=h+(a.doc.sliceString(h,h+1)===">"?1:0),g=`</${u}>`;return{range:l,changes:{from:h,to:m,insert:g}}}}else if(c&&n=="/"&&p.name=="IncompleteCloseTag"){let d=p.parent;if(p.from==h-2&&((O=d.lastChild)===null||O===void 0?void 0:O.name)!="CloseTag"&&(u=Ae(a.doc,d,h))&&!bo.has(u)){let m=h+(a.doc.sliceString(h,h+1)===">"?1:0),g=`${u}>`;return{range:Z.cursor(h+g.length,-1),changes:{from:h,to:m,insert:g}}}}return{range:l}});return o.changes.empty?!1:(t.dispatch([s,a.update(o,{userEvent:"input.complete",scrollIntoView:!0})]),!0)});var _o=Vt({commentTokens:{block:{open:"<!--",close:"-->"}}}),Co=new K,Yo=ua.configure({props:[he.add(t=>!t.is("Block")||t.is("Document")||ii(t)!=null||iu(t)?void 0:(e,r)=>({from:r.doc.lineAt(e.from).to,to:e.to})),Co.add(ii),$e.add({Document:()=>null}),ss.add({Document:_o})]});function ii(t){let e=/^(?:ATX|Setext)Heading(\d)$/.exec(t.name);return e?+e[1]:void 0}function iu(t){return t.name=="OrderedList"||t.name=="BulletList"}function su(t,e){let r=t;for(;;){let n=r.nextSibling,i;if(!n||(i=ii(n.type))!=null&&i<=e)break;r=n}return r.to}var au=cs.of((t,e,r)=>{for(let n=R(t).resolveInner(r,-1);n&&!(n.from<e);n=n.parent){let i=n.type.prop(Co);if(i==null)continue;let s=su(n,i);if(s>r)return{from:r,to:s}}return null});function si(t){return new as(_o,t,[],"markdown")}var ou=si(Yo),lu=Yo.configure([da,Qa,ga,$a,{props:[he.add({Table:(t,e)=>({from:e.doc.lineAt(t.from).to,to:t.to})})]}]),nt=si(lu);function Ou(t,e){return r=>{if(r&&t){let n=null;if(r=/\S*/.exec(r)[0],typeof t=="function"?n=t(r):n=Lr.matchLanguageName(t,r,!0),n instanceof Lr)return n.support?n.support.language.parser:os.getSkippingParser(n.load());if(n)return n.parser}return e?e.parser:null}}var Xt=class{constructor(e,r,n,i,s,a,o){this.node=e,this.from=r,this.to=n,this.spaceBefore=i,this.spaceAfter=s,this.type=a,this.item=o}blank(e,r=!0){let n=this.spaceBefore+(this.node.name=="Blockquote"?">":"");if(e!=null){for(;n.length<e;)n+=" ";return n}else{for(let i=this.to-this.from-n.length-this.spaceAfter.length;i>0;i--)n+=" ";return n+(r?this.spaceAfter:"")}}marker(e,r){let n=this.node.name=="OrderedList"?String(+qo(this.item,e)[2]+r):"";return this.spaceBefore+n+this.type+this.spaceAfter}};function zo(t,e){let r=[],n=[];for(let i=t;i;i=i.parent){if(i.name=="FencedCode")return n;(i.name=="ListItem"||i.name=="Blockquote")&&r.push(i)}for(let i=r.length-1;i>=0;i--){let s=r[i],a,o=e.lineAt(s.from),l=s.from-o.from;if(s.name=="Blockquote"&&(a=/^ *>( ?)/.exec(o.text.slice(l))))n.push(new Xt(s,l,l+a[0].length,"",a[1],">",null));else if(s.name=="ListItem"&&s.parent.name=="OrderedList"&&(a=/^( *)\d+([.)])( *)/.exec(o.text.slice(l)))){let O=a[3],c=a[0].length;O.length>=4&&(O=O.slice(0,O.length-4),c-=4),n.push(new Xt(s.parent,l,l+c,a[1],O,a[2],s))}else if(s.name=="ListItem"&&s.parent.name=="BulletList"&&(a=/^( *)([-+*])( {1,4}\[[ xX]\])?( +)/.exec(o.text.slice(l)))){let O=a[4],c=a[0].length;O.length>4&&(O=O.slice(0,O.length-4),c-=4);let h=a[2];a[3]&&(h+=a[3].replace(/[xX]/," ")),n.push(new Xt(s.parent,l,l+c,a[1],O,h,s))}}return n}function qo(t,e){return/^(\s*)(\d+)(?=[.)])/.exec(e.sliceString(t.from,t.from+10))}function ri(t,e,r,n=0){for(let i=-1,s=t;;){if(s.name=="ListItem"){let o=qo(s,e),l=+o[2];if(i>=0){if(l!=i+1)return;r.push({from:s.from+o[1].length,to:s.from+o[0].length,insert:String(i+2+n)})}i=l}let a=s.nextSibling;if(!a)break;s=a}}function ai(t,e){let r=/^[ \t]*/.exec(t)[0].length;if(!r||e.facet(Gt)!=" ")return t;let n=Be(t,4,r),i="";for(let s=n;s>0;)s>=4?(i+=" ",s-=4):(i+=" ",s--);return i+t.slice(r)}var cu=(t={})=>({state:e,dispatch:r})=>{let n=R(e),{doc:i}=e,s=null,a=e.changeByRange(o=>{if(!o.empty||!nt.isActiveAt(e,o.from,-1)&&!nt.isActiveAt(e,o.from,1))return s={range:o};let l=o.from,O=i.lineAt(l),c=zo(n.resolveInner(l,-1),i);for(;c.length&&c[c.length-1].from>l-O.from;)c.pop();if(!c.length)return s={range:o};let h=c[c.length-1];if(h.to-h.spaceAfter.length>l-O.from)return s={range:o};let p=l>=h.to-h.spaceAfter.length&&!/\S/.test(O.text.slice(h.to));if(h.item&&p){if(h.item.from<O.from&&!/^[\s>]*$/.test(O.text.slice(0,h.to)))return s={range:o};let b=h.node.firstChild,Q=h.node.getChild("ListItem","ListItem");if(b.to>=l||Q&&Q.to<l||O.from>0&&!/[^\s>]/.test(i.lineAt(O.from-1).text)||t.nonTightLists===!1){let k=c.length>1?c[c.length-2]:null,y,w="";k&&k.item?(y=O.from+k.from,w=k.marker(i,1)):y=O.from+(k?k.to:0);let _=[{from:y,to:l,insert:w}];return h.node.name=="OrderedList"&&ri(h.item,i,_,-2),k&&k.node.name=="OrderedList"&&ri(k.item,i,_),{range:Z.cursor(y+w.length),changes:_}}else{let k=jo(c,e,O);return{range:Z.cursor(l+k.length+1),changes:{from:O.from,insert:k+e.lineBreak}}}}if(h.node.name=="Blockquote"&&p&&O.from){let b=i.lineAt(O.from-1),Q=/>\s*$/.exec(b.text);if(Q&&Q.index==h.from){let k=e.changes([{from:b.from+Q.index,to:b.to},{from:O.from+h.from,to:O.to}]);return{range:o.map(k),changes:k}}}let u=[];h.node.name=="OrderedList"&&ri(h.item,i,u);let d=h.item&&h.item.from<O.from,m="";if(!d||/^[\s\d.)\-+*>]*/.exec(O.text)[0].length>=h.to)for(let b=0,Q=c.length-1;b<=Q;b++)m+=b==Q&&!d?c[b].marker(i,1):c[b].blank(b<Q?Be(O.text,4,c[b+1].from)-m.length:null);let g=l;for(;g>O.from&&/\s/.test(O.text.charAt(g-O.from-1));)g--;return m=ai(m,e),uu(h.node,e.doc)&&(m=jo(c,e,O)+e.lineBreak+m),u.push({from:g,to:l,insert:e.lineBreak+m}),{range:Z.cursor(g+m.length+1),changes:u}});return s?!1:(r(e.update(a,{scrollIntoView:!0,userEvent:"input"})),!0)},hu=cu();function Ro(t){return t.name=="QuoteMark"||t.name=="ListMark"}function uu(t,e){if(t.name!="OrderedList"&&t.name!="BulletList")return!1;let r=t.firstChild,n=t.getChild("ListItem","ListItem");if(!n)return!1;let i=e.lineAt(r.to),s=e.lineAt(n.from),a=/^[\s>]*$/.test(i.text);return i.number+(a?0:1)<s.number}function jo(t,e,r){let n="";for(let i=0,s=t.length-2;i<=s;i++)n+=t[i].blank(i<s?Be(r.text,4,t[i+1].from)-n.length:null,i<s);return ai(n,e)}function pu(t,e){let r=t.resolveInner(e,-1),n=e;Ro(r)&&(n=r.from,r=r.parent);for(let i;i=r.childBefore(n);)if(Ro(i))n=i.from;else if(i.name=="OrderedList"||i.name=="BulletList")r=i.lastChild,n=r.to;else break;return r}var fu=({state:t,dispatch:e})=>{let r=R(t),n=null,i=t.changeByRange(s=>{let a=s.from,{doc:o}=t;if(s.empty&&nt.isActiveAt(t,s.from)){let l=o.lineAt(a),O=zo(pu(r,a),o);if(O.length){let c=O[O.length-1],h=c.to-c.spaceAfter.length+(c.spaceAfter?1:0);if(a-l.from>h&&!/\S/.test(l.text.slice(h,a-l.from)))return{range:Z.cursor(l.from+h),changes:{from:l.from+h,to:a}};if(a-l.from==h&&(c.item&&l.from<=c.item.from||/^[\s>]*$/.test(l.text.slice(0,c.to)))){let p=l.from+c.from;if(c.item&&c.node.from<c.item.from&&/\S/.test(l.text.slice(c.from,c.to))){let u=c.blank(Be(l.text,4,c.to)-Be(l.text,4,c.from));return p==l.from&&(u=ai(u,t)),{range:Z.cursor(p+u.length),changes:{from:p,to:l.from+c.to,insert:u}}}if(p<a)return{range:Z.cursor(p),changes:{from:p,to:a}}}}}return n={range:s}});return n?!1:(e(t.update(i,{scrollIntoView:!0,userEvent:"delete"})),!0)},du=[{key:"Enter",run:hu},{key:"Backspace",run:fu}],Ao=To({matchClosingTags:!1});function Lo(t={}){let{codeLanguages:e,defaultCodeLanguage:r,addKeymap:n=!0,base:{parser:i}=ou,completeHTMLTags:s=!0,pasteURLAsLink:a=!0,htmlTagLanguage:o=Ao}=t;if(!(i instanceof St))throw new RangeError("Base parser provided to `markdown` should be a Markdown parser");let l=t.extensions?[t.extensions]:[],O=[o.support,au],c;a&&O.push($u),r instanceof ce?(O.push(r.support),c=r.language):r&&(c=r);let h=e||c?Ou(e,c):void 0;l.push(pa({codeParser:h,htmlParser:o.language.parser})),n&&O.push(ge.high(Te.of(du)));let p=si(i.configure(l));return s&&O.push(p.data.of({autocomplete:mu})),new ce(p,O)}function mu(t){let{state:e,pos:r}=t,n=/<[:\-\.\w\u00b7-\uffff]*$/.exec(e.sliceDoc(r-25,r));if(!n)return null;let i=R(e).resolveInner(r,-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:r-n[0].length,to:r,options:gu(),validFor:/^<[:\-\.\w\u00b7-\uffff]*$/}}var ni=null;function gu(){if(ni)return ni;let t=yo(new He(Qe.create({extensions:Ao}),0,!0));return ni=t?t.options:[]}var Qu=/code|horizontalrule|html|link|comment|processing|escape|entity|image|mark|url/i,$u=X.domEventHandlers({paste:(t,e)=>{var r;let{main:n}=e.state.selection;if(n.empty)return!1;let i=(r=t.clipboardData)===null||r===void 0?void 0:r.getData("text/plain");if(!i||!/^(https?:\/\/|mailto:|xmpp:|www\.)/.test(i)||(/^www\./.test(i)&&(i="https://"+i),!nt.isActiveAt(e.state,n.from,1)))return!1;let s=R(e.state),a=!1;return s.iterate({from:n.from,to:n.to,enter:o=>{(o.from>n.from||Qu.test(o.name))&&(a=!0)},leave:o=>{o.to<n.to&&(a=!0)}}),a?!1:(e.dispatch({changes:[{from:n.from,insert:"["},{from:n.to,insert:`](${i})`}],userEvent:"input.paste",scrollIntoView:!0}),!0)}});var Eo=typeof String.prototype.normalize=="function"?t=>t.normalize("NFKD"):t=>t,we=class{constructor(e,r,n=0,i=e.length,s,a){this.test=a,this.value={from:0,to:0,precise:!1},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(n,i),this.bufferStart=n,this.normalize=s?o=>s(Eo(o)):Eo,this.query=this.normalize(r)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return W(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let r=ht(e),n=this.bufferStart+this.bufferPos;this.bufferPos+=J(e);let i=this.normalize(r);if(i.length)for(let s=0,a=n,o=!0;;s++){let l=i.charCodeAt(s),O=this.match(l,a,o,this.bufferPos+this.bufferStart,s==i.length-1);if(O)return this.value=O,this;if(s==i.length-1)break;o&&s<r.length&&r.charCodeAt(s)==l?a++:o=!1}}}match(e,r,n,i,s){let a=null;for(let o=0;o<this.matches.length;){let l=this.matches[o],O=!1;this.query.charCodeAt(l.index)==e&&(l.index==this.query.length-1?a={from:l.from,to:i,precise:s&&l.precise}:(l.index++,O=!0)),O?o++:this.matches.splice(o,1)}return this.query.charCodeAt(0)==e&&(this.query.length==1?a={from:r,to:i,precise:n&&s}:this.matches.push({from:r,index:1,precise:n})),a&&this.test&&!this.test(a.from,a.to,this.buffer,this.bufferStart)&&(a=null),a}};typeof Symbol<"u"&&(we.prototype[Symbol.iterator]=function(){return this});var Uo={from:-1,to:-1,match:/.*/.exec(""),precise:!0},pi="gm"+(/x/.unicode==null?"":"u"),ur=class{constructor(e,r,n,i=0,s=e.length){if(this.text=e,this.to=s,this.curLine="",this.done=!1,this.value=Uo,/\\[sWDnr]|\n|\r|\[\^/.test(r))return new fr(e,r,n,i,s);this.re=new RegExp(r,pi+(n?.ignoreCase?"i":"")),this.test=n?.test,this.iter=e.iter();let a=e.lineAt(i);this.curLineStart=a.from,this.matchPos=dr(e,i),this.getLine(this.curLineStart)}getLine(e){this.iter.next(e),this.iter.lineBreak?this.curLine="":(this.curLine=this.iter.value,this.curLineStart+this.curLine.length>this.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let r=this.matchPos<=this.to&&this.re.exec(this.curLine);if(r){let n=this.curLineStart+r.index,i=n+r[0].length;if(this.matchPos=dr(this.text,i+(n==i?1:0)),n==this.curLineStart+this.curLine.length&&this.nextLine(),(n<i||n>this.value.to)&&(!this.test||this.test(n,i,r)))return this.value={from:n,to:i,precise:!0,match:r},this;e=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length<this.to)this.nextLine(),e=0;else return this.done=!0,this}}},oi=new WeakMap,pr=class t{constructor(e,r){this.from=e,this.text=r}get to(){return this.from+this.text.length}static get(e,r,n){let i=oi.get(e);if(!i||i.from>=n||i.to<=r){let o=new t(r,e.sliceString(r,n));return oi.set(e,o),o}if(i.from==r&&i.to==n)return i;let{text:s,from:a}=i;return a>r&&(s=e.sliceString(r,a)+s,a=r),i.to<n&&(s+=e.sliceString(i.to,n)),oi.set(e,new t(a,s)),new t(r,s.slice(r-a,n-a))}},fr=class{constructor(e,r,n,i,s){this.text=e,this.to=s,this.done=!1,this.value=Uo,this.matchPos=dr(e,i),this.re=new RegExp(r,pi+(n?.ignoreCase?"i":"")),this.test=n?.test,this.flat=pr.get(e,i,this.chunkEnd(i+5e3))}chunkEnd(e){return e>=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,r=this.re.exec(this.flat.text);if(r&&!r[0]&&r.index==e&&(this.re.lastIndex=e+1,r=this.re.exec(this.flat.text)),r){let n=this.flat.from+r.index,i=n+r[0].length;if((this.flat.to>=this.to||r.index+r[0].length<=this.flat.text.length-10)&&(!this.test||this.test(n,i,r)))return this.value={from:n,to:i,precise:!0,match:r},this.matchPos=dr(this.text,i+(n==i?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=pr.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}};typeof Symbol<"u"&&(ur.prototype[Symbol.iterator]=fr.prototype[Symbol.iterator]=function(){return this});function bu(t){try{return new RegExp(t,pi),!0}catch{return!1}}function dr(t,e){if(e>=t.length)return e;let r=t.lineAt(e),n;for(;e<r.to&&(n=r.text.charCodeAt(e-r.from))>=56320&&n<57344;)e++;return e}var Su=t=>{let e=ns(t,"cm-goto-line");if(e){let a=e.dom.querySelector("input[type=text]");return a&&a.select(),!0}let{state:r}=t,n=String(r.doc.lineAt(t.state.selection.main.head).number),{close:i,result:s}=rs(t,{class:"cm-goto-line",label:r.phrase("Go to line"),input:{type:"text",name:"line",value:n},focus:!0,submitLabel:r.phrase("go")});return s.then(a=>{let o=a&&/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(a.elements.line.value);if(!o){t.dispatch({effects:i});return}let l=r.doc.lineAt(r.selection.main.head),[,O,c,h,p]=o,u=h?+h.slice(1):0,d=c?+c:l.number;if(c&&p){let b=d/100;O&&(b=b*(O=="-"?-1:1)+l.number/r.doc.lines),d=Math.round(r.doc.lines*b)}else c&&O&&(d=d*(O=="-"?-1:1)+l.number);let m=r.doc.line(Math.max(1,Math.min(r.doc.lines,d))),g=Z.cursor(m.from+Math.max(0,Math.min(u,m.length)));t.dispatch({effects:[i,X.scrollIntoView(g.from,{y:"center"})],selection:g})}),!0},ku={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},Vo=De.define({combine(t){return ut(t,ku,{highlightWordAroundCursor:(e,r)=>e||r,minSelectionLength:Math.min,maxMatches:Math.min})}});function Go(t){let e=[Zu,yu];return t&&e.push(Vo.of(t)),e}var Pu=v.mark({class:"cm-selectionMatch"}),xu=v.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function Wo(t,e,r,n){return(r==0||t(e.sliceDoc(r-1,r))!=A.Word)&&(n==e.doc.length||t(e.sliceDoc(n,n+1))!=A.Word)}function wu(t,e,r,n){return t(e.sliceDoc(r,r+1))==A.Word&&t(e.sliceDoc(n-1,n))==A.Word}var yu=ve.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.selectionSet||t.docChanged||t.viewportChanged)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=t.state.facet(Vo),{state:r}=t,n=r.selection;if(n.ranges.length>1)return v.none;let i=n.main,s,a=null;if(i.empty){if(!e.highlightWordAroundCursor)return v.none;let l=r.wordAt(i.head);if(!l)return v.none;a=r.charCategorizer(i.head),s=r.sliceDoc(l.from,l.to)}else{let l=i.to-i.from;if(l<e.minSelectionLength||l>200)return v.none;if(e.wholeWords){if(s=r.sliceDoc(i.from,i.to),a=r.charCategorizer(i.head),!(Wo(a,r,i.from,i.to)&&wu(a,r,i.from,i.to)))return v.none}else if(s=r.sliceDoc(i.from,i.to),!s)return v.none}let o=[];for(let l of t.visibleRanges){let O=new we(r.doc,s,l.from,l.to);for(;!O.next().done;){let{from:c,to:h}=O.value;if((!a||Wo(a,r,c,h))&&(i.empty&&c<=i.from&&h>=i.to?o.push(xu.range(c,h)):(c>=i.to||h<=i.from)&&o.push(Pu.range(c,h)),o.length>e.maxMatches))return v.none}}return v.set(o)}},{decorations:t=>t.decorations}),Zu=X.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),Xu=({state:t,dispatch:e})=>{let{selection:r}=t,n=Z.create(r.ranges.map(i=>t.wordAt(i.head)||Z.cursor(i.head)),r.mainIndex);return n.eq(r)?!1:(e(t.update({selection:n})),!0)};function vu(t,e){let{main:r,ranges:n}=t.selection,i=t.wordAt(r.head),s=i&&i.from==r.from&&i.to==r.to;for(let a=!1,o=new we(t.doc,e,n[n.length-1].to);;)if(o.next(),o.done){if(a)return null;o=new we(t.doc,e,0,Math.max(0,n[n.length-1].from-1)),a=!0}else{if(a&&n.some(l=>l.from==o.value.from))continue;if(s){let l=t.wordAt(o.value.from);if(!l||l.from!=o.value.from||l.to!=o.value.to)continue}return o.value}}var Tu=({state:t,dispatch:e})=>{let{ranges:r}=t.selection;if(r.some(s=>s.from===s.to))return Xu({state:t,dispatch:e});let n=t.sliceDoc(r[0].from,r[0].to);if(t.selection.ranges.some(s=>t.sliceDoc(s.from,s.to)!=n))return!1;let i=vu(t,n);return i?(e(t.update({selection:t.selection.addRange(Z.range(i.from,i.to),!1),effects:X.scrollIntoView(i.to)})),!0):!1},Le=De.define({combine(t){return ut(t,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new hi(e),scrollToMatch:e=>X.scrollIntoView(e)})}});function Io(t){return t?[Le.of(t),ui]:ui}var mr=class{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||"",this.valid=!!this.search&&(!this.regexp||bu(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord,this.test=e.test}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(r,n)=>n=="n"?` +`:n=="r"?"\r":n=="t"?" ":"\\")}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord&&this.test==e.test}create(){return this.regexp?new Oi(this):new li(this)}getCursor(e,r=0,n){let i=e.doc?e:Qe.create({doc:e});return n==null&&(n=i.doc.length),this.regexp?st(this,i,r,n):it(this,i,r,n)}},gr=class{constructor(e){this.spec=e}};function Ru(t,e,r){return(n,i,s,a)=>{if(r&&!r(n,i,s,a))return!1;let o=n>=a&&i<=a+s.length?s.slice(n-a,i-a):e.doc.sliceString(n,i);return t(o,e,n,i)}}function it(t,e,r,n){let i;return t.wholeWord&&(i=ju(e.doc,e.charCategorizer(e.selection.main.head))),t.test&&(i=Ru(t.test,e,i)),new we(e.doc,t.unquoted,r,n,t.caseSensitive?void 0:s=>s.toLowerCase(),i)}function ju(t,e){return(r,n,i,s)=>((s>r||s+i.length<n)&&(s=Math.max(0,r-2),i=t.sliceString(s,Math.min(t.length,n+2))),(e(Qr(i,r-s))!=A.Word||e($r(i,r-s))!=A.Word)&&(e($r(i,n-s))!=A.Word||e(Qr(i,n-s))!=A.Word))}var li=class extends gr{constructor(e){super(e)}nextMatch(e,r,n){let i=it(this.spec,e,n,e.doc.length).nextOverlapping();if(i.done){let s=Math.min(e.doc.length,r+this.spec.unquoted.length);i=it(this.spec,e,0,s).nextOverlapping()}return i.done||i.value.from==r&&i.value.to==n?null:i.value}prevMatchInRange(e,r,n){for(let i=n;;){let s=Math.max(r,i-1e4-this.spec.unquoted.length),a=it(this.spec,e,s,i),o=null;for(;!a.nextOverlapping().done;)o=a.value;if(o)return o;if(s==r)return null;i-=1e4}}prevMatch(e,r,n){let i=this.prevMatchInRange(e,0,r);return i||(i=this.prevMatchInRange(e,Math.max(0,n-this.spec.unquoted.length),e.doc.length)),i&&(i.from!=r||i.to!=n)?i:null}getReplacement(e){return this.spec.unquote(this.spec.replace)}matchAll(e,r){let n=it(this.spec,e,0,e.doc.length),i=[];for(;!n.next().done;){if(i.length>=r)return null;i.push(n.value)}return i}highlight(e,r,n,i){let s=it(this.spec,e,Math.max(0,r-this.spec.unquoted.length),Math.min(n+this.spec.unquoted.length,e.doc.length));for(;!s.next().done;)i(s.value.from,s.value.to)}};function _u(t,e,r){return(n,i,s)=>(!r||r(n,i,s))&&t(s[0],e,n,i)}function st(t,e,r,n){let i;return t.wholeWord&&(i=Cu(e.charCategorizer(e.selection.main.head))),t.test&&(i=_u(t.test,e,i)),new ur(e.doc,t.search,{ignoreCase:!t.caseSensitive,test:i},r,n)}function Qr(t,e){return t.slice(_r(t,e,!1),e)}function $r(t,e){return t.slice(e,_r(t,e))}function Cu(t){return(e,r,n)=>!n[0].length||(t(Qr(n.input,n.index))!=A.Word||t($r(n.input,n.index))!=A.Word)&&(t($r(n.input,n.index+n[0].length))!=A.Word||t(Qr(n.input,n.index+n[0].length))!=A.Word)}var Oi=class extends gr{nextMatch(e,r,n){let i=st(this.spec,e,n,e.doc.length).next();return i.done&&(i=st(this.spec,e,0,r).next()),i.done?null:i.value}prevMatchInRange(e,r,n){for(let i=1;;i++){let s=Math.max(r,n-i*1e4),a=st(this.spec,e,s,n),o=null;for(;!a.next().done;)o=a.value;if(o&&(s==r||o.from>s+10))return o;if(s==r)return null}}prevMatch(e,r,n){return this.prevMatchInRange(e,0,r)||this.prevMatchInRange(e,n,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&]|\d+)/g,(r,n)=>{if(n=="&")return e.match[0];if(n=="$")return"$";for(let i=n.length;i>0;i--){let s=+n.slice(0,i);if(s>0&&s<e.match.length)return e.match[s]+n.slice(i)}return r})}matchAll(e,r){let n=st(this.spec,e,0,e.doc.length),i=[];for(;!n.next().done;){if(i.length>=r)return null;i.push(n.value)}return i}highlight(e,r,n,i){let s=st(this.spec,e,Math.max(0,r-250),Math.min(n+250,e.doc.length));for(;!s.next().done;)i(s.value.from,s.value.to)}},Tt=q.define(),fi=q.define(),xe=ie.define({create(t){return new vt(ci(t).create(),null)},update(t,e){for(let r of e.effects)r.is(Tt)?t=new vt(r.value.create(),t.panel):r.is(fi)&&(t=new vt(t.query,r.value?di:null));return t},provide:t=>ts.from(t,e=>e.panel)});var vt=class{constructor(e,r){this.query=e,this.panel=r}},Yu=v.mark({class:"cm-searchMatch"}),zu=v.mark({class:"cm-searchMatch cm-searchMatch-selected"}),qu=ve.fromClass(class{constructor(t){this.view=t,this.decorations=this.highlight(t.state.field(xe))}update(t){let e=t.state.field(xe);(e!=t.startState.field(xe)||t.docChanged||t.selectionSet||t.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:t,panel:e}){if(!e||!t.spec.valid)return v.none;let{view:r}=this,n=new Hi;for(let i=0,s=r.visibleRanges,a=s.length;i<a;i++){let{from:o,to:l}=s[i];for(;i<a-1&&l>s[i+1].from-500;)l=s[++i].to;t.highlight(r.state,o,l,(O,c)=>{let h=r.state.selection.ranges.some(p=>p.from==O&&p.to==c);n.add(O,c,h?zu:Yu)})}return n.finish()}},{decorations:t=>t.decorations});function Rt(t){return e=>{let r=e.state.field(xe,!1);return r&&r.query.spec.valid?t(e,r):No(e)}}var br=Rt((t,{query:e})=>{let{to:r}=t.state.selection.main,n=e.nextMatch(t.state,r,r);if(!n)return!1;let i=Z.single(n.from,n.to),s=t.state.facet(Le);return t.dispatch({selection:i,effects:[mi(t,n),s.scrollToMatch(i.main,t)],userEvent:"select.search"}),Bo(t),!0}),Sr=Rt((t,{query:e})=>{let{state:r}=t,{from:n}=r.selection.main,i=e.prevMatch(r,n,n);if(!i)return!1;let s=Z.single(i.from,i.to),a=t.state.facet(Le);return t.dispatch({selection:s,effects:[mi(t,i),a.scrollToMatch(s.main,t)],userEvent:"select.search"}),Bo(t),!0}),Au=Rt((t,{query:e})=>{let r=e.matchAll(t.state,1e3);return!r||!r.length?!1:(t.dispatch({selection:Z.create(r.map(n=>Z.range(n.from,n.to))),userEvent:"select.search.matches"}),!0)}),Lu=({state:t,dispatch:e})=>{let r=t.selection;if(r.ranges.length>1||r.main.empty)return!1;let{from:n,to:i}=r.main,s=[],a=0;for(let o=new we(t.doc,t.sliceDoc(n,i));!o.next().done;){if(s.length>1e3)return!1;o.value.from==n&&(a=s.length),s.push(Z.range(o.value.from,o.value.to))}return e(t.update({selection:Z.create(s,a),userEvent:"select.search.matches"})),!0},Mo=Rt((t,{query:e})=>{let{state:r}=t,{from:n,to:i}=r.selection.main;if(r.readOnly)return!1;let s=e.nextMatch(r,n,n);if(!s)return!1;let a=s,o=[],l,O,c=[];a.precise?a.from==n&&a.to==i&&(O=r.toText(e.getReplacement(a)),o.push({from:a.from,to:a.to,insert:O}),a=e.nextMatch(r,a.from,a.to),c.push(X.announce.of(r.phrase("replaced match on line $",r.doc.lineAt(n).number)+"."))):a=e.nextMatch(r,a.from,a.to);let h=t.state.changes(o);return a&&(l=Z.single(a.from,a.to).map(h),c.push(mi(t,a)),c.push(r.facet(Le).scrollToMatch(l.main,t))),t.dispatch({changes:h,selection:l,effects:c,userEvent:"input.replace"}),!0}),Eu=Rt((t,{query:e})=>{if(t.state.readOnly)return!1;let r=[];for(let i of e.matchAll(t.state,1e9)){let{from:s,to:a,precise:o}=i;o&&r.push({from:s,to:a,insert:e.getReplacement(i)})}if(!r.length)return!1;let n=t.state.phrase("replaced $ matches",r.length)+".";return t.dispatch({changes:r,effects:X.announce.of(n),userEvent:"input.replace.all"}),!0});function di(t){return t.state.facet(Le).createPanel(t)}function ci(t,e){var r,n,i,s,a;let o=t.selection.main,l=o.empty||o.to>o.from+100?"":t.sliceDoc(o.from,o.to);if(e&&!l)return e;let O=t.facet(Le);return new mr({search:((r=e?.literal)!==null&&r!==void 0?r:O.literal)?l:l.replace(/\n/g,"\\n"),caseSensitive:(n=e?.caseSensitive)!==null&&n!==void 0?n:O.caseSensitive,literal:(i=e?.literal)!==null&&i!==void 0?i:O.literal,regexp:(s=e?.regexp)!==null&&s!==void 0?s:O.regexp,wholeWord:(a=e?.wholeWord)!==null&&a!==void 0?a:O.wholeWord})}function Do(t){let e=qr(t,di);return e&&e.dom.querySelector("[main-field]")}function Bo(t){let e=Do(t);e&&e==t.root.activeElement&&e.select()}var No=t=>{let e=t.state.field(xe,!1);if(e&&e.panel){let r=Do(t);if(r&&r!=t.root.activeElement){let n=ci(t.state,e.query.spec);n.valid&&t.dispatch({effects:Tt.of(n)}),r.focus(),r.select()}}else t.dispatch({effects:[fi.of(!0),e?Tt.of(ci(t.state,e.query.spec)):q.appendConfig.of(ui)]});return!0},Fo=t=>{let e=t.state.field(xe,!1);if(!e||!e.panel)return!1;let r=qr(t,di);return r&&r.dom.contains(t.root.activeElement)&&t.focus(),t.dispatch({effects:fi.of(!1)}),!0},Ho=[{key:"Mod-f",run:No,scope:"editor search-panel"},{key:"F3",run:br,shift:Sr,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:br,shift:Sr,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:Fo,scope:"editor search-panel"},{key:"Mod-Shift-l",run:Lu},{key:"Mod-Alt-g",run:Su},{key:"Mod-d",run:Tu,preventDefault:!0}],hi=class{constructor(e){this.view=e;let r=this.query=e.state.field(xe).query.spec;this.commit=this.commit.bind(this),this.searchField=I("input",{value:r.search,placeholder:F(e,"Find"),"aria-label":F(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=I("input",{value:r.replace,placeholder:F(e,"Replace"),"aria-label":F(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=I("input",{type:"checkbox",name:"case",form:"",checked:r.caseSensitive,onchange:this.commit}),this.reField=I("input",{type:"checkbox",name:"re",form:"",checked:r.regexp,onchange:this.commit}),this.wordField=I("input",{type:"checkbox",name:"word",form:"",checked:r.wholeWord,onchange:this.commit});function n(i,s,a){return I("button",{class:"cm-button",name:i,onclick:s,type:"button"},a)}this.dom=I("div",{onkeydown:i=>this.keydown(i),class:"cm-search"},[this.searchField,n("next",()=>br(e),[F(e,"next")]),n("prev",()=>Sr(e),[F(e,"previous")]),n("select",()=>Au(e),[F(e,"all")]),I("label",null,[this.caseField,F(e,"match case")]),I("label",null,[this.reField,F(e,"regexp")]),I("label",null,[this.wordField,F(e,"by word")]),...e.state.readOnly?[]:[I("br"),this.replaceField,n("replace",()=>Mo(e),[F(e,"replace")]),n("replaceAll",()=>Eu(e),[F(e,"replace all")])],I("button",{name:"close",onclick:()=>Fo(e),"aria-label":F(e,"close"),type:"button"},["\xD7"])])}commit(){let e=new mr({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:Tt.of(e)}))}keydown(e){Ji(this.view,e,"search-panel")?e.preventDefault():e.keyCode==13&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?Sr:br)(this.view)):e.keyCode==13&&e.target==this.replaceField&&(e.preventDefault(),Mo(this.view))}update(e){for(let r of e.transactions)for(let n of r.effects)n.is(Tt)&&!n.value.eq(this.query)&&this.setQuery(n.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(Le).top}};function F(t,e){return t.state.phrase(e)}var cr=30,hr=/[\s\.,:;?!]/;function mi(t,{from:e,to:r}){let n=t.state.doc.lineAt(e),i=t.state.doc.lineAt(r).to,s=Math.max(n.from,e-cr),a=Math.min(i,r+cr),o=t.state.sliceDoc(s,a);if(s!=n.from){for(let l=0;l<cr;l++)if(!hr.test(o[l+1])&&hr.test(o[l])){o=o.slice(l);break}}if(a!=i){for(let l=o.length-1;l>o.length-cr;l--)if(!hr.test(o[l-1])&&hr.test(o[l])){o=o.slice(0,l);break}}return X.announce.of(`${t.state.phrase("current match")}. ${o} ${t.state.phrase("on line")} ${n.number}.`)}var Wu=X.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),ui=[xe,ge.low(qu),Wu];function Ee(t,e){return typeof document<"u"&&document.documentElement.lang.toLowerCase().startsWith("zh")?t:e}function de(t,e,r=""){let n=t.state.changeByRange(i=>{let{from:s,to:a}=i,o=t.state.sliceDoc(s-e.length,s),l=t.state.sliceDoc(a,a+e.length);if(o===e&&l===e)return{changes:[{from:s-e.length,to:s,insert:""},{from:a,to:a+e.length,insert:""}],range:Z.range(s-e.length,a-e.length)};let O=t.state.sliceDoc(s,a)||r;return{changes:{from:s,to:a,insert:e+O+e},range:Z.range(s+e.length,s+e.length+O.length)}});return t.dispatch(n,{scrollIntoView:!0,userEvent:"input"}),t.focus(),!0}function V(t,e){let{state:r}=t,n=[],i=new Set;for(let a of r.selection.ranges)for(let o=r.doc.lineAt(a.from).number;o<=r.doc.lineAt(a.to).number;o++)i.add(o);let s=/^(\s*)(#{1,6}\s+|>\s?|[-*+]\s+\[[ xX]\]\s+|[-*+]\s+|\d+[.)]\s+)?/;for(let a of i){let o=r.doc.line(a),l=s.exec(o.text),O=l[1],c=l[2]??"",h=o.from+O.length,p=h+c.length;n.push({from:h,to:p,insert:c===e?"":e})}return t.dispatch({changes:n,scrollIntoView:!0,userEvent:"input"}),t.focus(),!0}function gi(t,e,r=!1){let{state:n}=t,i=n.selection.main,s=e;if(r){let a=n.doc.lineAt(i.from);i.from===a.from||(s=` `+s);let l=n.doc.lineAt(i.to);(i.to!==l.to||l.number===n.doc.lines)&&(s+=` -`)}r.dispatch({changes:{from:i.from,to:i.to,insert:s},selection:{anchor:i.from+s.length},scrollIntoView:!0,userEvent:"input"}),r.focus()}function gi(r){let e=r.state.selection.main,t=r.state.sliceDoc(e.from,e.to)||"\u94FE\u63A5",n=`[${t}](https://)`;return r.dispatch({changes:{from:e.from,to:e.to,insert:n},selection:Z.range(e.from+t.length+3,e.from+n.length-1),userEvent:"input"}),r.focus(),!0}function Qi(r){let e=r.state.selection.main,t=r.state.sliceDoc(e.from,e.to);return r.dispatch({changes:{from:e.from,to:e.to,insert:`[[${t}]]`},selection:{anchor:e.from+2+t.length},userEvent:"input"}),r.focus(),!0}var Ho=null,Ko="",Wu=0,st=new Map;function bi(){return typeof document<"u"&&document.documentElement.dataset.theme==="dark"?"dark":"neutral"}async function Mu(){Ho??=import("./chunks/mermaid.core-3W6VKKIW.js").then(t=>t.default);let r=await Ho,e=bi();return Ko!==e&&(r.initialize({startOnLoad:!1,securityLevel:"strict",theme:e,fontFamily:"inherit"}),Ko=e),r}async function Uu(r){let e=bi()+` -`+r,t=st.get(e);if(t)return t;let n=await Mu(),i=`ivy-mermaid-${++Wu}`;try{let{svg:s}=await n.render(i,r);return st.size>64&&st.delete(st.keys().next().value),st.set(e,s),s}finally{document.getElementById("d"+i)?.remove(),document.getElementById(i)?.remove()}}function Vu(r,e){return r.classList.add("mermaid-diagram"),r.setAttribute("role","img"),r.setAttribute("aria-label","Mermaid"),Uu(e).then(n=>{r.innerHTML=n,r.classList.remove("mermaid-error")},n=>{r.classList.add("mermaid-error"),r.textContent="Mermaid: "+String(n?.message??n).split(` -`)[0]})}var $i=class extends ee{constructor(t){super();this.code=t}eq(t){return t.code===this.code}toDOM(){let t=document.createElement("div");t.className="cm-mermaid";let n=bi()+` -`+this.code,i=st.get(n);return i?(t.classList.add("mermaid-diagram"),t.innerHTML=i):(t.classList.add("cm-mermaid-loading"),Vu(t,this.code).finally(()=>t.classList.remove("cm-mermaid-loading"))),t}get estimatedHeight(){return 200}ignoreEvent(){return!1}};function Gu(r){let e=[];return R(r).iterate({enter(t){if(t.name!=="FencedCode")return;let n=t.node.getChild("CodeInfo");if(!n||r.sliceDoc(n.from,n.to).trim().toLowerCase()!=="mermaid")return!1;let i=t.node.getChild("CodeText");return e.push({from:t.from,to:t.to,code:i?r.sliceDoc(i.from,i.to):""}),!1}}),e}function Si(r,e,t){return r.selection.ranges.some(n=>n.from<=t&&n.to>=e)}var Jo=q.define();function el(r,e){let t=[];for(let n of Gu(r)){if(e&&Si(r,n.from,n.to)||!n.code.trim())continue;let i=r.doc.lineAt(n.from).from,s=r.doc.lineAt(n.to).to;t.push(v.replace({widget:new $i(n.code),block:!0}).range(i,s))}return v.set(t,!0)}function tl(){return[ie.define({create:e=>({focused:!1,deco:el(e,!1)}),update(e,t){let n=e.focused;for(let i of t.effects)i.is(Jo)&&(n=i.value);return n!==e.focused||t.docChanged||t.selection||R(t.startState)!==R(t.state)?{focused:n,deco:el(t.state,n)}:e},provide:e=>X.decorations.from(e,t=>t.deco)}),X.focusChangeEffect.of((e,t)=>Jo.of(t)),X.domEventHandlers({mousedown(e,t){let n=e.target.closest(".cm-mermaid");if(!n)return!1;let i=t.posAtDOM(n),s=t.state.doc.lineAt(i);e.preventDefault();let a=s.number<t.state.doc.lines?t.state.doc.line(s.number+1):s;return t.dispatch({selection:{anchor:a.from}}),t.focus(),!0}})]}function Iu(r){return r.replace(/[&<>"']/g,e=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[e])}function rl(r){let e=r.trim();return e.startsWith("|")&&(e=e.slice(1)),e.endsWith("|")&&!e.endsWith("\\|")&&(e=e.slice(0,-1)),e.split(/(?<!\\)\|/).map(t=>t.trim().replace(/\\\|/g,"|"))}function Du(r){let e=r.split(` -`).filter(i=>i.trim());if(e.length<2)return"";let t=rl(e[1]).map(i=>/^:-+:$/.test(i)?"center":/^-+:$/.test(i)?"right":""),n=(i,s)=>"<tr>"+rl(i).map((a,o)=>`<${s}${t[o]?` style="text-align:${t[o]}"`:""}>${Iu(a)}</${s}>`).join("")+"</tr>";return`<table><thead>${n(e[0],"th")}</thead><tbody>${e.slice(2).map(i=>n(i,"td")).join("")}</tbody></table>`}var ki=class extends ee{constructor(t,n){super();this.src=t;this.render=n}eq(t){return t.src===this.src}toDOM(){let t=document.createElement("div");return t.className="cm-table prose-ivy",t.innerHTML=this.render(this.src),t}ignoreEvent(){return!1}};function Bu(r){let e=[];return R(r).iterate({enter(t){if(t.name==="Table")return e.push({from:t.from,to:t.to}),!1;if(t.name==="FencedCode"||t.name==="CodeBlock")return!1}}),e}var nl=q.define();function sl(r,e,t){return r.selection.ranges.some(n=>n.from<=t&&n.to>=e)}function il(r,e,t){let n=[];for(let i of Bu(r)){if(e&&sl(r,i.from,i.to))continue;let s=r.doc.lineAt(i.from).from,a=r.doc.lineAt(i.to).to;n.push(v.replace({widget:new ki(r.sliceDoc(s,a),t),block:!0}).range(s,a))}return v.set(n,!0)}function al(r,e,t,n){return!(n&&sl(r,e,t))}function ol(r){let e=n=>r.renderBlock?.(n)||Du(n);return[ie.define({create:n=>({focused:!1,deco:il(n,!1,e)}),update(n,i){let s=n.focused;for(let a of i.effects)a.is(nl)&&(s=a.value);return s!==n.focused||i.docChanged||i.selection||R(i.startState)!==R(i.state)?{focused:s,deco:il(i.state,s,e)}:n},provide:n=>X.decorations.from(n,i=>i.deco)}),X.focusChangeEffect.of((n,i)=>nl.of(i)),X.domEventHandlers({mousedown(n,i){let s=n.target.closest(".cm-table");if(!s)return!1;let a=n.target.closest("a");if(n.preventDefault(),a?.dataset.note||a?.classList.contains("missing"))return r.openNote(a.dataset.note??"",a.dataset.title??a.textContent??"",n.button===1||n.shiftKey),!0;if(a?.href&&/^https?:/i.test(a.href))return window.open(a.href,"_blank","noopener"),!0;let o=i.posAtDOM(s),l=i.state.doc.lineAt(o),O=n.target.closest("tr"),c=[...s.querySelectorAll("tr")],h=O?c.indexOf(O):0;h>0&&h++;let p=i.state.doc.line(Math.min(l.number+Math.max(0,h),i.state.doc.lines));return i.dispatch({selection:{anchor:p.from+Math.min(2,p.length)}}),i.focus(),!0}})]}var Nu=/^ivy:\/\/res\/([A-Za-z0-9_-]{8,64})/,xi=class extends ee{constructor(t,n,i){super();this.src=t;this.alt=n;this.kind=i}eq(t){return t.src===this.src&&t.alt===this.alt&&t.kind===this.kind}toDOM(){let t=document.createElement("span");if(t.className="cm-media",this.kind==="video"||this.kind==="audio"){let n=document.createElement(this.kind);n.src=this.src,n.controls=!0,n.preload="metadata",t.appendChild(n)}else if(this.kind==="file"){let n=document.createElement("a");n.className="cm-file-card",n.href=this.src,n.target="_blank",n.rel="noopener",n.textContent="\u{1F4CE} "+(this.alt||"file"),t.appendChild(n)}else{let n=document.createElement("img");n.src=this.src,n.alt=this.alt,n.loading="lazy",n.onerror=()=>t.classList.add("cm-media-broken"),t.appendChild(n)}return t}ignoreEvent(){return!1}},wi=class extends ee{constructor(t,n){super();this.checked=t;this.pos=n}eq(t){return t.checked===this.checked&&t.pos===this.pos}toDOM(t){let n=document.createElement("input");return n.type="checkbox",n.className="cm-task",n.checked=this.checked,n.setAttribute("aria-label",this.checked?"\u5DF2\u5B8C\u6210":"\u5F85\u529E"),n.addEventListener("mousedown",i=>{i.preventDefault();let a=t.state.sliceDoc(this.pos,this.pos+3)==="[ ]"?"[x]":"[ ]";t.dispatch({changes:{from:this.pos,to:this.pos+3,insert:a}})}),n}ignoreEvent(){return!0}},yi=class extends ee{toDOM(){let e=document.createElement("span");return e.className="cm-hr-widget",e}eq(){return!0}},Zi=class extends ee{toDOM(){let e=document.createElement("span");return e.className="cm-bullet",e.textContent="\u2022",e}eq(){return!0}},se=v.replace({}),Pi=r=>v.line({class:r}),Rt=r=>v.mark({class:r});function Fu(r){let e=new Set;for(let t of r.selection.ranges){let n=r.doc.lineAt(t.from).number,i=r.doc.lineAt(t.to).number;for(let s=n;s<=i;s++)e.add(s)}return e}function Hu(r,e,t){return r.selection.ranges.some(n=>n.from<=t&&n.to>=e)}var Ku=/\[\[([^[\]\n]+?)\]\]/g;function ll(r,e,t){let{state:n}=r,i=[],s=t?Fu(n):new Set,a=c=>s.has(n.doc.lineAt(c).number),o=(c,h)=>t&&Hu(n,c,h),l=[];for(let{from:c,to:h}of r.visibleRanges){R(n).iterate({from:c,to:h,enter(u){let d=u.name,m=/^ATXHeading(\d)$/.exec(d);if(m){let g=n.doc.lineAt(u.from);if(i.push(Pi(`cm-h cm-h${m[1]}`).range(g.from)),!a(u.from)){let b=u.node.getChild("HeaderMark");b&&i.push(se.range(b.from,Math.min(b.to+1,g.to)))}return}switch(d){case"Table":return al(n,u.from,u.to,t)?!1:void 0;case"FencedCode":case"CodeBlock":{l.push([u.from,u.to]);let g=u.node.getChild("CodeInfo"),b=u.node.getChild("CodeText");if(g&&b&&n.sliceDoc(g.from,g.to).trim().toLowerCase()==="mermaid"&&n.sliceDoc(b.from,b.to).trim()&&!(t&&Si(n,u.from,u.to)))return!1;let Q=n.doc.lineAt(u.from).number,k=n.doc.lineAt(u.to).number;if(d==="FencedCode"&&!o(u.from,u.to)){let y=n.doc.line(Q),w=n.doc.line(k);y.to>y.from&&i.push(se.range(y.from,y.to)),k!==Q&&w.to>w.from&&/^\s*(```|~~~)/.test(w.text)&&i.push(se.range(w.from,w.to))}for(let y=Q;y<=k;y++){let w=n.doc.line(y),_="cm-codeblock";y===Q&&(_+=" cm-codeblock-first"),y===k&&(_+=" cm-codeblock-last"),i.push(Pi(_).range(w.from))}return!1}case"StrongEmphasis":case"Emphasis":case"Strikethrough":case"InlineCode":{let g=d==="StrongEmphasis"?"cm-strong":d==="Emphasis"?"cm-em":d==="Strikethrough"?"cm-strike":"cm-inline-code";if(i.push(Rt(g).range(u.from,u.to)),!o(u.from,u.to)){let b=d==="InlineCode"?"CodeMark":d==="Strikethrough"?"StrikethroughMark":"EmphasisMark",Q=u.node.firstChild;for(;Q;)Q.name===b&&i.push(se.range(Q.from,Q.to)),Q=Q.nextSibling}return d!=="InlineCode"}case"Link":{if(o(u.from,u.to))return;let g=u.node.getChildren("LinkMark"),b=u.node.getChild("URL");return g.length>=2&&(i.push(se.range(g[0].from,g[0].to)),i.push(Rt("cm-link").range(g[0].to,g[1].from)),i.push(se.range(g[1].from,u.to))),!1}case"Image":{let g=u.node.getChild("URL");if(!g)return!1;let b=n.sliceDoc(g.from,g.to),Q=Nu.exec(b),k=Q?e.resolveResource(Q[1]):b,y=Q?e.resourceKind(Q[1]):void 0,w=u.node.getChildren("LinkMark"),_=w.length>=2?n.sliceDoc(w[0].to,w[1].from):"";if(!k||/^javascript:/i.test(k))return!1;let G=new xi(k,_,y);return a(u.from)?i.push(v.widget({widget:G,side:1}).range(u.to)):i.push(v.replace({widget:G}).range(u.from,u.to)),!1}case"Blockquote":{let g=n.doc.lineAt(u.from).number,b=n.doc.lineAt(u.to).number;for(let Q=g;Q<=b;Q++)i.push(Pi("cm-quote").range(n.doc.line(Q).from));return}case"QuoteMark":{if(!a(u.from)){let g=n.sliceDoc(u.to,u.to+1)===" "?u.to+1:u.to;i.push(se.range(u.from,g))}return}case"HorizontalRule":{a(u.from)||i.push(v.replace({widget:new yi}).range(u.from,u.to));return}case"ListMark":{let g=n.sliceDoc(u.from,u.to),b=g==="-"||g==="*"||g==="+",Q=n.sliceDoc(u.to,u.to+4),k=/^ \[[ xX]\]/.test(Q);b&&!a(u.from)?k?i.push(se.range(u.from,u.to+1)):i.push(v.replace({widget:new Zi}).range(u.from,u.to)):i.push(Rt("cm-list-mark").range(u.from,u.to));return}case"TaskMarker":{let g=/x/i.test(n.sliceDoc(u.from,u.to));if(!o(u.from,u.to)&&(i.push(v.replace({widget:new wi(g,u.from)}).range(u.from,u.to)),g)){let b=n.doc.lineAt(u.from);u.to+1<b.to&&i.push(Rt("cm-task-done").range(u.to+1,b.to))}return}case"URL":{u.node.parent?.name!=="Link"&&u.node.parent?.name!=="Image"&&i.push(Rt("cm-link").range(u.from,u.to));return}}}});let p=n.sliceDoc(c,h);for(let u of p.matchAll(Ku)){let d=c+u.index,m=d+u[0].length;if(l.some(([w,_])=>d>=w&&m<=_))continue;let g=u[1],b=g.indexOf("|"),Q=(b>=0?g.slice(0,b):g).split("#")[0].trim(),k=!!e.resolveTitle(Q),y={"data-wiki":Q};if(o(d,m)){i.push(v.mark({class:"cm-wikilink cm-wikilink-src"+(k?"":" cm-wikilink-missing"),attributes:y}).range(d,m));continue}i.push(se.range(d,d+2+(b>=0?b+1:0))),i.push(v.mark({class:"cm-wikilink cm-wikilink-rendered"+(k?"":" cm-wikilink-missing"),attributes:y}).range(d+2+(b>=0?b+1:0),m-2)),i.push(se.range(m-2,m))}}let O=i.filter(c=>c.value.point===!0);return{all:v.set(i,!0),atomic:v.set(O,!0)}}function Ol(r){let e=ve.fromClass(class{decorations;atomic;constructor(t){let n=ll(t,r,t.hasFocus);this.decorations=n.all,this.atomic=n.atomic}update(t){if(t.docChanged||t.viewportChanged||t.selectionSet||t.focusChanged||R(t.startState)!==R(t.state)){let n=ll(t.view,r,t.view.hasFocus);this.decorations=n.all,this.atomic=n.atomic}}},{decorations:t=>t.decorations,eventHandlers:{mousedown(t,n){let i=t.target.closest(".cm-wikilink");if(!i)return!1;let s=i.classList.contains("cm-wikilink-rendered"),a=t.button===1||t.shiftKey;if(t.button>1||!s&&!(t.metaKey||t.ctrlKey||t.button===1))return!1;let o=i.dataset.wiki??"";return t.preventDefault(),r.openNote(r.resolveTitle(o),o,a),!0},click(t){let n=t.target.closest(".cm-link, .cm-file-card");return n&&(t.metaKey||t.ctrlKey)&&n instanceof HTMLAnchorElement?(window.open(n.href,"_blank","noopener"),!0):!1}}});return[e,tl(),ol(r),X.atomicRanges.of(t=>t.plugin(e)?.atomic??v.none)]}var cl=X.theme({"&":{color:"rgb(var(--ink))",backgroundColor:"transparent",height:"100%"},"&.cm-focused":{outline:"none"},".cm-scroller":{fontFamily:"inherit",lineHeight:"1.85",overflow:"visible"},".cm-content":{padding:"0 0 40vh",caretColor:"rgb(var(--ivy))"},".cm-line":{padding:"0"},".cm-cursor, .cm-dropCursor":{borderLeftColor:"rgb(var(--ivy))",borderLeftWidth:"2px"},"&.cm-focused .cm-selectionBackground, .cm-selectionBackground, ::selection":{backgroundColor:"rgb(var(--ivy) / 0.2) !important"},".cm-placeholder":{color:"rgb(var(--faint))"},".cm-tooltip":{border:"none",backgroundColor:"rgb(var(--surface))",borderRadius:"14px",boxShadow:"var(--shadow-lift)",overflow:"hidden"},".cm-tooltip-autocomplete > ul":{fontFamily:"inherit",maxHeight:"260px",padding:"4px"},".cm-tooltip-autocomplete > ul > li":{padding:"7px 10px",borderRadius:"10px",lineHeight:"1.4"},".cm-tooltip-autocomplete > ul > li[aria-selected]":{backgroundColor:"rgb(var(--sunken))",color:"rgb(var(--ink))"},".cm-completionDetail":{marginLeft:"8px",color:"rgb(var(--muted))",fontStyle:"normal",fontSize:"12px"},".cm-completionIcon":{display:"none"},".cm-panels":{backgroundColor:"rgb(var(--surface))",color:"rgb(var(--ink))",border:"none"},".cm-searchMatch":{backgroundColor:"rgb(var(--warn) / 0.3)"},".cm-searchMatch-selected":{backgroundColor:"rgb(var(--warn) / 0.55)"}}),hl=hs(cs.define([{tag:f.heading,fontWeight:"600"},{tag:f.strong,fontWeight:"600"},{tag:f.emphasis,fontStyle:"italic"},{tag:f.strikethrough,textDecoration:"line-through"},{tag:f.link,color:"rgb(var(--ivy))"},{tag:f.url,color:"rgb(var(--ivy))"},{tag:f.monospace,fontFamily:"var(--font-mono)",color:"rgb(var(--warn-ink))"},{tag:f.quote,color:"rgb(var(--ink-2))"},{tag:[f.processingInstruction,f.contentSeparator,f.meta],color:"rgb(var(--faint))"},{tag:f.labelName,color:"rgb(var(--muted))"}]));function ul(r){return e=>{let t=e.matchBefore(/\[\[[^\]\n|#]*$/);if(!t)return null;let n=t.text.slice(2).toLowerCase(),i=e.state.sliceDoc(e.pos,e.pos+2),s=[],a=new Set;for(let o of r())if(!(!o.title||a.has(o.title))&&(a.add(o.title),!(n&&!o.title.toLowerCase().includes(n))&&(s.push({label:o.title,detail:o.detail,type:"text",boost:o.title.toLowerCase().startsWith(n)?1:0,apply:(l,O,c,h)=>{let p=i==="]]"?"":"]]";l.dispatch({changes:{from:c,to:h,insert:O.label+p},selection:{anchor:c+O.label.length+2}})}}),s.length>=50)))break;if(n&&!a.has(t.text.slice(2))){let o=t.text.slice(2);s.push({label:o,detail:"\u65B0\u5EFA\u94FE\u63A5",type:"keyword",boost:-1,apply:(l,O,c,h)=>l.dispatch({changes:{from:c,to:h,insert:o+(i==="]]"?"":"]]")},selection:{anchor:c+o.length+2}})})}return{from:t.from+2,options:s,validFor:/^[^\]\n|#]*$/}}}function Sr(r){return r.trim().replace(/\s+/g," ").toLowerCase()}function pl(r){let e=r,t,n,i=e.indexOf("|");i>=0&&(t=e.slice(i+1).trim(),e=e.slice(0,i));let s=e.indexOf("#");return s>=0&&(n=e.slice(s+1).trim(),e=e.slice(0,s)),{target:e.trim(),alias:t,heading:n}}function Ri(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Ue=Ri();function xl(r){Ue=r}var We={exec:()=>null};function Ee(r){let e=[];return t=>{let n=Math.max(0,Math.min(3,t-1)),i=e[n];return i||(i=r(n),e[n]=i),i}}function x(r,e=""){let t=typeof r=="string"?r:r.source,n={replace:(i,s)=>{let a=typeof s=="string"?s:s.source;return a=a.replace(Y.caret,"$1"),t=t.replace(i,a),n},getRegex:()=>new RegExp(t,e)};return n}var wl=((r="")=>{try{return!!new RegExp("(?<=1)(?<!1)"+r)}catch{return!1}})(),Y={codeRemoveIndent:/^(?: {0,3}\t| {1,4})/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,endingSpaceTabChar:/[ \t]$/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,leadingSpaceTab:/^[ \t]+/,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+)[ \t]*)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,blockquoteMarkerWhitespace:/^( {0,3}>)([ \t]+)/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\][ \t]+\S/,listReplaceTask:/^\[[ xX]\][ \t]+/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,numericCharacterReference:/&#(?:(\d{1,7})|[Xx]([A-Fa-f0-9]{1,6}));/,numericCharacterReferenceOrAmpersand:/&#(?:(\d{1,7})|[Xx]([A-Fa-f0-9]{1,6}));|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:r=>new RegExp(`^( {0,3}${r})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:Ee(r=>new RegExp(`^ {0,${r}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:Ee(r=>new RegExp(`^ {0,${r}}((?:-[ ]*){3,}|(?:_[ ]*){3,}|(?:\\*[ ]*){3,})(?:\\n+|$)`)),fencesBeginRegex:Ee(r=>new RegExp(`^ {0,${r}}(?:\`\`\`|~~~)`)),headingBeginRegex:Ee(r=>new RegExp(`^ {0,${r}}#{1,6}(?:\\s|$)`)),pedanticHeadingBeginRegex:Ee(r=>new RegExp(`^ {0,${r}}#`)),htmlBeginRegex:Ee(r=>new RegExp(`^ {0,${r}}(?:</?(?:${Ct})(?: +|$|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)`,"i")),blockquoteBeginRegex:Ee(r=>new RegExp(`^ {0,${r}}>`))},Ju=/^(?:[ \t]*(?:\n|$))+/,ep=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,tp=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}(?:(?=`)\1`*|(?=~)\1~*) *(?=\n|$)|$)/,Yt=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,rp=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,ji=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,yl=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |fences|blockquote|heading|hr|html|table))+?)\n {0,3}(=+|-+)[ \t]*(?:\n+|$)/,Zl=x(yl).replace(/bull/g,ji).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/hr/g,/ {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),np=x(yl).replace(/bull/g,ji).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/hr/g,/ {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),_i=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/,ip=/^[^\n]+/,Yi=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\\n]|\n(?![ \t]*\n))+/,sp=x(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Yi).replace("title",/(?:"(?:\\[\s\S]|[^"\\])*"|'(?:\\[\s\S]|[^'\\\n]|\n(?!\n))*'|\((?:\\[\s\S]|[^()\\])*\))/).getRegex(),ap=x(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,ji).getRegex(),Ct="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Ci=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,op=x("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n*|$)|</?(tag)(?:[ \\t]+|\\n|/?>|$)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!(?:script|pre|style|textarea)(?![a-z0-9-]))([a-z][a-z0-9-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</[a-z][a-z0-9-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Ci).replace("tag",Ct).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Xl=r=>x(_i).replace("hr",Yt).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list",r).replace("html"," {0,3}(?:</?(?:tag)(?: +|\\n|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)").replace("tag",Ct).getRegex(),lp=Xl(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/),Op=Xl(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/),cp=x(/^( {0,3}> ?(?:(?![ \t]*(?:\n|$))(paragraph)|[^\n]*)(?:\n|$))+/).replace("paragraph",Op).getRegex(),zi={blockquote:cp,code:ep,def:sp,fences:tp,heading:rp,hr:Yt,html:op,lheading:Zl,list:ap,newline:Ju,paragraph:lp,table:We,text:ip},fl=x("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Yt).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html"," {0,3}(?:</?(?:tag)(?: +|\\n|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)").replace("tag",Ct).getRegex(),hp={...zi,lheading:np,table:fl,paragraph:x(_i).replace("hr",Yt).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",fl).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html"," {0,3}(?:</?(?:tag)(?: +|\\n|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)").replace("tag",Ct).getRegex()},up={...zi,html:x(`^ *(?:comment(?: *\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1>(?: *\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?>(?: *\\n{2,}|\\s*$))`).replace("comment",Ci).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:We,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:x(_i).replace("hr",Yt).replace("heading",` *#{1,6} *[^ -]`).replace("lheading",Zl).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},pp=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,fp=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,vl=/^( {2,}|\\)\n(?!\s*$)[ \t]*/,dp=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,ae=/[\p{P}\p{S}]/u,lt=/[\s\p{P}\p{S}]/u,zt=/[^\s\p{P}\p{S}]/u,mp=x(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,lt).getRegex(),gp=/[\p{Pi}\p{Ps}"']/u,Tl=/(?!~)[\p{P}\p{S}]/u,Qp=/(?!~)[\s\p{P}\p{S}]/u,$p=/(?:[^\s\p{P}\p{S}]|~)/u,bp=x(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",wl?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Rl=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,Sp=x(Rl,"u").replace(/punct/g,ae).getRegex(),kp=x(Rl,"u").replace(/punct/g,Tl).getRegex(),Pp=/^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/,xp=x(Pp,"u").replace(/openQuote/g,gp).replace(/punct/g,ae).getRegex(),jl="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",wp=x(jl,"gu").replace(/notPunctSpace/g,zt).replace(/punctSpace/g,lt).replace(/punct/g,ae).getRegex(),yp=x(jl,"gu").replace(/notPunctSpace/g,$p).replace(/punctSpace/g,Qp).replace(/punct/g,Tl).getRegex(),Zp="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)",Xp=x(Zp,"gu").replace(/notPunctSpace/g,zt).replace(/punctSpace/g,lt).replace(/punct/g,ae).getRegex(),vp=x("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,zt).replace(/punctSpace/g,lt).replace(/punct/g,ae).getRegex(),Tp="^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)",Rp=x(Tp,"gu").replace(/notPunctSpace/g,zt).replace(/punctSpace/g,lt).replace(/punct/g,ae).getRegex(),jp=x(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,ae).getRegex(),_p="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",Yp=x(_p,"gu").replace(/notPunctSpace/g,zt).replace(/punctSpace/g,lt).replace(/punct/g,ae).getRegex(),Cp=x(/\\(punct)/,"gu").replace(/punct/g,ae).getRegex(),zp=x(/(`+)(?:[^`]|[^`][\s\S]*?[^`])\1(?!`)|`+|\\(punct)/,"gu").replace(/punct/g,ae).getRegex(),qp=x(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Ap=x(Ci).replace("(?:-->|$)","-->").getRegex(),Lp=x("^comment|^</[a-zA-Z][a-zA-Z0-9-]*\\s*>|^<[a-zA-Z][a-zA-Z0-9-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Ap).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),_l=/\[(?:\\[\s\S]|[^\[\]\\])*\]/,xr=x(/(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/).replace("brackets",_l).getRegex(),Ep=x(/^!?\[(label)\]\([ \t\n]*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?[ \t\n]*\)/).replace("label",xr).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title",/"(?:\\[\s\S]|[^"\\])*"|'(?:\\[\s\S]|[^'\\])*'|\((?:\\[\s\S]|[^)\\])*\)/).getRegex(),Wp=x(/^!?\[(label)\]\[(ref)\]/).replace("label",xr).replace("ref",Yi).getRegex(),Mp=x(/^!?\[(ref)\](?:\[\])?/).replace("ref",Yi).getRegex(),dl=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\]){1,999}/,Up=x(/(?:[^\[\]\\`]*(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\]))){0,999}?[^\[\]\\`]*?/).replace("brackets",_l).getRegex(),Vp=x("reflink|nolink(?!\\()","g").replace("reflink",x(/^!?\[(label)\]\[(ref)\]/).replace("label",Up).replace("ref",dl).getRegex()).replace("nolink",x(/^!?\[(ref)\](?:\[\])?/).replace("ref",dl).getRegex()).getRegex(),ml=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Gp=/[A-Za-z0-9._+-]+@[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/,Ip=x(/(?:mailto:email|xmpp:email(?:\/[A-Za-z0-9@.]+)?)/).replace(/email/g,Gp).getRegex(),qi={_backpedal:We,anyPunctuation:Cp,anyPunctuationOutsideCode:zp,autolink:qp,blockSkip:bp,br:vl,code:fp,del:We,delLDelim:We,delRDelim:We,emStrongLDelim:Sp,emStrongRDelimAst:wp,emStrongRDelimUnd:vp,escape:pp,link:Ep,nolink:Mp,punctuation:mp,reflink:Wp,reflinkSearch:Vp,tag:Lp,text:dp,url:We},Dp={...qi,emStrongLDelim:xp,emStrongRDelimAst:Xp,emStrongRDelimUnd:Rp,link:x(/^!?\[(label)\]\((.*?)\)/).replace("label",xr).getRegex(),reflink:x(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",xr).getRegex()},Xi={...qi,emStrongRDelimAst:yp,emStrongLDelim:kp,delLDelim:jp,delRDelim:Yp,url:x(/^emailProtocol|^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("emailProtocol",Ip).replace("protocol",ml).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:x(/^(?:[^a-zA-Z0-9](?=emailProtocol)|(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|wwwStart|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9](?=emailProtocol)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))))/).replace("protocol",ml).replace(/emailProtocol/g,/(?:mailto|xmpp):/).replace("wwwStart",wl?"(?<![^\\s*_~(])www\\.":"www\\.").getRegex()},Bp={...Xi,br:x(vl).replace("{2,}","*").getRegex(),text:x(Xi.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},kr={normal:zi,gfm:hp,pedantic:up},jt={normal:qi,gfm:Xi,breaks:Bp,pedantic:Dp},Np={"&":"&","<":"<",">":">",'"':""","'":"'"},gl=r=>Np[r];function H(r,e){if(e){if(Y.escapeTest.test(r))return r.replace(Y.escapeReplace,gl)}else if(Y.escapeTestNoEncode.test(r))return r.replace(Y.escapeReplaceNoEncode,gl);return r}function Fp(r){return Y.numericCharacterReference.test(r)?r.replace(Y.numericCharacterReferenceOrAmpersand,(e,t,n)=>{if(t===void 0&&n===void 0)return"&";let i=t===void 0?Number.parseInt(n,16):Number.parseInt(t,10);return i===0||i>1114111||i>=55296&&i<=57343?"\uFFFD":i===38?"&":String.fromCodePoint(i)}):r}function Ql(r){try{r=encodeURI(r).replace(Y.percentDecode,"%")}catch{return null}return r}function $l(r,e){let t=r.replace(Y.findPipe,(s,a,o)=>{let l=!1,O=a;for(;--O>=0&&o[O]==="\\";)l=!l;return l?"|":" |"}),n=t.split(Y.splitPipe),i=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),e)if(n.length>e)n.splice(e);else for(;n.length<e;)n.push("");for(;i<n.length;i++)n[i]=n[i].trim().replace(Y.slashPipe,"|");return n}function me(r,e,t){let n=r.length;if(n===0)return"";let i=0;for(;i<n;){let s=r.charAt(n-i-1);if(s===e&&!t)i++;else if(s!==e&&t)i++;else break}return r.slice(0,n-i)}function bl(r){let e=r.split(` -`),t=e.length-1;for(;t>=0&&Y.blankLine.test(e[t]);)t--;return e.length-t<=2?r:e.slice(0,t+1).join(` -`)}function wr(r){return r.trim().replace(Y.multipleSpaceGlobal," ").toLowerCase().toUpperCase().toLowerCase()}function Sl(r,e){if(r.indexOf(e[0])===-1&&r.indexOf(e[1])===-1)return-1;let t=0;for(let n=0;n<r.length;n++)if(r[n]==="\\")n++;else if(r[n]===e[0])t++;else if(r[n]===e[1]&&(t--,t<0))return n;return t>0?-2:-1}var ot=new WeakMap;function Ai(r){let e={"*":-1,_:-1},t=-1,n=r.length;for(let i=0;i<n;i++){let s=r[i];if(s!=="*"&&s!=="_"&&s!=="~")continue;let a=i===0?` -`:r[i-1],o=i+1;for(;o<n&&r[o]===s;)o++;a!==" "&&a!==" "&&a!==` -`&&a!=="\r"&&a!=="\f"&&(s==="~"?t=i:e[s]=i),i=o-1}return{maskedSrc:r,lastPossibleEmStrongCloserIndex:e,lastPossibleDelCloserIndex:t}}function Hp(r,e){let t=Ai(e),n=ot.get(r);n?n.push(t):ot.set(r,[t])}function Kp(r){let e=ot.get(r);e&&(e.pop(),e.length===0&&ot.delete(r))}function Jp(r,e,t){let n=ot.get(r)?.at(-1);return n&&n.maskedSrc===e?n.lastPossibleEmStrongCloserIndex[t]:Ai(e).lastPossibleEmStrongCloserIndex[t]}function ef(r,e){let t=ot.get(r)?.at(-1);return t&&t.maskedSrc===e?t.lastPossibleDelCloserIndex:Ai(e).lastPossibleDelCloserIndex}function Pr(r,e=0){let t=e,n="";for(let i of r)if(i===" "){let s=4-t%4;n+=" ".repeat(s),t+=s}else n+=i,t++;return n}function kl(r,e,t,n,i){let s=e.href,a=e.title||null,o=r[1].replace(i.other.outputLinkReplace,"$1"),l=r[0].charAt(0)==="!",O=n.state.inLink,c=n.state.linkEmitted,h=n.state.inRawBlock;n.state.inLink=!0,n.state.linkEmitted=!1;let p=n.inlineTokens(o),u=n.state.linkEmitted;if(n.state.linkEmitted=c,n.state.inLink=O,!l){if(u){n.state.inRawBlock=h;return}n.state.linkEmitted=!0}return{type:l?"image":"link",raw:t,href:s,title:a,text:o,tokens:p}}function tf(r,e,t){let n=r.match(t.other.indentCodeCompensation);if(n===null)return e;let i=n[1];return e.split(` -`).map(s=>{let a=s.match(t.other.beginningSpace);if(a===null)return s;let[o]=a;return s.slice(Math.min(o.length,i.length))}).join(` -`)}function Pl(r,e,t,n){if(!e.includes("<"))return!1;for(let i=0;i<e.length;i++){if(e[i]==="\\"){i++;continue}if(e[i]==="`"){let o=n.inline.code.exec(e.slice(i));if(o){i+=o[0].length-1;continue}}if(e[i]!=="<")continue;let s=r.slice(t+i),a=n.inline.tag.exec(s)||n.inline.autolink.exec(s);if(a){if(a[0].length>e.length-i)return!0;i+=a[0].length-1}}return!1}var at=class{options;rules;lexer;constructor(r){this.options=r||Ue}space(r){let e=this.rules.block.newline.exec(r);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(r){let e=this.rules.block.code.exec(r);if(e){let t=this.options.pedantic?e[0]:bl(e[0]),n=t.replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t,codeBlockStyle:"indented",text:n}}}fences(r){let e=this.rules.block.fences.exec(r);if(e){let t=e[0],n=tf(t,e[3]||"",this.rules);return{type:"code",raw:t,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:n}}}heading(r){let e=this.rules.block.heading.exec(r);if(e){let t=e[2].trim();if(this.rules.other.endingHash.test(t)){let n=me(t,"#");(this.options.pedantic||!n||this.rules.other.endingSpaceTabChar.test(n))&&(t=n.trim())}return{type:"heading",raw:me(e[0],` -`),depth:e[1].length,text:t,tokens:this.lexer.inline(t)}}}hr(r){let e=this.rules.block.hr.exec(r);if(e)return{type:"hr",raw:me(e[0],` -`)}}blockquote(r){let e=this.rules.block.blockquote.exec(r);if(e){let t=me(e[0],` +`)}t.dispatch({changes:{from:i.from,to:i.to,insert:s},selection:{anchor:i.from+s.length},scrollIntoView:!0,userEvent:"input"}),t.focus()}function Qi(t){let e=t.state.selection.main,r=t.state.sliceDoc(e.from,e.to)||Ee("\u94FE\u63A5","link"),n=`[${r}](https://)`;return t.dispatch({changes:{from:e.from,to:e.to,insert:n},selection:Z.range(e.from+r.length+3,e.from+n.length-1),userEvent:"input"}),t.focus(),!0}function $i(t){let e=t.state.selection.main,r=t.state.sliceDoc(e.from,e.to);return t.dispatch({changes:{from:e.from,to:e.to,insert:`[[${r}]]`},selection:{anchor:e.from+2+r.length},userEvent:"input"}),t.focus(),!0}var Ko=null,Jo="",Mu=0,at=new Map;function Si(){return typeof document<"u"&&document.documentElement.dataset.theme==="dark"?"dark":"neutral"}async function Uu(){Ko??=import("./chunks/mermaid.core-3W6VKKIW.js").then(r=>r.default);let t=await Ko,e=Si();return Jo!==e&&(t.initialize({startOnLoad:!1,securityLevel:"strict",theme:e,fontFamily:"inherit"}),Jo=e),t}async function Vu(t){let e=Si()+` +`+t,r=at.get(e);if(r)return r;let n=await Uu(),i=`ivy-mermaid-${++Mu}`;try{let{svg:s}=await n.render(i,t);return at.size>64&&at.delete(at.keys().next().value),at.set(e,s),s}finally{document.getElementById("d"+i)?.remove(),document.getElementById(i)?.remove()}}function Gu(t,e){return t.classList.add("mermaid-diagram"),t.setAttribute("role","img"),t.setAttribute("aria-label","Mermaid"),Vu(e).then(n=>{t.innerHTML=n,t.classList.remove("mermaid-error")},n=>{t.classList.add("mermaid-error"),t.textContent="Mermaid: "+String(n?.message??n).split(` +`)[0]})}var bi=class extends ee{constructor(r){super();this.code=r}eq(r){return r.code===this.code}toDOM(){let r=document.createElement("div");r.className="cm-mermaid";let n=Si()+` +`+this.code,i=at.get(n);return i?(r.classList.add("mermaid-diagram"),r.innerHTML=i):(r.classList.add("cm-mermaid-loading"),Gu(r,this.code).finally(()=>r.classList.remove("cm-mermaid-loading"))),r}get estimatedHeight(){return 200}ignoreEvent(){return!1}};function Iu(t){let e=[];return R(t).iterate({enter(r){if(r.name!=="FencedCode")return;let n=r.node.getChild("CodeInfo");if(!n||t.sliceDoc(n.from,n.to).trim().toLowerCase()!=="mermaid")return!1;let i=r.node.getChild("CodeText");return e.push({from:r.from,to:r.to,code:i?t.sliceDoc(i.from,i.to):""}),!1}}),e}function ki(t,e,r){return t.selection.ranges.some(n=>n.from<=r&&n.to>=e)}var el=q.define();function tl(t,e){let r=[];for(let n of Iu(t)){if(e&&ki(t,n.from,n.to)||!n.code.trim())continue;let i=t.doc.lineAt(n.from).from,s=t.doc.lineAt(n.to).to;r.push(v.replace({widget:new bi(n.code),block:!0}).range(i,s))}return v.set(r,!0)}function rl(){return[ie.define({create:e=>({focused:!1,deco:tl(e,!1)}),update(e,r){let n=e.focused;for(let i of r.effects)i.is(el)&&(n=i.value);return n!==e.focused||r.docChanged||r.selection||R(r.startState)!==R(r.state)?{focused:n,deco:tl(r.state,n)}:e},provide:e=>X.decorations.from(e,r=>r.deco)}),X.focusChangeEffect.of((e,r)=>el.of(r)),X.domEventHandlers({mousedown(e,r){let n=e.target.closest(".cm-mermaid");if(!n)return!1;let i=r.posAtDOM(n),s=r.state.doc.lineAt(i);e.preventDefault();let a=s.number<r.state.doc.lines?r.state.doc.line(s.number+1):s;return r.dispatch({selection:{anchor:a.from}}),r.focus(),!0}})]}function Du(t){return t.replace(/[&<>"']/g,e=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[e])}function nl(t){let e=t.trim();return e.startsWith("|")&&(e=e.slice(1)),e.endsWith("|")&&!e.endsWith("\\|")&&(e=e.slice(0,-1)),e.split(/(?<!\\)\|/).map(r=>r.trim().replace(/\\\|/g,"|"))}function Bu(t){let e=t.split(` +`).filter(i=>i.trim());if(e.length<2)return"";let r=nl(e[1]).map(i=>/^:-+:$/.test(i)?"center":/^-+:$/.test(i)?"right":""),n=(i,s)=>"<tr>"+nl(i).map((a,o)=>`<${s}${r[o]?` style="text-align:${r[o]}"`:""}>${Du(a)}</${s}>`).join("")+"</tr>";return`<table><thead>${n(e[0],"th")}</thead><tbody>${e.slice(2).map(i=>n(i,"td")).join("")}</tbody></table>`}var Pi=class extends ee{constructor(r,n){super();this.src=r;this.render=n}eq(r){return r.src===this.src}toDOM(){let r=document.createElement("div");return r.className="cm-table prose-ivy",r.innerHTML=this.render(this.src),r}ignoreEvent(){return!1}};function Nu(t){let e=[];return R(t).iterate({enter(r){if(r.name==="Table")return e.push({from:r.from,to:r.to}),!1;if(r.name==="FencedCode"||r.name==="CodeBlock")return!1}}),e}var il=q.define();function al(t,e,r){return t.selection.ranges.some(n=>n.from<=r&&n.to>=e)}function sl(t,e,r){let n=[];for(let i of Nu(t)){if(e&&al(t,i.from,i.to))continue;let s=t.doc.lineAt(i.from).from,a=t.doc.lineAt(i.to).to;n.push(v.replace({widget:new Pi(t.sliceDoc(s,a),r),block:!0}).range(s,a))}return v.set(n,!0)}function ol(t,e,r,n){return!(n&&al(t,e,r))}function ll(t){let e=n=>t.renderBlock?.(n)||Bu(n);return[ie.define({create:n=>({focused:!1,deco:sl(n,!1,e)}),update(n,i){let s=n.focused;for(let a of i.effects)a.is(il)&&(s=a.value);return s!==n.focused||i.docChanged||i.selection||R(i.startState)!==R(i.state)?{focused:s,deco:sl(i.state,s,e)}:n},provide:n=>X.decorations.from(n,i=>i.deco)}),X.focusChangeEffect.of((n,i)=>il.of(i)),X.domEventHandlers({mousedown(n,i){let s=n.target.closest(".cm-table");if(!s)return!1;let a=n.target.closest("a");if(n.preventDefault(),a?.dataset.note||a?.classList.contains("missing"))return t.openNote(a.dataset.note??"",a.dataset.title??a.textContent??"",n.button===1||n.shiftKey),!0;if(a?.href&&/^https?:/i.test(a.href))return window.open(a.href,"_blank","noopener"),!0;let o=i.posAtDOM(s),l=i.state.doc.lineAt(o),O=n.target.closest("tr"),c=[...s.querySelectorAll("tr")],h=O?c.indexOf(O):0;h>0&&h++;let p=i.state.doc.line(Math.min(l.number+Math.max(0,h),i.state.doc.lines));return i.dispatch({selection:{anchor:p.from+Math.min(2,p.length)}}),i.focus(),!0}})]}var Fu=/^ivy:\/\/res\/([A-Za-z0-9_-]{8,64})/,wi=class extends ee{constructor(r,n,i){super();this.src=r;this.alt=n;this.kind=i}eq(r){return r.src===this.src&&r.alt===this.alt&&r.kind===this.kind}toDOM(){let r=document.createElement("span");if(r.className="cm-media",this.kind==="video"||this.kind==="audio"){let n=document.createElement(this.kind);n.src=this.src,n.controls=!0,n.preload="metadata",r.appendChild(n)}else if(this.kind==="file"){let n=document.createElement("a");n.className="cm-file-card",n.href=this.src,n.target="_blank",n.rel="noopener",n.textContent="\u{1F4CE} "+(this.alt||"file"),r.appendChild(n)}else{let n=document.createElement("img");n.src=this.src,n.alt=this.alt,n.loading="lazy",n.onerror=()=>r.classList.add("cm-media-broken"),r.appendChild(n)}return r}ignoreEvent(){return!1}},yi=class extends ee{constructor(r,n){super();this.checked=r;this.pos=n}eq(r){return r.checked===this.checked&&r.pos===this.pos}toDOM(r){let n=document.createElement("input");return n.type="checkbox",n.className="cm-task",n.checked=this.checked,n.setAttribute("aria-label",this.checked?Ee("\u5DF2\u5B8C\u6210","Done"):Ee("\u5F85\u529E","To-do")),n.addEventListener("mousedown",i=>{i.preventDefault();let a=r.state.sliceDoc(this.pos,this.pos+3)==="[ ]"?"[x]":"[ ]";r.dispatch({changes:{from:this.pos,to:this.pos+3,insert:a}})}),n}ignoreEvent(){return!0}},Zi=class extends ee{toDOM(){let e=document.createElement("span");return e.className="cm-hr-widget",e}eq(){return!0}},Xi=class extends ee{toDOM(){let e=document.createElement("span");return e.className="cm-bullet",e.textContent="\u2022",e}eq(){return!0}},se=v.replace({}),xi=t=>v.line({class:t}),jt=t=>v.mark({class:t});function Hu(t){let e=new Set;for(let r of t.selection.ranges){let n=t.doc.lineAt(r.from).number,i=t.doc.lineAt(r.to).number;for(let s=n;s<=i;s++)e.add(s)}return e}function Ku(t,e,r){return t.selection.ranges.some(n=>n.from<=r&&n.to>=e)}var Ju=/\[\[([^[\]\n]+?)\]\]/g;function Ol(t,e,r){let{state:n}=t,i=[],s=r?Hu(n):new Set,a=c=>s.has(n.doc.lineAt(c).number),o=(c,h)=>r&&Ku(n,c,h),l=[];for(let{from:c,to:h}of t.visibleRanges){R(n).iterate({from:c,to:h,enter(u){let d=u.name,m=/^ATXHeading(\d)$/.exec(d);if(m){let g=n.doc.lineAt(u.from);if(i.push(xi(`cm-h cm-h${m[1]}`).range(g.from)),!a(u.from)){let b=u.node.getChild("HeaderMark");b&&i.push(se.range(b.from,Math.min(b.to+1,g.to)))}return}switch(d){case"Table":return ol(n,u.from,u.to,r)?!1:void 0;case"FencedCode":case"CodeBlock":{l.push([u.from,u.to]);let g=u.node.getChild("CodeInfo"),b=u.node.getChild("CodeText");if(g&&b&&n.sliceDoc(g.from,g.to).trim().toLowerCase()==="mermaid"&&n.sliceDoc(b.from,b.to).trim()&&!(r&&ki(n,u.from,u.to)))return!1;let Q=n.doc.lineAt(u.from).number,k=n.doc.lineAt(u.to).number;if(d==="FencedCode"&&!o(u.from,u.to)){let y=n.doc.line(Q),w=n.doc.line(k);y.to>y.from&&i.push(se.range(y.from,y.to)),k!==Q&&w.to>w.from&&/^\s*(```|~~~)/.test(w.text)&&i.push(se.range(w.from,w.to))}for(let y=Q;y<=k;y++){let w=n.doc.line(y),_="cm-codeblock";y===Q&&(_+=" cm-codeblock-first"),y===k&&(_+=" cm-codeblock-last"),i.push(xi(_).range(w.from))}return!1}case"StrongEmphasis":case"Emphasis":case"Strikethrough":case"InlineCode":{let g=d==="StrongEmphasis"?"cm-strong":d==="Emphasis"?"cm-em":d==="Strikethrough"?"cm-strike":"cm-inline-code";if(i.push(jt(g).range(u.from,u.to)),!o(u.from,u.to)){let b=d==="InlineCode"?"CodeMark":d==="Strikethrough"?"StrikethroughMark":"EmphasisMark",Q=u.node.firstChild;for(;Q;)Q.name===b&&i.push(se.range(Q.from,Q.to)),Q=Q.nextSibling}return d!=="InlineCode"}case"Link":{if(o(u.from,u.to))return;let g=u.node.getChildren("LinkMark"),b=u.node.getChild("URL");return g.length>=2&&(i.push(se.range(g[0].from,g[0].to)),i.push(jt("cm-link").range(g[0].to,g[1].from)),i.push(se.range(g[1].from,u.to))),!1}case"Image":{let g=u.node.getChild("URL");if(!g)return!1;let b=n.sliceDoc(g.from,g.to),Q=Fu.exec(b),k=Q?e.resolveResource(Q[1]):b,y=Q?e.resourceKind(Q[1]):void 0,w=u.node.getChildren("LinkMark"),_=w.length>=2?n.sliceDoc(w[0].to,w[1].from):"";if(!k||/^javascript:/i.test(k))return!1;let G=new wi(k,_,y);return a(u.from)?i.push(v.widget({widget:G,side:1}).range(u.to)):i.push(v.replace({widget:G}).range(u.from,u.to)),!1}case"Blockquote":{let g=n.doc.lineAt(u.from).number,b=n.doc.lineAt(u.to).number;for(let Q=g;Q<=b;Q++)i.push(xi("cm-quote").range(n.doc.line(Q).from));return}case"QuoteMark":{if(!a(u.from)){let g=n.sliceDoc(u.to,u.to+1)===" "?u.to+1:u.to;i.push(se.range(u.from,g))}return}case"HorizontalRule":{a(u.from)||i.push(v.replace({widget:new Zi}).range(u.from,u.to));return}case"ListMark":{let g=n.sliceDoc(u.from,u.to),b=g==="-"||g==="*"||g==="+",Q=n.sliceDoc(u.to,u.to+4),k=/^ \[[ xX]\]/.test(Q);b&&!a(u.from)?k?i.push(se.range(u.from,u.to+1)):i.push(v.replace({widget:new Xi}).range(u.from,u.to)):i.push(jt("cm-list-mark").range(u.from,u.to));return}case"TaskMarker":{let g=/x/i.test(n.sliceDoc(u.from,u.to));if(!o(u.from,u.to)&&(i.push(v.replace({widget:new yi(g,u.from)}).range(u.from,u.to)),g)){let b=n.doc.lineAt(u.from);u.to+1<b.to&&i.push(jt("cm-task-done").range(u.to+1,b.to))}return}case"URL":{u.node.parent?.name!=="Link"&&u.node.parent?.name!=="Image"&&i.push(jt("cm-link").range(u.from,u.to));return}}}});let p=n.sliceDoc(c,h);for(let u of p.matchAll(Ju)){let d=c+u.index,m=d+u[0].length;if(l.some(([w,_])=>d>=w&&m<=_))continue;let g=u[1],b=g.indexOf("|"),Q=(b>=0?g.slice(0,b):g).split("#")[0].trim(),k=!!e.resolveTitle(Q),y={"data-wiki":Q};if(o(d,m)){i.push(v.mark({class:"cm-wikilink cm-wikilink-src"+(k?"":" cm-wikilink-missing"),attributes:y}).range(d,m));continue}i.push(se.range(d,d+2+(b>=0?b+1:0))),i.push(v.mark({class:"cm-wikilink cm-wikilink-rendered"+(k?"":" cm-wikilink-missing"),attributes:y}).range(d+2+(b>=0?b+1:0),m-2)),i.push(se.range(m-2,m))}}let O=i.filter(c=>c.value.point===!0);return{all:v.set(i,!0),atomic:v.set(O,!0)}}function cl(t){let e=ve.fromClass(class{decorations;atomic;constructor(r){let n=Ol(r,t,r.hasFocus);this.decorations=n.all,this.atomic=n.atomic}update(r){if(r.docChanged||r.viewportChanged||r.selectionSet||r.focusChanged||R(r.startState)!==R(r.state)){let n=Ol(r.view,t,r.view.hasFocus);this.decorations=n.all,this.atomic=n.atomic}}},{decorations:r=>r.decorations,eventHandlers:{mousedown(r,n){let i=r.target.closest(".cm-wikilink");if(!i)return!1;let s=i.classList.contains("cm-wikilink-rendered"),a=r.button===1||r.shiftKey;if(r.button>1||!s&&!(r.metaKey||r.ctrlKey||r.button===1))return!1;let o=i.dataset.wiki??"";return r.preventDefault(),t.openNote(t.resolveTitle(o),o,a),!0},click(r){let n=r.target.closest(".cm-link, .cm-file-card");return n&&(r.metaKey||r.ctrlKey)&&n instanceof HTMLAnchorElement?(window.open(n.href,"_blank","noopener"),!0):!1}}});return[e,rl(),ll(t),X.atomicRanges.of(r=>r.plugin(e)?.atomic??v.none)]}var hl=X.theme({"&":{color:"rgb(var(--ink))",backgroundColor:"transparent",height:"100%"},"&.cm-focused":{outline:"none"},".cm-scroller":{fontFamily:"inherit",lineHeight:"1.85",overflow:"visible"},".cm-content":{padding:"0 0 40vh",caretColor:"rgb(var(--ivy))"},".cm-line":{padding:"0"},".cm-cursor, .cm-dropCursor":{borderLeftColor:"rgb(var(--ivy))",borderLeftWidth:"2px"},"&.cm-focused .cm-selectionBackground, .cm-selectionBackground, ::selection":{backgroundColor:"rgb(var(--ivy) / 0.2) !important"},".cm-placeholder":{color:"rgb(var(--faint))"},".cm-tooltip":{border:"none",backgroundColor:"rgb(var(--surface))",borderRadius:"14px",boxShadow:"var(--shadow-lift)",overflow:"hidden"},".cm-tooltip-autocomplete > ul":{fontFamily:"inherit",maxHeight:"260px",padding:"4px"},".cm-tooltip-autocomplete > ul > li":{padding:"7px 10px",borderRadius:"10px",lineHeight:"1.4"},".cm-tooltip-autocomplete > ul > li[aria-selected]":{backgroundColor:"rgb(var(--sunken))",color:"rgb(var(--ink))"},".cm-completionDetail":{marginLeft:"8px",color:"rgb(var(--muted))",fontStyle:"normal",fontSize:"12px"},".cm-completionIcon":{display:"none"},".cm-panels":{backgroundColor:"rgb(var(--surface))",color:"rgb(var(--ink))",border:"none"},".cm-searchMatch":{backgroundColor:"rgb(var(--warn) / 0.3)"},".cm-searchMatch-selected":{backgroundColor:"rgb(var(--warn) / 0.55)"}}),ul=us(hs.define([{tag:f.heading,fontWeight:"600"},{tag:f.strong,fontWeight:"600"},{tag:f.emphasis,fontStyle:"italic"},{tag:f.strikethrough,textDecoration:"line-through"},{tag:f.link,color:"rgb(var(--ivy))"},{tag:f.url,color:"rgb(var(--ivy))"},{tag:f.monospace,fontFamily:"var(--font-mono)",color:"rgb(var(--warn-ink))"},{tag:f.quote,color:"rgb(var(--ink-2))"},{tag:[f.processingInstruction,f.contentSeparator,f.meta],color:"rgb(var(--faint))"},{tag:f.labelName,color:"rgb(var(--muted))"}]));function pl(t){return e=>{let r=e.matchBefore(/\[\[[^\]\n|#]*$/);if(!r)return null;let n=r.text.slice(2).toLowerCase(),i=e.state.sliceDoc(e.pos,e.pos+2),s=[],a=new Set;for(let o of t())if(!(!o.title||a.has(o.title))&&(a.add(o.title),!(n&&!o.title.toLowerCase().includes(n))&&(s.push({label:o.title,detail:o.detail,type:"text",boost:o.title.toLowerCase().startsWith(n)?1:0,apply:(l,O,c,h)=>{let p=i==="]]"?"":"]]";l.dispatch({changes:{from:c,to:h,insert:O.label+p},selection:{anchor:c+O.label.length+2}})}}),s.length>=50)))break;if(n&&!a.has(r.text.slice(2))){let o=r.text.slice(2);s.push({label:o,detail:Ee("\u65B0\u5EFA\u94FE\u63A5","New link"),type:"keyword",boost:-1,apply:(l,O,c,h)=>l.dispatch({changes:{from:c,to:h,insert:o+(i==="]]"?"":"]]")},selection:{anchor:c+o.length+2}})})}return{from:r.from+2,options:s,validFor:/^[^\]\n|#]*$/}}}function kr(t){return t.trim().replace(/\s+/g," ").toLowerCase()}function fl(t){let e=t,r,n,i=e.indexOf("|");i>=0&&(r=e.slice(i+1).trim(),e=e.slice(0,i));let s=e.indexOf("#");return s>=0&&(n=e.slice(s+1).trim(),e=e.slice(0,s)),{target:e.trim(),alias:r,heading:n}}function ji(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Ve=ji();function wl(t){Ve=t}var Me={exec:()=>null};function We(t){let e=[];return r=>{let n=Math.max(0,Math.min(3,r-1)),i=e[n];return i||(i=t(n),e[n]=i),i}}function x(t,e=""){let r=typeof t=="string"?t:t.source,n={replace:(i,s)=>{let a=typeof s=="string"?s:s.source;return a=a.replace(C.caret,"$1"),r=r.replace(i,a),n},getRegex:()=>new RegExp(r,e)};return n}var yl=((t="")=>{try{return!!new RegExp("(?<=1)(?<!1)"+t)}catch{return!1}})(),C={codeRemoveIndent:/^(?: {0,3}\t| {1,4})/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,endingSpaceTabChar:/[ \t]$/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,leadingSpaceTab:/^[ \t]+/,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+)[ \t]*)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,blockquoteMarkerWhitespace:/^( {0,3}>)([ \t]+)/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\][ \t]+\S/,listReplaceTask:/^\[[ xX]\][ \t]+/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,numericCharacterReference:/&#(?:(\d{1,7})|[Xx]([A-Fa-f0-9]{1,6}));/,numericCharacterReferenceOrAmpersand:/&#(?:(\d{1,7})|[Xx]([A-Fa-f0-9]{1,6}));|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:We(t=>new RegExp(`^ {0,${t}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:We(t=>new RegExp(`^ {0,${t}}((?:-[ ]*){3,}|(?:_[ ]*){3,}|(?:\\*[ ]*){3,})(?:\\n+|$)`)),fencesBeginRegex:We(t=>new RegExp(`^ {0,${t}}(?:\`\`\`|~~~)`)),headingBeginRegex:We(t=>new RegExp(`^ {0,${t}}#{1,6}(?:\\s|$)`)),pedanticHeadingBeginRegex:We(t=>new RegExp(`^ {0,${t}}#`)),htmlBeginRegex:We(t=>new RegExp(`^ {0,${t}}(?:</?(?:${zt})(?: +|$|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)`,"i")),blockquoteBeginRegex:We(t=>new RegExp(`^ {0,${t}}>`))},ep=/^(?:[ \t]*(?:\n|$))+/,tp=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,rp=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}(?:(?=`)\1`*|(?=~)\1~*) *(?=\n|$)|$)/,Yt=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,np=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,_i=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,Zl=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |fences|blockquote|heading|hr|html|table))+?)\n {0,3}(=+|-+)[ \t]*(?:\n+|$)/,Xl=x(Zl).replace(/bull/g,_i).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/hr/g,/ {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),ip=x(Zl).replace(/bull/g,_i).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/hr/g,/ {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Ci=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/,sp=/^[^\n]+/,Yi=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\\n]|\n(?![ \t]*\n))+/,ap=x(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Yi).replace("title",/(?:"(?:\\[\s\S]|[^"\\])*"|'(?:\\[\s\S]|[^'\\\n]|\n(?!\n))*'|\((?:\\[\s\S]|[^()\\])*\))/).getRegex(),op=x(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,_i).getRegex(),zt="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",zi=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,lp=x("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n*|$)|</?(tag)(?:[ \\t]+|\\n|/?>|$)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!(?:script|pre|style|textarea)(?![a-z0-9-]))([a-z][a-z0-9-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</[a-z][a-z0-9-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",zi).replace("tag",zt).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),vl=t=>x(Ci).replace("hr",Yt).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list",t).replace("html"," {0,3}(?:</?(?:tag)(?: +|\\n|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)").replace("tag",zt).getRegex(),Op=vl(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/),cp=vl(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/),hp=x(/^( {0,3}> ?(?:(?![ \t]*(?:\n|$))(paragraph)|[^\n]*)(?:\n|$))+/).replace("paragraph",cp).getRegex(),qi={blockquote:hp,code:tp,def:ap,fences:rp,heading:np,hr:Yt,html:lp,lheading:Xl,list:op,newline:ep,paragraph:Op,table:Me,text:sp},dl=x("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Yt).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html"," {0,3}(?:</?(?:tag)(?: +|\\n|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)").replace("tag",zt).getRegex(),up={...qi,lheading:ip,table:dl,paragraph:x(Ci).replace("hr",Yt).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",dl).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html"," {0,3}(?:</?(?:tag)(?: +|\\n|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)").replace("tag",zt).getRegex()},pp={...qi,html:x(`^ *(?:comment(?: *\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1>(?: *\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?>(?: *\\n{2,}|\\s*$))`).replace("comment",zi).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Me,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:x(Ci).replace("hr",Yt).replace("heading",` *#{1,6} *[^ +]`).replace("lheading",Xl).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},fp=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,dp=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Tl=/^( {2,}|\\)\n(?!\s*$)[ \t]*/,mp=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,ae=/[\p{P}\p{S}]/u,Ot=/[\s\p{P}\p{S}]/u,qt=/[^\s\p{P}\p{S}]/u,gp=x(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Ot).getRegex(),Qp=/[\p{Pi}\p{Ps}"']/u,Rl=/(?!~)[\p{P}\p{S}]/u,$p=/(?!~)[\s\p{P}\p{S}]/u,bp=/(?:[^\s\p{P}\p{S}]|~)/u,Sp=x(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",yl?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),jl=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,kp=x(jl,"u").replace(/punct/g,ae).getRegex(),Pp=x(jl,"u").replace(/punct/g,Rl).getRegex(),xp=/^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/,wp=x(xp,"u").replace(/openQuote/g,Qp).replace(/punct/g,ae).getRegex(),_l="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",yp=x(_l,"gu").replace(/notPunctSpace/g,qt).replace(/punctSpace/g,Ot).replace(/punct/g,ae).getRegex(),Zp=x(_l,"gu").replace(/notPunctSpace/g,bp).replace(/punctSpace/g,$p).replace(/punct/g,Rl).getRegex(),Xp="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)",vp=x(Xp,"gu").replace(/notPunctSpace/g,qt).replace(/punctSpace/g,Ot).replace(/punct/g,ae).getRegex(),Tp=x("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,qt).replace(/punctSpace/g,Ot).replace(/punct/g,ae).getRegex(),Rp="^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)",jp=x(Rp,"gu").replace(/notPunctSpace/g,qt).replace(/punctSpace/g,Ot).replace(/punct/g,ae).getRegex(),_p=x(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,ae).getRegex(),Cp="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",Yp=x(Cp,"gu").replace(/notPunctSpace/g,qt).replace(/punctSpace/g,Ot).replace(/punct/g,ae).getRegex(),zp=x(/\\(punct)/,"gu").replace(/punct/g,ae).getRegex(),qp=x(/(`+)(?:[^`]|[^`][\s\S]*?[^`])\1(?!`)|`+|\\(punct)/,"gu").replace(/punct/g,ae).getRegex(),Ap=x(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Lp=x(zi).replace("(?:-->|$)","-->").getRegex(),Ep=x("^comment|^</[a-zA-Z][a-zA-Z0-9-]*\\s*>|^<[a-zA-Z][a-zA-Z0-9-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Lp).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Cl=/\[(?:\\[\s\S]|[^\[\]\\])*\]/,wr=x(/(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/).replace("brackets",Cl).getRegex(),Wp=x(/^!?\[(label)\]\([ \t\n]*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?[ \t\n]*\)/).replace("label",wr).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title",/"(?:\\[\s\S]|[^"\\])*"|'(?:\\[\s\S]|[^'\\])*'|\((?:\\[\s\S]|[^)\\])*\)/).getRegex(),Mp=x(/^!?\[(label)\]\[(ref)\]/).replace("label",wr).replace("ref",Yi).getRegex(),Up=x(/^!?\[(ref)\](?:\[\])?/).replace("ref",Yi).getRegex(),ml=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\]){1,999}/,Vp=x(/(?:[^\[\]\\`]*(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\]))){0,999}?[^\[\]\\`]*?/).replace("brackets",Cl).getRegex(),Gp=x("reflink|nolink(?!\\()","g").replace("reflink",x(/^!?\[(label)\]\[(ref)\]/).replace("label",Vp).replace("ref",ml).getRegex()).replace("nolink",x(/^!?\[(ref)\](?:\[\])?/).replace("ref",ml).getRegex()).getRegex(),gl=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Ip=/[A-Za-z0-9._+-]+@[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/,Dp=x(/(?:mailto:email|xmpp:email(?:\/[A-Za-z0-9@.]+)?)/).replace(/email/g,Ip).getRegex(),Ai={_backpedal:Me,anyPunctuation:zp,anyPunctuationOutsideCode:qp,autolink:Ap,blockSkip:Sp,br:Tl,code:dp,del:Me,delLDelim:Me,delRDelim:Me,emStrongLDelim:kp,emStrongRDelimAst:yp,emStrongRDelimUnd:Tp,escape:fp,link:Wp,nolink:Up,punctuation:gp,reflink:Mp,reflinkSearch:Gp,tag:Ep,text:mp,url:Me},Bp={...Ai,emStrongLDelim:wp,emStrongRDelimAst:vp,emStrongRDelimUnd:jp,link:x(/^!?\[(label)\]\((.*?)\)/).replace("label",wr).getRegex(),reflink:x(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",wr).getRegex()},vi={...Ai,emStrongRDelimAst:Zp,emStrongLDelim:Pp,delLDelim:_p,delRDelim:Yp,url:x(/^emailProtocol|^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("emailProtocol",Dp).replace("protocol",gl).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:x(/^(?:[^a-zA-Z0-9](?=emailProtocol)|(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|wwwStart|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9](?=emailProtocol)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))))/).replace("protocol",gl).replace(/emailProtocol/g,/(?:mailto|xmpp):/).replace("wwwStart",yl?"(?<![^\\s*_~(])www\\.":"www\\.").getRegex()},Np={...vi,br:x(Tl).replace("{2,}","*").getRegex(),text:x(vi.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Pr={normal:qi,gfm:up,pedantic:pp},_t={normal:Ai,gfm:vi,breaks:Np,pedantic:Bp},Fp={"&":"&","<":"<",">":">",'"':""","'":"'"},Ql=t=>Fp[t];function H(t,e){if(e){if(C.escapeTest.test(t))return t.replace(C.escapeReplace,Ql)}else if(C.escapeTestNoEncode.test(t))return t.replace(C.escapeReplaceNoEncode,Ql);return t}function Hp(t){return C.numericCharacterReference.test(t)?t.replace(C.numericCharacterReferenceOrAmpersand,(e,r,n)=>{if(r===void 0&&n===void 0)return"&";let i=r===void 0?Number.parseInt(n,16):Number.parseInt(r,10);return i===0||i>1114111||i>=55296&&i<=57343?"\uFFFD":i===38?"&":String.fromCodePoint(i)}):t}function $l(t){try{t=encodeURI(t).replace(C.percentDecode,"%")}catch{return null}return t}function bl(t,e){let r=t.replace(C.findPipe,(s,a,o)=>{let l=!1,O=a;for(;--O>=0&&o[O]==="\\";)l=!l;return l?"|":" |"}),n=r.split(C.splitPipe),i=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),e)if(n.length>e)n.splice(e);else for(;n.length<e;)n.push("");for(;i<n.length;i++)n[i]=n[i].trim().replace(C.slashPipe,"|");return n}function me(t,e,r){let n=t.length;if(n===0)return"";let i=0;for(;i<n;){let s=t.charAt(n-i-1);if(s===e&&!r)i++;else if(s!==e&&r)i++;else break}return t.slice(0,n-i)}function Sl(t){let e=t.split(` +`),r=e.length-1;for(;r>=0&&C.blankLine.test(e[r]);)r--;return e.length-r<=2?t:e.slice(0,r+1).join(` +`)}function yr(t){return t.trim().replace(C.multipleSpaceGlobal," ").toLowerCase().toUpperCase().toLowerCase()}function kl(t,e){if(t.indexOf(e[0])===-1&&t.indexOf(e[1])===-1)return-1;let r=0;for(let n=0;n<t.length;n++)if(t[n]==="\\")n++;else if(t[n]===e[0])r++;else if(t[n]===e[1]&&(r--,r<0))return n;return r>0?-2:-1}var lt=new WeakMap;function Li(t){let e={"*":-1,_:-1},r=-1,n=t.length;for(let i=0;i<n;i++){let s=t[i];if(s!=="*"&&s!=="_"&&s!=="~")continue;let a=i===0?` +`:t[i-1],o=i+1;for(;o<n&&t[o]===s;)o++;a!==" "&&a!==" "&&a!==` +`&&a!=="\r"&&a!=="\f"&&(s==="~"?r=i:e[s]=i),i=o-1}return{maskedSrc:t,lastPossibleEmStrongCloserIndex:e,lastPossibleDelCloserIndex:r}}function Kp(t,e){let r=Li(e),n=lt.get(t);n?n.push(r):lt.set(t,[r])}function Jp(t){let e=lt.get(t);e&&(e.pop(),e.length===0&<.delete(t))}function ef(t,e,r){let n=lt.get(t)?.at(-1);return n&&n.maskedSrc===e?n.lastPossibleEmStrongCloserIndex[r]:Li(e).lastPossibleEmStrongCloserIndex[r]}function tf(t,e){let r=lt.get(t)?.at(-1);return r&&r.maskedSrc===e?r.lastPossibleDelCloserIndex:Li(e).lastPossibleDelCloserIndex}function xr(t,e=0){let r=e,n="";for(let i of t)if(i===" "){let s=4-r%4;n+=" ".repeat(s),r+=s}else n+=i,r++;return n}function Pl(t,e,r,n,i){let s=e.href,a=e.title||null,o=t[1].replace(i.other.outputLinkReplace,"$1"),l=t[0].charAt(0)==="!",O=n.state.inLink,c=n.state.linkEmitted,h=n.state.inRawBlock;n.state.inLink=!0,n.state.linkEmitted=!1;let p=n.inlineTokens(o),u=n.state.linkEmitted;if(n.state.linkEmitted=c,n.state.inLink=O,!l){if(u){n.state.inRawBlock=h;return}n.state.linkEmitted=!0}return{type:l?"image":"link",raw:r,href:s,title:a,text:o,tokens:p}}function rf(t,e,r){let n=t.match(r.other.indentCodeCompensation);if(n===null)return e;let i=n[1];return e.split(` +`).map(s=>{let a=s.match(r.other.beginningSpace);if(a===null)return s;let[o]=a;return s.slice(Math.min(o.length,i.length))}).join(` +`)}function xl(t,e,r,n){if(!e.includes("<"))return!1;for(let i=0;i<e.length;i++){if(e[i]==="\\"){i++;continue}if(e[i]==="`"){let o=n.inline.code.exec(e.slice(i));if(o){i+=o[0].length-1;continue}}if(e[i]!=="<")continue;let s=t.slice(r+i),a=n.inline.tag.exec(s)||n.inline.autolink.exec(s);if(a){if(a[0].length>e.length-i)return!0;i+=a[0].length-1}}return!1}var ot=class{options;rules;lexer;constructor(t){this.options=t||Ve}space(t){let e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(t){let e=this.rules.block.code.exec(t);if(e){let r=this.options.pedantic?e[0]:Sl(e[0]),n=r.replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:r,codeBlockStyle:"indented",text:n}}}fences(t){let e=this.rules.block.fences.exec(t);if(e){let r=e[0],n=rf(r,e[3]||"",this.rules);return{type:"code",raw:r,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:n}}}heading(t){let e=this.rules.block.heading.exec(t);if(e){let r=e[2].trim();if(this.rules.other.endingHash.test(r)){let n=me(r,"#");(this.options.pedantic||!n||this.rules.other.endingSpaceTabChar.test(n))&&(r=n.trim())}return{type:"heading",raw:me(e[0],` +`),depth:e[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(t){let e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:me(e[0],` +`)}}blockquote(t){let e=this.rules.block.blockquote.exec(t);if(e){let r=me(e[0],` `).split(` -`),n="",i="",s=[];for(;t.length>0;){let a=!1,o=[],l;for(l=0;l<t.length;l++)if(this.rules.other.blockquoteStart.test(t[l]))o.push(t[l]),a=!0;else if(!a)o.push(t[l]);else break;t=t.slice(l);let O=o.join(` -`),c=O.replace(this.rules.other.blockquoteMarkerWhitespace,(u,d,m)=>d+Pr(m,d.length)).replace(this.rules.other.blockquoteSetextReplace,` +`),n="",i="",s=[];for(;r.length>0;){let a=!1,o=[],l;for(l=0;l<r.length;l++)if(this.rules.other.blockquoteStart.test(r[l]))o.push(r[l]),a=!0;else if(!a)o.push(r[l]);else break;r=r.slice(l);let O=o.join(` +`),c=O.replace(this.rules.other.blockquoteMarkerWhitespace,(u,d,m)=>d+xr(m,d.length)).replace(this.rules.other.blockquoteSetextReplace,` $1`).replace(this.rules.other.blockquoteSetextReplace2,"");n=n?`${n} ${O}`:O,i=i?`${i} -${c}`:c;let h=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(c,s,!0),this.lexer.state.top=h,t.length===0)break;let p=s.at(-1);if(p?.type==="code"||p?.type==="heading"||p?.type==="hr"||p?.type==="html"||p?.type==="table")break;if(p?.type==="blockquote"){let u=p,d=t.join(` +${c}`:c;let h=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(c,s,!0),this.lexer.state.top=h,r.length===0)break;let p=s.at(-1);if(p?.type==="code"||p?.type==="heading"||p?.type==="hr"||p?.type==="html"||p?.type==="table")break;if(p?.type==="blockquote"){let u=p,d=r.join(` `),m=u.raw+` `+d.replace(this.rules.other.blockquoteSetextReplace2,""),g=this.blockquote(m);s[s.length-1]=g;let b=m.substring(g.raw.length).replace(/^\n/,""),Q=b?b.split(` -`).length:0,k=Q?t.slice(0,-Q):t;if(k.length>0&&(n=`${n} +`).length:0,k=Q?r.slice(0,-Q):r;if(k.length>0&&(n=`${n} ${k.join(` -`)}`),i=i.substring(0,i.length-u.text.length)+g.text,t=t.slice(k.length),t.length>0&&this.rules.other.blockquoteStart.test(t[0]))continue;break}else if(p?.type==="list"){let u=p,d=u.raw+` -`+t.join(` +`)}`),i=i.substring(0,i.length-u.text.length)+g.text,r=r.slice(k.length),r.length>0&&this.rules.other.blockquoteStart.test(r[0]))continue;break}else if(p?.type==="list"){let u=p,d=u.raw+` +`+r.join(` `),m=this.list(d);s[s.length-1]=m;let g=m.raw.length>u.raw.length?d.slice(u.raw.length+1,m.raw.length).split(` -`).length:0;if(g>0){let b=t.slice(0,g).join(` +`).length:0;if(g>0){let b=r.slice(0,g).join(` `);n=`${n} ${b}`,i=`${i} -${b}`}t=t.slice(g);continue}}return{type:"blockquote",raw:n,tokens:s,text:i}}}list(r){let e=this.rules.block.list.exec(r);if(e){let t=r,n=()=>t.length-r.length,i=e[1].trim(),s=i.length>1,a={type:"list",raw:"",ordered:s,start:s?+i.slice(0,-1):"",loose:!1,items:[]};i=s?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=s?i:"[*+-]");let o=this.rules.other.listItemRegex(i),l=!1;for(;r;){let c=!1,h="";if(!(e=o.exec(r))||this.rules.block.hr.test(r))break;let p=n();r=r.substring(e[0].length);let u=e[2].split(` -`,1)[0],d=e[1].length,m=this.options.pedantic?Pr(u,d):u.replace(this.rules.other.leadingSpaceTab,y=>Pr(y,d)),g=r.split(` -`,1)[0],b=!m.trim(),Q=0;if(this.options.pedantic?(Q=2,h=m.trimStart()):b?Q=d+1:(Q=m.search(this.rules.other.nonSpaceChar),Q=Q>4?1:Q,h=m.slice(Q),Q+=d),b&&this.rules.other.blankLine.test(g)&&(r=r.substring(g.length+1),c=!0),!c){let y=this.rules.other.nextBulletRegex(Q),w=this.rules.other.hrRegex(Q),_=this.rules.other.fencesBeginRegex(Q),G=this.options.pedantic?this.rules.other.pedanticHeadingBeginRegex(Q):this.rules.other.headingBeginRegex(Q),Xe=this.rules.other.htmlBeginRegex(Q),qt=this.rules.other.blockquoteBeginRegex(Q);for(;r;){let Ot=r.split(` -`,1)[0],Ge;if(g=Ot,this.options.pedantic?(g=g.replace(this.rules.other.listReplaceNesting," "),Ge=g):Ge=g.replace(this.rules.other.leadingSpaceTab,Rr=>Pr(Rr)),_.test(g)||G.test(g)||Xe.test(g)||qt.test(g)||y.test(g)||w.test(g))break;if(Ge.search(this.rules.other.nonSpaceChar)>=Q||!g.trim())h+=` -`+Ge.slice(Q);else{if(b||m.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||_.test(m)||G.test(m)||Xe.test(m)||w.test(m))break;let Rr=!this.options.pedantic&&/^ {0,3}(?:=+|-+) *$/.test(g)&&this.rules.block.lheading.test(`${m} -${g}`)?` ${Ge.replace(/^ {0,3}/,"")}`:g;h+=` -`+Rr}b=!g.trim(),r=r.substring(Ot.length+1),m=Ge.slice(Q)}}let k=t.slice(p,n());a.loose||(l?a.loose=!0:this.rules.other.doubleBlankLine.test(k)&&(l=!0)),a.items.push({type:"list_item",raw:k,task:!!this.options.gfm&&this.rules.other.listIsTask.test(h),loose:!1,text:h,tokens:[]})}let O=a.items.at(-1);if(O)O.raw=O.raw.trimEnd(),O.text=O.text.trimEnd();else return;a.raw=t.slice(0,n()).trimEnd();for(let c of a.items)if(this.lexer.state.top=!1,c.tokens=this.lexer.blockTokens(c.text,[]),!a.loose){let h=c.tokens.filter(u=>u.type==="space"),p=h.length>0&&h.some(u=>this.rules.other.anyLine.test(u.raw));a.loose=p}for(let c of a.items){let h=c.tokens[0];if(c.task&&(h?.type==="text"||h?.type==="paragraph")){c.text=c.text.replace(this.rules.other.listReplaceTask,""),h.raw=h.raw.replace(this.rules.other.listReplaceTask,""),h.text=h.text.replace(this.rules.other.listReplaceTask,"");for(let u=this.lexer.inlineQueue.length-1;u>=0;u--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[u].src)){this.lexer.inlineQueue[u].src=this.lexer.inlineQueue[u].src.replace(this.rules.other.listReplaceTask,"");break}let p=this.rules.other.listTaskCheckbox.exec(c.raw);if(p){let u={type:"checkbox",raw:p[0]+" ",checked:p[0]!=="[ ]"};c.checked=u.checked,a.loose?c.tokens[0]&&["paragraph","text"].includes(c.tokens[0].type)&&"tokens"in c.tokens[0]&&c.tokens[0].tokens?(c.tokens[0].raw=u.raw+c.tokens[0].raw,c.tokens[0].text=u.raw+c.tokens[0].text,c.tokens[0].tokens.unshift(u)):c.tokens.unshift({type:"paragraph",raw:u.raw,text:u.raw,tokens:[u]}):c.tokens.unshift(u)}}else c.task&&(c.task=!1)}if(a.loose)for(let c of a.items){c.loose=!0;for(let h of c.tokens)h.type==="text"&&(h.type="paragraph")}return a}}html(r){let e=this.rules.block.html.exec(r);if(e){let t=bl(e[0]);return{type:"html",block:!0,raw:t,pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:t}}}def(r){let e=this.rules.block.def.exec(r);if(e){if(!this.rules.other.startAngleBracket.test(e[2])&&Sl(e[2],"()")!==-1)return;let t=wr(e[1]),n=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",i=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:t,raw:me(e[0],` -`),href:n,title:i}}}table(r){let e=this.rules.block.table.exec(r);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;let t=$l(e[1]),n=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),i=e[3]?.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split(` +${b}`}r=r.slice(g);continue}}return{type:"blockquote",raw:n,tokens:s,text:i}}}list(t){let e=this.rules.block.list.exec(t);if(e){let r=t,n=()=>r.length-t.length,i=e[1].trim(),s=i.length>1,a={type:"list",raw:"",ordered:s,start:s?+i.slice(0,-1):"",loose:!1,items:[]};i=s?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=s?i:"[*+-]");let o=this.rules.other.listItemRegex(i),l=!1;for(;t;){let c=!1,h="";if(!(e=o.exec(t))||this.rules.block.hr.test(t))break;let p=n();t=t.substring(e[0].length);let u=e[2].split(` +`,1)[0],d=e[1].length,m=this.options.pedantic?xr(u,d):u.replace(this.rules.other.leadingSpaceTab,y=>xr(y,d)),g=t.split(` +`,1)[0],b=!m.trim(),Q=0;if(this.options.pedantic?(Q=2,h=m.trimStart()):b?Q=d+1:(Q=m.search(this.rules.other.nonSpaceChar),Q=Q>4?1:Q,h=m.slice(Q),Q+=d),b&&this.rules.other.blankLine.test(g)&&(t=t.substring(g.length+1),c=!0),!c){let y=this.rules.other.nextBulletRegex(Q),w=this.rules.other.hrRegex(Q),_=this.rules.other.fencesBeginRegex(Q),G=this.options.pedantic?this.rules.other.pedanticHeadingBeginRegex(Q):this.rules.other.headingBeginRegex(Q),Xe=this.rules.other.htmlBeginRegex(Q),At=this.rules.other.blockquoteBeginRegex(Q);for(;t;){let ct=t.split(` +`,1)[0],Ie;if(g=ct,this.options.pedantic?(g=g.replace(this.rules.other.listReplaceNesting," "),Ie=g):Ie=g.replace(this.rules.other.leadingSpaceTab,jr=>xr(jr)),_.test(g)||G.test(g)||Xe.test(g)||At.test(g)||y.test(g)||w.test(g))break;if(Ie.search(this.rules.other.nonSpaceChar)>=Q||!g.trim())h+=` +`+Ie.slice(Q);else{if(b||m.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||_.test(m)||G.test(m)||Xe.test(m)||w.test(m))break;let jr=!this.options.pedantic&&/^ {0,3}(?:=+|-+) *$/.test(g)&&this.rules.block.lheading.test(`${m} +${g}`)?` ${Ie.replace(/^ {0,3}/,"")}`:g;h+=` +`+jr}b=!g.trim(),t=t.substring(ct.length+1),m=Ie.slice(Q)}}let k=r.slice(p,n());a.loose||(l?a.loose=!0:this.rules.other.doubleBlankLine.test(k)&&(l=!0)),a.items.push({type:"list_item",raw:k,task:!!this.options.gfm&&this.rules.other.listIsTask.test(h),loose:!1,text:h,tokens:[]})}let O=a.items.at(-1);if(O)O.raw=O.raw.trimEnd(),O.text=O.text.trimEnd();else return;a.raw=r.slice(0,n()).trimEnd();for(let c of a.items)if(this.lexer.state.top=!1,c.tokens=this.lexer.blockTokens(c.text,[]),!a.loose){let h=c.tokens.filter(u=>u.type==="space"),p=h.length>0&&h.some(u=>this.rules.other.anyLine.test(u.raw));a.loose=p}for(let c of a.items){let h=c.tokens[0];if(c.task&&(h?.type==="text"||h?.type==="paragraph")){c.text=c.text.replace(this.rules.other.listReplaceTask,""),h.raw=h.raw.replace(this.rules.other.listReplaceTask,""),h.text=h.text.replace(this.rules.other.listReplaceTask,"");for(let u=this.lexer.inlineQueue.length-1;u>=0;u--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[u].src)){this.lexer.inlineQueue[u].src=this.lexer.inlineQueue[u].src.replace(this.rules.other.listReplaceTask,"");break}let p=this.rules.other.listTaskCheckbox.exec(c.raw);if(p){let u={type:"checkbox",raw:p[0]+" ",checked:p[0]!=="[ ]"};c.checked=u.checked,a.loose?c.tokens[0]&&["paragraph","text"].includes(c.tokens[0].type)&&"tokens"in c.tokens[0]&&c.tokens[0].tokens?(c.tokens[0].raw=u.raw+c.tokens[0].raw,c.tokens[0].text=u.raw+c.tokens[0].text,c.tokens[0].tokens.unshift(u)):c.tokens.unshift({type:"paragraph",raw:u.raw,text:u.raw,tokens:[u]}):c.tokens.unshift(u)}}else c.task&&(c.task=!1)}if(a.loose)for(let c of a.items){c.loose=!0;for(let h of c.tokens)h.type==="text"&&(h.type="paragraph")}return a}}html(t){let e=this.rules.block.html.exec(t);if(e){let r=Sl(e[0]);return{type:"html",block:!0,raw:r,pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:r}}}def(t){let e=this.rules.block.def.exec(t);if(e){if(!this.rules.other.startAngleBracket.test(e[2])&&kl(e[2],"()")!==-1)return;let r=yr(e[1]),n=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",i=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:r,raw:me(e[0],` +`),href:n,title:i}}}table(t){let e=this.rules.block.table.exec(t);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;let r=bl(e[1]),n=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),i=e[3]?.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split(` `):[],s={type:"table",raw:me(e[0],` -`),header:[],align:[],rows:[]};if(t.length===n.length){for(let a of n)this.rules.other.tableAlignRight.test(a)?s.align.push("right"):this.rules.other.tableAlignCenter.test(a)?s.align.push("center"):this.rules.other.tableAlignLeft.test(a)?s.align.push("left"):s.align.push(null);for(let a=0;a<t.length;a++)s.header.push({text:t[a],tokens:this.lexer.inline(t[a]),header:!0,align:s.align[a]});for(let a of i)s.rows.push($l(a,s.header.length).map((o,l)=>({text:o,tokens:this.lexer.inline(o),header:!1,align:s.align[l]})));return s}}lheading(r){let e=this.rules.block.lheading.exec(r);if(e){let t=e[1].trim();return{type:"heading",raw:me(e[0],` -`),depth:e[2].charAt(0)==="="?1:2,text:t,tokens:this.lexer.inline(t)}}}paragraph(r){let e=this.rules.block.paragraph.exec(r);if(e){let t=e[1].charAt(e[1].length-1)===` -`?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:t,tokens:this.lexer.inline(t)}}}text(r){let e=this.rules.block.text.exec(r);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(r){let e=this.rules.inline.escape.exec(r);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(r){let e=this.rules.inline.tag.exec(r);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(r){if(this.lexer.state.linkParenPossible===!1)return;let e=this.rules.inline.link.exec(r);if(e){let t=e[0].charAt(0)==="!"?2:1;if(!this.options.pedantic&&Pl(r,e[1],t,this.rules))return;let n=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;let o=me(n.slice(0,-1),"\\");if((n.length-o.length)%2===0)return}else{let o=Sl(e[2],"()");if(o===-2)return;if(o>-1){let l=(e[0].indexOf("!")===0?5:4)+e[1].length+o;e[2]=e[2].substring(0,o),e[0]=e[0].substring(0,l).trim(),e[3]=""}}let i=me(e[0].slice(0,-1),"\\");if((e[0].length-i.length)%2===0)return;let s=e[2],a="";if(this.options.pedantic){let o=this.rules.other.pedanticHrefTitle.exec(s);o&&(s=o[1],a=o[3])}else a=e[3]?e[3].slice(1,-1):"";return s=s.trim(),this.rules.other.startAngleBracket.test(s)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?s=s.slice(1):s=s.slice(1,-1)),kl(e,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:a&&a.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(r,e){let t;if((t=this.rules.inline.reflink.exec(r))||(t=this.rules.inline.nolink.exec(r))){let n=t[0].charAt(0)==="!"?2:1;if(!this.options.pedantic&&Pl(r,t[1],n,this.rules))return;let i=e[wr(t[2]||t[1])];if(!i){let s=t[0].charAt(0);return{type:"text",raw:s,text:s}}return kl(t,i,t[0],this.lexer,this.rules)}}emStrong(r,e,t=""){let n=this.rules.inline.emStrongLDelim.exec(r);if(!n||!n[1]&&!n[2]&&!n[3]&&!n[4])return;let i=n[0][0],s=t===i,a=e.length-r.length,o=a;for(;!this.options.pedantic&&o>0&&e[o-1]===i;)o--;let l=[...e.slice(Math.max(0,o-2),o)].at(-1)??"",O=l==="*"||l==="_"||!!this.rules.inline.punctuation.exec(l);o<a&&(t=l);let c=o<a?O:!!this.rules.inline.punctuation.exec(t);if(n[4]&&t.match(this.rules.other.unicodeAlphaNumeric))return;let h=n[1]||n[3]||"";if(!h||!t||c){let p=[...n[0]].length-1,u,d,m=p,g=0,b=a-o+p,Q=!this.options.pedantic&&!!l.trim()&&(!!h||i==="*"&&!O);if(i!=="*"&&i!=="_")return;let k=i==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd,y=Jp(this,e,i),w=e.length-r.length+p;if(y<w)return;e=e.slice(-1*r.length+p);let _=y-w;for(k.lastIndex=0;(n=k.exec(e))!==null&&!(n.index>_);){if(u=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!u)continue;if(d=[...u].length,n[3]||n[4]){m+=d;continue}else if(n[5]||n[6]||Q){if(s&&(n[5]||n[6]))break;if(b%3&&!((b+d)%3)){g+=d;continue}}if(m-=d,m>0)continue;d=Math.min(d,d+m+g);let G=[...n[0]][0].length,Xe=r.slice(0,p+n.index+G+d);if(Math.min(p,d)%2){let Ot=Xe.slice(1,-1);return{type:"em",raw:Xe,text:Ot,tokens:this.lexer.inlineTokens(Ot)}}let qt=Xe.slice(2,-2);return{type:"strong",raw:Xe,text:qt,tokens:this.lexer.inlineTokens(qt)}}}}codespan(r){let e=this.rules.inline.code.exec(r);if(e){let t=e[2].replace(this.rules.other.newLineCharGlobal," "),n=this.rules.other.nonSpaceChar.test(t),i=this.rules.other.startingSpaceChar.test(t)&&this.rules.other.endingSpaceChar.test(t);return n&&i&&(t=t.substring(1,t.length-1)),{type:"codespan",raw:e[0],text:t}}}br(r){let e=this.rules.inline.br.exec(r);if(e)return{type:"br",raw:e[0]}}del(r,e,t=""){let n=this.rules.inline.delLDelim.exec(r);if(n&&(!n[1]||!t||this.rules.inline.punctuation.exec(t))){let i=[...n[0]].length-1,s,a,o=i,l=this.rules.inline.delRDelim,O=ef(this,e),c=e.length-r.length+i;if(O<c)return;e=e.slice(-1*r.length+i);let h=O-c;for(l.lastIndex=0;(n=l.exec(e))!==null&&!(n.index>h);){if(s=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!s||(a=[...s].length,a!==i))continue;if(n[3]||n[4]){o+=a;continue}if(o-=a,o>0)continue;a=Math.min(a,a+o);let p=[...n[0]][0].length,u=r.slice(0,i+n.index+p+a),d=u.slice(i,-i);return{type:"del",raw:u,text:d,tokens:this.lexer.inlineTokens(d)}}}}autolink(r){let e=this.rules.inline.autolink.exec(r);if(e){let t,n;return e[2]==="@"?(t=e[1],n="mailto:"+t):(t=e[1],n=t),{type:"link",raw:e[0],text:t,href:n,autolink:!0,tokens:[{type:"text",raw:t,text:t}]}}}url(r){let e;if(e=this.rules.inline.url.exec(r)){let t,n;if(e[2]==="@")t=e[0],n="mailto:"+t;else{let i;do i=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??"";while(i!==e[0]);t=e[0],e[1]==="www."?n="http://"+e[0]:n=e[0]}return{type:"link",raw:e[0],text:t,href:n,autolink:!0,tokens:[{type:"text",raw:t,text:t}]}}}inlineText(r){let e=this.rules.inline.text.exec(r);if(e){let t=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:t?e[0]:Fp(e[0]),escaped:t}}}},re=class vi{tokens;options;state;inlineQueue;tokenizer;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Ue,this.options.tokenizer=this.options.tokenizer||new at,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,linkEmitted:!1,linkParenPossible:!0,top:!0};let t={other:Y,block:kr.normal,inline:jt.normal};this.options.pedantic?(t.block=kr.pedantic,t.inline=jt.pedantic):this.options.gfm&&(t.block=kr.gfm,this.options.breaks?t.inline=jt.breaks:t.inline=jt.gfm),this.tokenizer.rules=t}static get rules(){return{block:kr,inline:jt}}static lex(e,t){return new vi(t).lex(e)}static lexInline(e,t){return new vi(t).inlineTokens(e)}lex(e){e=e.replace(Y.carriageReturn,` -`),this.blockTokens(e,this.tokens);for(let t=0;t<this.inlineQueue.length;t++){let n=this.inlineQueue[t];this.state.inRawBlock=!1,this.inlineTokens(n.src,n.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],n=!1){this.tokenizer.lexer=this,this.options.pedantic&&(e=e.replace(Y.tabCharGlobal," ").replace(Y.spaceLine,""));let i=1/0;for(;e;){if(e.length<i)i=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}let s;if(this.options.extensions?.block?.some(o=>(s=o.call({lexer:this},e,t))?(e=e.substring(s.raw.length),t.push(s),!0):!1))continue;if(s=this.tokenizer.space(e)){e=e.substring(s.raw.length);let o=t.at(-1);s.raw.length===1&&o!==void 0?o.raw+=` -`:t.push(s);continue}if(s=this.tokenizer.code(e)){e=e.substring(s.raw.length);let o=t.at(-1);o?.type==="paragraph"||o?.type==="text"?(o.raw+=(o.raw.endsWith(` +`),header:[],align:[],rows:[]};if(r.length===n.length){for(let a of n)this.rules.other.tableAlignRight.test(a)?s.align.push("right"):this.rules.other.tableAlignCenter.test(a)?s.align.push("center"):this.rules.other.tableAlignLeft.test(a)?s.align.push("left"):s.align.push(null);for(let a=0;a<r.length;a++)s.header.push({text:r[a],tokens:this.lexer.inline(r[a]),header:!0,align:s.align[a]});for(let a of i)s.rows.push(bl(a,s.header.length).map((o,l)=>({text:o,tokens:this.lexer.inline(o),header:!1,align:s.align[l]})));return s}}lheading(t){let e=this.rules.block.lheading.exec(t);if(e){let r=e[1].trim();return{type:"heading",raw:me(e[0],` +`),depth:e[2].charAt(0)==="="?1:2,text:r,tokens:this.lexer.inline(r)}}}paragraph(t){let e=this.rules.block.paragraph.exec(t);if(e){let r=e[1].charAt(e[1].length-1)===` +`?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:r,tokens:this.lexer.inline(r)}}}text(t){let e=this.rules.block.text.exec(t);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(t){let e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(t){let e=this.rules.inline.tag.exec(t);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(t){if(this.lexer.state.linkParenPossible===!1)return;let e=this.rules.inline.link.exec(t);if(e){let r=e[0].charAt(0)==="!"?2:1;if(!this.options.pedantic&&xl(t,e[1],r,this.rules))return;let n=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;let o=me(n.slice(0,-1),"\\");if((n.length-o.length)%2===0)return}else{let o=kl(e[2],"()");if(o===-2)return;if(o>-1){let l=(e[0].indexOf("!")===0?5:4)+e[1].length+o;e[2]=e[2].substring(0,o),e[0]=e[0].substring(0,l).trim(),e[3]=""}}let i=me(e[0].slice(0,-1),"\\");if((e[0].length-i.length)%2===0)return;let s=e[2],a="";if(this.options.pedantic){let o=this.rules.other.pedanticHrefTitle.exec(s);o&&(s=o[1],a=o[3])}else a=e[3]?e[3].slice(1,-1):"";return s=s.trim(),this.rules.other.startAngleBracket.test(s)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?s=s.slice(1):s=s.slice(1,-1)),Pl(e,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:a&&a.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(t,e){let r;if((r=this.rules.inline.reflink.exec(t))||(r=this.rules.inline.nolink.exec(t))){let n=r[0].charAt(0)==="!"?2:1;if(!this.options.pedantic&&xl(t,r[1],n,this.rules))return;let i=e[yr(r[2]||r[1])];if(!i){let s=r[0].charAt(0);return{type:"text",raw:s,text:s}}return Pl(r,i,r[0],this.lexer,this.rules)}}emStrong(t,e,r=""){let n=this.rules.inline.emStrongLDelim.exec(t);if(!n||!n[1]&&!n[2]&&!n[3]&&!n[4])return;let i=n[0][0],s=r===i,a=e.length-t.length,o=a;for(;!this.options.pedantic&&o>0&&e[o-1]===i;)o--;let l=[...e.slice(Math.max(0,o-2),o)].at(-1)??"",O=l==="*"||l==="_"||!!this.rules.inline.punctuation.exec(l);o<a&&(r=l);let c=o<a?O:!!this.rules.inline.punctuation.exec(r);if(n[4]&&r.match(this.rules.other.unicodeAlphaNumeric))return;let h=n[1]||n[3]||"";if(!h||!r||c){let p=[...n[0]].length-1,u,d,m=p,g=0,b=a-o+p,Q=!this.options.pedantic&&!!l.trim()&&(!!h||i==="*"&&!O);if(i!=="*"&&i!=="_")return;let k=i==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd,y=ef(this,e,i),w=e.length-t.length+p;if(y<w)return;e=e.slice(-1*t.length+p);let _=y-w;for(k.lastIndex=0;(n=k.exec(e))!==null&&!(n.index>_);){if(u=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!u)continue;if(d=[...u].length,n[3]||n[4]){m+=d;continue}else if(n[5]||n[6]||Q){if(s&&(n[5]||n[6]))break;if(b%3&&!((b+d)%3)){g+=d;continue}}if(m-=d,m>0)continue;d=Math.min(d,d+m+g);let G=[...n[0]][0].length,Xe=t.slice(0,p+n.index+G+d);if(Math.min(p,d)%2){let ct=Xe.slice(1,-1);return{type:"em",raw:Xe,text:ct,tokens:this.lexer.inlineTokens(ct)}}let At=Xe.slice(2,-2);return{type:"strong",raw:Xe,text:At,tokens:this.lexer.inlineTokens(At)}}}}codespan(t){let e=this.rules.inline.code.exec(t);if(e){let r=e[2].replace(this.rules.other.newLineCharGlobal," "),n=this.rules.other.nonSpaceChar.test(r),i=this.rules.other.startingSpaceChar.test(r)&&this.rules.other.endingSpaceChar.test(r);return n&&i&&(r=r.substring(1,r.length-1)),{type:"codespan",raw:e[0],text:r}}}br(t){let e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}del(t,e,r=""){let n=this.rules.inline.delLDelim.exec(t);if(n&&(!n[1]||!r||this.rules.inline.punctuation.exec(r))){let i=[...n[0]].length-1,s,a,o=i,l=this.rules.inline.delRDelim,O=tf(this,e),c=e.length-t.length+i;if(O<c)return;e=e.slice(-1*t.length+i);let h=O-c;for(l.lastIndex=0;(n=l.exec(e))!==null&&!(n.index>h);){if(s=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!s||(a=[...s].length,a!==i))continue;if(n[3]||n[4]){o+=a;continue}if(o-=a,o>0)continue;a=Math.min(a,a+o);let p=[...n[0]][0].length,u=t.slice(0,i+n.index+p+a),d=u.slice(i,-i);return{type:"del",raw:u,text:d,tokens:this.lexer.inlineTokens(d)}}}}autolink(t){let e=this.rules.inline.autolink.exec(t);if(e){let r,n;return e[2]==="@"?(r=e[1],n="mailto:"+r):(r=e[1],n=r),{type:"link",raw:e[0],text:r,href:n,autolink:!0,tokens:[{type:"text",raw:r,text:r}]}}}url(t){let e;if(e=this.rules.inline.url.exec(t)){let r,n;if(e[2]==="@")r=e[0],n="mailto:"+r;else{let i;do i=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??"";while(i!==e[0]);r=e[0],e[1]==="www."?n="http://"+e[0]:n=e[0]}return{type:"link",raw:e[0],text:r,href:n,autolink:!0,tokens:[{type:"text",raw:r,text:r}]}}}inlineText(t){let e=this.rules.inline.text.exec(t);if(e){let r=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:r?e[0]:Hp(e[0]),escaped:r}}}},re=class Ti{tokens;options;state;inlineQueue;tokenizer;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Ve,this.options.tokenizer=this.options.tokenizer||new ot,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,linkEmitted:!1,linkParenPossible:!0,top:!0};let r={other:C,block:Pr.normal,inline:_t.normal};this.options.pedantic?(r.block=Pr.pedantic,r.inline=_t.pedantic):this.options.gfm&&(r.block=Pr.gfm,this.options.breaks?r.inline=_t.breaks:r.inline=_t.gfm),this.tokenizer.rules=r}static get rules(){return{block:Pr,inline:_t}}static lex(e,r){return new Ti(r).lex(e)}static lexInline(e,r){return new Ti(r).inlineTokens(e)}lex(e){e=e.replace(C.carriageReturn,` +`),this.blockTokens(e,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){let n=this.inlineQueue[r];this.state.inRawBlock=!1,this.inlineTokens(n.src,n.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,r=[],n=!1){this.tokenizer.lexer=this,this.options.pedantic&&(e=e.replace(C.tabCharGlobal," ").replace(C.spaceLine,""));let i=1/0;for(;e;){if(e.length<i)i=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}let s;if(this.options.extensions?.block?.some(o=>(s=o.call({lexer:this},e,r))?(e=e.substring(s.raw.length),r.push(s),!0):!1))continue;if(s=this.tokenizer.space(e)){e=e.substring(s.raw.length);let o=r.at(-1);s.raw.length===1&&o!==void 0?o.raw+=` +`:r.push(s);continue}if(s=this.tokenizer.code(e)){e=e.substring(s.raw.length);let o=r.at(-1);o?.type==="paragraph"||o?.type==="text"?(o.raw+=(o.raw.endsWith(` `)?"":` `)+s.raw,o.text+=` -`+s.text,this.inlineQueue.at(-1).src=o.text):t.push(s);continue}if(s=this.tokenizer.fences(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.heading(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.hr(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.blockquote(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.list(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.html(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.def(e)){e=e.substring(s.raw.length);let o=t.at(-1);o?.type==="paragraph"||o?.type==="text"?(o.raw+=(o.raw.endsWith(` +`+s.text,this.inlineQueue.at(-1).src=o.text):r.push(s);continue}if(s=this.tokenizer.fences(e)){e=e.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.heading(e)){e=e.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.hr(e)){e=e.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.blockquote(e)){e=e.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.list(e)){e=e.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.html(e)){e=e.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.def(e)){e=e.substring(s.raw.length);let o=r.at(-1);o?.type==="paragraph"||o?.type==="text"?(o.raw+=(o.raw.endsWith(` `)?"":` `)+s.raw,o.text+=` -`+s.raw,this.inlineQueue.at(-1).src=o.text):(this.tokens.links[s.tag]||(this.tokens.links[s.tag]={href:s.href,title:s.title}),t.push(s));continue}if(s=this.tokenizer.table(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.lheading(e)){e=e.substring(s.raw.length),t.push(s);continue}let a=e;if(this.options.extensions?.startBlock){let o=1/0,l=e.slice(1),O;this.options.extensions.startBlock.forEach(c=>{O=c.call({lexer:this},l),typeof O=="number"&&O>=0&&(o=Math.min(o,O))}),o<1/0&&o>=0&&(a=e.substring(0,o+1))}if(this.state.top&&(s=this.tokenizer.paragraph(a))){let o=t.at(-1);n&&o?.type==="paragraph"?(o.raw+=(o.raw.endsWith(` +`+s.raw,this.inlineQueue.at(-1).src=o.text):(this.tokens.links[s.tag]||(this.tokens.links[s.tag]={href:s.href,title:s.title}),r.push(s));continue}if(s=this.tokenizer.table(e)){e=e.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.lheading(e)){e=e.substring(s.raw.length),r.push(s);continue}let a=e;if(this.options.extensions?.startBlock){let o=1/0,l=e.slice(1),O;this.options.extensions.startBlock.forEach(c=>{O=c.call({lexer:this},l),typeof O=="number"&&O>=0&&(o=Math.min(o,O))}),o<1/0&&o>=0&&(a=e.substring(0,o+1))}if(this.state.top&&(s=this.tokenizer.paragraph(a))){let o=r.at(-1);n&&o?.type==="paragraph"?(o.raw+=(o.raw.endsWith(` `)?"":` `)+s.raw,o.text+=` -`+s.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=o.text):t.push(s),n=a.length!==e.length,e=e.substring(s.raw.length);continue}if(s=this.tokenizer.text(e)){e=e.substring(s.raw.length);let o=t.at(-1);o?.type==="text"?(o.raw+=(o.raw.endsWith(` +`+s.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=o.text):r.push(s),n=a.length!==e.length,e=e.substring(s.raw.length);continue}if(s=this.tokenizer.text(e)){e=e.substring(s.raw.length);let o=r.at(-1);o?.type==="text"?(o.raw+=(o.raw.endsWith(` `)?"":` `)+s.raw,o.text+=` -`+s.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=o.text):t.push(s);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}linkInText(e){if(!e.includes("["))return!1;let t=this.tokenizer.rules.inline.link;for(let n of e.matchAll(this.tokenizer.rules.inline.blockSkip))if(t.test(n[0])&&e.charAt(n.index-1)!=="!")return!0;for(let n of e.matchAll(this.tokenizer.rules.inline.reflinkSearch)){let i=n[0],s=i.lastIndexOf("[");if(!(i.charAt(0)==="!"||!Object.hasOwn(this.tokens.links,wr(i.slice(s+1,-1))))&&!(s>1&&this.linkInText(i.slice(1,s-1))))return!0}return!1}inlineTokens(e,t=[]){this.tokenizer.lexer=this;let n=this.state.linkParenPossible;this.state.linkParenPossible=n&&e.includes(")");try{return this.#e(e,t)}finally{this.state.linkParenPossible=n}}#e(e,t){let n=e.includes("*")||e.includes("_")||e.includes("~")||this.options.hooks?.emStrongMask||this.tokenizer.emStrong!==at.prototype.emStrong||this.tokenizer.del!==at.prototype.del?this.#r(e):e;Hp(this.tokenizer,n);try{return this.#t(e,n,t)}finally{Kp(this.tokenizer)}}#t(e,t,n){let i=!1,s="",a=1/0;for(;e;){if(e.length<a)a=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}i||(s=""),i=!1;let o;if(this.options.extensions?.inline?.some(O=>(o=O.call({lexer:this},e,n))?(e=e.substring(o.raw.length),n.push(o),!0):!1))continue;if(o=this.tokenizer.escape(e)){e=e.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.tag(e)){e=e.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.link(e)){e=e.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(o.raw.length);let O=n.at(-1);o.type==="text"&&O?.type==="text"?(O.raw+=o.raw,O.text+=o.text):n.push(o);continue}if(o=this.tokenizer.emStrong(e,t,s)){e=e.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.codespan(e)){e=e.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.br(e)){e=e.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.del(e,t,s)){e=e.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.autolink(e)){e=e.substring(o.raw.length),n.push(o);continue}if(!this.state.inLink&&(o=this.tokenizer.url(e))){e=e.substring(o.raw.length),n.push(o);continue}let l=e;if(this.options.extensions?.startInline){let O=1/0,c=e.slice(1),h;this.options.extensions.startInline.forEach(p=>{h=p.call({lexer:this},c),typeof h=="number"&&h>=0&&(O=Math.min(O,h))}),O<1/0&&O>=0&&(l=e.substring(0,O+1))}if(o=this.tokenizer.inlineText(l)){e=e.substring(o.raw.length),o.raw.slice(-1)!=="_"&&(s=o.raw.slice(-1)),i=!0;let O=n.at(-1);O?.type==="text"?(O.raw+=o.raw,O.text+=o.text):n.push(o);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return n}#r(e){let t=e;if(this.tokens.links&&e.includes("[")){let n=this.tokenizer.rules.inline.reflinkSearch,i=s=>{let a=s.lastIndexOf("[");if(!Object.hasOwn(this.tokens.links,wr(s.slice(a+1,-1))))return s;if(a>1&&s.charAt(0)!=="!"){let o=s.slice(1,a-1);if(this.linkInText(o))return"["+o.replace(n,i)+"]["+"a".repeat(s.length-a-2)+"]"}return"["+"a".repeat(s.length-2)+"]"};t=t.replace(n,i)}return t=t.replace(this.tokenizer.rules.inline.anyPunctuationOutsideCode,(n,i,s)=>s?"+".repeat(n.length):i?i+n.slice(i.length,-i.length).replace(/`/g,"+")+i:n),t=t.replace(this.tokenizer.rules.inline.blockSkip,(n,i,s)=>{let a=s?s.length:0;return n.slice(0,a)+"["+"a".repeat(n.length-a-2)+"]"}),t=this.options.hooks?.emStrongMask?.call({lexer:this},t)??t,t}infiniteLoopError(e){let t="Infinite loop on byte: "+e;if(this.options.silent)console.error(t);else throw new Error(t)}},yr=class{options;parser;constructor(r){this.options=r||Ue}space(r){return""}code({text:r,lang:e,escaped:t}){let n=(e||"").match(Y.notSpaceStart)?.[0],i=r?r.replace(Y.endingNewline,"")+` -`:"";return n?'<pre><code class="language-'+H(n)+'">'+(t?i:H(i,!0))+`</code></pre> -`:"<pre><code>"+(t?i:H(i,!0))+`</code></pre> -`}blockquote({tokens:r}){return`<blockquote> -${this.parser.parse(r)}</blockquote> -`}html({text:r}){return r}def(r){return""}heading({tokens:r,depth:e}){return`<h${e}>${this.parser.parseInline(r)}</h${e}> -`}hr(r){return`<hr> -`}list(r){let e=r.ordered,t=r.start,n="";for(let a=0;a<r.items.length;a++){let o=r.items[a];n+=this.listitem(o)}let i=e?"ol":"ul",s=e&&t!==1?' start="'+t+'"':"";return"<"+i+s+`> +`+s.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=o.text):r.push(s);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return this.state.top=!0,r}inline(e,r=[]){return this.inlineQueue.push({src:e,tokens:r}),r}linkInText(e){if(!e.includes("["))return!1;let r=this.tokenizer.rules.inline.link;for(let n of e.matchAll(this.tokenizer.rules.inline.blockSkip))if(r.test(n[0])&&e.charAt(n.index-1)!=="!")return!0;for(let n of e.matchAll(this.tokenizer.rules.inline.reflinkSearch)){let i=n[0],s=i.lastIndexOf("[");if(!(i.charAt(0)==="!"||!Object.hasOwn(this.tokens.links,yr(i.slice(s+1,-1))))&&!(s>1&&this.linkInText(i.slice(1,s-1))))return!0}return!1}inlineTokens(e,r=[]){this.tokenizer.lexer=this;let n=this.state.linkParenPossible;this.state.linkParenPossible=n&&e.includes(")");try{return this.#e(e,r)}finally{this.state.linkParenPossible=n}}#e(e,r){let n=e.includes("*")||e.includes("_")||e.includes("~")||this.options.hooks?.emStrongMask||this.tokenizer.emStrong!==ot.prototype.emStrong||this.tokenizer.del!==ot.prototype.del?this.#r(e):e;Kp(this.tokenizer,n);try{return this.#t(e,n,r)}finally{Jp(this.tokenizer)}}#t(e,r,n){let i=!1,s="",a=1/0;for(;e;){if(e.length<a)a=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}i||(s=""),i=!1;let o;if(this.options.extensions?.inline?.some(O=>(o=O.call({lexer:this},e,n))?(e=e.substring(o.raw.length),n.push(o),!0):!1))continue;if(o=this.tokenizer.escape(e)){e=e.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.tag(e)){e=e.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.link(e)){e=e.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(o.raw.length);let O=n.at(-1);o.type==="text"&&O?.type==="text"?(O.raw+=o.raw,O.text+=o.text):n.push(o);continue}if(o=this.tokenizer.emStrong(e,r,s)){e=e.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.codespan(e)){e=e.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.br(e)){e=e.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.del(e,r,s)){e=e.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.autolink(e)){e=e.substring(o.raw.length),n.push(o);continue}if(!this.state.inLink&&(o=this.tokenizer.url(e))){e=e.substring(o.raw.length),n.push(o);continue}let l=e;if(this.options.extensions?.startInline){let O=1/0,c=e.slice(1),h;this.options.extensions.startInline.forEach(p=>{h=p.call({lexer:this},c),typeof h=="number"&&h>=0&&(O=Math.min(O,h))}),O<1/0&&O>=0&&(l=e.substring(0,O+1))}if(o=this.tokenizer.inlineText(l)){e=e.substring(o.raw.length),o.raw.slice(-1)!=="_"&&(s=o.raw.slice(-1)),i=!0;let O=n.at(-1);O?.type==="text"?(O.raw+=o.raw,O.text+=o.text):n.push(o);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return n}#r(e){let r=e;if(this.tokens.links&&e.includes("[")){let n=this.tokenizer.rules.inline.reflinkSearch,i=s=>{let a=s.lastIndexOf("[");if(!Object.hasOwn(this.tokens.links,yr(s.slice(a+1,-1))))return s;if(a>1&&s.charAt(0)!=="!"){let o=s.slice(1,a-1);if(this.linkInText(o))return"["+o.replace(n,i)+"]["+"a".repeat(s.length-a-2)+"]"}return"["+"a".repeat(s.length-2)+"]"};r=r.replace(n,i)}return r=r.replace(this.tokenizer.rules.inline.anyPunctuationOutsideCode,(n,i,s)=>s?"+".repeat(n.length):i?i+n.slice(i.length,-i.length).replace(/`/g,"+")+i:n),r=r.replace(this.tokenizer.rules.inline.blockSkip,(n,i,s)=>{let a=s?s.length:0;return n.slice(0,a)+"["+"a".repeat(n.length-a-2)+"]"}),r=this.options.hooks?.emStrongMask?.call({lexer:this},r)??r,r}infiniteLoopError(e){let r="Infinite loop on byte: "+e;if(this.options.silent)console.error(r);else throw new Error(r)}},Zr=class{options;parser;constructor(t){this.options=t||Ve}space(t){return""}code({text:t,lang:e,escaped:r}){let n=(e||"").match(C.notSpaceStart)?.[0],i=t?t.replace(C.endingNewline,"")+` +`:"";return n?'<pre><code class="language-'+H(n)+'">'+(r?i:H(i,!0))+`</code></pre> +`:"<pre><code>"+(r?i:H(i,!0))+`</code></pre> +`}blockquote({tokens:t}){return`<blockquote> +${this.parser.parse(t)}</blockquote> +`}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:e}){return`<h${e}>${this.parser.parseInline(t)}</h${e}> +`}hr(t){return`<hr> +`}list(t){let e=t.ordered,r=t.start,n="";for(let a=0;a<t.items.length;a++){let o=t.items[a];n+=this.listitem(o)}let i=e?"ol":"ul",s=e&&r!==1?' start="'+r+'"':"";return"<"+i+s+`> `+n+"</"+i+`> -`}listitem(r){return`<li>${this.parser.parse(r.tokens)}</li> -`}checkbox({checked:r}){return"<input "+(r?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:r}){return`<p>${this.parser.parseInline(r)}</p> -`}table(r){let e="",t="";for(let i=0;i<r.header.length;i++)t+=this.tablecell(r.header[i]);e+=this.tablerow({text:t});let n="";for(let i=0;i<r.rows.length;i++){let s=r.rows[i];t="";for(let a=0;a<s.length;a++)t+=this.tablecell(s[a]);n+=this.tablerow({text:t})}return n&&(n=`<tbody>${n}</tbody>`),`<table> +`}listitem(t){return`<li>${this.parser.parse(t.tokens)}</li> +`}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p> +`}table(t){let e="",r="";for(let i=0;i<t.header.length;i++)r+=this.tablecell(t.header[i]);e+=this.tablerow({text:r});let n="";for(let i=0;i<t.rows.length;i++){let s=t.rows[i];r="";for(let a=0;a<s.length;a++)r+=this.tablecell(s[a]);n+=this.tablerow({text:r})}return n&&(n=`<tbody>${n}</tbody>`),`<table> <thead> `+e+`</thead> `+n+`</table> -`}tablerow({text:r}){return`<tr> -${r}</tr> -`}tablecell(r){let e=this.parser.parseInline(r.tokens),t=r.header?"th":"td";return(r.align?`<${t} align="${r.align}">`:`<${t}>`)+e+`</${t}> -`}strong({tokens:r}){return`<strong>${this.parser.parseInline(r)}</strong>`}em({tokens:r}){return`<em>${this.parser.parseInline(r)}</em>`}codespan({text:r}){return`<code>${H(r,!0)}</code>`}br(r){return"<br>"}del({tokens:r}){return`<del>${this.parser.parseInline(r)}</del>`}link({href:r,title:e,text:t,tokens:n,autolink:i}){let s=i?H(t,!0):this.parser.parseInline(n),a=Ql(r);if(a===null)return s;r=H(a,i);let o='<a href="'+r+'"';return e&&(o+=' title="'+H(e)+'"'),o+=">"+s+"</a>",o}image({href:r,title:e,text:t,tokens:n}){n&&(t=this.parser.parseInline(n,this.parser.textRenderer));let i=Ql(r);if(i===null)return H(t);r=i;let s=`<img src="${H(r)}" alt="${H(t)}"`;return e&&(s+=` title="${H(e)}"`),s+=">",s}text(r){return"tokens"in r&&r.tokens?this.parser.parseInline(r.tokens):"escaped"in r&&r.escaped?r.text:H(r.text)}},Li=class{parser;strong({text:r,tokens:e}){return e?this.parser.parseInline(e,this):r}em({text:r,tokens:e}){return e?this.parser.parseInline(e,this):r}codespan({text:r}){return r}del({text:r,tokens:e}){return e?this.parser.parseInline(e,this):r}html({text:r}){return r}text({text:r}){return r}link({text:r,tokens:e}){return e?this.parser.parseInline(e,this):r}image({text:r,tokens:e}){return e?this.parser.parseInline(e,this):r}br(){return""}checkbox({raw:r}){return r}},ne=class Ti{options;renderer;textRenderer;constructor(e){this.options=e||Ue,this.options.renderer=this.options.renderer||new yr,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Li,this.textRenderer.parser=this}static parse(e,t){return new Ti(t).parse(e)}static parseInline(e,t){return new Ti(t).parseInline(e)}parse(e){this.renderer.parser=this;let t="";for(let n=0;n<e.length;n++){let i=e[n];if(this.options.extensions?.renderers?.[i.type]){let a=i,o=this.options.extensions.renderers[a.type].call({parser:this},a);if(o!==!1||!["space","hr","heading","code","table","blockquote","list","checkbox","html","def","paragraph","text"].includes(a.type)){t+=o||"";continue}}let s=i;switch(s.type){case"space":{t+=this.renderer.space(s);break}case"hr":{t+=this.renderer.hr(s);break}case"heading":{t+=this.renderer.heading(s);break}case"code":{t+=this.renderer.code(s);break}case"table":{t+=this.renderer.table(s);break}case"blockquote":{t+=this.renderer.blockquote(s);break}case"list":{t+=this.renderer.list(s);break}case"checkbox":{t+=this.renderer.checkbox(s);break}case"html":{t+=this.renderer.html(s);break}case"def":{t+=this.renderer.def(s);break}case"paragraph":{t+=this.renderer.paragraph(s);break}case"text":{t+=this.renderer.text(s);break}default:{let a='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return t}parseInline(e,t=this.renderer){this.renderer.parser=this;let n="";for(let i=0;i<e.length;i++){let s=e[i];if(this.options.extensions?.renderers?.[s.type]){let o=this.options.extensions.renderers[s.type].call({parser:this},s);if(o!==!1||!["escape","html","link","image","checkbox","strong","em","codespan","br","del","text"].includes(s.type)){n+=o||"";continue}}let a=s;switch(a.type){case"escape":{n+=t.text(a);break}case"html":{n+=t.html(a);break}case"link":{n+=t.link(a);break}case"image":{n+=t.image(a);break}case"checkbox":{n+=t.checkbox(a);break}case"strong":{n+=t.strong(a);break}case"em":{n+=t.em(a);break}case"codespan":{n+=t.codespan(a);break}case"br":{n+=t.br(a);break}case"del":{n+=t.del(a);break}case"text":{n+=t.text(a);break}default:{let o='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(o),"";throw new Error(o)}}}return n}},_t=class{options;block;constructor(r){this.options=r||Ue}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(r){return r}postprocess(r){return r}processAllTokens(r){return r}emStrongMask(r){return r}provideLexer(r=this.block){return r?re.lex:re.lexInline}provideParser(r=this.block){return r?ne.parse:ne.parseInline}};function ye(r,e){if(Array.isArray(e))for(let t=0;t<e.length;t++)r.push(e[t]);else r.push(e)}var Ei=class{defaults=Ri();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=ne;Renderer=yr;TextRenderer=Li;Lexer=re;Tokenizer=at;Hooks=_t;constructor(...r){this.use(...r)}walkTokens(r,e){let t=[];for(let n of r)switch(ye(t,e.call(this,n)),n.type){case"table":{let i=n;for(let s of i.header)ye(t,this.walkTokens(s.tokens,e));for(let s of i.rows)for(let a of s)ye(t,this.walkTokens(a.tokens,e));break}case"list":{let i=n;ye(t,this.walkTokens(i.items,e));break}default:{let i=n;this.defaults.extensions?.childTokens?.[i.type]?this.defaults.extensions.childTokens[i.type].forEach(s=>{let a=i[s].flat(1/0);ye(t,this.walkTokens(a,e))}):i.tokens&&ye(t,this.walkTokens(i.tokens,e))}}return t}use(...r){let e=this.defaults.extensions||{renderers:Object.create(null),childTokens:Object.create(null)};return r.forEach(t=>{let n={...t};if(n.async=this.defaults.async||n.async||!1,t.extensions&&(t.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if("renderer"in i){let s=e.renderers[i.name];s?e.renderers[i.name]=function(...a){let o=i.renderer.apply(this,a);return o===!1&&(o=s.apply(this,a)),o}:e.renderers[i.name]=i.renderer}if("tokenizer"in i){if(!i.level||i.level!=="block"&&i.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let s=e[i.level];s?s.unshift(i.tokenizer):e[i.level]=[i.tokenizer],i.start&&(i.level==="block"?e.startBlock?e.startBlock.push(i.start):e.startBlock=[i.start]:i.level==="inline"&&(e.startInline?e.startInline.push(i.start):e.startInline=[i.start]))}"childTokens"in i&&i.childTokens&&(e.childTokens[i.name]=i.childTokens)}),n.extensions=e),t.renderer){let i=this.defaults.renderer||new yr(this.defaults);for(let s in t.renderer){if(!(s in i))throw new Error(`renderer '${s}' does not exist`);if(["options","parser"].includes(s))continue;let a=s,o=t.renderer[a],l=i[a];i[a]=(...O)=>{let c=o.apply(i,O);return c===!1&&(c=l.apply(i,O)),c===!1?"":c??""}}n.renderer=i}if(t.tokenizer){let i=this.defaults.tokenizer||new at(this.defaults);for(let s in t.tokenizer){if(!(s in i))throw new Error(`tokenizer '${s}' does not exist`);if(["options","rules","lexer"].includes(s))continue;let a=s,o=t.tokenizer[a],l=i[a];i[a]=(...O)=>{let c=o.apply(i,O);return c===!1&&(c=l.apply(i,O)),c}}n.tokenizer=i}if(t.hooks){let i=this.defaults.hooks||new _t;for(let s in t.hooks){if(!(s in i))throw new Error(`hook '${s}' does not exist`);if(["options","block"].includes(s))continue;let a=s,o=t.hooks[a],l=i[a];_t.passThroughHooks.has(s)?i[a]=O=>{if(i.options.async&&_t.passThroughHooksRespectAsync.has(s))return(async()=>{let h=await o.call(i,O);return l.call(i,h)})();let c=o.call(i,O);return l.call(i,c)}:i[a]=(...O)=>{if(i.options.async)return(async()=>{let h=await o.apply(i,O);return h===!1&&(h=await l.apply(i,O)),h})();let c=o.apply(i,O);return c===!1&&(c=l.apply(i,O)),c}}n.hooks=i}if(t.walkTokens){let i=this.defaults.walkTokens,s=t.walkTokens;n.walkTokens=function(a){let o=[];return ye(o,s.call(this,a)),i&&ye(o,i.call(this,a)),o}}this.defaults={...this.defaults,...n}}),this}setOptions(r){return this.defaults={...this.defaults,...r},this}lexer(r,e){return re.lex(r,e??this.defaults)}parser(r,e){return ne.parse(r,e??this.defaults)}parseMarkdown(r){return(e,t)=>{let n={...t},i={...this.defaults,...n},s=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&n.async===!1)return s(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof e>"u"||e===null)return s(new Error("marked(): input parameter is undefined or null"));if(typeof e!="string")return s(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));if(i.hooks&&(i.hooks.options=i,i.hooks.block=r),i.async)return(async()=>{let a=i.hooks?await i.hooks.preprocess(e):e,o=await(i.hooks?await i.hooks.provideLexer(r):r?re.lex:re.lexInline)(a,i),l=i.hooks?await i.hooks.processAllTokens(o):o;i.walkTokens&&await Promise.all(this.walkTokens(l,i.walkTokens));let O=await(i.hooks?await i.hooks.provideParser(r):r?ne.parse:ne.parseInline)(l,i);return i.hooks?await i.hooks.postprocess(O):O})().catch(s);try{i.hooks&&(e=i.hooks.preprocess(e));let a=(i.hooks?i.hooks.provideLexer(r):r?re.lex:re.lexInline)(e,i);i.hooks&&(a=i.hooks.processAllTokens(a)),i.walkTokens&&this.walkTokens(a,i.walkTokens);let o=(i.hooks?i.hooks.provideParser(r):r?ne.parse:ne.parseInline)(a,i);return i.hooks&&(o=i.hooks.postprocess(o)),o}catch(a){return s(a)}}}onError(r,e){return t=>{if(t.message+=` -Please report this to https://github.com/markedjs/marked.`,r){let n="<p>An error occurred:</p><pre>"+H(t.message+"",!0)+"</pre>";return e?Promise.resolve(n):n}if(e)return Promise.reject(t);throw t}}},Me=new Ei;function j(r,e){return Me.parse(r,e)}j.options=j.setOptions=function(r){return Me.setOptions(r),j.defaults=Me.defaults,xl(j.defaults),j};j.getDefaults=Ri;j.defaults=Ue;function rf(...r){return Me.use(...r),j.defaults=Me.defaults,xl(j.defaults),j}j.use=rf;j.walkTokens=function(r,e){return Me.walkTokens(r,e)};j.parseInline=Me.parseInline;j.Parser=ne;j.parser=ne.parse;j.Renderer=yr;j.TextRenderer=Li;j.Lexer=re;j.lexer=re.lex;j.Tokenizer=at;j.Hooks=_t;j.parse=j;var Rd=j.options,jd=j.setOptions,_d=j.walkTokens,Yd=j.parseInline;var Cd=ne.parse,zd=re.lex;var Wi=/^ivy:\/\/res\/([A-Za-z0-9_-]{8,64})/,Yl=/^ivy:\/\/note\/([A-Za-z0-9_-]{8,64})/;function oe(r){return r.replace(/[&<>"']/g,e=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[e])}function Cl(r){return r.toLowerCase().trim().replace(/<[^>]+>/g,"").replace(/[^\p{L}\p{N}\s-]/gu,"").replace(/\s+/g,"-")}function nf(r){let e=new Ei({gfm:!0,breaks:!1}),t=i=>{let s=Wi.exec(i);if(s)return r.resolveResource?.(s[1])||i;let a=Yl.exec(i);return a?r.noteHref?.(a[1])??"#":i},n=0;return e.use({extensions:[{name:"wikilink",level:"inline",start:i=>i.indexOf("[["),tokenizer(i){let s=/^\[\[([^[\]\n]+?)\]\]/.exec(i);if(s)return{type:"wikilink",raw:s[0],inner:s[1]}},renderer(i){let s=pl(i.inner),a=oe(s.alias||s.target),o=r.resolveTitle?.(s.target)??"";if(!o)return`<a class="wikilink missing" data-title="${oe(s.target)}">${a}</a>`;let l=(r.noteHref?.(o)??"#")+(s.heading?"#"+Cl(s.heading):"");return`<a class="wikilink" data-note="${o}" href="${oe(l)}">${a}</a>`}},{name:"highlight",level:"inline",start:i=>i.indexOf("=="),tokenizer(i){let s=/^==([^=\n]+)==/.exec(i);if(s)return{type:"highlight",raw:s[0],text:s[1]}},renderer(i){return`<mark>${oe(i.text)}</mark>`}}],renderer:{heading({tokens:i,depth:s}){let a=this.parser.parseInline(i);return`<h${s} id="${Cl(a)}">${a}</h${s}> -`},image({href:i,title:s,text:a}){let o=Wi.exec(i),l=o?r.resourceKind?.(o[1]):void 0,O=oe(t(i)),c=s?` title="${oe(s)}"`:"";return l==="video"?`<video src="${O}" controls preload="metadata"${c}></video>`:l==="audio"?`<audio src="${O}" controls preload="metadata"${c}></audio>`:l==="file"?`<a class="file-card" href="${O}" target="_blank" rel="noopener">\u{1F4CE} ${oe(a||"file")}</a>`:`<img src="${O}" alt="${oe(a)}" loading="lazy"${c}>`},link({href:i,title:s,tokens:a}){let o=this.parser.parseInline(a),l=Wi.exec(i),O=Yl.exec(i),c=oe(t(i)),h=s?` title="${oe(s)}"`:"";if(O)return`<a class="wikilink" data-note="${O[1]}" href="${c}"${h}>${o}</a>`;if(l)return`<a class="file-card" href="${c}" target="_blank" rel="noopener"${h}>\u{1F4CE} ${o}</a>`;let p=/^https?:\/\//i.test(i);return`<a href="${c}"${h}${p?' target="_blank" rel="noopener noreferrer"':""}>${o}</a>`},listitem(i){let s=this.parser.parse(i.tokens);if(i.task){let a=n++;s=s.replace(/^<input[^>]*>\s*/,"");let o=r.interactiveTasks?"":" disabled";return`<li class="task${i.checked?" done":""}"><input type="checkbox" data-task="${a}"${i.checked?" checked":""}${o}><span>${s}</span></li> +`}tablerow({text:t}){return`<tr> +${t}</tr> +`}tablecell(t){let e=this.parser.parseInline(t.tokens),r=t.header?"th":"td";return(t.align?`<${r} align="${t.align}">`:`<${r}>`)+e+`</${r}> +`}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${H(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:e,text:r,tokens:n,autolink:i}){let s=i?H(r,!0):this.parser.parseInline(n),a=$l(t);if(a===null)return s;t=H(a,i);let o='<a href="'+t+'"';return e&&(o+=' title="'+H(e)+'"'),o+=">"+s+"</a>",o}image({href:t,title:e,text:r,tokens:n}){n&&(r=this.parser.parseInline(n,this.parser.textRenderer));let i=$l(t);if(i===null)return H(r);t=i;let s=`<img src="${H(t)}" alt="${H(r)}"`;return e&&(s+=` title="${H(e)}"`),s+=">",s}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:H(t.text)}},Ei=class{parser;strong({text:t,tokens:e}){return e?this.parser.parseInline(e,this):t}em({text:t,tokens:e}){return e?this.parser.parseInline(e,this):t}codespan({text:t}){return t}del({text:t,tokens:e}){return e?this.parser.parseInline(e,this):t}html({text:t}){return t}text({text:t}){return t}link({text:t,tokens:e}){return e?this.parser.parseInline(e,this):t}image({text:t,tokens:e}){return e?this.parser.parseInline(e,this):t}br(){return""}checkbox({raw:t}){return t}},ne=class Ri{options;renderer;textRenderer;constructor(e){this.options=e||Ve,this.options.renderer=this.options.renderer||new Zr,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Ei,this.textRenderer.parser=this}static parse(e,r){return new Ri(r).parse(e)}static parseInline(e,r){return new Ri(r).parseInline(e)}parse(e){this.renderer.parser=this;let r="";for(let n=0;n<e.length;n++){let i=e[n];if(this.options.extensions?.renderers?.[i.type]){let a=i,o=this.options.extensions.renderers[a.type].call({parser:this},a);if(o!==!1||!["space","hr","heading","code","table","blockquote","list","checkbox","html","def","paragraph","text"].includes(a.type)){r+=o||"";continue}}let s=i;switch(s.type){case"space":{r+=this.renderer.space(s);break}case"hr":{r+=this.renderer.hr(s);break}case"heading":{r+=this.renderer.heading(s);break}case"code":{r+=this.renderer.code(s);break}case"table":{r+=this.renderer.table(s);break}case"blockquote":{r+=this.renderer.blockquote(s);break}case"list":{r+=this.renderer.list(s);break}case"checkbox":{r+=this.renderer.checkbox(s);break}case"html":{r+=this.renderer.html(s);break}case"def":{r+=this.renderer.def(s);break}case"paragraph":{r+=this.renderer.paragraph(s);break}case"text":{r+=this.renderer.text(s);break}default:{let a='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return r}parseInline(e,r=this.renderer){this.renderer.parser=this;let n="";for(let i=0;i<e.length;i++){let s=e[i];if(this.options.extensions?.renderers?.[s.type]){let o=this.options.extensions.renderers[s.type].call({parser:this},s);if(o!==!1||!["escape","html","link","image","checkbox","strong","em","codespan","br","del","text"].includes(s.type)){n+=o||"";continue}}let a=s;switch(a.type){case"escape":{n+=r.text(a);break}case"html":{n+=r.html(a);break}case"link":{n+=r.link(a);break}case"image":{n+=r.image(a);break}case"checkbox":{n+=r.checkbox(a);break}case"strong":{n+=r.strong(a);break}case"em":{n+=r.em(a);break}case"codespan":{n+=r.codespan(a);break}case"br":{n+=r.br(a);break}case"del":{n+=r.del(a);break}case"text":{n+=r.text(a);break}default:{let o='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(o),"";throw new Error(o)}}}return n}},Ct=class{options;block;constructor(t){this.options=t||Ve}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(t=this.block){return t?re.lex:re.lexInline}provideParser(t=this.block){return t?ne.parse:ne.parseInline}};function ye(t,e){if(Array.isArray(e))for(let r=0;r<e.length;r++)t.push(e[r]);else t.push(e)}var Wi=class{defaults=ji();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=ne;Renderer=Zr;TextRenderer=Ei;Lexer=re;Tokenizer=ot;Hooks=Ct;constructor(...t){this.use(...t)}walkTokens(t,e){let r=[];for(let n of t)switch(ye(r,e.call(this,n)),n.type){case"table":{let i=n;for(let s of i.header)ye(r,this.walkTokens(s.tokens,e));for(let s of i.rows)for(let a of s)ye(r,this.walkTokens(a.tokens,e));break}case"list":{let i=n;ye(r,this.walkTokens(i.items,e));break}default:{let i=n;this.defaults.extensions?.childTokens?.[i.type]?this.defaults.extensions.childTokens[i.type].forEach(s=>{let a=i[s].flat(1/0);ye(r,this.walkTokens(a,e))}):i.tokens&&ye(r,this.walkTokens(i.tokens,e))}}return r}use(...t){let e=this.defaults.extensions||{renderers:Object.create(null),childTokens:Object.create(null)};return t.forEach(r=>{let n={...r};if(n.async=this.defaults.async||n.async||!1,r.extensions&&(r.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if("renderer"in i){let s=e.renderers[i.name];s?e.renderers[i.name]=function(...a){let o=i.renderer.apply(this,a);return o===!1&&(o=s.apply(this,a)),o}:e.renderers[i.name]=i.renderer}if("tokenizer"in i){if(!i.level||i.level!=="block"&&i.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let s=e[i.level];s?s.unshift(i.tokenizer):e[i.level]=[i.tokenizer],i.start&&(i.level==="block"?e.startBlock?e.startBlock.push(i.start):e.startBlock=[i.start]:i.level==="inline"&&(e.startInline?e.startInline.push(i.start):e.startInline=[i.start]))}"childTokens"in i&&i.childTokens&&(e.childTokens[i.name]=i.childTokens)}),n.extensions=e),r.renderer){let i=this.defaults.renderer||new Zr(this.defaults);for(let s in r.renderer){if(!(s in i))throw new Error(`renderer '${s}' does not exist`);if(["options","parser"].includes(s))continue;let a=s,o=r.renderer[a],l=i[a];i[a]=(...O)=>{let c=o.apply(i,O);return c===!1&&(c=l.apply(i,O)),c===!1?"":c??""}}n.renderer=i}if(r.tokenizer){let i=this.defaults.tokenizer||new ot(this.defaults);for(let s in r.tokenizer){if(!(s in i))throw new Error(`tokenizer '${s}' does not exist`);if(["options","rules","lexer"].includes(s))continue;let a=s,o=r.tokenizer[a],l=i[a];i[a]=(...O)=>{let c=o.apply(i,O);return c===!1&&(c=l.apply(i,O)),c}}n.tokenizer=i}if(r.hooks){let i=this.defaults.hooks||new Ct;for(let s in r.hooks){if(!(s in i))throw new Error(`hook '${s}' does not exist`);if(["options","block"].includes(s))continue;let a=s,o=r.hooks[a],l=i[a];Ct.passThroughHooks.has(s)?i[a]=O=>{if(i.options.async&&Ct.passThroughHooksRespectAsync.has(s))return(async()=>{let h=await o.call(i,O);return l.call(i,h)})();let c=o.call(i,O);return l.call(i,c)}:i[a]=(...O)=>{if(i.options.async)return(async()=>{let h=await o.apply(i,O);return h===!1&&(h=await l.apply(i,O)),h})();let c=o.apply(i,O);return c===!1&&(c=l.apply(i,O)),c}}n.hooks=i}if(r.walkTokens){let i=this.defaults.walkTokens,s=r.walkTokens;n.walkTokens=function(a){let o=[];return ye(o,s.call(this,a)),i&&ye(o,i.call(this,a)),o}}this.defaults={...this.defaults,...n}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return re.lex(t,e??this.defaults)}parser(t,e){return ne.parse(t,e??this.defaults)}parseMarkdown(t){return(e,r)=>{let n={...r},i={...this.defaults,...n},s=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&n.async===!1)return s(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof e>"u"||e===null)return s(new Error("marked(): input parameter is undefined or null"));if(typeof e!="string")return s(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));if(i.hooks&&(i.hooks.options=i,i.hooks.block=t),i.async)return(async()=>{let a=i.hooks?await i.hooks.preprocess(e):e,o=await(i.hooks?await i.hooks.provideLexer(t):t?re.lex:re.lexInline)(a,i),l=i.hooks?await i.hooks.processAllTokens(o):o;i.walkTokens&&await Promise.all(this.walkTokens(l,i.walkTokens));let O=await(i.hooks?await i.hooks.provideParser(t):t?ne.parse:ne.parseInline)(l,i);return i.hooks?await i.hooks.postprocess(O):O})().catch(s);try{i.hooks&&(e=i.hooks.preprocess(e));let a=(i.hooks?i.hooks.provideLexer(t):t?re.lex:re.lexInline)(e,i);i.hooks&&(a=i.hooks.processAllTokens(a)),i.walkTokens&&this.walkTokens(a,i.walkTokens);let o=(i.hooks?i.hooks.provideParser(t):t?ne.parse:ne.parseInline)(a,i);return i.hooks&&(o=i.hooks.postprocess(o)),o}catch(a){return s(a)}}}onError(t,e){return r=>{if(r.message+=` +Please report this to https://github.com/markedjs/marked.`,t){let n="<p>An error occurred:</p><pre>"+H(r.message+"",!0)+"</pre>";return e?Promise.resolve(n):n}if(e)return Promise.reject(r);throw r}}},Ue=new Wi;function j(t,e){return Ue.parse(t,e)}j.options=j.setOptions=function(t){return Ue.setOptions(t),j.defaults=Ue.defaults,wl(j.defaults),j};j.getDefaults=ji;j.defaults=Ve;function nf(...t){return Ue.use(...t),j.defaults=Ue.defaults,wl(j.defaults),j}j.use=nf;j.walkTokens=function(t,e){return Ue.walkTokens(t,e)};j.parseInline=Ue.parseInline;j.Parser=ne;j.parser=ne.parse;j.Renderer=Zr;j.TextRenderer=Ei;j.Lexer=re;j.lexer=re.lex;j.Tokenizer=ot;j.Hooks=Ct;j.parse=j;var zd=j.options,qd=j.setOptions,Ad=j.walkTokens,Ld=j.parseInline;var Ed=ne.parse,Wd=re.lex;var Mi=/^ivy:\/\/res\/([A-Za-z0-9_-]{8,64})/,Yl=/^ivy:\/\/note\/([A-Za-z0-9_-]{8,64})/;function oe(t){return t.replace(/[&<>"']/g,e=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[e])}function zl(t){return t.toLowerCase().trim().replace(/<[^>]+>/g,"").replace(/[^\p{L}\p{N}\s-]/gu,"").replace(/\s+/g,"-")}function sf(t){let e=new Wi({gfm:!0,breaks:!1}),r=i=>{let s=Mi.exec(i);if(s)return t.resolveResource?.(s[1])||i;let a=Yl.exec(i);return a?t.noteHref?.(a[1])??"#":i},n=0;return e.use({extensions:[{name:"wikilink",level:"inline",start:i=>i.indexOf("[["),tokenizer(i){let s=/^\[\[([^[\]\n]+?)\]\]/.exec(i);if(s)return{type:"wikilink",raw:s[0],inner:s[1]}},renderer(i){let s=fl(i.inner),a=oe(s.alias||s.target),o=t.resolveTitle?.(s.target)??"";if(!o)return`<a class="wikilink missing" data-title="${oe(s.target)}">${a}</a>`;let l=(t.noteHref?.(o)??"#")+(s.heading?"#"+zl(s.heading):"");return`<a class="wikilink" data-note="${o}" href="${oe(l)}">${a}</a>`}},{name:"highlight",level:"inline",start:i=>i.indexOf("=="),tokenizer(i){let s=/^==([^=\n]+)==/.exec(i);if(s)return{type:"highlight",raw:s[0],text:s[1]}},renderer(i){return`<mark>${oe(i.text)}</mark>`}}],renderer:{heading({tokens:i,depth:s}){let a=this.parser.parseInline(i);return`<h${s} id="${zl(a)}">${a}</h${s}> +`},image({href:i,title:s,text:a}){let o=Mi.exec(i),l=o?t.resourceKind?.(o[1]):void 0,O=oe(r(i)),c=s?` title="${oe(s)}"`:"";return l==="video"?`<video src="${O}" controls preload="metadata"${c}></video>`:l==="audio"?`<audio src="${O}" controls preload="metadata"${c}></audio>`:l==="file"?`<a class="file-card" href="${O}" target="_blank" rel="noopener">\u{1F4CE} ${oe(a||"file")}</a>`:`<img src="${O}" alt="${oe(a)}" loading="lazy"${c}>`},link({href:i,title:s,tokens:a}){let o=this.parser.parseInline(a),l=Mi.exec(i),O=Yl.exec(i),c=oe(r(i)),h=s?` title="${oe(s)}"`:"";if(O)return`<a class="wikilink" data-note="${O[1]}" href="${c}"${h}>${o}</a>`;if(l)return`<a class="file-card" href="${c}" target="_blank" rel="noopener"${h}>\u{1F4CE} ${o}</a>`;let p=/^https?:\/\//i.test(i);return`<a href="${c}"${h}${p?' target="_blank" rel="noopener noreferrer"':""}>${o}</a>`},listitem(i){let s=this.parser.parse(i.tokens);if(i.task){let a=n++;s=s.replace(/^<input[^>]*>\s*/,"");let o=t.interactiveTasks?"":" disabled";return`<li class="task${i.checked?" done":""}"><input type="checkbox" data-task="${a}"${i.checked?" checked":""}${o}><span>${s}</span></li> `}return`<li>${s}</li> -`}}}),{marked:e,resetTasks:()=>n=0}}var zl=!1;function ql(r,e={}){let{marked:t,resetTasks:n}=nf(e);n();let i=t.parse(r,{async:!1});return e.citations&&(i=i.replace(/\[(\d{1,2})\](?![^<]*<\/a>)/g,'<sup class="cite"><a href="#" data-cite="$1">$1</a></sup>')),!zl&&typeof It.addHook=="function"&&(It.addHook("afterSanitizeAttributes",s=>{s.tagName==="A"&&s.getAttribute("target")==="_blank"&&s.setAttribute("rel","noopener noreferrer")}),zl=!0),It.sanitize(i,{ADD_TAGS:["video","audio"],ADD_ATTR:["target","controls","preload","data-note","data-title","data-task","data-cite","loading"],ALLOWED_URI_REGEXP:/^(?:(?:https?|mailto|tel|blob):|\/|#|[^a-z]|[a-z+.-]+(?:[^a-z+.\-:]|$))/i})}function Ve(r){window.IvyAndroid?.postMessage(JSON.stringify(r))}var vr="",Ll=[],Zr=new Map,Tr={},Xr="",P=null,El=new _r,Wl=new _r,sf={zh:{placeholder:"\u5F00\u59CB\u5199\u4F5C\u2026",bold:"\u52A0\u7C97",italic:"\u659C\u4F53",strike:"\u5220\u9664\u7EBF"},en:{placeholder:"Start writing\u2026",bold:"bold",italic:"italic",strike:"strikethrough"}},Mi="zh",Ze=()=>sf[Mi];function Al(r,e){return`/res/${encodeURIComponent(r)}${e?"?thumb=1":""}`}var Ml={resolveResource:Al,resourceKind:r=>Tr[r]??"image",resolveTitle:r=>Zr.get(Sr(r.split("#")[0].split("|")[0]))??"",openNote:(r,e)=>Ve({type:"open",id:r,title:e}),renderBlock:r=>ql(r,{resolveResource:Al,resourceKind:e=>Tr[e],resolveTitle:e=>Ml.resolveTitle(e),noteHref:()=>"#"})};function af(){return Ll.filter(r=>r.id!==vr&&r.title).map(r=>({title:r.title,detail:r.folder}))}function of(r){return[ps(),Rs(),Go({top:!0}),Vo(),Ao({base:rt,addKeymap:!0}),hl,cl,X.lineWrapping,Wl.of(Yr(Ze().placeholder)),zs({override:[ul(af)],icons:!1,activateOnTyping:!0}),Te.of([{key:"Mod-b",run:e=>de(e,"**",Ze().bold)},{key:"Mod-i",run:e=>de(e,"*",Ze().italic)},{key:"Mod-e",run:e=>de(e,"`","code")},{key:"Mod-Shift-x",run:e=>de(e,"~~",Ze().strike)},{key:"Mod-k",run:gi},{key:"Mod-Shift-k",run:Qi},{key:"Mod-Alt-1",run:e=>V(e,"# ")},{key:"Mod-Alt-2",run:e=>V(e,"## ")},{key:"Mod-Alt-3",run:e=>V(e,"### ")},{key:"Mod-Shift-7",run:e=>V(e,"1. ")},{key:"Mod-Shift-8",run:e=>V(e,"- ")},{key:"Mod-Shift-9",run:e=>V(e,"- [ ] ")},...Ys,...sn,...Fo,...fs,ms,...ds]),Ol(Ml),X.contentAttributes.of({class:"cm-live"}),El.of(Qe.readOnly.of(r)),X.updateListener.of(e=>{if(e.focusChanged&&Ve({type:"focus",focused:e.view.hasFocus}),!e.docChanged)return;let t=e.state.doc.toString();Xr=t,Ve({type:"change",id:vr,body:t})})]}var lf=document.getElementById("editor"),Ui=-1,Vi=!1;function Ul(){if(Vi=!1,!P)return;let r=P.lineBlockAtHeight(48-P.documentTop),e=P.state.doc.lineAt(Math.min(r.from,P.state.doc.length)).number-1;e!==Ui&&(Ui=e,Ve({type:"scroll",line:e}))}window.addEventListener("scroll",()=>{Vi||(Vi=!0,requestAnimationFrame(Ul))},{passive:!0});window.ivy={load(r){vr=r.id,Xr=r.body,r.fontSize&&document.documentElement.style.setProperty("--editor-size",`${r.fontSize}px`);let e=Qe.create({doc:r.body,extensions:of(!!r.readonly)});P?P.setState(e):P=new X({state:e,parent:lf}),P.scrollDOM.scrollTop=0,document.scrollingElement?.scrollTo(0,0),Ui=-1,Ul(),r.focus&&window.ivy.focus(!0)},setBody(r,e){if(!P||r!==vr||e===Xr)return;let t=P.state.doc.toString();if(Xr=e,e===t)return;let n=0;for(;n<t.length&&n<e.length&&t[n]===e[n];)n++;let i=t.length,s=e.length;for(;i>n&&s>n&&t[i-1]===e[s-1];)i--,s--;P.dispatch({changes:{from:n,to:i,insert:e.slice(n,s)}})},setTitles(r){Ll=r,Zr=new Map;for(let e of r){let t=Sr(e.title);t&&!Zr.has(t)&&Zr.set(t,e.id)}P?.dispatch({})},setKinds(r){let e=JSON.stringify(r)!==JSON.stringify(Tr);Tr=r,e&&P?.dispatch({})},insert(r,e=!0){!P||P.state.readOnly||mi(P,r,e)},setLanguage(r){Mi=r==="en"?"en":"zh",document.documentElement.lang=Mi==="zh"?"zh-CN":"en",P?.dispatch({effects:Wl.reconfigure(Yr(Ze().placeholder))})},setTheme(r){document.documentElement.dataset.theme=r?"dark":"light"},setReadonly(r){P?.dispatch({effects:El.reconfigure(Qe.readOnly.of(r))})},focus(r=!1){P&&(P.focus(),r&&P.dispatch({selection:{anchor:P.state.doc.length},scrollIntoView:!0}))},scrollToLine(r,e=!1){if(!P)return;let t=P.state.doc.line(Math.min(Math.max(1,r+1),P.state.doc.lines));P.dispatch({selection:{anchor:t.from},effects:X.scrollIntoView(t.from,{y:"start",yMargin:24})}),e&&P.focus()},command(r){if(P){switch(r){case"bold":de(P,"**",Ze().bold);break;case"italic":de(P,"*",Ze().italic);break;case"strike":de(P,"~~",Ze().strike);break;case"code":de(P,"`","code");break;case"h1":V(P,"# ");break;case"h2":V(P,"## ");break;case"h3":V(P,"### ");break;case"list":V(P,"- ");break;case"ordered":V(P,"1. ");break;case"task":V(P,"- [ ] ");break;case"quote":V(P,"> ");break;case"link":gi(P);break;case"wiki":Qi(P);break;case"rule":mi(P,"---",!0);break;case"undo":import("./chunks/dist-6TNHQW23.js").then(e=>P&&e.undo(P));return;case"redo":import("./chunks/dist-6TNHQW23.js").then(e=>P&&e.redo(P));return;case"blur":P.contentDOM.blur();return}P.focus()}}};window.addEventListener("error",r=>Ve({type:"error",message:String(r.message)}));document.addEventListener("error",r=>{let e=r.target;e&&"src"in e&&e!==window&&Ve({type:"log",message:`failed to load ${e.src}`})},!0);Ve({type:"ready"}); +`}}}),{marked:e,resetTasks:()=>n=0}}var ql=!1;function Al(t,e={}){let{marked:r,resetTasks:n}=sf(e);n();let i=r.parse(t,{async:!1});return e.citations&&(i=i.replace(/\[(\d{1,2})\](?![^<]*<\/a>)/g,'<sup class="cite"><a href="#" data-cite="$1">$1</a></sup>')),!ql&&typeof Dt.addHook=="function"&&(Dt.addHook("afterSanitizeAttributes",s=>{s.tagName==="A"&&s.getAttribute("target")==="_blank"&&s.setAttribute("rel","noopener noreferrer")}),ql=!0),Dt.sanitize(i,{ADD_TAGS:["video","audio"],ADD_ATTR:["target","controls","preload","data-note","data-title","data-task","data-cite","loading"],ALLOWED_URI_REGEXP:/^(?:(?:https?|mailto|tel|blob):|\/|#|[^a-z]|[a-z+.-]+(?:[^a-z+.\-:]|$))/i})}function Ge(t){window.IvyAndroid?.postMessage(JSON.stringify(t))}var Tr="",El=[],Xr=new Map,Rr={},vr="",P=null,Wl=new Cr,Ml=new Cr,af={zh:{placeholder:"\u5F00\u59CB\u5199\u4F5C\u2026",bold:"\u52A0\u7C97",italic:"\u659C\u4F53",strike:"\u5220\u9664\u7EBF"},en:{placeholder:"Start writing\u2026",bold:"bold",italic:"italic",strike:"strikethrough"}},Ui="zh",Ze=()=>af[Ui];function Ll(t,e){return`/res/${encodeURIComponent(t)}${e?"?thumb=1":""}`}var Ul={resolveResource:Ll,resourceKind:t=>Rr[t]??"image",resolveTitle:t=>Xr.get(kr(t.split("#")[0].split("|")[0]))??"",openNote:(t,e)=>Ge({type:"open",id:t,title:e}),renderBlock:t=>Al(t,{resolveResource:Ll,resourceKind:e=>Rr[e],resolveTitle:e=>Ul.resolveTitle(e),noteHref:()=>"#"})};function of(){return El.filter(t=>t.id!==Tr&&t.title).map(t=>({title:t.title,detail:t.folder}))}function lf(t){return[fs(),js(),Io({top:!0}),Go(),Lo({base:nt,addKeymap:!0}),ul,hl,X.lineWrapping,Ml.of(Yr(Ze().placeholder)),qs({override:[pl(of)],icons:!1,activateOnTyping:!0}),Te.of([{key:"Mod-b",run:e=>de(e,"**",Ze().bold)},{key:"Mod-i",run:e=>de(e,"*",Ze().italic)},{key:"Mod-e",run:e=>de(e,"`","code")},{key:"Mod-Shift-x",run:e=>de(e,"~~",Ze().strike)},{key:"Mod-k",run:Qi},{key:"Mod-Shift-k",run:$i},{key:"Mod-Alt-1",run:e=>V(e,"# ")},{key:"Mod-Alt-2",run:e=>V(e,"## ")},{key:"Mod-Alt-3",run:e=>V(e,"### ")},{key:"Mod-Shift-7",run:e=>V(e,"1. ")},{key:"Mod-Shift-8",run:e=>V(e,"- ")},{key:"Mod-Shift-9",run:e=>V(e,"- [ ] ")},...Ys,...an,...Ho,...ds,gs,...ms]),cl(Ul),X.contentAttributes.of({class:"cm-live"}),Wl.of(Qe.readOnly.of(t)),X.updateListener.of(e=>{if(e.focusChanged&&Ge({type:"focus",focused:e.view.hasFocus}),!e.docChanged)return;let r=e.state.doc.toString();vr=r,Ge({type:"change",id:Tr,body:r})})]}var Of=document.getElementById("editor"),Vi=-1,Gi=!1;function Vl(){if(Gi=!1,!P)return;let t=P.lineBlockAtHeight(48-P.documentTop),e=P.state.doc.lineAt(Math.min(t.from,P.state.doc.length)).number-1;e!==Vi&&(Vi=e,Ge({type:"scroll",line:e}))}window.addEventListener("scroll",()=>{Gi||(Gi=!0,requestAnimationFrame(Vl))},{passive:!0});window.ivy={load(t){Tr=t.id,vr=t.body,t.fontSize&&document.documentElement.style.setProperty("--editor-size",`${t.fontSize}px`);let e=Qe.create({doc:t.body,extensions:lf(!!t.readonly)});P?P.setState(e):P=new X({state:e,parent:Of}),P.scrollDOM.scrollTop=0,document.scrollingElement?.scrollTo(0,0),Vi=-1,Vl(),t.focus&&window.ivy.focus(!0)},setBody(t,e){if(!P||t!==Tr||e===vr)return;let r=P.state.doc.toString();if(vr=e,e===r)return;let n=0;for(;n<r.length&&n<e.length&&r[n]===e[n];)n++;let i=r.length,s=e.length;for(;i>n&&s>n&&r[i-1]===e[s-1];)i--,s--;P.dispatch({changes:{from:n,to:i,insert:e.slice(n,s)}})},setTitles(t){El=t,Xr=new Map;for(let e of t){let r=kr(e.title);r&&!Xr.has(r)&&Xr.set(r,e.id)}P?.dispatch({})},setKinds(t){let e=JSON.stringify(t)!==JSON.stringify(Rr);Rr=t,e&&P?.dispatch({})},insert(t,e=!0){!P||P.state.readOnly||gi(P,t,e)},setLanguage(t){Ui=t==="en"?"en":"zh",document.documentElement.lang=Ui==="zh"?"zh-CN":"en",P?.dispatch({effects:Ml.reconfigure(Yr(Ze().placeholder))})},setTheme(t){document.documentElement.dataset.theme=t?"dark":"light"},setReadonly(t){P?.dispatch({effects:Wl.reconfigure(Qe.readOnly.of(t))})},focus(t=!1){P&&(P.focus(),t&&P.dispatch({selection:{anchor:P.state.doc.length},scrollIntoView:!0}))},scrollToLine(t,e=!1){if(!P)return;let r=P.state.doc.line(Math.min(Math.max(1,t+1),P.state.doc.lines));P.dispatch({selection:{anchor:r.from},effects:X.scrollIntoView(r.from,{y:"start",yMargin:24})}),e&&P.focus()},command(t){if(P){switch(t){case"bold":de(P,"**",Ze().bold);break;case"italic":de(P,"*",Ze().italic);break;case"strike":de(P,"~~",Ze().strike);break;case"code":de(P,"`","code");break;case"h1":V(P,"# ");break;case"h2":V(P,"## ");break;case"h3":V(P,"### ");break;case"list":V(P,"- ");break;case"ordered":V(P,"1. ");break;case"task":V(P,"- [ ] ");break;case"quote":V(P,"> ");break;case"link":Qi(P);break;case"wiki":$i(P);break;case"rule":gi(P,"---",!0);break;case"undo":import("./chunks/dist-6TNHQW23.js").then(e=>P&&e.undo(P));return;case"redo":import("./chunks/dist-6TNHQW23.js").then(e=>P&&e.redo(P));return;case"blur":P.contentDOM.blur();return}P.focus()}}};window.addEventListener("error",t=>Ge({type:"error",message:String(t.message)}));document.addEventListener("error",t=>{let e=t.target;e&&"src"in e&&e!==window&&Ge({type:"log",message:`failed to load ${e.src}`})},!0);Ge({type:"ready"}); diff --git a/app/src/main/kotlin/app/ivynote/android/ui/Root.kt b/app/src/main/kotlin/app/ivynote/android/ui/Root.kt index f9f5470..5e45dc0 100644 --- a/app/src/main/kotlin/app/ivynote/android/ui/Root.kt +++ b/app/src/main/kotlin/app/ivynote/android/ui/Root.kt @@ -102,10 +102,12 @@ fun OpenLibrary(ref: LibraryRef, account: StoredAccount?, session: SessionStore? val key = LanguageSettings.accountKey(account.server, account.user.id) val scope = rememberCoroutineScope() DisposableEffect(key) { - app.language.onAccountChoice = { k, _ -> if (k == key) scope.launch { pushLanguage(session, key) } } + val send: (String, String) -> Unit = { k, _ -> if (k == key) scope.launch { pushLanguage(session, key) } } + app.language.onAccountChoice = send scope.launch { pushLanguage(session, key) } onDispose { - app.language.onAccountChoice = null + // Libraries cross-fade: the next one may have set its own already. + if (app.language.onAccountChoice === send) app.language.onAccountChoice = null app.language.accountClosed(key) } } From f77b0ae0e37a78656a710af8b3eb4f7882aa751d Mon Sep 17 00:00:00 2001 From: Claude <noreply@anthropic.com> Date: Sat, 7 Nov 2026 02:40:36 +0000 Subject: [PATCH 5/5] Localize the update dialog and the about sheet from main The in-app updater merged from main showed Chinese only; its dialog, about sheet, toasts and installer messages now come from Strings in both languages. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NZ7eDkNbqLj8z7BEXeW8wW --- .../app/ivynote/android/ui/LibrariesScreen.kt | 2 +- .../app/ivynote/android/ui/ShelfPane.kt | 2 +- .../kotlin/app/ivynote/android/ui/UpdateUi.kt | 64 +++++---- .../app/ivynote/android/update/Updater.kt | 17 +-- .../main/kotlin/app/ivynote/core/Strings.kt | 132 ++++++++++++++++++ 5 files changed, 176 insertions(+), 41 deletions(-) diff --git a/app/src/main/kotlin/app/ivynote/android/ui/LibrariesScreen.kt b/app/src/main/kotlin/app/ivynote/android/ui/LibrariesScreen.kt index 25941ec..7f7fb6f 100644 --- a/app/src/main/kotlin/app/ivynote/android/ui/LibrariesScreen.kt +++ b/app/src/main/kotlin/app/ivynote/android/ui/LibrariesScreen.kt @@ -178,7 +178,7 @@ fun LibrariesScreen() { TextButton(onClick = { about = true }) { val newer = update.info?.takeIf { it.available }?.latest Text( - if (newer != null) "关于常青笔记 · 有新版本 $newer" else "关于常青笔记 · ${IvyApp.instance.updater.current}", + if (newer != null) s.aboutNewer(newer) else s.aboutVersion(IvyApp.instance.updater.current), color = if (newer != null) c.ivy else c.muted, fontSize = 13.sp, ) } diff --git a/app/src/main/kotlin/app/ivynote/android/ui/ShelfPane.kt b/app/src/main/kotlin/app/ivynote/android/ui/ShelfPane.kt index ff5ac39..3fe6e48 100644 --- a/app/src/main/kotlin/app/ivynote/android/ui/ShelfPane.kt +++ b/app/src/main/kotlin/app/ivynote/android/ui/ShelfPane.kt @@ -281,7 +281,7 @@ private fun LibraryHeader(ui: LibraryUiState, session: SessionStore?, state: app onClick = { open = false; choosingLanguage = true }) DropdownMenuItem(text = { Text(s.manageLibraries) }, leadingIcon = { Icon(Icons.Outlined.Book, null) }, onClick = { open = false; catalog.open(null) }) - DropdownMenuItem(text = { Text("关于与检查更新…") }, leadingIcon = { Icon(Icons.Outlined.Info, null) }, + DropdownMenuItem(text = { Text(s.aboutAndUpdates) }, leadingIcon = { Icon(Icons.Outlined.Info, null) }, onClick = { open = false; about = true }) } } diff --git a/app/src/main/kotlin/app/ivynote/android/ui/UpdateUi.kt b/app/src/main/kotlin/app/ivynote/android/ui/UpdateUi.kt index 28cd925..c28e268 100644 --- a/app/src/main/kotlin/app/ivynote/android/ui/UpdateUi.kt +++ b/app/src/main/kotlin/app/ivynote/android/ui/UpdateUi.kt @@ -59,6 +59,7 @@ fun UpdateDialogHost() { @Composable private fun UpdateDialog(updater: Updater, s: Updater.State) { val c = Ivy.colors + val str = LocalStrings.current val context = LocalContext.current val info = s.info ?: return val asset = info.asset @@ -71,13 +72,13 @@ private fun UpdateDialog(updater: Updater, s: Updater.State) { onDismissRequest = { if (s.phase == Phase.DOWNLOADING) updater.hide() else if (s.phase != Phase.INSTALLING) updater.later() }, properties = DialogProperties(dismissOnClickOutside = !busy), containerColor = c.canvas, - title = { Text("发现新版本", style = SerifTitle) }, + title = { Text(str.updateAvailable, style = SerifTitle) }, text = { Column(verticalArrangement = Arrangement.spacedBy(10.dp)) { - Text("常青笔记 ${info.latest} 已发布", color = c.ink, fontWeight = FontWeight.SemiBold, fontSize = 16.sp) + Text(str.versionReleased(info.latest), color = c.ink, fontWeight = FontWeight.SemiBold, fontSize = 16.sp) Text( buildString { - append("当前版本 ${info.current}") + append(str.currentVersionIs(info.current)) if (asset != null && asset.size > 0) append(" · ").append(Formatter.formatShortFileSize(context, asset.size)) }, color = c.muted, fontSize = 13.sp, @@ -100,29 +101,29 @@ private fun UpdateDialog(updater: Updater, s: Updater.State) { val share = if (s.total > 0) (s.downloaded.toFloat() / s.total).coerceIn(0f, 1f) else 0f LinearProgressIndicator(progress = { share }, modifier = Modifier.fillMaxWidth(), color = c.ivy, trackColor = c.sunken) Text( - "正在下载… " + Formatter.formatShortFileSize(context, s.downloaded) + - (if (s.total > 0) " / " + Formatter.formatShortFileSize(context, s.total) else ""), + str.downloading(Formatter.formatShortFileSize(context, s.downloaded) + + (if (s.total > 0) " / " + Formatter.formatShortFileSize(context, s.total) else "")), color = c.muted, fontSize = 12.5.sp, ) } Phase.INSTALLING -> Row(verticalAlignment = Alignment.CenterVertically) { CircularProgressIndicator(Modifier.size(14.dp), strokeWidth = 2.dp, color = c.muted) Spacer(Modifier.width(8.dp)) - Text("正在保存笔记并打开安装程序…", color = c.muted, fontSize = 12.5.sp) + Text(str.savingAndInstalling, color = c.muted, fontSize = 12.5.sp) } - Phase.READY -> Text("新版本已下载并校验,按系统提示完成安装即可,笔记会先保存。", color = c.muted, fontSize = 12.5.sp) + Phase.READY -> Text(str.updateReady, color = c.muted, fontSize = 12.5.sp) else -> Text( when { - web && asset != null -> "调试版无法直接更新,请前往官网下载正式版。" - web -> "请前往官网下载新版本。" - else -> "下载完成后由系统安装,笔记会先保存。首次更新需要允许常青笔记安装应用。" + web && asset != null -> str.debugUpdateHint + web -> str.webUpdateHint + else -> str.updateHint }, color = c.muted, fontSize = 12.5.sp, ) } if (s.error.isNotEmpty() && (s.failed == Updater.Failed.DOWNLOAD || s.failed == Updater.Failed.INSTALL)) { Text( - (if (s.failed == Updater.Failed.DOWNLOAD) "下载失败" else "安装失败") + ":${s.error}。可以重试或前往官网下载。", + if (s.failed == Updater.Failed.DOWNLOAD) str.downloadFailed(s.error) else str.installFailed(s.error), color = c.danger, fontSize = 12.5.sp, ) } @@ -130,26 +131,26 @@ private fun UpdateDialog(updater: Updater, s: Updater.State) { }, confirmButton = { when (s.phase) { - Phase.DOWNLOADING -> TextButton(onClick = { updater.hide() }) { Text("后台下载", color = c.ivy) } - Phase.INSTALLING -> TextButton(onClick = {}, enabled = false) { Text("正在安装…") } - Phase.READY -> TextButton(onClick = { updater.install() }) { Text("立即安装", color = c.ivy, fontWeight = FontWeight.SemiBold) } + Phase.DOWNLOADING -> TextButton(onClick = { updater.hide() }) { Text(str.downloadInBackground, color = c.ivy) } + Phase.INSTALLING -> TextButton(onClick = {}, enabled = false) { Text(str.installing) } + Phase.READY -> TextButton(onClick = { updater.install() }) { Text(str.installNow, color = c.ivy, fontWeight = FontWeight.SemiBold) } else -> TextButton(onClick = { if (web) { updater.openDownloadPage(); updater.later() } else updater.downloadAndInstall() }) { - Text(if (web) "前往官网下载" else "立即更新", color = c.ivy, fontWeight = FontWeight.SemiBold) + Text(if (web) str.downloadFromWebsite else str.updateNow, color = c.ivy, fontWeight = FontWeight.SemiBold) } } }, dismissButton = { Row { when (s.phase) { - Phase.DOWNLOADING -> TextButton(onClick = { updater.cancelDownload() }) { Text("取消下载", color = c.ink2) } + Phase.DOWNLOADING -> TextButton(onClick = { updater.cancelDownload() }) { Text(str.cancelDownload, color = c.ink2) } Phase.INSTALLING -> Unit else -> { if (s.failed == Updater.Failed.DOWNLOAD || s.failed == Updater.Failed.INSTALL) { - TextButton(onClick = { updater.openDownloadPage() }) { Text("官网下载", color = c.ink2) } + TextButton(onClick = { updater.openDownloadPage() }) { Text(str.websiteDownload, color = c.ink2) } } else { - TextButton(onClick = { updater.skip() }) { Text("跳过此版本", color = c.muted) } + TextButton(onClick = { updater.skip() }) { Text(str.skipVersion, color = c.muted) } } - TextButton(onClick = { updater.later() }) { Text("稍后", color = c.ink2) } + TextButton(onClick = { updater.later() }) { Text(str.later, color = c.ink2) } } } } @@ -162,6 +163,7 @@ private fun UpdateDialog(updater: Updater, s: Updater.State) { @Composable fun AboutSheet(onDismiss: () -> Unit) { val c = Ivy.colors + val str = LocalStrings.current val context = LocalContext.current val updater = IvyApp.instance.updater val s by updater.state.collectAsState() @@ -175,12 +177,12 @@ fun AboutSheet(onDismiss: () -> Unit) { horizontalAlignment = Alignment.CenterHorizontally, ) { AppLogo(56.dp) - Text("常青笔记", style = SerifTitle, fontSize = 20.sp, color = c.ink) - Text("本地优先的 Markdown 笔记。离线也能写,联网后自动同步。", color = c.muted, fontSize = 13.5.sp) + Text(str.appName, style = SerifTitle, fontSize = 20.sp, color = c.ink) + Text(str.aboutTagline, color = c.muted, fontSize = 13.5.sp) Surface(shape = RoundedCornerShape(16.dp), color = c.surface, modifier = Modifier.fillMaxWidth()) { Column(Modifier.padding(horizontal = 16.dp, vertical = 4.dp)) { Row(Modifier.fillMaxWidth().padding(vertical = 10.dp), verticalAlignment = Alignment.CenterVertically) { - Text("版本", color = c.ink2, fontSize = 15.sp, modifier = Modifier.weight(1f)) + Text(str.version, color = c.ink2, fontSize = 15.sp, modifier = Modifier.weight(1f)) Text(updater.current, color = c.ink, fontSize = 15.sp) } HorizontalDivider(color = c.line) @@ -190,22 +192,22 @@ fun AboutSheet(onDismiss: () -> Unit) { }.padding(vertical = 10.dp), verticalAlignment = Alignment.CenterVertically, ) { - Text("检查更新", color = c.ink, fontSize = 15.sp, modifier = Modifier.weight(1f)) + Text(str.checkForUpdates, color = c.ink, fontSize = 15.sp, modifier = Modifier.weight(1f)) when { s.phase == Phase.CHECKING -> { CircularProgressIndicator(Modifier.size(14.dp), strokeWidth = 2.dp, color = c.muted) Spacer(Modifier.width(6.dp)) - Text("正在检查…", color = c.muted, fontSize = 13.sp) + Text(str.checking, color = c.muted, fontSize = 13.sp) } - s.phase == Phase.DOWNLOADING -> Text("正在下载 ${info?.latest}…", color = c.ivy, fontSize = 13.sp) - info?.available == true -> Text("有新版本 ${info.latest}", color = c.ivy, fontSize = 13.sp, fontWeight = FontWeight.Medium) - s.failed == Updater.Failed.CHECK -> Text("检查失败", color = c.danger, fontSize = 13.sp) - info != null -> Text("已是最新版本", color = c.muted, fontSize = 13.sp) + s.phase == Phase.DOWNLOADING -> Text(str.downloadingVersion(info?.latest.orEmpty()), color = c.ivy, fontSize = 13.sp) + info?.available == true -> Text(str.newVersion(info.latest), color = c.ivy, fontSize = 13.sp, fontWeight = FontWeight.Medium) + s.failed == Updater.Failed.CHECK -> Text(str.checkFailed, color = c.danger, fontSize = 13.sp) + info != null -> Text(str.upToDate, color = c.muted, fontSize = 13.sp) } } HorizontalDivider(color = c.line) Row(Modifier.fillMaxWidth().padding(vertical = 6.dp), verticalAlignment = Alignment.CenterVertically) { - Text("匿名使用统计", color = c.ink, fontSize = 15.sp, modifier = Modifier.weight(1f)) + Text(str.anonymousStats, color = c.ink, fontSize = 15.sp, modifier = Modifier.weight(1f)) Switch( checked = stats, onCheckedChange = { stats = it; updater.prefs.statsEnabled = it }, @@ -213,14 +215,14 @@ fun AboutSheet(onDismiss: () -> Unit) { ) } Text( - "检查更新时附带一个随机的安装编号(与账号无关),帮助我们了解有多少设备在使用常青笔记。不包含笔记内容或个人信息。", + str.anonymousStatsHint, color = c.muted, fontSize = 12.sp, modifier = Modifier.padding(bottom = 10.dp), ) } } TextButton(onClick = { runCatching { context.startActivity(Intent(Intent.ACTION_VIEW, Uri.parse(AppUpdates.SITES.first()))) } - }) { Text("官网 ivynote.net", color = c.ivy) } + }) { Text(str.website, color = c.ivy) } } } } diff --git a/app/src/main/kotlin/app/ivynote/android/update/Updater.kt b/app/src/main/kotlin/app/ivynote/android/update/Updater.kt index 90a3774..b620f59 100644 --- a/app/src/main/kotlin/app/ivynote/android/update/Updater.kt +++ b/app/src/main/kotlin/app/ivynote/android/update/Updater.kt @@ -10,6 +10,7 @@ import android.widget.Toast import app.ivynote.android.BuildConfig import app.ivynote.core.AppUpdates import app.ivynote.core.KeyValueStore +import app.ivynote.core.L10n import app.ivynote.core.UpdateAsset import app.ivynote.core.UpdateInfo import app.ivynote.core.UpdatePrefs @@ -108,7 +109,7 @@ class Updater( val info = AppUpdates.check(current, reason, prefs.installId(), arch()) if (!info.available) { set { copy(phase = Phase.IDLE, info = info) } - if (manual) toast("已是最新版本($current)") + if (manual) toast(L10n.s.upToDateVersion(current)) return info } val ready = withContext(Dispatchers.IO) { info.asset?.let { a -> fileFor(info, a)?.let { AppUpdates.verified(it, a) } } == true } @@ -122,7 +123,7 @@ class Updater( } catch (e: Exception) { val msg = e.message ?: e.javaClass.simpleName set { copy(phase = Phase.IDLE, error = msg, failed = Failed.CHECK) } - if (manual) toast("检查更新失败:$msg", long = true) + if (manual) toast(L10n.s.checkUpdateFailed(msg), long = true) null } } @@ -172,7 +173,7 @@ class Updater( if (s.phase != Phase.READY) return if (!context.packageManager.canRequestPackageInstalls()) { // Android asks once per installing app: 设置 → 安装未知应用 → 常青笔记. - toast("请允许「常青笔记」安装应用,然后返回点击「立即安装」", long = true) + toast(L10n.s.allowInstall, long = true) runCatching { context.startActivity( Intent(Settings.ACTION_MANAGE_UNKNOWN_APP_SOURCES, Uri.parse("package:${context.packageName}")) @@ -186,7 +187,7 @@ class Updater( scope.launch { beforeInstall?.let { save -> withTimeoutOrNull(10_000) { runCatching { save() } } } try { - if (!withContext(Dispatchers.IO) { AppUpdates.verified(file, asset) }) error("下载的安装包已失效,请重新下载") + if (!withContext(Dispatchers.IO) { AppUpdates.verified(file, asset) }) error(L10n.s.apkInvalid) ApkInstaller.install(context, file) // The installer answers through InstallResultReceiver. } catch (e: CancellationException) { @@ -207,10 +208,10 @@ class Updater( else -> { val why = when (status) { PackageInstaller.STATUS_FAILURE_CONFLICT, PackageInstaller.STATUS_FAILURE_INCOMPATIBLE -> - "新版本与已安装的应用签名不一致,请前往官网下载安装" - PackageInstaller.STATUS_FAILURE_STORAGE -> "存储空间不足" - PackageInstaller.STATUS_FAILURE_BLOCKED -> "安装被系统阻止" - else -> message?.takeIf { it.isNotBlank() } ?: "安装未完成" + L10n.s.signatureMismatch + PackageInstaller.STATUS_FAILURE_STORAGE -> L10n.s.noStorage + PackageInstaller.STATUS_FAILURE_BLOCKED -> L10n.s.installBlocked + else -> message?.takeIf { it.isNotBlank() } ?: L10n.s.installIncomplete } set { copy(phase = Phase.READY, open = true, error = why, failed = Failed.INSTALL) } } diff --git a/core/src/main/kotlin/app/ivynote/core/Strings.kt b/core/src/main/kotlin/app/ivynote/core/Strings.kt index dc149d5..b8d232d 100644 --- a/core/src/main/kotlin/app/ivynote/core/Strings.kt +++ b/core/src/main/kotlin/app/ivynote/core/Strings.kt @@ -335,6 +335,50 @@ interface Strings { val password: String val passwordMin8: String + // Updates + fun aboutNewer(newer: String): String + fun aboutVersion(version: String): String + val aboutAndUpdates: String + val updateAvailable: String + fun versionReleased(version: String): String + fun currentVersionIs(version: String): String + fun downloading(progress: String): String + val savingAndInstalling: String + val updateReady: String + val debugUpdateHint: String + val webUpdateHint: String + val updateHint: String + fun downloadFailed(error: String): String + fun installFailed(error: String): String + val downloadInBackground: String + val installing: String + val installNow: String + val downloadFromWebsite: String + val updateNow: String + val cancelDownload: String + val websiteDownload: String + val skipVersion: String + val later: String + val aboutTagline: String + val version: String + val checkForUpdates: String + val checking: String + fun downloadingVersion(version: String): String + fun newVersion(version: String): String + val checkFailed: String + val upToDate: String + val anonymousStats: String + val anonymousStatsHint: String + val website: String + fun upToDateVersion(version: String): String + fun checkUpdateFailed(error: String): String + val allowInstall: String + val apkInvalid: String + val signatureMismatch: String + val noStorage: String + val installBlocked: String + val installIncomplete: String + // Errors and checks (core) fun unreachable(detail: String): String val notIvynote: String @@ -673,6 +717,50 @@ object ZhStrings : Strings { override val password = "密码" override val passwordMin8 = "密码(至少 8 位)" + // Updates + override fun aboutNewer(newer: String) = "关于常青笔记 · 有新版本 $newer" + override fun aboutVersion(version: String) = "关于常青笔记 · $version" + override val aboutAndUpdates = "关于与检查更新…" + override val updateAvailable = "发现新版本" + override fun versionReleased(version: String) = "常青笔记 $version 已发布" + override fun currentVersionIs(version: String) = "当前版本 $version" + override fun downloading(progress: String) = "正在下载… $progress" + override val savingAndInstalling = "正在保存笔记并打开安装程序…" + override val updateReady = "新版本已下载并校验,按系统提示完成安装即可,笔记会先保存。" + override val debugUpdateHint = "调试版无法直接更新,请前往官网下载正式版。" + override val webUpdateHint = "请前往官网下载新版本。" + override val updateHint = "下载完成后由系统安装,笔记会先保存。首次更新需要允许常青笔记安装应用。" + override fun downloadFailed(error: String) = "下载失败:$error。可以重试或前往官网下载。" + override fun installFailed(error: String) = "安装失败:$error。可以重试或前往官网下载。" + override val downloadInBackground = "后台下载" + override val installing = "正在安装…" + override val installNow = "立即安装" + override val downloadFromWebsite = "前往官网下载" + override val updateNow = "立即更新" + override val cancelDownload = "取消下载" + override val websiteDownload = "官网下载" + override val skipVersion = "跳过此版本" + override val later = "稍后" + override val aboutTagline = "本地优先的 Markdown 笔记。离线也能写,联网后自动同步。" + override val version = "版本" + override val checkForUpdates = "检查更新" + override val checking = "正在检查…" + override fun downloadingVersion(version: String) = "正在下载 $version…" + override fun newVersion(version: String) = "有新版本 $version" + override val checkFailed = "检查失败" + override val upToDate = "已是最新版本" + override val anonymousStats = "匿名使用统计" + override val anonymousStatsHint = "检查更新时附带一个随机的安装编号(与账号无关),帮助我们了解有多少设备在使用常青笔记。不包含笔记内容或个人信息。" + override val website = "官网 ivynote.net" + override fun upToDateVersion(version: String) = "已是最新版本($version)" + override fun checkUpdateFailed(error: String) = "检查更新失败:$error" + override val allowInstall = "请允许「常青笔记」安装应用,然后返回点击「立即安装」" + override val apkInvalid = "下载的安装包已失效,请重新下载" + override val signatureMismatch = "新版本与已安装的应用签名不一致,请前往官网下载安装" + override val noStorage = "存储空间不足" + override val installBlocked = "安装被系统阻止" + override val installIncomplete = "安装未完成" + override fun unreachable(detail: String) = "无法连接服务器:$detail" override val notIvynote = "这个地址不是常青笔记服务器" override val tooManyAttempts = "尝试次数过多,请 15 分钟后再试" @@ -1014,6 +1102,50 @@ object EnStrings : Strings { override val password = "Password" override val passwordMin8 = "Password (8+ characters)" + // Updates + override fun aboutNewer(newer: String) = "About Ivynote · new version $newer" + override fun aboutVersion(version: String) = "About Ivynote · $version" + override val aboutAndUpdates = "About and updates…" + override val updateAvailable = "New version available" + override fun versionReleased(version: String) = "Ivynote $version is out" + override fun currentVersionIs(version: String) = "Current version $version" + override fun downloading(progress: String) = "Downloading… $progress" + override val savingAndInstalling = "Saving notes and opening the installer…" + override val updateReady = "The new version is downloaded and verified. Follow the system prompt to install; your notes are saved first." + override val debugUpdateHint = "Debug builds cannot update in place; download the release from the website." + override val webUpdateHint = "Download the new version from the website." + override val updateHint = "Once downloaded, the system installs it; your notes are saved first. The first update asks you to allow Ivynote to install apps." + override fun downloadFailed(error: String) = "Download failed: $error. Try again or download from the website." + override fun installFailed(error: String) = "Install failed: $error. Try again or download from the website." + override val downloadInBackground = "Download in background" + override val installing = "Installing…" + override val installNow = "Install now" + override val downloadFromWebsite = "Download from website" + override val updateNow = "Update now" + override val cancelDownload = "Cancel download" + override val websiteDownload = "Website" + override val skipVersion = "Skip this version" + override val later = "Later" + override val aboutTagline = "Local-first Markdown notes. Write offline; they sync once you are online." + override val version = "Version" + override val checkForUpdates = "Check for updates" + override val checking = "Checking…" + override fun downloadingVersion(version: String) = "Downloading $version…" + override fun newVersion(version: String) = "New version $version" + override val checkFailed = "Check failed" + override val upToDate = "Up to date" + override val anonymousStats = "Anonymous usage statistics" + override val anonymousStatsHint = "Update checks carry a random install id (not tied to your account) so we know how many devices use Ivynote. No note content or personal data is sent." + override val website = "Website ivynote.net" + override fun upToDateVersion(version: String) = "Up to date ($version)" + override fun checkUpdateFailed(error: String) = "Could not check for updates: $error" + override val allowInstall = "Allow Ivynote to install apps, then come back and tap Install now" + override val apkInvalid = "The downloaded package is no longer valid; download it again" + override val signatureMismatch = "The new version is signed differently from the installed app; download it from the website" + override val noStorage = "Not enough storage" + override val installBlocked = "The system blocked the install" + override val installIncomplete = "The install did not finish" + override fun unreachable(detail: String) = "Cannot reach the server: $detail" override val notIvynote = "This address is not an Ivynote server" override val tooManyAttempts = "Too many attempts; try again in 15 minutes"