@dooc-dev/dooc 0.0.27 → 0.0.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/edit.global.js +68 -68
- package/dist/engine/compiler/format-collections.js +8 -2
- package/dist/engine/core/html.js +1 -1
- package/dist/frontend/document-application.js +25 -17
- package/dist/manifest.global.js +51 -51
- package/dist/server/build.js +11 -8
- package/dist/server/cli.js +6 -1
- package/dist/subformats.global.js +19 -19
- package/dist/ui.global.js +15 -15
- package/dist/workspace-worker.global.js +6 -4
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(()=>{var Kl=Object.create;var Ur=Object.defineProperty;var Wl=Object.getOwnPropertyDescriptor;var Yl=Object.getOwnPropertyNames;var Jl=Object.getPrototypeOf,Ql=Object.prototype.hasOwnProperty;var Jo=(e,n)=>()=>{try{return n||e((n={exports:{}}).exports,n),n.exports}catch(t){throw n=0,t}},Xl=(e,n)=>{for(var t in n)Ur(e,t,{get:n[t],enumerable:!0})},Zl=(e,n,t,r)=>{if(n&&typeof n=="object"||typeof n=="function")for(let i of Yl(n))!Ql.call(e,i)&&i!==t&&Ur(e,i,{get:()=>n[i],enumerable:!(r=Wl(n,i))||r.enumerable});return e};var Qo=(e,n,t)=>(t=e!=null?Kl(Jl(e)):{},Zl(n||!e||!e.__esModule?Ur(t,"default",{value:e,enumerable:!0}):t,e));var ta=Jo((Vx,xi)=>{(function(){var e;typeof xi<"u"?e=xi.exports=r:e=(function(){return this||(0,eval)("this")})(),e.format=r,e.vsprintf=t,typeof console<"u"&&typeof console.log=="function"&&(e.printf=n);function n(){console.log(r.apply(null,arguments))}function t(i,o){return r.apply(null,[i].concat(o))}function r(i){for(var o=1,s=[].slice.call(arguments),a=0,l=i.length,u="",c,d=!1,m,f,h=!1,b,w=function(){return s[o++]},y=function(){for(var C="";/\d/.test(i[a]);)C+=i[a++],c=i[a];return C.length>0?parseInt(C):null};a<l;++a)if(c=i[a],d)switch(d=!1,c=="."?(h=!1,c=i[++a]):c=="0"&&i[a+1]=="."?(h=!0,a+=2,c=i[a]):h=!0,b=y(),c){case"b":u+=parseInt(w(),10).toString(2);break;case"c":m=w(),typeof m=="string"||m instanceof String?u+=m:u+=String.fromCharCode(parseInt(m,10));break;case"d":u+=parseInt(w(),10);break;case"f":f=String(parseFloat(w()).toFixed(b||6)),u+=h?f:f.replace(/^0/,"");break;case"j":u+=JSON.stringify(w());break;case"o":u+="0"+parseInt(w(),10).toString(8);break;case"s":u+=w();break;case"x":u+="0x"+parseInt(w(),10).toString(16);break;case"X":u+="0x"+parseInt(w(),10).toString(16).toUpperCase();break;default:u+=c;break}else c==="%"?d=!0:u+=c;return u}})()});var Ml=Jo((vA,$l)=>{"use strict";var Fr=Object.prototype.hasOwnProperty,Al=Object.prototype.toString,xl=Object.defineProperty,vl=Object.getOwnPropertyDescriptor,Sl=function(n){return typeof Array.isArray=="function"?Array.isArray(n):Al.call(n)==="[object Array]"},El=function(n){if(!n||Al.call(n)!=="[object Object]")return!1;var t=Fr.call(n,"constructor"),r=n.constructor&&n.constructor.prototype&&Fr.call(n.constructor.prototype,"isPrototypeOf");if(n.constructor&&!t&&!r)return!1;var i;for(i in n);return typeof i>"u"||Fr.call(n,i)},Cl=function(n,t){xl&&t.name==="__proto__"?xl(n,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):n[t.name]=t.newValue},Ll=function(n,t){if(t==="__proto__")if(Fr.call(n,t)){if(vl)return vl(n,t).value}else return;return n[t]};$l.exports=function e(){var n,t,r,i,o,s,a=arguments[0],l=1,u=arguments.length,c=!1;for(typeof a=="boolean"&&(c=a,a=arguments[1]||{},l=2),(a==null||typeof a!="object"&&typeof a!="function")&&(a={});l<u;++l)if(n=arguments[l],n!=null)for(t in n)r=Ll(a,t),i=Ll(n,t),a!==i&&(c&&i&&(El(i)||(o=Sl(i)))?(o?(o=!1,s=r&&Sl(r)?r:[]):s=r&&El(r)?r:{},Cl(a,{name:t,newValue:e(c,s,i)})):typeof i<"u"&&Cl(a,{name:t,newValue:i}));return a}});var Ut={aar:"aa",abk:"ab",afr:"af",aka:"ak",amh:"am",ara:"ar",arg:"an",asm:"as",ava:"av",ave:"ae",aym:"ay",aze:"az",bak:"ba",bam:"bm",bel:"be",ben:"bn",bis:"bi",bod:"bo",bos:"bs",bre:"br",bul:"bg",cat:"ca",ces:"cs",cha:"ch",che:"ce",chu:"cu",chv:"cv",cor:"kw",cos:"co",cre:"cr",cym:"cy",dan:"da",deu:"de",div:"dv",dzo:"dz",ell:"el",eng:"en",epo:"eo",est:"et",eus:"eu",ewe:"ee",fao:"fo",fas:"fa",fij:"fj",fin:"fi",fra:"fr",fry:"fy",ful:"ff",gla:"gd",gle:"ga",glg:"gl",glv:"gv",grn:"gn",guj:"gu",hat:"ht",hau:"ha",hbs:"sh",heb:"he",her:"hz",hin:"hi",hmo:"ho",hrv:"hr",hun:"hu",hye:"hy",ibo:"ig",ido:"io",iii:"ii",iku:"iu",ile:"ie",ina:"ia",ind:"id",ipk:"ik",isl:"is",ita:"it",jav:"jv",jpn:"ja",kal:"kl",kan:"kn",kas:"ks",kat:"ka",kau:"kr",kaz:"kk",khm:"km",kik:"ki",kin:"rw",kir:"ky",kom:"kv",kon:"kg",kor:"ko",kua:"kj",kur:"ku",lao:"lo",lat:"la",lav:"lv",lim:"li",lin:"ln",lit:"lt",ltz:"lb",lub:"lu",lug:"lg",mah:"mh",mal:"ml",mar:"mr",mkd:"mk",mlg:"mg",mlt:"mt",mon:"mn",mri:"mi",msa:"ms",mya:"my",nau:"na",nav:"nv",nbl:"nr",nde:"nd",ndo:"ng",nep:"ne",nld:"nl",nno:"nn",nob:"nb",nor:"no",nya:"ny",oci:"oc",oji:"oj",ori:"or",orm:"om",oss:"os",pan:"pa",pli:"pi",pol:"pl",por:"pt",pus:"ps",que:"qu",roh:"rm",ron:"ro",run:"rn",rus:"ru",sag:"sg",san:"sa",sin:"si",slk:"sk",slv:"sl",sme:"se",smo:"sm",sna:"sn",snd:"sd",som:"so",sot:"st",spa:"es",sqi:"sq",srd:"sc",srp:"sr",ssw:"ss",sun:"su",swa:"sw",swe:"sv",tah:"ty",tam:"ta",tat:"tt",tel:"te",tgk:"tg",tgl:"tl",tha:"th",tir:"ti",ton:"to",tsn:"tn",tso:"ts",tuk:"tk",tur:"tr",twi:"tw",uig:"ug",ukr:"uk",urd:"ur",uzb:"uz",ven:"ve",vie:"vi",vol:"vo",wln:"wa",wol:"wo",xho:"xh",yid:"yi",yor:"yo",zha:"za",zho:"zh",zul:"zu"};var Vr=(e,n)=>{e.title=n,e.value=n;let t=document.createElement("canvas").getContext("2d");if(!t)return;let r=getComputedStyle(e);t.font=r.font;let i=e.clientWidth-parseFloat(r.paddingLeft)-parseFloat(r.paddingRight),o=[...n];if(t.measureText(n).width>i){for(;o.length&&t.measureText(`${o.join("")}...`).width>i;)o.pop();e.value=`${o.join("")}...`}},Xo=(e,n=document.querySelectorAll("#fm-lang, #ui-language"),t={})=>{let r=[];for(let i of n){let o=i.id==="fm-lang",s=i.hasAttribute("data-workspace-pane"),a=i.id==="document-version-select",l=i.closest(".fm-language")?.querySelector("[data-language-open]"),u=document.createElement("div");u.className=`language-select${s?" workspace-select":""}${a?" version-select":""}`;let c=document.createElement("div");c.className=`language-picker${s?" workspace-picker":""}${a?" version-picker":""}`,c.id=`${i.id}-picker`,c.popover="manual";let d=document.createElement("input");d.type="text",d.className=`language-select-input${s?" workspace-picker-input":""}`,s&&(d.id=`${i.id}-input`),d.autocomplete="off",d.spellcheck=!1,d.setAttribute("role","combobox"),d.setAttribute("aria-autocomplete",s?"none":"list"),d.setAttribute("aria-haspopup","listbox"),d.setAttribute("aria-expanded","false");let m=document.createElement("div");m.className="language-options",m.id=`${i.id}-options`,m.tabIndex=-1,m.setAttribute("role","listbox"),o&&m.setAttribute("aria-multiselectable","true"),(o||t.onAction)&&d.setAttribute("aria-keyshortcuts","Control+Enter"),d.setAttribute("aria-controls",m.id);let f=document.createElement("div");f.className="language-empty",f.setAttribute("role","status"),c.append(m,f),i.before(u),u.append(i,d,c);let h=a?document.createElement("span"):void 0;h&&(h.className="version-status",h.setAttribute("aria-hidden","true"),u.append(h)),i.hidden=!0;let b=0,w="",y=()=>c.matches(":popover-open"),C=()=>(a?i.selectedOptions[0]?.value:i.selectedOptions[0]?.text)??"",k=()=>{let A=d.getBoundingClientRect(),H=s||a||t.minWidth?Math.min(Math.max(A.width,t.minWidth??(s?280:180)),innerWidth-16):A.width,le=innerHeight-A.bottom,ke=le<240&&A.top>le;Object.assign(c.style,{width:`${H}px`,left:`${s||a||t.minWidth?Math.max(8,Math.min(s?A.left+(A.width-H)/2:A.left,innerWidth-H-8)):A.left}px`,maxHeight:`${Math.max(80,Math.min(360,(ke?A.top:le)-12))}px`,top:ke?"auto":`${A.bottom+4}px`,bottom:ke?`${innerHeight-A.top+4}px`:"auto"})},O=A=>{let H=[...m.querySelectorAll("button")];b=H.length?(A+H.length)%H.length:0,H.forEach((ke,ve)=>{ke.dataset.active=String(ve===b)});let le=H[b];le?(d.setAttribute("aria-activedescendant",le.id),y()&&le.scrollIntoView({block:"nearest"})):d.removeAttribute("aria-activedescendant")},R=()=>{let A=s&&y()?m.querySelector('[data-active="true"]')?.dataset.value:void 0,H=w.normalize("NFKC").toLowerCase().trim().split(/\s+/).filter(Boolean),le=document.createDocumentFragment(),ke=0,ve,g=0;for(let[$e,se]of[...i.options].entries()){if(!s&&se.disabled||!H.every(ge=>se.text.normalize("NFKC").toLowerCase().includes(ge)))continue;let p=document.createElement("button");if(p.type="button",p.tabIndex=-1,p.id=`${i.id}-option-${$e}`,p.dataset.value=se.value,p.textContent=p.title=se.text,a){p.setAttribute("aria-label",se.text);let ge=document.createElement("span");ge.textContent=se.value;let Ne=document.createElement("span");Ne.className="version-status",Ne.textContent=se.dataset.status??"",p.replaceChildren(ge,Ne)}if(s&&(p.dataset.change=se.dataset.change??"",se.dataset.create&&(p.dataset.create=se.dataset.create),p.setAttribute("aria-disabled",String(i.disabled||se.disabled)),se.disabled)){let ge=se.dataset.unavailable||se.title||se.text;p.dataset.unavailable=p.title=ge,p.setAttribute("aria-description",ge);let Ne=document.createElement("span");Ne.textContent=se.text;let Ve=document.createElement("span");Ve.className="workspace-unavailable-icon",Ve.setAttribute("aria-hidden","true"),Ve.innerHTML='<svg width="20" height="20" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" aria-hidden="true"><circle cx="10" cy="10" r="7"/><path d="M10 9v5M10 6.5h.01"/></svg>',p.replaceChildren(Ne,Ve)}if(p.disabled=i.disabled,p.setAttribute("role","option"),p.setAttribute("aria-selected",o?se.dataset.added??"false":String(se.selected)),o){let ge=document.createElement("span");ge.className="language-toggle",ge.textContent=se.dataset.added==="true"?"\u2713":"+",ge.title=e(se.value===i.dataset.source?"Source language cannot be removed":se.dataset.added==="true"?"Remove translation":"Add translation"),p.textContent=se.text,p.prepend(ge),p.setAttribute("aria-current",String(se.selected))}t.renderOption?.(p,se),se.selected&&(ke=g),se.value===A&&(ve=g),le.append(p),g++}m.replaceChildren(le),f.hidden=g>0,f.textContent=e("No results"),O(ve??ke)},S=()=>{d.title=i.selectedOptions[0]?.text??"",h&&(h.textContent=i.selectedOptions[0]?.dataset.status??"",h.hidden=!!w,d.setAttribute("aria-description",h.textContent)),d.readOnly=s||i.disabled,s&&(u.dataset.workspacePane=d.dataset.workspacePane=i.dataset.workspacePane,u.dataset.active=d.dataset.active=i.dataset.active,d.setAttribute("aria-current",String(i.dataset.active==="true")),d.dataset.change=i.selectedOptions[0]?.dataset.change??"",d.setAttribute("aria-description",C()),i.disabled&&y()&&c.hidePopover()),l&&(l.disabled=i.disabled),d.setAttribute("aria-disabled",String(i.disabled)),d.placeholder=s?"":i.dataset.placeholder??e("Search languages"),d.setAttribute("aria-label",i.getAttribute("aria-label")??e("Language")),o&&d.setAttribute("aria-description",e("Enter to edit; Ctrl+Enter to add or remove translation")),t.onAction&&d.setAttribute("aria-description",e("Enter to select; Ctrl+Enter to configure")),(!y()||!w)&&(s?Vr(d,C()):d.value=C()),y()&&R()};c.addEventListener("beforetoggle",A=>{let H=A.newState==="open";d.setAttribute("aria-expanded",String(H)),l?.setAttribute("aria-expanded",String(H)),H?(R(),k()):(w="",h&&(h.hidden=!1),s?Vr(d,C()):d.value=C(),d.removeAttribute("aria-activedescendant"))});let M=A=>{!A||i.disabled||s&&![...i.options].some(H=>H.value===A.dataset.value&&!H.disabled)||(i.value=A.dataset.value??"",o||c.hidePopover(),i.dispatchEvent(new Event("change",{bubbles:!0})),S())},Y=A=>{!A||i.disabled||A.dataset.value===i.dataset.source||i.dispatchEvent(new CustomEvent("docs:toggle-language",{detail:A.dataset.value}))},pe=A=>{!A||i.disabled||(M(A),t.onAction?.())},v=()=>{y()||i.disabled||(i.dispatchEvent(new Event("docs:picker-open")),c.showPopover(),s||d.select())};s||d.addEventListener("focus",v),l?.addEventListener("click",()=>{d.focus(),v()}),d.addEventListener("click",()=>{s&&y()?c.hidePopover():v()}),d.addEventListener("input",()=>{w=d.value,h&&(h.hidden=!!w),y()?R():c.showPopover()}),d.addEventListener("keydown",A=>{if(!A.isComposing)if(A.key==="ArrowDown"||A.key==="ArrowUp")A.preventDefault(),y()?O(b+(A.key==="ArrowDown"?1:-1)):v();else if(s&&y()&&["Home","End"].includes(A.key))A.preventDefault(),O(A.key==="Home"?0:m.children.length-1);else if((A.key==="Enter"||s&&A.key===" ")&&y()){A.preventDefault();let H=m.querySelector('[data-active="true"]');o&&A.ctrlKey?Y(H):t.onAction&&A.ctrlKey?pe(H):M(H)}else s&&(A.key==="Enter"||A.key===" ")?(A.preventDefault(),v()):A.key==="Escape"&&y()&&(A.preventDefault(),A.stopPropagation(),c.hidePopover(),s||d.select())}),m.addEventListener("pointerdown",A=>A.preventDefault()),m.addEventListener("click",A=>{let H=A.target,le=H.closest("button");o&&H.closest(".language-toggle")?Y(le):t.onAction&&H.closest("[data-picker-action]")?pe(le):M(le)}),c.addEventListener("toggle",()=>{y()&&O(b)}),u.addEventListener("focusout",A=>{y()&&!(A.relatedTarget instanceof Node&&u.contains(A.relatedTarget))&&c.hidePopover()});let re=A=>{y()&&A.target instanceof Node&&!u.contains(A.target)&&c.hidePopover()};document.addEventListener("pointerdown",re);let j=new ResizeObserver(()=>{s&&Vr(d,C()),y()&&k()});j.observe(d);let B=()=>{y()&&k()};window.addEventListener("resize",B),i.addEventListener("change",S);let Z=new MutationObserver(S);Z.observe(i,{childList:!0,subtree:!0,attributes:!0}),document.addEventListener("docs:ui-language",S),r.push(()=>{document.removeEventListener("pointerdown",re),document.removeEventListener("docs:ui-language",S),i.removeEventListener("change",S),window.removeEventListener("resize",B),j.disconnect(),Z.disconnect(),u.replaceWith(i),i.hidden=!1}),S()}return()=>{for(let i of r)i()}};var Gr={version:"version","Read-only version":"Read-only version","Site title":"Site title","Edit site title":"Edit site title","Editor font":"Editor font","Reader font":"Reader font","Default font":"Default font","Loading fonts":"Loading fonts","Font choice applies only to this tab":"Font choice applies only to this tab; browser storage is unavailable.","Invalid font file":"This font file could not be loaded. Choose a valid font supported by your browser.","Preview theme":"Preview theme","Editor theme":"Editor theme","Open link":"Open link","Copy link":"Copy link","Collapse preview":"Collapse preview","Expand preview":"Expand preview","Resize plugin card":"Resize plugin card","Open the local reader to load plugin data":"Open the local reader to load plugin data","Load data":"Load data","Connect account":"Connect account","Forget connection":"Forget connection","Load data using your connected account":"Load data using your connected account","Loading plugin data":"Loading plugin data","Continue to service":"Continue to service","Connected as {name}":"Connected as {name}","Connection forgotten in dooc":"Connection forgotten in dooc","Connect this plugin again":"Connect this plugin again","Plugin is not configured":"Plugin is not configured","Plugin request failed":"Plugin request failed","Plugin service request failed":"Plugin service request failed","Access denied by the service":"Access denied by the service","Collapse code":"Collapse code","Expand code":"Expand code",Language:"Editor language",Save:"Save","Save (Ctrl+S)":"Save (Ctrl+S)","View settings":"View settings","Auto save":"Auto save","Wrap lines":"Wrap lines","Space + arrow page jump":"space+arrow page jump","Front-matter fields":"Front-matter fields",title:"title",desc:"desc",lang:"lang","Remove icon":"Remove icon",icon:"icon",rename:"rename","Enter to save / Esc to cancel":"Enter to save / Esc to cancel","Change doc id":"Change doc id","Delete doc":"Delete doc","Add doc":"Add doc",Resources:"Resources",markdown:"Markdown",figures:"Figures",html:"HTML",icons:"Icons","Resize sidebar":"Resize sidebar","Resize document tree":"Resize document tree","Resize editor":"Resize editor","Close sidebar":"Close sidebar","Open sidebar":"Open sidebar",Create:"Create","Unsaved changes":"Unsaved changes","Enter to rename / Esc to cancel (file links follow)":"Enter to rename / Esc to cancel (file links follow)","Icon must be svg":"Icon must be svg","Change site icon":"Change site icon","Icon set (auto-padded to 1:1)":"Icon set (auto-padded to 1:1)","Icon removed":"Icon removed","Only svg / png / webp / jpeg can be added":"Only svg / png / webp / jpeg can be added","Updated externally (keeping unsaved changes)":"Updated externally (keeping unsaved changes)","Changed externally \u2014 keeping your changes (you'll be asked again on save)":"Changed externally \u2014 keeping your changes (you'll be asked again on save)","You have unsaved changes. Discard them and leave?":"You have unsaved changes. Discard them and leave?",Saved:"Saved",Auto:"Auto",Light:"Light",Dark:"Dark",Theme:"Theme","Failed to save: {error}":"Failed to save: {error}",'Delete "{file}"? (this cannot be undone)':'Delete "{file}" and all its translations? (this cannot be undone)',"Failed to delete: {error}":"Failed to delete: {error}","Adding figures\u2026 ({count})":"Adding figures\u2026 ({count})","Added figures: {names}":"Added figures: {names}","Failed to add figures: {error}":"Failed to add figures: {error}","Failed to set icon: {error}":"Failed to set icon: {error}","Failed to update preview: {error}":"Failed to update preview: {error}","Failed to apply external changes: {error}":"Failed to apply external changes: {error}","Can't rename: {error}":"Can't rename: {error}","Applied external changes":"Applied external changes",Contents:"Contents","Copy code":"Copy code","External conflict":`This doc was updated elsewhere. Apply the external changes?
|
|
1
|
+
"use strict";(()=>{var Kl=Object.create;var Ur=Object.defineProperty;var Wl=Object.getOwnPropertyDescriptor;var Yl=Object.getOwnPropertyNames;var Jl=Object.getPrototypeOf,Ql=Object.prototype.hasOwnProperty;var Jo=(e,n)=>()=>{try{return n||e((n={exports:{}}).exports,n),n.exports}catch(t){throw n=0,t}},Xl=(e,n)=>{for(var t in n)Ur(e,t,{get:n[t],enumerable:!0})},Zl=(e,n,t,r)=>{if(n&&typeof n=="object"||typeof n=="function")for(let i of Yl(n))!Ql.call(e,i)&&i!==t&&Ur(e,i,{get:()=>n[i],enumerable:!(r=Wl(n,i))||r.enumerable});return e};var Qo=(e,n,t)=>(t=e!=null?Kl(Jl(e)):{},Zl(n||!e||!e.__esModule?Ur(t,"default",{value:e,enumerable:!0}):t,e));var ta=Jo((Vx,xi)=>{(function(){var e;typeof xi<"u"?e=xi.exports=r:e=(function(){return this||(0,eval)("this")})(),e.format=r,e.vsprintf=t,typeof console<"u"&&typeof console.log=="function"&&(e.printf=n);function n(){console.log(r.apply(null,arguments))}function t(i,o){return r.apply(null,[i].concat(o))}function r(i){for(var o=1,s=[].slice.call(arguments),a=0,l=i.length,u="",c,d=!1,m,f,h=!1,b,w=function(){return s[o++]},y=function(){for(var C="";/\d/.test(i[a]);)C+=i[a++],c=i[a];return C.length>0?parseInt(C):null};a<l;++a)if(c=i[a],d)switch(d=!1,c=="."?(h=!1,c=i[++a]):c=="0"&&i[a+1]=="."?(h=!0,a+=2,c=i[a]):h=!0,b=y(),c){case"b":u+=parseInt(w(),10).toString(2);break;case"c":m=w(),typeof m=="string"||m instanceof String?u+=m:u+=String.fromCharCode(parseInt(m,10));break;case"d":u+=parseInt(w(),10);break;case"f":f=String(parseFloat(w()).toFixed(b||6)),u+=h?f:f.replace(/^0/,"");break;case"j":u+=JSON.stringify(w());break;case"o":u+="0"+parseInt(w(),10).toString(8);break;case"s":u+=w();break;case"x":u+="0x"+parseInt(w(),10).toString(16);break;case"X":u+="0x"+parseInt(w(),10).toString(16).toUpperCase();break;default:u+=c;break}else c==="%"?d=!0:u+=c;return u}})()});var Ml=Jo((vA,$l)=>{"use strict";var Fr=Object.prototype.hasOwnProperty,Al=Object.prototype.toString,xl=Object.defineProperty,vl=Object.getOwnPropertyDescriptor,Sl=function(n){return typeof Array.isArray=="function"?Array.isArray(n):Al.call(n)==="[object Array]"},El=function(n){if(!n||Al.call(n)!=="[object Object]")return!1;var t=Fr.call(n,"constructor"),r=n.constructor&&n.constructor.prototype&&Fr.call(n.constructor.prototype,"isPrototypeOf");if(n.constructor&&!t&&!r)return!1;var i;for(i in n);return typeof i>"u"||Fr.call(n,i)},Cl=function(n,t){xl&&t.name==="__proto__"?xl(n,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):n[t.name]=t.newValue},Ll=function(n,t){if(t==="__proto__")if(Fr.call(n,t)){if(vl)return vl(n,t).value}else return;return n[t]};$l.exports=function e(){var n,t,r,i,o,s,a=arguments[0],l=1,u=arguments.length,c=!1;for(typeof a=="boolean"&&(c=a,a=arguments[1]||{},l=2),(a==null||typeof a!="object"&&typeof a!="function")&&(a={});l<u;++l)if(n=arguments[l],n!=null)for(t in n)r=Ll(a,t),i=Ll(n,t),a!==i&&(c&&i&&(El(i)||(o=Sl(i)))?(o?(o=!1,s=r&&Sl(r)?r:[]):s=r&&El(r)?r:{},Cl(a,{name:t,newValue:e(c,s,i)})):typeof i<"u"&&Cl(a,{name:t,newValue:i}));return a}});var Ut={aar:"aa",abk:"ab",afr:"af",aka:"ak",amh:"am",ara:"ar",arg:"an",asm:"as",ava:"av",ave:"ae",aym:"ay",aze:"az",bak:"ba",bam:"bm",bel:"be",ben:"bn",bis:"bi",bod:"bo",bos:"bs",bre:"br",bul:"bg",cat:"ca",ces:"cs",cha:"ch",che:"ce",chu:"cu",chv:"cv",cor:"kw",cos:"co",cre:"cr",cym:"cy",dan:"da",deu:"de",div:"dv",dzo:"dz",ell:"el",eng:"en",epo:"eo",est:"et",eus:"eu",ewe:"ee",fao:"fo",fas:"fa",fij:"fj",fin:"fi",fra:"fr",fry:"fy",ful:"ff",gla:"gd",gle:"ga",glg:"gl",glv:"gv",grn:"gn",guj:"gu",hat:"ht",hau:"ha",hbs:"sh",heb:"he",her:"hz",hin:"hi",hmo:"ho",hrv:"hr",hun:"hu",hye:"hy",ibo:"ig",ido:"io",iii:"ii",iku:"iu",ile:"ie",ina:"ia",ind:"id",ipk:"ik",isl:"is",ita:"it",jav:"jv",jpn:"ja",kal:"kl",kan:"kn",kas:"ks",kat:"ka",kau:"kr",kaz:"kk",khm:"km",kik:"ki",kin:"rw",kir:"ky",kom:"kv",kon:"kg",kor:"ko",kua:"kj",kur:"ku",lao:"lo",lat:"la",lav:"lv",lim:"li",lin:"ln",lit:"lt",ltz:"lb",lub:"lu",lug:"lg",mah:"mh",mal:"ml",mar:"mr",mkd:"mk",mlg:"mg",mlt:"mt",mon:"mn",mri:"mi",msa:"ms",mya:"my",nau:"na",nav:"nv",nbl:"nr",nde:"nd",ndo:"ng",nep:"ne",nld:"nl",nno:"nn",nob:"nb",nor:"no",nya:"ny",oci:"oc",oji:"oj",ori:"or",orm:"om",oss:"os",pan:"pa",pli:"pi",pol:"pl",por:"pt",pus:"ps",que:"qu",roh:"rm",ron:"ro",run:"rn",rus:"ru",sag:"sg",san:"sa",sin:"si",slk:"sk",slv:"sl",sme:"se",smo:"sm",sna:"sn",snd:"sd",som:"so",sot:"st",spa:"es",sqi:"sq",srd:"sc",srp:"sr",ssw:"ss",sun:"su",swa:"sw",swe:"sv",tah:"ty",tam:"ta",tat:"tt",tel:"te",tgk:"tg",tgl:"tl",tha:"th",tir:"ti",ton:"to",tsn:"tn",tso:"ts",tuk:"tk",tur:"tr",twi:"tw",uig:"ug",ukr:"uk",urd:"ur",uzb:"uz",ven:"ve",vie:"vi",vol:"vo",wln:"wa",wol:"wo",xho:"xh",yid:"yi",yor:"yo",zha:"za",zho:"zh",zul:"zu"};var Vr=(e,n)=>{e.title=n,e.value=n;let t=document.createElement("canvas").getContext("2d");if(!t)return;let r=getComputedStyle(e);t.font=r.font;let i=e.clientWidth-parseFloat(r.paddingLeft)-parseFloat(r.paddingRight),o=[...n];if(t.measureText(n).width>i){for(;o.length&&t.measureText(`${o.join("")}...`).width>i;)o.pop();e.value=`${o.join("")}...`}},Xo=(e,n=document.querySelectorAll("#fm-lang, #ui-language"),t={})=>{let r=[];for(let i of n){let o=i.id==="fm-lang",s=i.hasAttribute("data-workspace-pane"),a=i.id==="document-version-select",l=i.closest(".fm-language")?.querySelector("[data-language-open]"),u=document.createElement("div");u.className=`language-select${s?" workspace-select":""}${a?" version-select":""}`;let c=document.createElement("div");c.className=`language-picker${s?" workspace-picker":""}${a?" version-picker":""}`,c.id=`${i.id}-picker`,c.popover="manual";let d=document.createElement("input");d.type="text",d.className=`language-select-input${s?" workspace-picker-input":""}`,s&&(d.id=`${i.id}-input`),d.autocomplete="off",d.spellcheck=!1,d.setAttribute("role","combobox"),d.setAttribute("aria-autocomplete",s?"none":"list"),d.setAttribute("aria-haspopup","listbox"),d.setAttribute("aria-expanded","false");let m=document.createElement("div");m.className="language-options",m.id=`${i.id}-options`,m.tabIndex=-1,m.setAttribute("role","listbox"),o&&m.setAttribute("aria-multiselectable","true"),(o||t.onAction)&&d.setAttribute("aria-keyshortcuts","Control+Enter"),d.setAttribute("aria-controls",m.id);let f=document.createElement("div");f.className="language-empty",f.setAttribute("role","status"),c.append(m,f),i.before(u),u.append(i,d,c);let h=a?document.createElement("span"):void 0;h&&(h.className="version-status",h.setAttribute("aria-hidden","true"),u.append(h)),i.hidden=!0;let b=0,w="",y=()=>c.matches(":popover-open"),C=()=>(a?i.selectedOptions[0]?.value:i.selectedOptions[0]?.text)??"",k=()=>{let A=d.getBoundingClientRect(),H=s||a||t.minWidth?Math.min(Math.max(A.width,t.minWidth??(s?280:180)),innerWidth-16):A.width,le=innerHeight-A.bottom,ke=le<240&&A.top>le;Object.assign(c.style,{width:`${H}px`,left:`${s||a||t.minWidth?Math.max(8,Math.min(s?A.left+(A.width-H)/2:A.left,innerWidth-H-8)):A.left}px`,maxHeight:`${Math.max(80,Math.min(360,(ke?A.top:le)-12))}px`,top:ke?"auto":`${A.bottom+4}px`,bottom:ke?`${innerHeight-A.top+4}px`:"auto"})},O=A=>{let H=[...m.querySelectorAll("button")];b=H.length?(A+H.length)%H.length:0,H.forEach((ke,ve)=>{ke.dataset.active=String(ve===b)});let le=H[b];le?(d.setAttribute("aria-activedescendant",le.id),y()&&le.scrollIntoView({block:"nearest"})):d.removeAttribute("aria-activedescendant")},R=()=>{let A=s&&y()?m.querySelector('[data-active="true"]')?.dataset.value:void 0,H=w.normalize("NFKC").toLowerCase().trim().split(/\s+/).filter(Boolean),le=document.createDocumentFragment(),ke=0,ve,g=0;for(let[$e,se]of[...i.options].entries()){if(!s&&se.disabled||!H.every(ge=>se.text.normalize("NFKC").toLowerCase().includes(ge)))continue;let p=document.createElement("button");if(p.type="button",p.tabIndex=-1,p.id=`${i.id}-option-${$e}`,p.dataset.value=se.value,p.textContent=p.title=se.text,a){p.setAttribute("aria-label",se.text);let ge=document.createElement("span");ge.textContent=se.value;let Ne=document.createElement("span");Ne.className="version-status",Ne.textContent=se.dataset.status??"",p.replaceChildren(ge,Ne)}if(s&&(p.dataset.change=se.dataset.change??"",se.dataset.create&&(p.dataset.create=se.dataset.create),p.setAttribute("aria-disabled",String(i.disabled||se.disabled)),se.disabled)){let ge=se.dataset.unavailable||se.title||se.text;p.dataset.unavailable=p.title=ge,p.setAttribute("aria-description",ge);let Ne=document.createElement("span");Ne.textContent=se.text;let Ge=document.createElement("span");Ge.className="workspace-unavailable-icon",Ge.setAttribute("aria-hidden","true"),Ge.innerHTML='<svg width="20" height="20" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" aria-hidden="true"><circle cx="10" cy="10" r="7"/><path d="M10 9v5M10 6.5h.01"/></svg>',p.replaceChildren(Ne,Ge)}if(p.disabled=i.disabled,p.setAttribute("role","option"),p.setAttribute("aria-selected",o?se.dataset.added??"false":String(se.selected)),o){let ge=document.createElement("span");ge.className="language-toggle",ge.textContent=se.dataset.added==="true"?"\u2713":"+",ge.title=e(se.value===i.dataset.source?"Source language cannot be removed":se.dataset.added==="true"?"Remove translation":"Add translation"),p.textContent=se.text,p.prepend(ge),p.setAttribute("aria-current",String(se.selected))}t.renderOption?.(p,se),se.selected&&(ke=g),se.value===A&&(ve=g),le.append(p),g++}m.replaceChildren(le),f.hidden=g>0,f.textContent=e("No results"),O(ve??ke)},S=()=>{d.title=i.selectedOptions[0]?.text??"",h&&(h.textContent=i.selectedOptions[0]?.dataset.status??"",h.hidden=!!w,d.setAttribute("aria-description",h.textContent)),d.readOnly=s||i.disabled,s&&(u.dataset.workspacePane=d.dataset.workspacePane=i.dataset.workspacePane,u.dataset.active=d.dataset.active=i.dataset.active,d.setAttribute("aria-current",String(i.dataset.active==="true")),d.dataset.change=i.selectedOptions[0]?.dataset.change??"",d.setAttribute("aria-description",C()),i.disabled&&y()&&c.hidePopover()),l&&(l.disabled=i.disabled),d.setAttribute("aria-disabled",String(i.disabled)),d.placeholder=s?"":i.dataset.placeholder??e("Search languages"),d.setAttribute("aria-label",i.getAttribute("aria-label")??e("Language")),o&&d.setAttribute("aria-description",e("Enter to edit; Ctrl+Enter to add or remove translation")),t.onAction&&d.setAttribute("aria-description",e("Enter to select; Ctrl+Enter to configure")),(!y()||!w)&&(s?Vr(d,C()):d.value=C()),y()&&R()};c.addEventListener("beforetoggle",A=>{let H=A.newState==="open";d.setAttribute("aria-expanded",String(H)),l?.setAttribute("aria-expanded",String(H)),H?(R(),k()):(w="",h&&(h.hidden=!1),s?Vr(d,C()):d.value=C(),d.removeAttribute("aria-activedescendant"))});let M=A=>{!A||i.disabled||s&&![...i.options].some(H=>H.value===A.dataset.value&&!H.disabled)||(i.value=A.dataset.value??"",o||c.hidePopover(),i.dispatchEvent(new Event("change",{bubbles:!0})),S())},W=A=>{!A||i.disabled||A.dataset.value===i.dataset.source||i.dispatchEvent(new CustomEvent("docs:toggle-language",{detail:A.dataset.value}))},pe=A=>{!A||i.disabled||(M(A),t.onAction?.())},v=()=>{y()||i.disabled||(i.dispatchEvent(new Event("docs:picker-open")),c.showPopover(),s||d.select())};s||d.addEventListener("focus",v),l?.addEventListener("click",()=>{d.focus(),v()}),d.addEventListener("click",()=>{s&&y()?c.hidePopover():v()}),d.addEventListener("input",()=>{w=d.value,h&&(h.hidden=!!w),y()?R():c.showPopover()}),d.addEventListener("keydown",A=>{if(!A.isComposing)if(A.key==="ArrowDown"||A.key==="ArrowUp")A.preventDefault(),y()?O(b+(A.key==="ArrowDown"?1:-1)):v();else if(s&&y()&&["Home","End"].includes(A.key))A.preventDefault(),O(A.key==="Home"?0:m.children.length-1);else if((A.key==="Enter"||s&&A.key===" ")&&y()){A.preventDefault();let H=m.querySelector('[data-active="true"]');o&&A.ctrlKey?W(H):t.onAction&&A.ctrlKey?pe(H):M(H)}else s&&(A.key==="Enter"||A.key===" ")?(A.preventDefault(),v()):A.key==="Escape"&&y()&&(A.preventDefault(),A.stopPropagation(),c.hidePopover(),s||d.select())}),m.addEventListener("pointerdown",A=>A.preventDefault()),m.addEventListener("click",A=>{let H=A.target,le=H.closest("button");o&&H.closest(".language-toggle")?W(le):t.onAction&&H.closest("[data-picker-action]")?pe(le):M(le)}),c.addEventListener("toggle",()=>{y()&&O(b)}),u.addEventListener("focusout",A=>{y()&&!(A.relatedTarget instanceof Node&&u.contains(A.relatedTarget))&&c.hidePopover()});let ie=A=>{y()&&A.target instanceof Node&&!u.contains(A.target)&&c.hidePopover()};document.addEventListener("pointerdown",ie);let j=new ResizeObserver(()=>{s&&Vr(d,C()),y()&&k()});j.observe(d);let B=()=>{y()&&k()};window.addEventListener("resize",B),i.addEventListener("change",S);let Z=new MutationObserver(S);Z.observe(i,{childList:!0,subtree:!0,attributes:!0}),document.addEventListener("docs:ui-language",S),r.push(()=>{document.removeEventListener("pointerdown",ie),document.removeEventListener("docs:ui-language",S),i.removeEventListener("change",S),window.removeEventListener("resize",B),j.disconnect(),Z.disconnect(),u.replaceWith(i),i.hidden=!1}),S()}return()=>{for(let i of r)i()}};var Gr={version:"version","Read-only version":"Read-only version","Site title":"Site title","Edit site title":"Edit site title","Editor font":"Editor font","Reader font":"Reader font","Default font":"Default font","Loading fonts":"Loading fonts","Font choice applies only to this tab":"Font choice applies only to this tab; browser storage is unavailable.","Invalid font file":"This font file could not be loaded. Choose a valid font supported by your browser.","Preview theme":"Preview theme","Editor theme":"Editor theme","Open link":"Open link","Copy link":"Copy link","Collapse preview":"Collapse preview","Expand preview":"Expand preview","Resize plugin card":"Resize plugin card","Open the local reader to load plugin data":"Open the local reader to load plugin data","Load data":"Load data","Connect account":"Connect account","Forget connection":"Forget connection","Load data using your connected account":"Load data using your connected account","Loading plugin data":"Loading plugin data","Continue to service":"Continue to service","Connected as {name}":"Connected as {name}","Connection forgotten in dooc":"Connection forgotten in dooc","Connect this plugin again":"Connect this plugin again","Plugin is not configured":"Plugin is not configured","Plugin request failed":"Plugin request failed","Plugin service request failed":"Plugin service request failed","Access denied by the service":"Access denied by the service","Collapse code":"Collapse code","Expand code":"Expand code",Language:"Editor language",Save:"Save","Save (Ctrl+S)":"Save (Ctrl+S)","View settings":"View settings","Auto save":"Auto save","Wrap lines":"Wrap lines","Space + arrow page jump":"space+arrow page jump","Front-matter fields":"Front-matter fields",title:"title",desc:"desc",lang:"lang","Remove icon":"Remove icon",icon:"icon",rename:"rename","Enter to save / Esc to cancel":"Enter to save / Esc to cancel","Change doc id":"Change doc id","Delete doc":"Delete doc","Add doc":"Add doc",Resources:"Resources",markdown:"Markdown",figures:"Figures",html:"HTML",icons:"Icons","Resize sidebar":"Resize sidebar","Resize document tree":"Resize document tree","Resize editor":"Resize editor","Close sidebar":"Close sidebar","Open sidebar":"Open sidebar",Create:"Create","Unsaved changes":"Unsaved changes","Enter to rename / Esc to cancel (file links follow)":"Enter to rename / Esc to cancel (file links follow)","Icon must be svg":"Icon must be svg","Change site icon":"Change site icon","Icon set (auto-padded to 1:1)":"Icon set (auto-padded to 1:1)","Icon removed":"Icon removed","Only svg / png / webp / jpeg can be added":"Only svg / png / webp / jpeg can be added","Updated externally (keeping unsaved changes)":"Updated externally (keeping unsaved changes)","Changed externally \u2014 keeping your changes (you'll be asked again on save)":"Changed externally \u2014 keeping your changes (you'll be asked again on save)","You have unsaved changes. Discard them and leave?":"You have unsaved changes. Discard them and leave?",Saved:"Saved",Auto:"Auto",Light:"Light",Dark:"Dark",Theme:"Theme","Failed to save: {error}":"Failed to save: {error}",'Delete "{file}"? (this cannot be undone)':'Delete "{file}" and all its translations? (this cannot be undone)',"Failed to delete: {error}":"Failed to delete: {error}","Adding figures\u2026 ({count})":"Adding figures\u2026 ({count})","Added figures: {names}":"Added figures: {names}","Failed to add figures: {error}":"Failed to add figures: {error}","Failed to set icon: {error}":"Failed to set icon: {error}","Failed to update preview: {error}":"Failed to update preview: {error}","Failed to apply external changes: {error}":"Failed to apply external changes: {error}","Can't rename: {error}":"Can't rename: {error}","Applied external changes":"Applied external changes",Contents:"Contents","Copy code":"Copy code","External conflict":`This doc was updated elsewhere. Apply the external changes?
|
|
2
2
|
|
|
3
3
|
OK: discard unsaved edits and apply external changes
|
|
4
4
|
Cancel: keep your edits and skip this save`,"Referenced documents: {list}":`Referenced by these documents:
|
|
@@ -16,8 +16,8 @@ OK\uFF1A\u672A\u4FDD\u5B58\u306E\u7DE8\u96C6\u3092\u7834\u68C4\u3057\u3066\u5916
|
|
|
16
16
|
\u53D6\u6D88\uFF1A\u4FDD\u7559\u7F16\u8F91\u5185\u5BB9\u5E76\u53D6\u6D88\u672C\u6B21\u4FDD\u5B58`,"Referenced documents: {list}":`\u4EE5\u4E0B\u6587\u6863\u5305\u542B\u5BF9\u6B64\u6587\u6863\u7684\u5F15\u7528\uFF1A
|
|
17
17
|
{list}
|
|
18
18
|
|
|
19
|
-
\u4ECD\u8981\u5220\u9664\uFF1F\uFF08\u94FE\u63A5\u5C06\u5931\u6548\uFF09`,heading:"\u6807\u9898",subheading:"\u5B50\u6807\u9898","code fence":"\u4EE3\u7801\u5757","figure reference":"\u56FE\u7247\u5F15\u7528",Templates:"\u6A21\u677F",Figures:"\u56FE\u7247","Doc links":"\u6587\u6863\u94FE\u63A5",Terms:"\u672F\u8BED","Custom syntax":"\u6269\u5C55\u8BED\u6CD5",path:"\u8DEF\u5F84",size:"\u5927\u5C0F",kind:"\u7C7B\u578B",syntax:"\u8BED\u6CD5",doc:"\u6587\u6863","used in":"\u4F7F\u7528\u4F4D\u7F6E",none:"\u65E0","Split view":"\u5207\u6362\u53CC\u680F\u89C6\u56FE","Change language":"\u66F4\u6539\u8BED\u8A00","Active pane":"\u5F53\u524D\u7F16\u8F91\u7A97\u683C","Activate pane":"\u7F16\u8F91\u6B64\u7A97\u683C","Failed to load pane":"\u65E0\u6CD5\u52A0\u8F7D\u7A97\u683C","Close pane and discard its unsaved changes?":"\u653E\u5F03\u53E6\u4E00\u7A97\u683C\u672A\u4FDD\u5B58\u7684\u66F4\u6539\u5E76\u5173\u95ED\uFF1F","Validate and apply":"\u9A8C\u8BC1\u5E76\u5E94\u7528","Auto validate":"\u81EA\u52A8\u9A8C\u8BC1","Source mapping":"\u663E\u793A\u6B63\u6587\u4E0E\u6E90\u4EE3\u7801\u7684\u5BF9\u5E94\u5173\u7CFB","Validation pending":"\u5B58\u5728\u672A\u5E94\u7528\u7684\u66F4\u6539",Validating:"\u6B63\u5728\u9A8C\u8BC1","Validation passed":"\u9A8C\u8BC1\u901A\u8FC7","Validation errors":"\u9A8C\u8BC1\u9519\u8BEF",Saving:"\u6B63\u5728\u4FDD\u5B58","Save failed":"\u4FDD\u5B58\u5931\u8D25","Expand section":"\u5C55\u5F00","Collapse section":"\u6298\u53E0",terms:"\u672F\u8BED","Edit text file":"\u7F16\u8F91\u6587\u672C\u6587\u4EF6","Create file":"\u8F6C\u4E3A\u6587\u4EF6","Reload file":"\u91CD\u65B0\u8F7D\u5165\u6587\u4EF6","Working\u2026":"\u5904\u7406\u4E2D\u2026","File not found \u2014 save to create it.":"\u6587\u4EF6\u4E0D\u5B58\u5728\uFF0C\u4FDD\u5B58\u5373\u53EF\u521B\u5EFA\u3002","Discard file edits and reload?":"\u653E\u5F03\u6587\u4EF6\u4E2D\u672A\u4FDD\u5B58\u7684\u4FEE\u6539\u5E76\u91CD\u65B0\u8F7D\u5165\uFF1F","File changed externally. Reload it before saving.":"\u6587\u4EF6\u5DF2\u5728\u5916\u90E8\u4FEE\u6539\uFF0C\u8BF7\u91CD\u65B0\u8F7D\u5165\u540E\u518D\u4FDD\u5B58\u3002","Edits made while reloading were kept. Reload again when ready.":"\u5DF2\u4FDD\u7559\u91CD\u65B0\u8F7D\u5165\u671F\u95F4\u7684\u4FEE\u6539\uFF0C\u8BF7\u51C6\u5907\u597D\u540E\u518D\u6B21\u8F7D\u5165\u3002","File not found":"\u627E\u4E0D\u5230\u6587\u4EF6","File has not been loaded":"\u5C1A\u672A\u52A0\u8F7D\u6587\u4EF6","File could not be loaded":"\u65E0\u6CD5\u52A0\u8F7D\u6587\u4EF6","View remote text file":"\u67E5\u770B\u8FDC\u7A0B\u6587\u672C\u6587\u4EF6","Remote files are read-only":"\u8FDC\u7A0B\u6587\u4EF6\u4E3A\u53EA\u8BFB","Edits made while validating were kept. Validate again when ready.":"\u5DF2\u4FDD\u7559\u9A8C\u8BC1\u671F\u95F4\u7684\u7F16\u8F91\u3002\u51C6\u5907\u597D\u540E\u8BF7\u91CD\u65B0\u9A8C\u8BC1\u3002","Updating preview":"\u6B63\u5728\u66F4\u65B0\u9884\u89C8","Preview is up to date":"\u9884\u89C8\u6B63\u5E38","Preview could not be updated":"\u65E0\u6CD5\u66F4\u65B0\u9884\u89C8","Conflicting changes":"\u66F4\u6539\u53D1\u751F\u51B2\u7A81","Use my edits":"\u4F7F\u7528\u6211\u7684\u7F16\u8F91","Use external changes":"\u4F7F\u7528\u5916\u90E8\u66F4\u6539","File was deleted":"\u6587\u4EF6\u5DF2\u5220\u9664",Cancel:"\u53D6\u6D88","Search documents":"\u641C\u7D22\u6587\u6863","No results":"\u65E0\u641C\u7D22\u7ED3\u679C","Searching\u2026":"\u641C\u7D22\u4E2D\u2026","Could not load search. Press Ctrl+F to retry.":"\u65E0\u6CD5\u52A0\u8F7D\u641C\u7D22\u3002\u6309 Ctrl+F \u91CD\u8BD5\u3002","{count} results":"{count} \u6761\u7ED3\u679C","Showing {shown} of {count} results":"\u663E\u793A {count} \u6761\u7ED3\u679C\u4E2D\u7684 {shown} \u6761","Add translation":"\u6DFB\u52A0\u7FFB\u8BD1\u6587\u6863","Move search":"\u79FB\u52A8\u641C\u7D22\u7A97\u53E3","Resize search":"\u8C03\u6574\u641C\u7D22\u7A97\u53E3\u5927\u5C0F","Matches text":"\u5339\u914D\u6B63\u6587","Matches file name":"\u5339\u914D\u6587\u4EF6\u540D","Matches folder name":"\u5339\u914D\u6587\u4EF6\u5939\u540D","Close search":"\u5173\u95ED\u641C\u7D22\u7A97\u53E3","Move search to sidebar":"\u5C06\u641C\u7D22\u7A97\u53E3\u653E\u5230\u4FA7\u8FB9\u680F","Float search":"\u8BA9\u641C\u7D22\u7A97\u53E3\u6D6E\u52A8",Notice:"\u63D0\u793A",OK:"\u5173\u95ED","Discard changes":"\u653E\u5F03\u66F4\u6539","Copy section URL":"\u590D\u5236\u6B64\u7AE0\u8282\u94FE\u63A5",Copied:"\u5DF2\u590D\u5236","Could not copy URL":"\u65E0\u6CD5\u590D\u5236\u94FE\u63A5","Search languages":"\u641C\u7D22\u8BED\u8A00","Remove translation":"\u5220\u9664\u7FFB\u8BD1","Source language cannot be removed":"\u65E0\u6CD5\u5220\u9664\u6E90\u8BED\u8A00","Enter to edit; Ctrl+Enter to add or remove translation":"\u6309Enter\u7F16\u8F91\uFF0C\u6309Ctrl+Enter\u6DFB\u52A0\u6216\u5220\u9664\u7FFB\u8BD1","Preview has not been updated":"\u9884\u89C8\u5C1A\u672A\u66F4\u65B0",Table:"\u8868\u683C",Image:"\u56FE\u7247",HTML:"HTML",Markdown:"Markdown",Code:"\u4EE3\u7801",Video:"\u89C6\u9891",Loading:"\u52A0\u8F7D\u4E2D",Retry:"\u91CD\u8BD5",Reload:"\u91CD\u65B0\u52A0\u8F7D",Close:"\u5173\u95ED","File preview":"\u6587\u4EF6\u9884\u89C8",Files:"\u6587\u4EF6","Search files":"\u641C\u7D22\u6587\u4EF6",Plugin:"\u63D2\u4EF6\u540D","Default folder layout":"\u9ED8\u8BA4\u6587\u4EF6\u5939\u5E03\u5C40","Folder restructure":"\u6574\u7406\u6587\u4EF6\u5939",Move:"\u79FB\u52A8","Move up":"\u4E0A\u79FB","Move down":"\u4E0B\u79FB","Move to root":"\u79FB\u5230\u6839\u76EE\u5F55",Name:"\u540D\u79F0",Size:"\u5927\u5C0F",Select:"\u9009\u62E9","Copy path":"\u590D\u5236\u8DEF\u5F84","File path":"\u6587\u4EF6\u8DEF\u5F84","File created":"\u6587\u4EF6\u5DF2\u521B\u5EFA","Copy failed":"\u590D\u5236\u5931\u8D25","Place new files in files/<extension>/":"\u5C06\u65B0\u6587\u4EF6\u653E\u5165 files/<\u6269\u5C55\u540D>/","Document changed. Retry from the current block.":"\u6587\u6863\u5DF2\u66F4\u6539\u3002\u8BF7\u4ECE\u5F53\u524D\u4EE3\u7801\u5757\u91CD\u8BD5\u3002","Document changed. Insert the file from Files.":"\u6587\u6863\u5DF2\u66F4\u6539\u3002\u8BF7\u4ECE\u6587\u4EF6\u9875\u9762\u63D2\u5165\u5F15\u7528\u3002","File name":"\u6587\u4EF6\u540D","Renamed to {filename}":"\u5DF2\u91CD\u547D\u540D\u4E3A {filename}","Enter a file name ending in .md":"\u8BF7\u8F93\u5165\u4EE5 .md \u7ED3\u5C3E\u7684\u6587\u4EF6\u540D","Upload files":"\u4E0A\u4F20\u6587\u4EF6","Uploading {count}/{total}":"\u4E0A\u4F20\u4E2D {count}/{total}","Files uploaded":"\u6587\u4EF6\u5DF2\u4E0A\u4F20","File exceeds 64 MiB":"\u6587\u4EF6\u8D85\u8FC764 MiB","Choose files inside the folder":"\u8BF7\u9009\u62E9\u6587\u4EF6\u5939\u4E2D\u7684\u6587\u4EF6","Click a column to sort; row numbers refer to the source":"\u70B9\u51FB\u5217\u540D\u6392\u5E8F\uFF1B\u884C\u53F7\u5BF9\u5E94\u539F\u59CB\u6570\u636E",Column:"\u5217","Resize table":"\u8C03\u6574\u8868\u683C\u9AD8\u5EA6","Back to document":"\u8FD4\u56DE\u6587\u6863","File details":"\u6587\u4EF6\u4FE1\u606F","Show Git changes":"\u663E\u793A Git \u5DEE\u5F02","Resource views":"\u8D44\u6E90\u89C6\u56FE",Default:"\u9ED8\u8BA4\u503C","Set as default":"\u8BBE\u4E3A\u9ED8\u8BA4\u503C","Group by":"\u5206\u7EC4\u4F9D\u636E","Sort by":"\u6392\u5E8F\u4F9D\u636E","Newest first":"\u4ECE\u65B0\u5230\u65E7","Oldest first":"\u4ECE\u65E7\u5230\u65B0",Unassigned:"\u672A\u8BBE\u7F6E",Records:"\u8BB0\u5F55",Codeblocks:"\u4EE3\u7801\u5757",Format:"\u683C\u5F0F",URLs:"URL","URL previews":"URL \u9884\u89C8",Skills:"\u6280\u80FD","Format collections":"\u683C\u5F0F\u5206\u7C7B",Collection:"\u5206\u7C7B",Grid:"\u7F51\u683C","Grid layout":"\u7F51\u683C\u5E03\u5C40","Drag or use arrow keys to resize the grid":"\u62D6\u52A8\u6216\u4F7F\u7528\u65B9\u5411\u952E\u8C03\u6574\u7F51\u683C",Display:"\u663E\u793A\u8BBE\u7F6E",Pagination:"\u5206\u9875",Columns:"\u5217\u6570",Rows:"\u884C\u6570",Folder:"\u6587\u4EF6\u5939","All folders":"\u6240\u6709\u6587\u4EF6\u5939","All formats":"\u6240\u6709\u683C\u5F0F",Previous:"\u4E0A\u4E00\u9875",Next:"\u4E0B\u4E00\u9875","Expand children":"\u5C55\u5F00\u5B50\u9879","Expand all descendants":"\u5C55\u5F00\u6240\u6709\u540E\u4EE3",Collapse:"\u6298\u53E0",Domain:"\u57DF\u540D",All:"\u5168\u90E8",references:"\u5904\u5F15\u7528","Search resources":"\u641C\u7D22\u8D44\u6E90","Files with errors":"\u8BFB\u53D6\u6216\u89E3\u6790\u9519\u8BEF","No matching resources":"\u6CA1\u6709\u5339\u914D\u7684\u8D44\u6E90","Organize files":"\u6574\u7406\u6587\u4EF6","Auto-save paused":"\u81EA\u52A8\u4FDD\u5B58\u5DF2\u6682\u505C","Reload failed":"\u91CD\u65B0\u52A0\u8F7D\u5931\u8D25","Conflict unresolved. Auto-save is paused; your edits are kept.":"\u51B2\u7A81\u5C1A\u672A\u89E3\u51B3\uFF0C\u81EA\u52A8\u4FDD\u5B58\u5DF2\u6682\u505C\uFF1B\u60A8\u7684\u7F16\u8F91\u5DF2\u4FDD\u7559\u3002","File not found \u2014 editing will create it automatically.":"\u6587\u4EF6\u4E0D\u5B58\u5728\uFF1B\u7F16\u8F91\u540E\u4F1A\u81EA\u52A8\u521B\u5EFA\u3002",Play:"\u64AD\u653E",Pause:"\u6682\u505C",Seek:"\u64AD\u653E\u4F4D\u7F6E",Mute:"\u9759\u97F3",Unmute:"\u53D6\u6D88\u9759\u97F3",Volume:"\u97F3\u91CF","Video settings":"\u89C6\u9891\u8BBE\u7F6E","Playback speed":"\u64AD\u653E\u901F\u5EA6",Fullscreen:"\u5168\u5C4F","Video could not be played":"\u65E0\u6CD5\u64AD\u653E\u89C6\u9891","Fullscreen is unavailable":"\u65E0\u6CD5\u8FDB\u5165\u5168\u5C4F","Some registered fonts could not be loaded":"\u90E8\u5206\u5DF2\u6CE8\u518C\u5B57\u4F53\u65E0\u6CD5\u52A0\u8F7D",Done:"\u5B8C\u6210","Git views":"Git \u89C6\u56FE","Detached HEAD":"\u5206\u79BB\u7684 HEAD","Branch name":"\u5206\u652F\u540D\u79F0","No commits yet":"\u5C1A\u65E0\u63D0\u4EA4","Changed files":"\u66F4\u6539\u7684\u6587\u4EF6","Filter by path":"\u6309\u8DEF\u5F84\u7B5B\u9009",Conflicts:"\u51B2\u7A81",Unstaged:"\u672A\u6682\u5B58",Staged:"\u5DF2\u6682\u5B58",Conflict:"\u51B2\u7A81",Untracked:"\u672A\u8DDF\u8E2A",Deleted:"\u5DF2\u5220\u9664",Renamed:"\u5DF2\u91CD\u547D\u540D","Type changed":"\u7C7B\u578B\u5DF2\u66F4\u6539",Changed:"\u5DF2\u66F4\u6539","View diff for {path}":"\u67E5\u770B {path} \u7684\u5DEE\u5F02","File diff":"\u6587\u4EF6\u5DEE\u5F02","No text changes":"\u6CA1\u6709\u6587\u672C\u5DEE\u5F02","Binary file":"\u4E8C\u8FDB\u5236\u6587\u4EF6","File too large to preview":"\u6587\u4EF6\u8FC7\u5927\uFF0C\u65E0\u6CD5\u9884\u89C8","Showing the beginning of this diff.":"\u4EC5\u663E\u793A\u5DEE\u5F02\u7684\u5F00\u5934\u90E8\u5206\u3002","Mark resolved":"\u6807\u8BB0\u4E3A\u5DF2\u89E3\u51B3","Loading diff\u2026":"\u6B63\u5728\u52A0\u8F7D\u5DEE\u5F02\u2026","Show more files":"\u663E\u793A\u66F4\u591A\u6587\u4EF6","No matching files":"\u6CA1\u6709\u5339\u914D\u7684\u6587\u4EF6","Clear filter":"\u6E05\u9664\u7B5B\u9009","Check the updated changes and try again.":"\u66F4\u6539\u5DF2\u66F4\u65B0\u3002\u8BF7\u786E\u8BA4\u6700\u65B0\u5185\u5BB9\u540E\u91CD\u8BD5\u3002","Another Git operation is in progress. Try again shortly.":"\u5176\u4ED6 Git \u64CD\u4F5C\u6B63\u5728\u8FDB\u884C\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002","Loading repository\u2026":"\u6B63\u5728\u52A0\u8F7D\u4ED3\u5E93\u2026","Staged {path}":"\u5DF2\u6682\u5B58 {path}","Unstaged {path}":"\u5DF2\u53D6\u6D88\u6682\u5B58 {path}","Commit created":"\u5DF2\u521B\u5EFA\u63D0\u4EA4","Committed locally. Check the current branch before pushing.":"\u5DF2\u5728\u672C\u5730\u63D0\u4EA4\uFF0C\u8BF7\u786E\u8BA4\u5F53\u524D\u5206\u652F\u540E\u518D\u63A8\u9001\u3002","Changes stashed":"\u5DF2\u8D2E\u85CF\u66F4\u6539","Stash restored":"\u5DF2\u6062\u590D\u8D2E\u85CF","Pull complete":"\u5DF2\u5B8C\u6210\u62C9\u53D6","Push complete":"\u5DF2\u5B8C\u6210\u63A8\u9001","Pull request created":"\u5DF2\u521B\u5EFA\u62C9\u53D6\u8BF7\u6C42","Pull request updated":"\u5DF2\u66F4\u65B0\u62C9\u53D6\u8BF7\u6C42","Pull request merged":"\u5DF2\u5408\u5E76\u62C9\u53D6\u8BF7\u6C42","Commit and push":"\u63D0\u4EA4\u5E76\u63A8\u9001","Commit only":"\u4EC5\u63D0\u4EA4","Commit options":"\u63D0\u4EA4\u9009\u9879","Committed locally. Push failed: {error}":"\u5DF2\u5728\u672C\u5730\u63D0\u4EA4\u3002\u63A8\u9001\u5931\u8D25\uFF1A{error}","Fetch failed: {error}":"\u65E0\u6CD5\u83B7\u53D6\u8FDC\u7A0B\u66F4\u65B0\uFF1A{error}",Commit:"\u63D0\u4EA4","{count} staged":"\u5DF2\u6682\u5B58 {count} \u4E2A\u6587\u4EF6","Resolve and stage conflicted files before committing.":"\u63D0\u4EA4\u524D\u8BF7\u5148\u89E3\u51B3\u51B2\u7A81\u5E76\u6682\u5B58\u76F8\u5173\u6587\u4EF6\u3002",Synchronization:"\u8FDC\u7A0B\u540C\u6B65","Up to date":"\u5DF2\u540C\u6B65","{count} ahead":"\u9886\u5148 {count} \u4E2A\u63D0\u4EA4","{count} behind":"\u843D\u540E {count} \u4E2A\u63D0\u4EA4","No upstream branch":"\u672A\u8BBE\u7F6E\u4E0A\u6E38\u5206\u652F",Pull:"\u62C9\u53D6","A clean working tree is required to pull.":"\u62C9\u53D6\u524D\u9700\u8981\u6E05\u7406\u5DE5\u4F5C\u533A\u66F4\u6539\u3002",Stash:"\u8D2E\u85CF","Commit your changes before restoring the stash.":"\u6062\u590D\u8D2E\u85CF\u524D\u8BF7\u5148\u63D0\u4EA4\u5F53\u524D\u66F4\u6539\u3002","No pull requests":"\u6682\u65E0\u62C9\u53D6\u8BF7\u6C42","This workspace has no pull request provider.":"\u6B64\u5DE5\u4F5C\u533A\u672A\u914D\u7F6E\u62C9\u53D6\u8BF7\u6C42\u63D0\u4F9B\u65B9\u3002","Pull requests could not be loaded.":"\u65E0\u6CD5\u52A0\u8F7D\u62C9\u53D6\u8BF7\u6C42\u3002","Loading pull requests\u2026":"\u6B63\u5728\u52A0\u8F7D\u62C9\u53D6\u8BF7\u6C42\u2026","This workspace returns staged and unstaged changes together.":"\u6B64\u5DE5\u4F5C\u533A\u5408\u5E76\u663E\u793A\u5DF2\u6682\u5B58\u548C\u672A\u6682\u5B58\u7684\u5DEE\u5F02\u3002","Open in {provider}":"\u5728 {provider} \u4E2D\u6253\u5F00","Review status unavailable":"\u65E0\u6CD5\u83B7\u53D6\u8BC4\u5BA1\u72B6\u6001","PR head":"PR \u63D0\u4EA4","Open #{number} in {provider}":"\u5728 {provider} \u4E2D\u6253\u5F00 #{number}","Review required":"\u7B49\u5F85\u8BC4\u5BA1",Approved:"\u5DF2\u6279\u51C6","Changes requested":"\u5DF2\u8BF7\u6C42\u66F4\u6539",Open:"\u5F85\u5408\u5E76",Merged:"\u5DF2\u5408\u5E76",Closed:"\u5DF2\u5173\u95ED","Pull request state":"\u62C9\u53D6\u8BF7\u6C42\u72B6\u6001","All states":"\u6240\u6709\u72B6\u6001","No pull requests match this state.":"\u6CA1\u6709\u6B64\u72B6\u6001\u7684\u62C9\u53D6\u8BF7\u6C42\u3002","Source branch: {branch}":"\u6E90\u5206\u652F\uFF1A{branch}","Push the source branch and choose a different base branch.":"\u8BF7\u63A8\u9001\u6E90\u5206\u652F\uFF0C\u5E76\u9009\u62E9\u53E6\u4E00\u4E2A\u5206\u652F\u4F5C\u4E3A\u76EE\u6807\u3002","This pull request changed. Reset edits to load the latest version.":"\u62C9\u53D6\u8BF7\u6C42\u5DF2\u66F4\u65B0\u3002\u8BF7\u91CD\u7F6E\u7F16\u8F91\u4EE5\u52A0\u8F7D\u6700\u65B0\u7248\u672C\u3002","New pull request":"\u65B0\u5EFA\u62C9\u53D6\u8BF7\u6C42","Create a commit on a branch before opening a pull request.":"\u8BF7\u5148\u5728\u5206\u652F\u4E0A\u63D0\u4EA4\uFF0C\u518D\u521B\u5EFA\u62C9\u53D6\u8BF7\u6C42\u3002","No description":"\u6682\u65E0\u8BF4\u660E","Edit details":"\u7F16\u8F91\u6807\u9898\u548C\u8BF4\u660E","Mark this draft ready in the review before merging.":"\u5408\u5E76\u524D\u8BF7\u5728\u8BC4\u5BA1\u9875\u9762\u5C06\u8349\u7A3F\u6807\u8BB0\u4E3A\u53EF\u4F9B\u8BC4\u5BA1\u3002","Review submitted":"\u5DF2\u63D0\u4EA4\u8BC4\u5BA1","Files changed":"\u53D8\u66F4\u6587\u4EF6","Open the provider review to inspect this file.":"\u8BF7\u5728\u63D0\u4F9B\u65B9\u7684\u8BC4\u5BA1\u9875\u9762\u67E5\u770B\u6B64\u6587\u4EF6\u3002","Open the provider review for the remaining files.":"\u8BF7\u5728\u63D0\u4F9B\u65B9\u7684\u8BC4\u5BA1\u9875\u9762\u67E5\u770B\u5176\u4F59\u6587\u4EF6\u3002","No changed files":"\u6CA1\u6709\u53D8\u66F4\u6587\u4EF6","Page {number}":"\u7B2C {number} \u9875","Review decision":"\u8BC4\u5BA1\u7ED3\u8BBA",Comment:"\u8BC4\u8BBA",Approve:"\u6279\u51C6","Request changes":"\u8BF7\u6C42\u66F4\u6539","Review comment":"\u8BC4\u5BA1\u610F\u89C1","Submit review":"\u63D0\u4EA4\u8BC4\u5BA1","Write a review":"\u64B0\u5199\u8BC4\u5BA1","The pull request changed while you were writing this review.":"\u64B0\u5199\u8BC4\u5BA1\u671F\u95F4\uFF0C\u62C9\u53D6\u8BF7\u6C42\u5DF2\u66F4\u65B0\u3002","Review latest revision":"\u6539\u4E3A\u8BC4\u5BA1\u6700\u65B0\u7248\u672C","Merge #{number} ({commit}) into {base} using {method}?":"\u4F7F\u7528 {method} \u5C06 #{number} \u7684 {commit} \u5408\u5E76\u5230 {base}\uFF1F","Git operation failed":"Git \u64CD\u4F5C\u5931\u8D25","Create pull request":"\u521B\u5EFA\u62C9\u53D6\u8BF7\u6C42","Base branch":"\u76EE\u6807\u5206\u652F",Draft:"\u8349\u7A3F","Open pull request":"\u6253\u5F00\u62C9\u53D6\u8BF7\u6C42","Merge method":"\u5408\u5E76\u65B9\u5F0F","Merge pull request":"\u5408\u5E76\u62C9\u53D6\u8BF7\u6C42","Merge #{number} into {base} using {method}?":"\u5C06 #{number} \u4EE5 {method} \u65B9\u5F0F\u5408\u5E76\u5230 {base}\uFF1F","Reset edits":"\u91CD\u7F6E\u7F16\u8F91","Discard these pull request edits?":"\u653E\u5F03\u6B64\u62C9\u53D6\u8BF7\u6C42\u7684\u672A\u4FDD\u5B58\u7F16\u8F91\uFF1F",Branch:"\u5206\u652F","Switch branch":"\u5207\u6362\u5206\u652F","New branch":"\u65B0\u5206\u652F","Create branch":"\u521B\u5EFA\u5206\u652F","Commit {manifest} before creating a branch.":"\u521B\u5EFA\u5206\u652F\u524D\uFF0C\u8BF7\u5148\u63D0\u4EA4 {manifest}\u3002","This branch does not contain {manifest} at the same path.":"\u6B64\u5206\u652F\u7684\u76F8\u540C\u8DEF\u5F84\u4E0B\u6CA1\u6709 {manifest}\u3002","New branches start from the latest commit. Unsaved changes stay in the current workspace.":"\u65B0\u5206\u652F\u4ECE\u6700\u65B0\u63D0\u4EA4\u521B\u5EFA\u3002\u672A\u4FDD\u5B58\u7684\u66F4\u6539\u4F1A\u4FDD\u7559\u5728\u5F53\u524D\u5DE5\u4F5C\u533A\u3002",Changes:"\u66F4\u6539",Stage:"\u6682\u5B58",Unstage:"\u53D6\u6D88\u6682\u5B58","Working tree clean":"\u5DE5\u4F5C\u533A\u65E0\u66F4\u6539","Commit message":"\u63D0\u4EA4\u8BF4\u660E",Fetch:"\u83B7\u53D6","Pull (fast-forward)":"\u62C9\u53D6 (fast-forward)",Push:"\u63A8\u9001","Connect an origin provider from the reader module to enable remote operations.":"\u901A\u8FC7\u5916\u90E8 reader \u6A21\u5757\u8FDE\u63A5 origin \u4EE5\u542F\u7528\u8FDC\u7A0B\u64CD\u4F5C\u3002","Pull requests":"\u62C9\u53D6\u8BF7\u6C42","No open pull requests":"\u6CA1\u6709\u5F85\u5904\u7406\u7684\u62C9\u53D6\u8BF7\u6C42",Description:"\u8BF4\u660E","Operation completed, but reload failed: {error}":"\u64CD\u4F5C\u5DF2\u5B8C\u6210\uFF0C\u4F46\u91CD\u65B0\u52A0\u8F7D\u5931\u8D25\uFF1A{error}","Stash is occupied. Commit the current changes before switching branches.":"\u6682\u5B58\u69FD\u5DF2\u5360\u7528\uFF0C\u8BF7\u5148\u63D0\u4EA4\u5F53\u524D\u66F4\u6539\u518D\u5207\u6362\u5206\u652F\u3002","Stash saved changes and switch to {branch}?":"\u5C06\u5DF2\u4FDD\u5B58\u6587\u4EF6\u7684\u66F4\u6539\u5B58\u5165 stash \u5E76\u5207\u6362\u5230 {branch}\uFF1F","Stash and switch":"\u6682\u5B58\u5E76\u5207\u6362","Create the first commit to switch branches.":"\u521B\u5EFA\u9996\u6B21\u63D0\u4EA4\u540E\u5373\u53EF\u5207\u6362\u5206\u652F\u3002","Stash \xB7 empty":"Stash \xB7 \u7A7A","Restore stash":"\u6062\u590D stash","Stash changes":"\u6682\u5B58\u66F4\u6539",Library:"\u8D44\u6599\u5E93",Subformats:"Subformats","Expand card":"\u5C55\u5F00\u5361\u7247","Collapse card":"\u6298\u53E0\u5361\u7247","View details":"\u67E5\u770B\u8BE6\u60C5","Click for details; double-click to edit":"\u5355\u51FB\u67E5\u770B\u8BE6\u60C5\uFF1B\u53CC\u51FB\u7F16\u8F91","No grouping":"\u4E0D\u5206\u7EC4",Ascending:"\u5347\u5E8F",Descending:"\u964D\u5E8F","No subformats configured. Add subformats to dooc.yaml.":"\u5C1A\u672A\u914D\u7F6E\u5B50\u683C\u5F0F\u3002\u8BF7\u5728 dooc.yaml \u4E2D\u6DFB\u52A0 subformats\u3002","Workspace tools":"\u5DE5\u4F5C\u533A\u5DE5\u5177","Git controls":"Git \u64CD\u4F5C",Actions:"\u64CD\u4F5C",Updated:"\u5DF2\u66F4\u65B0",Copy:"\u590D\u5236",Edit:"\u7F16\u8F91","Reload actions before saving again.":"\u518D\u6B21\u4FDD\u5B58\u524D\u8BF7\u91CD\u65B0\u52A0\u8F7D\u3002","Saved, but refresh failed. Reload actions before saving again.":"\u4FDD\u5B58\u5DF2\u5B8C\u6210\uFF0C\u4F46\u5237\u65B0\u5931\u8D25\u3002\u518D\u6B21\u4FDD\u5B58\u524D\u8BF7\u91CD\u65B0\u52A0\u8F7D\u3002","Actions could not be loaded.":"\u65E0\u6CD5\u52A0\u8F7D\u64CD\u4F5C\u3002","An open draft is no longer editable. Copy or cancel it before reloading.":"\u6B63\u5728\u7F16\u8F91\u7684\u8349\u7A3F\u5DF2\u65E0\u6CD5\u4FEE\u6539\u3002\u91CD\u65B0\u52A0\u8F7D\u524D\u8BF7\u590D\u5236\u6216\u53D6\u6D88\u8349\u7A3F\u3002","Changed elsewhere. Your input is kept; edit again to apply it.":"\u5185\u5BB9\u5DF2\u5728\u5176\u4ED6\u4F4D\u7F6E\u66F4\u6539\u3002\u5DF2\u4FDD\u7559\u8F93\u5165\uFF0C\u518D\u6B21\u7F16\u8F91\u5373\u53EF\u5E94\u7528\u3002",Plugins:"\u63D2\u4EF6","Add plugins":"\u6DFB\u52A0\u63D2\u4EF6","Plugins are saved in this browser. Run server plugins in a local dooc editor.":"\u63D2\u4EF6\u4FDD\u5B58\u5728\u6B64\u6D4F\u89C8\u5668\u4E2D\u3002\u670D\u52A1\u5668\u63D2\u4EF6\u9700\u5728\u672C\u5730 dooc \u7F16\u8F91\u5668\u4E2D\u8FD0\u884C\u3002","Drag and drop here, or click to browse.":"\u62D6\u653E\u5230\u6B64\u5904\uFF0C\u6216\u70B9\u51FB\u9009\u62E9\u3002","Invalid package":"\u65E0\u6548\u5305","Browser storage":"\u6D4F\u89C8\u5668\u5B58\u50A8",Enabled:"\u5DF2\u542F\u7528",Disabled:"\u5DF2\u7981\u7528",Enable:"\u542F\u7528",Disable:"\u7981\u7528","Delete plugin {name}?":"\u5220\u9664\u63D2\u4EF6 {name}\uFF1F","Replace plugin {name}?":"\u66FF\u6362\u63D2\u4EF6 {name}\uFF1F","Discard plugin changes?":"\u653E\u5F03\u672A\u5E94\u7528\u7684\u63D2\u4EF6\u66F4\u6539\uFF1F","Plugin file":"\u63D2\u4EF6\u6587\u4EF6","Apply changes":"\u5E94\u7528\u66F4\u6539","Binary asset \u2014 replace it by importing a new ZIP.":"\u4E8C\u8FDB\u5236\u8D44\u6E90\u3002\u5BFC\u5165\u65B0 ZIP \u4EE5\u66FF\u6362\u3002","Choose a ZIP smaller than 16 MiB":"\u8BF7\u9009\u62E9\u4E0D\u8D85\u8FC7 16 MiB \u7684 ZIP","Sign in":"\u767B\u5F55","Sign out":"\u9000\u51FA\u767B\u5F55","Not signed in":"\u672A\u767B\u5F55","Continue login":"\u7EE7\u7EED\u767B\u5F55","Provided by reader":"\u7531\u9605\u8BFB\u5668\u63D0\u4F9B",Added:"\u65B0\u589E",Modified:"\u4FEE\u6539",Relations:"\u5173\u7CFB\u56FE","Add subformat\u2026":"\u6DFB\u52A0\u5B50\u683C\u5F0F\u2026",Delete:"\u5220\u9664","Delete subformat {ext} and its sidebar page? Records and schema files will be kept.":"\u5220\u9664\u5B50\u683C\u5F0F {ext} \u53CA\u5176\u4FA7\u8FB9\u680F\u9875\u9762\uFF1F\u8BB0\u5F55\u548C\u6A21\u5F0F\u6587\u4EF6\u5C06\u4FDD\u7559\u3002","Subformat changed externally. Reload and try again.":"\u5B50\u683C\u5F0F\u5DF2\u88AB\u5916\u90E8\u4FEE\u6539\u3002\u8BF7\u91CD\u65B0\u52A0\u8F7D\u540E\u91CD\u8BD5\u3002","Move or remove this subformat page's child pages before deleting it.":"\u5220\u9664\u524D\uFF0C\u8BF7\u5148\u79FB\u52A8\u6216\u5220\u9664\u6B64\u5B50\u683C\u5F0F\u9875\u9762\u7684\u5B50\u9875\u9762\u3002","Add subformat":"\u6DFB\u52A0\u5B50\u683C\u5F0F",Extension:"\u6269\u5C55\u540D","Storage format":"\u5B58\u50A8\u683C\u5F0F","Schema file (optional)":"\u6A21\u5F0F\u6587\u4EF6\uFF08\u53EF\u9009\uFF09","Create automatically":"\u81EA\u52A8\u521B\u5EFA",Form:"\u8868\u5355","Enter a valid number.":"\u8BF7\u8F93\u5165\u6709\u6548\u7684\u6570\u503C\u3002","Value editing mode":"\u503C\u7F16\u8F91\u6A21\u5F0F","{format} text":"{format}\u6587\u672C","Schema editing mode":"\u6A21\u5F0F\u7F16\u8F91\u65B9\u5F0F","JSON text":"JSON text","Build kit":"Build kit","Field settings":"\u5B57\u6BB5\u8BBE\u7F6E","Field name":"\u5B57\u6BB5\u540D\u79F0","New field name":"\u65B0\u5B57\u6BB5\u540D\u79F0","New field type":"\u65B0\u5B57\u6BB5\u7C7B\u578B","Remove field":"\u5220\u9664\u5B57\u6BB5","Add field":"\u6DFB\u52A0\u5B57\u6BB5",Required:"\u5FC5\u586B",Optional:"\u53EF\u9009","No values allowed":"\u4E0D\u5141\u8BB8\u4EFB\u4F55\u503C","Recursive reference":"\u9012\u5F52\u5F15\u7528","Allow extra fields":"\u5141\u8BB8\u989D\u5916\u5B57\u6BB5","Schema settings":"\u6A21\u5F0F\u8BBE\u7F6E","Remove nested fields before changing the type.":"\u66F4\u6539\u7C7B\u578B\u524D\uFF0C\u8BF7\u5148\u5220\u9664\u5D4C\u5957\u5B57\u6BB5\u3002","Any type":"\u4EFB\u610F\u7C7B\u578B",'One choice per line. Use "" for empty text, "a\\nb" for multiline text, and JSON for other types.':'\u6BCF\u884C\u4E00\u4E2A\u9009\u9879\u3002\u7A7A\u6587\u672C\u7528 ""\uFF0C\u591A\u884C\u6587\u672C\u7528 "a\\nb"\uFF0C\u5176\u4ED6\u7C7B\u578B\u7528JSON\u3002',"Enter at least one choice.":"\u8BF7\u81F3\u5C11\u8F93\u5165\u4E00\u4E2A\u9009\u9879\u3002","Enter a non-empty JSON array of schemas.":"\u8BF7\u8F93\u5165\u81F3\u5C11\u5305\u542B\u4E00\u4E2A\u6A21\u5F0F\u7684JSON\u6570\u7EC4\u3002","Enter a JSON schema object or boolean.":"\u8BF7\u8F93\u5165JSON\u6A21\u5F0F\u5BF9\u8C61\u6216\u5E03\u5C14\u503C\u3002","Enter an object containing named schemas.":"\u8BF7\u8F93\u5165\u5305\u542B\u547D\u540D\u6A21\u5F0F\u7684\u5BF9\u8C61\u3002","The constant must match the field type.":"\u5E38\u91CF\u5FC5\u987B\u7B26\u5408\u5B57\u6BB5\u7C7B\u578B\u3002","Change existing choices or defaults before changing the type.":"\u66F4\u6539\u7C7B\u578B\u524D\uFF0C\u8BF7\u5148\u4FEE\u6539\u73B0\u6709\u9009\u9879\u6216\u9ED8\u8BA4\u503C\u3002","Choices (one per line)":"\u9009\u9879\uFF08\u6BCF\u884C\u4E00\u4E2A\uFF09","Item type":"\u6570\u7EC4\u9879\u7C7B\u578B","Rename linked fields in JSON text.":"\u8BF7\u5728JSON text\u4E2D\u91CD\u547D\u540D\u5173\u8054\u5B57\u6BB5\u3002","Additional rules are preserved in JSON text.":"\u5176\u4ED6\u89C4\u5219\u4FDD\u7559\u5728JSON text\u4E2D\u3002","Enter a field name.":"\u8BF7\u8F93\u5165\u5B57\u6BB5\u540D\u79F0\u3002","Enter a unique field name.":"\u8BF7\u8F93\u5165\u552F\u4E00\u7684\u5B57\u6BB5\u540D\u79F0\u3002","A field with this name already exists.":"\u5DF2\u5B58\u5728\u540C\u540D\u5B57\u6BB5\u3002","Each choice must match the field type.":"\u6BCF\u4E2A\u9009\u9879\u5FC5\u987B\u7B26\u5408\u5B57\u6BB5\u7C7B\u578B\u3002","Choices must be unique.":"\u9009\u9879\u4E0D\u80FD\u91CD\u590D\u3002","Enter a value greater than {minimum}.":"\u8BF7\u8F93\u5165\u5927\u4E8E{minimum}\u7684\u503C\u3002","Page type":"\u9875\u9762\u7C7B\u578B","Markdown page":"Markdown \u9875\u9762","No subformats available to add.":"\u6CA1\u6709\u53EF\u6DFB\u52A0\u7684\u5B50\u683C\u5F0F\u3002","Already added":"\u5DF2\u6DFB\u52A0","Add page":"\u6DFB\u52A0\u9875\u9762","Remove page":"\u79FB\u9664\u9875\u9762","Rename page":"\u91CD\u547D\u540D\u9875\u9762","Remove this page from the sidebar? The records will be kept.":"\u4ECE\u4FA7\u8FB9\u680F\u79FB\u9664\u6B64\u9875\u9762\uFF1F\u8BB0\u5F55\u5C06\u88AB\u4FDD\u7559\u3002",Parameters:"\u53C2\u6570","Parameter order":"\u53C2\u6570\u987A\u5E8F",Items:"\u6570\u7EC4\u5143\u7D20","Remove parameter":"\u79FB\u9664\u53C2\u6570","Check the parameter value.":"\u8BF7\u68C0\u67E5\u53C2\u6570\u503C\u3002","Download PDF":"\u4E0B\u8F7D PDF","Choose date":"\u9009\u62E9\u65E5\u671F","Previous month":"\u4E0A\u4E2A\u6708","Next month":"\u4E0B\u4E2A\u6708",Today:"\u4ECA\u5929",Clear:"\u6E05\u9664","Enter a valid date (YYYY-MM-DD).":"\u8BF7\u8F93\u5165\u6709\u6548\u65E5\u671F\uFF08YYYY-MM-DD\uFF09\u3002","Preview unavailable":"\u65E0\u6CD5\u52A0\u8F7D\u9884\u89C8",History:"\u5386\u53F2","Snapshot message":"\u5FEB\u7167\u8BF4\u660E",Restore:"\u6062\u590D","No snapshots yet":"\u6682\u65E0\u5FEB\u7167","Save snapshot":"\u4FDD\u5B58\u5FEB\u7167","Restore every file to this snapshot?":"\u5C06\u6240\u6709\u6587\u4EF6\u6062\u590D\u5230\u6B64\u5FEB\u7167\u7684\u72B6\u6001\u5417\uFF1F","Your name":"\u60A8\u7684\u59D3\u540D","Email (optional)":"\u7535\u5B50\u90AE\u4EF6\uFF08\u53EF\u9009\uFF09","Shared workspace":"\u5171\u4EAB\u5DE5\u4F5C\u533A",Join:"\u52A0\u5165",View:"\u89C6\u56FE",Cards:"\u5361\u7247",List:"\u5217\u8868","SVG icon":"SVG \u56FE\u6807","SVG icon path":"SVG \u56FE\u6807\u8DEF\u5F84","SVG icon path (optional)":"SVG \u56FE\u6807\u8DEF\u5F84\uFF08\u53EF\u9009\uFF09","Leave empty to remove. New Pages entries copy this path; existing pages keep their own icon.":"\u7559\u7A7A\u53EF\u79FB\u9664\u3002\u65B0\u6DFB\u52A0\u7684 Pages \u9875\u9762\u4F1A\u590D\u5236\u6B64\u8DEF\u5F84\uFF0C\u73B0\u6709\u9875\u9762\u4FDD\u7559\u5404\u81EA\u7684\u56FE\u6807\u3002","Search records":"\u641C\u7D22\u8BB0\u5F55",Fields:"\u663E\u793A\u5B57\u6BB5",Filters:"\u7B5B\u9009",Field:"\u5B57\u6BB5",Operator:"\u6761\u4EF6",Value:"\u503C","Match all conditions":"\u5339\u914D\u6240\u6709\u6761\u4EF6","Add filter":"\u6DFB\u52A0\u6761\u4EF6","Apply filters":"\u5E94\u7528\u7B5B\u9009","Remove filter":"\u5220\u9664\u6761\u4EF6","Comma-separated values":"\u7528\u9017\u53F7\u5206\u9694\u7684\u503C",Equals:"\u7B49\u4E8E","Does not equal":"\u4E0D\u7B49\u4E8E",Contains:"\u5305\u542B","Is one of":"\u5339\u914D\u4EFB\u610F\u503C","Greater than":"\u5927\u4E8E","At least":"\u5927\u4E8E\u6216\u7B49\u4E8E","Less than":"\u5C0F\u4E8E","At most":"\u5C0F\u4E8E\u6216\u7B49\u4E8E","Is empty":"\u4E3A\u7A7A","Open externally?":"\u5728\u5916\u90E8\u6253\u5F00\uFF1F","Open externally":"\u5728\u5916\u90E8\u6253\u5F00","Open this website in a new tab?":"\u5728\u65B0\u6807\u7B7E\u9875\u4E2D\u6253\u5F00\u6B64\u7F51\u7AD9\uFF1F","Open this website externally to view it.":"\u8BF7\u5728\u5916\u90E8\u6253\u5F00\u6B64\u7F51\u7AD9\u3002","This website could not be displayed here. Open it externally?":"\u65E0\u6CD5\u5728\u6B64\u663E\u793A\u8BE5\u7F51\u7AD9\u3002\u5728\u5916\u90E8\u6253\u5F00\uFF1F","This website has not loaded.":"\u6B64\u7F51\u7AD9\u5C1A\u672A\u52A0\u8F7D\u3002","This website could not be loaded.":"\u65E0\u6CD5\u52A0\u8F7D\u6B64\u7F51\u7AD9\u3002","Loading website\u2026":"\u6B63\u5728\u52A0\u8F7D\u7F51\u7AD9\u2026","Zoom in":"\u653E\u5927","Zoom out":"\u7F29\u5C0F","Reset zoom":"\u91CD\u7F6E\u7F29\u653E","Image preview":"\u56FE\u50CF\u9884\u89C8","Manifest editor":"\u6E05\u5355\u7F16\u8F91\u5668",Settings:"\u8BBE\u7F6E",Title:"\u6807\u9898","Add file":"\u6DFB\u52A0\u6587\u4EF6","Light and dark":"\u6D45\u8272\u548C\u6DF1\u8272",Automatic:"\u81EA\u52A8","Edit this legacy manifest in YAML.":"\u8BF7\u4F7F\u7528 YAML \u7F16\u8F91\u6B64\u65E7\u683C\u5F0F\u6E05\u5355\u3002","Manifest file is unavailable.":"\u65E0\u6CD5\u8BFB\u53D6\u6E05\u5355\u6587\u4EF6\u3002","Discard changes and reload the manifest?":"\u653E\u5F03\u66F4\u6539\u5E76\u91CD\u65B0\u52A0\u8F7D\u6E05\u5355\uFF1F","Load failed":"\u52A0\u8F7D\u5931\u8D25","Remove path":"\u79FB\u9664\u8DEF\u5F84","Add format":"\u6DFB\u52A0\u683C\u5F0F","Add folder":"\u6DFB\u52A0\u6587\u4EF6\u5939","Remove format":"\u79FB\u9664\u683C\u5F0F","Enter a new file extension":"\u8BF7\u8F93\u5165\u5C1A\u672A\u914D\u7F6E\u7684\u6269\u5C55\u540D","Could not load formats":"\u65E0\u6CD5\u52A0\u8F7D\u683C\u5F0F","Downloading\u2026":"\u6B63\u5728\u4E0B\u8F7D\u2026","Access denied.":"\u6CA1\u6709\u8BBF\u95EE\u6743\u9650\u3002","File unavailable.":"\u6587\u4EF6\u4E0D\u53EF\u7528\u3002","Download failed. Retry.":"\u4E0B\u8F7D\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5\u3002","Ask LLM":"\u8BE2\u95EE LLM","New chat":"\u65B0\u5EFA\u5BF9\u8BDD","Connections and API keys":"\u8FDE\u63A5\u4E0E API \u5BC6\u94A5",Connection:"\u8FDE\u63A5","Connection name":"\u8FDE\u63A5\u540D\u79F0",Provider:"\u670D\u52A1\u63D0\u4F9B\u5546",Endpoint:"\u7AEF\u70B9","Model ID":"\u6A21\u578B ID","API key":"API \u5BC6\u94A5","Inject API key":"\u6CE8\u5165 API \u5BC6\u94A5","Remember connections in this tab":"\u5728\u6B64\u6807\u7B7E\u9875\u4E2D\u8BB0\u4F4F\u8FDE\u63A5","Keys stay in memory unless you remember this tab. They are sent only to the selected provider, never to document files.":"\u9664\u975E\u9009\u62E9\u8BB0\u4F4F\uFF0C\u5BC6\u94A5\u4EC5\u4FDD\u7559\u5728\u5185\u5B58\u4E2D\u3002\u4EC5\u53D1\u9001\u7ED9\u6240\u9009\u670D\u52A1\u63D0\u4F9B\u5546\uFF0C\u4E0D\u4FDD\u5B58\u5230\u6587\u6863\u6587\u4EF6\u4E2D\u3002","Custom endpoints must allow browser requests.":"\u81EA\u5B9A\u4E49\u7AEF\u70B9\u5FC5\u987B\u5141\u8BB8\u6D4F\u89C8\u5668\u8BF7\u6C42\u3002","New connection":"\u65B0\u5EFA\u8FDE\u63A5",Conversation:"\u5BF9\u8BDD","Choose a connection and ask about a document, section, or file.":"\u9009\u62E9\u8FDE\u63A5\uFF0C\u8BE2\u95EE\u6587\u6863\u3001\u7AE0\u8282\u6216\u6587\u4EF6\u3002","Current document":"\u5F53\u524D\u6587\u6863","Selected lines":"\u6240\u9009\u884C","Selected context":"\u6240\u9009\u4E0A\u4E0B\u6587",Message:"\u6D88\u606F",References:"\u5F15\u7528\u5EFA\u8BAE","Only selected context and this conversation are sent. Ctrl+Enter to send.":"\u4EC5\u53D1\u9001\u6240\u9009\u4E0A\u4E0B\u6587\u548C\u6B64\u5BF9\u8BDD\u3002\u6309 Ctrl+Enter \u53D1\u9001\u3002",Send:"\u53D1\u9001","Add a connection to start.":"\u8BF7\u5148\u6DFB\u52A0\u8FDE\u63A5\u3002","Key injection on":"\u5BC6\u94A5\u6CE8\u5165\u5DF2\u5F00\u542F","Key injection off":"\u5BC6\u94A5\u6CE8\u5165\u5DF2\u5173\u95ED",characters:"\u5B57\u7B26","Sent context":"\u5DF2\u53D1\u9001\u7684\u4E0A\u4E0B\u6587",You:"\u4F60","Sending\u2026":"\u53D1\u9001\u4E2D\u2026",Cancelled:"\u5DF2\u53D6\u6D88","Ask about this context":"\u8BE2\u95EE\u6B64\u4E0A\u4E0B\u6587","Add to chat":"\u6DFB\u52A0\u5230\u5BF9\u8BDD","Open a source file or select lines first.":"\u8BF7\u5148\u6253\u5F00\u6E90\u6587\u4EF6\u6216\u9009\u62E9\u884C\u3002","Could not reach the provider. Check the connection and browser access.":"\u65E0\u6CD5\u8FDE\u63A5\u5230\u670D\u52A1\u3002\u8BF7\u68C0\u67E5\u8FDE\u63A5\u548C\u6D4F\u89C8\u5668\u8BBF\u95EE\u6743\u9650\u3002","Browser storage is unavailable. Connections are kept in memory.":"\u6D4F\u89C8\u5668\u5B58\u50A8\u4E0D\u53EF\u7528\u3002\u8FDE\u63A5\u5C06\u4FDD\u7559\u5728\u5185\u5B58\u4E2D\u3002","Saved connections could not be loaded. Add a connection again.":"\u65E0\u6CD5\u52A0\u8F7D\u5DF2\u4FDD\u5B58\u7684\u8FDE\u63A5\u3002\u8BF7\u91CD\u65B0\u6DFB\u52A0\u3002","The selected lines do not exist in the current editor.":"\u6307\u5B9A\u884C\u4E0D\u5B58\u5728\u4E8E\u5F53\u524D\u7F16\u8F91\u5668\u4E2D\u3002","Use a valid line reference such as @L36 or @L36-L48.":"\u8BF7\u4F7F\u7528 @L36 \u6216 @L36-L48 \u7B49\u6709\u6548\u884C\u5F15\u7528\u3002","Enable API key injection and enter a key for this connection.":"\u8BF7\u4E3A\u6B64\u8FDE\u63A5\u542F\u7528\u5BC6\u94A5\u6CE8\u5165\u5E76\u8F93\u5165 API \u5BC6\u94A5\u3002","The provider rejected access. Check the API key and model permissions.":"\u670D\u52A1\u62D2\u7EDD\u8BBF\u95EE\u3002\u8BF7\u68C0\u67E5 API \u5BC6\u94A5\u548C\u6A21\u578B\u6743\u9650\u3002","The provider rate limit was reached. Try again later.":"\u5DF2\u8FBE\u5230\u670D\u52A1\u8BF7\u6C42\u9650\u5236\u3002\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002","Context is too large. Select fewer files or lines.":"\u4E0A\u4E0B\u6587\u8FC7\u5927\u3002\u8BF7\u9009\u62E9\u66F4\u5C11\u7684\u6587\u4EF6\u6216\u884C\u3002","Conversation is too large. Start a new chat.":"\u5BF9\u8BDD\u8FC7\u957F\u3002\u8BF7\u5F00\u59CB\u65B0\u5BF9\u8BDD\u3002","Attach at most 16 context items per message.":"\u6BCF\u6761\u6D88\u606F\u6700\u591A\u9644\u52A0 16 \u4E2A\u4E0A\u4E0B\u6587\u9879\u76EE\u3002","Workspace changed. Start a new chat.":"\u5DE5\u4F5C\u533A\u5DF2\u66F4\u6539\u3002\u8BF7\u5F00\u59CB\u65B0\u5BF9\u8BDD\u3002","No matching files or skills.":"\u6CA1\u6709\u5339\u914D\u7684\u6587\u4EF6\u6216\u6280\u80FD\u3002","LLM chat":"LLM \u804A\u5929",Chat:"\u804A\u5929","Open chat":"\u6253\u5F00\u804A\u5929",Providers:"\u63D0\u4F9B\u5546","Add an API key":"\u6DFB\u52A0 API \u5BC6\u94A5","Remove API key":"\u5220\u9664 API \u5BC6\u94A5","Saved in this browser":"\u5DF2\u4FDD\u5B58\u5728\u6B64\u6D4F\u89C8\u5668","Saved in this browser. Sent only to the provider.":"\u4FDD\u5B58\u5728\u6B64\u6D4F\u89C8\u5668\uFF0C\u4EC5\u53D1\u9001\u7ED9\u6240\u9009\u63D0\u4F9B\u5546\u3002","Saved providers could not be loaded. Check browser storage.":"\u65E0\u6CD5\u52A0\u8F7D\u5DF2\u4FDD\u5B58\u7684\u63D0\u4F9B\u5546\uFF0C\u8BF7\u68C0\u67E5\u6D4F\u89C8\u5668\u5B58\u50A8\u3002","Could not save. Check browser storage and try again.":"\u65E0\u6CD5\u4FDD\u5B58\uFF0C\u8BF7\u68C0\u67E5\u6D4F\u89C8\u5668\u5B58\u50A8\u540E\u91CD\u8BD5\u3002","Enter a valid API key and model.":"\u8BF7\u8F93\u5165\u6709\u6548\u7684 API \u5BC6\u94A5\u548C\u6A21\u578B\u3002","Add an API key in Providers to start.":"\u8BF7\u5728\u63D0\u4F9B\u5546\u8BBE\u7F6E\u4E2D\u6DFB\u52A0 API \u5BC6\u94A5\u3002","Open section agent":"\u6253\u5F00\u7AE0\u8282\u667A\u80FD\u4F53",Agent:"\u667A\u80FD\u4F53","Move conversation":"\u79FB\u52A8\u5BF9\u8BDD","Move to sidebar":"\u79FB\u81F3\u4FA7\u680F","Message the agent":"\u5411\u667A\u80FD\u4F53\u53D1\u9001\u6307\u4EE4","Read and write":"\u8BFB\u53D6\u548C\u7F16\u8F91","Read only":"\u53EA\u8BFB","Section updated":"\u5DF2\u66F4\u65B0\u7AE0\u8282","Section read":"\u5DF2\u8BFB\u53D6\u7AE0\u8282","The source changed. Select the section again before editing.":"\u6E90\u6587\u4EF6\u5DF2\u66F4\u6539\u3002\u8BF7\u91CD\u65B0\u9009\u62E9\u8981\u7F16\u8F91\u7684\u7AE0\u8282\u3002","This section is read-only.":"\u6B64\u7AE0\u8282\u4E3A\u53EA\u8BFB\u3002","Read the section before editing it.":"\u8BF7\u5148\u8BFB\u53D6\u7AE0\u8282\u518D\u7F16\u8F91\u3002","Invalid section action.":"\u7AE0\u8282\u64CD\u4F5C\u65E0\u6548\u3002","The section could not be updated.":"\u65E0\u6CD5\u66F4\u65B0\u7AE0\u8282\u3002","Agent step limit reached. Review the changes and send a follow-up.":"\u667A\u80FD\u4F53\u5DF2\u8FBE\u5230\u64CD\u4F5C\u6B21\u6570\u4E0A\u9650\u3002\u8BF7\u68C0\u67E5\u66F4\u6539\u5E76\u53D1\u9001\u540E\u7EED\u6307\u4EE4\u3002","No section is selected for agent actions.":"\u5C1A\u672A\u9009\u62E9\u8981\u64CD\u4F5C\u7684\u7AE0\u8282\u3002","The provider returned invalid tool calls.":"\u63D0\u4F9B\u5546\u8FD4\u56DE\u4E86\u65E0\u6548\u7684\u5DE5\u5177\u8C03\u7528\u3002",Model:"\u6A21\u578B","API key missing":"\u672A\u8BBE\u7F6E API \u5BC6\u94A5","Model list unavailable. Using local choices.":"\u65E0\u6CD5\u83B7\u53D6\u6A21\u578B\u5217\u8868\u3002\u6B63\u5728\u4F7F\u7528\u672C\u5730\u9009\u9879\u3002","Enter to select; Ctrl+Enter to configure":"Enter \u9009\u62E9\uFF1BCtrl+Enter \u8BBE\u7F6E"};var rs={eng:Gr,jpn:Zo,zho:es},is=e=>{let n=e.toLowerCase().split("-")[0]??"en";return Object.keys(rs).find(t=>t===n||Ut[t]===n)??"eng"},rc=(e,n,t={})=>(rs[is(e)]?.[n]??Gr[n]??n).replace(/\{(\w+)\}/g,(i,o)=>Object.hasOwn(t,o)?String(t[o]):i),ts="docs:ui-language",Vt="eng",L=(e,n)=>rc(Vt,e,n),ns=()=>{for(let e of document.querySelectorAll("button.codecopy"))e.setAttribute("title",L("Copy code")),e.setAttribute("aria-label",L("Copy code"));for(let e of["text","title","aria-label","placeholder"]){let n=e==="text"?"data-i18n":`data-i18n-${e}`;for(let t of document.querySelectorAll(`[${n}]`)){let r=L(t.getAttribute(n)??"");e==="text"?t.textContent!==r&&(t.textContent=r):t.getAttribute(e)!==r&&t.setAttribute(e,r)}}},os=()=>{let e=document.querySelector("#ui-language"),n=navigator.language;try{n=localStorage.getItem(ts)||n}catch{}let t=r=>{Vt=is(r),e&&(e.value=Vt),document.documentElement.lang=Ut[Vt]??Vt,ns(),document.dispatchEvent(new Event("docs:ui-language"))};window.__docsTranslate=L,t(n),e?.addEventListener("change",()=>{t(e.value);try{localStorage.setItem(ts,Vt)}catch{}}),document.addEventListener("docs:ui-refresh",ns),Xo(L)};var be=e=>e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""");var Qe=e=>typeof e=="string"&&e.length>0&&!/[\\:?#]/.test(e)&&[...e].every(n=>n.charCodeAt(0)>=32)&&e.split("/").every(n=>!!n&&!n.startsWith("."));var ss=e=>{let n=e.split("/").pop()??e;return n.includes(".")?n.slice(n.lastIndexOf(".")+1).toLowerCase():"other"},as=e=>`files/${ss(e)}/${e.split("/").pop()}`;var Bn=Symbol.for("yaml.alias"),ls=Symbol.for("yaml.document"),Xe=Symbol.for("yaml.map"),Kr=Symbol.for("yaml.pair"),Gt=Symbol.for("yaml.scalar"),mt=Symbol.for("yaml.seq"),Be=Symbol.for("yaml.node.type"),Ge=e=>!!e&&typeof e=="object"&&e[Be]===Bn,Ze=e=>!!e&&typeof e=="object"&&e[Be]===ls,et=e=>!!e&&typeof e=="object"&&e[Be]===Xe,me=e=>!!e&&typeof e=="object"&&e[Be]===Kr,de=e=>!!e&&typeof e=="object"&&e[Be]===Gt,Ke=e=>!!e&&typeof e=="object"&&e[Be]===mt;function we(e){if(e&&typeof e=="object")switch(e[Be]){case Xe:case mt:return!0}return!1}function he(e){if(e&&typeof e=="object")switch(e[Be]){case Bn:case Xe:case Gt:case mt:return!0}return!1}var Hn=e=>(de(e)||we(e))&&!!e.anchor;var je=Symbol("break visit"),cs=Symbol("skip children"),tt=Symbol("remove node");function st(e,n){let t=us(n);Ze(e)?Kt(null,e.contents,t,Object.freeze([e]))===tt&&(e.contents=null):Kt(null,e,t,Object.freeze([]))}st.BREAK=je;st.SKIP=cs;st.REMOVE=tt;function Kt(e,n,t,r){let i=ds(e,n,t,r);if(he(i)||me(i))return fs(e,r,i),Kt(e,i,t,r);if(typeof i!="symbol"){if(we(n)){r=Object.freeze(r.concat(n));for(let o=0;o<n.items.length;++o){let s=Kt(o,n.items[o],t,r);if(typeof s=="number")o=s-1;else{if(s===je)return je;s===tt&&(n.items.splice(o,1),o-=1)}}}else if(me(n)){r=Object.freeze(r.concat(n));let o=Kt("key",n.key,t,r);if(o===je)return je;o===tt&&(n.key=null);let s=Kt("value",n.value,t,r);if(s===je)return je;s===tt&&(n.value=null)}}return i}async function zn(e,n){let t=us(n);Ze(e)?await Wt(null,e.contents,t,Object.freeze([e]))===tt&&(e.contents=null):await Wt(null,e,t,Object.freeze([]))}zn.BREAK=je;zn.SKIP=cs;zn.REMOVE=tt;async function Wt(e,n,t,r){let i=await ds(e,n,t,r);if(he(i)||me(i))return fs(e,r,i),Wt(e,i,t,r);if(typeof i!="symbol"){if(we(n)){r=Object.freeze(r.concat(n));for(let o=0;o<n.items.length;++o){let s=await Wt(o,n.items[o],t,r);if(typeof s=="number")o=s-1;else{if(s===je)return je;s===tt&&(n.items.splice(o,1),o-=1)}}}else if(me(n)){r=Object.freeze(r.concat(n));let o=await Wt("key",n.key,t,r);if(o===je)return je;o===tt&&(n.key=null);let s=await Wt("value",n.value,t,r);if(s===je)return je;s===tt&&(n.value=null)}}return i}function us(e){return typeof e=="object"&&(e.Collection||e.Node||e.Value)?Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e):e}function ds(e,n,t,r){if(typeof t=="function")return t(e,n,r);if(et(n))return t.Map?.(e,n,r);if(Ke(n))return t.Seq?.(e,n,r);if(me(n))return t.Pair?.(e,n,r);if(de(n))return t.Scalar?.(e,n,r);if(Ge(n))return t.Alias?.(e,n,r)}function fs(e,n,t){let r=n[n.length-1];if(we(r))r.items[e]=t;else if(me(r))e==="key"?r.key=t:r.value=t;else if(Ze(r))r.contents=t;else{let i=Ge(r)?"alias":"scalar";throw new Error(`Cannot replace node with ${i} parent`)}}var ic={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},oc=e=>e.replace(/[!,[\]{}]/g,n=>ic[n]),Yt=class e{constructor(n,t){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},e.defaultYaml,n),this.tags=Object.assign({},e.defaultTags,t)}clone(){let n=new e(this.yaml,this.tags);return n.docStart=this.docStart,n}atDocument(){let n=new e(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:e.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},e.defaultTags);break}return n}add(n,t){this.atNextDocument&&(this.yaml={explicit:e.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},e.defaultTags),this.atNextDocument=!1);let r=n.trim().split(/[ \t]+/),i=r.shift();switch(i){case"%TAG":{if(r.length!==2&&(t(0,"%TAG directive should contain exactly two parts"),r.length<2))return!1;let[o,s]=r;return this.tags[o]=s,!0}case"%YAML":{if(this.yaml.explicit=!0,r.length!==1)return t(0,"%YAML directive should contain exactly one part"),!1;let[o]=r;if(o==="1.1"||o==="1.2")return this.yaml.version=o,!0;{let s=/^\d+\.\d+$/.test(o);return t(6,`Unsupported YAML version ${o}`,s),!1}}default:return t(0,`Unknown directive ${i}`,!0),!1}}tagName(n,t){if(n==="!")return"!";if(n[0]!=="!")return t(`Not a valid tag: ${n}`),null;if(n[1]==="<"){let s=n.slice(2,-1);return s==="!"||s==="!!"?(t(`Verbatim tags aren't resolved, so ${n} is invalid.`),null):(n[n.length-1]!==">"&&t("Verbatim tags must end with a >"),s)}let[,r,i]=n.match(/^(.*!)([^!]*)$/s);i||t(`The ${n} tag has no suffix`);let o=this.tags[r];if(o)try{return o+decodeURIComponent(i)}catch(s){return t(String(s)),null}return r==="!"?n:(t(`Could not resolve tag: ${n}`),null)}tagString(n){for(let[t,r]of Object.entries(this.tags))if(n.startsWith(r))return t+oc(n.substring(r.length));return n[0]==="!"?n:`!<${n}>`}toString(n){let t=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],r=Object.entries(this.tags),i;if(n&&r.length>0&&he(n.contents)){let o={};st(n.contents,(s,a)=>{he(a)&&a.tag&&(o[a.tag]=!0)}),i=Object.keys(o)}else i=[];for(let[o,s]of r)o==="!!"&&s==="tag:yaml.org,2002:"||(!n||i.some(a=>a.startsWith(s)))&&t.push(`%TAG ${o} ${s}`);return t.join(`
|
|
20
|
-
`)}};Yt.defaultYaml={explicit:!1,version:"1.2"};Yt.defaultTags={"!!":"tag:yaml.org,2002:"};function Un(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){let t=`Anchor must not contain whitespace or control characters: ${JSON.stringify(e)}`;throw new Error(t)}return!0}function Mt(e,n,t,r){if(r&&typeof r=="object")if(Array.isArray(r))for(let i=0,o=r.length;i<o;++i){let s=r[i],a=Mt(e,r,String(i),s);a===void 0?delete r[i]:a!==s&&(r[i]=a)}else if(r instanceof Map)for(let i of Array.from(r.keys())){let o=r.get(i),s=Mt(e,r,i,o);s===void 0?r.delete(i):s!==o&&r.set(i,s)}else if(r instanceof Set)for(let i of Array.from(r)){let o=Mt(e,r,i,i);o===void 0?r.delete(i):o!==i&&(r.delete(i),r.add(o))}else for(let[i,o]of Object.entries(r)){let s=Mt(e,r,i,o);s===void 0?delete r[i]:s!==o&&(r[i]=s)}return e.call(n,t,r)}function Ce(e,n,t){if(Array.isArray(e))return e.map((r,i)=>Ce(r,String(i),t));if(e&&typeof e.toJSON=="function"){if(!t||!Hn(e))return e.toJSON(n,t);let r={aliasCount:0,count:1,res:void 0};t.anchors.set(e,r),t.onCreate=o=>{r.res=o,delete t.onCreate};let i=e.toJSON(n,t);return t.onCreate&&t.onCreate(i),i}return typeof e=="bigint"&&!t?.keep?Number(e):e}var ht=class{constructor(n){Object.defineProperty(this,
|
|
19
|
+
\u4ECD\u8981\u5220\u9664\uFF1F\uFF08\u94FE\u63A5\u5C06\u5931\u6548\uFF09`,heading:"\u6807\u9898",subheading:"\u5B50\u6807\u9898","code fence":"\u4EE3\u7801\u5757","figure reference":"\u56FE\u7247\u5F15\u7528",Templates:"\u6A21\u677F",Figures:"\u56FE\u7247","Doc links":"\u6587\u6863\u94FE\u63A5",Terms:"\u672F\u8BED","Custom syntax":"\u6269\u5C55\u8BED\u6CD5",path:"\u8DEF\u5F84",size:"\u5927\u5C0F",kind:"\u7C7B\u578B",syntax:"\u8BED\u6CD5",doc:"\u6587\u6863","used in":"\u4F7F\u7528\u4F4D\u7F6E",none:"\u65E0","Split view":"\u5207\u6362\u53CC\u680F\u89C6\u56FE","Change language":"\u66F4\u6539\u8BED\u8A00","Active pane":"\u5F53\u524D\u7F16\u8F91\u7A97\u683C","Activate pane":"\u7F16\u8F91\u6B64\u7A97\u683C","Failed to load pane":"\u65E0\u6CD5\u52A0\u8F7D\u7A97\u683C","Close pane and discard its unsaved changes?":"\u653E\u5F03\u53E6\u4E00\u7A97\u683C\u672A\u4FDD\u5B58\u7684\u66F4\u6539\u5E76\u5173\u95ED\uFF1F","Validate and apply":"\u9A8C\u8BC1\u5E76\u5E94\u7528","Auto validate":"\u81EA\u52A8\u9A8C\u8BC1","Source mapping":"\u663E\u793A\u6B63\u6587\u4E0E\u6E90\u4EE3\u7801\u7684\u5BF9\u5E94\u5173\u7CFB","Validation pending":"\u5B58\u5728\u672A\u5E94\u7528\u7684\u66F4\u6539",Validating:"\u6B63\u5728\u9A8C\u8BC1","Validation passed":"\u9A8C\u8BC1\u901A\u8FC7","Validation errors":"\u9A8C\u8BC1\u9519\u8BEF",Saving:"\u6B63\u5728\u4FDD\u5B58","Save failed":"\u4FDD\u5B58\u5931\u8D25","Expand section":"\u5C55\u5F00","Collapse section":"\u6298\u53E0",terms:"\u672F\u8BED","Edit text file":"\u7F16\u8F91\u6587\u672C\u6587\u4EF6","Create file":"\u8F6C\u4E3A\u6587\u4EF6","Reload file":"\u91CD\u65B0\u8F7D\u5165\u6587\u4EF6","Working\u2026":"\u5904\u7406\u4E2D\u2026","File not found \u2014 save to create it.":"\u6587\u4EF6\u4E0D\u5B58\u5728\uFF0C\u4FDD\u5B58\u5373\u53EF\u521B\u5EFA\u3002","Discard file edits and reload?":"\u653E\u5F03\u6587\u4EF6\u4E2D\u672A\u4FDD\u5B58\u7684\u4FEE\u6539\u5E76\u91CD\u65B0\u8F7D\u5165\uFF1F","File changed externally. Reload it before saving.":"\u6587\u4EF6\u5DF2\u5728\u5916\u90E8\u4FEE\u6539\uFF0C\u8BF7\u91CD\u65B0\u8F7D\u5165\u540E\u518D\u4FDD\u5B58\u3002","Edits made while reloading were kept. Reload again when ready.":"\u5DF2\u4FDD\u7559\u91CD\u65B0\u8F7D\u5165\u671F\u95F4\u7684\u4FEE\u6539\uFF0C\u8BF7\u51C6\u5907\u597D\u540E\u518D\u6B21\u8F7D\u5165\u3002","File not found":"\u627E\u4E0D\u5230\u6587\u4EF6","File has not been loaded":"\u5C1A\u672A\u52A0\u8F7D\u6587\u4EF6","File could not be loaded":"\u65E0\u6CD5\u52A0\u8F7D\u6587\u4EF6","View remote text file":"\u67E5\u770B\u8FDC\u7A0B\u6587\u672C\u6587\u4EF6","Remote files are read-only":"\u8FDC\u7A0B\u6587\u4EF6\u4E3A\u53EA\u8BFB","Edits made while validating were kept. Validate again when ready.":"\u5DF2\u4FDD\u7559\u9A8C\u8BC1\u671F\u95F4\u7684\u7F16\u8F91\u3002\u51C6\u5907\u597D\u540E\u8BF7\u91CD\u65B0\u9A8C\u8BC1\u3002","Updating preview":"\u6B63\u5728\u66F4\u65B0\u9884\u89C8","Preview is up to date":"\u9884\u89C8\u6B63\u5E38","Preview could not be updated":"\u65E0\u6CD5\u66F4\u65B0\u9884\u89C8","Conflicting changes":"\u66F4\u6539\u53D1\u751F\u51B2\u7A81","Use my edits":"\u4F7F\u7528\u6211\u7684\u7F16\u8F91","Use external changes":"\u4F7F\u7528\u5916\u90E8\u66F4\u6539","File was deleted":"\u6587\u4EF6\u5DF2\u5220\u9664",Cancel:"\u53D6\u6D88","Search documents":"\u641C\u7D22\u6587\u6863","No results":"\u65E0\u641C\u7D22\u7ED3\u679C","Searching\u2026":"\u641C\u7D22\u4E2D\u2026","Could not load search. Press Ctrl+F to retry.":"\u65E0\u6CD5\u52A0\u8F7D\u641C\u7D22\u3002\u6309 Ctrl+F \u91CD\u8BD5\u3002","{count} results":"{count} \u6761\u7ED3\u679C","Showing {shown} of {count} results":"\u663E\u793A {count} \u6761\u7ED3\u679C\u4E2D\u7684 {shown} \u6761","Add translation":"\u6DFB\u52A0\u7FFB\u8BD1\u6587\u6863","Move search":"\u79FB\u52A8\u641C\u7D22\u7A97\u53E3","Resize search":"\u8C03\u6574\u641C\u7D22\u7A97\u53E3\u5927\u5C0F","Matches text":"\u5339\u914D\u6B63\u6587","Matches file name":"\u5339\u914D\u6587\u4EF6\u540D","Matches folder name":"\u5339\u914D\u6587\u4EF6\u5939\u540D","Close search":"\u5173\u95ED\u641C\u7D22\u7A97\u53E3","Move search to sidebar":"\u5C06\u641C\u7D22\u7A97\u53E3\u653E\u5230\u4FA7\u8FB9\u680F","Float search":"\u8BA9\u641C\u7D22\u7A97\u53E3\u6D6E\u52A8",Notice:"\u63D0\u793A",OK:"\u5173\u95ED","Discard changes":"\u653E\u5F03\u66F4\u6539","Copy section URL":"\u590D\u5236\u6B64\u7AE0\u8282\u94FE\u63A5",Copied:"\u5DF2\u590D\u5236","Could not copy URL":"\u65E0\u6CD5\u590D\u5236\u94FE\u63A5","Search languages":"\u641C\u7D22\u8BED\u8A00","Remove translation":"\u5220\u9664\u7FFB\u8BD1","Source language cannot be removed":"\u65E0\u6CD5\u5220\u9664\u6E90\u8BED\u8A00","Enter to edit; Ctrl+Enter to add or remove translation":"\u6309Enter\u7F16\u8F91\uFF0C\u6309Ctrl+Enter\u6DFB\u52A0\u6216\u5220\u9664\u7FFB\u8BD1","Preview has not been updated":"\u9884\u89C8\u5C1A\u672A\u66F4\u65B0",Table:"\u8868\u683C",Image:"\u56FE\u7247",HTML:"HTML",Markdown:"Markdown",Code:"\u4EE3\u7801",Video:"\u89C6\u9891",Loading:"\u52A0\u8F7D\u4E2D",Retry:"\u91CD\u8BD5",Reload:"\u91CD\u65B0\u52A0\u8F7D",Close:"\u5173\u95ED","File preview":"\u6587\u4EF6\u9884\u89C8",Files:"\u6587\u4EF6","Search files":"\u641C\u7D22\u6587\u4EF6",Plugin:"\u63D2\u4EF6\u540D","Default folder layout":"\u9ED8\u8BA4\u6587\u4EF6\u5939\u5E03\u5C40","Folder restructure":"\u6574\u7406\u6587\u4EF6\u5939",Move:"\u79FB\u52A8","Move up":"\u4E0A\u79FB","Move down":"\u4E0B\u79FB","Move to root":"\u79FB\u5230\u6839\u76EE\u5F55",Name:"\u540D\u79F0",Size:"\u5927\u5C0F",Select:"\u9009\u62E9","Copy path":"\u590D\u5236\u8DEF\u5F84","File path":"\u6587\u4EF6\u8DEF\u5F84","File created":"\u6587\u4EF6\u5DF2\u521B\u5EFA","Copy failed":"\u590D\u5236\u5931\u8D25","Place new files in files/<extension>/":"\u5C06\u65B0\u6587\u4EF6\u653E\u5165 files/<\u6269\u5C55\u540D>/","Document changed. Retry from the current block.":"\u6587\u6863\u5DF2\u66F4\u6539\u3002\u8BF7\u4ECE\u5F53\u524D\u4EE3\u7801\u5757\u91CD\u8BD5\u3002","Document changed. Insert the file from Files.":"\u6587\u6863\u5DF2\u66F4\u6539\u3002\u8BF7\u4ECE\u6587\u4EF6\u9875\u9762\u63D2\u5165\u5F15\u7528\u3002","File name":"\u6587\u4EF6\u540D","Renamed to {filename}":"\u5DF2\u91CD\u547D\u540D\u4E3A {filename}","Enter a file name ending in .md":"\u8BF7\u8F93\u5165\u4EE5 .md \u7ED3\u5C3E\u7684\u6587\u4EF6\u540D","Upload files":"\u4E0A\u4F20\u6587\u4EF6","Uploading {count}/{total}":"\u4E0A\u4F20\u4E2D {count}/{total}","Files uploaded":"\u6587\u4EF6\u5DF2\u4E0A\u4F20","File exceeds 64 MiB":"\u6587\u4EF6\u8D85\u8FC764 MiB","Choose files inside the folder":"\u8BF7\u9009\u62E9\u6587\u4EF6\u5939\u4E2D\u7684\u6587\u4EF6","Click a column to sort; row numbers refer to the source":"\u70B9\u51FB\u5217\u540D\u6392\u5E8F\uFF1B\u884C\u53F7\u5BF9\u5E94\u539F\u59CB\u6570\u636E",Column:"\u5217","Resize table":"\u8C03\u6574\u8868\u683C\u9AD8\u5EA6","Back to document":"\u8FD4\u56DE\u6587\u6863","File details":"\u6587\u4EF6\u4FE1\u606F","Show Git changes":"\u663E\u793A Git \u5DEE\u5F02","Resource views":"\u8D44\u6E90\u89C6\u56FE",Default:"\u9ED8\u8BA4\u503C","Set as default":"\u8BBE\u4E3A\u9ED8\u8BA4\u503C","Group by":"\u5206\u7EC4\u4F9D\u636E","Sort by":"\u6392\u5E8F\u4F9D\u636E","Newest first":"\u4ECE\u65B0\u5230\u65E7","Oldest first":"\u4ECE\u65E7\u5230\u65B0",Unassigned:"\u672A\u8BBE\u7F6E",Records:"\u8BB0\u5F55",Codeblocks:"\u4EE3\u7801\u5757",Format:"\u683C\u5F0F",URLs:"URL","URL previews":"URL \u9884\u89C8",Skills:"\u6280\u80FD","Format collections":"\u683C\u5F0F\u5206\u7C7B",Collection:"\u5206\u7C7B",Grid:"\u7F51\u683C","Grid layout":"\u7F51\u683C\u5E03\u5C40","Drag or use arrow keys to resize the grid":"\u62D6\u52A8\u6216\u4F7F\u7528\u65B9\u5411\u952E\u8C03\u6574\u7F51\u683C",Display:"\u663E\u793A\u8BBE\u7F6E",Pagination:"\u5206\u9875",Columns:"\u5217\u6570",Rows:"\u884C\u6570",Folder:"\u6587\u4EF6\u5939","All folders":"\u6240\u6709\u6587\u4EF6\u5939","All formats":"\u6240\u6709\u683C\u5F0F",Previous:"\u4E0A\u4E00\u9875",Next:"\u4E0B\u4E00\u9875","Expand children":"\u5C55\u5F00\u5B50\u9879","Expand all descendants":"\u5C55\u5F00\u6240\u6709\u540E\u4EE3",Collapse:"\u6298\u53E0",Domain:"\u57DF\u540D",All:"\u5168\u90E8",references:"\u5904\u5F15\u7528","Search resources":"\u641C\u7D22\u8D44\u6E90","Files with errors":"\u8BFB\u53D6\u6216\u89E3\u6790\u9519\u8BEF","No matching resources":"\u6CA1\u6709\u5339\u914D\u7684\u8D44\u6E90","Organize files":"\u6574\u7406\u6587\u4EF6","Auto-save paused":"\u81EA\u52A8\u4FDD\u5B58\u5DF2\u6682\u505C","Reload failed":"\u91CD\u65B0\u52A0\u8F7D\u5931\u8D25","Conflict unresolved. Auto-save is paused; your edits are kept.":"\u51B2\u7A81\u5C1A\u672A\u89E3\u51B3\uFF0C\u81EA\u52A8\u4FDD\u5B58\u5DF2\u6682\u505C\uFF1B\u60A8\u7684\u7F16\u8F91\u5DF2\u4FDD\u7559\u3002","File not found \u2014 editing will create it automatically.":"\u6587\u4EF6\u4E0D\u5B58\u5728\uFF1B\u7F16\u8F91\u540E\u4F1A\u81EA\u52A8\u521B\u5EFA\u3002",Play:"\u64AD\u653E",Pause:"\u6682\u505C",Seek:"\u64AD\u653E\u4F4D\u7F6E",Mute:"\u9759\u97F3",Unmute:"\u53D6\u6D88\u9759\u97F3",Volume:"\u97F3\u91CF","Video settings":"\u89C6\u9891\u8BBE\u7F6E","Playback speed":"\u64AD\u653E\u901F\u5EA6",Fullscreen:"\u5168\u5C4F","Video could not be played":"\u65E0\u6CD5\u64AD\u653E\u89C6\u9891","Fullscreen is unavailable":"\u65E0\u6CD5\u8FDB\u5165\u5168\u5C4F","Some registered fonts could not be loaded":"\u90E8\u5206\u5DF2\u6CE8\u518C\u5B57\u4F53\u65E0\u6CD5\u52A0\u8F7D",Done:"\u5B8C\u6210","Git views":"Git \u89C6\u56FE","Detached HEAD":"\u5206\u79BB\u7684 HEAD","Branch name":"\u5206\u652F\u540D\u79F0","No commits yet":"\u5C1A\u65E0\u63D0\u4EA4","Changed files":"\u66F4\u6539\u7684\u6587\u4EF6","Filter by path":"\u6309\u8DEF\u5F84\u7B5B\u9009",Conflicts:"\u51B2\u7A81",Unstaged:"\u672A\u6682\u5B58",Staged:"\u5DF2\u6682\u5B58",Conflict:"\u51B2\u7A81",Untracked:"\u672A\u8DDF\u8E2A",Deleted:"\u5DF2\u5220\u9664",Renamed:"\u5DF2\u91CD\u547D\u540D","Type changed":"\u7C7B\u578B\u5DF2\u66F4\u6539",Changed:"\u5DF2\u66F4\u6539","View diff for {path}":"\u67E5\u770B {path} \u7684\u5DEE\u5F02","File diff":"\u6587\u4EF6\u5DEE\u5F02","No text changes":"\u6CA1\u6709\u6587\u672C\u5DEE\u5F02","Binary file":"\u4E8C\u8FDB\u5236\u6587\u4EF6","File too large to preview":"\u6587\u4EF6\u8FC7\u5927\uFF0C\u65E0\u6CD5\u9884\u89C8","Showing the beginning of this diff.":"\u4EC5\u663E\u793A\u5DEE\u5F02\u7684\u5F00\u5934\u90E8\u5206\u3002","Mark resolved":"\u6807\u8BB0\u4E3A\u5DF2\u89E3\u51B3","Loading diff\u2026":"\u6B63\u5728\u52A0\u8F7D\u5DEE\u5F02\u2026","Show more files":"\u663E\u793A\u66F4\u591A\u6587\u4EF6","No matching files":"\u6CA1\u6709\u5339\u914D\u7684\u6587\u4EF6","Clear filter":"\u6E05\u9664\u7B5B\u9009","Check the updated changes and try again.":"\u66F4\u6539\u5DF2\u66F4\u65B0\u3002\u8BF7\u786E\u8BA4\u6700\u65B0\u5185\u5BB9\u540E\u91CD\u8BD5\u3002","Another Git operation is in progress. Try again shortly.":"\u5176\u4ED6 Git \u64CD\u4F5C\u6B63\u5728\u8FDB\u884C\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002","Loading repository\u2026":"\u6B63\u5728\u52A0\u8F7D\u4ED3\u5E93\u2026","Staged {path}":"\u5DF2\u6682\u5B58 {path}","Unstaged {path}":"\u5DF2\u53D6\u6D88\u6682\u5B58 {path}","Commit created":"\u5DF2\u521B\u5EFA\u63D0\u4EA4","Committed locally. Check the current branch before pushing.":"\u5DF2\u5728\u672C\u5730\u63D0\u4EA4\uFF0C\u8BF7\u786E\u8BA4\u5F53\u524D\u5206\u652F\u540E\u518D\u63A8\u9001\u3002","Changes stashed":"\u5DF2\u8D2E\u85CF\u66F4\u6539","Stash restored":"\u5DF2\u6062\u590D\u8D2E\u85CF","Pull complete":"\u5DF2\u5B8C\u6210\u62C9\u53D6","Push complete":"\u5DF2\u5B8C\u6210\u63A8\u9001","Pull request created":"\u5DF2\u521B\u5EFA\u62C9\u53D6\u8BF7\u6C42","Pull request updated":"\u5DF2\u66F4\u65B0\u62C9\u53D6\u8BF7\u6C42","Pull request merged":"\u5DF2\u5408\u5E76\u62C9\u53D6\u8BF7\u6C42","Commit and push":"\u63D0\u4EA4\u5E76\u63A8\u9001","Commit only":"\u4EC5\u63D0\u4EA4","Commit options":"\u63D0\u4EA4\u9009\u9879","Committed locally. Push failed: {error}":"\u5DF2\u5728\u672C\u5730\u63D0\u4EA4\u3002\u63A8\u9001\u5931\u8D25\uFF1A{error}","Fetch failed: {error}":"\u65E0\u6CD5\u83B7\u53D6\u8FDC\u7A0B\u66F4\u65B0\uFF1A{error}",Commit:"\u63D0\u4EA4","{count} staged":"\u5DF2\u6682\u5B58 {count} \u4E2A\u6587\u4EF6","Resolve and stage conflicted files before committing.":"\u63D0\u4EA4\u524D\u8BF7\u5148\u89E3\u51B3\u51B2\u7A81\u5E76\u6682\u5B58\u76F8\u5173\u6587\u4EF6\u3002",Synchronization:"\u8FDC\u7A0B\u540C\u6B65","Up to date":"\u5DF2\u540C\u6B65","{count} ahead":"\u9886\u5148 {count} \u4E2A\u63D0\u4EA4","{count} behind":"\u843D\u540E {count} \u4E2A\u63D0\u4EA4","No upstream branch":"\u672A\u8BBE\u7F6E\u4E0A\u6E38\u5206\u652F",Pull:"\u62C9\u53D6","A clean working tree is required to pull.":"\u62C9\u53D6\u524D\u9700\u8981\u6E05\u7406\u5DE5\u4F5C\u533A\u66F4\u6539\u3002",Stash:"\u8D2E\u85CF","Commit your changes before restoring the stash.":"\u6062\u590D\u8D2E\u85CF\u524D\u8BF7\u5148\u63D0\u4EA4\u5F53\u524D\u66F4\u6539\u3002","No pull requests":"\u6682\u65E0\u62C9\u53D6\u8BF7\u6C42","This workspace has no pull request provider.":"\u6B64\u5DE5\u4F5C\u533A\u672A\u914D\u7F6E\u62C9\u53D6\u8BF7\u6C42\u63D0\u4F9B\u65B9\u3002","Pull requests could not be loaded.":"\u65E0\u6CD5\u52A0\u8F7D\u62C9\u53D6\u8BF7\u6C42\u3002","Loading pull requests\u2026":"\u6B63\u5728\u52A0\u8F7D\u62C9\u53D6\u8BF7\u6C42\u2026","This workspace returns staged and unstaged changes together.":"\u6B64\u5DE5\u4F5C\u533A\u5408\u5E76\u663E\u793A\u5DF2\u6682\u5B58\u548C\u672A\u6682\u5B58\u7684\u5DEE\u5F02\u3002","Open in {provider}":"\u5728 {provider} \u4E2D\u6253\u5F00","Review status unavailable":"\u65E0\u6CD5\u83B7\u53D6\u8BC4\u5BA1\u72B6\u6001","PR head":"PR \u63D0\u4EA4","Open #{number} in {provider}":"\u5728 {provider} \u4E2D\u6253\u5F00 #{number}","Review required":"\u7B49\u5F85\u8BC4\u5BA1",Approved:"\u5DF2\u6279\u51C6","Changes requested":"\u5DF2\u8BF7\u6C42\u66F4\u6539",Open:"\u5F85\u5408\u5E76",Merged:"\u5DF2\u5408\u5E76",Closed:"\u5DF2\u5173\u95ED","Pull request state":"\u62C9\u53D6\u8BF7\u6C42\u72B6\u6001","All states":"\u6240\u6709\u72B6\u6001","No pull requests match this state.":"\u6CA1\u6709\u6B64\u72B6\u6001\u7684\u62C9\u53D6\u8BF7\u6C42\u3002","Source branch: {branch}":"\u6E90\u5206\u652F\uFF1A{branch}","Push the source branch and choose a different base branch.":"\u8BF7\u63A8\u9001\u6E90\u5206\u652F\uFF0C\u5E76\u9009\u62E9\u53E6\u4E00\u4E2A\u5206\u652F\u4F5C\u4E3A\u76EE\u6807\u3002","This pull request changed. Reset edits to load the latest version.":"\u62C9\u53D6\u8BF7\u6C42\u5DF2\u66F4\u65B0\u3002\u8BF7\u91CD\u7F6E\u7F16\u8F91\u4EE5\u52A0\u8F7D\u6700\u65B0\u7248\u672C\u3002","New pull request":"\u65B0\u5EFA\u62C9\u53D6\u8BF7\u6C42","Create a commit on a branch before opening a pull request.":"\u8BF7\u5148\u5728\u5206\u652F\u4E0A\u63D0\u4EA4\uFF0C\u518D\u521B\u5EFA\u62C9\u53D6\u8BF7\u6C42\u3002","No description":"\u6682\u65E0\u8BF4\u660E","Edit details":"\u7F16\u8F91\u6807\u9898\u548C\u8BF4\u660E","Mark this draft ready in the review before merging.":"\u5408\u5E76\u524D\u8BF7\u5728\u8BC4\u5BA1\u9875\u9762\u5C06\u8349\u7A3F\u6807\u8BB0\u4E3A\u53EF\u4F9B\u8BC4\u5BA1\u3002","Review submitted":"\u5DF2\u63D0\u4EA4\u8BC4\u5BA1","Files changed":"\u53D8\u66F4\u6587\u4EF6","Open the provider review to inspect this file.":"\u8BF7\u5728\u63D0\u4F9B\u65B9\u7684\u8BC4\u5BA1\u9875\u9762\u67E5\u770B\u6B64\u6587\u4EF6\u3002","Open the provider review for the remaining files.":"\u8BF7\u5728\u63D0\u4F9B\u65B9\u7684\u8BC4\u5BA1\u9875\u9762\u67E5\u770B\u5176\u4F59\u6587\u4EF6\u3002","No changed files":"\u6CA1\u6709\u53D8\u66F4\u6587\u4EF6","Page {number}":"\u7B2C {number} \u9875","Review decision":"\u8BC4\u5BA1\u7ED3\u8BBA",Comment:"\u8BC4\u8BBA",Approve:"\u6279\u51C6","Request changes":"\u8BF7\u6C42\u66F4\u6539","Review comment":"\u8BC4\u5BA1\u610F\u89C1","Submit review":"\u63D0\u4EA4\u8BC4\u5BA1","Write a review":"\u64B0\u5199\u8BC4\u5BA1","The pull request changed while you were writing this review.":"\u64B0\u5199\u8BC4\u5BA1\u671F\u95F4\uFF0C\u62C9\u53D6\u8BF7\u6C42\u5DF2\u66F4\u65B0\u3002","Review latest revision":"\u6539\u4E3A\u8BC4\u5BA1\u6700\u65B0\u7248\u672C","Merge #{number} ({commit}) into {base} using {method}?":"\u4F7F\u7528 {method} \u5C06 #{number} \u7684 {commit} \u5408\u5E76\u5230 {base}\uFF1F","Git operation failed":"Git \u64CD\u4F5C\u5931\u8D25","Create pull request":"\u521B\u5EFA\u62C9\u53D6\u8BF7\u6C42","Base branch":"\u76EE\u6807\u5206\u652F",Draft:"\u8349\u7A3F","Open pull request":"\u6253\u5F00\u62C9\u53D6\u8BF7\u6C42","Merge method":"\u5408\u5E76\u65B9\u5F0F","Merge pull request":"\u5408\u5E76\u62C9\u53D6\u8BF7\u6C42","Merge #{number} into {base} using {method}?":"\u5C06 #{number} \u4EE5 {method} \u65B9\u5F0F\u5408\u5E76\u5230 {base}\uFF1F","Reset edits":"\u91CD\u7F6E\u7F16\u8F91","Discard these pull request edits?":"\u653E\u5F03\u6B64\u62C9\u53D6\u8BF7\u6C42\u7684\u672A\u4FDD\u5B58\u7F16\u8F91\uFF1F",Branch:"\u5206\u652F","Switch branch":"\u5207\u6362\u5206\u652F","New branch":"\u65B0\u5206\u652F","Create branch":"\u521B\u5EFA\u5206\u652F","Commit {manifest} before creating a branch.":"\u521B\u5EFA\u5206\u652F\u524D\uFF0C\u8BF7\u5148\u63D0\u4EA4 {manifest}\u3002","This branch does not contain {manifest} at the same path.":"\u6B64\u5206\u652F\u7684\u76F8\u540C\u8DEF\u5F84\u4E0B\u6CA1\u6709 {manifest}\u3002","New branches start from the latest commit. Unsaved changes stay in the current workspace.":"\u65B0\u5206\u652F\u4ECE\u6700\u65B0\u63D0\u4EA4\u521B\u5EFA\u3002\u672A\u4FDD\u5B58\u7684\u66F4\u6539\u4F1A\u4FDD\u7559\u5728\u5F53\u524D\u5DE5\u4F5C\u533A\u3002",Changes:"\u66F4\u6539",Stage:"\u6682\u5B58",Unstage:"\u53D6\u6D88\u6682\u5B58","Working tree clean":"\u5DE5\u4F5C\u533A\u65E0\u66F4\u6539","Commit message":"\u63D0\u4EA4\u8BF4\u660E",Fetch:"\u83B7\u53D6","Pull (fast-forward)":"\u62C9\u53D6 (fast-forward)",Push:"\u63A8\u9001","Connect an origin provider from the reader module to enable remote operations.":"\u901A\u8FC7\u5916\u90E8 reader \u6A21\u5757\u8FDE\u63A5 origin \u4EE5\u542F\u7528\u8FDC\u7A0B\u64CD\u4F5C\u3002","Pull requests":"\u62C9\u53D6\u8BF7\u6C42","No open pull requests":"\u6CA1\u6709\u5F85\u5904\u7406\u7684\u62C9\u53D6\u8BF7\u6C42",Description:"\u8BF4\u660E","Operation completed, but reload failed: {error}":"\u64CD\u4F5C\u5DF2\u5B8C\u6210\uFF0C\u4F46\u91CD\u65B0\u52A0\u8F7D\u5931\u8D25\uFF1A{error}","Stash is occupied. Commit the current changes before switching branches.":"\u6682\u5B58\u69FD\u5DF2\u5360\u7528\uFF0C\u8BF7\u5148\u63D0\u4EA4\u5F53\u524D\u66F4\u6539\u518D\u5207\u6362\u5206\u652F\u3002","Stash saved changes and switch to {branch}?":"\u5C06\u5DF2\u4FDD\u5B58\u6587\u4EF6\u7684\u66F4\u6539\u5B58\u5165 stash \u5E76\u5207\u6362\u5230 {branch}\uFF1F","Stash and switch":"\u6682\u5B58\u5E76\u5207\u6362","Create the first commit to switch branches.":"\u521B\u5EFA\u9996\u6B21\u63D0\u4EA4\u540E\u5373\u53EF\u5207\u6362\u5206\u652F\u3002","Stash \xB7 empty":"Stash \xB7 \u7A7A","Restore stash":"\u6062\u590D stash","Stash changes":"\u6682\u5B58\u66F4\u6539",Library:"\u8D44\u6599\u5E93",Subformats:"Subformats","Expand card":"\u5C55\u5F00\u5361\u7247","Collapse card":"\u6298\u53E0\u5361\u7247","View details":"\u67E5\u770B\u8BE6\u60C5","Click for details; double-click to edit":"\u5355\u51FB\u67E5\u770B\u8BE6\u60C5\uFF1B\u53CC\u51FB\u7F16\u8F91","No grouping":"\u4E0D\u5206\u7EC4",Ascending:"\u5347\u5E8F",Descending:"\u964D\u5E8F","No subformats configured. Add subformats to dooc.yaml.":"\u5C1A\u672A\u914D\u7F6E\u5B50\u683C\u5F0F\u3002\u8BF7\u5728 dooc.yaml \u4E2D\u6DFB\u52A0 subformats\u3002","Workspace tools":"\u5DE5\u4F5C\u533A\u5DE5\u5177","Git controls":"Git \u64CD\u4F5C",Actions:"\u64CD\u4F5C",Updated:"\u5DF2\u66F4\u65B0",Copy:"\u590D\u5236",Edit:"\u7F16\u8F91","Reload actions before saving again.":"\u518D\u6B21\u4FDD\u5B58\u524D\u8BF7\u91CD\u65B0\u52A0\u8F7D\u3002","Saved, but refresh failed. Reload actions before saving again.":"\u4FDD\u5B58\u5DF2\u5B8C\u6210\uFF0C\u4F46\u5237\u65B0\u5931\u8D25\u3002\u518D\u6B21\u4FDD\u5B58\u524D\u8BF7\u91CD\u65B0\u52A0\u8F7D\u3002","Actions could not be loaded.":"\u65E0\u6CD5\u52A0\u8F7D\u64CD\u4F5C\u3002","An open draft is no longer editable. Copy or cancel it before reloading.":"\u6B63\u5728\u7F16\u8F91\u7684\u8349\u7A3F\u5DF2\u65E0\u6CD5\u4FEE\u6539\u3002\u91CD\u65B0\u52A0\u8F7D\u524D\u8BF7\u590D\u5236\u6216\u53D6\u6D88\u8349\u7A3F\u3002","Changed elsewhere. Your input is kept; edit again to apply it.":"\u5185\u5BB9\u5DF2\u5728\u5176\u4ED6\u4F4D\u7F6E\u66F4\u6539\u3002\u5DF2\u4FDD\u7559\u8F93\u5165\uFF0C\u518D\u6B21\u7F16\u8F91\u5373\u53EF\u5E94\u7528\u3002",Plugins:"\u63D2\u4EF6","Add plugins":"\u6DFB\u52A0\u63D2\u4EF6","Plugins are saved in this browser. Run server plugins in a local dooc editor.":"\u63D2\u4EF6\u4FDD\u5B58\u5728\u6B64\u6D4F\u89C8\u5668\u4E2D\u3002\u670D\u52A1\u5668\u63D2\u4EF6\u9700\u5728\u672C\u5730 dooc \u7F16\u8F91\u5668\u4E2D\u8FD0\u884C\u3002","Drag and drop here, or click to browse.":"\u62D6\u653E\u5230\u6B64\u5904\uFF0C\u6216\u70B9\u51FB\u9009\u62E9\u3002","Invalid package":"\u65E0\u6548\u5305","Browser storage":"\u6D4F\u89C8\u5668\u5B58\u50A8",Enabled:"\u5DF2\u542F\u7528",Disabled:"\u5DF2\u7981\u7528",Enable:"\u542F\u7528",Disable:"\u7981\u7528","Delete plugin {name}?":"\u5220\u9664\u63D2\u4EF6 {name}\uFF1F","Replace plugin {name}?":"\u66FF\u6362\u63D2\u4EF6 {name}\uFF1F","Discard plugin changes?":"\u653E\u5F03\u672A\u5E94\u7528\u7684\u63D2\u4EF6\u66F4\u6539\uFF1F","Plugin file":"\u63D2\u4EF6\u6587\u4EF6","Apply changes":"\u5E94\u7528\u66F4\u6539","Binary asset \u2014 replace it by importing a new ZIP.":"\u4E8C\u8FDB\u5236\u8D44\u6E90\u3002\u5BFC\u5165\u65B0 ZIP \u4EE5\u66FF\u6362\u3002","Choose a ZIP smaller than 16 MiB":"\u8BF7\u9009\u62E9\u4E0D\u8D85\u8FC7 16 MiB \u7684 ZIP","Sign in":"\u767B\u5F55","Sign out":"\u9000\u51FA\u767B\u5F55","Not signed in":"\u672A\u767B\u5F55","Continue login":"\u7EE7\u7EED\u767B\u5F55","Provided by reader":"\u7531\u9605\u8BFB\u5668\u63D0\u4F9B",Added:"\u65B0\u589E",Modified:"\u4FEE\u6539",Relations:"\u5173\u7CFB\u56FE","Add subformat\u2026":"\u6DFB\u52A0\u5B50\u683C\u5F0F\u2026",Delete:"\u5220\u9664","Delete subformat {ext} and its sidebar page? Records and schema files will be kept.":"\u5220\u9664\u5B50\u683C\u5F0F {ext} \u53CA\u5176\u4FA7\u8FB9\u680F\u9875\u9762\uFF1F\u8BB0\u5F55\u548C\u6A21\u5F0F\u6587\u4EF6\u5C06\u4FDD\u7559\u3002","Subformat changed externally. Reload and try again.":"\u5B50\u683C\u5F0F\u5DF2\u88AB\u5916\u90E8\u4FEE\u6539\u3002\u8BF7\u91CD\u65B0\u52A0\u8F7D\u540E\u91CD\u8BD5\u3002","Move or remove this subformat page's child pages before deleting it.":"\u5220\u9664\u524D\uFF0C\u8BF7\u5148\u79FB\u52A8\u6216\u5220\u9664\u6B64\u5B50\u683C\u5F0F\u9875\u9762\u7684\u5B50\u9875\u9762\u3002","Add subformat":"\u6DFB\u52A0\u5B50\u683C\u5F0F",Extension:"\u6269\u5C55\u540D","Storage format":"\u5B58\u50A8\u683C\u5F0F","Schema file (optional)":"\u6A21\u5F0F\u6587\u4EF6\uFF08\u53EF\u9009\uFF09","Create automatically":"\u81EA\u52A8\u521B\u5EFA",Form:"\u8868\u5355","Enter a valid number.":"\u8BF7\u8F93\u5165\u6709\u6548\u7684\u6570\u503C\u3002","Value editing mode":"\u503C\u7F16\u8F91\u6A21\u5F0F","{format} text":"{format}\u6587\u672C","Schema editing mode":"\u6A21\u5F0F\u7F16\u8F91\u65B9\u5F0F","JSON text":"JSON text","Build kit":"Build kit","Field settings":"\u5B57\u6BB5\u8BBE\u7F6E","Field name":"\u5B57\u6BB5\u540D\u79F0","New field name":"\u65B0\u5B57\u6BB5\u540D\u79F0","New field type":"\u65B0\u5B57\u6BB5\u7C7B\u578B","Remove field":"\u5220\u9664\u5B57\u6BB5","Add field":"\u6DFB\u52A0\u5B57\u6BB5",Required:"\u5FC5\u586B",Optional:"\u53EF\u9009","No values allowed":"\u4E0D\u5141\u8BB8\u4EFB\u4F55\u503C","Recursive reference":"\u9012\u5F52\u5F15\u7528","Allow extra fields":"\u5141\u8BB8\u989D\u5916\u5B57\u6BB5","Schema settings":"\u6A21\u5F0F\u8BBE\u7F6E","Remove nested fields before changing the type.":"\u66F4\u6539\u7C7B\u578B\u524D\uFF0C\u8BF7\u5148\u5220\u9664\u5D4C\u5957\u5B57\u6BB5\u3002","Any type":"\u4EFB\u610F\u7C7B\u578B",'One choice per line. Use "" for empty text, "a\\nb" for multiline text, and JSON for other types.':'\u6BCF\u884C\u4E00\u4E2A\u9009\u9879\u3002\u7A7A\u6587\u672C\u7528 ""\uFF0C\u591A\u884C\u6587\u672C\u7528 "a\\nb"\uFF0C\u5176\u4ED6\u7C7B\u578B\u7528JSON\u3002',"Enter at least one choice.":"\u8BF7\u81F3\u5C11\u8F93\u5165\u4E00\u4E2A\u9009\u9879\u3002","Enter a non-empty JSON array of schemas.":"\u8BF7\u8F93\u5165\u81F3\u5C11\u5305\u542B\u4E00\u4E2A\u6A21\u5F0F\u7684JSON\u6570\u7EC4\u3002","Enter a JSON schema object or boolean.":"\u8BF7\u8F93\u5165JSON\u6A21\u5F0F\u5BF9\u8C61\u6216\u5E03\u5C14\u503C\u3002","Enter an object containing named schemas.":"\u8BF7\u8F93\u5165\u5305\u542B\u547D\u540D\u6A21\u5F0F\u7684\u5BF9\u8C61\u3002","The constant must match the field type.":"\u5E38\u91CF\u5FC5\u987B\u7B26\u5408\u5B57\u6BB5\u7C7B\u578B\u3002","Change existing choices or defaults before changing the type.":"\u66F4\u6539\u7C7B\u578B\u524D\uFF0C\u8BF7\u5148\u4FEE\u6539\u73B0\u6709\u9009\u9879\u6216\u9ED8\u8BA4\u503C\u3002","Choices (one per line)":"\u9009\u9879\uFF08\u6BCF\u884C\u4E00\u4E2A\uFF09","Item type":"\u6570\u7EC4\u9879\u7C7B\u578B","Rename linked fields in JSON text.":"\u8BF7\u5728JSON text\u4E2D\u91CD\u547D\u540D\u5173\u8054\u5B57\u6BB5\u3002","Additional rules are preserved in JSON text.":"\u5176\u4ED6\u89C4\u5219\u4FDD\u7559\u5728JSON text\u4E2D\u3002","Enter a field name.":"\u8BF7\u8F93\u5165\u5B57\u6BB5\u540D\u79F0\u3002","Enter a unique field name.":"\u8BF7\u8F93\u5165\u552F\u4E00\u7684\u5B57\u6BB5\u540D\u79F0\u3002","A field with this name already exists.":"\u5DF2\u5B58\u5728\u540C\u540D\u5B57\u6BB5\u3002","Each choice must match the field type.":"\u6BCF\u4E2A\u9009\u9879\u5FC5\u987B\u7B26\u5408\u5B57\u6BB5\u7C7B\u578B\u3002","Choices must be unique.":"\u9009\u9879\u4E0D\u80FD\u91CD\u590D\u3002","Enter a value greater than {minimum}.":"\u8BF7\u8F93\u5165\u5927\u4E8E{minimum}\u7684\u503C\u3002","Page type":"\u9875\u9762\u7C7B\u578B","Markdown page":"Markdown \u9875\u9762","No subformats available to add.":"\u6CA1\u6709\u53EF\u6DFB\u52A0\u7684\u5B50\u683C\u5F0F\u3002","Already added":"\u5DF2\u6DFB\u52A0","Add page":"\u6DFB\u52A0\u9875\u9762","Remove page":"\u79FB\u9664\u9875\u9762","Rename page":"\u91CD\u547D\u540D\u9875\u9762","Remove this page from the sidebar? The records will be kept.":"\u4ECE\u4FA7\u8FB9\u680F\u79FB\u9664\u6B64\u9875\u9762\uFF1F\u8BB0\u5F55\u5C06\u88AB\u4FDD\u7559\u3002",Parameters:"\u53C2\u6570","Parameter order":"\u53C2\u6570\u987A\u5E8F",Items:"\u6570\u7EC4\u5143\u7D20","Remove parameter":"\u79FB\u9664\u53C2\u6570","Check the parameter value.":"\u8BF7\u68C0\u67E5\u53C2\u6570\u503C\u3002","Download PDF":"\u4E0B\u8F7D PDF","Choose date":"\u9009\u62E9\u65E5\u671F","Previous month":"\u4E0A\u4E2A\u6708","Next month":"\u4E0B\u4E2A\u6708",Today:"\u4ECA\u5929",Clear:"\u6E05\u9664","Enter a valid date (YYYY-MM-DD).":"\u8BF7\u8F93\u5165\u6709\u6548\u65E5\u671F\uFF08YYYY-MM-DD\uFF09\u3002","Preview unavailable":"\u65E0\u6CD5\u52A0\u8F7D\u9884\u89C8",History:"\u5386\u53F2","Snapshot message":"\u5FEB\u7167\u8BF4\u660E",Restore:"\u6062\u590D","No snapshots yet":"\u6682\u65E0\u5FEB\u7167","Save snapshot":"\u4FDD\u5B58\u5FEB\u7167","Restore every file to this snapshot?":"\u5C06\u6240\u6709\u6587\u4EF6\u6062\u590D\u5230\u6B64\u5FEB\u7167\u7684\u72B6\u6001\u5417\uFF1F","Your name":"\u60A8\u7684\u59D3\u540D","Email (optional)":"\u7535\u5B50\u90AE\u4EF6\uFF08\u53EF\u9009\uFF09","Shared workspace":"\u5171\u4EAB\u5DE5\u4F5C\u533A",Join:"\u52A0\u5165",View:"\u89C6\u56FE",Cards:"\u5361\u7247",List:"\u5217\u8868","SVG icon":"SVG \u56FE\u6807","SVG icon path":"SVG \u56FE\u6807\u8DEF\u5F84","SVG icon path (optional)":"SVG \u56FE\u6807\u8DEF\u5F84\uFF08\u53EF\u9009\uFF09","Leave empty to remove. New Pages entries copy this path; existing pages keep their own icon.":"\u7559\u7A7A\u53EF\u79FB\u9664\u3002\u65B0\u6DFB\u52A0\u7684 Pages \u9875\u9762\u4F1A\u590D\u5236\u6B64\u8DEF\u5F84\uFF0C\u73B0\u6709\u9875\u9762\u4FDD\u7559\u5404\u81EA\u7684\u56FE\u6807\u3002","Search records":"\u641C\u7D22\u8BB0\u5F55",Fields:"\u663E\u793A\u5B57\u6BB5",Filters:"\u7B5B\u9009",Field:"\u5B57\u6BB5",Operator:"\u6761\u4EF6",Value:"\u503C","Match all conditions":"\u5339\u914D\u6240\u6709\u6761\u4EF6","Add filter":"\u6DFB\u52A0\u6761\u4EF6","Apply filters":"\u5E94\u7528\u7B5B\u9009","Remove filter":"\u5220\u9664\u6761\u4EF6","Comma-separated values":"\u7528\u9017\u53F7\u5206\u9694\u7684\u503C",Equals:"\u7B49\u4E8E","Does not equal":"\u4E0D\u7B49\u4E8E",Contains:"\u5305\u542B","Is one of":"\u5339\u914D\u4EFB\u610F\u503C","Greater than":"\u5927\u4E8E","At least":"\u5927\u4E8E\u6216\u7B49\u4E8E","Less than":"\u5C0F\u4E8E","At most":"\u5C0F\u4E8E\u6216\u7B49\u4E8E","Is empty":"\u4E3A\u7A7A","Open externally?":"\u5728\u5916\u90E8\u6253\u5F00\uFF1F","Open externally":"\u5728\u5916\u90E8\u6253\u5F00","Open this website in a new tab?":"\u5728\u65B0\u6807\u7B7E\u9875\u4E2D\u6253\u5F00\u6B64\u7F51\u7AD9\uFF1F","Open this website externally to view it.":"\u8BF7\u5728\u5916\u90E8\u6253\u5F00\u6B64\u7F51\u7AD9\u3002","This website could not be displayed here. Open it externally?":"\u65E0\u6CD5\u5728\u6B64\u663E\u793A\u8BE5\u7F51\u7AD9\u3002\u5728\u5916\u90E8\u6253\u5F00\uFF1F","This website has not loaded.":"\u6B64\u7F51\u7AD9\u5C1A\u672A\u52A0\u8F7D\u3002","This website could not be loaded.":"\u65E0\u6CD5\u52A0\u8F7D\u6B64\u7F51\u7AD9\u3002","Loading website\u2026":"\u6B63\u5728\u52A0\u8F7D\u7F51\u7AD9\u2026","Zoom in":"\u653E\u5927","Zoom out":"\u7F29\u5C0F","Reset zoom":"\u91CD\u7F6E\u7F29\u653E","Image preview":"\u56FE\u50CF\u9884\u89C8","Manifest editor":"\u6E05\u5355\u7F16\u8F91\u5668",Settings:"\u8BBE\u7F6E",Title:"\u6807\u9898","Add file":"\u6DFB\u52A0\u6587\u4EF6","Light and dark":"\u6D45\u8272\u548C\u6DF1\u8272",Automatic:"\u81EA\u52A8","Edit this legacy manifest in YAML.":"\u8BF7\u4F7F\u7528 YAML \u7F16\u8F91\u6B64\u65E7\u683C\u5F0F\u6E05\u5355\u3002","Manifest file is unavailable.":"\u65E0\u6CD5\u8BFB\u53D6\u6E05\u5355\u6587\u4EF6\u3002","Discard changes and reload the manifest?":"\u653E\u5F03\u66F4\u6539\u5E76\u91CD\u65B0\u52A0\u8F7D\u6E05\u5355\uFF1F","Load failed":"\u52A0\u8F7D\u5931\u8D25","Remove path":"\u79FB\u9664\u8DEF\u5F84","Add format":"\u6DFB\u52A0\u683C\u5F0F","Add folder":"\u6DFB\u52A0\u6587\u4EF6\u5939","Remove format":"\u79FB\u9664\u683C\u5F0F","Enter a new file extension":"\u8BF7\u8F93\u5165\u5C1A\u672A\u914D\u7F6E\u7684\u6269\u5C55\u540D","Could not load formats":"\u65E0\u6CD5\u52A0\u8F7D\u683C\u5F0F","Downloading\u2026":"\u6B63\u5728\u4E0B\u8F7D\u2026","Access denied.":"\u6CA1\u6709\u8BBF\u95EE\u6743\u9650\u3002","File unavailable.":"\u6587\u4EF6\u4E0D\u53EF\u7528\u3002","Download failed. Retry.":"\u4E0B\u8F7D\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5\u3002","Ask LLM":"\u8BE2\u95EE LLM","New chat":"\u65B0\u5EFA\u5BF9\u8BDD","Connections and API keys":"\u8FDE\u63A5\u4E0E API \u5BC6\u94A5",Connection:"\u8FDE\u63A5","Connection name":"\u8FDE\u63A5\u540D\u79F0",Provider:"\u670D\u52A1\u63D0\u4F9B\u5546",Endpoint:"\u7AEF\u70B9","Model ID":"\u6A21\u578B ID","API key":"API \u5BC6\u94A5","Inject API key":"\u6CE8\u5165 API \u5BC6\u94A5","Remember connections in this tab":"\u5728\u6B64\u6807\u7B7E\u9875\u4E2D\u8BB0\u4F4F\u8FDE\u63A5","Keys stay in memory unless you remember this tab. They are sent only to the selected provider, never to document files.":"\u9664\u975E\u9009\u62E9\u8BB0\u4F4F\uFF0C\u5BC6\u94A5\u4EC5\u4FDD\u7559\u5728\u5185\u5B58\u4E2D\u3002\u4EC5\u53D1\u9001\u7ED9\u6240\u9009\u670D\u52A1\u63D0\u4F9B\u5546\uFF0C\u4E0D\u4FDD\u5B58\u5230\u6587\u6863\u6587\u4EF6\u4E2D\u3002","Custom endpoints must allow browser requests.":"\u81EA\u5B9A\u4E49\u7AEF\u70B9\u5FC5\u987B\u5141\u8BB8\u6D4F\u89C8\u5668\u8BF7\u6C42\u3002","New connection":"\u65B0\u5EFA\u8FDE\u63A5",Conversation:"\u5BF9\u8BDD","Choose a connection and ask about a document, section, or file.":"\u9009\u62E9\u8FDE\u63A5\uFF0C\u8BE2\u95EE\u6587\u6863\u3001\u7AE0\u8282\u6216\u6587\u4EF6\u3002","Current document":"\u5F53\u524D\u6587\u6863","Selected lines":"\u6240\u9009\u884C","Selected context":"\u6240\u9009\u4E0A\u4E0B\u6587",Message:"\u6D88\u606F",References:"\u5F15\u7528\u5EFA\u8BAE","Only selected context and this conversation are sent. Ctrl+Enter to send.":"\u4EC5\u53D1\u9001\u6240\u9009\u4E0A\u4E0B\u6587\u548C\u6B64\u5BF9\u8BDD\u3002\u6309 Ctrl+Enter \u53D1\u9001\u3002",Send:"\u53D1\u9001","Add a connection to start.":"\u8BF7\u5148\u6DFB\u52A0\u8FDE\u63A5\u3002","Key injection on":"\u5BC6\u94A5\u6CE8\u5165\u5DF2\u5F00\u542F","Key injection off":"\u5BC6\u94A5\u6CE8\u5165\u5DF2\u5173\u95ED",characters:"\u5B57\u7B26","Sent context":"\u5DF2\u53D1\u9001\u7684\u4E0A\u4E0B\u6587",You:"\u4F60","Sending\u2026":"\u53D1\u9001\u4E2D\u2026",Cancelled:"\u5DF2\u53D6\u6D88","Ask about this context":"\u8BE2\u95EE\u6B64\u4E0A\u4E0B\u6587","Add to chat":"\u6DFB\u52A0\u5230\u5BF9\u8BDD","Open a source file or select lines first.":"\u8BF7\u5148\u6253\u5F00\u6E90\u6587\u4EF6\u6216\u9009\u62E9\u884C\u3002","Could not reach the provider. Check the connection and browser access.":"\u65E0\u6CD5\u8FDE\u63A5\u5230\u670D\u52A1\u3002\u8BF7\u68C0\u67E5\u8FDE\u63A5\u548C\u6D4F\u89C8\u5668\u8BBF\u95EE\u6743\u9650\u3002","Browser storage is unavailable. Connections are kept in memory.":"\u6D4F\u89C8\u5668\u5B58\u50A8\u4E0D\u53EF\u7528\u3002\u8FDE\u63A5\u5C06\u4FDD\u7559\u5728\u5185\u5B58\u4E2D\u3002","Saved connections could not be loaded. Add a connection again.":"\u65E0\u6CD5\u52A0\u8F7D\u5DF2\u4FDD\u5B58\u7684\u8FDE\u63A5\u3002\u8BF7\u91CD\u65B0\u6DFB\u52A0\u3002","The selected lines do not exist in the current editor.":"\u6307\u5B9A\u884C\u4E0D\u5B58\u5728\u4E8E\u5F53\u524D\u7F16\u8F91\u5668\u4E2D\u3002","Use a valid line reference such as @L36 or @L36-L48.":"\u8BF7\u4F7F\u7528 @L36 \u6216 @L36-L48 \u7B49\u6709\u6548\u884C\u5F15\u7528\u3002","Enable API key injection and enter a key for this connection.":"\u8BF7\u4E3A\u6B64\u8FDE\u63A5\u542F\u7528\u5BC6\u94A5\u6CE8\u5165\u5E76\u8F93\u5165 API \u5BC6\u94A5\u3002","The provider rejected access. Check the API key and model permissions.":"\u670D\u52A1\u62D2\u7EDD\u8BBF\u95EE\u3002\u8BF7\u68C0\u67E5 API \u5BC6\u94A5\u548C\u6A21\u578B\u6743\u9650\u3002","The provider rate limit was reached. Try again later.":"\u5DF2\u8FBE\u5230\u670D\u52A1\u8BF7\u6C42\u9650\u5236\u3002\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002","Context is too large. Select fewer files or lines.":"\u4E0A\u4E0B\u6587\u8FC7\u5927\u3002\u8BF7\u9009\u62E9\u66F4\u5C11\u7684\u6587\u4EF6\u6216\u884C\u3002","Conversation is too large. Start a new chat.":"\u5BF9\u8BDD\u8FC7\u957F\u3002\u8BF7\u5F00\u59CB\u65B0\u5BF9\u8BDD\u3002","Attach at most 16 context items per message.":"\u6BCF\u6761\u6D88\u606F\u6700\u591A\u9644\u52A0 16 \u4E2A\u4E0A\u4E0B\u6587\u9879\u76EE\u3002","Workspace changed. Start a new chat.":"\u5DE5\u4F5C\u533A\u5DF2\u66F4\u6539\u3002\u8BF7\u5F00\u59CB\u65B0\u5BF9\u8BDD\u3002","No matching files or skills.":"\u6CA1\u6709\u5339\u914D\u7684\u6587\u4EF6\u6216\u6280\u80FD\u3002","LLM chat":"LLM \u804A\u5929",Chat:"\u804A\u5929","Open chat":"\u6253\u5F00\u804A\u5929",Providers:"\u63D0\u4F9B\u5546","Add an API key":"\u6DFB\u52A0 API \u5BC6\u94A5","Remove API key":"\u5220\u9664 API \u5BC6\u94A5","Saved in this browser":"\u5DF2\u4FDD\u5B58\u5728\u6B64\u6D4F\u89C8\u5668","Saved in this browser. Sent only to the provider.":"\u4FDD\u5B58\u5728\u6B64\u6D4F\u89C8\u5668\uFF0C\u4EC5\u53D1\u9001\u7ED9\u6240\u9009\u63D0\u4F9B\u5546\u3002","Saved providers could not be loaded. Check browser storage.":"\u65E0\u6CD5\u52A0\u8F7D\u5DF2\u4FDD\u5B58\u7684\u63D0\u4F9B\u5546\uFF0C\u8BF7\u68C0\u67E5\u6D4F\u89C8\u5668\u5B58\u50A8\u3002","Could not save. Check browser storage and try again.":"\u65E0\u6CD5\u4FDD\u5B58\uFF0C\u8BF7\u68C0\u67E5\u6D4F\u89C8\u5668\u5B58\u50A8\u540E\u91CD\u8BD5\u3002","Enter a valid API key and model.":"\u8BF7\u8F93\u5165\u6709\u6548\u7684 API \u5BC6\u94A5\u548C\u6A21\u578B\u3002","Add an API key in Providers to start.":"\u8BF7\u5728\u63D0\u4F9B\u5546\u8BBE\u7F6E\u4E2D\u6DFB\u52A0 API \u5BC6\u94A5\u3002","Open section agent":"\u6253\u5F00\u7AE0\u8282\u667A\u80FD\u4F53",Agent:"\u667A\u80FD\u4F53","Move conversation":"\u79FB\u52A8\u5BF9\u8BDD","Move to sidebar":"\u79FB\u81F3\u4FA7\u680F","Message the agent":"\u5411\u667A\u80FD\u4F53\u53D1\u9001\u6307\u4EE4","Read and write":"\u8BFB\u53D6\u548C\u7F16\u8F91","Read only":"\u53EA\u8BFB","Section updated":"\u5DF2\u66F4\u65B0\u7AE0\u8282","Section read":"\u5DF2\u8BFB\u53D6\u7AE0\u8282","The source changed. Select the section again before editing.":"\u6E90\u6587\u4EF6\u5DF2\u66F4\u6539\u3002\u8BF7\u91CD\u65B0\u9009\u62E9\u8981\u7F16\u8F91\u7684\u7AE0\u8282\u3002","This section is read-only.":"\u6B64\u7AE0\u8282\u4E3A\u53EA\u8BFB\u3002","Read the section before editing it.":"\u8BF7\u5148\u8BFB\u53D6\u7AE0\u8282\u518D\u7F16\u8F91\u3002","Invalid section action.":"\u7AE0\u8282\u64CD\u4F5C\u65E0\u6548\u3002","The section could not be updated.":"\u65E0\u6CD5\u66F4\u65B0\u7AE0\u8282\u3002","Agent step limit reached. Review the changes and send a follow-up.":"\u667A\u80FD\u4F53\u5DF2\u8FBE\u5230\u64CD\u4F5C\u6B21\u6570\u4E0A\u9650\u3002\u8BF7\u68C0\u67E5\u66F4\u6539\u5E76\u53D1\u9001\u540E\u7EED\u6307\u4EE4\u3002","No section is selected for agent actions.":"\u5C1A\u672A\u9009\u62E9\u8981\u64CD\u4F5C\u7684\u7AE0\u8282\u3002","The provider returned invalid tool calls.":"\u63D0\u4F9B\u5546\u8FD4\u56DE\u4E86\u65E0\u6548\u7684\u5DE5\u5177\u8C03\u7528\u3002",Model:"\u6A21\u578B","API key missing":"\u672A\u8BBE\u7F6E API \u5BC6\u94A5","Model list unavailable. Using local choices.":"\u65E0\u6CD5\u83B7\u53D6\u6A21\u578B\u5217\u8868\u3002\u6B63\u5728\u4F7F\u7528\u672C\u5730\u9009\u9879\u3002","Enter to select; Ctrl+Enter to configure":"Enter \u9009\u62E9\uFF1BCtrl+Enter \u8BBE\u7F6E"};var rs={eng:Gr,jpn:Zo,zho:es},is=e=>{let n=e.toLowerCase().split("-")[0]??"en";return Object.keys(rs).find(t=>t===n||Ut[t]===n)??"eng"},rc=(e,n,t={})=>(rs[is(e)]?.[n]??Gr[n]??n).replace(/\{(\w+)\}/g,(i,o)=>Object.hasOwn(t,o)?String(t[o]):i),ts="docs:ui-language",Vt="eng",L=(e,n)=>rc(Vt,e,n),ns=()=>{for(let e of document.querySelectorAll("button.codecopy"))e.setAttribute("title",L("Copy code")),e.setAttribute("aria-label",L("Copy code"));for(let e of["text","title","aria-label","placeholder"]){let n=e==="text"?"data-i18n":`data-i18n-${e}`;for(let t of document.querySelectorAll(`[${n}]`)){let r=L(t.getAttribute(n)??"");e==="text"?t.textContent!==r&&(t.textContent=r):t.getAttribute(e)!==r&&t.setAttribute(e,r)}}},os=()=>{let e=document.querySelector("#ui-language"),n=navigator.language;try{n=localStorage.getItem(ts)||n}catch{}let t=r=>{Vt=is(r),e&&(e.value=Vt),document.documentElement.lang=Ut[Vt]??Vt,ns(),document.dispatchEvent(new Event("docs:ui-language"))};window.__docsTranslate=L,t(n),e?.addEventListener("change",()=>{t(e.value);try{localStorage.setItem(ts,Vt)}catch{}}),document.addEventListener("docs:ui-refresh",ns),Xo(L)};var be=e=>e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""");var Qe=e=>typeof e=="string"&&e.length>0&&!/[\\:?#]/.test(e)&&[...e].every(n=>n.charCodeAt(0)>=32)&&e.split("/").every(n=>!!n&&!n.startsWith("."));var ss=e=>{let n=e.split("/").pop()??e;return n.includes(".")?n.slice(n.lastIndexOf(".")+1).toLowerCase():"other"},as=e=>`files/${ss(e)}/${e.split("/").pop()}`;var Bn=Symbol.for("yaml.alias"),ls=Symbol.for("yaml.document"),Xe=Symbol.for("yaml.map"),Kr=Symbol.for("yaml.pair"),Gt=Symbol.for("yaml.scalar"),mt=Symbol.for("yaml.seq"),He=Symbol.for("yaml.node.type"),Ke=e=>!!e&&typeof e=="object"&&e[He]===Bn,Ze=e=>!!e&&typeof e=="object"&&e[He]===ls,et=e=>!!e&&typeof e=="object"&&e[He]===Xe,me=e=>!!e&&typeof e=="object"&&e[He]===Kr,de=e=>!!e&&typeof e=="object"&&e[He]===Gt,We=e=>!!e&&typeof e=="object"&&e[He]===mt;function we(e){if(e&&typeof e=="object")switch(e[He]){case Xe:case mt:return!0}return!1}function he(e){if(e&&typeof e=="object")switch(e[He]){case Bn:case Xe:case Gt:case mt:return!0}return!1}var Hn=e=>(de(e)||we(e))&&!!e.anchor;var qe=Symbol("break visit"),cs=Symbol("skip children"),tt=Symbol("remove node");function st(e,n){let t=us(n);Ze(e)?Kt(null,e.contents,t,Object.freeze([e]))===tt&&(e.contents=null):Kt(null,e,t,Object.freeze([]))}st.BREAK=qe;st.SKIP=cs;st.REMOVE=tt;function Kt(e,n,t,r){let i=ds(e,n,t,r);if(he(i)||me(i))return fs(e,r,i),Kt(e,i,t,r);if(typeof i!="symbol"){if(we(n)){r=Object.freeze(r.concat(n));for(let o=0;o<n.items.length;++o){let s=Kt(o,n.items[o],t,r);if(typeof s=="number")o=s-1;else{if(s===qe)return qe;s===tt&&(n.items.splice(o,1),o-=1)}}}else if(me(n)){r=Object.freeze(r.concat(n));let o=Kt("key",n.key,t,r);if(o===qe)return qe;o===tt&&(n.key=null);let s=Kt("value",n.value,t,r);if(s===qe)return qe;s===tt&&(n.value=null)}}return i}async function zn(e,n){let t=us(n);Ze(e)?await Wt(null,e.contents,t,Object.freeze([e]))===tt&&(e.contents=null):await Wt(null,e,t,Object.freeze([]))}zn.BREAK=qe;zn.SKIP=cs;zn.REMOVE=tt;async function Wt(e,n,t,r){let i=await ds(e,n,t,r);if(he(i)||me(i))return fs(e,r,i),Wt(e,i,t,r);if(typeof i!="symbol"){if(we(n)){r=Object.freeze(r.concat(n));for(let o=0;o<n.items.length;++o){let s=await Wt(o,n.items[o],t,r);if(typeof s=="number")o=s-1;else{if(s===qe)return qe;s===tt&&(n.items.splice(o,1),o-=1)}}}else if(me(n)){r=Object.freeze(r.concat(n));let o=await Wt("key",n.key,t,r);if(o===qe)return qe;o===tt&&(n.key=null);let s=await Wt("value",n.value,t,r);if(s===qe)return qe;s===tt&&(n.value=null)}}return i}function us(e){return typeof e=="object"&&(e.Collection||e.Node||e.Value)?Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e):e}function ds(e,n,t,r){if(typeof t=="function")return t(e,n,r);if(et(n))return t.Map?.(e,n,r);if(We(n))return t.Seq?.(e,n,r);if(me(n))return t.Pair?.(e,n,r);if(de(n))return t.Scalar?.(e,n,r);if(Ke(n))return t.Alias?.(e,n,r)}function fs(e,n,t){let r=n[n.length-1];if(we(r))r.items[e]=t;else if(me(r))e==="key"?r.key=t:r.value=t;else if(Ze(r))r.contents=t;else{let i=Ke(r)?"alias":"scalar";throw new Error(`Cannot replace node with ${i} parent`)}}var ic={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},oc=e=>e.replace(/[!,[\]{}]/g,n=>ic[n]),Yt=class e{constructor(n,t){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},e.defaultYaml,n),this.tags=Object.assign({},e.defaultTags,t)}clone(){let n=new e(this.yaml,this.tags);return n.docStart=this.docStart,n}atDocument(){let n=new e(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:e.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},e.defaultTags);break}return n}add(n,t){this.atNextDocument&&(this.yaml={explicit:e.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},e.defaultTags),this.atNextDocument=!1);let r=n.trim().split(/[ \t]+/),i=r.shift();switch(i){case"%TAG":{if(r.length!==2&&(t(0,"%TAG directive should contain exactly two parts"),r.length<2))return!1;let[o,s]=r;return this.tags[o]=s,!0}case"%YAML":{if(this.yaml.explicit=!0,r.length!==1)return t(0,"%YAML directive should contain exactly one part"),!1;let[o]=r;if(o==="1.1"||o==="1.2")return this.yaml.version=o,!0;{let s=/^\d+\.\d+$/.test(o);return t(6,`Unsupported YAML version ${o}`,s),!1}}default:return t(0,`Unknown directive ${i}`,!0),!1}}tagName(n,t){if(n==="!")return"!";if(n[0]!=="!")return t(`Not a valid tag: ${n}`),null;if(n[1]==="<"){let s=n.slice(2,-1);return s==="!"||s==="!!"?(t(`Verbatim tags aren't resolved, so ${n} is invalid.`),null):(n[n.length-1]!==">"&&t("Verbatim tags must end with a >"),s)}let[,r,i]=n.match(/^(.*!)([^!]*)$/s);i||t(`The ${n} tag has no suffix`);let o=this.tags[r];if(o)try{return o+decodeURIComponent(i)}catch(s){return t(String(s)),null}return r==="!"?n:(t(`Could not resolve tag: ${n}`),null)}tagString(n){for(let[t,r]of Object.entries(this.tags))if(n.startsWith(r))return t+oc(n.substring(r.length));return n[0]==="!"?n:`!<${n}>`}toString(n){let t=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],r=Object.entries(this.tags),i;if(n&&r.length>0&&he(n.contents)){let o={};st(n.contents,(s,a)=>{he(a)&&a.tag&&(o[a.tag]=!0)}),i=Object.keys(o)}else i=[];for(let[o,s]of r)o==="!!"&&s==="tag:yaml.org,2002:"||(!n||i.some(a=>a.startsWith(s)))&&t.push(`%TAG ${o} ${s}`);return t.join(`
|
|
20
|
+
`)}};Yt.defaultYaml={explicit:!1,version:"1.2"};Yt.defaultTags={"!!":"tag:yaml.org,2002:"};function Un(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){let t=`Anchor must not contain whitespace or control characters: ${JSON.stringify(e)}`;throw new Error(t)}return!0}function Mt(e,n,t,r){if(r&&typeof r=="object")if(Array.isArray(r))for(let i=0,o=r.length;i<o;++i){let s=r[i],a=Mt(e,r,String(i),s);a===void 0?delete r[i]:a!==s&&(r[i]=a)}else if(r instanceof Map)for(let i of Array.from(r.keys())){let o=r.get(i),s=Mt(e,r,i,o);s===void 0?r.delete(i):s!==o&&r.set(i,s)}else if(r instanceof Set)for(let i of Array.from(r)){let o=Mt(e,r,i,i);o===void 0?r.delete(i):o!==i&&(r.delete(i),r.add(o))}else for(let[i,o]of Object.entries(r)){let s=Mt(e,r,i,o);s===void 0?delete r[i]:s!==o&&(r[i]=s)}return e.call(n,t,r)}function Ce(e,n,t){if(Array.isArray(e))return e.map((r,i)=>Ce(r,String(i),t));if(e&&typeof e.toJSON=="function"){if(!t||!Hn(e))return e.toJSON(n,t);let r={aliasCount:0,count:1,res:void 0};t.anchors.set(e,r),t.onCreate=o=>{r.res=o,delete t.onCreate};let i=e.toJSON(n,t);return t.onCreate&&t.onCreate(i),i}return typeof e=="bigint"&&!t?.keep?Number(e):e}var ht=class{constructor(n){Object.defineProperty(this,He,{value:n})}clone(){let n=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(n.range=this.range.slice()),n}toJS(n,{mapAsMap:t,maxAliasCount:r,onAnchor:i,reviver:o}={}){if(!Ze(n))throw new TypeError("A document argument is required");let s={anchors:new Map,doc:n,keep:!0,mapAsMap:t===!0,mapKeyWarned:!1,maxAliasCount:typeof r=="number"?r:100},a=Ce(this,"",s);if(typeof i=="function")for(let{count:l,res:u}of s.anchors.values())i(u,l);return typeof o=="function"?Mt(o,{"":a},"",a):a}};var Tt=class extends ht{constructor(n){super(Bn),this.source=n,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(n,t){if(t?.maxAliasCount===0)throw new ReferenceError("Alias resolution is disabled");let r;t?.aliasResolveCache?r=t.aliasResolveCache:(r=[],st(n,{Node:(o,s)=>{(Ke(s)||Hn(s))&&r.push(s)}}),t&&(t.aliasResolveCache=r));let i;for(let o of r){if(o===this)break;o.anchor===this.source&&(i=o)}if(i&&t){let{anchors:o,doc:s,maxAliasCount:a}=t,l=o.get(i);if(l||(Ce(i,null,t),l=o.get(i)),l?.res===void 0){let u="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(u)}if(a>=0&&(l.count+=1,l.aliasCount===0&&(l.aliasCount=Vn(s,i,o)),l.count*l.aliasCount>a)){let u="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(u)}}return i}toJSON(n,t){if(!t)return{source:this.source};let r=this.resolve(t.doc,t);if(!r){let i=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(i)}return t.anchors.get(r).res}toString(n,t,r){let i=`*${this.source}`;if(n){if(Un(this.source),n.options.verifyAliasOrder&&!n.anchors.has(this.source)){let o=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(o)}if(n.implicitKey)return`${i} `}return i}};function Vn(e,n,t){if(Ke(n)){let r=n.resolve(e),i=t&&r&&t.get(r);return i?i.count*i.aliasCount:0}else if(we(n)){let r=0;for(let i of n.items){let o=Vn(e,i,t);o>r&&(r=o)}return r}else if(me(n)){let r=Vn(e,n.key,t),i=Vn(e,n.value,t);return Math.max(r,i)}return 1}var Gn=e=>!e||typeof e!="function"&&typeof e!="object",re=class extends ht{constructor(n){super(Gt),this.value=n}toJSON(n,t){return t?.keep?this.value:Ce(this.value,n,t)}toString(){return String(this.value)}};re.BLOCK_FOLDED="BLOCK_FOLDED";re.BLOCK_LITERAL="BLOCK_LITERAL";re.PLAIN="PLAIN";re.QUOTE_DOUBLE="QUOTE_DOUBLE";re.QUOTE_SINGLE="QUOTE_SINGLE";var sc="tag:yaml.org,2002:";function ac(e,n,t){if(n){let r=t.filter(o=>o.tag===n),i=r.find(o=>!o.format)??r[0];if(!i)throw new Error(`Tag ${n} not found`);return i}return t.find(r=>r.identify?.(e)&&!r.format)}function pt(e,n,t){if(Ze(e)&&(e=e.contents),he(e))return e;if(me(e)){let d=t.schema[Xe].createNode?.(t.schema,null,t);return d.items.push(e),d}(e instanceof String||e instanceof Number||e instanceof Boolean||typeof BigInt<"u"&&e instanceof BigInt)&&(e=e.valueOf());let{aliasDuplicateObjects:r,onAnchor:i,onTagObj:o,schema:s,sourceObjects:a}=t,l;if(r&&e&&typeof e=="object"){if(l=a.get(e),l)return l.anchor??(l.anchor=i(e)),new Tt(l.anchor);l={anchor:null,node:null},a.set(e,l)}n?.startsWith("!!")&&(n=sc+n.slice(2));let u=ac(e,n,s.tags);if(!u){if(e&&typeof e.toJSON=="function"&&(e=e.toJSON()),!e||typeof e!="object"){let d=new re(e);return l&&(l.node=d),d}u=e instanceof Map?s[Xe]:Symbol.iterator in Object(e)?s[mt]:s[Xe]}o&&(o(u),delete t.onTagObj);let c=u?.createNode?u.createNode(t.schema,e,t):typeof u?.nodeClass?.from=="function"?u.nodeClass.from(t.schema,e,t):new re(e);return n?c.tag=n:u.default||(c.tag=u.tag),l&&(l.node=c),c}function Wr(e,n,t){let r=t;for(let i=n.length-1;i>=0;--i){let o=n[i];if(typeof o=="number"&&Number.isInteger(o)&&o>=0){let s=[];s[o]=r,r=s}else r=new Map([[o,r]])}return pt(r,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:e,sourceObjects:new Map})}var ms=e=>e==null||typeof e=="object"&&!!e[Symbol.iterator]().next().done,Jt=class extends ht{constructor(n,t){super(n),Object.defineProperty(this,"schema",{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(n){let t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return n&&(t.schema=n),t.items=t.items.map(r=>he(r)||me(r)?r.clone(n):r),this.range&&(t.range=this.range.slice()),t}addIn(n,t){if(ms(n))this.add(t);else{let[r,...i]=n,o=this.get(r,!0);if(we(o))o.addIn(i,t);else if(o===void 0&&this.schema)this.set(r,Wr(this.schema,i,t));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${i}`)}}deleteIn(n){let[t,...r]=n;if(r.length===0)return this.delete(t);let i=this.get(t,!0);if(we(i))return i.deleteIn(r);throw new Error(`Expected YAML collection at ${t}. Remaining path: ${r}`)}getIn(n,t){let[r,...i]=n,o=this.get(r,!0);return i.length===0?!t&&de(o)?o.value:o:we(o)?o.getIn(i,t):void 0}hasAllNullValues(n){return this.items.every(t=>{if(!me(t))return!1;let r=t.value;return r==null||n&&de(r)&&r.value==null&&!r.commentBefore&&!r.comment&&!r.tag})}hasIn(n){let[t,...r]=n;if(r.length===0)return this.has(t);let i=this.get(t,!0);return we(i)?i.hasIn(r):!1}setIn(n,t){let[r,...i]=n;if(i.length===0)this.set(r,t);else{let o=this.get(r,!0);if(we(o))o.setIn(i,t);else if(o===void 0&&this.schema)this.set(r,Wr(this.schema,i,t));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${i}`)}}};var hs=e=>e.replace(/^(?!$)(?: $)?/gm,"#");function gt(e,n){return/^\n+$/.test(e)?e.substring(1):n?e.replace(/^(?! *$)/gm,n):e}var at=(e,n,t)=>e.endsWith(`
|
|
21
21
|
`)?gt(t,n):t.includes(`
|
|
22
22
|
`)?`
|
|
23
23
|
`+gt(t,n):(e.endsWith(" ")?"":" ")+t;var Yr="flow",Kn="block",hn="quoted";function pn(e,n,t="flow",{indentAtStart:r,lineWidth:i=80,minContentWidth:o=20,onFold:s,onOverflow:a}={}){if(!i||i<0)return e;i<o&&(o=0);let l=Math.max(1+o,1+i-n.length);if(e.length<=l)return e;let u=[],c={},d=i-n.length;typeof r=="number"&&(r>i-Math.max(2,o)?u.push(0):d=i-r);let m,f,h=!1,b=-1,w=-1,y=-1;t===Kn&&(b=ps(e,b,n.length),b!==-1&&(d=b+l));for(let k;k=e[b+=1];){if(t===hn&&k==="\\"){switch(w=b,e[b+1]){case"x":b+=3;break;case"u":b+=5;break;case"U":b+=9;break;default:b+=1}y=b}if(k===`
|
|
@@ -35,38 +35,38 @@ ${n}${e.slice(O+1,R)}`)}return C}function ps(e,n,t){let r=n,i=n+1,o=e[i];for(;o=
|
|
|
35
35
|
${t}`)+"'";return n.implicitKey?r:pn(r,t,Yr,Yn(n,!1))}function Qt(e,n){let{singleQuote:t}=n.options,r;if(t===!1)r=gn;else{let i=e.includes('"'),o=e.includes("'");i&&!o?r=Jr:o&&!i?r=gn:r=t?Jr:gn}return r(e,n)}var Qr;try{Qr=new RegExp(`(^|(?<!
|
|
36
36
|
))
|
|
37
37
|
+(?!
|
|
38
|
-
|$)`,"g")}catch{Qr=/\n+(?!\n|$)/g}function Wn({comment:e,type:n,value:t},r,i,o){let{blockQuote:s,commentString:a,lineWidth:l}=r.options;if(!s||/\n[\t ]+$/.test(t))return Qt(t,r);let u=r.indent||(r.forceBlockIndent||Jn(t)?" ":""),c=s==="literal"?!0:s==="folded"||n===
|
|
38
|
+
|$)`,"g")}catch{Qr=/\n+(?!\n|$)/g}function Wn({comment:e,type:n,value:t},r,i,o){let{blockQuote:s,commentString:a,lineWidth:l}=r.options;if(!s||/\n[\t ]+$/.test(t))return Qt(t,r);let u=r.indent||(r.forceBlockIndent||Jn(t)?" ":""),c=s==="literal"?!0:s==="folded"||n===re.BLOCK_FOLDED?!1:n===re.BLOCK_LITERAL?!0:!lc(t,l,u.length);if(!t)return c?`|
|
|
39
39
|
`:`>
|
|
40
40
|
`;let d,m;for(m=t.length;m>0;--m){let R=t[m-1];if(R!==`
|
|
41
41
|
`&&R!==" "&&R!==" ")break}let f=t.substring(m),h=f.indexOf(`
|
|
42
42
|
`);h===-1?d="-":t===f||h!==f.length-1?(d="+",o&&o()):d="",f&&(t=t.slice(0,-f.length),f[f.length-1]===`
|
|
43
43
|
`&&(f=f.slice(0,-1)),f=f.replace(Qr,`$&${u}`));let b=!1,w,y=-1;for(w=0;w<t.length;++w){let R=t[w];if(R===" ")b=!0;else if(R===`
|
|
44
44
|
`)y=w;else break}let C=t.substring(0,y<w?y+1:w);C&&(t=t.substring(C.length),C=C.replace(/\n+/g,`$&${u}`));let O=(b?u?"2":"1":"")+d;if(e&&(O+=" "+a(e.replace(/ ?[\r\n]+/g," ")),i&&i()),!c){let R=t.replace(/\n+/g,`
|
|
45
|
-
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${u}`),S=!1,M=Yn(r,!0);s!=="folded"&&n!==
|
|
46
|
-
${u}${
|
|
45
|
+
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${u}`),S=!1,M=Yn(r,!0);s!=="folded"&&n!==re.BLOCK_FOLDED&&(M.onOverflow=()=>{S=!0});let W=pn(`${C}${R}${f}`,u,Kn,M);if(!S)return`>${O}
|
|
46
|
+
${u}${W}`}return t=t.replace(/\n+/g,`$&${u}`),`|${O}
|
|
47
47
|
${u}${C}${t}${f}`}function cc(e,n,t,r){let{type:i,value:o}=e,{actualString:s,implicitKey:a,indent:l,indentStep:u,inFlow:c}=n;if(a&&o.includes(`
|
|
48
48
|
`)||c&&/[[\]{},]/.test(o))return Qt(o,n);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(o))return a||c||!o.includes(`
|
|
49
|
-
`)?Qt(o,n):Wn(e,n,t,r);if(!a&&!c&&i!==
|
|
49
|
+
`)?Qt(o,n):Wn(e,n,t,r);if(!a&&!c&&i!==re.PLAIN&&o.includes(`
|
|
50
50
|
`))return Wn(e,n,t,r);if(Jn(o)){if(l==="")return n.forceBlockIndent=!0,Wn(e,n,t,r);if(a&&l===u)return Qt(o,n)}let d=o.replace(/\n+/g,`$&
|
|
51
|
-
${l}`);if(s){let m=b=>b.default&&b.tag!=="tag:yaml.org,2002:str"&&b.test?.test(d),{compat:f,tags:h}=n.doc.schema;if(h.some(m)||f?.some(m))return Qt(o,n)}return a?d:pn(d,l,Yr,Yn(n,!1))}function bn(e,n,t,r){let{implicitKey:i,inFlow:o}=n,s=typeof e.value=="string"?e:Object.assign({},e,{value:String(e.value)}),{type:a}=e;a!==
|
|
52
|
-
${n.indent}${a}`:a}function gs({key:e,value:n},t,r,i){let{allNullValues:o,doc:s,indent:a,indentStep:l,options:{commentString:u,indentSeq:c,simpleKeys:d}}=t,m=he(e)&&e.comment||null;if(d){if(m)throw new Error("With simple keys, key nodes cannot have comments");if(we(e)||!he(e)&&typeof e=="object"){let M="With simple keys, collection cannot be used as a key value";throw new Error(M)}}let f=!d&&(!e||m&&n==null&&!t.inFlow||we(e)||(de(e)?e.type===
|
|
53
|
-
${a}:`):(w=`${w}:`,m&&(w+=at(w,t.indent,u(m))));let y,C,k;he(n)?(y=!!n.spaceBefore,C=n.commentBefore,k=n.comment):(y=!1,C=null,k=null,n&&typeof n=="object"&&(n=s.createNode(n))),t.implicitKey=!1,!f&&!m&&de(n)&&(t.indentAtStart=w.length+1),b=!1,!c&&l.length>=2&&!t.inFlow&&!f&&
|
|
51
|
+
${l}`);if(s){let m=b=>b.default&&b.tag!=="tag:yaml.org,2002:str"&&b.test?.test(d),{compat:f,tags:h}=n.doc.schema;if(h.some(m)||f?.some(m))return Qt(o,n)}return a?d:pn(d,l,Yr,Yn(n,!1))}function bn(e,n,t,r){let{implicitKey:i,inFlow:o}=n,s=typeof e.value=="string"?e:Object.assign({},e,{value:String(e.value)}),{type:a}=e;a!==re.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(s.value)&&(a=re.QUOTE_DOUBLE);let l=c=>{switch(c){case re.BLOCK_FOLDED:case re.BLOCK_LITERAL:return i||o?Qt(s.value,n):Wn(s,n,t,r);case re.QUOTE_DOUBLE:return gn(s.value,n);case re.QUOTE_SINGLE:return Jr(s.value,n);case re.PLAIN:return cc(s,n,t,r);default:return null}},u=l(a);if(u===null){let{defaultKeyType:c,defaultStringType:d}=n.options,m=i&&c||d;if(u=l(m),u===null)throw new Error(`Unsupported default string type ${m}`)}return u}function Xr(e,n){let t=Object.assign({blockQuote:!0,commentString:hs,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trailingComma:!1,trueStr:"true",verifyAliasOrder:!0},e.schema.toStringOptions,n),r;switch(t.collectionStyle){case"block":r=!1;break;case"flow":r=!0;break;default:r=null}return{anchors:new Set,doc:e,flowCollectionPadding:t.flowCollectionPadding?" ":"",indent:"",indentStep:typeof t.indent=="number"?" ".repeat(t.indent):" ",inFlow:r,options:t}}function uc(e,n){if(n.tag){let i=e.filter(o=>o.tag===n.tag);if(i.length>0)return i.find(o=>o.format===n.format)??i[0]}let t,r;if(de(n)){r=n.value;let i=e.filter(o=>o.identify?.(r));if(i.length>1){let o=i.filter(s=>s.test);o.length>0&&(i=o)}t=i.find(o=>o.format===n.format)??i.find(o=>!o.format)}else r=n,t=e.find(i=>i.nodeClass&&r instanceof i.nodeClass);if(!t){let i=r?.constructor?.name??(r===null?"null":typeof r);throw new Error(`Tag not resolved for ${i} value`)}return t}function dc(e,n,{anchors:t,doc:r}){if(!r.directives)return"";let i=[],o=(de(e)||we(e))&&e.anchor;o&&Un(o)&&(t.add(o),i.push(`&${o}`));let s=e.tag??(n.default?null:n.tag);return s&&i.push(r.directives.tagString(s)),i.join(" ")}function It(e,n,t,r){if(me(e))return e.toString(n,t,r);if(Ke(e)){if(n.doc.directives)return e.toString(n);if(n.resolvedAliases?.has(e))throw new TypeError("Cannot stringify circular structure without alias nodes");n.resolvedAliases?n.resolvedAliases.add(e):n.resolvedAliases=new Set([e]),e=e.resolve(n.doc)}let i,o=he(e)?e:n.doc.createNode(e,{onTagObj:l=>i=l});i??(i=uc(n.doc.schema.tags,o));let s=dc(o,i,n);s.length>0&&(n.indentAtStart=(n.indentAtStart??0)+s.length+1);let a=typeof i.stringify=="function"?i.stringify(o,n,t,r):de(o)?bn(o,n,t,r):o.toString(n,t,r);return s?de(o)||a[0]==="{"||a[0]==="["?`${s} ${a}`:`${s}
|
|
52
|
+
${n.indent}${a}`:a}function gs({key:e,value:n},t,r,i){let{allNullValues:o,doc:s,indent:a,indentStep:l,options:{commentString:u,indentSeq:c,simpleKeys:d}}=t,m=he(e)&&e.comment||null;if(d){if(m)throw new Error("With simple keys, key nodes cannot have comments");if(we(e)||!he(e)&&typeof e=="object"){let M="With simple keys, collection cannot be used as a key value";throw new Error(M)}}let f=!d&&(!e||m&&n==null&&!t.inFlow||we(e)||(de(e)?e.type===re.BLOCK_FOLDED||e.type===re.BLOCK_LITERAL:typeof e=="object"));t=Object.assign({},t,{allNullValues:!1,implicitKey:!f&&(d||!o),indent:a+l});let h=!1,b=!1,w=It(e,t,()=>h=!0,()=>b=!0);if(!f&&!t.inFlow&&w.length>1024){if(d)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");f=!0}if(t.inFlow){if(o||n==null)return h&&r&&r(),w===""?"?":f?`? ${w}`:w}else if(o&&!d||n==null&&f)return w=`? ${w}`,m&&!h?w+=at(w,t.indent,u(m)):b&&i&&i(),w;h&&(m=null),f?(m&&(w+=at(w,t.indent,u(m))),w=`? ${w}
|
|
53
|
+
${a}:`):(w=`${w}:`,m&&(w+=at(w,t.indent,u(m))));let y,C,k;he(n)?(y=!!n.spaceBefore,C=n.commentBefore,k=n.comment):(y=!1,C=null,k=null,n&&typeof n=="object"&&(n=s.createNode(n))),t.implicitKey=!1,!f&&!m&&de(n)&&(t.indentAtStart=w.length+1),b=!1,!c&&l.length>=2&&!t.inFlow&&!f&&We(n)&&!n.flow&&!n.tag&&!n.anchor&&(t.indent=t.indent.substring(2));let O=!1,R=It(n,t,()=>O=!0,()=>b=!0),S=" ";if(m||y||C){if(S=y?`
|
|
54
54
|
`:"",C){let M=u(C);S+=`
|
|
55
55
|
${gt(M,t.indent)}`}R===""&&!t.inFlow?S===`
|
|
56
56
|
`&&k&&(S=`
|
|
57
57
|
|
|
58
58
|
`):S+=`
|
|
59
|
-
${t.indent}`}else if(!f&&we(n)){let M=R[0],
|
|
60
|
-
`),pe=
|
|
59
|
+
${t.indent}`}else if(!f&&we(n)){let M=R[0],W=R.indexOf(`
|
|
60
|
+
`),pe=W!==-1,v=t.inFlow??n.flow??n.items.length===0;if(pe||!v){let ie=!1;if(pe&&(M==="&"||M==="!")){let j=R.indexOf(" ");M==="&"&&j!==-1&&j<W&&R[j+1]==="!"&&(j=R.indexOf(" ",j+1)),(j===-1||W<j)&&(ie=!0)}ie||(S=`
|
|
61
61
|
${t.indent}`)}}else(R===""||R[0]===`
|
|
62
|
-
`)&&(S="");return w+=S+R,t.inFlow?O&&r&&r():k&&!O?w+=at(w,t.indent,u(k)):b&&i&&i(),w}function Zr(e,n){(e==="debug"||e==="warn")&&console.warn(n)}var Qn="<<",yn={identify:e=>e===Qn||typeof e=="symbol"&&e.description===Qn,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new
|
|
62
|
+
`)&&(S="");return w+=S+R,t.inFlow?O&&r&&r():k&&!O?w+=at(w,t.indent,u(k)):b&&i&&i(),w}function Zr(e,n){(e==="debug"||e==="warn")&&console.warn(n)}var Qn="<<",yn={identify:e=>e===Qn||typeof e=="symbol"&&e.description===Qn,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new re(Symbol(Qn)),{addToJSMap:ti}),stringify:()=>Qn},bs=(e,n)=>(yn.identify(n)||de(n)&&(!n.type||n.type===re.PLAIN)&&yn.identify(n.value))&&e?.doc.schema.tags.some(t=>t.tag===yn.tag&&t.default);function ti(e,n,t){let r=ys(e,t);if(We(r))for(let i of r.items)ei(e,n,i);else if(Array.isArray(r))for(let i of r)ei(e,n,i);else ei(e,n,r)}function ei(e,n,t){let r=ys(e,t);if(!et(r))throw new Error("Merge sources must be maps or map aliases");let i=r.toJSON(null,e,Map);for(let[o,s]of i)n instanceof Map?n.has(o)||n.set(o,s):n instanceof Set?n.add(o):Object.prototype.hasOwnProperty.call(n,o)||Object.defineProperty(n,o,{value:s,writable:!0,enumerable:!0,configurable:!0});return n}function ys(e,n){return e&&Ke(n)?n.resolve(e.doc,e):n}function Xn(e,n,{key:t,value:r}){if(he(t)&&t.addToJSMap)t.addToJSMap(e,n,r);else if(bs(e,t))ti(e,n,r);else{let i=Ce(t,"",e);if(n instanceof Map)n.set(i,Ce(r,i,e));else if(n instanceof Set)n.add(i);else{let o=fc(t,i,e),s=Ce(r,o,e);o in n?Object.defineProperty(n,o,{value:s,writable:!0,enumerable:!0,configurable:!0}):n[o]=s}}return n}function fc(e,n,t){if(n===null)return"";if(typeof n!="object")return String(n);if(he(e)&&t?.doc){let r=Xr(t.doc,{});r.anchors=new Set;for(let o of t.anchors.keys())r.anchors.add(o.anchor);r.inFlow=!0,r.inStringifyKey=!0;let i=e.toString(r);if(!t.mapKeyWarned){let o=JSON.stringify(i);o.length>40&&(o=o.substring(0,36)+'..."'),Zr(t.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${o}. Set mapAsMap: true to use object keys.`),t.mapKeyWarned=!0}return i}return JSON.stringify(n)}function Xt(e,n,t){let r=pt(e,void 0,t),i=pt(n,void 0,t);return new Re(r,i)}var Re=class e{constructor(n,t=null){Object.defineProperty(this,He,{value:Kr}),this.key=n,this.value=t}clone(n){let{key:t,value:r}=this;return he(t)&&(t=t.clone(n)),he(r)&&(r=r.clone(n)),new e(t,r)}toJSON(n,t){let r=t?.mapAsMap?new Map:{};return Xn(t,r,this)}toString(n,t,r){return n?.doc?gs(this,n,t,r):JSON.stringify(this)}};function er(e,n,t){return(n.inFlow??e.flow?hc:mc)(e,n,t)}function mc({comment:e,items:n},t,{blockItemPrefix:r,flowChars:i,itemIndent:o,onChompKeep:s,onComment:a}){let{indent:l,options:{commentString:u}}=t,c=Object.assign({},t,{indent:o,type:null}),d=!1,m=[];for(let h=0;h<n.length;++h){let b=n[h],w=null;if(he(b))!d&&b.spaceBefore&&m.push(""),Zn(t,m,b.commentBefore,d),b.comment&&(w=b.comment);else if(me(b)){let C=he(b.key)?b.key:null;C&&(!d&&C.spaceBefore&&m.push(""),Zn(t,m,C.commentBefore,d))}d=!1;let y=It(b,c,()=>w=null,()=>d=!0);w&&(y+=at(y,o,u(w))),d&&w&&(d=!1),m.push(r+y)}let f;if(m.length===0)f=i.start+i.end;else{f=m[0];for(let h=1;h<m.length;++h){let b=m[h];f+=b?`
|
|
63
63
|
${l}${b}`:`
|
|
64
64
|
`}}return e?(f+=`
|
|
65
65
|
`+gt(u(e),l),a&&a()):d&&s&&s(),f}function hc({items:e},n,{flowChars:t,itemIndent:r}){let{indent:i,indentStep:o,flowCollectionPadding:s,options:{commentString:a}}=n;r+=o;let l=Object.assign({},n,{indent:r,inFlow:!0,type:null}),u=!1,c=0,d=[];for(let h=0;h<e.length;++h){let b=e[h],w=null;if(he(b))b.spaceBefore&&d.push(""),Zn(n,d,b.commentBefore,!1),b.comment&&(w=b.comment);else if(me(b)){let C=he(b.key)?b.key:null;C&&(C.spaceBefore&&d.push(""),Zn(n,d,C.commentBefore,!1),C.comment&&(u=!0));let k=he(b.value)?b.value:null;k?(k.comment&&(w=k.comment),k.commentBefore&&(u=!0)):b.value==null&&C?.comment&&(w=C.comment)}w&&(u=!0);let y=It(b,l,()=>w=null);u||(u=d.length>c||y.includes(`
|
|
66
66
|
`)),h<e.length-1?y+=",":n.options.trailingComma&&(n.options.lineWidth>0&&(u||(u=d.reduce((C,k)=>C+k.length+2,2)+(y.length+2)>n.options.lineWidth)),u&&(y+=",")),w&&(y+=at(y,r,a(w))),d.push(y),c=d.length}let{start:m,end:f}=t;if(d.length===0)return m+f;if(!u){let h=d.reduce((b,w)=>b+w.length+2,2);u=n.options.lineWidth>0&&h>n.options.lineWidth}if(u){let h=m;for(let b of d)h+=b?`
|
|
67
67
|
${o}${i}${b}`:`
|
|
68
68
|
`;return`${h}
|
|
69
|
-
${i}${f}`}else return`${m}${s}${d.join(" ")}${s}${f}`}function Zn({indent:e,options:{commentString:n}},t,r,i){if(r&&i&&(r=r.replace(/^\n+/,"")),r){let o=gt(n(r),e);t.push(o.trimStart())}}function bt(e,n){let t=de(n)?n.value:n;for(let r of e)if(me(r)&&(r.key===n||r.key===t||de(r.key)&&r.key.value===t))return r}var Ie=class extends Jt{static get tagName(){return"tag:yaml.org,2002:map"}constructor(n){super(Xe,n),this.items=[]}static from(n,t,r){let{keepUndefined:i,replacer:o}=r,s=new this(n),a=(l,u)=>{if(typeof o=="function")u=o.call(t,l,u);else if(Array.isArray(o)&&!o.includes(l))return;(u!==void 0||i)&&s.items.push(Xt(l,u,r))};if(t instanceof Map)for(let[l,u]of t)a(l,u);else if(t&&typeof t=="object")for(let l of Object.keys(t))a(l,t[l]);return typeof n.sortMapEntries=="function"&&s.items.sort(n.sortMapEntries),s}add(n,t){let r;me(n)?r=n:!n||typeof n!="object"||!("key"in n)?r=new Re(n,n?.value):r=new Re(n.key,n.value);let i=bt(this.items,r.key),o=this.schema?.sortMapEntries;if(i){if(!t)throw new Error(`Key ${r.key} already set`);de(i.value)&&Gn(r.value)?i.value.value=r.value:i.value=r.value}else if(o){let s=this.items.findIndex(a=>o(r,a)<0);s===-1?this.items.push(r):this.items.splice(s,0,r)}else this.items.push(r)}delete(n){let t=bt(this.items,n);return t?this.items.splice(this.items.indexOf(t),1).length>0:!1}get(n,t){let i=bt(this.items,n)?.value;return(!t&&de(i)?i.value:i)??void 0}has(n){return!!bt(this.items,n)}set(n,t){this.add(new Re(n,t),!0)}toJSON(n,t,r){let i=r?new r:t?.mapAsMap?new Map:{};t?.onCreate&&t.onCreate(i);for(let o of this.items)Xn(t,i,o);return i}toString(n,t,r){if(!n)return JSON.stringify(this);for(let i of this.items)if(!me(i))throw new Error(`Map items must all be pairs; found ${JSON.stringify(i)} instead`);return!n.allNullValues&&this.hasAllNullValues(!1)&&(n=Object.assign({},n,{allNullValues:!0})),er(this,n,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:n.indent||"",onChompKeep:r,onComment:t})}};var Zt={collection:"map",default:!0,nodeClass:Ie,tag:"tag:yaml.org,2002:map",resolve(e,n){return et(e)||n("Expected a mapping for this tag"),e},createNode:(e,n,t)=>Ie.from(e,n,t)};var
|
|
69
|
+
${i}${f}`}else return`${m}${s}${d.join(" ")}${s}${f}`}function Zn({indent:e,options:{commentString:n}},t,r,i){if(r&&i&&(r=r.replace(/^\n+/,"")),r){let o=gt(n(r),e);t.push(o.trimStart())}}function bt(e,n){let t=de(n)?n.value:n;for(let r of e)if(me(r)&&(r.key===n||r.key===t||de(r.key)&&r.key.value===t))return r}var Ie=class extends Jt{static get tagName(){return"tag:yaml.org,2002:map"}constructor(n){super(Xe,n),this.items=[]}static from(n,t,r){let{keepUndefined:i,replacer:o}=r,s=new this(n),a=(l,u)=>{if(typeof o=="function")u=o.call(t,l,u);else if(Array.isArray(o)&&!o.includes(l))return;(u!==void 0||i)&&s.items.push(Xt(l,u,r))};if(t instanceof Map)for(let[l,u]of t)a(l,u);else if(t&&typeof t=="object")for(let l of Object.keys(t))a(l,t[l]);return typeof n.sortMapEntries=="function"&&s.items.sort(n.sortMapEntries),s}add(n,t){let r;me(n)?r=n:!n||typeof n!="object"||!("key"in n)?r=new Re(n,n?.value):r=new Re(n.key,n.value);let i=bt(this.items,r.key),o=this.schema?.sortMapEntries;if(i){if(!t)throw new Error(`Key ${r.key} already set`);de(i.value)&&Gn(r.value)?i.value.value=r.value:i.value=r.value}else if(o){let s=this.items.findIndex(a=>o(r,a)<0);s===-1?this.items.push(r):this.items.splice(s,0,r)}else this.items.push(r)}delete(n){let t=bt(this.items,n);return t?this.items.splice(this.items.indexOf(t),1).length>0:!1}get(n,t){let i=bt(this.items,n)?.value;return(!t&&de(i)?i.value:i)??void 0}has(n){return!!bt(this.items,n)}set(n,t){this.add(new Re(n,t),!0)}toJSON(n,t,r){let i=r?new r:t?.mapAsMap?new Map:{};t?.onCreate&&t.onCreate(i);for(let o of this.items)Xn(t,i,o);return i}toString(n,t,r){if(!n)return JSON.stringify(this);for(let i of this.items)if(!me(i))throw new Error(`Map items must all be pairs; found ${JSON.stringify(i)} instead`);return!n.allNullValues&&this.hasAllNullValues(!1)&&(n=Object.assign({},n,{allNullValues:!0})),er(this,n,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:n.indent||"",onChompKeep:r,onComment:t})}};var Zt={collection:"map",default:!0,nodeClass:Ie,tag:"tag:yaml.org,2002:map",resolve(e,n){return et(e)||n("Expected a mapping for this tag"),e},createNode:(e,n,t)=>Ie.from(e,n,t)};var ze=class extends Jt{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(n){super(mt,n),this.items=[]}add(n){this.items.push(n)}delete(n){let t=tr(n);return typeof t!="number"?!1:this.items.splice(t,1).length>0}get(n,t){let r=tr(n);if(typeof r!="number")return;let i=this.items[r];return!t&&de(i)?i.value:i}has(n){let t=tr(n);return typeof t=="number"&&t<this.items.length}set(n,t){let r=tr(n);if(typeof r!="number")throw new Error(`Expected a valid index, not ${n}.`);let i=this.items[r];de(i)&&Gn(t)?i.value=t:this.items[r]=t}toJSON(n,t){let r=[];t?.onCreate&&t.onCreate(r);let i=0;for(let o of this.items)r.push(Ce(o,String(i++),t));return r}toString(n,t,r){return n?er(this,n,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(n.indent||"")+" ",onChompKeep:r,onComment:t}):JSON.stringify(this)}static from(n,t,r){let{replacer:i}=r,o=new this(n);if(t&&Symbol.iterator in Object(t)){let s=0;for(let a of t){if(typeof i=="function"){let l=t instanceof Set?a:String(s++);a=i.call(t,l,a)}o.items.push(pt(a,void 0,r))}}return o}};function tr(e){let n=de(e)?e.value:e;return n&&typeof n=="string"&&(n=Number(n)),typeof n=="number"&&Number.isInteger(n)&&n>=0?n:null}var en={collection:"seq",default:!0,nodeClass:ze,tag:"tag:yaml.org,2002:seq",resolve(e,n){return We(e)||n("Expected a sequence for this tag"),e},createNode:(e,n,t)=>ze.from(e,n,t)};function ks(e){return typeof e=="bigint"||Number.isInteger(e)}var rr=({value:e})=>JSON.stringify(e),vc=[{identify:e=>typeof e=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:rr},{identify:e=>e==null,createNode:()=>new re(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:rr},{identify:e=>typeof e=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:e=>e==="true",stringify:rr},{identify:ks,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(e,n,{intAsBigInt:t})=>t?BigInt(e):parseInt(e,10),stringify:({value:e})=>ks(e)?e.toString():JSON.stringify(e)},{identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:e=>parseFloat(e),stringify:rr}],Sc={default:!0,tag:"",test:/^/,resolve(e,n){return n(`Unresolved plain scalar ${JSON.stringify(e)}`),e}},Ec=[Zt,en].concat(vc,Sc);function xs(e,n,t){let{replacer:r}=t,i=new ze(e);i.tag="tag:yaml.org,2002:pairs";let o=0;if(n&&Symbol.iterator in Object(n))for(let s of n){typeof r=="function"&&(s=r.call(n,String(o++),s));let a,l;if(Array.isArray(s))if(s.length===2)a=s[0],l=s[1];else throw new TypeError(`Expected [key, value] tuple: ${s}`);else if(s&&s instanceof Object){let u=Object.keys(s);if(u.length===1)a=u[0],l=s[a];else throw new TypeError(`Expected tuple with one key, not ${u.length} keys`)}else a=s;i.items.push(Xt(a,l,t))}return i}var ri=class e extends ze{constructor(){super(),this.add=Ie.prototype.add.bind(this),this.delete=Ie.prototype.delete.bind(this),this.get=Ie.prototype.get.bind(this),this.has=Ie.prototype.has.bind(this),this.set=Ie.prototype.set.bind(this),this.tag=e.tag}toJSON(n,t){if(!t)return super.toJSON(n);let r=new Map;t?.onCreate&&t.onCreate(r);for(let i of this.items){let o,s;if(me(i)?(o=Ce(i.key,"",t),s=Ce(i.value,o,t)):o=Ce(i,"",t),r.has(o))throw new Error("Ordered maps must not include duplicate keys");r.set(o,s)}return r}static from(n,t,r){let i=xs(n,t,r),o=new this;return o.items=i.items,o}};ri.tag="tag:yaml.org,2002:omap";var ii=class e extends Ie{constructor(n){super(n),this.tag=e.tag}add(n){let t;me(n)?t=n:n&&typeof n=="object"&&"key"in n&&"value"in n&&n.value===null?t=new Re(n.key,null):t=new Re(n,null),bt(this.items,t.key)||this.items.push(t)}get(n,t){let r=bt(this.items,n);return!t&&me(r)?de(r.key)?r.key.value:r.key:r}set(n,t){if(typeof t!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof t}`);let r=bt(this.items,n);r&&!t?this.items.splice(this.items.indexOf(r),1):!r&&t&&this.items.push(new Re(n))}toJSON(n,t){return super.toJSON(n,t,Set)}toString(n,t,r){if(!n)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},n,{allNullValues:!0}),t,r);throw new Error("Set items must all have null values")}static from(n,t,r){let{replacer:i}=r,o=new this(n);if(t&&Symbol.iterator in Object(t))for(let s of t)typeof i=="function"&&(s=i.call(t,s,s)),o.items.push(Xt(s,null,r));return o}};ii.tag="tag:yaml.org,2002:set";function Cc(e,n){let t=e[0],r=t==="-"||t==="+"?e.substring(1):e,i=s=>n?BigInt(s):Number(s),o=r.replace(/_/g,"").split(":").reduce((s,a)=>s*i(60)+i(a),i(0));return t==="-"?i(-1)*o:o}var oi={identify:e=>e instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(e){let n=e.match(oi.test);if(!n)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");let[,t,r,i,o,s,a]=n.map(Number),l=n[7]?Number((n[7]+"00").substr(1,3)):0,u=Date.UTC(t,r-1,i,o||0,s||0,a||0,l),c=n[8];if(c&&c!=="Z"){let d=Cc(c,!1);Math.abs(d)<30&&(d*=60),u-=6e4*d}return new Date(u)},stringify:({value:e})=>e?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""};var ci=Symbol("break visit"),Dc=Symbol("skip children"),Ss=Symbol("remove item");function Nt(e,n){"type"in e&&e.type==="document"&&(e={start:e.start,value:e.value}),Es(Object.freeze([]),e,n)}Nt.BREAK=ci;Nt.SKIP=Dc;Nt.REMOVE=Ss;Nt.itemAtPath=(e,n)=>{let t=e;for(let[r,i]of n){let o=t?.[r];if(o&&"items"in o)t=o.items[i];else return}return t};Nt.parentCollection=(e,n)=>{let t=Nt.itemAtPath(e,n.slice(0,-1)),r=n[n.length-1][0],i=t?.[r];if(i&&"items"in i)return i;throw new Error("Parent collection not found")};function Es(e,n,t){let r=t(n,e);if(typeof r=="symbol")return r;for(let i of["key","value"]){let o=n[i];if(o&&"items"in o){for(let s=0;s<o.items.length;++s){let a=Es(Object.freeze(e.concat([[i,s]])),o.items[s],t);if(typeof a=="number")s=a-1;else{if(a===ci)return ci;a===Ss&&(o.items.splice(s,1),s-=1)}}typeof r=="function"&&i==="key"&&(r=r(n,e))}}return typeof r=="function"?r(n,e):r}var bk=new Set("0123456789ABCDEFabcdef"),yk=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),wk=new Set(",[]{}"),kk=new Set(` ,[]{}
|
|
70
70
|
\r `);var Gc={javascript:"js",typescript:"ts",python:"py",ruby:"rb",rust:"rs",csharp:"cs","c#":"cs","c++":"cpp",kotlin:"kt",powershell:"ps1",bash:"sh",shell:"sh",markdown:"md",plaintext:"text",plain:"text"},Cs=e=>(Gc[e.toLowerCase()]??e.toLowerCase())||"text";var Ls="https://json-schema.org/draft/2020-12/schema",As=`${JSON.stringify({$schema:Ls,type:"object",properties:{},additionalProperties:!1},null,2)}
|
|
71
71
|
`,ui={eq:"Equals",ne:"Does not equal",contains:"Contains",in:"Is one of",gt:"Greater than",gte:"At least",lt:"Less than",lte:"At most",empty:"Is empty"};var di=e=>Object.keys(ui).filter(n=>!["gt","gte","lt","lte"].includes(n)||e.type==="number"||e.type==="integer"||!!e.format),$s=(e,n)=>{for(let t of e.fields??[])if(!n.some(r=>r.name===t))throw new Error(`Unknown subformat display field: ${t}`);for(let t of["card_title","group_by","sort_by"]){if(!e[t])continue;let r=n.find(i=>i.name===e[t]);if(!r||t==="group_by"&&!r.enum?.length||t==="sort_by"&&!r.enum&&!r.format&&!r.type)throw new Error(`Invalid subformat ${t} field: ${e[t]}`)}for(let[t,r,i="eq"]of e.filters??[]){let o=n.find(s=>s.name===t);if(!o)throw new Error(`Unknown subformat filter field: ${t}`);if(!di(o).includes(i))throw new Error(`Unsupported subformat filter operator for ${t}: ${i}`);if(i==="empty"&&r!=="true"&&r!=="false")throw new Error(`Subformat empty filter requires true or false: ${t}`);if(i==="in"&&r.split(",").some(s=>!s.trim()))throw new Error(`Subformat in filter requires comma-separated values: ${t}`);if(["gt","gte","lt","lte"].includes(i)&&(!r.trim()||!Number.isFinite(o.format?Date.parse(r):Number(r))))throw new Error(`Invalid subformat comparison value for ${t}: ${r}`)}},Ms=(e,n,t)=>{if(n.q){let r=`${e.file} ${e.content}`.normalize("NFKC").toLowerCase();if(!n.q.normalize("NFKC").toLowerCase().trim().split(/\s+/).every(i=>r.includes(i)))return!1}return(n.filters??[]).every(([r,i,o="eq"])=>{let s=Object.hasOwn(e.data,r),a=s?e.data[r]:void 0;if(o==="empty")return(!s||a==null||a===""||Array.isArray(a)&&!a.length)===(i==="true");if(!s)return!1;let l=m=>m===null||["string","number","boolean"].includes(typeof m);if(o==="contains")return typeof a=="string"?a.normalize("NFKC").toLowerCase().includes(i.normalize("NFKC").toLowerCase()):Array.isArray(a)&&a.some(m=>l(m)&&String(m)===i);if(o==="in")return l(a)&&i.split(",").some(m=>String(a)===m.trim());if(o==="eq"||o==="ne")return l(a)&&String(a)===i==(o==="eq");let u=t.find(m=>m.name===r),c=u?.format&&typeof a=="string"?Date.parse(a):a,d=u?.format?Date.parse(i):Number(i);return typeof c!="number"||!Number.isFinite(c)||!Number.isFinite(d)?!1:o==="gt"?c>d:o==="gte"?c>=d:o==="lt"?c<d:o==="lte"&&c<=d})},Ts=(e,n="")=>n+(/^https?:\/\//i.test(n)?e.split("/").map(encodeURIComponent).join("/"):e),fi=e=>e.change??(e.records.some(n=>n.change==="modified")?"modified":e.records.some(n=>n.change==="added")?"added":void 0);var mi=(e,n,t=!1)=>[...e].sort((r,i)=>{let o=u=>{if(!n)return u.file;let c=u.data[n.name];if(n.enum){let d=n.enum.indexOf(c);return d<0?void 0:d}if(c!=null){if(n.format){let d=typeof c=="string"?Date.parse(c):Number.NaN;return Number.isNaN(d)?void 0:d}return typeof c=="boolean"?Number(c):typeof c=="string"||typeof c=="number"&&Number.isFinite(c)?c:void 0}},s=o(r),a=o(i);return s===void 0!=(a===void 0)?s===void 0?1:-1:(typeof s=="number"&&typeof a=="number"?s-a:typeof s=="string"&&typeof a=="string"?s.localeCompare(a,void 0,{numeric:!0}):0)*(t?-1:1)||r.file.localeCompare(i.file)});var Kc={csv:"```csv\n<value>,<value>\n```",tsv:"```tsv\n<value> <value>\n```",mermaid:"```mermaid\nflowchart LR\n A[<start>] --> B[<end>]\n```",callouth:"```callouth <caption>\n- <item>\n```",schemath:`\`\`\`schemath <caption>
|
|
72
72
|
### <group>
|
|
@@ -76,7 +76,7 @@ ${i}${f}`}else return`${m}${s}${d.join(" ")}${s}${f}`}function Zn({indent:e,opti
|
|
|
76
76
|
|
|
77
77
|
<ref_table>:
|
|
78
78
|
id: pk
|
|
79
|
-
\`\`\``,graphth:"```graphth <caption>\n[<id>]: <label>\n[<ref_id>]: <ref_label>\n\n[<id>] -> [<ref_id>]\n```",termth:'```termth\nname: "<name>"\ndefinition: "<definition>"\n```'},hi=["javascript","typescript","jsx","tsx","python","java","c","cpp","csharp","go","rust","ruby","php","swift","kotlin","bash","powershell","html","css","json","yaml","toml","sql","markdown","dockerfile","diff","graphql","terraform",...Object.keys(Kc)];var Is=["svg","png","jpg","jpeg","gif","webp","avif","bmp","ico","tif","tiff"],Ns=["mp4","webm","mov","m4v","ogv"],Os=["mp3","wav","ogg","m4a","flac","aac"],hx={media:[...Is,...Ns,...Os,"pdf","dxf"],images:Is,video:Ns,audio:Os,codes:[...hi,...hi.map(Cs),"svg","yml","htm","sh","h","hpp","rs","rb","kt","tf"],diagrams:["svg","dxf","mermaid","graphth","schemath"],tables:["csv","tsv"],documents:["md","markdown","txt","pdf","html","htm","termth"]};var Rs=(e,n)=>n==="."||e.startsWith(`${n}/`);var Yc=e=>/^https?:\/\//i.test(e);var wn=e=>{if(!Yc(e))return e.split("/").at(-1)??e;try{let n=new URL(e),t=n.pathname.endsWith(".git")&&n.hash.includes(":")?n.hash.slice(n.hash.indexOf(":")+1):n.pathname;return decodeURIComponent(t.split("/").at(-1)||n.hostname)}catch{return e}};var Jc=Object.defineProperty;var Qc=(e,n)=>{for(var t in n)Jc(e,t,{get:n[t],enumerable:!0})};var Xc={};Qc(Xc,{Graph:()=>yi,alg:()=>bi});var Zc=Object.defineProperty,Ds=(e,n)=>{for(var t in n)Zc(e,t,{get:n[t],enumerable:!0})},gi=class{constructor(e){this._isDirected=!0,this._isMultigraph=!1,this._isCompound=!1,this._nodes={},this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={},this._nodeCount=0,this._edgeCount=0,this._defaultNodeLabelFn=()=>{},this._defaultEdgeLabelFn=()=>{},e&&(this._isDirected="directed"in e?e.directed:!0,this._isMultigraph="multigraph"in e?e.multigraph:!1,this._isCompound="compound"in e?e.compound:!1),this._isCompound&&(this._parent={},this._children={},this._children["\0"]={})}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(e){return this._label=e,this}graph(){return this._label}setDefaultNodeLabel(e){return typeof e!="function"?this._defaultNodeLabelFn=()=>e:this._defaultNodeLabelFn=e,this}nodeCount(){return this._nodeCount}nodes(){return Object.keys(this._nodes)}sources(){return this.nodes().filter(e=>Object.keys(this._in[e]).length===0)}sinks(){return this.nodes().filter(e=>Object.keys(this._out[e]).length===0)}setNodes(e,n){return e.forEach(t=>{n!==void 0?this.setNode(t,n):this.setNode(t)}),this}setNode(e,n){return e in this._nodes?(arguments.length>1&&(this._nodes[e]=n),this):(this._nodes[e]=arguments.length>1?n:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]="\0",this._children[e]={},this._children["\0"][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)}node(e){return this._nodes[e]}hasNode(e){return e in this._nodes}removeNode(e){if(e in this._nodes){let n=t=>this.removeEdge(this._edgeObjs[t]);delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],this.children(e).forEach(t=>{this.setParent(t)}),delete this._children[e]),Object.keys(this._in[e]).forEach(n),delete this._in[e],delete this._preds[e],Object.keys(this._out[e]).forEach(n),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this}setParent(e,n){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(n===void 0)n="\0";else{n+="";for(let t=n;t!==void 0;t=this.parent(t))if(t===e)throw new Error("Setting "+n+" as parent of "+e+" would create a cycle");this.setNode(n)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=n,this._children[n][e]=!0,this}parent(e){if(this._isCompound){let n=this._parent[e];if(n!=="\0")return n}}children(e="\0"){if(this._isCompound){let n=this._children[e];if(n)return Object.keys(n)}else{if(e==="\0")return this.nodes();if(this.hasNode(e))return[]}return[]}predecessors(e){let n=this._preds[e];if(n)return Object.keys(n)}successors(e){let n=this._sucs[e];if(n)return Object.keys(n)}neighbors(e){let n=this.predecessors(e);if(n){let t=new Set(n),r=this.successors(e);if(r)for(let i of r)t.add(i);return Array.from(t.values())}}isLeaf(e){var n;let t;return this.isDirected()?t=this.successors(e):t=this.neighbors(e),((n=t?.length)!=null?n:0)===0}filterNodes(e){let n=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});n.setGraph(this.graph()),Object.entries(this._nodes).forEach(([i,o])=>{e(i)&&n.setNode(i,o)}),Object.values(this._edgeObjs).forEach(i=>{n.hasNode(i.v)&&n.hasNode(i.w)&&n.setEdge(i,this.edge(i))});let t={},r=i=>{let o=this.parent(i);return!o||n.hasNode(o)?(t[i]=o,o):o in t?t[o]:r(o)};return this._isCompound&&n.nodes().forEach(i=>n.setParent(i,r(i))),n}setDefaultEdgeLabel(e){return typeof e!="function"?this._defaultEdgeLabelFn=()=>e:this._defaultEdgeLabelFn=e,this}edgeCount(){return this._edgeCount}edges(){return Object.values(this._edgeObjs)}setPath(e,n){return e.reduce((t,r)=>(n!==void 0?this.setEdge(t,r,n):this.setEdge(t,r),r)),this}setEdge(e,n,t,r){let i,o,s,a,l=!1;typeof e=="object"&&e!==null&&"v"in e?(i=e.v,o=e.w,s=e.name,arguments.length===2&&(a=n,l=!0)):(i=e,o=n,s=r,arguments.length>2&&(a=t,l=!0)),i=""+i,o=""+o,s!==void 0&&(s=""+s);let u=kn(this._isDirected,i,o,s);if(u in this._edgeLabels)return l&&(this._edgeLabels[u]=a),this;if(s!==void 0&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(i),this.setNode(o),this._edgeLabels[u]=l?a:this._defaultEdgeLabelFn(i,o,s);let c=eu(this._isDirected,i,o,s);return i=c.v,o=c.w,Object.freeze(c),this._edgeObjs[u]=c,Ps(this._preds[o],i),Ps(this._sucs[i],o),this._in[o][u]=c,this._out[i][u]=c,this._edgeCount++,this}edge(e,n,t){let r=arguments.length===1?pi(this._isDirected,e):kn(this._isDirected,e,n,t);return this._edgeLabels[r]}edgeAsObj(e,n,t){let r=arguments.length===1?this.edge(e):this.edge(e,n,t);return typeof r!="object"||r===null?{label:r}:r}hasEdge(e,n,t){return(arguments.length===1?pi(this._isDirected,e):kn(this._isDirected,e,n,t))in this._edgeLabels}removeEdge(e,n,t){let r=arguments.length===1?pi(this._isDirected,e):kn(this._isDirected,e,n,t),i=this._edgeObjs[r];if(i){let o=i.v,s=i.w;delete this._edgeLabels[r],delete this._edgeObjs[r],Fs(this._preds[s],o),Fs(this._sucs[o],s),delete this._in[s][r],delete this._out[o][r],this._edgeCount--}return this}inEdges(e,n){return this.isDirected()?this.filterEdges(this._in[e],e,n):this.nodeEdges(e,n)}outEdges(e,n){return this.isDirected()?this.filterEdges(this._out[e],e,n):this.nodeEdges(e,n)}nodeEdges(e,n){if(e in this._nodes)return this.filterEdges({...this._in[e],...this._out[e]},e,n)}_removeFromParentsChildList(e){delete this._children[this._parent[e]][e]}filterEdges(e,n,t){if(!e)return;let r=Object.values(e);return t?r.filter(i=>i.v===n&&i.w===t||i.v===t&&i.w===n):r}};function Ps(e,n){e[n]?e[n]++:e[n]=1}function Fs(e,n){e[n]!==void 0&&!--e[n]&&delete e[n]}function kn(e,n,t,r){let i=""+n,o=""+t;if(!e&&i>o){let s=i;i=o,o=s}return i+""+o+""+(r===void 0?"\0":r)}function eu(e,n,t,r){let i=""+n,o=""+t;if(!e&&i>o){let a=i;i=o,o=a}let s={v:i,w:o};return r&&(s.name=r),s}function pi(e,n){return kn(e,n.v,n.w,n.name)}var tu={};Ds(tu,{read:()=>ou,write:()=>nu});function nu(e){let n={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:ru(e),edges:iu(e)},t=e.graph();return t!==void 0&&(n.value=structuredClone(t)),n}function ru(e){return e.nodes().map(n=>{let t=e.node(n),r=e.parent(n),i={v:n};return t!==void 0&&(i.value=t),r!==void 0&&(i.parent=r),i})}function iu(e){return e.edges().map(n=>{let t=e.edge(n),r={v:n.v,w:n.w};return n.name!==void 0&&(r.name=n.name),t!==void 0&&(r.value=t),r})}function ou(e){let n=new gi(e.options);return e.value!==void 0&&n.setGraph(e.value),e.nodes.forEach(t=>{n.setNode(t.v,t.value),t.parent&&n.setParent(t.v,t.parent)}),e.edges.forEach(t=>{n.setEdge({v:t.v,w:t.w,name:t.name},t.value)}),n}var bi={};Ds(bi,{CycleException:()=>ar,bellmanFord:()=>js,components:()=>lu,dijkstra:()=>sr,dijkstraAll:()=>du,findCycles:()=>fu,floydWarshall:()=>hu,isAcyclic:()=>gu,postorder:()=>yu,preorder:()=>wu,prim:()=>ku,shortestPaths:()=>xu,tarjan:()=>Bs,topsort:()=>Hs});var su=()=>1;function js(e,n,t,r){return au(e,String(n),t||su,r||function(i){var o;return(o=e.outEdges(i))!=null?o:[]})}function au(e,n,t,r){let i={},o,s=0,a=e.nodes(),l=function(d){let m=i[d.v],f=i[d.w];if(!m||!f)return;let h=t(d);m.distance+h<f.distance&&(i[d.w]={distance:m.distance+h,predecessor:d.v},o=!0)},u=function(){a.forEach(function(d){r(d).forEach(function(m){let f=m.v===d?m.v:m.w,h=f===m.v?m.w:m.v;l({v:f,w:h})})})};a.forEach(function(d){let m=d===n?0:Number.POSITIVE_INFINITY;i[d]={distance:m,predecessor:""}});let c=a.length;for(let d=1;d<c&&(o=!1,s++,u(),!!o);d++);if(s===c-1&&(o=!1,u(),o))throw new Error("The graph contains a negative weight cycle");return i}function lu(e){let n={},t=[],r;function i(o){var s,a;o in n||(n[o]=!0,r.push(o),(s=e.successors(o))==null||s.forEach(i),(a=e.predecessors(o))==null||a.forEach(i))}return e.nodes().forEach(function(o){r=[],i(o),r.length&&t.push(r)}),t}var qs=class{constructor(){this._arr=[],this._keyIndices={}}size(){return this._arr.length}keys(){return this._arr.map(e=>e.key)}has(e){return e in this._keyIndices}priority(e){let n=this._keyIndices[e];if(n!==void 0)return this._arr[n].priority}min(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key}add(e,n){let t=this._keyIndices,r=String(e);if(!(r in t)){let i=this._arr,o=i.length;return t[r]=o,i.push({key:r,priority:n}),this._decrease(o),!0}return!1}removeMin(){if(this.size()===0)throw new Error("Queue underflow");this._swap(0,this._arr.length-1);let e=this._arr.pop();return delete this._keyIndices[e.key],this._heapify(0),e.key}decrease(e,n){let t=this._keyIndices[e];if(t===void 0)throw new Error(`Key not found: ${e}`);let r=this._arr[t].priority;if(n>r)throw new Error(`New priority is greater than current priority. Key: ${e} Old: ${r} New: ${n}`);this._arr[t].priority=n,this._decrease(t)}_heapify(e){let n=this._arr,t=2*e,r=t+1,i=e;t<n.length&&(i=n[t].priority<n[i].priority?t:i,r<n.length&&(i=n[r].priority<n[i].priority?r:i),i!==e&&(this._swap(e,i),this._heapify(i)))}_decrease(e){let n=this._arr,t=n[e].priority,r;for(;e!==0&&(r=e>>1,!(n[r].priority<t));)this._swap(e,r),e=r}_swap(e,n){let t=this._arr,r=this._keyIndices,i=t[e],o=t[n];t[e]=o,t[n]=i,r[o.key]=e,r[i.key]=n}},cu=()=>1;function sr(e,n,t,r){let i=function(o){var s;return(s=e.outEdges(o))!=null?s:[]};return uu(e,String(n),t||cu,r||i)}function uu(e,n,t,r){let i={},o=new qs,s,a,l=function(u){let c=u.v!==s?u.v:u.w,d=i[c];if(!d)return;let m=t(u),f=a.distance+m;if(m<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+u+" Weight: "+m);f<d.distance&&(d.distance=f,d.predecessor=s,o.decrease(c,f))};for(e.nodes().forEach(function(u){let c=u===n?0:Number.POSITIVE_INFINITY;i[u]={distance:c,predecessor:""},o.add(u,c)});o.size()>0;){s=o.removeMin();let u=i[s];if(!u||u.distance===Number.POSITIVE_INFINITY)break;a=u,r(s).forEach(l)}return i}function du(e,n,t){return e.nodes().reduce(function(r,i){return r[i]=sr(e,i,n,t),r},{})}function Bs(e){let n=0,t=[],r={},i=[];function o(s){var a;let l=r[s]={onStack:!0,lowlink:n,index:n++};if(t.push(s),(a=e.successors(s))==null||a.forEach(function(u){if(u in r){let c=r[u];c!=null&&c.onStack&&(l.lowlink=Math.min(l.lowlink,c.index))}else{o(u);let c=r[u];c&&(l.lowlink=Math.min(l.lowlink,c.lowlink))}}),l.lowlink===l.index){let u=[],c;do{c=t.pop();let d=r[c];d&&(d.onStack=!1),u.push(c)}while(s!==c);i.push(u)}}return e.nodes().forEach(function(s){s in r||o(s)}),i}function fu(e){return Bs(e).filter(function(n){var t;let r=n[0];return r?n.length>1||n.length===1&&((t=e.outEdges(r,r))!=null?t:[]).length>0:!1})}var mu=()=>1;function hu(e,n,t){return pu(e,n||mu,t||function(r){var i;return(i=e.outEdges(r))!=null?i:[]})}function pu(e,n,t){let r={},i=e.nodes();return i.forEach(function(o){let s={};r[o]=s,s[o]={distance:0,predecessor:""},i.forEach(function(a){o!==a&&(s[a]={distance:Number.POSITIVE_INFINITY,predecessor:""})}),t(o).forEach(function(a){let l=a.v===o?a.w:a.v,u=n(a);s[l]={distance:u,predecessor:o}})}),i.forEach(function(o){let s=r[o];s&&i.forEach(function(a){let l=r[a];l&&i.forEach(function(u){let c=l[o],d=s[u],m=l[u];if(c&&d&&m){let f=c.distance+d.distance;f<m.distance&&(m.distance=f,m.predecessor=d.predecessor)}})})}),r}var ar=class extends Error{constructor(e){super(e),this.name="CycleException"}};function Hs(e){let n={},t={},r=[];function i(o){var s;if(o in t)throw new ar;o in n||(t[o]=!0,n[o]=!0,(s=e.predecessors(o))==null||s.forEach(i),delete t[o],r.push(o))}if(e.sinks().forEach(i),Object.keys(n).length!==e.nodeCount())throw new ar;return r}function gu(e){try{Hs(e)}catch(n){if(n instanceof ar)return!1;throw n}return!0}function bu(e,n,t,r,i){Array.isArray(n)||(n=[n]);let o=(a=>{var l;return(l=e.isDirected()?e.successors(a):e.neighbors(a))!=null?l:[]}),s={};return n.forEach(function(a){if(!e.hasNode(a))throw new Error("Graph does not have node: "+a);i=zs(e,a,t==="post",s,o,r,i)}),i}function zs(e,n,t,r,i,o,s){return n in r||(r[n]=!0,t||(s=o(s,n)),i(n).forEach(function(a){s=zs(e,a,t,r,i,o,s)}),t&&(s=o(s,n))),s}function Us(e,n,t){return bu(e,n,t,function(r,i){return r.push(i),r},[])}function yu(e,n){return Us(e,n,"post")}function wu(e,n){return Us(e,n,"pre")}function ku(e,n){var t;let r=new gi,i={},o=new qs,s;function a(c){let d=c.v===s?c.w:c.v,m=o.priority(d);if(m!==void 0){let f=n(c);f<m&&(i[d]=s,o.decrease(d,f))}}if(e.nodeCount()===0)return r;e.nodes().forEach(function(c){o.add(c,Number.POSITIVE_INFINITY),r.setNode(c)});let l=e.nodes()[0];l!==void 0&&o.decrease(l,0);let u=!1;for(;o.size()>0;){if(s=o.removeMin(),s in i)r.setEdge(s,i[s]);else{if(u)throw new Error("Input graph is not connected: "+e);u=!0}(t=e.nodeEdges(s))==null||t.forEach(a)}return r}function xu(e,n,t,r){return vu(e,n,t,r??(i=>{var o;return(o=e.outEdges(i))!=null?o:[]}))}function vu(e,n,t,r){if(t===void 0)return sr(e,n,t,r);let i=!1,o=e.nodes();for(let s=0;s<o.length;s++){let a=o[s];if(a===void 0)continue;let l=r(a);for(let u=0;u<l.length;u++){let c=l[u];if(!c)continue;let d=c.v===a?c.v:c.w,m=d===c.v?c.w:c.v;t({v:d,w:m})<0&&(i=!0)}if(i)return js(e,n,t,r)}return sr(e,n,t,r)}var yi=gi;function Su(e){let n=new yi().setGraph(e.graph());return e.nodes().forEach(t=>n.setNode(t,e.node(t))),e.edges().forEach(t=>{let r=n.edge(t.v,t.w)||{weight:0,minlen:1},i=e.edge(t);n.setEdge(t.v,t.w,{weight:r.weight+i.weight,minlen:Math.max(r.minlen,i.minlen)})}),n}function Eu(e,n=Vs){let t=[];for(let r=0;r<e.length;r+=n){let i=e.slice(r,r+n);t.push(i)}return t}var Vs=65535;function Cu(e,n){if(n.length>Vs){let t=Eu(n);return e(...t.map(r=>e(...r)))}else return e(...n)}function Lu(e){let n={};function t(r){let i=e.node(r);if(Object.hasOwn(n,r))return i.rank;n[r]=!0;let o=e.outEdges(r),s=o?o.map(l=>l==null?Number.POSITIVE_INFINITY:t(l.w)-e.edge(l).minlen):[],a=Cu(Math.min,s);return a===Number.POSITIVE_INFINITY&&(a=0),i.rank=a}e.sources().forEach(t)}function tn(e,n){return e.node(n.w).rank-e.node(n.v).rank-e.edge(n).minlen}var Au=$u;function $u(e){let n=new yi({directed:!1}),t=e.nodes();if(t.length===0)throw new Error("Graph must have at least one node");let r=t[0],i=e.nodeCount();n.setNode(r,{});let o,s;for(;Mu(n,e)<i&&(o=Tu(n,e),!!o);)s=n.hasNode(o.v)?tn(e,o):-tn(e,o),Iu(n,e,s);return n}function Mu(e,n){function t(r){let i=n.nodeEdges(r);i&&i.forEach(o=>{let s=o.v,a=r===s?o.w:s;!e.hasNode(a)&&!tn(n,o)&&(e.setNode(a,{}),e.setEdge(r,a,{}),t(a))})}return e.nodes().forEach(t),e.nodeCount()}function Tu(e,n){return n.edges().reduce((t,r)=>{let i=Number.POSITIVE_INFINITY;return e.hasNode(r.v)!==e.hasNode(r.w)&&(i=tn(n,r)),i<t[0]?[i,r]:t},[Number.POSITIVE_INFINITY,null])[1]}function Iu(e,n,t){e.nodes().forEach(r=>n.node(r).rank+=t)}var{preorder:Nu,postorder:Ou}=bi;nn.initLowLimValues=ki;nn.initCutValues=wi;nn.calcCutValue=Gs;nn.leaveEdge=Ws;nn.enterEdge=Ys;nn.exchangeEdges=Js;function nn(e){e=Su(e),Lu(e);let n=Au(e);ki(n),wi(n,e);let t,r;for(;t=Ws(n);)r=Ys(n,e,t),Js(n,e,t,r)}function wi(e,n){let t=Ou(e,e.nodes());t=t.slice(0,t.length-1),t.forEach(r=>Ru(e,n,r))}function Ru(e,n,t){let r=e.node(t).parent,i=e.edge(t,r);i.cutvalue=Gs(e,n,t)}function Gs(e,n,t){let r=e.node(t).parent,i=!0,o=n.edge(t,r),s=0;o||(i=!1,o=n.edge(r,t)),s=o.weight;let a=n.nodeEdges(t);return a&&a.forEach(l=>{let u=l.v===t,c=u?l.w:l.v;if(c!==r){let d=u===i,m=n.edge(l).weight;if(s+=d?m:-m,Fu(e,t,c)){let f=e.edge(t,c).cutvalue;s+=d?-f:f}}}),s}function ki(e,n){arguments.length<2&&(n=e.nodes()[0]),Ks(e,{},1,n)}function Ks(e,n,t,r,i){let o=t,s=e.node(r);n[r]=!0;let a=e.neighbors(r);return a&&a.forEach(l=>{Object.hasOwn(n,l)||(t=Ks(e,n,t,l,r))}),s.low=o,s.lim=t++,i?s.parent=i:delete s.parent,t}function Ws(e){return e.edges().find(n=>e.edge(n).cutvalue<0)}function Ys(e,n,t){let r=t.v,i=t.w;n.hasEdge(r,i)||(r=t.w,i=t.v);let o=e.node(r),s=e.node(i),a=o,l=!1;return o.lim>s.lim&&(a=s,l=!0),n.edges().filter(u=>l===_s(e,e.node(u.v),a)&&l!==_s(e,e.node(u.w),a)).reduce((u,c)=>tn(n,c)<tn(n,u)?c:u)}function Js(e,n,t,r){let i=t.v,o=t.w;e.removeEdge(i,o),e.setEdge(r.v,r.w,{}),ki(e),wi(e,n),Pu(e,n)}function Pu(e,n){let t=e.nodes().find(i=>!e.node(i).parent);if(!t)return;let r=Nu(e,[t]);r=r.slice(1),r.forEach(i=>{let o=e.node(i).parent,s=n.edge(i,o),a=!1;s||(s=n.edge(o,i),a=!0),n.node(i).rank=n.node(o).rank+(a?s.minlen:-s.minlen)})}function Fu(e,n,t){return e.hasEdge(n,t)}function _s(e,n,t){return t.low<=n.lim&&n.lim<=t.lim}var lr={nodeH:40,minW:128,padX:14,gapY:20,gapBandX:60,gapRegionY:40,framePad:13,frameLabelH:22,margin:16,corner:7,radius:10,legendH:24,baselineDrop:4.5,verticalEps:8},Bu=lr.margin,_x=lr.gapRegionY,Dx=lr.frameLabelH,jx=lr.framePad;var Qs="M2 5h6l2 2h8v10H2Z";var xn='<svg class="ic-ok" viewBox="0 0 20 20" width="14" height="14" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m4 10 4 4 8-8"/></svg>';var ze=e=>`<svg class="nav-icon" viewBox="0 0 20 20" width="18" height="18" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">${e}</svg>`,Bx=ze('<path d="m8 4 1.8 4.2L14 10l-4.2 1.8L8 16l-1.8-4.2L2 10l4.2-1.8ZM15 2v5m-2.5-2.5h5M16 13v4m-2-2h4"/>'),Xs=ze('<path d="m6 6-4 4 4 4M14 6l4 4-4 4"/><circle cx="10" cy="10" r="2"/>'),Hx={codeblocks:ze('<path d="m7 6-4 4 4 4M13 6l4 4-4 4"/>'),urls:ze('<path d="M8.5 11.5a3 3 0 0 0 4.2 0l3-3a3 3 0 0 0-4.2-4.2l-1 1M11.5 8.5a3 3 0 0 0-4.2 0l-3 3a3 3 0 0 0 4.2 4.2l1-1"/>'),"url-previews":ze('<rect x="3" y="4" width="14" height="12" rx="1.5"/><path d="M3 8h14M6 12.5h5"/>'),skills:ze('<path d="M5 2.5h7l3 3v12H5ZM12 2.5V6h3M7.5 11l1.5 1.5 3.5-4"/>'),csv:ze('<rect x="3" y="4" width="14" height="12" rx="1"/><path d="M3 8h14M3 12h14M8 4v12"/>'),tsv:ze('<path d="M3 6h8M3 10h8M3 14h8M13.5 7l3 3-3 3M17 5v10"/>'),mermaid:ze('<rect x="3" y="3" width="6" height="4" rx="1"/><rect x="11" y="13" width="6" height="4" rx="1"/><path d="M6 7v6a2 2 0 0 0 2 2h3"/>'),callouth:ze('<path d="M4 4h12v9H9l-4 3v-3H4Z"/>'),schemath:ze('<ellipse cx="10" cy="5" rx="6" ry="2.5"/><path d="M4 5v10c0 1.4 2.7 2.5 6 2.5s6-1.1 6-2.5V5M4 10c0 1.4 2.7 2.5 6 2.5s6-1.1 6-2.5"/>'),graphth:ze('<circle cx="5" cy="10" r="2"/><circle cx="15" cy="5" r="2"/><circle cx="15" cy="15" r="2"/><path d="m6.8 9.1 6.4-3.2M6.8 10.9l6.4 3.2"/>'),termth:ze('<path d="M5 3h10v14H5Z"/><path d="m8 12 2-5 2 5M8.7 10.5h2.6"/>')};var xe=yt(/[A-Za-z]/),Se=yt(/[\dA-Za-z]/),Zs=yt(/[#-'*+\--9=?A-Z^-~]/);function Ot(e){return e!==null&&(e<32||e===127)}var vn=yt(/\d/),ea=yt(/[\dA-Fa-f]/),cr=yt(/[!-/:-@[-`{-~]/);function F(e){return e!==null&&e<-2}function ae(e){return e!==null&&(e<0||e===32)}function V(e){return e===-2||e===-1||e===32}var Rt=yt(/\p{P}|\p{S}/u),nt=yt(/\s/);function yt(e){return n;function n(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}var na=Qo(ta(),1),Sn=Object.assign(Pt(Error),{eval:Pt(EvalError),range:Pt(RangeError),reference:Pt(ReferenceError),syntax:Pt(SyntaxError),type:Pt(TypeError),uri:Pt(URIError)});function Pt(e){return n.displayName=e.displayName||e.name,n;function n(t,...r){let i=t&&(0,na.default)(t,...r);return new e(i)}}var ur={}.hasOwnProperty,ra={yaml:"-",toml:"+"};function rn(e){let n=[],t=-1,r=Array.isArray(e)?e:e?[e]:["yaml"];for(;++t<r.length;)n[t]=Hu(r[t]);return n}function Hu(e){let n=e;if(typeof n=="string"){if(!ur.call(ra,n))throw Sn("Missing matter definition for `%s`",n);n={type:n,marker:ra[n]}}else if(typeof n!="object")throw Sn("Expected matter to be an object, not `%j`",n);if(!ur.call(n,"type"))throw Sn("Missing `type` in matter `%j`",n);if(!ur.call(n,"fence")&&!ur.call(n,"marker"))throw Sn("Missing `marker` or `fence` in matter `%j`",n);return n}function Si(e){let n=rn(e),t={},r=-1;for(;++r<n.length;){let i=n[r],o=vi(i,"open").charCodeAt(0),s=zu(i),a=t[o];Array.isArray(a)?a.push(s):t[o]=[s]}return{flow:t}}function zu(e){let n=e.anywhere,t=e.type,r=t+"Fence",i=r+"Sequence",o=t+"Value",s={tokenize:c,partial:!0},a,l=0;return{tokenize:u,concrete:!0};function u(d,m,f){let h=this;return b;function b(M){let Y=h.now();return Y.column===1&&(Y.line===1||n)&&(a=vi(e,"open"),l=0,M===a.charCodeAt(l))?(d.enter(t),d.enter(r),d.enter(i),w(M)):f(M)}function w(M){return l===a.length?(d.exit(i),V(M)?(d.enter("whitespace"),y(M)):C(M)):M===a.charCodeAt(l++)?(d.consume(M),w):f(M)}function y(M){return V(M)?(d.consume(M),y):(d.exit("whitespace"),C(M))}function C(M){return F(M)?(d.exit(r),d.enter("lineEnding"),d.consume(M),d.exit("lineEnding"),a=vi(e,"close"),l=0,d.attempt(s,S,k)):f(M)}function k(M){return M===null||F(M)?R(M):(d.enter(o),O(M))}function O(M){return M===null||F(M)?(d.exit(o),R(M)):(d.consume(M),O)}function R(M){return M===null?f(M):(d.enter("lineEnding"),d.consume(M),d.exit("lineEnding"),d.attempt(s,S,k))}function S(M){return d.exit(t),m(M)}}function c(d,m,f){let h=0;return b;function b(k){return k===a.charCodeAt(h)?(d.enter(r),d.enter(i),w(k)):f(k)}function w(k){return h===a.length?(d.exit(i),V(k)?(d.enter("whitespace"),y(k)):C(k)):k===a.charCodeAt(h++)?(d.consume(k),w):f(k)}function y(k){return V(k)?(d.consume(k),y):(d.exit("whitespace"),C(k))}function C(k){return k===null||F(k)?(d.exit(r),m(k)):f(k)}}}function vi(e,n){return e.marker?ia(e.marker,n).repeat(3):ia(e.fence,n)}function ia(e,n){return typeof e=="string"?e:e[n]}function En(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function Ci(e){let n=rn(e),t={},r={},i=-1;for(;++i<n.length;){let o=n[i];t[o.type]=Uu(o),r[o.type]=Vu,r[o.type+"Value"]=Gu}return{enter:t,exit:r}}function Uu(e){return n;function n(t){this.enter({type:e.type,value:""},t),this.buffer()}}function Vu(e){let n=this.resume(),t=this.stack[this.stack.length-1];"value"in t,this.exit(e),t.value=n.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,"")}function Gu(e){this.config.enter.data.call(this,e),this.config.exit.data.call(this,e)}function Li(e){let n=[],t={},r=rn(e),i=-1;for(;++i<r.length;){let o=r[i];t[o.type]=Ku(o);let s=Ei(o,"open");n.push({atBreak:!0,character:s.charAt(0),after:En(s.charAt(1))})}return{unsafe:n,handlers:t}}function Ku(e){let n=Ei(e,"open"),t=Ei(e,"close");return r;function r(i){return n+(i.value?`
|
|
79
|
+
\`\`\``,graphth:"```graphth <caption>\n[<id>]: <label>\n[<ref_id>]: <ref_label>\n\n[<id>] -> [<ref_id>]\n```",termth:'```termth\nname: "<name>"\ndefinition: "<definition>"\n```'},hi=["javascript","typescript","jsx","tsx","python","java","c","cpp","csharp","go","rust","ruby","php","swift","kotlin","bash","powershell","html","css","json","yaml","toml","sql","markdown","dockerfile","diff","graphql","terraform",...Object.keys(Kc)];var Is=["svg","png","jpg","jpeg","gif","webp","avif","bmp","ico","tif","tiff"],Ns=["mp4","webm","mov","m4v","ogv"],Os=["mp3","wav","ogg","m4a","flac","aac"],hx={media:[...Is,...Ns,...Os,"pdf","dxf"],images:Is,video:Ns,audio:Os,codes:[...hi,...hi.map(Cs),"svg","yml","htm","sh","h","hpp","rs","rb","kt","tf"],diagrams:["svg","dxf","mermaid","graphth","schemath"],tables:["csv","tsv"],documents:["md","markdown","txt","pdf","html","htm","termth"]};var Rs=(e,n)=>n==="."||e.startsWith(`${n}/`);var Yc=e=>/^https?:\/\//i.test(e);var wn=e=>{if(!Yc(e))return e.split("/").at(-1)??e;try{let n=new URL(e),t=n.pathname.endsWith(".git")&&n.hash.includes(":")?n.hash.slice(n.hash.indexOf(":")+1):n.pathname;return decodeURIComponent(t.split("/").at(-1)||n.hostname)}catch{return e}};var Jc=Object.defineProperty;var Qc=(e,n)=>{for(var t in n)Jc(e,t,{get:n[t],enumerable:!0})};var Xc={};Qc(Xc,{Graph:()=>yi,alg:()=>bi});var Zc=Object.defineProperty,Ds=(e,n)=>{for(var t in n)Zc(e,t,{get:n[t],enumerable:!0})},gi=class{constructor(e){this._isDirected=!0,this._isMultigraph=!1,this._isCompound=!1,this._nodes={},this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={},this._nodeCount=0,this._edgeCount=0,this._defaultNodeLabelFn=()=>{},this._defaultEdgeLabelFn=()=>{},e&&(this._isDirected="directed"in e?e.directed:!0,this._isMultigraph="multigraph"in e?e.multigraph:!1,this._isCompound="compound"in e?e.compound:!1),this._isCompound&&(this._parent={},this._children={},this._children["\0"]={})}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(e){return this._label=e,this}graph(){return this._label}setDefaultNodeLabel(e){return typeof e!="function"?this._defaultNodeLabelFn=()=>e:this._defaultNodeLabelFn=e,this}nodeCount(){return this._nodeCount}nodes(){return Object.keys(this._nodes)}sources(){return this.nodes().filter(e=>Object.keys(this._in[e]).length===0)}sinks(){return this.nodes().filter(e=>Object.keys(this._out[e]).length===0)}setNodes(e,n){return e.forEach(t=>{n!==void 0?this.setNode(t,n):this.setNode(t)}),this}setNode(e,n){return e in this._nodes?(arguments.length>1&&(this._nodes[e]=n),this):(this._nodes[e]=arguments.length>1?n:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]="\0",this._children[e]={},this._children["\0"][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)}node(e){return this._nodes[e]}hasNode(e){return e in this._nodes}removeNode(e){if(e in this._nodes){let n=t=>this.removeEdge(this._edgeObjs[t]);delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],this.children(e).forEach(t=>{this.setParent(t)}),delete this._children[e]),Object.keys(this._in[e]).forEach(n),delete this._in[e],delete this._preds[e],Object.keys(this._out[e]).forEach(n),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this}setParent(e,n){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(n===void 0)n="\0";else{n+="";for(let t=n;t!==void 0;t=this.parent(t))if(t===e)throw new Error("Setting "+n+" as parent of "+e+" would create a cycle");this.setNode(n)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=n,this._children[n][e]=!0,this}parent(e){if(this._isCompound){let n=this._parent[e];if(n!=="\0")return n}}children(e="\0"){if(this._isCompound){let n=this._children[e];if(n)return Object.keys(n)}else{if(e==="\0")return this.nodes();if(this.hasNode(e))return[]}return[]}predecessors(e){let n=this._preds[e];if(n)return Object.keys(n)}successors(e){let n=this._sucs[e];if(n)return Object.keys(n)}neighbors(e){let n=this.predecessors(e);if(n){let t=new Set(n),r=this.successors(e);if(r)for(let i of r)t.add(i);return Array.from(t.values())}}isLeaf(e){var n;let t;return this.isDirected()?t=this.successors(e):t=this.neighbors(e),((n=t?.length)!=null?n:0)===0}filterNodes(e){let n=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});n.setGraph(this.graph()),Object.entries(this._nodes).forEach(([i,o])=>{e(i)&&n.setNode(i,o)}),Object.values(this._edgeObjs).forEach(i=>{n.hasNode(i.v)&&n.hasNode(i.w)&&n.setEdge(i,this.edge(i))});let t={},r=i=>{let o=this.parent(i);return!o||n.hasNode(o)?(t[i]=o,o):o in t?t[o]:r(o)};return this._isCompound&&n.nodes().forEach(i=>n.setParent(i,r(i))),n}setDefaultEdgeLabel(e){return typeof e!="function"?this._defaultEdgeLabelFn=()=>e:this._defaultEdgeLabelFn=e,this}edgeCount(){return this._edgeCount}edges(){return Object.values(this._edgeObjs)}setPath(e,n){return e.reduce((t,r)=>(n!==void 0?this.setEdge(t,r,n):this.setEdge(t,r),r)),this}setEdge(e,n,t,r){let i,o,s,a,l=!1;typeof e=="object"&&e!==null&&"v"in e?(i=e.v,o=e.w,s=e.name,arguments.length===2&&(a=n,l=!0)):(i=e,o=n,s=r,arguments.length>2&&(a=t,l=!0)),i=""+i,o=""+o,s!==void 0&&(s=""+s);let u=kn(this._isDirected,i,o,s);if(u in this._edgeLabels)return l&&(this._edgeLabels[u]=a),this;if(s!==void 0&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(i),this.setNode(o),this._edgeLabels[u]=l?a:this._defaultEdgeLabelFn(i,o,s);let c=eu(this._isDirected,i,o,s);return i=c.v,o=c.w,Object.freeze(c),this._edgeObjs[u]=c,Ps(this._preds[o],i),Ps(this._sucs[i],o),this._in[o][u]=c,this._out[i][u]=c,this._edgeCount++,this}edge(e,n,t){let r=arguments.length===1?pi(this._isDirected,e):kn(this._isDirected,e,n,t);return this._edgeLabels[r]}edgeAsObj(e,n,t){let r=arguments.length===1?this.edge(e):this.edge(e,n,t);return typeof r!="object"||r===null?{label:r}:r}hasEdge(e,n,t){return(arguments.length===1?pi(this._isDirected,e):kn(this._isDirected,e,n,t))in this._edgeLabels}removeEdge(e,n,t){let r=arguments.length===1?pi(this._isDirected,e):kn(this._isDirected,e,n,t),i=this._edgeObjs[r];if(i){let o=i.v,s=i.w;delete this._edgeLabels[r],delete this._edgeObjs[r],Fs(this._preds[s],o),Fs(this._sucs[o],s),delete this._in[s][r],delete this._out[o][r],this._edgeCount--}return this}inEdges(e,n){return this.isDirected()?this.filterEdges(this._in[e],e,n):this.nodeEdges(e,n)}outEdges(e,n){return this.isDirected()?this.filterEdges(this._out[e],e,n):this.nodeEdges(e,n)}nodeEdges(e,n){if(e in this._nodes)return this.filterEdges({...this._in[e],...this._out[e]},e,n)}_removeFromParentsChildList(e){delete this._children[this._parent[e]][e]}filterEdges(e,n,t){if(!e)return;let r=Object.values(e);return t?r.filter(i=>i.v===n&&i.w===t||i.v===t&&i.w===n):r}};function Ps(e,n){e[n]?e[n]++:e[n]=1}function Fs(e,n){e[n]!==void 0&&!--e[n]&&delete e[n]}function kn(e,n,t,r){let i=""+n,o=""+t;if(!e&&i>o){let s=i;i=o,o=s}return i+""+o+""+(r===void 0?"\0":r)}function eu(e,n,t,r){let i=""+n,o=""+t;if(!e&&i>o){let a=i;i=o,o=a}let s={v:i,w:o};return r&&(s.name=r),s}function pi(e,n){return kn(e,n.v,n.w,n.name)}var tu={};Ds(tu,{read:()=>ou,write:()=>nu});function nu(e){let n={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:ru(e),edges:iu(e)},t=e.graph();return t!==void 0&&(n.value=structuredClone(t)),n}function ru(e){return e.nodes().map(n=>{let t=e.node(n),r=e.parent(n),i={v:n};return t!==void 0&&(i.value=t),r!==void 0&&(i.parent=r),i})}function iu(e){return e.edges().map(n=>{let t=e.edge(n),r={v:n.v,w:n.w};return n.name!==void 0&&(r.name=n.name),t!==void 0&&(r.value=t),r})}function ou(e){let n=new gi(e.options);return e.value!==void 0&&n.setGraph(e.value),e.nodes.forEach(t=>{n.setNode(t.v,t.value),t.parent&&n.setParent(t.v,t.parent)}),e.edges.forEach(t=>{n.setEdge({v:t.v,w:t.w,name:t.name},t.value)}),n}var bi={};Ds(bi,{CycleException:()=>ar,bellmanFord:()=>js,components:()=>lu,dijkstra:()=>sr,dijkstraAll:()=>du,findCycles:()=>fu,floydWarshall:()=>hu,isAcyclic:()=>gu,postorder:()=>yu,preorder:()=>wu,prim:()=>ku,shortestPaths:()=>xu,tarjan:()=>Bs,topsort:()=>Hs});var su=()=>1;function js(e,n,t,r){return au(e,String(n),t||su,r||function(i){var o;return(o=e.outEdges(i))!=null?o:[]})}function au(e,n,t,r){let i={},o,s=0,a=e.nodes(),l=function(d){let m=i[d.v],f=i[d.w];if(!m||!f)return;let h=t(d);m.distance+h<f.distance&&(i[d.w]={distance:m.distance+h,predecessor:d.v},o=!0)},u=function(){a.forEach(function(d){r(d).forEach(function(m){let f=m.v===d?m.v:m.w,h=f===m.v?m.w:m.v;l({v:f,w:h})})})};a.forEach(function(d){let m=d===n?0:Number.POSITIVE_INFINITY;i[d]={distance:m,predecessor:""}});let c=a.length;for(let d=1;d<c&&(o=!1,s++,u(),!!o);d++);if(s===c-1&&(o=!1,u(),o))throw new Error("The graph contains a negative weight cycle");return i}function lu(e){let n={},t=[],r;function i(o){var s,a;o in n||(n[o]=!0,r.push(o),(s=e.successors(o))==null||s.forEach(i),(a=e.predecessors(o))==null||a.forEach(i))}return e.nodes().forEach(function(o){r=[],i(o),r.length&&t.push(r)}),t}var qs=class{constructor(){this._arr=[],this._keyIndices={}}size(){return this._arr.length}keys(){return this._arr.map(e=>e.key)}has(e){return e in this._keyIndices}priority(e){let n=this._keyIndices[e];if(n!==void 0)return this._arr[n].priority}min(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key}add(e,n){let t=this._keyIndices,r=String(e);if(!(r in t)){let i=this._arr,o=i.length;return t[r]=o,i.push({key:r,priority:n}),this._decrease(o),!0}return!1}removeMin(){if(this.size()===0)throw new Error("Queue underflow");this._swap(0,this._arr.length-1);let e=this._arr.pop();return delete this._keyIndices[e.key],this._heapify(0),e.key}decrease(e,n){let t=this._keyIndices[e];if(t===void 0)throw new Error(`Key not found: ${e}`);let r=this._arr[t].priority;if(n>r)throw new Error(`New priority is greater than current priority. Key: ${e} Old: ${r} New: ${n}`);this._arr[t].priority=n,this._decrease(t)}_heapify(e){let n=this._arr,t=2*e,r=t+1,i=e;t<n.length&&(i=n[t].priority<n[i].priority?t:i,r<n.length&&(i=n[r].priority<n[i].priority?r:i),i!==e&&(this._swap(e,i),this._heapify(i)))}_decrease(e){let n=this._arr,t=n[e].priority,r;for(;e!==0&&(r=e>>1,!(n[r].priority<t));)this._swap(e,r),e=r}_swap(e,n){let t=this._arr,r=this._keyIndices,i=t[e],o=t[n];t[e]=o,t[n]=i,r[o.key]=e,r[i.key]=n}},cu=()=>1;function sr(e,n,t,r){let i=function(o){var s;return(s=e.outEdges(o))!=null?s:[]};return uu(e,String(n),t||cu,r||i)}function uu(e,n,t,r){let i={},o=new qs,s,a,l=function(u){let c=u.v!==s?u.v:u.w,d=i[c];if(!d)return;let m=t(u),f=a.distance+m;if(m<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+u+" Weight: "+m);f<d.distance&&(d.distance=f,d.predecessor=s,o.decrease(c,f))};for(e.nodes().forEach(function(u){let c=u===n?0:Number.POSITIVE_INFINITY;i[u]={distance:c,predecessor:""},o.add(u,c)});o.size()>0;){s=o.removeMin();let u=i[s];if(!u||u.distance===Number.POSITIVE_INFINITY)break;a=u,r(s).forEach(l)}return i}function du(e,n,t){return e.nodes().reduce(function(r,i){return r[i]=sr(e,i,n,t),r},{})}function Bs(e){let n=0,t=[],r={},i=[];function o(s){var a;let l=r[s]={onStack:!0,lowlink:n,index:n++};if(t.push(s),(a=e.successors(s))==null||a.forEach(function(u){if(u in r){let c=r[u];c!=null&&c.onStack&&(l.lowlink=Math.min(l.lowlink,c.index))}else{o(u);let c=r[u];c&&(l.lowlink=Math.min(l.lowlink,c.lowlink))}}),l.lowlink===l.index){let u=[],c;do{c=t.pop();let d=r[c];d&&(d.onStack=!1),u.push(c)}while(s!==c);i.push(u)}}return e.nodes().forEach(function(s){s in r||o(s)}),i}function fu(e){return Bs(e).filter(function(n){var t;let r=n[0];return r?n.length>1||n.length===1&&((t=e.outEdges(r,r))!=null?t:[]).length>0:!1})}var mu=()=>1;function hu(e,n,t){return pu(e,n||mu,t||function(r){var i;return(i=e.outEdges(r))!=null?i:[]})}function pu(e,n,t){let r={},i=e.nodes();return i.forEach(function(o){let s={};r[o]=s,s[o]={distance:0,predecessor:""},i.forEach(function(a){o!==a&&(s[a]={distance:Number.POSITIVE_INFINITY,predecessor:""})}),t(o).forEach(function(a){let l=a.v===o?a.w:a.v,u=n(a);s[l]={distance:u,predecessor:o}})}),i.forEach(function(o){let s=r[o];s&&i.forEach(function(a){let l=r[a];l&&i.forEach(function(u){let c=l[o],d=s[u],m=l[u];if(c&&d&&m){let f=c.distance+d.distance;f<m.distance&&(m.distance=f,m.predecessor=d.predecessor)}})})}),r}var ar=class extends Error{constructor(e){super(e),this.name="CycleException"}};function Hs(e){let n={},t={},r=[];function i(o){var s;if(o in t)throw new ar;o in n||(t[o]=!0,n[o]=!0,(s=e.predecessors(o))==null||s.forEach(i),delete t[o],r.push(o))}if(e.sinks().forEach(i),Object.keys(n).length!==e.nodeCount())throw new ar;return r}function gu(e){try{Hs(e)}catch(n){if(n instanceof ar)return!1;throw n}return!0}function bu(e,n,t,r,i){Array.isArray(n)||(n=[n]);let o=(a=>{var l;return(l=e.isDirected()?e.successors(a):e.neighbors(a))!=null?l:[]}),s={};return n.forEach(function(a){if(!e.hasNode(a))throw new Error("Graph does not have node: "+a);i=zs(e,a,t==="post",s,o,r,i)}),i}function zs(e,n,t,r,i,o,s){return n in r||(r[n]=!0,t||(s=o(s,n)),i(n).forEach(function(a){s=zs(e,a,t,r,i,o,s)}),t&&(s=o(s,n))),s}function Us(e,n,t){return bu(e,n,t,function(r,i){return r.push(i),r},[])}function yu(e,n){return Us(e,n,"post")}function wu(e,n){return Us(e,n,"pre")}function ku(e,n){var t;let r=new gi,i={},o=new qs,s;function a(c){let d=c.v===s?c.w:c.v,m=o.priority(d);if(m!==void 0){let f=n(c);f<m&&(i[d]=s,o.decrease(d,f))}}if(e.nodeCount()===0)return r;e.nodes().forEach(function(c){o.add(c,Number.POSITIVE_INFINITY),r.setNode(c)});let l=e.nodes()[0];l!==void 0&&o.decrease(l,0);let u=!1;for(;o.size()>0;){if(s=o.removeMin(),s in i)r.setEdge(s,i[s]);else{if(u)throw new Error("Input graph is not connected: "+e);u=!0}(t=e.nodeEdges(s))==null||t.forEach(a)}return r}function xu(e,n,t,r){return vu(e,n,t,r??(i=>{var o;return(o=e.outEdges(i))!=null?o:[]}))}function vu(e,n,t,r){if(t===void 0)return sr(e,n,t,r);let i=!1,o=e.nodes();for(let s=0;s<o.length;s++){let a=o[s];if(a===void 0)continue;let l=r(a);for(let u=0;u<l.length;u++){let c=l[u];if(!c)continue;let d=c.v===a?c.v:c.w,m=d===c.v?c.w:c.v;t({v:d,w:m})<0&&(i=!0)}if(i)return js(e,n,t,r)}return sr(e,n,t,r)}var yi=gi;function Su(e){let n=new yi().setGraph(e.graph());return e.nodes().forEach(t=>n.setNode(t,e.node(t))),e.edges().forEach(t=>{let r=n.edge(t.v,t.w)||{weight:0,minlen:1},i=e.edge(t);n.setEdge(t.v,t.w,{weight:r.weight+i.weight,minlen:Math.max(r.minlen,i.minlen)})}),n}function Eu(e,n=Vs){let t=[];for(let r=0;r<e.length;r+=n){let i=e.slice(r,r+n);t.push(i)}return t}var Vs=65535;function Cu(e,n){if(n.length>Vs){let t=Eu(n);return e(...t.map(r=>e(...r)))}else return e(...n)}function Lu(e){let n={};function t(r){let i=e.node(r);if(Object.hasOwn(n,r))return i.rank;n[r]=!0;let o=e.outEdges(r),s=o?o.map(l=>l==null?Number.POSITIVE_INFINITY:t(l.w)-e.edge(l).minlen):[],a=Cu(Math.min,s);return a===Number.POSITIVE_INFINITY&&(a=0),i.rank=a}e.sources().forEach(t)}function tn(e,n){return e.node(n.w).rank-e.node(n.v).rank-e.edge(n).minlen}var Au=$u;function $u(e){let n=new yi({directed:!1}),t=e.nodes();if(t.length===0)throw new Error("Graph must have at least one node");let r=t[0],i=e.nodeCount();n.setNode(r,{});let o,s;for(;Mu(n,e)<i&&(o=Tu(n,e),!!o);)s=n.hasNode(o.v)?tn(e,o):-tn(e,o),Iu(n,e,s);return n}function Mu(e,n){function t(r){let i=n.nodeEdges(r);i&&i.forEach(o=>{let s=o.v,a=r===s?o.w:s;!e.hasNode(a)&&!tn(n,o)&&(e.setNode(a,{}),e.setEdge(r,a,{}),t(a))})}return e.nodes().forEach(t),e.nodeCount()}function Tu(e,n){return n.edges().reduce((t,r)=>{let i=Number.POSITIVE_INFINITY;return e.hasNode(r.v)!==e.hasNode(r.w)&&(i=tn(n,r)),i<t[0]?[i,r]:t},[Number.POSITIVE_INFINITY,null])[1]}function Iu(e,n,t){e.nodes().forEach(r=>n.node(r).rank+=t)}var{preorder:Nu,postorder:Ou}=bi;nn.initLowLimValues=ki;nn.initCutValues=wi;nn.calcCutValue=Gs;nn.leaveEdge=Ws;nn.enterEdge=Ys;nn.exchangeEdges=Js;function nn(e){e=Su(e),Lu(e);let n=Au(e);ki(n),wi(n,e);let t,r;for(;t=Ws(n);)r=Ys(n,e,t),Js(n,e,t,r)}function wi(e,n){let t=Ou(e,e.nodes());t=t.slice(0,t.length-1),t.forEach(r=>Ru(e,n,r))}function Ru(e,n,t){let r=e.node(t).parent,i=e.edge(t,r);i.cutvalue=Gs(e,n,t)}function Gs(e,n,t){let r=e.node(t).parent,i=!0,o=n.edge(t,r),s=0;o||(i=!1,o=n.edge(r,t)),s=o.weight;let a=n.nodeEdges(t);return a&&a.forEach(l=>{let u=l.v===t,c=u?l.w:l.v;if(c!==r){let d=u===i,m=n.edge(l).weight;if(s+=d?m:-m,Fu(e,t,c)){let f=e.edge(t,c).cutvalue;s+=d?-f:f}}}),s}function ki(e,n){arguments.length<2&&(n=e.nodes()[0]),Ks(e,{},1,n)}function Ks(e,n,t,r,i){let o=t,s=e.node(r);n[r]=!0;let a=e.neighbors(r);return a&&a.forEach(l=>{Object.hasOwn(n,l)||(t=Ks(e,n,t,l,r))}),s.low=o,s.lim=t++,i?s.parent=i:delete s.parent,t}function Ws(e){return e.edges().find(n=>e.edge(n).cutvalue<0)}function Ys(e,n,t){let r=t.v,i=t.w;n.hasEdge(r,i)||(r=t.w,i=t.v);let o=e.node(r),s=e.node(i),a=o,l=!1;return o.lim>s.lim&&(a=s,l=!0),n.edges().filter(u=>l===_s(e,e.node(u.v),a)&&l!==_s(e,e.node(u.w),a)).reduce((u,c)=>tn(n,c)<tn(n,u)?c:u)}function Js(e,n,t,r){let i=t.v,o=t.w;e.removeEdge(i,o),e.setEdge(r.v,r.w,{}),ki(e),wi(e,n),Pu(e,n)}function Pu(e,n){let t=e.nodes().find(i=>!e.node(i).parent);if(!t)return;let r=Nu(e,[t]);r=r.slice(1),r.forEach(i=>{let o=e.node(i).parent,s=n.edge(i,o),a=!1;s||(s=n.edge(o,i),a=!0),n.node(i).rank=n.node(o).rank+(a?s.minlen:-s.minlen)})}function Fu(e,n,t){return e.hasEdge(n,t)}function _s(e,n,t){return t.low<=n.lim&&n.lim<=t.lim}var lr={nodeH:40,minW:128,padX:14,gapY:20,gapBandX:60,gapRegionY:40,framePad:13,frameLabelH:22,margin:16,corner:7,radius:10,legendH:24,baselineDrop:4.5,verticalEps:8},Bu=lr.margin,_x=lr.gapRegionY,Dx=lr.frameLabelH,jx=lr.framePad;var Qs="M2 5h6l2 2h8v10H2Z";var xn='<svg class="ic-ok" viewBox="0 0 20 20" width="14" height="14" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m4 10 4 4 8-8"/></svg>';var Ue=e=>`<svg class="nav-icon" viewBox="0 0 20 20" width="18" height="18" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">${e}</svg>`,Bx=Ue('<path d="m8 4 1.8 4.2L14 10l-4.2 1.8L8 16l-1.8-4.2L2 10l4.2-1.8ZM15 2v5m-2.5-2.5h5M16 13v4m-2-2h4"/>'),Xs=Ue('<path d="m6 6-4 4 4 4M14 6l4 4-4 4"/><circle cx="10" cy="10" r="2"/>'),Hx={codeblocks:Ue('<path d="m7 6-4 4 4 4M13 6l4 4-4 4"/>'),urls:Ue('<path d="M8.5 11.5a3 3 0 0 0 4.2 0l3-3a3 3 0 0 0-4.2-4.2l-1 1M11.5 8.5a3 3 0 0 0-4.2 0l-3 3a3 3 0 0 0 4.2 4.2l1-1"/>'),"url-previews":Ue('<rect x="3" y="4" width="14" height="12" rx="1.5"/><path d="M3 8h14M6 12.5h5"/>'),skills:Ue('<path d="M5 2.5h7l3 3v12H5ZM12 2.5V6h3M7.5 11l1.5 1.5 3.5-4"/>'),csv:Ue('<rect x="3" y="4" width="14" height="12" rx="1"/><path d="M3 8h14M3 12h14M8 4v12"/>'),tsv:Ue('<path d="M3 6h8M3 10h8M3 14h8M13.5 7l3 3-3 3M17 5v10"/>'),mermaid:Ue('<rect x="3" y="3" width="6" height="4" rx="1"/><rect x="11" y="13" width="6" height="4" rx="1"/><path d="M6 7v6a2 2 0 0 0 2 2h3"/>'),callouth:Ue('<path d="M4 4h12v9H9l-4 3v-3H4Z"/>'),schemath:Ue('<ellipse cx="10" cy="5" rx="6" ry="2.5"/><path d="M4 5v10c0 1.4 2.7 2.5 6 2.5s6-1.1 6-2.5V5M4 10c0 1.4 2.7 2.5 6 2.5s6-1.1 6-2.5"/>'),graphth:Ue('<circle cx="5" cy="10" r="2"/><circle cx="15" cy="5" r="2"/><circle cx="15" cy="15" r="2"/><path d="m6.8 9.1 6.4-3.2M6.8 10.9l6.4 3.2"/>'),termth:Ue('<path d="M5 3h10v14H5Z"/><path d="m8 12 2-5 2 5M8.7 10.5h2.6"/>')};var xe=yt(/[A-Za-z]/),Se=yt(/[\dA-Za-z]/),Zs=yt(/[#-'*+\--9=?A-Z^-~]/);function Ot(e){return e!==null&&(e<32||e===127)}var vn=yt(/\d/),ea=yt(/[\dA-Fa-f]/),cr=yt(/[!-/:-@[-`{-~]/);function F(e){return e!==null&&e<-2}function ae(e){return e!==null&&(e<0||e===32)}function V(e){return e===-2||e===-1||e===32}var Rt=yt(/\p{P}|\p{S}/u),nt=yt(/\s/);function yt(e){return n;function n(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}var na=Qo(ta(),1),Sn=Object.assign(Pt(Error),{eval:Pt(EvalError),range:Pt(RangeError),reference:Pt(ReferenceError),syntax:Pt(SyntaxError),type:Pt(TypeError),uri:Pt(URIError)});function Pt(e){return n.displayName=e.displayName||e.name,n;function n(t,...r){let i=t&&(0,na.default)(t,...r);return new e(i)}}var ur={}.hasOwnProperty,ra={yaml:"-",toml:"+"};function rn(e){let n=[],t=-1,r=Array.isArray(e)?e:e?[e]:["yaml"];for(;++t<r.length;)n[t]=Hu(r[t]);return n}function Hu(e){let n=e;if(typeof n=="string"){if(!ur.call(ra,n))throw Sn("Missing matter definition for `%s`",n);n={type:n,marker:ra[n]}}else if(typeof n!="object")throw Sn("Expected matter to be an object, not `%j`",n);if(!ur.call(n,"type"))throw Sn("Missing `type` in matter `%j`",n);if(!ur.call(n,"fence")&&!ur.call(n,"marker"))throw Sn("Missing `marker` or `fence` in matter `%j`",n);return n}function Si(e){let n=rn(e),t={},r=-1;for(;++r<n.length;){let i=n[r],o=vi(i,"open").charCodeAt(0),s=zu(i),a=t[o];Array.isArray(a)?a.push(s):t[o]=[s]}return{flow:t}}function zu(e){let n=e.anywhere,t=e.type,r=t+"Fence",i=r+"Sequence",o=t+"Value",s={tokenize:c,partial:!0},a,l=0;return{tokenize:u,concrete:!0};function u(d,m,f){let h=this;return b;function b(M){let W=h.now();return W.column===1&&(W.line===1||n)&&(a=vi(e,"open"),l=0,M===a.charCodeAt(l))?(d.enter(t),d.enter(r),d.enter(i),w(M)):f(M)}function w(M){return l===a.length?(d.exit(i),V(M)?(d.enter("whitespace"),y(M)):C(M)):M===a.charCodeAt(l++)?(d.consume(M),w):f(M)}function y(M){return V(M)?(d.consume(M),y):(d.exit("whitespace"),C(M))}function C(M){return F(M)?(d.exit(r),d.enter("lineEnding"),d.consume(M),d.exit("lineEnding"),a=vi(e,"close"),l=0,d.attempt(s,S,k)):f(M)}function k(M){return M===null||F(M)?R(M):(d.enter(o),O(M))}function O(M){return M===null||F(M)?(d.exit(o),R(M)):(d.consume(M),O)}function R(M){return M===null?f(M):(d.enter("lineEnding"),d.consume(M),d.exit("lineEnding"),d.attempt(s,S,k))}function S(M){return d.exit(t),m(M)}}function c(d,m,f){let h=0;return b;function b(k){return k===a.charCodeAt(h)?(d.enter(r),d.enter(i),w(k)):f(k)}function w(k){return h===a.length?(d.exit(i),V(k)?(d.enter("whitespace"),y(k)):C(k)):k===a.charCodeAt(h++)?(d.consume(k),w):f(k)}function y(k){return V(k)?(d.consume(k),y):(d.exit("whitespace"),C(k))}function C(k){return k===null||F(k)?(d.exit(r),m(k)):f(k)}}}function vi(e,n){return e.marker?ia(e.marker,n).repeat(3):ia(e.fence,n)}function ia(e,n){return typeof e=="string"?e:e[n]}function En(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function Ci(e){let n=rn(e),t={},r={},i=-1;for(;++i<n.length;){let o=n[i];t[o.type]=Uu(o),r[o.type]=Vu,r[o.type+"Value"]=Gu}return{enter:t,exit:r}}function Uu(e){return n;function n(t){this.enter({type:e.type,value:""},t),this.buffer()}}function Vu(e){let n=this.resume(),t=this.stack[this.stack.length-1];"value"in t,this.exit(e),t.value=n.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,"")}function Gu(e){this.config.enter.data.call(this,e),this.config.exit.data.call(this,e)}function Li(e){let n=[],t={},r=rn(e),i=-1;for(;++i<r.length;){let o=r[i];t[o.type]=Ku(o);let s=Ei(o,"open");n.push({atBreak:!0,character:s.charAt(0),after:En(s.charAt(1))})}return{unsafe:n,handlers:t}}function Ku(e){let n=Ei(e,"open"),t=Ei(e,"close");return r;function r(i){return n+(i.value?`
|
|
80
80
|
`+i.value:"")+`
|
|
81
81
|
`+t}}function Ei(e,n){return e.marker?oa(e.marker,n).repeat(3):oa(e.fence,n)}function oa(e,n){return typeof e=="string"?e:e[n]}var Wu="yaml";function dr(e){let n=this,t=e||Wu,r=n.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),s=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(Si(t)),o.push(Ci(t)),s.push(Li(t))}function Ai(e,n){let t=String(e);if(typeof n!="string")throw new TypeError("Expected character");let r=0,i=t.indexOf(n);for(;i!==-1;)r++,i=t.indexOf(n,i+n.length);return r}var wt=(function(e){if(e==null)return Xu;if(typeof e=="function")return fr(e);if(typeof e=="object")return Array.isArray(e)?Yu(e):Ju(e);if(typeof e=="string")return Qu(e);throw new Error("Expected function, string, or object as test")});function Yu(e){let n=[],t=-1;for(;++t<e.length;)n[t]=wt(e[t]);return fr(r);function r(...i){let o=-1;for(;++o<n.length;)if(n[o].apply(this,i))return!0;return!1}}function Ju(e){let n=e;return fr(t);function t(r){let i=r,o;for(o in e)if(i[o]!==n[o])return!1;return!0}}function Qu(e){return fr(n);function n(t){return t&&t.type===e}}function fr(e){return n;function n(t,r,i){return!!(Zu(t)&&e.call(this,t,typeof r=="number"?r:void 0,i||void 0))}}function Xu(){return!0}function Zu(e){return e!==null&&typeof e=="object"&&"type"in e}var aa=[],mr=!0,kt=!1,Ft="skip";function on(e,n,t,r){if(!e||typeof e!="object")throw new Error("Unexpected value `"+e+"` for `tree`, expected node");let i=!0,o,s,a,l;if(typeof t=="function"||t&&typeof t=="object"?(o=n,s=t,r&&(i=!1)):(s=n,t&&(i=!1)),typeof s=="function")a=s;else if(s&&typeof s=="object"){if(!(s.enter===null||s.enter===void 0))if(typeof s.enter=="function")a=s.enter;else throw new Error("Unexpected value `"+s.enter+"` for `visitors.enter`, expected optional visitor");if(typeof s.exit=="function")l=s.exit;else throw new Error("Unexpected value `"+s.exit+"` for `visitors.exit`, expected visitor (pass a visitor directly if you only want an enter visitor)")}else throw new Error("Unexpected value `"+s+"` for `enter` or `visitors`, expected visitor or object with visitors");let u=wt(o),c=i?1:-1;d(e,void 0,[])();function d(m,f,h){let b=m&&typeof m=="object"?m:{};if(typeof b.type=="string"){let y=typeof b.tagName=="string"?b.tagName:typeof b.name=="string"?b.name:void 0;Object.defineProperty(w,"name",{value:"node ("+(m.type+(y?"<"+y+">":""))+")"})}return w;function w(){let y=!o||u(m,f,h[h.length-1]||void 0),C=aa;if(a&&y&&(C=sa(a(m,h,f)),C[0]===kt))return C;if("children"in m&&m.children){let k=m;if(k.children&&C[0]!==Ft){let O=(i?-1:k.children.length)+c,R=[...h,k];for(;O>-1&&O<k.children.length;){let S=k.children[O],M=d(S,O,R)();if(M[0]===kt)return M;O=typeof M[1]=="number"?M[1]:O+c}}}if(l&&y){let k=sa(l(m,h,f));if(k[0]===Ft)throw new Error("Unexpected value `"+k[0]+"` from `exit`, expected `CONTINUE`, `EXIT`, index, or nothing");if(k[0]===kt||typeof k[1]=="number")return k}return C}}}function sa(e){return Array.isArray(e)?e:typeof e=="number"?[mr,e]:e==null?aa:[e]}function $i(e,n,t){let i=wt((t||{}).ignore||[]),o=ed(n),s=-1;for(;++s<o.length;)on(e,a);function a(u,c,d){if(u.type==="text"&&typeof d=="number")return l(u,c,d);if(i(u,d,c[c.length-1]))return Ft}function l(u,c,d){let m=c[c.length-1],f=o[s][0],h=o[s][1],b=0,w=!1,y=[];f.lastIndex=0;let C=f.exec(u.value);for(;C;){let O=C.index,R={index:C.index,input:C.input,stack:[...c,u]},S=h(...C,R);if(typeof S=="string"&&(S=S.length>0?{type:"text",value:S}:void 0),S===!1)f.lastIndex=O+1;else{if(b!==O&&k({type:"text",value:u.value.slice(b,O)}),Array.isArray(S))for(let M of S)k(M);else S&&k(S);b=O+C[0].length,w=!0}if(!f.global)break;C=f.exec(u.value)}return w?(b<u.value.length&&k({type:"text",value:u.value.slice(b)}),m.children.splice(d,1,...y)):y=[u],d+y.length;function k(O){let R=y[y.length-1];R&&R.type==="text"&&O.type==="text"?R.value+=O.value:y.push(O)}}}function ed(e){if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");let n=[],t=!e[0]||Array.isArray(e[0])?e:[e],r=-1;for(;++r<t.length;){let i=t[r];n.push([td(i[0]),nd(i[1])])}return n}function td(e){return typeof e=="string"?new RegExp(En(e),"g"):e}function nd(e){return typeof e=="function"?e:function(){return e}}var Mi="phrasing",Ti=["autolink","link","image","label"];function Ni(){return{transforms:[ld],enter:{literalAutolink:rd,literalAutolinkEmail:Ii,literalAutolinkHttp:Ii,literalAutolinkWww:Ii},exit:{literalAutolink:ad,literalAutolinkEmail:sd,literalAutolinkHttp:id,literalAutolinkWww:od}}}function Oi(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Mi,notInConstruct:Ti},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Mi,notInConstruct:Ti},{character:":",before:"[ps]",after:"\\/",inConstruct:Mi,notInConstruct:Ti}]}}function rd(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Ii(e){this.config.enter.autolinkProtocol.call(this,e)}function id(e){this.config.exit.autolinkProtocol.call(this,e)}function od(e){this.config.exit.data.call(this,e);let n=this.stack[this.stack.length-1];n.type,n.url="http://"+this.sliceSerialize(e)}function sd(e){this.config.exit.autolinkEmail.call(this,e)}function ad(e){this.exit(e)}function ld(e){$i(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,cd],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,ud]],{ignore:["link","linkReference"]})}function cd(e,n,t,r,i){let o="";if(!la(i)||(/^w/i.test(n)&&(t=n+t,n="",o="http://"),!dd(t)))return!1;let s=fd(t+r);if(!s[0])return!1;let a={type:"link",title:null,url:o+n+s[0],children:[{type:"text",value:n+s[0]}]};return s[1]?[a,{type:"text",value:s[1]}]:a}function ud(e,n,t,r){return!la(r,!0)||/[-\d_]$/.test(t)?!1:{type:"link",title:null,url:"mailto:"+n+"@"+t,children:[{type:"text",value:n+"@"+t}]}}function dd(e){let n=e.split(".");return!(n.length<2||n[n.length-1]&&(/_/.test(n[n.length-1])||!/[a-zA-Z\d]/.test(n[n.length-1]))||n[n.length-2]&&(/_/.test(n[n.length-2])||!/[a-zA-Z\d]/.test(n[n.length-2])))}function fd(e){let n=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!n)return[e,void 0];e=e.slice(0,n.index);let t=n[0],r=t.indexOf(")"),i=Ai(e,"("),o=Ai(e,")");for(;r!==-1&&i>o;)e+=t.slice(0,r+1),t=t.slice(r+1),r=t.indexOf(")"),o++;return[e,t]}function la(e,n){let t=e.input.charCodeAt(e.index-1);return(e.index===0||nt(t)||Rt(t))&&(!n||t!==47)}function Pe(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}ca.peek=xd;function md(){this.buffer()}function hd(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function pd(){this.buffer()}function gd(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function bd(e){let n=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=Pe(this.sliceSerialize(e)).toLowerCase(),t.label=n}function yd(e){this.exit(e)}function wd(e){let n=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=Pe(this.sliceSerialize(e)).toLowerCase(),t.label=n}function kd(e){this.exit(e)}function xd(){return"["}function ca(e,n,t,r){let i=t.createTracker(r),o=i.move("[^"),s=t.enter("footnoteReference"),a=t.enter("reference");return o+=i.move(t.safe(t.associationId(e),{after:"]",before:o})),a(),s(),o+=i.move("]"),o}function Ri(){return{enter:{gfmFootnoteCallString:md,gfmFootnoteCall:hd,gfmFootnoteDefinitionLabelString:pd,gfmFootnoteDefinition:gd},exit:{gfmFootnoteCallString:bd,gfmFootnoteCall:yd,gfmFootnoteDefinitionLabelString:wd,gfmFootnoteDefinition:kd}}}function Pi(e){let n=!1;return e&&e.firstLineBlank&&(n=!0),{handlers:{footnoteDefinition:t,footnoteReference:ca},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function t(r,i,o,s){let a=o.createTracker(s),l=a.move("[^"),u=o.enter("footnoteDefinition"),c=o.enter("label");return l+=a.move(o.safe(o.associationId(r),{before:l,after:"]"})),c(),l+=a.move("]:"),r.children&&r.children.length>0&&(a.shift(4),l+=a.move((n?`
|
|
82
82
|
`:" ")+o.indentLines(o.containerFlow(r,a.current()),n?ua:vd))),u(),l}}function vd(e,n,t){return n===0?e:ua(e,n,t)}function ua(e,n,t){return(t?"":" ")+e}var Sd=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Di.attention=Ld;Di.peek=Ad;function Fi(){return{canContainEols:["delete"],enter:{strikethrough:Ed},exit:{strikethrough:Cd}}}function _i(){return{handlers:{delete:Di},unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:Sd}]}}function Ed(e){this.enter({type:"delete",children:[],position:void 0},e)}function Cd(e){this.exit(e)}function Di(e,n,t,r){let i=t.createTracker(r),o=t.stack.includes("strikethrough")?"~":"~~",s=t.enter("strikethrough"),a=i.move(o);return a+=t.containerPhrasing(e,{...i.current(),before:a,after:"~"}),a+=i.move(o),s(),a}function Ld(){return{construct:"strikethrough",markers:["~"],sizes:[2,1]}}function Ad(){return"~"}function $d(e){return e.length}function fa(e,n){let t=n||{},r=(t.align||[]).concat(),i=t.stringLength||$d,o=[],s=[],a=[],l=[],u=0,c=-1;for(;++c<e.length;){let b=[],w=[],y=-1;for(e[c].length>u&&(u=e[c].length);++y<e[c].length;){let C=Md(e[c][y]);if(t.alignDelimiters!==!1){let k=i(C);w[y]=k,(l[y]===void 0||k>l[y])&&(l[y]=k)}b.push(C)}s[c]=b,a[c]=w}let d=-1;if(typeof r=="object"&&"length"in r)for(;++d<u;)o[d]=da(r[d]);else{let b=da(r);for(;++d<u;)o[d]=b}d=-1;let m=[],f=[];for(;++d<u;){let b=o[d],w="",y="";b===99?(w=":",y=":"):b===108?w=":":b===114&&(y=":");let C=t.alignDelimiters===!1?1:Math.max(1,l[d]-w.length-y.length),k=w+"-".repeat(C)+y;t.alignDelimiters!==!1&&(C=w.length+C+y.length,C>l[d]&&(l[d]=C),f[d]=C),m[d]=k}s.splice(1,0,m),a.splice(1,0,f),c=-1;let h=[];for(;++c<s.length;){let b=s[c],w=a[c];d=-1;let y=[];for(;++d<u;){let C=b[d]||"",k="",O="";if(t.alignDelimiters!==!1){let R=l[d]-(w[d]||0),S=o[d];S===114?k=" ".repeat(R):S===99?R%2?(k=" ".repeat(R/2+.5),O=" ".repeat(R/2-.5)):(k=" ".repeat(R/2),O=k):O=" ".repeat(R)}t.delimiterStart!==!1&&!d&&y.push("|"),t.padding!==!1&&!(t.alignDelimiters===!1&&C==="")&&(t.delimiterStart!==!1||d)&&y.push(" "),t.alignDelimiters!==!1&&y.push(k),y.push(C),t.alignDelimiters!==!1&&y.push(O),t.padding!==!1&&y.push(" "),(t.delimiterEnd!==!1||d!==u-1)&&y.push("|")}h.push(t.delimiterEnd===!1?y.join("").replace(/ +$/,""):y.join(""))}return h.join(`
|
|
@@ -86,7 +86,7 @@ ${i}${f}`}else return`${m}${s}${d.join(" ")}${s}${f}`}function Zn({indent:e,opti
|
|
|
86
86
|
`,encode:["`"],...s.current()})),d()}return c+=s.move(`
|
|
87
87
|
`),o&&(c+=s.move(o+`
|
|
88
88
|
`)),c+=s.move(a),l(),c}function Id(e,n,t){return(t?"":" ")+e}function sn(e){let n=e.options.quote||'"';if(n!=='"'&&n!=="'")throw new Error("Cannot serialize title with `"+n+"` for `options.quote`, expected `\"`, or `'`");return n}function ka(e,n,t,r){let i=sn(t),o=i==='"'?"Quote":"Apostrophe",s=t.enter("definition"),a=t.enter("label"),l=t.createTracker(r),u=l.move("[");return u+=l.move(t.safe(t.associationId(e),{before:u,after:"]",...l.current()})),u+=l.move("]: "),a(),!e.url||/[\0- \u007F]/.test(e.url)?(a=t.enter("destinationLiteral"),u+=l.move("<"),u+=l.move(t.safe(e.url,{before:u,after:">",...l.current()})),u+=l.move(">")):(a=t.enter("destinationRaw"),u+=l.move(t.safe(e.url,{before:u,after:e.title?" ":`
|
|
89
|
-
`,...l.current()}))),a(),e.title&&(a=t.enter(`title${o}`),u+=l.move(" "+i),u+=l.move(t.safe(e.title,{before:u,after:i,...l.current()})),u+=l.move(i),a()),s(),u}function xa(e){let n=e.options.emphasis||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize emphasis with `"+n+"` for `options.emphasis`, expected `*`, or `_`");return n}function
|
|
89
|
+
`,...l.current()}))),a(),e.title&&(a=t.enter(`title${o}`),u+=l.move(" "+i),u+=l.move(t.safe(e.title,{before:u,after:i,...l.current()})),u+=l.move(i),a()),s(),u}function xa(e){let n=e.options.emphasis||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize emphasis with `"+n+"` for `options.emphasis`, expected `*`, or `_`");return n}function Ve(e){if(e===null||ae(e)||nt(e))return 1;if(Rt(e))return 2}function Cn(e){let n=e.codePointAt(0);return n===void 0?"":String.fromCodePoint(n)}function _t(e){let n=e.codePointAt(e.length-2);return n!==void 0&&n>65535?e.slice(-2):e.slice(-1)}function hr(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Bi(e,n,t){let r=Ve(e),i=Ve(n);return r===void 0?i===void 0?t==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}var pr=["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","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Ln=["pre","script","style","textarea"];function va(e){if(e.charCodeAt(0)!==60)return;let n=e.charCodeAt(1);if(n===33){let a=e.charCodeAt(2);return a===45?2:a===91?5:xe(a)?4:void 0}if(n===63)return 3;let t=n===47,r=t?2:1,i=r,o=e.charCodeAt(i);if(!xe(o))return;for(;o===45||Se(o);)o=e.charCodeAt(++i);let s=e.slice(r,i).toLowerCase();return!t&&o!==47&&Ln.includes(s)?1:pr.includes(s)?6:7}var Nd=new Map([["*",!1],["_",!0]]);function Od(e,n,t){let r=new Set;for(let o of e){let s=t.get(o);if(s&&o.attention&&n.some(a=>a.attention===o.attention))for(let a of s.tokens)r.add(a.attention)}let i=[];for(let o of e)o.attention&&r.delete(o.attention)&&i.push(o.attention);return i.reverse(),i}function Sa(e,n,t){let r=[],i=new Map,o=new Map,s=0;for(;s<e.length;){if(!e[s].attention){s++;continue}let a=e[s].value.charAt(0),l=Nd.get(a),u=s+1;for(;u<e.length&&e[u].attention&&e[u].value.charAt(0)===a;)u++;let c=s?e[s-1].value:n,d=Ve(c.charCodeAt(c.length-1)),m=Ve((u<e.length?e[u].value:t).charCodeAt(0)),f=!m||m===2&&!!d,h=!d||d===2&&!!m,b={tokens:e.slice(s,u),markers:[],start:0,end:0,open:l?f&&(!!d||!h):f,close:l?h&&(!!m||!f):h,split:l!==void 0};for(let w of b.tokens){i.set(w,[...b.tokens]),o.set(w,b);let y=w.value.length;for(;y--;)b.markers.push(w)}b.end=b.markers.length,r.push(b),s=u}for(Pd(r,i),s=-1;++s<e.length;){let a=i.get(e[s]);if(a)return{attention:Od(e,a,o),index:s}}}function gr(e,n){let t=e[n?0:e.length-1];if(!t||t.attention)return;let r=n?Cn(t.value):_t(t.value),i=hr(r.codePointAt(0));if(n)t.value=i+t.value.slice(r.length);else{let o=t.value.slice(0,t.value.length-r.length),s=0;for(;o.charCodeAt(o.length-1-s)===92;)s++;s%2&&(o+="\\"),t.value=o+i}}function Rd(e,n,t,r,i){for(let o of t.attention){let s=n.get(o)||o.sequences[0];for(let a of o.sequences){if(a===s)continue;let l=new Map(n);l.set(o,a);let u=Hi(e,l,r,i),c=Sa(u,r,i);if(!c||c.index>t.index)return{chosen:l,mistake:c,tokens:u}}}}function Pd(e,n){let t=new Map;for(let r of e){let i=r.tokens[0].value.charAt(0),o=t.get(i);o||(o=[],t.set(i,o));let s=r.close?o.length:0;for(;s--&&r.start<r.end;){let a=o[s],l=a.end-a.start,u=r.end-r.start;if(r.split?(a.close||r.open)&&u%3&&!((l+u)%3):l!==a.markers.length||l!==u)continue;let c=r.split?l>1&&u>1?2:1:u,d=a.markers.slice(a.end-c,a.end),m=r.markers.slice(r.start,r.start+c),f=d[0],h=m[0];if(f===d[c-1]&&f.value.length===c&&h===m[c-1]&&h.value.length===c&&f.attention===h.attention)n.delete(f),n.delete(h);else{let b=[...new Set([...d,...m])];for(let w of b){let y=n.get(w);y&&y.push(...b)}}a.end-=c,r.start+=c,a.start===a.end&&o.splice(s,1),s=o.length}r.open&&r.start<r.end&&o.push(r)}}function Fd(e,n,t){if(n.length===0)throw new Error("Cannot serialize `"+e+"` as attention without markers, expected one or more markers");if(t.length===0)throw new Error("Cannot serialize `"+e+"` as attention without sizes, expected one or more sizes");for(let i of t)if(!Number.isSafeInteger(i)||i<1)throw new Error("Cannot serialize `"+e+"` as attention with `"+i+"` as size, expected positive integer");let r=[];for(let i of n){if(i.length!==1)throw new Error("Cannot serialize `"+e+"` as attention with `"+i+"` as marker, expected a single ascii character");if(!cr(i.charCodeAt(0)))throw new Error("Cannot serialize `"+e+"` as attention with `"+i+"` as marker, expected ascii punctuation");for(let o of t)r.push(i.repeat(o))}return r}function _d(e,n,t){let r=n.indexStack,i=e.children||[],o=[],s=-1,a=t.before;r.push(-1);let l=n.createTracker(t);for(;++s<i.length;){let u=i[s],c;if(r[r.length-1]=s,s+1<i.length){let f=n.handle.handlers[i[s+1].type];f&&f.peek&&(f=f.peek),c=f?Cn(f(i[s+1],e,n,{before:"",after:"",...l.current()})):""}else c=t.after;let d=o[o.length-1];typeof d=="string"&&(a==="\r"||a===`
|
|
90
90
|
`)&&u.type==="html"&&va(u.value)!==7&&(o[o.length-1]=d.replace(/(\r?\n|\r)$/," "),a=" ",l=n.createTracker(t),l.move(an(o,t.before,t.after)));let m=n.handle.handlers[u.type];if(m&&m.attention){let f=An(u,m.attention,n,l);o.push(f),a=_t(f.sequences[0])}else{let f=n.handle(u,e,n,{...l.current(),after:c,before:a});if(!f)continue;l.move(f),o.push(f),a=_t(f)}}return r.pop(),o}function An(e,n,t,r){let{construct:i,markers:o,sizes:s}=n(e,t),a=Fd(e.type,o,s),l=a[0],u=t.enter(i);r.move(l);let c=_d(e,t,{...r.current(),before:l,after:l});return r.move(an(c,l,l)),r.move(l),u(),{children:c,sequences:a}}function Hi(e,n,t,r){let i=[],o,s=_t(t),a=-1;for(;++a<e.length;){let l=e[a];if(typeof l=="string"){let k={value:l,attention:void 0};o&&o===Cn(l)&&gr([k],!0),o=void 0,i.push(k),k.value&&(s=_t(k.value));continue}let u=n.get(l)||l.sequences[0],c=u.charAt(0),d=e[a+1],m=s,f=Cn(d===void 0?r:typeof d=="string"?d:n.get(d)||d.sequences[0]),h=Hi(l.children,n,u,u),b=h.length>0?h[0].value:"",w=Bi(m.charCodeAt(m.length-1),b.charCodeAt(0),c);w.inside&&gr(h,!0);let y=h.length>0?_t(h[h.length-1].value):"",C=Bi(f.charCodeAt(0),y.charCodeAt(y.length-1),c);C.inside&&gr(h,!1),w.outside&&m!==`
|
|
91
91
|
`&&m!=="\r"&&gr(i,!1),C.outside&&(o=f),i.push({value:u,attention:l},...h,{value:u,attention:l}),s=u.charAt(u.length-1)}return i}function an(e,n,t){let r=new Map,i=Hi(e,r,n,t),o=i,s=Sa(o,n,t);for(;s;){let l=Rd(e,r,s,n,t);if(!l){o=i;break}r=l.chosen,o=l.tokens,s=l.mistake}let a="";for(let l of o)a+=l.value;return a}br.attention=Ea;br.peek=Dd;function br(e,n,t,r){let i=t.enter("phrasing"),o=An(e,Ea,t,t.createTracker(r)),s=an([o],r.before,r.after);return i(),s}function Ea(e,n){return{construct:"emphasis",markers:xa(n)==="*"?["*","_"]:["_","*"],sizes:[1]}}function Dd(e,n,t){return t.options.emphasis||"*"}function Ui(e,n,t,r){let i,o,s;typeof t=="function"||t&&typeof t=="object"?(i=n,o=t,s=r):(o=n,s=t),typeof o=="function"?on(e,i,zi(o),s):on(e,i,jd(o),s)}function jd(e){return!e||typeof e!="object"?e:{enter:typeof e.enter=="function"?zi(e.enter):e.enter,exit:typeof e.exit=="function"?zi(e.exit):e.exit}}function zi(e){return n;function n(t,r,i){return e(t,i,r[r.length-1])}}var qd={};function Dt(e,n){let t=n||qd,r=typeof t.includeImageAlt=="boolean"?t.includeImageAlt:!0,i=typeof t.includeHtml=="boolean"?t.includeHtml:!0;return La(e,r,i)}function La(e,n,t){if(Bd(e)){if("value"in e)return e.type==="html"&&!t?"":e.value;if(n&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Ca(e.children,n,t)}return Array.isArray(e)?Ca(e,n,t):""}function Ca(e,n,t){let r=[],i=-1;for(;++i<e.length;)r[i]=La(e[i],n,t);return r.join("")}function Bd(e){return!!(e&&typeof e=="object")}function Aa(e,n){let t=!1;return Ui(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return t=!0,kt}),!!((!e.depth||e.depth<3)&&Dt(e)&&(n.options.setext||t))}function $a(e,n,t,r){let i=Math.max(Math.min(6,e.depth||1),1),o=t.createTracker(r);if(Aa(e,t)){let d=t.enter("headingSetext"),m=t.enter("phrasing"),f=t.containerPhrasing(e,{...o.current(),before:`
|
|
92
92
|
`,after:`
|
|
@@ -96,10 +96,10 @@ ${i}${f}`}else return`${m}${s}${d.join(" ")}${s}${f}`}function Zn({indent:e,opti
|
|
|
96
96
|
`,...o.current()}),c=u.charCodeAt(0);return(c===9||c===32)&&(u=hr(c)+u.slice(1)),u=u?s+" "+u:s,t.options.closeAtx&&(u+=" "+s),l(),a(),u}Vi.peek=Hd;function Vi(e){return e.value||""}function Hd(){return"<"}Gi.peek=zd;function Gi(e,n,t,r){let i=sn(t),o=i==='"'?"Quote":"Apostrophe",s=t.enter("image"),a=t.enter("label"),l=t.createTracker(r),u=l.move("![");return u+=l.move(t.safe(e.alt,{before:u,after:"]",...l.current()})),u+=l.move("]("),a(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(a=t.enter("destinationLiteral"),u+=l.move("<"),u+=l.move(t.safe(e.url,{before:u,after:">",...l.current()})),u+=l.move(">")):(a=t.enter("destinationRaw"),u+=l.move(t.safe(e.url,{before:u,after:e.title?" ":")",...l.current()}))),a(),e.title&&(a=t.enter(`title${o}`),u+=l.move(" "+i),u+=l.move(t.safe(e.title,{before:u,after:i,...l.current()})),u+=l.move(i),a()),u+=l.move(")"),s(),u}function zd(){return"!"}Ki.peek=Ud;function Ki(e,n,t,r){let i=e.referenceType,o=t.enter("imageReference"),s=t.enter("label"),a=t.createTracker(r),l=a.move("!["),u=t.safe(e.alt,{before:l,after:"]",...a.current()});l+=a.move(u+"]["),s();let c=t.stack;t.stack=c.filter(function(m){return m!=="phrasing"}),s=t.enter("reference");let d=t.safe(t.associationId(e),{before:l,after:"]",...a.current()});return s(),t.stack=c,o(),i==="full"||!u||u!==d?l+=a.move(d+"]"):i==="shortcut"?l=l.slice(0,-1):l+=a.move("]"),l}function Ud(){return"!"}Wi.peek=Vd;function Wi(e,n,t){let r=e.value||"",i="`",o=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^\n\r ]/.test(r)&&(/^[\n\r ]/.test(r)&&/[\n\r ]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++o<t.unsafe.length;){let s=t.unsafe[o],a=t.compilePattern(s);if(!s.atBreak)continue;let l;for(;l=a.exec(r);){let u=l.index;r.charCodeAt(u)===10&&r.charCodeAt(u-1)===13&&u--,r=r.slice(0,u)+" "+r.slice(l.index+1)}}return i+r+i}function Vd(){return"`"}function Yi(e,n){let t=Dt(e);return!!(!n.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(t===e.url||"mailto:"+t===e.url)&&/^[a-z][+\-.a-z]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}Ji.peek=Gd;function Ji(e,n,t,r){let i=sn(t),o=i==='"'?"Quote":"Apostrophe",s=t.createTracker(r);if(Yi(e,t)){let h=t.stack;t.stack=h.filter(function(y){return y!=="phrasing"});let b=t.enter("autolink"),w=s.move("<");return w+=s.move(t.containerPhrasing(e,{before:w,after:">",...s.current()})),w+=s.move(">"),b(),t.stack=h,w}let a=t.enter("link"),l=t.enter("label"),u=s.move("["),c=t.containerPhrasing(e,{before:u,after:"](",...s.current()});u+=s.move(c),l(),u+=s.move("](");let d=/[\0- \u007F]/.test(e.url),m=r.before.charAt(r.before.length-1),f=e.title||void 0;if(!f&&!d&&(m===`
|
|
97
97
|
`||m==="\r")){let h=0;for(;h<c.length&&c.charCodeAt(h)!==93;)h+=c.charCodeAt(h)===92?2:1;c.charCodeAt(h+1)===58&&(f="")}return!e.url&&typeof f=="string"||d?(l=t.enter("destinationLiteral"),u+=s.move("<"),u+=s.move(t.safe(e.url,{before:u,after:">",...s.current()})),u+=s.move(">")):(l=t.enter("destinationRaw"),u+=s.move(t.safe(e.url,{before:u,after:typeof f=="string"?" ":")",...s.current()}))),l(),typeof f=="string"&&(l=t.enter(`title${o}`),u+=s.move(" "+i),u+=s.move(t.safe(f,{before:u,after:i,...s.current()})),u+=s.move(i),l()),u+=s.move(")"),a(),u}function Gd(e,n,t){return Yi(e,t)?"<":"["}Qi.peek=Kd;function Qi(e,n,t,r){let i=e.referenceType,o=t.enter("linkReference"),s=t.enter("label"),a=t.createTracker(r),l=a.move("["),u=t.containerPhrasing(e,{before:l,after:"]",...a.current()});l+=a.move(u+"]["),s();let c=t.stack;t.stack=c.filter(function(m){return m!=="phrasing"}),s=t.enter("reference");let d=t.safe(t.associationId(e),{before:l,after:"]",...a.current()});return s(),t.stack=c,o(),i==="full"||!u||u!==d?l+=a.move(d+"]"):i==="shortcut"?l=l.slice(0,-1):l+=a.move("]"),l}function Kd(){return"["}function ln(e){let n=e.options.bullet||"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bullet`, expected `*`, `+`, or `-`");return n}function Ma(e){let n=ln(e),t=e.options.bulletOther;if(!t)return n==="*"?"-":"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(t===n)throw new Error("Expected `bullet` (`"+n+"`) and `bulletOther` (`"+t+"`) to be different");return t}function Ta(e){let n=e.options.bulletOrdered||".";if(n!=="."&&n!==")")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOrdered`, expected `.` or `)`");return n}function yr(e){let n=e.options.rule||"*";if(n!=="*"&&n!=="-"&&n!=="_")throw new Error("Cannot serialize rules with `"+n+"` for `options.rule`, expected `*`, `-`, or `_`");return n}function Ia(e,n,t,r){let i=t.enter("list"),o=t.bulletCurrent,s=e.ordered?Ta(t):ln(t),a=e.ordered?s==="."?")":".":Ma(t),l=n&&t.bulletLastUsed?s===t.bulletLastUsed:!1;if(!e.ordered){let c=e.children?e.children[0]:void 0;if((s==="*"||s==="-")&&c&&(!c.children||!c.children[0])&&t.stack[t.stack.length-1]==="list"&&t.stack[t.stack.length-2]==="listItem"&&t.stack[t.stack.length-3]==="list"&&t.stack[t.stack.length-4]==="listItem"&&t.indexStack[t.indexStack.length-1]===0&&t.indexStack[t.indexStack.length-2]===0&&t.indexStack[t.indexStack.length-3]===0&&(l=!0),yr(t)===s&&c){let d=-1;for(;++d<e.children.length;){let m=e.children[d];if(m&&m.type==="listItem"&&m.children&&m.children[0]&&m.children[0].type==="thematicBreak"){l=!0;break}}}}l&&(s=a),t.bulletCurrent=s;let u=t.containerFlow(e,r);return t.bulletLastUsed=s,t.bulletCurrent=o,i(),u}function Na(e){let n=e.options.listItemIndent||"one";if(n!=="tab"&&n!=="one"&&n!=="mixed")throw new Error("Cannot serialize items with `"+n+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return n}function Oa(e,n,t,r){let i=Na(t),o=t.bulletCurrent||ln(t);n&&n.type==="list"&&n.ordered&&(o=(typeof n.start=="number"&&n.start>-1?n.start:1)+(t.options.incrementListMarker===!1?0:n.children.indexOf(e))+o);let s=o.length+1;(i==="tab"||i==="mixed"&&(n&&n.type==="list"&&n.spread||e.spread))&&(s=Math.ceil(s/4)*4);let a=t.createTracker(r);a.move(o+" ".repeat(s-o.length)),a.shift(s);let l=t.enter("listItem"),u=t.indentLines(t.containerFlow(e,a.current()),c);return l(),u;function c(d,m,f){return m?(f?"":" ".repeat(s))+d:(f?o:o+" ".repeat(s-o.length))+d}}function Ra(e,n,t,r){let i=t.enter("paragraph"),o=t.enter("phrasing"),s=t.containerPhrasing(e,r);return o(),i(),s}function Pa(e,n,t,r){if(!e.children.some(function(a){return ji(a)}))return t.containerFlow(e,r);let o=t.enter("phrasing"),s=t.containerPhrasing(e,r);return o(),s}function Fa(e){let n=e.options.strong||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize strong with `"+n+"` for `options.strong`, expected `*`, or `_`");return n}wr.attention=_a;wr.peek=Wd;function wr(e,n,t,r){let i=t.enter("phrasing"),o=An(e,_a,t,t.createTracker(r)),s=an([o],r.before,r.after);return i(),s}function _a(e,n){return{construct:"strong",markers:Fa(n)==="*"?["*","_"]:["_","*"],sizes:[2]}}function Wd(e,n,t){return t.options.strong||"*"}function Da(e,n,t,r){let i=n?n.children:[],o=t.indexStack[t.indexStack.length-1];return t.safe(e.value,{...r,afterNode:i[o+1],beforeNode:i[o-1]})}function ja(e){let n=e.options.ruleRepetition||3;if(n<3)throw new Error("Cannot serialize rules with repetition `"+n+"` for `options.ruleRepetition`, expected `3` or more");return n}function qa(e,n,t){let r=(yr(t)+(t.options.ruleSpaces?" ":"")).repeat(ja(t));return t.options.ruleSpaces?r.slice(0,-1):r}var $n={blockquote:ma,break:qi,code:wa,definition:ka,emphasis:br,hardBreak:qi,heading:$a,html:Vi,image:Gi,imageReference:Ki,inlineCode:Wi,link:Ji,linkReference:Qi,list:Ia,listItem:Oa,paragraph:Ra,root:Pa,strong:wr,text:Da,thematicBreak:qa};var Ba=document.createElement("i");function cn(e){let n="&"+e+";";Ba.innerHTML=n;let t=Ba.textContent;return t.charCodeAt(t.length-1)===59&&e!=="semi"||t===n?!1:t}function kr(e,n){let t=Number.parseInt(e,n);return t<9||t===11||t>13&&t<32||t>126&&t<160||t>55295&&t<57344||t>64975&&t<65008||(t&65535)===65535||(t&65535)===65534||t>1114111?"\uFFFD":String.fromCodePoint(t)}var Yd=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Ha(e){return e.replace(Yd,Jd)}function Jd(e,n,t){if(n)return n;if(t.charCodeAt(0)===35){let i=t.charCodeAt(1),o=i===120||i===88;return kr(t.slice(o?2:1),o?16:10)}return cn(t)||e}function Zi(){return{enter:{table:Qd,tableData:za,tableHeader:za,tableRow:Zd},exit:{codeText:ef,table:Xd,tableData:Xi,tableHeader:Xi,tableRow:Xi}}}function Qd(e){let n=e._align;this.enter({type:"table",align:n.map(function(t){return t==="none"?null:t}),children:[]},e),this.data.inTable=!0}function Xd(e){this.exit(e),this.data.inTable=void 0}function Zd(e){this.enter({type:"tableRow",children:[]},e)}function Xi(e){this.exit(e)}function za(e){this.enter({type:"tableCell",children:[]},e)}function ef(e){let n=this.resume();this.data.inTable&&(n=n.replace(/\\([\\|])/g,tf));let t=this.stack[this.stack.length-1];t.type,t.value=n,this.exit(e)}function tf(e,n){return n==="|"?n:e}function eo(e){let n=e||{},t=n.tableCellPadding,r=n.tablePipeAlign,i=n.stringLength,o=t?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
98
98
|
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:m,table:s,tableCell:l,tableRow:a}};function s(f,h,b,w){return u(c(f,b,w),f.align)}function a(f,h,b,w){let y=d(f,b,w),C=u([y]);return C.slice(0,C.indexOf(`
|
|
99
|
-
`))}function l(f,h,b,w){let y=b.enter("tableCell"),C=b.enter("phrasing"),k=b.containerPhrasing(f,{...w,before:o,after:o});return C(),y(),k}function u(f,h){return fa(f,{align:h,alignDelimiters:r,padding:t,stringLength:i})}function c(f,h,b){let w=f.children,y=-1,C=[],k=h.enter("table");for(;++y<w.length;)C[y]=d(w[y],h,b);return k(),C}function d(f,h,b){let w=f.children,y=-1,C=[],k=h.enter("tableRow");for(;++y<w.length;)C[y]=l(w[y],f,h,b);return k(),C}function m(f,h,b){let w=$n.inlineCode(f,h,b);return b.stack.includes("tableCell")&&(w=w.replace(/\|/g,"\\$&")),w}}function to(){return{exit:{taskListCheckValueChecked:Ua,taskListCheckValueUnchecked:Ua,paragraph:nf}}}function no(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:rf}}}function Ua(e){let n=this.stack[this.stack.length-2];n.type,n.checked=e.type==="taskListCheckValueChecked"}function nf(e){let n=this.stack[this.stack.length-2];if(n&&n.type==="listItem"&&typeof n.checked=="boolean"){let t=this.stack[this.stack.length-1];t.type;let r=t.children[0];if(r&&r.type==="text"){let i=n.children,o=-1,s;for(;++o<i.length;){let a=i[o];if(a.type==="paragraph"){s=a;break}}s===t&&(r.value=r.value.slice(1),r.value.length===0?t.children.shift():t.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,t.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function rf(e,n,t,r){let i=e.children[0],o=typeof e.checked=="boolean"&&i&&i.type==="paragraph",s="["+(e.checked?"x":" ")+"] ",a=t.createTracker(r);o&&a.move(s);let l=$n.listItem(e,n,t,{...r,...a.current()});return o&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,u)),l;function u(c){return c+s}}function ro(){return[Ni(),Ri(),Fi(),Zi(),to()]}function io(e){return{extensions:[Oi(),Pi(e),_i(),eo(e),no()]}}function Le(e,n,t,r){let i=e.length,o=0,s;if(n<0?n=-n>i?0:i+n:n=n>i?i:n,t=t>0?t:0,r.length<1e4)s=Array.from(r),s.unshift(n,t),e.splice(...s);else for(t&&e.splice(n,t);o<r.length;)s=r.slice(o,o+1e4),s.unshift(n,0),e.splice(...s),o+=1e4,n+=1e4}function _e(e,n){return e.length>0?(Le(e,e.length,0,n),e):n}var Va={}.hasOwnProperty;function xr(e){let n={},t=-1;for(;++t<e.length;)of(n,e[t]);return n}function of(e,n){let t;for(t in n){let i=(Va.call(e,t)?e[t]:void 0)||(e[t]={}),o=n[t],s;if(o)for(s in o){Va.call(i,s)||(i[s]=[]);let a=o[s];sf(i[s],Array.isArray(a)?a:a?[a]:[])}}}function sf(e,n){let t=-1,r=[];for(;++t<n.length;)(n[t].add==="after"?e:r).push(n[t]);Le(e,0,0,r)}var af={tokenize:ff,partial:!0},Ga={tokenize:mf,partial:!0},Ka={tokenize:hf,partial:!0},Wa={tokenize:pf,partial:!0},lf={tokenize:gf,partial:!0},Ya={name:"wwwAutolink",tokenize:uf,previous:Qa},Ja={name:"protocolAutolink",tokenize:df,previous:Xa},lt={name:"emailAutolink",tokenize:cf,previous:Za},rt={};function so(){return{text:rt}}var jt=48;for(;jt<123;)rt[jt]=lt,jt++,jt===58?jt=65:jt===91&&(jt=97);rt[43]=lt;rt[45]=lt;rt[46]=lt;rt[95]=lt;rt[72]=[lt,Ja];rt[104]=[lt,Ja];rt[87]=[lt,Ya];rt[119]=[lt,Ya];function cf(e,n,t){let r=this,i,o;return s;function s(d){return!oo(d)||!Za.call(r,r.previous)||ao(r.events)?t(d):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),a(d))}function a(d){return oo(d)?(e.consume(d),a):d===64?(e.consume(d),l):t(d)}function l(d){return d===46?e.check(lf,c,u)(d):d===45||d===95||Se(d)?(o=!0,e.consume(d),l):c(d)}function u(d){return e.consume(d),i=!0,l}function c(d){return o&&i&&xe(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),n(d)):t(d)}}function uf(e,n,t){let r=this;return i;function i(s){return s!==87&&s!==119||!Qa.call(r,r.previous)||ao(r.events)?t(s):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(af,e.attempt(Ga,e.attempt(Ka,o),t),t)(s))}function o(s){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),n(s)}}function df(e,n,t){let r=this,i="",o=!1;return s;function s(d){return(d===72||d===104)&&Xa.call(r,r.previous)&&!ao(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(d),e.consume(d),a):t(d)}function a(d){if(xe(d)&&i.length<5)return i+=String.fromCodePoint(d),e.consume(d),a;if(d===58){let m=i.toLowerCase();if(m==="http"||m==="https")return e.consume(d),l}return t(d)}function l(d){return d===47?(e.consume(d),o?u:(o=!0,l)):t(d)}function u(d){return d===null||Ot(d)||ae(d)||nt(d)||Rt(d)?t(d):e.attempt(Ga,e.attempt(Ka,c),t)(d)}function c(d){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),n(d)}}function ff(e,n,t){let r=0;return i;function i(s){return(s===87||s===119)&&r<3?(r++,e.consume(s),i):s===46&&r===3?(e.consume(s),o):t(s)}function o(s){return s===null?t(s):n(s)}}function mf(e,n,t){let r,i,o;return s;function s(u){return u===46||u===95?e.check(Wa,l,a)(u):u===null||ae(u)||nt(u)||u!==45&&Rt(u)?l(u):(o=!0,e.consume(u),s)}function a(u){return u===95?r=!0:(i=r,r=void 0),e.consume(u),s}function l(u){return i||r||!o?t(u):n(u)}}function hf(e,n){let t=0,r=0;return i;function i(s){return s===40?(t++,e.consume(s),i):s===41&&r<t?o(s):s===33||s===34||s===38||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===60||s===63||s===93||s===95||s===126?e.check(Wa,n,o)(s):s===null||ae(s)||nt(s)?n(s):(e.consume(s),i)}function o(s){return s===41&&r++,e.consume(s),i}}function pf(e,n,t){return r;function r(a){return a===33||a===34||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===63||a===95||a===126?(e.consume(a),r):a===38?(e.consume(a),o):a===93?(e.consume(a),i):a===60||a===null||ae(a)||nt(a)?n(a):t(a)}function i(a){return a===null||a===40||a===91||ae(a)||nt(a)?n(a):r(a)}function o(a){return xe(a)?s(a):t(a)}function s(a){return a===59?(e.consume(a),r):xe(a)?(e.consume(a),s):t(a)}}function gf(e,n,t){return r;function r(o){return e.consume(o),i}function i(o){return Se(o)?t(o):n(o)}}function Qa(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||ae(e)}function Xa(e){return!xe(e)}function Za(e){return!(e===47||oo(e))}function oo(e){return e===43||e===45||e===46||e===95||Se(e)}function ao(e){let n=e.length,t=!1;for(;n--;){let r=e[n][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){t=!0;break}if(r._gfmAutolinkLiteralWalkedInto){t=!1;break}}return e.length>0&&!t&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),t}function xt(e,n,t){let r=[],i=-1;for(;++i<e.length;){let o=e[i].resolveAll;o&&!r.includes(o)&&(n=o(n,t),r.push(o))}return n}var Mn={name:"attention",resolveAll:bf,tokenize:yf};function bf(e,n){let t=-1,r;for(;++t<e.length;)if(e[t][0]==="enter"&&e[t][1].type==="attentionSequence"&&e[t][1]._close){let i=t;for(;i--;)if(e[i][0]==="exit"&&e[i][1].type==="attentionSequence"&&e[i][1]._open&&n.sliceSerialize(e[i][1]).charCodeAt(0)===n.sliceSerialize(e[t][1]).charCodeAt(0)){if((e[i][1]._close||e[t][1]._open)&&(e[t][1].end.offset-e[t][1].start.offset)%3&&!((e[i][1].end.offset-e[i][1].start.offset+e[t][1].end.offset-e[t][1].start.offset)%3))continue;let o=e[i][1].end.offset-e[i][1].start.offset>1&&e[t][1].end.offset-e[t][1].start.offset>1?2:1,s={...e[i][1].end},a={...e[t][1].start};el(s,-o),el(a,o);let l={type:o>1?"strongSequence":"emphasisSequence",start:s,end:{...e[i][1].end}},u={type:o>1?"strongSequence":"emphasisSequence",start:{...e[t][1].start},end:a},c={type:o>1?"strongText":"emphasisText",start:{...e[i][1].end},end:{...e[t][1].start}},d={type:o>1?"strong":"emphasis",start:{...l.start},end:{...u.end}};e[i][1].end={...l.start},e[t][1].start={...u.end},r=[],e[i][1].end.offset-e[i][1].start.offset&&(r=_e(r,[["enter",e[i][1],n],["exit",e[i][1],n]])),r=_e(r,[["enter",d,n],["enter",l,n],["exit",l,n],["enter",c,n]]),r=_e(r,xt(n.parser.constructs.insideSpan.null,e.slice(i+1,t),n)),r=_e(r,[["exit",c,n],["enter",u,n],["exit",u,n],["exit",d,n]]);let m=0;e[t][1].end.offset-e[t][1].start.offset&&(m=2,r=_e(r,[["enter",e[t][1],n],["exit",e[t][1],n]])),Le(e,i-1,t-i+3,r),t=i+r.length-m-2;break}}for(t=-1;++t<e.length;)e[t][1].type==="attentionSequence"&&(e[t][1].type="data");return e}function yf(e,n){let t=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Ue(r),o;return s;function s(l){return o=l,e.enter("attentionSequence"),a(l)}function a(l){if(l===o)return e.consume(l),a;let u=e.exit("attentionSequence"),c=Ue(l),d=!c||c===2&&i||t.includes(l)&&l!==42&&l!==95,m=!i||i===2&&c||t.includes(r)&&r!==42&&r!==95;return u._open=!!(o===42?d:d&&(i||!m)),u._close=!!(o===42?m:m&&(c||!d)),n(l)}}function el(e,n){e.column+=n,e.offset+=n,e._bufferIndex+=n}var lo={name:"autolink",tokenize:wf};function wf(e,n,t){let r=0;return i;function i(f){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(f){return xe(f)?(e.consume(f),s):f===64?t(f):u(f)}function s(f){return f===43||f===45||f===46||Se(f)?(r=1,a(f)):u(f)}function a(f){return f===58?(e.consume(f),r=0,l):(f===43||f===45||f===46||Se(f))&&r++<32?(e.consume(f),a):(r=0,u(f))}function l(f){return f===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.exit("autolink"),n):f===null||f===32||f===60||Ot(f)?t(f):(e.consume(f),l)}function u(f){return f===64?(e.consume(f),c):Zs(f)?(e.consume(f),u):t(f)}function c(f){return Se(f)?d(f):t(f)}function d(f){return f===46?(e.consume(f),r=0,c):f===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.exit("autolink"),n):m(f)}function m(f){if((f===45||Se(f))&&r++<63){let h=f===45?m:d;return e.consume(f),h}return t(f)}}function Q(e,n,t,r){let i=r?r-1:1/0,o=0;return s;function s(l){return V(l)?(e.enter(t),a(l)):n(l)}function a(l){return V(l)&&o++<i?(e.consume(l),a):(e.exit(t),n(l))}}function co(e,n,t,r,i,o){let s=0;return a;function a(c){return o>0&&V(c)?(e.enter(r),l(c)):u(c)}function l(c){return V(c)&&s<o?(e.consume(c),s++,l):(e.exit(r),u(c))}function u(c){return s>=i?n(c):t(c)}}var it={partial:!0,tokenize:kf};function kf(e,n,t){return r;function r(o){return V(o)?Q(e,i,"linePrefix")(o):i(o)}function i(o){return o===null||F(o)?n(o):t(o)}}var vr={continuation:{tokenize:vf},exit:Sf,name:"blockQuote",tokenize:xf};function xf(e,n,t){let r=this;return i;function i(s){if(s===62){let a=r.containerState;return a.open||(e.enter("blockQuote",{_container:!0}),a.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(s),e.exit("blockQuoteMarker"),o}return t(s)}function o(s){return V(s)?(e.enter("blockQuotePrefixWhitespace"),e.consume(s),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),n):(e.exit("blockQuotePrefix"),n(s))}}function vf(e,n,t){let r=this;return i;function i(s){return V(s)?Q(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):o(s)}function o(s){return e.attempt(vr,n,t)(s)}}function Sf(e){e.exit("blockQuote")}var Sr={name:"characterEscape",tokenize:Ef};function Ef(e,n,t){return r;function r(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),i}function i(o){return cr(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),n):t(o)}}var Er={name:"characterReference",tokenize:Cf};function Cf(e,n,t){let r=this,i=0,o,s;return a;function a(d){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),l}function l(d){return d===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(d),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),o=31,s=Se,c(d))}function u(d){return d===88||d===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(d),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,s=ea,c):(e.enter("characterReferenceValue"),o=7,s=vn,c(d))}function c(d){if(d===59&&i){let m=e.exit("characterReferenceValue");return s===Se&&!cn(r.sliceSerialize(m))?t(d):(e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),e.exit("characterReference"),n)}return s(d)&&i++<o?(e.consume(d),c):t(d)}}var Tn={partial:!0,tokenize:Lf};function Lf(e,n,t){let r=this;return i;function i(s){return s===null?t(s):(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),o)}function o(s){return r.parser.lazy[r.now().line]?t(s):n(s)}}var Cr={concrete:!0,name:"codeFenced",tokenize:Af};function Af(e,n,t){let r=this,i={partial:!0,tokenize:R},o=0,s=0,a;return l;function l(S){return u(S)}function u(S){let M=r.events[r.events.length-1];return o=M&&M[1].type==="linePrefix"?M[2].sliceSerialize(M[1],!0).length:0,a=S,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),c(S)}function c(S){return S===a?(s++,e.consume(S),c):s<3?t(S):(e.exit("codeFencedFenceSequence"),V(S)?Q(e,d,"whitespace")(S):d(S))}function d(S){return S===null||F(S)?(e.exit("codeFencedFence"),r.interrupt?n(S):e.check(Tn,b,O)(S)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),m(S))}function m(S){return S===null||F(S)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),d(S)):V(S)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Q(e,f,"whitespace")(S)):S===96&&S===a?t(S):(e.consume(S),m)}function f(S){return S===null||F(S)?d(S):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),h(S))}function h(S){return S===null||F(S)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),d(S)):S===96&&S===a?t(S):(e.consume(S),h)}function b(S){return e.attempt(i,O,w)(S)}function w(S){return e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),y}function y(S){return o>0&&V(S)?Q(e,C,"linePrefix",o+1)(S):C(S)}function C(S){return S===null||F(S)?e.check(Tn,b,O)(S):(e.enter("codeFlowValue"),k(S))}function k(S){return S===null||F(S)?(e.exit("codeFlowValue"),C(S)):(e.consume(S),k)}function O(S){return e.exit("codeFenced"),n(S)}function R(S,M,Y){let pe=0;return v;function v(A){return S.enter("lineEnding"),S.consume(A),S.exit("lineEnding"),re}function re(A){return S.enter("codeFencedFence"),V(A)?Q(S,j,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(A):j(A)}function j(A){return A===a?(S.enter("codeFencedFenceSequence"),B(A)):Y(A)}function B(A){return A===a?(pe++,S.consume(A),B):pe>=s?(S.exit("codeFencedFenceSequence"),V(A)?Q(S,Z,"whitespace")(A):Z(A)):Y(A)}function Z(A){return A===null||F(A)?(S.exit("codeFencedFence"),M(A)):Y(A)}}}var In={name:"codeIndented",tokenize:Mf},$f={partial:!0,tokenize:Tf};function Mf(e,n,t){return r;function r(a){return e.enter("codeIndented"),co(e,i,t,"linePrefix",4,4)(a)}function i(a){return a===null?s(a):F(a)?e.attempt($f,i,s)(a):(e.enter("codeFlowValue"),o(a))}function o(a){return a===null||F(a)?(e.exit("codeFlowValue"),i(a)):(e.consume(a),o)}function s(a){return e.exit("codeIndented"),n(a)}}function Tf(e,n,t){let r=this;return i;function i(s){return r.parser.lazy[r.now().line]?t(s):F(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i):co(e,n,o,"linePrefix",4,4)(s)}function o(s){return F(s)?i(s):t(s)}}var uo={name:"codeText",previous:Nf,resolve:If,tokenize:Of};function If(e){let n=e.length-4,t=3,r,i;if((e[t][1].type==="lineEnding"||e[t][1].type==="space")&&(e[n][1].type==="lineEnding"||e[n][1].type==="space")){for(r=t;++r<n;)if(e[r][1].type==="codeTextData"){e[t][1].type="codeTextPadding",e[n][1].type="codeTextPadding",t+=2,n-=2;break}}for(r=t-1,n++;++r<=n;)i===void 0?r!==n&&e[r][1].type!=="lineEnding"&&(i=r):(r===n||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),n-=r-i-2,r=i+2),i=void 0);return e}function Nf(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Of(e,n,t){let r=this,i=0,o,s;return a;function a(m){return e.enter("codeText"),e.enter("codeTextSequence"),l(m)}function l(m){return m===96?(e.consume(m),i++,l):(e.exit("codeTextSequence"),u(m))}function u(m){return m===null?t(m):m===32?(e.enter("space"),e.consume(m),e.exit("space"),u):m===96?(s=e.enter("codeTextSequence"),o=0,d(m)):F(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),u):(e.enter("codeTextData"),c(m))}function c(m){return m===null||m===32||m===96||F(m)?(e.exit("codeTextData"),u(m)):(e.consume(m),c)}function d(m){return m===96?(e.consume(m),o++,d):o===i?(e.exit("codeTextSequence"),e.exit("codeText"),n(m)):(s.type="codeTextData",c(m))}}var Lr=class{constructor(n){this.left=n?[...n]:[],this.right=[]}get(n){if(n<0||n>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+n+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return n<this.left.length?this.left[n]:this.right[this.right.length-n+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(n,t){let r=t??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(n,r):n>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-n+this.left.length).reverse():this.left.slice(n).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(n,t,r){let i=t||0;this.setCursor(Math.trunc(n));let o=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Nn(this.left,r),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(n){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(n)}pushMany(n){this.setCursor(Number.POSITIVE_INFINITY),Nn(this.left,n)}unshift(n){this.setCursor(0),this.right.push(n)}unshiftMany(n){this.setCursor(0),Nn(this.right,n.reverse())}setCursor(n){if(!(n===this.left.length||n>this.left.length&&this.right.length===0||n<0&&this.left.length===0))if(n<this.left.length){let t=this.left.splice(n,Number.POSITIVE_INFINITY);Nn(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-n,Number.POSITIVE_INFINITY);Nn(this.left,t.reverse())}}};function Nn(e,n){let t=0;if(n.length<1e4)e.push(...n);else for(;t<n.length;)e.push(...n.slice(t,t+1e4)),t+=1e4}function Ar(e){let n={},t=-1,r,i,o,s,a,l,u,c=new Lr(e);for(;++t<c.length;){for(;t in n;)t=n[t];if(r=c.get(t),t&&r[1].type==="chunkFlow"&&c.get(t-1)[1].type==="listItemPrefix"&&(l=r[1]._tokenizer.events,o=0,o<l.length&&l[o][1].type==="lineEndingBlank"&&(o+=2),o<l.length&&l[o][1].type==="content"))for(;++o<l.length&&l[o][1].type!=="content";)l[o][1].type==="chunkText"&&(l[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(n,Rf(c,t)),t=n[t],u=!0);else if(r[1]._container){for(o=t,i=void 0;o--;)if(s=c.get(o),s[1].type==="lineEnding"||s[1].type==="lineEndingBlank")s[0]==="enter"&&(i&&(c.get(i)[1].type="lineEndingBlank"),s[1].type="lineEnding",i=o);else if(!(s[1].type==="linePrefix"||s[1].type==="listItemIndent"))break;i&&(r[1].end={...c.get(i)[1].start},a=c.slice(i,t),a.unshift(r),c.splice(i,t-i+1,a))}}return Le(e,0,Number.POSITIVE_INFINITY,c.slice(0)),!u}function Rf(e,n){let t=e.get(n)[1],r=e.get(n)[2],i=n-1,o=[],s=t._tokenizer;s||(s=r.parser[t.contentType](t.start),t._contentTypeTextTrailing&&(s._contentTypeTextTrailing=!0));let a=s.events,l=[],u={},c,d,m=-1,f=t,h=0,b=0,w=[b];for(;f;){for(;e.get(++i)[1]!==f;);o.push(i),f._tokenizer||(c=r.sliceStream(f),f.next||c.push(null),d&&s.defineSkip(f.start),f._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(c),f._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),d=f,f=f.next}for(f=t;++m<a.length;)a[m][0]==="exit"&&a[m-1][0]==="enter"&&a[m][1].type===a[m-1][1].type&&a[m][1].start.line!==a[m][1].end.line&&(b=m+1,w.push(b),f._tokenizer=void 0,f.previous=void 0,f=f.next);for(s.events=[],f?(f._tokenizer=void 0,f.previous=void 0):w.pop(),m=w.length;m--;){let y=a.slice(w[m],w[m+1]),C=o.pop();l.push([C,C+y.length-1]),e.splice(C,2,y)}for(l.reverse(),m=-1;++m<l.length;)u[h+l[m][0]]=h+l[m][1],h+=l[m][1]-l[m][0]-1;return u}var fo={resolve:Ff,tokenize:_f},Pf={partial:!0,tokenize:Df};function Ff(e){return Ar(e),e}function _f(e,n){let t;return r;function r(a){return e.enter("content"),t=e.enter("chunkContent",{contentType:"content"}),i(a)}function i(a){return a===null?o(a):F(a)?e.check(Pf,s,o)(a):(e.consume(a),i)}function o(a){return e.exit("chunkContent"),e.exit("content"),n(a)}function s(a){return e.consume(a),e.exit("chunkContent"),t.next=e.enter("chunkContent",{contentType:"content",previous:t}),t=t.next,i}}function Df(e,n,t){let r=this;return i;function i(s){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),Q(e,o,"linePrefix")}function o(s){if(s===null||F(s))return t(s);let a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?n(s):e.interrupt(r.parser.constructs.flow,t,n)(s)}}function $r(e,n,t,r,i,o,s,a,l){let u=l||Number.POSITIVE_INFINITY,c=0;return d;function d(y){return y===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(y),e.exit(o),m):y===null||y===32||y===41||Ot(y)?t(y):(e.enter(r),e.enter(s),e.enter(a),e.enter("chunkString",{contentType:"string"}),b(y))}function m(y){return y===62?(e.enter(o),e.consume(y),e.exit(o),e.exit(i),e.exit(r),n):(e.enter(a),e.enter("chunkString",{contentType:"string"}),f(y))}function f(y){return y===62?(e.exit("chunkString"),e.exit(a),m(y)):y===null||y===60||F(y)?t(y):(e.consume(y),y===92?h:f)}function h(y){return y===60||y===62||y===92?(e.consume(y),f):f(y)}function b(y){return!c&&(y===null||y===41||ae(y))?(e.exit("chunkString"),e.exit(a),e.exit(s),e.exit(r),n(y)):c<u&&y===40?(e.consume(y),c++,b):y===41?(e.consume(y),c--,b):y===null||y===32||y===40||Ot(y)?t(y):(e.consume(y),y===92?w:b)}function w(y){return y===40||y===41||y===92?(e.consume(y),b):b(y)}}function Mr(e,n,t,r,i,o){let s=this,a=0,l;return u;function u(f){return e.enter(r),e.enter(i),e.consume(f),e.exit(i),e.enter(o),c}function c(f){return a>999||f===null||f===91||f===93&&!l||f===94&&!a&&"_hiddenFootnoteSupport"in s.parser.constructs?t(f):f===93?(e.exit(o),e.enter(i),e.consume(f),e.exit(i),e.exit(r),n):F(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),d(f))}function d(f){return f===null||f===91||f===93||F(f)||a++>999?(e.exit("chunkString"),c(f)):(e.consume(f),l||(l=!V(f)),f===92?m:d)}function m(f){return f===91||f===92||f===93?(e.consume(f),a++,d):d(f)}}function Tr(e,n,t,r,i,o){let s;return a;function a(m){return m===34||m===39||m===40?(e.enter(r),e.enter(i),e.consume(m),e.exit(i),s=m===40?41:m,l):t(m)}function l(m){return m===s?(e.enter(i),e.consume(m),e.exit(i),e.exit(r),n):(e.enter(o),u(m))}function u(m){return m===s?(e.exit(o),l(s)):m===null?t(m):F(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),Q(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(m))}function c(m){return m===s||m===null||F(m)?(e.exit("chunkString"),u(m)):(e.consume(m),m===92?d:c)}function d(m){return m===s||m===92?(e.consume(m),c):c(m)}}function qt(e,n){let t;return r;function r(i){return F(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),t=!0,r):V(i)?Q(e,r,t?"linePrefix":"lineSuffix")(i):n(i)}}var mo={name:"definition",tokenize:qf},jf={partial:!0,tokenize:Bf};function qf(e,n,t){let r=this,i;return o;function o(f){return e.enter("definition"),s(f)}function s(f){return Mr.call(r,e,a,t,"definitionLabel","definitionLabelMarker","definitionLabelString")(f)}function a(f){return i=Pe(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),f===58?(e.enter("definitionMarker"),e.consume(f),e.exit("definitionMarker"),l):t(f)}function l(f){return ae(f)?qt(e,u)(f):u(f)}function u(f){return $r(e,c,t,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(f)}function c(f){return e.attempt(jf,d,d)(f)}function d(f){return V(f)?Q(e,m,"whitespace")(f):m(f)}function m(f){return f===null||F(f)?(e.exit("definition"),r.parser.defined.push(i),n(f)):t(f)}}function Bf(e,n,t){return r;function r(a){return ae(a)?qt(e,i)(a):t(a)}function i(a){return Tr(e,o,t,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function o(a){return V(a)?Q(e,s,"whitespace")(a):s(a)}function s(a){return a===null||F(a)?n(a):t(a)}}var ho={name:"hardBreakEscape",tokenize:Hf};function Hf(e,n,t){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return F(o)?(e.exit("hardBreakEscape"),n(o)):t(o)}}var po={name:"headingAtx",resolve:zf,tokenize:Uf};function zf(e,n){let t=e.length-2,r=3;if(e[r][1].type==="whitespace"&&(r+=2),t-2>r&&e[t][1].type==="whitespace"&&(t-=2),e[t][1].type==="atxHeadingSequence"&&(r===t-1||t-4>r&&e[t-2][1].type==="whitespace")&&(t-=r+1===t?2:4),t>r){let i={type:"atxHeadingText",start:e[r][1].start,end:e[t][1].end},o={type:"chunkText",start:e[r][1].start,end:e[t][1].end,contentType:"text"};Le(e,r,t-r+1,[["enter",i,n],["enter",o,n],["exit",o,n],["exit",i,n]])}return e}function Uf(e,n,t){let r=0;return i;function i(c){return e.enter("atxHeading"),o(c)}function o(c){return e.enter("atxHeadingSequence"),s(c)}function s(c){return c===35&&r++<6?(e.consume(c),s):c===null||ae(c)?(e.exit("atxHeadingSequence"),a(c)):t(c)}function a(c){return c===35?(e.enter("atxHeadingSequence"),l(c)):c===null||F(c)?(e.exit("atxHeading"),n(c)):V(c)?Q(e,a,"whitespace")(c):(e.enter("atxHeadingText"),u(c))}function l(c){return c===35?(e.consume(c),l):(e.exit("atxHeadingSequence"),a(c))}function u(c){return c===null||c===35||ae(c)?(e.exit("atxHeadingText"),a(c)):(e.consume(c),u)}}var go={concrete:!0,name:"htmlFlow",resolveTo:Gf,tokenize:Kf},Vf={partial:!0,tokenize:Wf};function Gf(e){let n=e.length;for(;n--&&!(e[n][0]==="enter"&&e[n][1].type==="htmlFlow"););return n>1&&e[n-2][1].type==="linePrefix"&&(e[n][1].start=e[n-2][1].start,e[n+1][1].start=e[n-2][1].start,e.splice(n-2,2)),e}function Kf(e,n,t){let r=this,i,o,s,a,l;return u;function u(p){return c(p)}function c(p){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(p),d}function d(p){return p===33?(e.consume(p),m):p===47?(e.consume(p),o=!0,b):p===63?(e.consume(p),i=3,r.interrupt?n:g):xe(p)?(e.consume(p),s=String.fromCharCode(p),w):t(p)}function m(p){return p===45?(e.consume(p),i=2,f):p===91?(e.consume(p),i=5,a=0,h):xe(p)?(e.consume(p),i=4,r.interrupt?n:g):t(p)}function f(p){return p===45?(e.consume(p),r.interrupt?n:g):t(p)}function h(p){let ge="CDATA[";return p===ge.charCodeAt(a++)?(e.consume(p),a===ge.length?r.interrupt?n:j:h):t(p)}function b(p){return xe(p)?(e.consume(p),s=String.fromCharCode(p),w):t(p)}function w(p){if(p===null||p===47||p===62||ae(p)){let ge=p===47,Ne=s.toLowerCase();return!ge&&!o&&Ln.includes(Ne)?(i=1,r.interrupt?n(p):j(p)):pr.includes(s.toLowerCase())?(i=6,ge?(e.consume(p),y):r.interrupt?n(p):j(p)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?t(p):o?C(p):k(p))}return p===45||Se(p)?(e.consume(p),s+=String.fromCharCode(p),w):t(p)}function y(p){return p===62?(e.consume(p),r.interrupt?n:j):t(p)}function C(p){return V(p)?(e.consume(p),C):v(p)}function k(p){return p===47?(e.consume(p),v):p===58||p===95||xe(p)?(e.consume(p),O):V(p)?(e.consume(p),k):v(p)}function O(p){return p===45||p===46||p===58||p===95||Se(p)?(e.consume(p),O):R(p)}function R(p){return p===61?(e.consume(p),S):V(p)?(e.consume(p),R):k(p)}function S(p){return p===null||p===60||p===61||p===62||p===96?t(p):p===34||p===39?(e.consume(p),l=p,M):V(p)?(e.consume(p),S):Y(p)}function M(p){return p===l?(e.consume(p),l=null,pe):p===null||F(p)?t(p):(e.consume(p),M)}function Y(p){return p===null||p===34||p===39||p===47||p===60||p===61||p===62||p===96||ae(p)?R(p):(e.consume(p),Y)}function pe(p){return p===47||p===62||V(p)?k(p):t(p)}function v(p){return p===62?(e.consume(p),re):t(p)}function re(p){return p===null||F(p)?j(p):V(p)?(e.consume(p),re):t(p)}function j(p){return p===45&&i===2?(e.consume(p),H):p===60&&i===1?(e.consume(p),le):p===62&&i===4?(e.consume(p),$e):p===63&&i===3?(e.consume(p),g):p===93&&i===5?(e.consume(p),ve):F(p)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(Vf,se,B)(p)):p===null||F(p)?(e.exit("htmlFlowData"),B(p)):(e.consume(p),j)}function B(p){return e.check(Tn,Z,se)(p)}function Z(p){return e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),A}function A(p){return p===null||F(p)?B(p):(e.enter("htmlFlowData"),j(p))}function H(p){return p===45?(e.consume(p),g):j(p)}function le(p){return p===47?(e.consume(p),s="",ke):j(p)}function ke(p){if(p===62){let ge=s.toLowerCase();return Ln.includes(ge)?(e.consume(p),$e):j(p)}return xe(p)&&s.length<8?(e.consume(p),s+=String.fromCharCode(p),ke):j(p)}function ve(p){return p===93?(e.consume(p),g):j(p)}function g(p){return p===62?(e.consume(p),$e):p===45&&i===2?(e.consume(p),g):j(p)}function $e(p){return p===null||F(p)?(e.exit("htmlFlowData"),se(p)):(e.consume(p),$e)}function se(p){return e.exit("htmlFlow"),n(p)}}function Wf(e,n,t){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(it,n,t)}}var bo={name:"htmlText",tokenize:Yf};function Yf(e,n,t){let r=this,i,o,s;return a;function a(g){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(g),l}function l(g){return g===33?(e.consume(g),u):g===47?(e.consume(g),R):g===63?(e.consume(g),k):xe(g)?(e.consume(g),Y):t(g)}function u(g){return g===45?(e.consume(g),c):g===91?(e.consume(g),o=0,h):xe(g)?(e.consume(g),C):t(g)}function c(g){return g===45?(e.consume(g),f):t(g)}function d(g){return g===null?t(g):g===45?(e.consume(g),m):F(g)?(s=d,le(g)):(e.consume(g),d)}function m(g){return g===45?(e.consume(g),f):d(g)}function f(g){return g===62?H(g):g===45?m(g):d(g)}function h(g){let $e="CDATA[";return g===$e.charCodeAt(o++)?(e.consume(g),o===$e.length?b:h):t(g)}function b(g){return g===null?t(g):g===93?(e.consume(g),w):F(g)?(s=b,le(g)):(e.consume(g),b)}function w(g){return g===93?(e.consume(g),y):b(g)}function y(g){return g===62?H(g):g===93?(e.consume(g),y):b(g)}function C(g){return g===null||g===62?H(g):F(g)?(s=C,le(g)):(e.consume(g),C)}function k(g){return g===null?t(g):g===63?(e.consume(g),O):F(g)?(s=k,le(g)):(e.consume(g),k)}function O(g){return g===62?H(g):k(g)}function R(g){return xe(g)?(e.consume(g),S):t(g)}function S(g){return g===45||Se(g)?(e.consume(g),S):M(g)}function M(g){return F(g)?(s=M,le(g)):V(g)?(e.consume(g),M):H(g)}function Y(g){return g===45||Se(g)?(e.consume(g),Y):g===47||g===62||ae(g)?pe(g):t(g)}function pe(g){return g===47?(e.consume(g),H):g===58||g===95||xe(g)?(e.consume(g),v):F(g)?(s=pe,le(g)):V(g)?(e.consume(g),pe):H(g)}function v(g){return g===45||g===46||g===58||g===95||Se(g)?(e.consume(g),v):re(g)}function re(g){return g===61?(e.consume(g),j):F(g)?(s=re,le(g)):V(g)?(e.consume(g),re):pe(g)}function j(g){return g===null||g===60||g===61||g===62||g===96?t(g):g===34||g===39?(e.consume(g),i=g,B):F(g)?(s=j,le(g)):V(g)?(e.consume(g),j):(e.consume(g),Z)}function B(g){return g===i?(e.consume(g),i=void 0,A):g===null?t(g):F(g)?(s=B,le(g)):(e.consume(g),B)}function Z(g){return g===null||g===34||g===39||g===60||g===61||g===96?t(g):g===47||g===62||ae(g)?pe(g):(e.consume(g),Z)}function A(g){return g===47||g===62||ae(g)?pe(g):t(g)}function H(g){return g===62?(e.consume(g),e.exit("htmlTextData"),e.exit("htmlText"),n):t(g)}function le(g){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),ke}function ke(g){return V(g)?Q(e,ve,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(g):ve(g)}function ve(g){return e.enter("htmlTextData"),s(g)}}var Bt={name:"labelEnd",resolveAll:Zf,resolveTo:em,tokenize:tm},Jf={tokenize:nm},Qf={tokenize:rm},Xf={tokenize:im};function Zf(e){let n=-1,t=[];for(;++n<e.length;){let r=e[n][1];if(t.push(e[n]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){let i=r.type==="labelImage"?4:2;r.type="data",n+=i}}return e.length!==t.length&&Le(e,0,e.length,t),e}function em(e,n){let t=e.length,r=0,i,o,s;for(;t--;){let c=e[t][1];if(i){if(c.type==="link"||c.type==="labelLink"&&c._inactive)break;e[t][0]==="enter"&&c.type==="labelLink"&&(c._inactive=!0)}else if(o){if(e[t][0]==="enter"&&(c.type==="labelImage"||c.type==="labelLink")&&!c._balanced&&(i=t,c.type!=="labelLink")){r=2;break}}else c.type==="labelEnd"&&(o=t)}let a={type:e[i][1].type==="labelLink"?"link":"image",start:{...e[i][1].start},end:{...e[e.length-1][1].end}},l={type:"label",start:{...e[i][1].start},end:{...e[o][1].end}},u={type:"labelText",start:{...e[i+r+2][1].end},end:{...e[o-2][1].start}};return s=[["enter",a,n],["enter",l,n]],s=_e(s,e.slice(i+1,i+r+3)),s=_e(s,[["enter",u,n]]),s=_e(s,xt(n.parser.constructs.insideSpan.null,e.slice(i+r+4,o-3),n)),s=_e(s,[["exit",u,n],e[o-2],e[o-1],["exit",l,n]]),s=_e(s,e.slice(o+1)),s=_e(s,[["exit",a,n]]),Le(e,i,e.length,s),e}function tm(e,n,t){let r=this,i=r._labelStarts,o,s;if(i){for(;i.length>0&&i[i.length-1]._balanced;)i.pop();o=i[i.length-1]}return a;function a(m){return o?o._inactive?d(m):(s=r.parser.defined.includes(Pe(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(m),e.exit("labelMarker"),e.exit("labelEnd"),l):t(m)}function l(m){return m===40?e.attempt(Jf,c,s?c:d)(m):m===91?e.attempt(Qf,c,s?u:d)(m):s?c(m):d(m)}function u(m){return e.attempt(Xf,c,d)(m)}function c(m){return i.pop(),n(m)}function d(m){return o._balanced=!0,t(m)}}function nm(e,n,t){return r;function r(d){return e.enter("resource"),e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),i}function i(d){return ae(d)?qt(e,o)(d):o(d)}function o(d){return d===41?c(d):$r(e,s,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function s(d){return ae(d)?qt(e,l)(d):c(d)}function a(d){return t(d)}function l(d){return d===34||d===39||d===40?Tr(e,u,t,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):c(d)}function u(d){return ae(d)?qt(e,c)(d):c(d)}function c(d){return d===41?(e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),e.exit("resource"),n):t(d)}}function rm(e,n,t){let r=this;return i;function i(a){return Mr.call(r,e,o,s,"reference","referenceMarker","referenceString")(a)}function o(a){return r.parser.defined.includes(Pe(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?n(a):t(a)}function s(a){return t(a)}}function im(e,n,t){return r;function r(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),i}function i(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),n):t(o)}}var yo={name:"labelStartImage",resolveAll:Bt.resolveAll,tokenize:om};function om(e,n,t){let r=this,i;return o;function o(l){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(l),e.exit("labelImageMarker"),s}function s(l){return l===91?(e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),i=e.exit("labelImage"),a):t(l)}function a(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?t(l):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(i),n(l))}}var wo={name:"labelStartLink",resolveAll:Bt.resolveAll,tokenize:sm};function sm(e,n,t){let r=this,i;return o;function o(a){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),i=e.exit("labelLink"),s}function s(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?t(a):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(i),n(a))}}var On={name:"lineEnding",tokenize:am};function am(e,n){return t;function t(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Q(e,n,"linePrefix")}}var Ht={name:"thematicBreak",tokenize:lm};function lm(e,n,t){let r=0,i;return o;function o(u){return e.enter("thematicBreak"),s(u)}function s(u){return i=u,a(u)}function a(u){return u===i?(e.enter("thematicBreakSequence"),l(u)):r>=3&&(u===null||F(u))?(e.exit("thematicBreak"),n(u)):t(u)}function l(u){return u===i?(e.consume(u),r++,l):(e.exit("thematicBreakSequence"),V(u)?Q(e,a,"whitespace")(u):a(u))}}var Fe={continuation:{tokenize:fm},exit:hm,name:"list",tokenize:dm},cm={partial:!0,tokenize:pm},um={partial:!0,tokenize:mm};function dm(e,n,t){let r=this,i=r.events[r.events.length-1],o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,s=0;return a;function a(f){let h=r.containerState.type||(f===42||f===43||f===45?"listUnordered":"listOrdered");if(h==="listUnordered"?!r.containerState.marker||f===r.containerState.marker:vn(f)){if(r.containerState.type||(r.containerState.type=h,e.enter(h,{_container:!0})),h==="listUnordered")return e.enter("listItemPrefix"),f===42||f===45?e.check(Ht,t,u)(f):u(f);if(!r.interrupt||f===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(f)}return t(f)}function l(f){return vn(f)&&++s<10?(e.consume(f),l):(!r.interrupt||s<2)&&(r.containerState.marker?f===r.containerState.marker:f===41||f===46)?(e.exit("listItemValue"),u(f)):t(f)}function u(f){return e.enter("listItemMarker"),e.consume(f),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||f,e.check(it,r.interrupt?t:c,e.attempt(cm,m,d))}function c(f){return r.containerState.initialBlankLine=!0,o++,m(f)}function d(f){return V(f)?(e.enter("listItemPrefixWhitespace"),e.consume(f),e.exit("listItemPrefixWhitespace"),m):t(f)}function m(f){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,n(f)}}function fm(e,n,t){let r=this;return r.containerState._closeFlow=void 0,e.check(it,i,o);function i(a){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Q(e,n,"listItemIndent",r.containerState.size+1)(a)}function o(a){return r.containerState.furtherBlankLines||!V(a)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,s(a)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(um,n,s)(a))}function s(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,Q(e,e.attempt(Fe,n,t),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function mm(e,n,t){let r=this;return Q(e,i,"listItemIndent",r.containerState.size+1);function i(o){let s=r.events[r.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===r.containerState.size?n(o):t(o)}}function hm(e){e.exit(this.containerState.type)}function pm(e,n,t){let r=this;return Q(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(o){let s=r.events[r.events.length-1];return!V(o)&&s&&s[1].type==="listItemPrefixWhitespace"?n(o):t(o)}}var ct=class{constructor(){this.index=new Map,this.map=[]}add(n,t,r){tl(this,n,t,r,!1)}addBefore(n,t,r){tl(this,n,t,r,!0)}consume(n){if(this.map.sort(function(o,s){return o[0]-s[0]}),this.map.length===0)return;let t=this.map.length,r=[];for(;t>0;)t-=1,r.push(n.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),n.length=this.map[t][0];r.push(n.slice()),n.length=0;let i=r.pop();for(;i;){for(let o of i)n.push(o);i=r.pop()}this.map.length=0,this.index.clear()}};function tl(e,n,t,r,i){if(t===0&&r.length===0)return;let o=e.index.get(n);if(o){o[1]+=t,i?(r.push(...o[2]),o[2]=r):o[2].push(...r);return}let s=[n,t,r];e.map.push(s),e.index.set(n,s)}var Ir={name:"setextUnderline",resolveTo:gm,tokenize:bm};function gm(e,n){let t=new ct,r=e.length,i,o,s;for(;r--;)if(e[r][0]==="enter"){if(e[r][1].type==="content"){i=r;break}e[r][1].type==="paragraph"&&(o=r)}else e[r][1].type==="content"&&t.add(r,1,[]),!s&&e[r][1].type==="definition"&&(s=r);let a={type:"setextHeading",start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[o][1].type="setextHeadingText",s?(t.add(o,0,[["enter",a,n]]),t.add(s+1,0,[["exit",e[i][1],n]]),e[i][1].end={...e[s][1].end}):e[i][1]=a,t.add(e.length,0,[["exit",a,n]]),t.consume(e),e}function bm(e,n,t){let r=this,i;return o;function o(u){let c=r.events.length,d;for(;c--;)if(r.events[c][1].type!=="lineEnding"&&r.events[c][1].type!=="linePrefix"&&r.events[c][1].type!=="content"){d=r.events[c][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||d)?(e.enter("setextHeadingLine"),i=u,s(u)):t(u)}function s(u){return e.enter("setextHeadingLineSequence"),a(u)}function a(u){return u===i?(e.consume(u),a):(e.exit("setextHeadingLineSequence"),V(u)?Q(e,l,"lineSuffix")(u):l(u))}function l(u){return u===null||F(u)?(e.exit("setextHeadingLine"),n(u)):t(u)}}var ym={tokenize:Cm,partial:!0};function ko(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:vm,continuation:{tokenize:Sm},exit:Em}},text:{91:{name:"gfmFootnoteCall",tokenize:xm},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:wm,resolveTo:km}}}}function wm(e,n,t){let r=this,i=r.events.length,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),s;for(;i--;){let l=r.events[i][1];if(l.type==="labelImage"){s=l;break}if(l.type==="gfmFootnoteCall"||l.type==="labelLink"||l.type==="label"||l.type==="image"||l.type==="link")break}return a;function a(l){if(!s||!s._balanced)return t(l);let u=Pe(r.sliceSerialize({start:s.end,end:r.now()}));return u.codePointAt(0)!==94||!o.includes(u.slice(1))?t(l):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(l),e.exit("gfmFootnoteCallLabelMarker"),n(l))}}function km(e,n){let t=e.length,r;for(;t--;)if(e[t][1].type==="labelImage"&&e[t][0]==="enter"){r=e[t][1];break}e[t+1][1].type="data",e[t+3][1].type="gfmFootnoteCallLabelMarker";let i={type:"gfmFootnoteCall",start:Object.assign({},e[t+3][1].start),end:Object.assign({},e[e.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[t+3][1].end),end:Object.assign({},e[t+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;let s={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},l=[e[t+1],e[t+2],["enter",i,n],e[t+3],e[t+4],["enter",o,n],["exit",o,n],["enter",s,n],["enter",a,n],["exit",a,n],["exit",s,n],e[e.length-2],e[e.length-1],["exit",i,n]];return e.splice(t,e.length-t+1,...l),e}function xm(e,n,t){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o=0,s;return a;function a(d){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),l}function l(d){return d!==94?t(d):(e.enter("gfmFootnoteCallMarker"),e.consume(d),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(d){if(o>999||d===93&&!s||d===null||d===91||ae(d))return t(d);if(d===93){e.exit("chunkString");let m=e.exit("gfmFootnoteCallString");return i.includes(Pe(r.sliceSerialize(m)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),n):t(d)}return ae(d)||(s=!0),o++,e.consume(d),d===92?c:u}function c(d){return d===91||d===92||d===93?(e.consume(d),o++,u):u(d)}}function vm(e,n,t){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o,s=0,a;return l;function l(h){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(h){return h===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",c):t(h)}function c(h){if(s>999||h===93&&!a||h===null||h===91||ae(h))return t(h);if(h===93){e.exit("chunkString");let b=e.exit("gfmFootnoteDefinitionLabelString");return o=Pe(r.sliceSerialize(b)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),m}return ae(h)||(a=!0),s++,e.consume(h),h===92?d:c}function d(h){return h===91||h===92||h===93?(e.consume(h),s++,c):c(h)}function m(h){return h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),i.includes(o)||i.push(o),Q(e,f,"gfmFootnoteDefinitionWhitespace")):t(h)}function f(h){return n(h)}}function Sm(e,n,t){return e.check(it,n,e.attempt(ym,n,t))}function Em(e){e.exit("gfmFootnoteDefinition")}function Cm(e,n,t){let r=this;return Q(e,i,"gfmFootnoteDefinitionIndent",5);function i(o){let s=r.events[r.events.length-1];return s&&s[1].type==="gfmFootnoteDefinitionIndent"&&s[2].sliceSerialize(s[1],!0).length===4?n(o):t(o)}}function xo(e){let t=(e||{}).singleTilde,r={name:"strikethrough",tokenize:o,resolveAll:i};return t==null&&(t=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(s,a){let l=-1;for(;++l<s.length;)if(s[l][0]==="enter"&&s[l][1].type==="strikethroughSequenceTemporary"&&s[l][1]._close){let u=l;for(;u--;)if(s[u][0]==="exit"&&s[u][1].type==="strikethroughSequenceTemporary"&&s[u][1]._open&&s[l][1].end.offset-s[l][1].start.offset===s[u][1].end.offset-s[u][1].start.offset){s[l][1].type="strikethroughSequence",s[u][1].type="strikethroughSequence";let c={type:"strikethrough",start:Object.assign({},s[u][1].start),end:Object.assign({},s[l][1].end)},d={type:"strikethroughText",start:Object.assign({},s[u][1].end),end:Object.assign({},s[l][1].start)},m=[["enter",c,a],["enter",s[u][1],a],["exit",s[u][1],a],["enter",d,a]],f=a.parser.constructs.insideSpan.null;f&&Le(m,m.length,0,xt(f,s.slice(u+1,l),a)),Le(m,m.length,0,[["exit",d,a],["enter",s[l][1],a],["exit",s[l][1],a],["exit",c,a]]),Le(s,u-1,l-u+3,m),l=u+m.length-2;break}}for(l=-1;++l<s.length;)s[l][1].type==="strikethroughSequenceTemporary"&&(s[l][1].type="data");return s}function o(s,a,l){let u=this.previous,c=this.events,d=0;return m;function m(h){return u===126&&c[c.length-1][1].type!=="characterEscape"?l(h):(s.enter("strikethroughSequenceTemporary"),f(h))}function f(h){let b=Ue(u);if(h===126)return d>1?l(h):(s.consume(h),d++,f);if(d<2&&!t)return l(h);let w=s.exit("strikethroughSequenceTemporary"),y=Ue(h);return w._open=!y||y===2&&!!b,w._close=!b||b===2&&!!y,a(h)}}}var Nr=class{constructor(){this.map=[],this.index=new Map}add(n,t,r){Lm(this,n,t,r)}consume(n){if(this.map.sort(function(o,s){return o[0]-s[0]}),this.map.length===0)return;let t=this.map.length,r=[];for(;t>0;)t-=1,r.push(n.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),n.length=this.map[t][0];r.push(n.slice()),n.length=0;let i=r.pop();for(;i;){for(let o of i)n.push(o);i=r.pop()}this.map.length=0,this.index.clear()}};function Lm(e,n,t,r){if(t===0&&r.length===0)return;let i=e.index.get(n);if(i){i[1]+=t,i[2].push(...r);return}let o=[n,t,r];e.map.push(o),e.index.set(n,o)}function nl(e,n){let t=!1,r=[];for(;n<e.length;){let i=e[n];if(t){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[n+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[n-1][1].type==="tableDelimiterMarker"){let o=r.length-1;r[o]=r[o]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(t=!0);n+=1}return r}function vo(){return{flow:{null:{name:"table",tokenize:Am,resolveAll:$m}}}}function Am(e,n,t){let r=this,i=0,o=0,s;return a;function a(v){let re=r.events.length-1;for(;re>-1;){let{type:Z}=r.events[re][1];if(Z==="lineEnding"||Z==="linePrefix")re--;else break}let j=re>-1?r.events[re][1].type:null,B=j==="tableHead"||j==="tableRow"?S:l;return B===S&&r.parser.lazy[r.now().line]?t(v):B(v)}function l(v){return e.enter("tableHead"),e.enter("tableRow"),u(v)}function u(v){return v===124||(s=!0,o+=1),c(v)}function c(v){return v===null?t(v):F(v)?o>1?(o=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),f):t(v):V(v)?Q(e,c,"whitespace")(v):(o+=1,s&&(s=!1,i+=1),v===124?(e.enter("tableCellDivider"),e.consume(v),e.exit("tableCellDivider"),s=!0,c):(e.enter("data"),d(v)))}function d(v){return v===null||v===124||ae(v)?(e.exit("data"),c(v)):(e.consume(v),v===92?m:d)}function m(v){return v===92||v===124?(e.consume(v),d):d(v)}function f(v){return r.interrupt=!1,r.parser.lazy[r.now().line]?t(v):(e.enter("tableDelimiterRow"),s=!1,V(v)?Q(e,h,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(v):h(v))}function h(v){return v===45||v===58?w(v):v===124?(s=!0,e.enter("tableCellDivider"),e.consume(v),e.exit("tableCellDivider"),b):R(v)}function b(v){return V(v)?Q(e,w,"whitespace")(v):w(v)}function w(v){return v===58?(o+=1,s=!0,e.enter("tableDelimiterMarker"),e.consume(v),e.exit("tableDelimiterMarker"),y):v===45?(o+=1,y(v)):v===null||F(v)?O(v):R(v)}function y(v){return v===45?(e.enter("tableDelimiterFiller"),C(v)):R(v)}function C(v){return v===45?(e.consume(v),C):v===58?(s=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(v),e.exit("tableDelimiterMarker"),k):(e.exit("tableDelimiterFiller"),k(v))}function k(v){return V(v)?Q(e,O,"whitespace")(v):O(v)}function O(v){return v===124?h(v):v===null||F(v)?!s||i!==o?R(v):(e.exit("tableDelimiterRow"),e.exit("tableHead"),n(v)):R(v)}function R(v){return t(v)}function S(v){return e.enter("tableRow"),M(v)}function M(v){return v===124?(e.enter("tableCellDivider"),e.consume(v),e.exit("tableCellDivider"),M):v===null||F(v)?(e.exit("tableRow"),n(v)):V(v)?Q(e,M,"whitespace")(v):(e.enter("data"),Y(v))}function Y(v){return v===null||v===124||ae(v)?(e.exit("data"),M(v)):(e.consume(v),v===92?pe:Y)}function pe(v){return v===92||v===124?(e.consume(v),Y):Y(v)}}function $m(e,n){let t=-1,r=!0,i=0,o=[0,0,0,0],s=[0,0,0,0],a=!1,l=0,u,c,d,m=new Nr;for(;++t<e.length;){let f=e[t],h=f[1];f[0]==="enter"?h.type==="tableHead"?(a=!1,l!==0&&(rl(m,n,l,u,c),c=void 0,l=0),u={type:"table",start:Object.assign({},h.start),end:Object.assign({},h.end)},m.add(t,0,[["enter",u,n]])):h.type==="tableRow"||h.type==="tableDelimiterRow"?(r=!0,d=void 0,o=[0,0,0,0],s=[0,t+1,0,0],a&&(a=!1,c={type:"tableBody",start:Object.assign({},h.start),end:Object.assign({},h.end)},m.add(t,0,[["enter",c,n]])),i=h.type==="tableDelimiterRow"?2:c?3:1):i&&(h.type==="data"||h.type==="tableDelimiterMarker"||h.type==="tableDelimiterFiller")?(r=!1,s[2]===0&&(o[1]!==0&&(s[0]=s[1],d=Or(m,n,o,i,void 0,d),o=[0,0,0,0]),s[2]=t)):h.type==="tableCellDivider"&&(r?r=!1:(o[1]!==0&&(s[0]=s[1],d=Or(m,n,o,i,void 0,d)),o=s,s=[o[1],t,0,0])):h.type==="tableHead"?(a=!0,l=t):h.type==="tableRow"||h.type==="tableDelimiterRow"?(l=t,o[1]!==0?(s[0]=s[1],d=Or(m,n,o,i,t,d)):s[1]!==0&&(d=Or(m,n,s,i,t,d)),i=0):i&&(h.type==="data"||h.type==="tableDelimiterMarker"||h.type==="tableDelimiterFiller")&&(s[3]=t)}for(l!==0&&rl(m,n,l,u,c),m.consume(n.events),t=-1;++t<n.events.length;){let f=n.events[t];f[0]==="enter"&&f[1].type==="table"&&(f[1]._align=nl(n.events,t))}return e}function Or(e,n,t,r,i,o){let s=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",a="tableContent";t[0]!==0&&(o.end=Object.assign({},un(n.events,t[0])),e.add(t[0],0,[["exit",o,n]]));let l=un(n.events,t[1]);if(o={type:s,start:Object.assign({},l),end:Object.assign({},l)},e.add(t[1],0,[["enter",o,n]]),t[2]!==0){let u=un(n.events,t[2]),c=un(n.events,t[3]),d={type:a,start:Object.assign({},u),end:Object.assign({},c)};if(e.add(t[2],0,[["enter",d,n]]),r!==2){let m=n.events[t[2]],f=n.events[t[3]];if(m[1].end=Object.assign({},f[1].end),m[1].type="chunkText",m[1].contentType="text",t[3]>t[2]+1){let h=t[2]+1,b=t[3]-t[2]-1;e.add(h,b,[])}}e.add(t[3]+1,0,[["exit",d,n]])}return i!==void 0&&(o.end=Object.assign({},un(n.events,i)),e.add(i,0,[["exit",o,n]]),o=void 0),o}function rl(e,n,t,r,i){let o=[],s=un(n.events,t);i&&(i.end=Object.assign({},s),o.push(["exit",i,n])),r.end=Object.assign({},s),o.push(["exit",r,n]),e.add(t+1,0,o)}function un(e,n){let t=e[n],r=t[0]==="enter"?"start":"end";return t[1][r]}var Mm={name:"tasklistCheck",tokenize:Tm};function So(){return{text:{91:Mm}}}function Tm(e,n,t){let r=this;return i;function i(l){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?t(l):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),o)}function o(l){return ae(l)?(e.enter("taskListCheckValueUnchecked"),e.consume(l),e.exit("taskListCheckValueUnchecked"),s):l===88||l===120?(e.enter("taskListCheckValueChecked"),e.consume(l),e.exit("taskListCheckValueChecked"),s):t(l)}function s(l){return l===93?(e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),a):t(l)}function a(l){return F(l)?n(l):V(l)?e.check({tokenize:Im},n,t)(l):t(l)}}function Im(e,n,t){return Q(e,r,"whitespace");function r(i){return i===null?t(i):n(i)}}function il(e){return xr([so(),ko(),xo(e),vo(),So()])}var Nm={};function Rr(e){let n=this,t=e||Nm,r=n.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),s=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(il(t)),o.push(ro()),s.push(io(t))}var ol={tokenize:Om};function Om(e){let n=e.attempt(this.parser.constructs.contentInitial,r,i),t;return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),Q(e,n,"linePrefix")}function i(a){return e.enter("paragraph"),o(a)}function o(a){let l=e.enter("chunkText",{contentType:"text",previous:t});return t&&(t.next=l),t=l,s(a)}function s(a){if(a===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(a);return}return F(a)?(e.consume(a),e.exit("chunkText"),o):(e.consume(a),s)}}var al={tokenize:Rm},sl={tokenize:Pm};function Rm(e){let n=this,t=[],r=0,i,o,s;return a;function a(k){if(r<t.length){let O=t[r];return n.containerState=O[1],e.attempt(O[0].continuation,l,u)(k)}return u(k)}function l(k){if(r++,n.containerState._closeFlow){n.containerState._closeFlow=void 0,i&&C();let O=n.events.length,R=O,S;for(;R--;)if(n.events[R][0]==="exit"&&n.events[R][1].type==="chunkFlow"){S=n.events[R][1].end;break}y(r);let M=O;for(;M<n.events.length;)n.events[M][1].end={...S},M++;let Y=new ct;return Y.add(R+1,0,n.events.slice(O)),Y.add(O,M-O,[]),Y.consume(n.events),u(k)}return a(k)}function u(k){if(r===t.length){if(!i)return m(k);if(i.currentConstruct&&i.currentConstruct.concrete)return h(k);n.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return n.containerState={},e.check(sl,c,d)(k)}function c(k){return i&&C(),y(r),m(k)}function d(k){return n.parser.lazy[n.now().line]=r!==t.length,s=n.now().offset,h(k)}function m(k){return n.containerState={},e.attempt(sl,f,h)(k)}function f(k){return r++,t.push([n.currentConstruct,n.containerState]),m(k)}function h(k){if(k===null){i&&C(),y(0),e.consume(k);return}return i=i||n.parser.flow(n.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:o}),b(k)}function b(k){if(k===null){w(e.exit("chunkFlow"),!0),y(0),e.consume(k);return}return F(k)?(e.consume(k),w(e.exit("chunkFlow")),r=0,n.interrupt=void 0,a):(e.consume(k),b)}function w(k,O){let R=n.sliceStream(k);if(O&&R.push(null),k.previous=o,o&&(o.next=k),o=k,i.defineSkip(k.start),i.write(R),n.parser.lazy[k.start.line]){let S=i.events.length;for(;S--;)if(i.events[S][1].start.offset<s&&(!i.events[S][1].end||i.events[S][1].end.offset>s))return;let M=n.events.length,Y=M,pe,v;for(;Y--;)if(n.events[Y][0]==="exit"&&n.events[Y][1].type==="chunkFlow"){if(pe){v=n.events[Y][1].end;break}pe=!0}for(y(r),S=M;S<n.events.length;)n.events[S][1].end={...v},S++;let re=new ct;re.add(Y+1,0,n.events.slice(M)),re.add(M,S-M,[]),re.consume(n.events)}}function y(k){let O=t.length;for(;O-- >k;){let R=t[O];n.containerState=R[1],R[0].exit.call(n,e)}t.length=k}function C(){i.write([null]),o=void 0,i=void 0,n.containerState._closeFlow=void 0}}function Pm(e,n,t){return Q(e,e.attempt(this.parser.constructs.document,n,t),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}var ll={tokenize:Fm};function Fm(e){let n=this,t=e.attempt(it,r,e.attempt(this.parser.constructs.flowInitial,i,Q(e,e.attempt(this.parser.constructs.flow,i,e.attempt(fo,i)),"linePrefix")));return t;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),n.currentConstruct=void 0,t}function i(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n.currentConstruct=void 0,t}}var cl={resolveAll:ml()},ul=fl("string"),dl=fl("text");function fl(e){return{resolveAll:ml(e==="text"?_m:void 0),tokenize:n};function n(t){let r=this,i=this.parser.constructs[e],o=t.attempt(i,s,a);return s;function s(c){return u(c)?o(c):a(c)}function a(c){if(c===null){t.consume(c);return}return t.enter("data"),t.consume(c),l}function l(c){return u(c)?(t.exit("data"),o(c)):(t.consume(c),l)}function u(c){if(c===null)return!0;let d=i[c],m=-1;if(d)for(;++m<d.length;){let f=d[m];if(!f.previous||f.previous.call(r,r.previous))return!0}return!1}}}function ml(e){return n;function n(t,r){let i=-1,o;for(;++i<=t.length;)o===void 0?t[i]&&t[i][1].type==="data"&&(o=i,i++):(!t[i]||t[i][1].type!=="data")&&(i!==o+2&&(t[o][1].end=t[i-1][1].end,t.splice(o+2,i-o-2),i=o+2),o=void 0);return e?e(t,r):t}}function _m(e,n){let t=new ct,r=0;for(;++r<=e.length;)if((r===e.length||e[r][1].type==="lineEnding")&&e[r-1][1].type==="data"){let i=e[r-1][1],o=n.sliceStream(i),s=o.length,a=-1,l=0,u;for(;s--;){let c=o[s];if(typeof c=="string"){for(a=c.length;c.charCodeAt(a-1)===32;)l++,a--;if(a)break;a=-1}else if(c===-2)u=!0,l++;else if(c!==-1){s++;break}}if(n._contentTypeTextTrailing&&r===e.length&&(l=0),l){let c={type:r===e.length||u||l<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?a:i.start._bufferIndex+a,_index:i.start._index+s,line:i.end.line,column:i.end.column-l,offset:i.end.offset-l},end:{...i.end}};i.end={...c.start},i.start.offset===i.end.offset?Object.assign(i,c):t.add(r,0,[["enter",c,n],["exit",c,n]])}r++}return t.consume(e),e}var Eo={};Xl(Eo,{attentionMarkers:()=>Vm,contentInitial:()=>jm,disable:()=>Gm,document:()=>Dm,flow:()=>Bm,flowInitial:()=>qm,insideSpan:()=>Um,string:()=>Hm,text:()=>zm});var Dm={42:Fe,43:Fe,45:Fe,48:Fe,49:Fe,50:Fe,51:Fe,52:Fe,53:Fe,54:Fe,55:Fe,56:Fe,57:Fe,62:vr},jm={91:mo},qm={[-2]:In,[-1]:In,32:In},Bm={35:po,42:Ht,45:[Ir,Ht],60:go,61:Ir,95:Ht,96:Cr,126:Cr},Hm={38:Er,92:Sr},zm={[-5]:On,[-4]:On,[-3]:On,33:yo,38:Er,42:Mn,60:[lo,bo],91:wo,92:[ho,Sr],93:Bt,95:Mn,96:uo},Um={null:[Mn,cl]},Vm={null:[42,95]},Gm={null:[]};function hl(e,n,t){let r={_bufferIndex:-1,_index:0,line:t&&t.line||1,column:t&&t.column||1,offset:t&&t.offset||0},i={},o=[],s=[],a=[],l=!0,u={attempt:pe(M),check:pe(Y),consume:O,enter:R,exit:S,interrupt:pe(Y,{interrupt:!0})},c={code:null,containerState:{},defineSkip:y,events:[],now:w,parser:e,previous:null,sliceSerialize:h,sliceStream:b,write:f},d=n.tokenize.call(c,u),m;return n.resolveAll&&o.push(n),c;function f(B){return s=_e(s,B),C(),s[s.length-1]!==null?[]:(v(n,0),c.events=xt(o,c.events,c),c.events)}function h(B,Z){return Wm(b(B),Z)}function b(B){return Km(s,B)}function w(){let{_bufferIndex:B,_index:Z,line:A,column:H,offset:le}=r;return{_bufferIndex:B,_index:Z,line:A,column:H,offset:le}}function y(B){i[B.line]=B.column,j()}function C(){for(;r._index<s.length;){let B=s[r._index];if(typeof B=="string"){let Z=r._index;for(r._bufferIndex<0&&(r._bufferIndex=0);r._index===Z&&r._bufferIndex<B.length;)k(B.charCodeAt(r._bufferIndex))}else k(B)}}function k(B){l=void 0,m=B,d=d(B)}function O(B){F(B)?(r.line++,r.column=1,r.offset+=B===-3?2:1,j()):B!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===s[r._index].length&&(r._bufferIndex=-1,r._index++)),c.previous=B,l=!0}function R(B,Z){let A=Z||{};return A.type=B,A.start=w(),c.events.push(["enter",A,c]),a.push(A),A}function S(B){let Z=a.pop();return Z.end=w(),c.events.push(["exit",Z,c]),Z}function M(B,Z){v(B,Z.from)}function Y(B,Z){Z.restore()}function pe(B,Z){return A;function A(H,le,ke){let ve,g,$e,se;return Array.isArray(H)?ge(H):"tokenize"in H?ge([H]):p(H);function p(_){return $;function $(U){let D=U!==null&&_[U],N=U!==null&&_.null,q=[...Array.isArray(D)?D:D?[D]:[],...Array.isArray(N)?N:N?[N]:[]];return ge(q)(U)}}function ge(_){return ve=_,g=0,_.length===0?ke:Ne(_[g])}function Ne(_){return $;function $(U){return se=re(),$e=_,_.partial||(c.currentConstruct=_),_.name&&c.parser.constructs.disable.null.includes(_.name)?x(U):_.tokenize.call(Z?Object.assign(Object.create(c),Z):c,u,Ve,x)(U)}}function Ve(_){return l=!0,B($e,se),le}function x(_){return l=!0,se.restore(),++g<ve.length?Ne(ve[g]):ke}}}function v(B,Z){B.resolveAll&&!o.includes(B)&&o.push(B),B.resolve&&Le(c.events,Z,c.events.length-Z,B.resolve(c.events.slice(Z),c)),B.resolveTo&&(c.events=B.resolveTo(c.events,c))}function re(){let B=w(),Z=c.previous,A=c.currentConstruct,H=c.events.length,le=Array.from(a);return{from:H,restore:ke};function ke(){r=B,c.previous=Z,c.currentConstruct=A,c.events.length=H,a=le,j()}}function j(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function Km(e,n){let t=n.start._index,r=n.start._bufferIndex,i=n.end._index,o=n.end._bufferIndex,s;if(t===i)s=[e[t].slice(r,o)];else{if(s=e.slice(t,i),r>-1){let a=s[0];typeof a=="string"?s[0]=a.slice(r):s.shift()}o>0&&s.push(e[i].slice(0,o))}return s}function Wm(e,n){let t=-1,r=[],i;for(;++t<e.length;){let o=e[t],s;if(typeof o=="string")s=o;else switch(o){case-5:{s="\r";break}case-4:{s=`
|
|
99
|
+
`))}function l(f,h,b,w){let y=b.enter("tableCell"),C=b.enter("phrasing"),k=b.containerPhrasing(f,{...w,before:o,after:o});return C(),y(),k}function u(f,h){return fa(f,{align:h,alignDelimiters:r,padding:t,stringLength:i})}function c(f,h,b){let w=f.children,y=-1,C=[],k=h.enter("table");for(;++y<w.length;)C[y]=d(w[y],h,b);return k(),C}function d(f,h,b){let w=f.children,y=-1,C=[],k=h.enter("tableRow");for(;++y<w.length;)C[y]=l(w[y],f,h,b);return k(),C}function m(f,h,b){let w=$n.inlineCode(f,h,b);return b.stack.includes("tableCell")&&(w=w.replace(/\|/g,"\\$&")),w}}function to(){return{exit:{taskListCheckValueChecked:Ua,taskListCheckValueUnchecked:Ua,paragraph:nf}}}function no(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:rf}}}function Ua(e){let n=this.stack[this.stack.length-2];n.type,n.checked=e.type==="taskListCheckValueChecked"}function nf(e){let n=this.stack[this.stack.length-2];if(n&&n.type==="listItem"&&typeof n.checked=="boolean"){let t=this.stack[this.stack.length-1];t.type;let r=t.children[0];if(r&&r.type==="text"){let i=n.children,o=-1,s;for(;++o<i.length;){let a=i[o];if(a.type==="paragraph"){s=a;break}}s===t&&(r.value=r.value.slice(1),r.value.length===0?t.children.shift():t.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,t.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function rf(e,n,t,r){let i=e.children[0],o=typeof e.checked=="boolean"&&i&&i.type==="paragraph",s="["+(e.checked?"x":" ")+"] ",a=t.createTracker(r);o&&a.move(s);let l=$n.listItem(e,n,t,{...r,...a.current()});return o&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,u)),l;function u(c){return c+s}}function ro(){return[Ni(),Ri(),Fi(),Zi(),to()]}function io(e){return{extensions:[Oi(),Pi(e),_i(),eo(e),no()]}}function Le(e,n,t,r){let i=e.length,o=0,s;if(n<0?n=-n>i?0:i+n:n=n>i?i:n,t=t>0?t:0,r.length<1e4)s=Array.from(r),s.unshift(n,t),e.splice(...s);else for(t&&e.splice(n,t);o<r.length;)s=r.slice(o,o+1e4),s.unshift(n,0),e.splice(...s),o+=1e4,n+=1e4}function _e(e,n){return e.length>0?(Le(e,e.length,0,n),e):n}var Va={}.hasOwnProperty;function xr(e){let n={},t=-1;for(;++t<e.length;)of(n,e[t]);return n}function of(e,n){let t;for(t in n){let i=(Va.call(e,t)?e[t]:void 0)||(e[t]={}),o=n[t],s;if(o)for(s in o){Va.call(i,s)||(i[s]=[]);let a=o[s];sf(i[s],Array.isArray(a)?a:a?[a]:[])}}}function sf(e,n){let t=-1,r=[];for(;++t<n.length;)(n[t].add==="after"?e:r).push(n[t]);Le(e,0,0,r)}var af={tokenize:ff,partial:!0},Ga={tokenize:mf,partial:!0},Ka={tokenize:hf,partial:!0},Wa={tokenize:pf,partial:!0},lf={tokenize:gf,partial:!0},Ya={name:"wwwAutolink",tokenize:uf,previous:Qa},Ja={name:"protocolAutolink",tokenize:df,previous:Xa},lt={name:"emailAutolink",tokenize:cf,previous:Za},rt={};function so(){return{text:rt}}var jt=48;for(;jt<123;)rt[jt]=lt,jt++,jt===58?jt=65:jt===91&&(jt=97);rt[43]=lt;rt[45]=lt;rt[46]=lt;rt[95]=lt;rt[72]=[lt,Ja];rt[104]=[lt,Ja];rt[87]=[lt,Ya];rt[119]=[lt,Ya];function cf(e,n,t){let r=this,i,o;return s;function s(d){return!oo(d)||!Za.call(r,r.previous)||ao(r.events)?t(d):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),a(d))}function a(d){return oo(d)?(e.consume(d),a):d===64?(e.consume(d),l):t(d)}function l(d){return d===46?e.check(lf,c,u)(d):d===45||d===95||Se(d)?(o=!0,e.consume(d),l):c(d)}function u(d){return e.consume(d),i=!0,l}function c(d){return o&&i&&xe(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),n(d)):t(d)}}function uf(e,n,t){let r=this;return i;function i(s){return s!==87&&s!==119||!Qa.call(r,r.previous)||ao(r.events)?t(s):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(af,e.attempt(Ga,e.attempt(Ka,o),t),t)(s))}function o(s){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),n(s)}}function df(e,n,t){let r=this,i="",o=!1;return s;function s(d){return(d===72||d===104)&&Xa.call(r,r.previous)&&!ao(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(d),e.consume(d),a):t(d)}function a(d){if(xe(d)&&i.length<5)return i+=String.fromCodePoint(d),e.consume(d),a;if(d===58){let m=i.toLowerCase();if(m==="http"||m==="https")return e.consume(d),l}return t(d)}function l(d){return d===47?(e.consume(d),o?u:(o=!0,l)):t(d)}function u(d){return d===null||Ot(d)||ae(d)||nt(d)||Rt(d)?t(d):e.attempt(Ga,e.attempt(Ka,c),t)(d)}function c(d){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),n(d)}}function ff(e,n,t){let r=0;return i;function i(s){return(s===87||s===119)&&r<3?(r++,e.consume(s),i):s===46&&r===3?(e.consume(s),o):t(s)}function o(s){return s===null?t(s):n(s)}}function mf(e,n,t){let r,i,o;return s;function s(u){return u===46||u===95?e.check(Wa,l,a)(u):u===null||ae(u)||nt(u)||u!==45&&Rt(u)?l(u):(o=!0,e.consume(u),s)}function a(u){return u===95?r=!0:(i=r,r=void 0),e.consume(u),s}function l(u){return i||r||!o?t(u):n(u)}}function hf(e,n){let t=0,r=0;return i;function i(s){return s===40?(t++,e.consume(s),i):s===41&&r<t?o(s):s===33||s===34||s===38||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===60||s===63||s===93||s===95||s===126?e.check(Wa,n,o)(s):s===null||ae(s)||nt(s)?n(s):(e.consume(s),i)}function o(s){return s===41&&r++,e.consume(s),i}}function pf(e,n,t){return r;function r(a){return a===33||a===34||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===63||a===95||a===126?(e.consume(a),r):a===38?(e.consume(a),o):a===93?(e.consume(a),i):a===60||a===null||ae(a)||nt(a)?n(a):t(a)}function i(a){return a===null||a===40||a===91||ae(a)||nt(a)?n(a):r(a)}function o(a){return xe(a)?s(a):t(a)}function s(a){return a===59?(e.consume(a),r):xe(a)?(e.consume(a),s):t(a)}}function gf(e,n,t){return r;function r(o){return e.consume(o),i}function i(o){return Se(o)?t(o):n(o)}}function Qa(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||ae(e)}function Xa(e){return!xe(e)}function Za(e){return!(e===47||oo(e))}function oo(e){return e===43||e===45||e===46||e===95||Se(e)}function ao(e){let n=e.length,t=!1;for(;n--;){let r=e[n][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){t=!0;break}if(r._gfmAutolinkLiteralWalkedInto){t=!1;break}}return e.length>0&&!t&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),t}function xt(e,n,t){let r=[],i=-1;for(;++i<e.length;){let o=e[i].resolveAll;o&&!r.includes(o)&&(n=o(n,t),r.push(o))}return n}var Mn={name:"attention",resolveAll:bf,tokenize:yf};function bf(e,n){let t=-1,r;for(;++t<e.length;)if(e[t][0]==="enter"&&e[t][1].type==="attentionSequence"&&e[t][1]._close){let i=t;for(;i--;)if(e[i][0]==="exit"&&e[i][1].type==="attentionSequence"&&e[i][1]._open&&n.sliceSerialize(e[i][1]).charCodeAt(0)===n.sliceSerialize(e[t][1]).charCodeAt(0)){if((e[i][1]._close||e[t][1]._open)&&(e[t][1].end.offset-e[t][1].start.offset)%3&&!((e[i][1].end.offset-e[i][1].start.offset+e[t][1].end.offset-e[t][1].start.offset)%3))continue;let o=e[i][1].end.offset-e[i][1].start.offset>1&&e[t][1].end.offset-e[t][1].start.offset>1?2:1,s={...e[i][1].end},a={...e[t][1].start};el(s,-o),el(a,o);let l={type:o>1?"strongSequence":"emphasisSequence",start:s,end:{...e[i][1].end}},u={type:o>1?"strongSequence":"emphasisSequence",start:{...e[t][1].start},end:a},c={type:o>1?"strongText":"emphasisText",start:{...e[i][1].end},end:{...e[t][1].start}},d={type:o>1?"strong":"emphasis",start:{...l.start},end:{...u.end}};e[i][1].end={...l.start},e[t][1].start={...u.end},r=[],e[i][1].end.offset-e[i][1].start.offset&&(r=_e(r,[["enter",e[i][1],n],["exit",e[i][1],n]])),r=_e(r,[["enter",d,n],["enter",l,n],["exit",l,n],["enter",c,n]]),r=_e(r,xt(n.parser.constructs.insideSpan.null,e.slice(i+1,t),n)),r=_e(r,[["exit",c,n],["enter",u,n],["exit",u,n],["exit",d,n]]);let m=0;e[t][1].end.offset-e[t][1].start.offset&&(m=2,r=_e(r,[["enter",e[t][1],n],["exit",e[t][1],n]])),Le(e,i-1,t-i+3,r),t=i+r.length-m-2;break}}for(t=-1;++t<e.length;)e[t][1].type==="attentionSequence"&&(e[t][1].type="data");return e}function yf(e,n){let t=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Ve(r),o;return s;function s(l){return o=l,e.enter("attentionSequence"),a(l)}function a(l){if(l===o)return e.consume(l),a;let u=e.exit("attentionSequence"),c=Ve(l),d=!c||c===2&&i||t.includes(l)&&l!==42&&l!==95,m=!i||i===2&&c||t.includes(r)&&r!==42&&r!==95;return u._open=!!(o===42?d:d&&(i||!m)),u._close=!!(o===42?m:m&&(c||!d)),n(l)}}function el(e,n){e.column+=n,e.offset+=n,e._bufferIndex+=n}var lo={name:"autolink",tokenize:wf};function wf(e,n,t){let r=0;return i;function i(f){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(f){return xe(f)?(e.consume(f),s):f===64?t(f):u(f)}function s(f){return f===43||f===45||f===46||Se(f)?(r=1,a(f)):u(f)}function a(f){return f===58?(e.consume(f),r=0,l):(f===43||f===45||f===46||Se(f))&&r++<32?(e.consume(f),a):(r=0,u(f))}function l(f){return f===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.exit("autolink"),n):f===null||f===32||f===60||Ot(f)?t(f):(e.consume(f),l)}function u(f){return f===64?(e.consume(f),c):Zs(f)?(e.consume(f),u):t(f)}function c(f){return Se(f)?d(f):t(f)}function d(f){return f===46?(e.consume(f),r=0,c):f===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.exit("autolink"),n):m(f)}function m(f){if((f===45||Se(f))&&r++<63){let h=f===45?m:d;return e.consume(f),h}return t(f)}}function Q(e,n,t,r){let i=r?r-1:1/0,o=0;return s;function s(l){return V(l)?(e.enter(t),a(l)):n(l)}function a(l){return V(l)&&o++<i?(e.consume(l),a):(e.exit(t),n(l))}}function co(e,n,t,r,i,o){let s=0;return a;function a(c){return o>0&&V(c)?(e.enter(r),l(c)):u(c)}function l(c){return V(c)&&s<o?(e.consume(c),s++,l):(e.exit(r),u(c))}function u(c){return s>=i?n(c):t(c)}}var it={partial:!0,tokenize:kf};function kf(e,n,t){return r;function r(o){return V(o)?Q(e,i,"linePrefix")(o):i(o)}function i(o){return o===null||F(o)?n(o):t(o)}}var vr={continuation:{tokenize:vf},exit:Sf,name:"blockQuote",tokenize:xf};function xf(e,n,t){let r=this;return i;function i(s){if(s===62){let a=r.containerState;return a.open||(e.enter("blockQuote",{_container:!0}),a.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(s),e.exit("blockQuoteMarker"),o}return t(s)}function o(s){return V(s)?(e.enter("blockQuotePrefixWhitespace"),e.consume(s),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),n):(e.exit("blockQuotePrefix"),n(s))}}function vf(e,n,t){let r=this;return i;function i(s){return V(s)?Q(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):o(s)}function o(s){return e.attempt(vr,n,t)(s)}}function Sf(e){e.exit("blockQuote")}var Sr={name:"characterEscape",tokenize:Ef};function Ef(e,n,t){return r;function r(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),i}function i(o){return cr(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),n):t(o)}}var Er={name:"characterReference",tokenize:Cf};function Cf(e,n,t){let r=this,i=0,o,s;return a;function a(d){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),l}function l(d){return d===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(d),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),o=31,s=Se,c(d))}function u(d){return d===88||d===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(d),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,s=ea,c):(e.enter("characterReferenceValue"),o=7,s=vn,c(d))}function c(d){if(d===59&&i){let m=e.exit("characterReferenceValue");return s===Se&&!cn(r.sliceSerialize(m))?t(d):(e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),e.exit("characterReference"),n)}return s(d)&&i++<o?(e.consume(d),c):t(d)}}var Tn={partial:!0,tokenize:Lf};function Lf(e,n,t){let r=this;return i;function i(s){return s===null?t(s):(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),o)}function o(s){return r.parser.lazy[r.now().line]?t(s):n(s)}}var Cr={concrete:!0,name:"codeFenced",tokenize:Af};function Af(e,n,t){let r=this,i={partial:!0,tokenize:R},o=0,s=0,a;return l;function l(S){return u(S)}function u(S){let M=r.events[r.events.length-1];return o=M&&M[1].type==="linePrefix"?M[2].sliceSerialize(M[1],!0).length:0,a=S,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),c(S)}function c(S){return S===a?(s++,e.consume(S),c):s<3?t(S):(e.exit("codeFencedFenceSequence"),V(S)?Q(e,d,"whitespace")(S):d(S))}function d(S){return S===null||F(S)?(e.exit("codeFencedFence"),r.interrupt?n(S):e.check(Tn,b,O)(S)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),m(S))}function m(S){return S===null||F(S)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),d(S)):V(S)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Q(e,f,"whitespace")(S)):S===96&&S===a?t(S):(e.consume(S),m)}function f(S){return S===null||F(S)?d(S):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),h(S))}function h(S){return S===null||F(S)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),d(S)):S===96&&S===a?t(S):(e.consume(S),h)}function b(S){return e.attempt(i,O,w)(S)}function w(S){return e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),y}function y(S){return o>0&&V(S)?Q(e,C,"linePrefix",o+1)(S):C(S)}function C(S){return S===null||F(S)?e.check(Tn,b,O)(S):(e.enter("codeFlowValue"),k(S))}function k(S){return S===null||F(S)?(e.exit("codeFlowValue"),C(S)):(e.consume(S),k)}function O(S){return e.exit("codeFenced"),n(S)}function R(S,M,W){let pe=0;return v;function v(A){return S.enter("lineEnding"),S.consume(A),S.exit("lineEnding"),ie}function ie(A){return S.enter("codeFencedFence"),V(A)?Q(S,j,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(A):j(A)}function j(A){return A===a?(S.enter("codeFencedFenceSequence"),B(A)):W(A)}function B(A){return A===a?(pe++,S.consume(A),B):pe>=s?(S.exit("codeFencedFenceSequence"),V(A)?Q(S,Z,"whitespace")(A):Z(A)):W(A)}function Z(A){return A===null||F(A)?(S.exit("codeFencedFence"),M(A)):W(A)}}}var In={name:"codeIndented",tokenize:Mf},$f={partial:!0,tokenize:Tf};function Mf(e,n,t){return r;function r(a){return e.enter("codeIndented"),co(e,i,t,"linePrefix",4,4)(a)}function i(a){return a===null?s(a):F(a)?e.attempt($f,i,s)(a):(e.enter("codeFlowValue"),o(a))}function o(a){return a===null||F(a)?(e.exit("codeFlowValue"),i(a)):(e.consume(a),o)}function s(a){return e.exit("codeIndented"),n(a)}}function Tf(e,n,t){let r=this;return i;function i(s){return r.parser.lazy[r.now().line]?t(s):F(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i):co(e,n,o,"linePrefix",4,4)(s)}function o(s){return F(s)?i(s):t(s)}}var uo={name:"codeText",previous:Nf,resolve:If,tokenize:Of};function If(e){let n=e.length-4,t=3,r,i;if((e[t][1].type==="lineEnding"||e[t][1].type==="space")&&(e[n][1].type==="lineEnding"||e[n][1].type==="space")){for(r=t;++r<n;)if(e[r][1].type==="codeTextData"){e[t][1].type="codeTextPadding",e[n][1].type="codeTextPadding",t+=2,n-=2;break}}for(r=t-1,n++;++r<=n;)i===void 0?r!==n&&e[r][1].type!=="lineEnding"&&(i=r):(r===n||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),n-=r-i-2,r=i+2),i=void 0);return e}function Nf(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Of(e,n,t){let r=this,i=0,o,s;return a;function a(m){return e.enter("codeText"),e.enter("codeTextSequence"),l(m)}function l(m){return m===96?(e.consume(m),i++,l):(e.exit("codeTextSequence"),u(m))}function u(m){return m===null?t(m):m===32?(e.enter("space"),e.consume(m),e.exit("space"),u):m===96?(s=e.enter("codeTextSequence"),o=0,d(m)):F(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),u):(e.enter("codeTextData"),c(m))}function c(m){return m===null||m===32||m===96||F(m)?(e.exit("codeTextData"),u(m)):(e.consume(m),c)}function d(m){return m===96?(e.consume(m),o++,d):o===i?(e.exit("codeTextSequence"),e.exit("codeText"),n(m)):(s.type="codeTextData",c(m))}}var Lr=class{constructor(n){this.left=n?[...n]:[],this.right=[]}get(n){if(n<0||n>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+n+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return n<this.left.length?this.left[n]:this.right[this.right.length-n+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(n,t){let r=t??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(n,r):n>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-n+this.left.length).reverse():this.left.slice(n).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(n,t,r){let i=t||0;this.setCursor(Math.trunc(n));let o=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Nn(this.left,r),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(n){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(n)}pushMany(n){this.setCursor(Number.POSITIVE_INFINITY),Nn(this.left,n)}unshift(n){this.setCursor(0),this.right.push(n)}unshiftMany(n){this.setCursor(0),Nn(this.right,n.reverse())}setCursor(n){if(!(n===this.left.length||n>this.left.length&&this.right.length===0||n<0&&this.left.length===0))if(n<this.left.length){let t=this.left.splice(n,Number.POSITIVE_INFINITY);Nn(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-n,Number.POSITIVE_INFINITY);Nn(this.left,t.reverse())}}};function Nn(e,n){let t=0;if(n.length<1e4)e.push(...n);else for(;t<n.length;)e.push(...n.slice(t,t+1e4)),t+=1e4}function Ar(e){let n={},t=-1,r,i,o,s,a,l,u,c=new Lr(e);for(;++t<c.length;){for(;t in n;)t=n[t];if(r=c.get(t),t&&r[1].type==="chunkFlow"&&c.get(t-1)[1].type==="listItemPrefix"&&(l=r[1]._tokenizer.events,o=0,o<l.length&&l[o][1].type==="lineEndingBlank"&&(o+=2),o<l.length&&l[o][1].type==="content"))for(;++o<l.length&&l[o][1].type!=="content";)l[o][1].type==="chunkText"&&(l[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(n,Rf(c,t)),t=n[t],u=!0);else if(r[1]._container){for(o=t,i=void 0;o--;)if(s=c.get(o),s[1].type==="lineEnding"||s[1].type==="lineEndingBlank")s[0]==="enter"&&(i&&(c.get(i)[1].type="lineEndingBlank"),s[1].type="lineEnding",i=o);else if(!(s[1].type==="linePrefix"||s[1].type==="listItemIndent"))break;i&&(r[1].end={...c.get(i)[1].start},a=c.slice(i,t),a.unshift(r),c.splice(i,t-i+1,a))}}return Le(e,0,Number.POSITIVE_INFINITY,c.slice(0)),!u}function Rf(e,n){let t=e.get(n)[1],r=e.get(n)[2],i=n-1,o=[],s=t._tokenizer;s||(s=r.parser[t.contentType](t.start),t._contentTypeTextTrailing&&(s._contentTypeTextTrailing=!0));let a=s.events,l=[],u={},c,d,m=-1,f=t,h=0,b=0,w=[b];for(;f;){for(;e.get(++i)[1]!==f;);o.push(i),f._tokenizer||(c=r.sliceStream(f),f.next||c.push(null),d&&s.defineSkip(f.start),f._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(c),f._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),d=f,f=f.next}for(f=t;++m<a.length;)a[m][0]==="exit"&&a[m-1][0]==="enter"&&a[m][1].type===a[m-1][1].type&&a[m][1].start.line!==a[m][1].end.line&&(b=m+1,w.push(b),f._tokenizer=void 0,f.previous=void 0,f=f.next);for(s.events=[],f?(f._tokenizer=void 0,f.previous=void 0):w.pop(),m=w.length;m--;){let y=a.slice(w[m],w[m+1]),C=o.pop();l.push([C,C+y.length-1]),e.splice(C,2,y)}for(l.reverse(),m=-1;++m<l.length;)u[h+l[m][0]]=h+l[m][1],h+=l[m][1]-l[m][0]-1;return u}var fo={resolve:Ff,tokenize:_f},Pf={partial:!0,tokenize:Df};function Ff(e){return Ar(e),e}function _f(e,n){let t;return r;function r(a){return e.enter("content"),t=e.enter("chunkContent",{contentType:"content"}),i(a)}function i(a){return a===null?o(a):F(a)?e.check(Pf,s,o)(a):(e.consume(a),i)}function o(a){return e.exit("chunkContent"),e.exit("content"),n(a)}function s(a){return e.consume(a),e.exit("chunkContent"),t.next=e.enter("chunkContent",{contentType:"content",previous:t}),t=t.next,i}}function Df(e,n,t){let r=this;return i;function i(s){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),Q(e,o,"linePrefix")}function o(s){if(s===null||F(s))return t(s);let a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?n(s):e.interrupt(r.parser.constructs.flow,t,n)(s)}}function $r(e,n,t,r,i,o,s,a,l){let u=l||Number.POSITIVE_INFINITY,c=0;return d;function d(y){return y===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(y),e.exit(o),m):y===null||y===32||y===41||Ot(y)?t(y):(e.enter(r),e.enter(s),e.enter(a),e.enter("chunkString",{contentType:"string"}),b(y))}function m(y){return y===62?(e.enter(o),e.consume(y),e.exit(o),e.exit(i),e.exit(r),n):(e.enter(a),e.enter("chunkString",{contentType:"string"}),f(y))}function f(y){return y===62?(e.exit("chunkString"),e.exit(a),m(y)):y===null||y===60||F(y)?t(y):(e.consume(y),y===92?h:f)}function h(y){return y===60||y===62||y===92?(e.consume(y),f):f(y)}function b(y){return!c&&(y===null||y===41||ae(y))?(e.exit("chunkString"),e.exit(a),e.exit(s),e.exit(r),n(y)):c<u&&y===40?(e.consume(y),c++,b):y===41?(e.consume(y),c--,b):y===null||y===32||y===40||Ot(y)?t(y):(e.consume(y),y===92?w:b)}function w(y){return y===40||y===41||y===92?(e.consume(y),b):b(y)}}function Mr(e,n,t,r,i,o){let s=this,a=0,l;return u;function u(f){return e.enter(r),e.enter(i),e.consume(f),e.exit(i),e.enter(o),c}function c(f){return a>999||f===null||f===91||f===93&&!l||f===94&&!a&&"_hiddenFootnoteSupport"in s.parser.constructs?t(f):f===93?(e.exit(o),e.enter(i),e.consume(f),e.exit(i),e.exit(r),n):F(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),d(f))}function d(f){return f===null||f===91||f===93||F(f)||a++>999?(e.exit("chunkString"),c(f)):(e.consume(f),l||(l=!V(f)),f===92?m:d)}function m(f){return f===91||f===92||f===93?(e.consume(f),a++,d):d(f)}}function Tr(e,n,t,r,i,o){let s;return a;function a(m){return m===34||m===39||m===40?(e.enter(r),e.enter(i),e.consume(m),e.exit(i),s=m===40?41:m,l):t(m)}function l(m){return m===s?(e.enter(i),e.consume(m),e.exit(i),e.exit(r),n):(e.enter(o),u(m))}function u(m){return m===s?(e.exit(o),l(s)):m===null?t(m):F(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),Q(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(m))}function c(m){return m===s||m===null||F(m)?(e.exit("chunkString"),u(m)):(e.consume(m),m===92?d:c)}function d(m){return m===s||m===92?(e.consume(m),c):c(m)}}function qt(e,n){let t;return r;function r(i){return F(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),t=!0,r):V(i)?Q(e,r,t?"linePrefix":"lineSuffix")(i):n(i)}}var mo={name:"definition",tokenize:qf},jf={partial:!0,tokenize:Bf};function qf(e,n,t){let r=this,i;return o;function o(f){return e.enter("definition"),s(f)}function s(f){return Mr.call(r,e,a,t,"definitionLabel","definitionLabelMarker","definitionLabelString")(f)}function a(f){return i=Pe(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),f===58?(e.enter("definitionMarker"),e.consume(f),e.exit("definitionMarker"),l):t(f)}function l(f){return ae(f)?qt(e,u)(f):u(f)}function u(f){return $r(e,c,t,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(f)}function c(f){return e.attempt(jf,d,d)(f)}function d(f){return V(f)?Q(e,m,"whitespace")(f):m(f)}function m(f){return f===null||F(f)?(e.exit("definition"),r.parser.defined.push(i),n(f)):t(f)}}function Bf(e,n,t){return r;function r(a){return ae(a)?qt(e,i)(a):t(a)}function i(a){return Tr(e,o,t,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function o(a){return V(a)?Q(e,s,"whitespace")(a):s(a)}function s(a){return a===null||F(a)?n(a):t(a)}}var ho={name:"hardBreakEscape",tokenize:Hf};function Hf(e,n,t){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return F(o)?(e.exit("hardBreakEscape"),n(o)):t(o)}}var po={name:"headingAtx",resolve:zf,tokenize:Uf};function zf(e,n){let t=e.length-2,r=3;if(e[r][1].type==="whitespace"&&(r+=2),t-2>r&&e[t][1].type==="whitespace"&&(t-=2),e[t][1].type==="atxHeadingSequence"&&(r===t-1||t-4>r&&e[t-2][1].type==="whitespace")&&(t-=r+1===t?2:4),t>r){let i={type:"atxHeadingText",start:e[r][1].start,end:e[t][1].end},o={type:"chunkText",start:e[r][1].start,end:e[t][1].end,contentType:"text"};Le(e,r,t-r+1,[["enter",i,n],["enter",o,n],["exit",o,n],["exit",i,n]])}return e}function Uf(e,n,t){let r=0;return i;function i(c){return e.enter("atxHeading"),o(c)}function o(c){return e.enter("atxHeadingSequence"),s(c)}function s(c){return c===35&&r++<6?(e.consume(c),s):c===null||ae(c)?(e.exit("atxHeadingSequence"),a(c)):t(c)}function a(c){return c===35?(e.enter("atxHeadingSequence"),l(c)):c===null||F(c)?(e.exit("atxHeading"),n(c)):V(c)?Q(e,a,"whitespace")(c):(e.enter("atxHeadingText"),u(c))}function l(c){return c===35?(e.consume(c),l):(e.exit("atxHeadingSequence"),a(c))}function u(c){return c===null||c===35||ae(c)?(e.exit("atxHeadingText"),a(c)):(e.consume(c),u)}}var go={concrete:!0,name:"htmlFlow",resolveTo:Gf,tokenize:Kf},Vf={partial:!0,tokenize:Wf};function Gf(e){let n=e.length;for(;n--&&!(e[n][0]==="enter"&&e[n][1].type==="htmlFlow"););return n>1&&e[n-2][1].type==="linePrefix"&&(e[n][1].start=e[n-2][1].start,e[n+1][1].start=e[n-2][1].start,e.splice(n-2,2)),e}function Kf(e,n,t){let r=this,i,o,s,a,l;return u;function u(p){return c(p)}function c(p){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(p),d}function d(p){return p===33?(e.consume(p),m):p===47?(e.consume(p),o=!0,b):p===63?(e.consume(p),i=3,r.interrupt?n:g):xe(p)?(e.consume(p),s=String.fromCharCode(p),w):t(p)}function m(p){return p===45?(e.consume(p),i=2,f):p===91?(e.consume(p),i=5,a=0,h):xe(p)?(e.consume(p),i=4,r.interrupt?n:g):t(p)}function f(p){return p===45?(e.consume(p),r.interrupt?n:g):t(p)}function h(p){let ge="CDATA[";return p===ge.charCodeAt(a++)?(e.consume(p),a===ge.length?r.interrupt?n:j:h):t(p)}function b(p){return xe(p)?(e.consume(p),s=String.fromCharCode(p),w):t(p)}function w(p){if(p===null||p===47||p===62||ae(p)){let ge=p===47,Ne=s.toLowerCase();return!ge&&!o&&Ln.includes(Ne)?(i=1,r.interrupt?n(p):j(p)):pr.includes(s.toLowerCase())?(i=6,ge?(e.consume(p),y):r.interrupt?n(p):j(p)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?t(p):o?C(p):k(p))}return p===45||Se(p)?(e.consume(p),s+=String.fromCharCode(p),w):t(p)}function y(p){return p===62?(e.consume(p),r.interrupt?n:j):t(p)}function C(p){return V(p)?(e.consume(p),C):v(p)}function k(p){return p===47?(e.consume(p),v):p===58||p===95||xe(p)?(e.consume(p),O):V(p)?(e.consume(p),k):v(p)}function O(p){return p===45||p===46||p===58||p===95||Se(p)?(e.consume(p),O):R(p)}function R(p){return p===61?(e.consume(p),S):V(p)?(e.consume(p),R):k(p)}function S(p){return p===null||p===60||p===61||p===62||p===96?t(p):p===34||p===39?(e.consume(p),l=p,M):V(p)?(e.consume(p),S):W(p)}function M(p){return p===l?(e.consume(p),l=null,pe):p===null||F(p)?t(p):(e.consume(p),M)}function W(p){return p===null||p===34||p===39||p===47||p===60||p===61||p===62||p===96||ae(p)?R(p):(e.consume(p),W)}function pe(p){return p===47||p===62||V(p)?k(p):t(p)}function v(p){return p===62?(e.consume(p),ie):t(p)}function ie(p){return p===null||F(p)?j(p):V(p)?(e.consume(p),ie):t(p)}function j(p){return p===45&&i===2?(e.consume(p),H):p===60&&i===1?(e.consume(p),le):p===62&&i===4?(e.consume(p),$e):p===63&&i===3?(e.consume(p),g):p===93&&i===5?(e.consume(p),ve):F(p)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(Vf,se,B)(p)):p===null||F(p)?(e.exit("htmlFlowData"),B(p)):(e.consume(p),j)}function B(p){return e.check(Tn,Z,se)(p)}function Z(p){return e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),A}function A(p){return p===null||F(p)?B(p):(e.enter("htmlFlowData"),j(p))}function H(p){return p===45?(e.consume(p),g):j(p)}function le(p){return p===47?(e.consume(p),s="",ke):j(p)}function ke(p){if(p===62){let ge=s.toLowerCase();return Ln.includes(ge)?(e.consume(p),$e):j(p)}return xe(p)&&s.length<8?(e.consume(p),s+=String.fromCharCode(p),ke):j(p)}function ve(p){return p===93?(e.consume(p),g):j(p)}function g(p){return p===62?(e.consume(p),$e):p===45&&i===2?(e.consume(p),g):j(p)}function $e(p){return p===null||F(p)?(e.exit("htmlFlowData"),se(p)):(e.consume(p),$e)}function se(p){return e.exit("htmlFlow"),n(p)}}function Wf(e,n,t){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(it,n,t)}}var bo={name:"htmlText",tokenize:Yf};function Yf(e,n,t){let r=this,i,o,s;return a;function a(g){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(g),l}function l(g){return g===33?(e.consume(g),u):g===47?(e.consume(g),R):g===63?(e.consume(g),k):xe(g)?(e.consume(g),W):t(g)}function u(g){return g===45?(e.consume(g),c):g===91?(e.consume(g),o=0,h):xe(g)?(e.consume(g),C):t(g)}function c(g){return g===45?(e.consume(g),f):t(g)}function d(g){return g===null?t(g):g===45?(e.consume(g),m):F(g)?(s=d,le(g)):(e.consume(g),d)}function m(g){return g===45?(e.consume(g),f):d(g)}function f(g){return g===62?H(g):g===45?m(g):d(g)}function h(g){let $e="CDATA[";return g===$e.charCodeAt(o++)?(e.consume(g),o===$e.length?b:h):t(g)}function b(g){return g===null?t(g):g===93?(e.consume(g),w):F(g)?(s=b,le(g)):(e.consume(g),b)}function w(g){return g===93?(e.consume(g),y):b(g)}function y(g){return g===62?H(g):g===93?(e.consume(g),y):b(g)}function C(g){return g===null||g===62?H(g):F(g)?(s=C,le(g)):(e.consume(g),C)}function k(g){return g===null?t(g):g===63?(e.consume(g),O):F(g)?(s=k,le(g)):(e.consume(g),k)}function O(g){return g===62?H(g):k(g)}function R(g){return xe(g)?(e.consume(g),S):t(g)}function S(g){return g===45||Se(g)?(e.consume(g),S):M(g)}function M(g){return F(g)?(s=M,le(g)):V(g)?(e.consume(g),M):H(g)}function W(g){return g===45||Se(g)?(e.consume(g),W):g===47||g===62||ae(g)?pe(g):t(g)}function pe(g){return g===47?(e.consume(g),H):g===58||g===95||xe(g)?(e.consume(g),v):F(g)?(s=pe,le(g)):V(g)?(e.consume(g),pe):H(g)}function v(g){return g===45||g===46||g===58||g===95||Se(g)?(e.consume(g),v):ie(g)}function ie(g){return g===61?(e.consume(g),j):F(g)?(s=ie,le(g)):V(g)?(e.consume(g),ie):pe(g)}function j(g){return g===null||g===60||g===61||g===62||g===96?t(g):g===34||g===39?(e.consume(g),i=g,B):F(g)?(s=j,le(g)):V(g)?(e.consume(g),j):(e.consume(g),Z)}function B(g){return g===i?(e.consume(g),i=void 0,A):g===null?t(g):F(g)?(s=B,le(g)):(e.consume(g),B)}function Z(g){return g===null||g===34||g===39||g===60||g===61||g===96?t(g):g===47||g===62||ae(g)?pe(g):(e.consume(g),Z)}function A(g){return g===47||g===62||ae(g)?pe(g):t(g)}function H(g){return g===62?(e.consume(g),e.exit("htmlTextData"),e.exit("htmlText"),n):t(g)}function le(g){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),ke}function ke(g){return V(g)?Q(e,ve,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(g):ve(g)}function ve(g){return e.enter("htmlTextData"),s(g)}}var Bt={name:"labelEnd",resolveAll:Zf,resolveTo:em,tokenize:tm},Jf={tokenize:nm},Qf={tokenize:rm},Xf={tokenize:im};function Zf(e){let n=-1,t=[];for(;++n<e.length;){let r=e[n][1];if(t.push(e[n]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){let i=r.type==="labelImage"?4:2;r.type="data",n+=i}}return e.length!==t.length&&Le(e,0,e.length,t),e}function em(e,n){let t=e.length,r=0,i,o,s;for(;t--;){let c=e[t][1];if(i){if(c.type==="link"||c.type==="labelLink"&&c._inactive)break;e[t][0]==="enter"&&c.type==="labelLink"&&(c._inactive=!0)}else if(o){if(e[t][0]==="enter"&&(c.type==="labelImage"||c.type==="labelLink")&&!c._balanced&&(i=t,c.type!=="labelLink")){r=2;break}}else c.type==="labelEnd"&&(o=t)}let a={type:e[i][1].type==="labelLink"?"link":"image",start:{...e[i][1].start},end:{...e[e.length-1][1].end}},l={type:"label",start:{...e[i][1].start},end:{...e[o][1].end}},u={type:"labelText",start:{...e[i+r+2][1].end},end:{...e[o-2][1].start}};return s=[["enter",a,n],["enter",l,n]],s=_e(s,e.slice(i+1,i+r+3)),s=_e(s,[["enter",u,n]]),s=_e(s,xt(n.parser.constructs.insideSpan.null,e.slice(i+r+4,o-3),n)),s=_e(s,[["exit",u,n],e[o-2],e[o-1],["exit",l,n]]),s=_e(s,e.slice(o+1)),s=_e(s,[["exit",a,n]]),Le(e,i,e.length,s),e}function tm(e,n,t){let r=this,i=r._labelStarts,o,s;if(i){for(;i.length>0&&i[i.length-1]._balanced;)i.pop();o=i[i.length-1]}return a;function a(m){return o?o._inactive?d(m):(s=r.parser.defined.includes(Pe(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(m),e.exit("labelMarker"),e.exit("labelEnd"),l):t(m)}function l(m){return m===40?e.attempt(Jf,c,s?c:d)(m):m===91?e.attempt(Qf,c,s?u:d)(m):s?c(m):d(m)}function u(m){return e.attempt(Xf,c,d)(m)}function c(m){return i.pop(),n(m)}function d(m){return o._balanced=!0,t(m)}}function nm(e,n,t){return r;function r(d){return e.enter("resource"),e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),i}function i(d){return ae(d)?qt(e,o)(d):o(d)}function o(d){return d===41?c(d):$r(e,s,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function s(d){return ae(d)?qt(e,l)(d):c(d)}function a(d){return t(d)}function l(d){return d===34||d===39||d===40?Tr(e,u,t,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):c(d)}function u(d){return ae(d)?qt(e,c)(d):c(d)}function c(d){return d===41?(e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),e.exit("resource"),n):t(d)}}function rm(e,n,t){let r=this;return i;function i(a){return Mr.call(r,e,o,s,"reference","referenceMarker","referenceString")(a)}function o(a){return r.parser.defined.includes(Pe(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?n(a):t(a)}function s(a){return t(a)}}function im(e,n,t){return r;function r(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),i}function i(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),n):t(o)}}var yo={name:"labelStartImage",resolveAll:Bt.resolveAll,tokenize:om};function om(e,n,t){let r=this,i;return o;function o(l){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(l),e.exit("labelImageMarker"),s}function s(l){return l===91?(e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),i=e.exit("labelImage"),a):t(l)}function a(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?t(l):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(i),n(l))}}var wo={name:"labelStartLink",resolveAll:Bt.resolveAll,tokenize:sm};function sm(e,n,t){let r=this,i;return o;function o(a){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),i=e.exit("labelLink"),s}function s(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?t(a):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(i),n(a))}}var On={name:"lineEnding",tokenize:am};function am(e,n){return t;function t(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Q(e,n,"linePrefix")}}var Ht={name:"thematicBreak",tokenize:lm};function lm(e,n,t){let r=0,i;return o;function o(u){return e.enter("thematicBreak"),s(u)}function s(u){return i=u,a(u)}function a(u){return u===i?(e.enter("thematicBreakSequence"),l(u)):r>=3&&(u===null||F(u))?(e.exit("thematicBreak"),n(u)):t(u)}function l(u){return u===i?(e.consume(u),r++,l):(e.exit("thematicBreakSequence"),V(u)?Q(e,a,"whitespace")(u):a(u))}}var Fe={continuation:{tokenize:fm},exit:hm,name:"list",tokenize:dm},cm={partial:!0,tokenize:pm},um={partial:!0,tokenize:mm};function dm(e,n,t){let r=this,i=r.events[r.events.length-1],o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,s=0;return a;function a(f){let h=r.containerState.type||(f===42||f===43||f===45?"listUnordered":"listOrdered");if(h==="listUnordered"?!r.containerState.marker||f===r.containerState.marker:vn(f)){if(r.containerState.type||(r.containerState.type=h,e.enter(h,{_container:!0})),h==="listUnordered")return e.enter("listItemPrefix"),f===42||f===45?e.check(Ht,t,u)(f):u(f);if(!r.interrupt||f===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(f)}return t(f)}function l(f){return vn(f)&&++s<10?(e.consume(f),l):(!r.interrupt||s<2)&&(r.containerState.marker?f===r.containerState.marker:f===41||f===46)?(e.exit("listItemValue"),u(f)):t(f)}function u(f){return e.enter("listItemMarker"),e.consume(f),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||f,e.check(it,r.interrupt?t:c,e.attempt(cm,m,d))}function c(f){return r.containerState.initialBlankLine=!0,o++,m(f)}function d(f){return V(f)?(e.enter("listItemPrefixWhitespace"),e.consume(f),e.exit("listItemPrefixWhitespace"),m):t(f)}function m(f){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,n(f)}}function fm(e,n,t){let r=this;return r.containerState._closeFlow=void 0,e.check(it,i,o);function i(a){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Q(e,n,"listItemIndent",r.containerState.size+1)(a)}function o(a){return r.containerState.furtherBlankLines||!V(a)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,s(a)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(um,n,s)(a))}function s(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,Q(e,e.attempt(Fe,n,t),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function mm(e,n,t){let r=this;return Q(e,i,"listItemIndent",r.containerState.size+1);function i(o){let s=r.events[r.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===r.containerState.size?n(o):t(o)}}function hm(e){e.exit(this.containerState.type)}function pm(e,n,t){let r=this;return Q(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(o){let s=r.events[r.events.length-1];return!V(o)&&s&&s[1].type==="listItemPrefixWhitespace"?n(o):t(o)}}var ct=class{constructor(){this.index=new Map,this.map=[]}add(n,t,r){tl(this,n,t,r,!1)}addBefore(n,t,r){tl(this,n,t,r,!0)}consume(n){if(this.map.sort(function(o,s){return o[0]-s[0]}),this.map.length===0)return;let t=this.map.length,r=[];for(;t>0;)t-=1,r.push(n.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),n.length=this.map[t][0];r.push(n.slice()),n.length=0;let i=r.pop();for(;i;){for(let o of i)n.push(o);i=r.pop()}this.map.length=0,this.index.clear()}};function tl(e,n,t,r,i){if(t===0&&r.length===0)return;let o=e.index.get(n);if(o){o[1]+=t,i?(r.push(...o[2]),o[2]=r):o[2].push(...r);return}let s=[n,t,r];e.map.push(s),e.index.set(n,s)}var Ir={name:"setextUnderline",resolveTo:gm,tokenize:bm};function gm(e,n){let t=new ct,r=e.length,i,o,s;for(;r--;)if(e[r][0]==="enter"){if(e[r][1].type==="content"){i=r;break}e[r][1].type==="paragraph"&&(o=r)}else e[r][1].type==="content"&&t.add(r,1,[]),!s&&e[r][1].type==="definition"&&(s=r);let a={type:"setextHeading",start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[o][1].type="setextHeadingText",s?(t.add(o,0,[["enter",a,n]]),t.add(s+1,0,[["exit",e[i][1],n]]),e[i][1].end={...e[s][1].end}):e[i][1]=a,t.add(e.length,0,[["exit",a,n]]),t.consume(e),e}function bm(e,n,t){let r=this,i;return o;function o(u){let c=r.events.length,d;for(;c--;)if(r.events[c][1].type!=="lineEnding"&&r.events[c][1].type!=="linePrefix"&&r.events[c][1].type!=="content"){d=r.events[c][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||d)?(e.enter("setextHeadingLine"),i=u,s(u)):t(u)}function s(u){return e.enter("setextHeadingLineSequence"),a(u)}function a(u){return u===i?(e.consume(u),a):(e.exit("setextHeadingLineSequence"),V(u)?Q(e,l,"lineSuffix")(u):l(u))}function l(u){return u===null||F(u)?(e.exit("setextHeadingLine"),n(u)):t(u)}}var ym={tokenize:Cm,partial:!0};function ko(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:vm,continuation:{tokenize:Sm},exit:Em}},text:{91:{name:"gfmFootnoteCall",tokenize:xm},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:wm,resolveTo:km}}}}function wm(e,n,t){let r=this,i=r.events.length,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),s;for(;i--;){let l=r.events[i][1];if(l.type==="labelImage"){s=l;break}if(l.type==="gfmFootnoteCall"||l.type==="labelLink"||l.type==="label"||l.type==="image"||l.type==="link")break}return a;function a(l){if(!s||!s._balanced)return t(l);let u=Pe(r.sliceSerialize({start:s.end,end:r.now()}));return u.codePointAt(0)!==94||!o.includes(u.slice(1))?t(l):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(l),e.exit("gfmFootnoteCallLabelMarker"),n(l))}}function km(e,n){let t=e.length,r;for(;t--;)if(e[t][1].type==="labelImage"&&e[t][0]==="enter"){r=e[t][1];break}e[t+1][1].type="data",e[t+3][1].type="gfmFootnoteCallLabelMarker";let i={type:"gfmFootnoteCall",start:Object.assign({},e[t+3][1].start),end:Object.assign({},e[e.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[t+3][1].end),end:Object.assign({},e[t+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;let s={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},l=[e[t+1],e[t+2],["enter",i,n],e[t+3],e[t+4],["enter",o,n],["exit",o,n],["enter",s,n],["enter",a,n],["exit",a,n],["exit",s,n],e[e.length-2],e[e.length-1],["exit",i,n]];return e.splice(t,e.length-t+1,...l),e}function xm(e,n,t){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o=0,s;return a;function a(d){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),l}function l(d){return d!==94?t(d):(e.enter("gfmFootnoteCallMarker"),e.consume(d),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(d){if(o>999||d===93&&!s||d===null||d===91||ae(d))return t(d);if(d===93){e.exit("chunkString");let m=e.exit("gfmFootnoteCallString");return i.includes(Pe(r.sliceSerialize(m)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),n):t(d)}return ae(d)||(s=!0),o++,e.consume(d),d===92?c:u}function c(d){return d===91||d===92||d===93?(e.consume(d),o++,u):u(d)}}function vm(e,n,t){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o,s=0,a;return l;function l(h){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(h){return h===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",c):t(h)}function c(h){if(s>999||h===93&&!a||h===null||h===91||ae(h))return t(h);if(h===93){e.exit("chunkString");let b=e.exit("gfmFootnoteDefinitionLabelString");return o=Pe(r.sliceSerialize(b)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),m}return ae(h)||(a=!0),s++,e.consume(h),h===92?d:c}function d(h){return h===91||h===92||h===93?(e.consume(h),s++,c):c(h)}function m(h){return h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),i.includes(o)||i.push(o),Q(e,f,"gfmFootnoteDefinitionWhitespace")):t(h)}function f(h){return n(h)}}function Sm(e,n,t){return e.check(it,n,e.attempt(ym,n,t))}function Em(e){e.exit("gfmFootnoteDefinition")}function Cm(e,n,t){let r=this;return Q(e,i,"gfmFootnoteDefinitionIndent",5);function i(o){let s=r.events[r.events.length-1];return s&&s[1].type==="gfmFootnoteDefinitionIndent"&&s[2].sliceSerialize(s[1],!0).length===4?n(o):t(o)}}function xo(e){let t=(e||{}).singleTilde,r={name:"strikethrough",tokenize:o,resolveAll:i};return t==null&&(t=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(s,a){let l=-1;for(;++l<s.length;)if(s[l][0]==="enter"&&s[l][1].type==="strikethroughSequenceTemporary"&&s[l][1]._close){let u=l;for(;u--;)if(s[u][0]==="exit"&&s[u][1].type==="strikethroughSequenceTemporary"&&s[u][1]._open&&s[l][1].end.offset-s[l][1].start.offset===s[u][1].end.offset-s[u][1].start.offset){s[l][1].type="strikethroughSequence",s[u][1].type="strikethroughSequence";let c={type:"strikethrough",start:Object.assign({},s[u][1].start),end:Object.assign({},s[l][1].end)},d={type:"strikethroughText",start:Object.assign({},s[u][1].end),end:Object.assign({},s[l][1].start)},m=[["enter",c,a],["enter",s[u][1],a],["exit",s[u][1],a],["enter",d,a]],f=a.parser.constructs.insideSpan.null;f&&Le(m,m.length,0,xt(f,s.slice(u+1,l),a)),Le(m,m.length,0,[["exit",d,a],["enter",s[l][1],a],["exit",s[l][1],a],["exit",c,a]]),Le(s,u-1,l-u+3,m),l=u+m.length-2;break}}for(l=-1;++l<s.length;)s[l][1].type==="strikethroughSequenceTemporary"&&(s[l][1].type="data");return s}function o(s,a,l){let u=this.previous,c=this.events,d=0;return m;function m(h){return u===126&&c[c.length-1][1].type!=="characterEscape"?l(h):(s.enter("strikethroughSequenceTemporary"),f(h))}function f(h){let b=Ve(u);if(h===126)return d>1?l(h):(s.consume(h),d++,f);if(d<2&&!t)return l(h);let w=s.exit("strikethroughSequenceTemporary"),y=Ve(h);return w._open=!y||y===2&&!!b,w._close=!b||b===2&&!!y,a(h)}}}var Nr=class{constructor(){this.map=[],this.index=new Map}add(n,t,r){Lm(this,n,t,r)}consume(n){if(this.map.sort(function(o,s){return o[0]-s[0]}),this.map.length===0)return;let t=this.map.length,r=[];for(;t>0;)t-=1,r.push(n.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),n.length=this.map[t][0];r.push(n.slice()),n.length=0;let i=r.pop();for(;i;){for(let o of i)n.push(o);i=r.pop()}this.map.length=0,this.index.clear()}};function Lm(e,n,t,r){if(t===0&&r.length===0)return;let i=e.index.get(n);if(i){i[1]+=t,i[2].push(...r);return}let o=[n,t,r];e.map.push(o),e.index.set(n,o)}function nl(e,n){let t=!1,r=[];for(;n<e.length;){let i=e[n];if(t){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[n+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[n-1][1].type==="tableDelimiterMarker"){let o=r.length-1;r[o]=r[o]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(t=!0);n+=1}return r}function vo(){return{flow:{null:{name:"table",tokenize:Am,resolveAll:$m}}}}function Am(e,n,t){let r=this,i=0,o=0,s;return a;function a(v){let ie=r.events.length-1;for(;ie>-1;){let{type:Z}=r.events[ie][1];if(Z==="lineEnding"||Z==="linePrefix")ie--;else break}let j=ie>-1?r.events[ie][1].type:null,B=j==="tableHead"||j==="tableRow"?S:l;return B===S&&r.parser.lazy[r.now().line]?t(v):B(v)}function l(v){return e.enter("tableHead"),e.enter("tableRow"),u(v)}function u(v){return v===124||(s=!0,o+=1),c(v)}function c(v){return v===null?t(v):F(v)?o>1?(o=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),f):t(v):V(v)?Q(e,c,"whitespace")(v):(o+=1,s&&(s=!1,i+=1),v===124?(e.enter("tableCellDivider"),e.consume(v),e.exit("tableCellDivider"),s=!0,c):(e.enter("data"),d(v)))}function d(v){return v===null||v===124||ae(v)?(e.exit("data"),c(v)):(e.consume(v),v===92?m:d)}function m(v){return v===92||v===124?(e.consume(v),d):d(v)}function f(v){return r.interrupt=!1,r.parser.lazy[r.now().line]?t(v):(e.enter("tableDelimiterRow"),s=!1,V(v)?Q(e,h,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(v):h(v))}function h(v){return v===45||v===58?w(v):v===124?(s=!0,e.enter("tableCellDivider"),e.consume(v),e.exit("tableCellDivider"),b):R(v)}function b(v){return V(v)?Q(e,w,"whitespace")(v):w(v)}function w(v){return v===58?(o+=1,s=!0,e.enter("tableDelimiterMarker"),e.consume(v),e.exit("tableDelimiterMarker"),y):v===45?(o+=1,y(v)):v===null||F(v)?O(v):R(v)}function y(v){return v===45?(e.enter("tableDelimiterFiller"),C(v)):R(v)}function C(v){return v===45?(e.consume(v),C):v===58?(s=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(v),e.exit("tableDelimiterMarker"),k):(e.exit("tableDelimiterFiller"),k(v))}function k(v){return V(v)?Q(e,O,"whitespace")(v):O(v)}function O(v){return v===124?h(v):v===null||F(v)?!s||i!==o?R(v):(e.exit("tableDelimiterRow"),e.exit("tableHead"),n(v)):R(v)}function R(v){return t(v)}function S(v){return e.enter("tableRow"),M(v)}function M(v){return v===124?(e.enter("tableCellDivider"),e.consume(v),e.exit("tableCellDivider"),M):v===null||F(v)?(e.exit("tableRow"),n(v)):V(v)?Q(e,M,"whitespace")(v):(e.enter("data"),W(v))}function W(v){return v===null||v===124||ae(v)?(e.exit("data"),M(v)):(e.consume(v),v===92?pe:W)}function pe(v){return v===92||v===124?(e.consume(v),W):W(v)}}function $m(e,n){let t=-1,r=!0,i=0,o=[0,0,0,0],s=[0,0,0,0],a=!1,l=0,u,c,d,m=new Nr;for(;++t<e.length;){let f=e[t],h=f[1];f[0]==="enter"?h.type==="tableHead"?(a=!1,l!==0&&(rl(m,n,l,u,c),c=void 0,l=0),u={type:"table",start:Object.assign({},h.start),end:Object.assign({},h.end)},m.add(t,0,[["enter",u,n]])):h.type==="tableRow"||h.type==="tableDelimiterRow"?(r=!0,d=void 0,o=[0,0,0,0],s=[0,t+1,0,0],a&&(a=!1,c={type:"tableBody",start:Object.assign({},h.start),end:Object.assign({},h.end)},m.add(t,0,[["enter",c,n]])),i=h.type==="tableDelimiterRow"?2:c?3:1):i&&(h.type==="data"||h.type==="tableDelimiterMarker"||h.type==="tableDelimiterFiller")?(r=!1,s[2]===0&&(o[1]!==0&&(s[0]=s[1],d=Or(m,n,o,i,void 0,d),o=[0,0,0,0]),s[2]=t)):h.type==="tableCellDivider"&&(r?r=!1:(o[1]!==0&&(s[0]=s[1],d=Or(m,n,o,i,void 0,d)),o=s,s=[o[1],t,0,0])):h.type==="tableHead"?(a=!0,l=t):h.type==="tableRow"||h.type==="tableDelimiterRow"?(l=t,o[1]!==0?(s[0]=s[1],d=Or(m,n,o,i,t,d)):s[1]!==0&&(d=Or(m,n,s,i,t,d)),i=0):i&&(h.type==="data"||h.type==="tableDelimiterMarker"||h.type==="tableDelimiterFiller")&&(s[3]=t)}for(l!==0&&rl(m,n,l,u,c),m.consume(n.events),t=-1;++t<n.events.length;){let f=n.events[t];f[0]==="enter"&&f[1].type==="table"&&(f[1]._align=nl(n.events,t))}return e}function Or(e,n,t,r,i,o){let s=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",a="tableContent";t[0]!==0&&(o.end=Object.assign({},un(n.events,t[0])),e.add(t[0],0,[["exit",o,n]]));let l=un(n.events,t[1]);if(o={type:s,start:Object.assign({},l),end:Object.assign({},l)},e.add(t[1],0,[["enter",o,n]]),t[2]!==0){let u=un(n.events,t[2]),c=un(n.events,t[3]),d={type:a,start:Object.assign({},u),end:Object.assign({},c)};if(e.add(t[2],0,[["enter",d,n]]),r!==2){let m=n.events[t[2]],f=n.events[t[3]];if(m[1].end=Object.assign({},f[1].end),m[1].type="chunkText",m[1].contentType="text",t[3]>t[2]+1){let h=t[2]+1,b=t[3]-t[2]-1;e.add(h,b,[])}}e.add(t[3]+1,0,[["exit",d,n]])}return i!==void 0&&(o.end=Object.assign({},un(n.events,i)),e.add(i,0,[["exit",o,n]]),o=void 0),o}function rl(e,n,t,r,i){let o=[],s=un(n.events,t);i&&(i.end=Object.assign({},s),o.push(["exit",i,n])),r.end=Object.assign({},s),o.push(["exit",r,n]),e.add(t+1,0,o)}function un(e,n){let t=e[n],r=t[0]==="enter"?"start":"end";return t[1][r]}var Mm={name:"tasklistCheck",tokenize:Tm};function So(){return{text:{91:Mm}}}function Tm(e,n,t){let r=this;return i;function i(l){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?t(l):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),o)}function o(l){return ae(l)?(e.enter("taskListCheckValueUnchecked"),e.consume(l),e.exit("taskListCheckValueUnchecked"),s):l===88||l===120?(e.enter("taskListCheckValueChecked"),e.consume(l),e.exit("taskListCheckValueChecked"),s):t(l)}function s(l){return l===93?(e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),a):t(l)}function a(l){return F(l)?n(l):V(l)?e.check({tokenize:Im},n,t)(l):t(l)}}function Im(e,n,t){return Q(e,r,"whitespace");function r(i){return i===null?t(i):n(i)}}function il(e){return xr([so(),ko(),xo(e),vo(),So()])}var Nm={};function Rr(e){let n=this,t=e||Nm,r=n.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),s=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(il(t)),o.push(ro()),s.push(io(t))}var ol={tokenize:Om};function Om(e){let n=e.attempt(this.parser.constructs.contentInitial,r,i),t;return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),Q(e,n,"linePrefix")}function i(a){return e.enter("paragraph"),o(a)}function o(a){let l=e.enter("chunkText",{contentType:"text",previous:t});return t&&(t.next=l),t=l,s(a)}function s(a){if(a===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(a);return}return F(a)?(e.consume(a),e.exit("chunkText"),o):(e.consume(a),s)}}var al={tokenize:Rm},sl={tokenize:Pm};function Rm(e){let n=this,t=[],r=0,i,o,s;return a;function a(k){if(r<t.length){let O=t[r];return n.containerState=O[1],e.attempt(O[0].continuation,l,u)(k)}return u(k)}function l(k){if(r++,n.containerState._closeFlow){n.containerState._closeFlow=void 0,i&&C();let O=n.events.length,R=O,S;for(;R--;)if(n.events[R][0]==="exit"&&n.events[R][1].type==="chunkFlow"){S=n.events[R][1].end;break}y(r);let M=O;for(;M<n.events.length;)n.events[M][1].end={...S},M++;let W=new ct;return W.add(R+1,0,n.events.slice(O)),W.add(O,M-O,[]),W.consume(n.events),u(k)}return a(k)}function u(k){if(r===t.length){if(!i)return m(k);if(i.currentConstruct&&i.currentConstruct.concrete)return h(k);n.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return n.containerState={},e.check(sl,c,d)(k)}function c(k){return i&&C(),y(r),m(k)}function d(k){return n.parser.lazy[n.now().line]=r!==t.length,s=n.now().offset,h(k)}function m(k){return n.containerState={},e.attempt(sl,f,h)(k)}function f(k){return r++,t.push([n.currentConstruct,n.containerState]),m(k)}function h(k){if(k===null){i&&C(),y(0),e.consume(k);return}return i=i||n.parser.flow(n.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:o}),b(k)}function b(k){if(k===null){w(e.exit("chunkFlow"),!0),y(0),e.consume(k);return}return F(k)?(e.consume(k),w(e.exit("chunkFlow")),r=0,n.interrupt=void 0,a):(e.consume(k),b)}function w(k,O){let R=n.sliceStream(k);if(O&&R.push(null),k.previous=o,o&&(o.next=k),o=k,i.defineSkip(k.start),i.write(R),n.parser.lazy[k.start.line]){let S=i.events.length;for(;S--;)if(i.events[S][1].start.offset<s&&(!i.events[S][1].end||i.events[S][1].end.offset>s))return;let M=n.events.length,W=M,pe,v;for(;W--;)if(n.events[W][0]==="exit"&&n.events[W][1].type==="chunkFlow"){if(pe){v=n.events[W][1].end;break}pe=!0}for(y(r),S=M;S<n.events.length;)n.events[S][1].end={...v},S++;let ie=new ct;ie.add(W+1,0,n.events.slice(M)),ie.add(M,S-M,[]),ie.consume(n.events)}}function y(k){let O=t.length;for(;O-- >k;){let R=t[O];n.containerState=R[1],R[0].exit.call(n,e)}t.length=k}function C(){i.write([null]),o=void 0,i=void 0,n.containerState._closeFlow=void 0}}function Pm(e,n,t){return Q(e,e.attempt(this.parser.constructs.document,n,t),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}var ll={tokenize:Fm};function Fm(e){let n=this,t=e.attempt(it,r,e.attempt(this.parser.constructs.flowInitial,i,Q(e,e.attempt(this.parser.constructs.flow,i,e.attempt(fo,i)),"linePrefix")));return t;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),n.currentConstruct=void 0,t}function i(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n.currentConstruct=void 0,t}}var cl={resolveAll:ml()},ul=fl("string"),dl=fl("text");function fl(e){return{resolveAll:ml(e==="text"?_m:void 0),tokenize:n};function n(t){let r=this,i=this.parser.constructs[e],o=t.attempt(i,s,a);return s;function s(c){return u(c)?o(c):a(c)}function a(c){if(c===null){t.consume(c);return}return t.enter("data"),t.consume(c),l}function l(c){return u(c)?(t.exit("data"),o(c)):(t.consume(c),l)}function u(c){if(c===null)return!0;let d=i[c],m=-1;if(d)for(;++m<d.length;){let f=d[m];if(!f.previous||f.previous.call(r,r.previous))return!0}return!1}}}function ml(e){return n;function n(t,r){let i=-1,o;for(;++i<=t.length;)o===void 0?t[i]&&t[i][1].type==="data"&&(o=i,i++):(!t[i]||t[i][1].type!=="data")&&(i!==o+2&&(t[o][1].end=t[i-1][1].end,t.splice(o+2,i-o-2),i=o+2),o=void 0);return e?e(t,r):t}}function _m(e,n){let t=new ct,r=0;for(;++r<=e.length;)if((r===e.length||e[r][1].type==="lineEnding")&&e[r-1][1].type==="data"){let i=e[r-1][1],o=n.sliceStream(i),s=o.length,a=-1,l=0,u;for(;s--;){let c=o[s];if(typeof c=="string"){for(a=c.length;c.charCodeAt(a-1)===32;)l++,a--;if(a)break;a=-1}else if(c===-2)u=!0,l++;else if(c!==-1){s++;break}}if(n._contentTypeTextTrailing&&r===e.length&&(l=0),l){let c={type:r===e.length||u||l<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?a:i.start._bufferIndex+a,_index:i.start._index+s,line:i.end.line,column:i.end.column-l,offset:i.end.offset-l},end:{...i.end}};i.end={...c.start},i.start.offset===i.end.offset?Object.assign(i,c):t.add(r,0,[["enter",c,n],["exit",c,n]])}r++}return t.consume(e),e}var Eo={};Xl(Eo,{attentionMarkers:()=>Vm,contentInitial:()=>jm,disable:()=>Gm,document:()=>Dm,flow:()=>Bm,flowInitial:()=>qm,insideSpan:()=>Um,string:()=>Hm,text:()=>zm});var Dm={42:Fe,43:Fe,45:Fe,48:Fe,49:Fe,50:Fe,51:Fe,52:Fe,53:Fe,54:Fe,55:Fe,56:Fe,57:Fe,62:vr},jm={91:mo},qm={[-2]:In,[-1]:In,32:In},Bm={35:po,42:Ht,45:[Ir,Ht],60:go,61:Ir,95:Ht,96:Cr,126:Cr},Hm={38:Er,92:Sr},zm={[-5]:On,[-4]:On,[-3]:On,33:yo,38:Er,42:Mn,60:[lo,bo],91:wo,92:[ho,Sr],93:Bt,95:Mn,96:uo},Um={null:[Mn,cl]},Vm={null:[42,95]},Gm={null:[]};function hl(e,n,t){let r={_bufferIndex:-1,_index:0,line:t&&t.line||1,column:t&&t.column||1,offset:t&&t.offset||0},i={},o=[],s=[],a=[],l=!0,u={attempt:pe(M),check:pe(W),consume:O,enter:R,exit:S,interrupt:pe(W,{interrupt:!0})},c={code:null,containerState:{},defineSkip:y,events:[],now:w,parser:e,previous:null,sliceSerialize:h,sliceStream:b,write:f},d=n.tokenize.call(c,u),m;return n.resolveAll&&o.push(n),c;function f(B){return s=_e(s,B),C(),s[s.length-1]!==null?[]:(v(n,0),c.events=xt(o,c.events,c),c.events)}function h(B,Z){return Wm(b(B),Z)}function b(B){return Km(s,B)}function w(){let{_bufferIndex:B,_index:Z,line:A,column:H,offset:le}=r;return{_bufferIndex:B,_index:Z,line:A,column:H,offset:le}}function y(B){i[B.line]=B.column,j()}function C(){for(;r._index<s.length;){let B=s[r._index];if(typeof B=="string"){let Z=r._index;for(r._bufferIndex<0&&(r._bufferIndex=0);r._index===Z&&r._bufferIndex<B.length;)k(B.charCodeAt(r._bufferIndex))}else k(B)}}function k(B){l=void 0,m=B,d=d(B)}function O(B){F(B)?(r.line++,r.column=1,r.offset+=B===-3?2:1,j()):B!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===s[r._index].length&&(r._bufferIndex=-1,r._index++)),c.previous=B,l=!0}function R(B,Z){let A=Z||{};return A.type=B,A.start=w(),c.events.push(["enter",A,c]),a.push(A),A}function S(B){let Z=a.pop();return Z.end=w(),c.events.push(["exit",Z,c]),Z}function M(B,Z){v(B,Z.from)}function W(B,Z){Z.restore()}function pe(B,Z){return A;function A(H,le,ke){let ve,g,$e,se;return Array.isArray(H)?ge(H):"tokenize"in H?ge([H]):p(H);function p(_){return $;function $(U){let D=U!==null&&_[U],N=U!==null&&_.null,q=[...Array.isArray(D)?D:D?[D]:[],...Array.isArray(N)?N:N?[N]:[]];return ge(q)(U)}}function ge(_){return ve=_,g=0,_.length===0?ke:Ne(_[g])}function Ne(_){return $;function $(U){return se=ie(),$e=_,_.partial||(c.currentConstruct=_),_.name&&c.parser.constructs.disable.null.includes(_.name)?x(U):_.tokenize.call(Z?Object.assign(Object.create(c),Z):c,u,Ge,x)(U)}}function Ge(_){return l=!0,B($e,se),le}function x(_){return l=!0,se.restore(),++g<ve.length?Ne(ve[g]):ke}}}function v(B,Z){B.resolveAll&&!o.includes(B)&&o.push(B),B.resolve&&Le(c.events,Z,c.events.length-Z,B.resolve(c.events.slice(Z),c)),B.resolveTo&&(c.events=B.resolveTo(c.events,c))}function ie(){let B=w(),Z=c.previous,A=c.currentConstruct,H=c.events.length,le=Array.from(a);return{from:H,restore:ke};function ke(){r=B,c.previous=Z,c.currentConstruct=A,c.events.length=H,a=le,j()}}function j(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function Km(e,n){let t=n.start._index,r=n.start._bufferIndex,i=n.end._index,o=n.end._bufferIndex,s;if(t===i)s=[e[t].slice(r,o)];else{if(s=e.slice(t,i),r>-1){let a=s[0];typeof a=="string"?s[0]=a.slice(r):s.shift()}o>0&&s.push(e[i].slice(0,o))}return s}function Wm(e,n){let t=-1,r=[],i;for(;++t<e.length;){let o=e[t],s;if(typeof o=="string")s=o;else switch(o){case-5:{s="\r";break}case-4:{s=`
|
|
100
100
|
`;break}case-3:{s=`\r
|
|
101
|
-
`;break}case-2:{s=n?" ":" ";break}case-1:{if(!n&&i)continue;s=" ";break}default:s=String.fromCharCode(o)}i=o===-2,r.push(s)}return r.join("")}function Co(e){let r={constructs:xr([Eo,...(e||{}).extensions||[]]),content:i(ol),defined:[],document:i(al),flow:i(ll),lazy:{},string:i(ul),text:i(dl)};return r;function i(o){return s;function s(a){return hl(r,o,a)}}}function Lo(e){for(;!Ar(e););return e}var pl=/[\0\t\n\r]/g;function Ao(){let e=1,n="",t=!0,r;return i;function i(o,s,a){o=n+(typeof o=="string"?o.toString():new TextDecoder(s||void 0).decode(o));let l=[],u=0;for(n="",t&&(o.charCodeAt(0)===65279&&u++,t=void 0);u<o.length;){pl.lastIndex=u;let c=pl.exec(o),d=c&&c.index!==void 0?c.index:o.length,m=o.charCodeAt(d);if(!c){n=o.slice(u);break}if(m===10&&u===d&&r)l.push(-3),r=void 0;else switch(r&&(l.push(-5),r=void 0),u<d&&(l.push(o.slice(u,d)),e+=d-u),m){case 0:{l.push(65533),e++;break}case 9:{let f=Math.ceil(e/4)*4;for(l.push(-2);e++<f;)l.push(-1);break}case 10:{l.push(-4),e=1;break}default:r=!0,e=1}u=d+1}return a&&(r&&l.push(-5),n&&l.push(n),l.push(null)),l}}function vt(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?gl(e.position):"start"in e||"end"in e?gl(e):"line"in e||"column"in e?$o(e):""}function $o(e){return bl(e&&e.line)+":"+bl(e&&e.column)}function gl(e){return $o(e&&e.start)+"-"+$o(e&&e.end)}function bl(e){return e&&typeof e=="number"?e:1}var wl={}.hasOwnProperty;function Mo(e,n,t){return n&&typeof n=="object"&&(t=n,n=void 0),Ym(t)(Lo(Co(t).document().write(Ao()(e,n,!0))))}function Ym(e){let n={afterExit:[],beforeEnter:[],transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(te),autolinkProtocol:v,autolinkEmail:v,atxHeading:s(K),blockQuote:s(D),characterEscape:v,characterReference:v,codeFenced:s(N),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:s(N,a),codeText:s(q,a),codeTextData:v,data:v,codeFlowValue:v,definition:s(P),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:s(z),hardBreakEscape:s(W),hardBreakTrailing:s(W),htmlFlow:s(ie,a),htmlFlowData:v,htmlText:s(ie,a),htmlTextData:v,image:s(ce),label:a,link:s(te),listItem:s(J),listItemValue:f,listOrdered:s(ue,m),listUnordered:s(ue),paragraph:s(Ee),reference:ge,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:s(K),strong:s(Lt),thematicBreak:s(Hr)},exit:{atxHeading:u(),atxHeadingSequence:S,autolink:u(),autolinkEmail:U,autolinkProtocol:$,blockQuote:u(),characterEscapeValue:re,characterReferenceMarkerHexadecimal:Ve,characterReferenceMarkerNumeric:Ve,characterReferenceValue:x,characterReference:_,codeFenced:u(y),codeFencedFence:w,codeFencedFenceInfo:h,codeFencedFenceMeta:b,codeFlowValue:re,codeIndented:u(C),codeText:u(H),codeTextData:re,data:re,definition:u(),definitionDestinationString:R,definitionLabelString:k,definitionTitleString:O,emphasis:u(),hardBreakEscape:u(B),hardBreakTrailing:u(B),htmlFlow:u(Z),htmlFlowData:re,htmlText:u(A),htmlTextData:re,image:u(ke),label:g,labelText:ve,lineEnding:j,link:u(le),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:Ne,resourceDestinationString:$e,resourceTitleString:se,resource:p,setextHeading:u(pe),setextHeadingLineSequence:Y,setextHeadingText:M,strong:u(),thematicBreak:u()}};kl(n,(e||{}).mdastExtensions||[]);let t={};return r;function r(E){let I={type:"root",children:[],position:void 0},X={stack:[I],tokenStack:[],config:n,enter:l,exit:c,buffer:a,resume:d,data:t},ee=[],Me=[],fe=-1;for(;++fe<E.length;)if(Me.push(E[fe]),E[fe][1].type==="listOrdered"||E[fe][1].type==="listUnordered")if(E[fe][0]==="enter")ee.push(Me.length-1);else{let Te=ee.pop();o(Me,Te)}for(E=Me,fe=-1;++fe<E.length;){let Te=n[E[fe][0]];E[fe][0]==="enter"&&n.beforeEnter.length>0&&i(n.beforeEnter,{...X,sliceSerialize:E[fe][2].sliceSerialize},E[fe][1]),wl.call(Te,E[fe][1].type)&&Te[E[fe][1].type].call({...X,sliceSerialize:E[fe][2].sliceSerialize},E[fe][1]),E[fe][0]==="exit"&&n.afterExit.length>0&&i(n.afterExit,{...X,sliceSerialize:E[fe][2].sliceSerialize},E[fe][1])}if(X.tokenStack.length>0){let Te=X.tokenStack[X.tokenStack.length-1];(Te[1]||yl).call(X,void 0,Te[0])}for(I.position={start:St(E.length>0?E[0][1].start:{line:1,column:1,offset:0}),end:St(E.length>0?E[E.length-2][1].end:{line:1,column:1,offset:0})},fe=-1;++fe<n.transforms.length;)I=n.transforms[fe](I)||I;return I}function i(E,I,X){let ee=-1;for(;++ee<E.length;)E[ee].call(I,X)}function o(E,I){let X=E.length-1,ee=I-1,Me=-1,fe=!1,Te,Oe,De,Ye,dt=[];for(;++ee<=X;){let G=E[ee];switch(G[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{G[0]==="enter"?Me++:Me--,Ye=void 0;break}case"lineEndingBlank":{G[0]==="enter"&&(Te&&!Ye&&!Me&&!De&&(De=ee),Ye=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Ye=void 0}if(!Me&&G[0]==="enter"&&G[1].type==="listItemPrefix"||Me===-1&&G[0]==="exit"&&(G[1].type==="listUnordered"||G[1].type==="listOrdered")){if(Te){let oe=ee;for(Oe=void 0;oe--;){let ye=E[oe];if(ye[1].type==="lineEnding"||ye[1].type==="lineEndingBlank"){if(ye[0]==="exit")continue;Oe&&(E[Oe][1].type="lineEndingBlank",fe=!0),ye[1].type="lineEnding",Oe=oe}else if(!(ye[1].type==="linePrefix"||ye[1].type==="blockQuotePrefix"||ye[1].type==="blockQuotePrefixWhitespace"||ye[1].type==="blockQuoteMarker"||ye[1].type==="listItemIndent"))break}De&&(!Oe||De<Oe)&&(Te._spread=!0),Te.end=Object.assign({},Oe?E[Oe][1].start:G[1].end),dt.push({at:Oe||ee,event:["exit",Te,G[2]]})}if(G[1].type==="listItemPrefix"){let oe={type:"listItem",_spread:!1,start:Object.assign({},G[1].start),end:void 0};Te=oe,dt.push({at:ee,event:["enter",oe,G[2]]}),De=void 0,Ye=!0}}}let jn=E.splice(I),T=0;for(ee=-1;++ee<jn.length;){for(;T<dt.length&&dt[T].at===I+ee;)E.push(dt[T++].event);E.push(jn[ee])}E[I][1]._spread=fe}function s(E,I){return X;function X(ee){l.call(this,E(ee),ee),I&&I.call(this,ee)}}function a(){this.stack.push({type:"fragment",children:[]})}function l(E,I,X){this.stack[this.stack.length-1].children.push(E),this.stack.push(E),this.tokenStack.push([I,X||void 0]),E.position={start:St(I.start),end:void 0}}function u(E){return I;function I(X){E&&E.call(this,X),c.call(this,X)}}function c(E,I){let X=this.stack.pop(),ee=this.tokenStack.pop();if(!ee)throw new Error("Cannot close `"+E.type+"` ("+vt({start:E.start,end:E.end})+"): it\u2019s not open");ee[0].type!==E.type&&(I?I.call(this,E,ee[0]):(ee[1]||yl).call(this,E,ee[0])),X.position.end=St(E.end)}function d(){return Dt(this.stack.pop())}function m(){this.data.expectingFirstListItemValue=!0}function f(E){if(this.data.expectingFirstListItemValue){let I=this.stack[this.stack.length-2];I.start=Number.parseInt(this.sliceSerialize(E),10),this.data.expectingFirstListItemValue=void 0}}function h(){let E=this.resume(),I=this.stack[this.stack.length-1];I.lang=E}function b(){let E=this.resume(),I=this.stack[this.stack.length-1];I.meta=E}function w(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function y(){let E=this.resume(),I=this.stack[this.stack.length-1];I.value=E.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function C(){let E=this.resume(),I=this.stack[this.stack.length-1];I.value=E.replace(/(\r?\n|\r)$/g,"")}function k(E){let I=this.resume(),X=this.stack[this.stack.length-1];X.label=I,X.identifier=Pe(this.sliceSerialize(E)).toLowerCase()}function O(){let E=this.resume(),I=this.stack[this.stack.length-1];I.title=E}function R(){let E=this.resume(),I=this.stack[this.stack.length-1];I.url=E}function S(E){let I=this.stack[this.stack.length-1];if(!I.depth){let X=this.sliceSerialize(E).length;I.depth=X}}function M(){this.data.setextHeadingSlurpLineEnding=!0}function Y(E){let I=this.stack[this.stack.length-1];I.depth=this.sliceSerialize(E).codePointAt(0)===61?1:2}function pe(){this.data.setextHeadingSlurpLineEnding=void 0}function v(E){let X=this.stack[this.stack.length-1].children,ee=X[X.length-1];(!ee||ee.type!=="text")&&(ee=Dn(),ee.position={start:St(E.start),end:void 0},X.push(ee)),this.stack.push(ee)}function re(E){let I=this.stack.pop();I.value+=this.sliceSerialize(E),I.position.end=St(E.end)}function j(E){let I=this.stack[this.stack.length-1];if(this.data.atHardBreak){let X=I.children[I.children.length-1];X.position.end=St(E.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&n.canContainEols.includes(I.type)&&(v.call(this,E),re.call(this,E))}function B(){this.data.atHardBreak=!0}function Z(){let E=this.resume(),I=this.stack[this.stack.length-1];I.value=E}function A(){let E=this.resume(),I=this.stack[this.stack.length-1];I.value=E}function H(){let E=this.resume(),I=this.stack[this.stack.length-1];I.value=E}function le(){let E=this.stack[this.stack.length-1];if(this.data.inReference){let I=this.data.referenceType||"shortcut";E.type+="Reference",E.referenceType=I,delete E.url,delete E.title}else delete E.identifier,delete E.label;this.data.referenceType=void 0}function ke(){let E=this.stack[this.stack.length-1];if(this.data.inReference){let I=this.data.referenceType||"shortcut";E.type+="Reference",E.referenceType=I,delete E.url,delete E.title}else delete E.identifier,delete E.label;this.data.referenceType=void 0}function ve(E){let I=this.sliceSerialize(E),X=this.stack[this.stack.length-2];X.label=Ha(I),X.identifier=Pe(I).toLowerCase()}function g(){let E=this.stack[this.stack.length-1],I=this.resume(),X=this.stack[this.stack.length-1];if(this.data.inReference=!0,X.type==="link"){let ee=E.children;X.children=ee}else X.alt=I}function $e(){let E=this.resume(),I=this.stack[this.stack.length-1];I.url=E}function se(){let E=this.resume(),I=this.stack[this.stack.length-1];I.title=E}function p(){this.data.inReference=void 0}function ge(){this.data.referenceType="collapsed"}function Ne(E){let I=this.resume(),X=this.stack[this.stack.length-1];X.label=I,X.identifier=Pe(this.sliceSerialize(E)).toLowerCase(),this.data.referenceType="full"}function Ve(E){this.data.characterReferenceType=E.type}function x(E){let I=this.sliceSerialize(E),X=this.data.characterReferenceType,ee;X?(ee=kr(I,X==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):ee=cn(I);let Me=this.stack[this.stack.length-1];Me.value+=ee}function _(E){let I=this.stack.pop();I.position.end=St(E.end)}function $(E){re.call(this,E);let I=this.stack[this.stack.length-1];I.url=this.sliceSerialize(E)}function U(E){re.call(this,E);let I=this.stack[this.stack.length-1];I.url="mailto:"+this.sliceSerialize(E)}function D(){return{type:"blockquote",children:[],position:void 0}}function N(){return{type:"code",lang:null,meta:null,value:"",position:void 0}}function q(){return{type:"inlineCode",value:"",position:void 0}}function P(){return{type:"definition",identifier:"",label:null,title:null,url:"",position:void 0}}function z(){return{type:"emphasis",children:[],position:void 0}}function K(){return{type:"heading",depth:0,children:[],position:void 0}}function W(){return{type:"break",position:void 0}}function ie(){return{type:"html",value:"",position:void 0}}function ce(){return{type:"image",title:null,url:"",alt:null,position:void 0}}function te(){return{type:"link",title:null,url:"",children:[],position:void 0}}function ue(E){return{type:"list",ordered:E.type==="listOrdered",start:null,spread:E._spread,children:[],position:void 0}}function J(E){return{type:"listItem",spread:E._spread,checked:null,children:[],position:void 0}}function Ee(){return{type:"paragraph",children:[],position:void 0}}function Lt(){return{type:"strong",children:[],position:void 0}}function Dn(){return{type:"text",value:"",position:void 0}}function Hr(){return{type:"thematicBreak",position:void 0}}}function St(e){return{line:e.line,column:e.column,offset:e.offset}}function kl(e,n){let t=-1;for(;++t<n.length;){let r=n[t];Array.isArray(r)?kl(e,r):Jm(e,r)}}function Jm(e,n){let t;for(t in n)if(wl.call(n,t))switch(t){case"canContainEols":{let r=n[t];r&&e[t].push(...r);break}case"transforms":{let r=n[t];r&&e[t].push(...r);break}case"afterExit":case"beforeEnter":{let r=n[t];r&&e[t].push(r);break}case"enter":case"exit":{let r=n[t];r&&Object.assign(e[t],r);break}}}function yl(e,n){throw e?new Error("Cannot close `"+e.type+"` ("+vt({start:e.start,end:e.end})+"): a different token (`"+n.type+"`, "+vt({start:n.start,end:n.end})+") is open"):new Error("Cannot close document, a token (`"+n.type+"`, "+vt({start:n.start,end:n.end})+") is still open")}function Pr(e){let n=this;n.parser=t;function t(r){return Mo(r,{...n.data("settings"),...e,extensions:n.data("micromarkExtensions")||[],mdastExtensions:n.data("fromMarkdownExtensions")||[]})}}function To(e){if(e)throw e}var Dr=Qo(Ml(),1);function Rn(e){if(typeof e!="object"||e===null)return!1;let n=Object.getPrototypeOf(e);return(n===null||n===Object.prototype||Object.getPrototypeOf(n)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Io(){let e=[],n={run:t,use:r};return n;function t(...i){let o=-1,s=i.pop();if(typeof s!="function")throw new TypeError("Expected function as last argument, not "+s);a(null,...i);function a(l,...u){let c=e[++o],d=-1;if(l){s(l);return}for(;++d<i.length;)(u[d]===null||u[d]===void 0)&&(u[d]=i[d]);i=u,c?Tl(c,a)(...u):s(null,...u)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),n}}function Tl(e,n){let t;return r;function r(...s){let a=e.length>s.length,l;a&&s.push(i);try{l=e.apply(this,s)}catch(u){let c=u;if(a&&t)throw c;return i(c)}a||(l&&l.then&&typeof l.then=="function"?l.then(o,i):l instanceof Error?i(l):o(l))}function i(s,...a){t||(t=!0,n(s,...a))}function o(s){i(null,s)}}var Ae=class extends Error{constructor(n,t,r){super(),typeof t=="string"&&(r=t,t=void 0);let i="",o={},s=!1;if(t&&("line"in t&&"column"in t?o={place:t}:"start"in t&&"end"in t?o={place:t}:"type"in t?o={ancestors:[t],place:t.position}:o={...t}),typeof n=="string"?i=n:!o.cause&&n&&(s=!0,i=n.message,o.cause=n),!o.ruleId&&!o.source&&typeof r=="string"){let l=r.indexOf(":");l===-1?o.ruleId=r:(o.source=r.slice(0,l),o.ruleId=r.slice(l+1))}if(!o.place&&o.ancestors&&o.ancestors){let l=o.ancestors[o.ancestors.length-1];l&&(o.place=l.position)}let a=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=a?a.line:void 0,this.name=vt(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=s&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};Ae.prototype.file="";Ae.prototype.name="";Ae.prototype.reason="";Ae.prototype.message="";Ae.prototype.stack="";Ae.prototype.column=void 0;Ae.prototype.line=void 0;Ae.prototype.ancestors=void 0;Ae.prototype.cause=void 0;Ae.prototype.fatal=void 0;Ae.prototype.place=void 0;Ae.prototype.ruleId=void 0;Ae.prototype.source=void 0;var We={basename:Qm,dirname:Xm,extname:Zm,join:eh,sep:"/"};function Qm(e,n){if(n!==void 0&&typeof n!="string")throw new TypeError('"ext" argument must be a string');Pn(e);let t=0,r=-1,i=e.length,o;if(n===void 0||n.length===0||n.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(o){t=i+1;break}}else r<0&&(o=!0,r=i+1);return r<0?"":e.slice(t,r)}if(n===e)return"";let s=-1,a=n.length-1;for(;i--;)if(e.codePointAt(i)===47){if(o){t=i+1;break}}else s<0&&(o=!0,s=i+1),a>-1&&(e.codePointAt(i)===n.codePointAt(a--)?a<0&&(r=i):(a=-1,r=s));return t===r?r=s:r<0&&(r=e.length),e.slice(t,r)}function Xm(e){if(Pn(e),e.length===0)return".";let n=-1,t=e.length,r;for(;--t;)if(e.codePointAt(t)===47){if(r){n=t;break}}else r||(r=!0);return n<0?e.codePointAt(0)===47?"/":".":n===1&&e.codePointAt(0)===47?"//":e.slice(0,n)}function Zm(e){Pn(e);let n=e.length,t=-1,r=0,i=-1,o=0,s;for(;n--;){let a=e.codePointAt(n);if(a===47){if(s){r=n+1;break}continue}t<0&&(s=!0,t=n+1),a===46?i<0?i=n:o!==1&&(o=1):i>-1&&(o=-1)}return i<0||t<0||o===0||o===1&&i===t-1&&i===r+1?"":e.slice(i,t)}function eh(...e){let n=-1,t;for(;++n<e.length;)Pn(e[n]),e[n]&&(t=t===void 0?e[n]:t+"/"+e[n]);return t===void 0?".":th(t)}function th(e){Pn(e);let n=e.codePointAt(0)===47,t=nh(e,!n);return t.length===0&&!n&&(t="."),t.length>0&&e.codePointAt(e.length-1)===47&&(t+="/"),n?"/"+t:t}function nh(e,n){let t="",r=0,i=-1,o=0,s=-1,a,l;for(;++s<=e.length;){if(s<e.length)a=e.codePointAt(s);else{if(a===47)break;a=47}if(a===47){if(!(i===s-1||o===1))if(i!==s-1&&o===2){if(t.length<2||r!==2||t.codePointAt(t.length-1)!==46||t.codePointAt(t.length-2)!==46){if(t.length>2){if(l=t.lastIndexOf("/"),l!==t.length-1){l<0?(t="",r=0):(t=t.slice(0,l),r=t.length-1-t.lastIndexOf("/")),i=s,o=0;continue}}else if(t.length>0){t="",r=0,i=s,o=0;continue}}n&&(t=t.length>0?t+"/..":"..",r=2)}else t.length>0?t+="/"+e.slice(i+1,s):t=e.slice(i+1,s),r=s-i-1;i=s,o=0}else a===46&&o>-1?o++:o=-1}return t}function Pn(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}var Il={cwd:rh};function rh(){return"/"}function dn(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Nl(e){if(typeof e=="string")e=new URL(e);else if(!dn(e)){let n=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw n.code="ERR_INVALID_ARG_TYPE",n}if(e.protocol!=="file:"){let n=new TypeError("The URL must be of scheme file");throw n.code="ERR_INVALID_URL_SCHEME",n}return ih(e)}function ih(e){if(e.hostname!==""){let r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}let n=e.pathname,t=-1;for(;++t<n.length;)if(n.codePointAt(t)===37&&n.codePointAt(t+1)===50){let r=n.codePointAt(t+2);if(r===70||r===102){let i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(n)}var No=["history","path","basename","stem","extname","dirname"],Fn=class{constructor(n){let t;n?dn(n)?t={path:n}:typeof n=="string"||oh(n)?t={value:n}:t=n:t={},this.cwd="cwd"in t?"":Il.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<No.length;){let o=No[r];o in t&&t[o]!==void 0&&t[o]!==null&&(this[o]=o==="history"?[...t[o]]:t[o])}let i;for(i in t)No.includes(i)||(this[i]=t[i])}get basename(){return typeof this.path=="string"?We.basename(this.path):void 0}set basename(n){Ro(n,"basename"),Oo(n,"basename"),this.path=We.join(this.dirname||"",n)}get dirname(){return typeof this.path=="string"?We.dirname(this.path):void 0}set dirname(n){Ol(this.basename,"dirname"),this.path=We.join(n||"",this.basename)}get extname(){return typeof this.path=="string"?We.extname(this.path):void 0}set extname(n){if(Oo(n,"extname"),Ol(this.dirname,"extname"),n){if(n.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(n.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=We.join(this.dirname,this.stem+(n||""))}get path(){return this.history[this.history.length-1]}set path(n){dn(n)&&(n=Nl(n)),Ro(n,"path"),this.path!==n&&this.history.push(n)}get stem(){return typeof this.path=="string"?We.basename(this.path,this.extname):void 0}set stem(n){Ro(n,"stem"),Oo(n,"stem"),this.path=We.join(this.dirname||"",n+(this.extname||""))}fail(n,t,r){let i=this.message(n,t,r);throw i.fatal=!0,i}info(n,t,r){let i=this.message(n,t,r);return i.fatal=void 0,i}message(n,t,r){let i=new Ae(n,t,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(n){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(n||void 0).decode(this.value)}};function Oo(e,n){if(e&&e.includes(We.sep))throw new Error("`"+n+"` cannot be a path: did not expect `"+We.sep+"`")}function Ro(e,n){if(!e)throw new Error("`"+n+"` cannot be empty")}function Ol(e,n){if(!e)throw new Error("Setting `"+n+"` requires `path` to be set too")}function oh(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}var Rl=(function(e){let r=this.constructor.prototype,i=r[e],o=function(){return i.apply(o,arguments)};return Object.setPrototypeOf(o,r),o});var sh={}.hasOwnProperty,Do=class e extends Rl{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=Io()}copy(){let n=new e,t=-1;for(;++t<this.attachers.length;){let r=this.attachers[t];n.use(...r)}return n.data((0,Dr.default)(!0,{},this.namespace)),n}data(n,t){return typeof n=="string"?arguments.length===2?(_o("data",this.frozen),this.namespace[n]=t,this):sh.call(this.namespace,n)&&this.namespace[n]||void 0:n?(_o("data",this.frozen),this.namespace=n,this):this.namespace}freeze(){if(this.frozen)return this;let n=this;for(;++this.freezeIndex<this.attachers.length;){let[t,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);let i=t.call(n,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(n){this.freeze();let t=_r(n),r=this.parser||this.Parser;return Po("parse",r),r(String(t),t)}process(n,t){let r=this;return this.freeze(),Po("process",this.parser||this.Parser),Fo("process",this.compiler||this.Compiler),t?i(void 0,t):new Promise(i);function i(o,s){let a=_r(n),l=r.parse(a);r.run(l,a,function(c,d,m){if(c||!d||!m)return u(c);let f=d,h=r.stringify(f,m);lh(h)?m.value=h:m.result=h,u(c,m)});function u(c,d){c||!d?s(c):o?o(d):t(void 0,d)}}}processSync(n){let t=!1,r;return this.freeze(),Po("processSync",this.parser||this.Parser),Fo("processSync",this.compiler||this.Compiler),this.process(n,i),Fl("processSync","process",t),r;function i(o,s){t=!0,To(o),r=s}}run(n,t,r){Pl(n),this.freeze();let i=this.transformers;return!r&&typeof t=="function"&&(r=t,t=void 0),r?o(void 0,r):new Promise(o);function o(s,a){let l=_r(t);i.run(n,l,u);function u(c,d,m){let f=d||n;c?a(c):s?s(f):r(void 0,f,m)}}}runSync(n,t){let r=!1,i;return this.run(n,t,o),Fl("runSync","run",r),i;function o(s,a){To(s),i=a,r=!0}}stringify(n,t){this.freeze();let r=_r(t),i=this.compiler||this.Compiler;return Fo("stringify",i),Pl(n),i(n,r)}use(n,...t){let r=this.attachers,i=this.namespace;if(_o("use",this.frozen),n!=null)if(typeof n=="function")l(n,t);else if(typeof n=="object")Array.isArray(n)?a(n):s(n);else throw new TypeError("Expected usable value, not `"+n+"`");return this;function o(u){if(typeof u=="function")l(u,[]);else if(typeof u=="object")if(Array.isArray(u)){let[c,...d]=u;l(c,d)}else s(u);else throw new TypeError("Expected usable value, not `"+u+"`")}function s(u){if(!("plugins"in u)&&!("settings"in u))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");a(u.plugins),u.settings&&(i.settings=(0,Dr.default)(!0,i.settings,u.settings))}function a(u){let c=-1;if(u!=null)if(Array.isArray(u))for(;++c<u.length;){let d=u[c];o(d)}else throw new TypeError("Expected a list of plugins, not `"+u+"`")}function l(u,c){let d=-1,m=-1;for(;++d<r.length;)if(r[d][0]===u){m=d;break}if(m===-1)r.push([u,...c]);else if(c.length>0){let[f,...h]=c,b=r[m][1];Rn(b)&&Rn(f)&&(f=(0,Dr.default)(!0,b,f)),r[m]=[u,f,...h]}}}},jo=new Do().freeze();function Po(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Fo(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function _o(e,n){if(n)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Pl(e){if(!Rn(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Fl(e,n,t){if(!t)throw new Error("`"+e+"` finished async. Use `"+n+"` instead")}function _r(e){return ah(e)?e:new Fn(e)}function ah(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function lh(e){return typeof e=="string"||ch(e)}function ch(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}var n$=new Map(Object.entries(Ut).map(([e,n])=>[n,e]));var qo=e=>`/_files/schema/${encodeURIComponent(e)}`;var U$=jo().use(Pr).use(dr).use(Rr);var hh=["string","number","bool","json","timestamp"];var nM=`pk / fk(<table>) / fk[](<table>) / enum("a"|"b") / ${hh.join(" / ")}`;var jr={headerH:26,rowH:19,padX:11,padBottom:9,gapNameType:18,minW:158,gapY:22,gapInnerX:30,gapGroupX:108,gapGroupY:40,framePad:14,frameLabelH:22,maxColH:1020,lane:10,corner:7,margin:16,legendH:24,radius:10,baselineDrop:4},ph=jr.margin,rM=jr.gapGroupY,iM=jr.frameLabelH,oM=jr.framePad;var _l=(e,n)=>`<a class="resource-download" href="${be(n)}" download="${be(wn(e))}" data-resource-download title="${be(`Download ${wn(e)}`)}" aria-label="${be(`Download ${wn(e)}`)}"><svg viewBox="0 0 20 20" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M10 2v10m-4-4 4 4 4-4M3 13v4h14v-4"/></svg></a>`,Dl=(e,n)=>`<div class="subformat-table" tabindex="0" role="region" aria-label="${be(n)}"><table><thead><tr><th scope="col" data-i18n="File name">File name</th>${e.fields.map(t=>`<th scope="col">${be(t.title)}</th>`).join("")}</tr></thead><tbody>${e.records.map((t,r)=>`<tr data-record-file="${be(t.file)}"><th scope="row"><button type="button" data-subformat-record="${r}" aria-haspopup="dialog" title="${be(t.file)}">${be(wn(t.file))}</button></th>${e.fields.map(i=>`<td><span>${Object.hasOwn(t.data,i.name)?be(typeof t.data[i.name]=="object"?JSON.stringify(t.data[i.name]):String(t.data[i.name])):""}</span></td>`).join("")}</tr>`).join("")}</tbody></table></div>${e.records.length?"":'<p data-i18n="No results">No results</p>'}`;var jl=e=>e.startsWith("/")&&!e.startsWith("//")?`${globalThis.__doocClientBase??""}${e}`:e,ql=e=>{let n=globalThis.__doocClientBase;return n&&(e===n||e.startsWith(`${n}/`))?e.slice(n.length)||"/":e};var Bl=()=>globalThis.__doocConnections??={active:"local",items:new Map},fn=()=>Bl().active;var Et=(e=fn())=>Bl().items.get(e);function Bo(e,n,t){let r=globalThis.__doocConnections,i=r?.items.get(t??r.active);return i?i.fetch(e,n):fetch(e,n)}var qr=(e,n,t)=>new Promise(r=>{let i=document.activeElement,o=document.createElement("dialog");o.className="app-dialog",o.setAttribute("aria-label",e);let s=document.createElement("h2");s.textContent=e;let a=typeof n=="string"?document.createElement("p"):n;typeof n=="string"&&(a.textContent=n);let l=document.createElement("div");l.className="dialog-actions";for(let u of t){let c=document.createElement("button");c.type="button",c.textContent=u.label,c.autofocus=u.value==="",c.classList.toggle("danger",!!u.danger),c.addEventListener("click",()=>o.close(u.value)),l.append(c)}o.append(s,a,l),o.addEventListener("close",()=>{o.remove(),i instanceof HTMLElement&&i.isConnected&&i.focus(),r(o.returnValue)},{once:!0}),document.body.append(o),o.showModal()}),Ho=async(e,n,t=!1)=>await qr(n,e,[{value:"",label:L("Cancel")},{value:"confirm",label:n,danger:t}])==="confirm";var Ct=e=>`<svg viewBox="0 0 20 20" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">${e}</svg>`,Hl=(e,n)=>{let t=Math.max(e,n)>6,r=t?96:Math.max(e,n)*16,i=t?'<rect x="8" y="8" width="24" height="24"/><path class="format-grid-ellipsis" d="M40 50c8-12 12 12 20 0"/><rect x="64" y="64" width="24" height="24"/>':Array.from({length:e*n},(o,s)=>`<rect x="${(r-e*16)/2+s%e*16+2}" y="${(r-n*16)/2+Math.floor(s/e)*16+2}" width="12" height="12"/>`).join("");return`<svg class="format-grid-boxes" viewBox="0 0 ${r} ${r}" aria-hidden="true">${i}</svg>`},mn=[["grid","Grid",'<rect x="3" y="3" width="5" height="5" rx=".5"/><rect x="12" y="3" width="5" height="5" rx=".5"/><rect x="3" y="12" width="5" height="5" rx=".5"/><rect x="12" y="12" width="5" height="5" rx=".5"/>'],["list","List",'<path d="M7 4h10M7 10h10M7 16h10M3 4h.1M3 10h.1M3 16h.1"/>'],["table","Table",'<rect x="3" y="3" width="14" height="14" rx="1"/><path d="M3 8h14M3 12h14M8 3v14"/>']],zl=new WeakMap,gh=0,zo=e=>new Map([...e.querySelectorAll("[data-record-file]")].map(n=>[n,n.getBoundingClientRect()])),Uo=e=>{if(matchMedia("(prefers-reduced-motion: reduce)").matches)return Promise.resolve([]);let n=[];for(let[t,r]of e){if(!t.isConnected)continue;let i=t.getBoundingClientRect(),o=r.left-i.left,s=r.top-i.top;Math.abs(o)<1&&Math.abs(s)<1||n.push(t.animate([{transform:`translate(${o}px, ${s}px)`},{transform:"none"}],{duration:180,easing:"cubic-bezier(0.16, 1, 0.3, 1)"}).finished.catch(()=>{}))}return Promise.all(n)},Br=new Set;var ot=e=>{document.querySelector(".subformat-toast")?.remove();let n=document.createElement("div");n.className="subformat-toast",n.setAttribute("role","alert"),n.textContent=e instanceof Error?e.message:String(e),document.body.append(n),setTimeout(()=>n.remove(),6e3)},Vl=()=>{document.addEventListener("docs:subformat-page-action",async e=>{let n=fn(),{id:t,action:r}=e.detail,i=document.querySelector(`#nav-groups [data-doc-id="${CSS.escape(t)}"] > .nav-row > a`);if(!i)return;let o=i.pathname,s=i.textContent?.trim()??"",a=s;if(r==="delete"){if(!await Ho(L("Remove this page from the sidebar? The records will be kept."),L("Remove page")))return}else if(r==="rename"){let l=document.createElement("label");l.textContent=L("title");let u=document.createElement("input");u.className="subformat-page-name",u.value=s,u.required=!0,l.append(u);let c=qr(L("Rename page"),l,[{value:"",label:L("Cancel")},{value:"save",label:L("Save")}]);if(u.focus(),u.select(),await c!=="save")return;a=u.value.trim()}else return;try{let l=await Bo("/api/subformat-page",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({id:t,action:r,title:a})},n),u=await l.json();if(!l.ok)throw new Error(u.error??L("Save failed"));if(r==="delete"&&fn()===n&&location.pathname===o){let c=[...document.querySelectorAll("#nav-docs .nav-row > a")].find(m=>m!==i),d=window.__docsNavigate;d?await d(c?ql(c.pathname):"/"):location.href=c?.href??jl("/")}document.dispatchEvent(new Event("docs:files-changed"))}catch(l){ot(l)}})},bh=e=>{let n=["added","modified"].map(i=>({change:i,count:e.filter(o=>o.change===i).length,label:L(i==="added"?"Added":"Modified")})),t=n.find(({count:i})=>i>0&&i===e.length),r=({change:i,count:o,label:s})=>`<span data-record-change="${i}" aria-label="${be(`${s}: ${o}`)}" title="${be(s)}">${o}</span>`;return t?r(t):`<span>${e.length}</span>${n.filter(({count:i})=>i>0).map(r).join("")}`},ut=(e,n,t)=>{let r=e.querySelector("[data-subformats]"),i=e.querySelector("[data-subformat-board]");if(!r||!i)return!1;let o=zl.get(e);if(!o){let c=e.closest("[data-pane-id]"),d=e.closest("[data-workspace]")?.dataset.workspace??fn();o={id:++gh,workspace:d,fetch:(b,w)=>Bo(b,w,d),collections:JSON.parse(r.content.textContent??"[]"),views:new Map,parameterOrders:new Map,hiddenFields:new Map,filters:new Map,expanded:new Set,previews:new Map([...e.querySelector("[data-format-previews]")?.content.querySelectorAll("[data-format-preview]")??[]].map(b=>[b.dataset.formatPreview??"",b])),openSource:t&&((b,w)=>{fn()===d&&(!c||c.classList.contains("active"))&&t(b,w)}),dialogOpen:!1,busy:!1},zl.set(e,o);let m=e.querySelector("[data-subformat-search]"),f=e.querySelector("[data-resource-search]"),h=f?.closest(".resource-search");m&&f&&h&&(h.id=`subformat-${o.id}-search`,m.setAttribute("aria-controls",h.id),m.addEventListener("click",()=>{let b=h.hidden;h.hidden=!b,m.setAttribute("aria-expanded",String(b)),b?f.focus():(f.value="",f.dispatchEvent(new Event("input",{bubbles:!0})),m.focus())}),f.addEventListener("keydown",b=>{b.key==="Escape"&&(b.preventDefault(),b.stopPropagation(),m.click())}))}let s=e.querySelector("[data-resource-filter]");s?.hasAttribute("data-subformat-filter")&&o.openSource&&document.body.classList.contains("edit")&&!Et(o.workspace)?.readOnly&&([...s.options].some(c=>c.value==="+")||s.add(new Option(L("Add subformat\u2026"),"+")),s.value==="+"&&(s.value=o.selected??o.collections[0]?.ext??"",kh(e,o,s)));let a=o.collections.find(c=>c.ext===(e.dataset.subformatPage??e.dataset.subformatEmbed??s?.value));if(s){for(let d of s.options){let m=o.collections.find(h=>h.ext===d.value),f=m&&fi(m);f?(d.dataset.subformatChange=f,d.setAttribute("aria-label",`${d.text} \xB7 ${L(f==="added"?"Added":"Modified")}`)):(delete d.dataset.subformatChange,d.removeAttribute("aria-label"))}let c=a&&fi(a);c?s.dataset.subformatChange=c:delete s.dataset.subformatChange,yh(e,s,o)}let l=e.querySelector("[data-subformat-relations]");l&&(l.hidden=s?.value!=="*"),i.hidden=!a;let u=e.querySelector(".resource-items");if(u&&(u.hidden=!!a),!a)return o.stopDrag?.(),e.querySelector(".subformat-controls")?.remove(),e.querySelector(".subformat-filters")?.remove(),l&&!l.hidden?(e.querySelector("[data-resource-empty]")?.setAttribute("hidden",""),!0):!1;if(i.setAttribute("aria-label",a.ext),o.selected=a.ext,qe(e,i,o,a,n),u){let c=0;for(let d of u.querySelectorAll("[data-resource-item]")){let m=d.textContent?.normalize("NFKC").toLowerCase()??"";d.hidden=!d.hasAttribute("data-resource-inline")||d.dataset.resourceGroup!==a.ext||!n.every(f=>m.includes(f)),d.hidden||c++}if(u.hidden=!c,c){e.querySelector("[data-resource-empty]")?.setAttribute("hidden","");let d=e.querySelector("[data-resource-count]");d&&(d.textContent=String(Number(d.textContent)+c))}}return!0},Vo=(e,n)=>{if(!n)return;if(!n.iconSvg){e.insertAdjacentHTML("afterbegin",Xs);return}let t=document.createElement("img");t.className="doc-icon",t.alt="",t.src=`data:image/svg+xml,${encodeURIComponent(n.iconSvg)}`,e.prepend(t)},yh=(e,n,t)=>{let r=e.querySelector("[data-subformat-trigger]"),i=e.querySelector("[data-subformat-options]");if(!r||!i)return;r.hidden=!t.openSource||!document.body.classList.contains("edit")||!!Et(t.workspace)?.readOnly;let o=r.closest(".resource-query");if(o&&(o.hidden=r.hidden),!r.hidden){r.textContent=n.selectedOptions[0]?.text||L("Subformats"),Vo(r,t.collections.find(s=>s.ext===n.value)),r.disabled=![...n.options].some(s=>s.value),n.dataset.subformatChange?r.dataset.subformatChange=n.dataset.subformatChange:delete r.dataset.subformatChange,i.replaceChildren();for(let s of n.options){if(!s.value)continue;let a=document.createElement("button");a.type="button",a.tabIndex=-1,a.textContent=s.text,Vo(a,t.collections.find(c=>c.ext===s.value)),a.setAttribute("role",s.value==="+"?"menuitem":"menuitemradio"),s.value==="+"?a.dataset.subformatAdd="":a.setAttribute("aria-checked",String(s.selected)),s.dataset.subformatChange&&(a.dataset.subformatChange=s.dataset.subformatChange,a.setAttribute("aria-label",s.getAttribute("aria-label")??s.text)),a.addEventListener("click",()=>{i.hidePopover(),n.value=s.value,n.dispatchEvent(new Event("change",{bubbles:!0})),s.value!=="+"&&r.focus()});let l=document.createElement("div");l.className="subformat-picker-option",l.setAttribute("role","none"),l.append(a);let u=t.collections.find(c=>c.ext===s.value);if(u&&t.openSource&&document.body.classList.contains("edit")&&!Et(t.workspace)?.readOnly)for(let c of["edit","delete"]){let d=document.createElement("button");d.type="button",d.tabIndex=-1,d.dataset.subformatAction=c,d.title=`${L(c==="edit"?"Edit":"Delete")}: ${u.ext}`,d.innerHTML=`<svg width="16" height="16" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="${c==="edit"?"m13 3 4 4M3 17l4-1L17 6a2.8 2.8 0 0 0-4-4L3 12Z":"m5 5 10 10M15 5 5 15"}"/></svg>`,d.setAttribute("role","menuitem"),d.setAttribute("aria-label",d.title),d.disabled=t.busy,d.addEventListener("click",()=>{t.busy||(i.hidePopover(),r.focus(),c==="edit"?t.openSource?.(u.schema,1):wh(e,t,n,u))}),l.append(d)}i.append(l)}_n(r,i)}},wh=async(e,n,t,r)=>{n.busy=!0;try{if(!await Ho(L("Delete subformat {ext} and its sidebar page? Records and schema files will be kept.",{ext:r.ext}),L("Delete"),!0))return;let{ext:i,format:o,schema:s,icon:a,layouts:l}=r,u=await n.fetch("/api/subformat",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({action:"delete",ext:i,base:{ext:i,format:o,schema:s,icon:a,layouts:l}})}),c=await u.json();if(!u.ok)throw new Error(L(c.error??"Save failed"));n.collections=n.collections.filter(d=>d!==r),n.views.delete(i),n.parameterOrders.delete(i),n.hiddenFields.delete(i),n.filters.delete(i);for(let d of[...t.options])d.value===i&&d.remove();n.collections.some(d=>d.ext===t.value)||(t.value=n.collections[0]?.ext??""),document.dispatchEvent(new CustomEvent("docs:subformat-saved",{detail:{file:c.file,workspace:n.workspace}})),document.dispatchEvent(new Event("docs:files-changed"))}catch(i){ot(i)}finally{n.busy=!1,t.dispatchEvent(new Event("change",{bubbles:!0})),e.querySelector("[data-subformat-trigger]")?.focus()}},Go=(e,n)=>{let t=e.getBoundingClientRect(),r=innerHeight-t.bottom,i=r<240&&t.top>r;Object.assign(n.style,{left:`${Math.max(8,Math.min(t.left,innerWidth-n.offsetWidth-8))}px`,maxHeight:`${Math.max(80,Math.min(360,(i?t.top:r)-12))}px`,top:i?"auto":`${t.bottom+4}px`,bottom:i?`${innerHeight-t.top+4}px`:"auto"})},_n=(e,n,t)=>{e.dataset.mounted||(e.dataset.mounted="true",e.addEventListener("click",()=>{if(n.matches(":popover-open")){n.hidePopover();return}n.showPopover(),Go(e,n),e.setAttribute("aria-expanded","true"),(n.querySelector('[aria-checked="true"], [aria-pressed="true"]')??n.querySelector("button:not(:disabled)"))?.focus()}),n.addEventListener("beforetoggle",r=>{let i=r.newState==="open";e.setAttribute("aria-expanded",String(i)),n.isConnected&&t?.(i)}),n.addEventListener("keydown",r=>{if(r.key==="Escape"&&e.focus(),r.target instanceof HTMLInputElement||r.target instanceof HTMLSelectElement)return;let i=[...n.querySelectorAll("button:not(:disabled)")],o=i.indexOf(document.activeElement);if(["ArrowDown","ArrowUp","Home","End"].includes(r.key)){r.preventDefault();let s=r.key==="Home"?0:r.key==="End"?i.length-1:(o+(r.key==="ArrowDown"?1:i.length-1))%i.length;i[s]?.focus()}}))},kh=(e,n,t)=>{if(n.registrationForm){document.dispatchEvent(new CustomEvent("docs:subformat-add",{detail:n.registrationForm}));return}let r=document.createElement("form");n.registrationForm=r,Br.add(r),r.dataset.workspace=n.workspace,r.className="subformat-create-form",r.dataset.subformatRegister="",r.setAttribute("aria-label",L("Add subformat")),r.innerHTML=`<fieldset class="subformat-register-fields"><input name="ext" required placeholder="ext." aria-label="${L("Extension")}" autocomplete="off" spellcheck="false"><label class="subformat-control"><span class="subformat-control-label">format</span><select id="subformat-format" name="format" data-placeholder="format" aria-label="${L("Storage format")}"><option value="json">json</option><option value="yaml">yaml</option><option value="toml">toml</option></select></label><input name="schema" placeholder="path" aria-label="${L("Schema file (optional)")}" autocomplete="off" spellcheck="false"></fieldset><fieldset><label class="subformat-register-icon">${L("SVG icon path (optional)")}<input name="icon" placeholder="icons/example.svg" autocomplete="off" spellcheck="false"></label><textarea name="content" hidden></textarea><div data-subformat-schema-editor></div><div class="subformat-create-actions"><button type="button" data-format>${L("Validate and apply")}</button><button type="button" data-cancel>${L("Cancel")}</button><button type="submit">${L("Add subformat")}</button></div></fieldset>`,r.elements.namedItem("content").value=As;let i=r.elements.namedItem("ext"),o=r.elements.namedItem("schema");i.addEventListener("input",()=>{i.value.trim()?o.placeholder=`${i.value.trim()}.schema.json`:o.placeholder="path"}),r.addEventListener("input",()=>{r.dataset.dirty="true"});let s=()=>{n.registrationForm=void 0,Br.delete(r),document.dispatchEvent(new CustomEvent("docs:subformat-editor-close",{detail:r})),r.remove()},a=()=>{n.busy||(s(),(e.querySelector("[data-subformat-trigger]")??t).focus())};r.querySelector("[data-cancel]")?.addEventListener("click",a);let l=u=>{u.key==="Escape"&&!u.defaultPrevented&&(u.preventDefault(),u.stopPropagation(),a())};r.addEventListener("keydown",l),r.querySelector(".subformat-register-fields")?.addEventListener("keydown",u=>l(u)),r.addEventListener("submit",async u=>{if(u.preventDefault(),n.busy)return;n.busy=!0;let c=[...r.elements].filter(f=>f instanceof HTMLFieldSetElement),d=f=>r.elements.namedItem(f).value.trim();for(let f of c)f.disabled=!0;let m=r.querySelector("[data-subformat-schema-editor]");m&&(m.inert=!0),document.querySelector(".subformat-toast")?.remove();try{let f=await n.fetch("/api/subformat",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({action:"register",ext:d("ext"),format:d("format"),schema:d("schema"),icon:d("icon"),content:r.elements.namedItem("content").value})}),h=await f.json();if(!f.ok)throw new Error(L(h.error??"Save failed"));let b=h.collection;n.collections.push(b),t.add(new Option(b.ext,b.ext),t.options.length-1),t.value=b.ext,s(),n.busy=!1,t.dispatchEvent(new Event("change",{bubbles:!0})),n.openSource?.(b.schema,1)}catch(f){ot(f)}finally{n.busy=!1;for(let f of c)f.disabled=!1;m&&(m.inert=!1)}}),document.dispatchEvent(new CustomEvent("docs:subformat-add",{detail:r})),r.elements.namedItem("ext").focus()};var Ko=(e,n)=>`<div><dt>${be(e)}</dt><dd>${be(typeof n=="object"?JSON.stringify(n,null,2):String(n))}</dd></div>`,Ul=async(e,n,t,r)=>{if(e.openSource)return e.openSource(t.file,n.resource&&Number(t.data.line)||1);if(e.dialogOpen)return;e.dialogOpen=!0;let i=document.createElement("div");i.className="subformat-detail",i.innerHTML=`<p class="subformat-detail-path">${be(t.file)}</p><dl>${Object.entries(t.data).map(([s,a])=>Ko(n.fields.find(l=>l.name===s)?.title??s,a)).join("")}</dl>`;let o=e.previews.get(JSON.stringify(t.data));o&&i.prepend(o.cloneNode(!0));try{await qr(r,i,[{value:"",label:L("Close")}])}finally{e.dialogOpen=!1}},qe=(e,n,t,r,i)=>{t.stopDrag?.();let o=e.hasAttribute("data-subformat-embed"),s=JSON.parse(e.dataset.subformatEmbedOptions??"{}"),a=n.querySelector(".subformat-columns")?.scrollLeft??0,l=!!document.querySelector("template[data-route]"),u=r.fields.filter(x=>x.enum?.length),c=t.views.get(r.ext)??{view:o?s.view??e.dataset.subformatEmbedView??"card":r.layouts?.view??"card",card_title:s.card_title??r.layouts?.card_title??"",group_by:s.group_by??(o?"":r.layouts?.group_by??u[0]?.name??""),sort_by:s.sort_by??r.layouts?.sort_by??"",sort_order:s.sort_order??r.layouts?.sort_order??"asc",columns:s.columns??3,rows:s.rows??2,folder:".",page:0};t.views.set(r.ext,c),u.some(x=>x.name===c.group_by)||(c.group_by="");let d=c.view==="card"?u.find(x=>x.name===c.group_by):void 0,m=r.fields.filter(x=>x.enum||x.format||x.type);m.some(x=>x.name===c.sort_by)||(c.sort_by="");let f=m.find(x=>x.name===c.sort_by),h=c.card_title,b=t.parameterOrders.get(r.ext)??s.fields??r.fields.map(x=>x.name),w=[...b.flatMap(x=>r.fields.filter(_=>_.name===x)),...r.fields.filter(x=>!b.includes(x.name))],y=t.hiddenFields.get(r.ext)??new Set(r.fields.filter(x=>s.fields&&!s.fields.includes(x.name)).map(x=>x.name)),C=w.filter(x=>!y.has(x.name)),k=t.filters.get(r.ext)??[],O=c.sort_order==="desc",R=mi(r.records.filter(x=>{let _=`${x.file} ${x.content}`.normalize("NFKC").toLowerCase();return i.every($=>_.includes($))&&(!r.resource||Rs(x.file,c.folder??"."))&&Ms(x,{filters:k},r.fields)}),f,O),S=(c.columns??3)*(c.rows??2),M=Math.max(1,Math.ceil(R.length/S));c.page=Math.min(c.page??0,M-1);let Y=r.resource&&c.view==="grid"?R.slice(c.page*S,(c.page+1)*S):R,pe=e.querySelector("[data-resource-empty]");pe&&(pe.hidden=Y.length>0);let v=e.querySelector("[data-resource-count]"),re=r.resource&&c.view==="grid";v&&(v.classList.toggle("format-page-count",!!re),v.textContent=re?`${Y.length?c.page+1:0} / ${Y.length?M:0}`:String(R.length),v instanceof HTMLElement&&(v.title=re?`${L("Pagination")}: ${v.textContent} \xB7 ${c.page*S+(Y.length?1:0)}\u2013${Math.min((c.page+1)*S,R.length)} / ${R.length}`:""));let j=e.querySelector(".subformat-controls")??document.createElement("div");j.className="subformat-controls",o?e.querySelector(".subformat-embed-toolbar")?.insertBefore(j,v):e.querySelector(".resource-toolbar")?.append(j);let B=t.openSetting;j.replaceChildren(),n.parentElement?.classList.contains("format-gallery")&&n.parentElement.replaceWith(n);let Z=j;if(r.resource){let x=document.createElement("div");x.className="format-view-switch",x.setAttribute("role","group"),x.setAttribute("aria-label",L("View"));for(let[N,q,P]of mn){let z=document.createElement("button");z.type="button",z.dataset.formatView=N,z.title=L(q),z.setAttribute("aria-label",L(q)),z.setAttribute("aria-pressed",String(c.view===N||N==="grid"&&c.view==="card")),z.innerHTML=Ct(P),z.onclick=()=>{c.view=N,qe(e,n,t,r,i),j.querySelector(`[data-format-view="${N}"]`)?.focus()},x.append(z)}let _=Math.max(0,mn.findIndex(([N])=>N===c.view)),$=document.createElement("button"),U=mn[_]??mn[0];$.type="button",$.className="format-view-cycle",$.dataset.formatViewCycle="",$.title=`${L("View")}: ${L(U[1])}`,$.setAttribute("aria-label",$.title),$.innerHTML=Ct(U[2]),$.onclick=()=>{c.view=mn[_+1]?.[0]??"grid",qe(e,n,t,r,i),j.querySelector("[data-format-view-cycle]")?.focus()},x.append($),j.append(x);let D=document.createElement("div");D.className="format-display-settings",D.innerHTML=`<button type="button" data-format-display aria-label="${L("Display")}" title="${L("Display")}" aria-haspopup="dialog" aria-expanded="false" aria-controls="format-display-${t.id}">${Ct('<path d="M3 6h4m6 0h4M3 14h8m4 0h2"/><circle cx="10" cy="6" r="3"/><circle cx="13" cy="14" r="2"/>')}<span>${L("Display")}</span></button><div class="subformat-picker-menu format-display-fields" id="format-display-${t.id}" popover="auto" role="dialog" aria-label="${L("Display")}"></div>`,j.append(D),Z=D.lastElementChild,_n(D.firstElementChild,Z,N=>{t.displayOpen=N}),t.displayOpen&&Z.showPopover()}if(!r.resource&&!e.querySelector("[data-subformat-trigger]:not([hidden])")){let x=document.createElement("a");x.className="subformat-schema-link",x.href=l?`#${qo(r.ext)}`:qo(r.ext),x.textContent=r.ext,Vo(x,r),j.append(x)}let A=[{key:"view",fields:[r.resource?{name:"grid",title:L("Grid")}:{name:"card",title:L("Cards")},{name:"list",title:L("List")},...o?[{name:"table",title:L("Table")}]:[]]},...c.view==="table"?[]:[{key:"card_title",fields:[{name:"",title:L("File name")},...r.fields]}],...u.length&&c.view==="card"?[{key:"group_by",fields:[{name:"",title:L("No grouping")},...u]}]:[],{key:"sort_by",fields:[{name:"",title:L("File name")},...m]},{key:"sort_order",fields:[{name:"asc",title:L(f?.format?"Oldest first":"Ascending")},{name:"desc",title:L(f?.format?"Newest first":"Descending")}]}];for(let{key:x,fields:_}of A){if(r.resource&&x==="view")continue;let $=document.createElement("div");$.className="subformat-control";let U=x==="view"?L("View"):x.replaceAll("_"," "),D=`subformat-${t.id}-${r.ext}-${x}`,N=_.find(K=>K.name===c[x])?.title??L("File name");$.innerHTML=`<span class="subformat-control-label" id="${D}-label">${U}</span><button type="button" data-subformat-setting="${x}" aria-labelledby="${D}-label ${D}-value" aria-haspopup="menu" aria-expanded="false" aria-controls="${D}-menu"${t.busy?" disabled":""}><span id="${D}-value">${be(N)}</span><svg width="12" height="12" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.5" aria-hidden="true"><path d="m5 7 5 5 5-5"/></svg></button><div class="subformat-picker-menu subformat-setting-menu" id="${D}-menu" popover="auto" role="menu" aria-label="${U}"></div>`,Z.append($);let q=$.querySelector("button"),P=$.querySelector("[popover]"),z=r.layouts?.[x]??(x==="view"?"card":x==="sort_order"?"asc":x==="group_by"?u[0]?.name??"":"");for(let K of _){let W=document.createElement("div");W.className="subformat-setting-option",W.setAttribute("role","none");let ie=document.createElement("button");if(ie.type="button",ie.tabIndex=-1,ie.textContent=K.title,ie.dataset.settingValue=K.name,ie.setAttribute("role","menuitemradio"),ie.setAttribute("aria-checked",String(K.name===c[x])),ie.addEventListener("click",()=>{t.busy||(x==="sort_order"?c.sort_order=K.name:x==="view"?c.view=K.name:c[x]=K.name,P.hidePopover(),qe(e,n,t,r,i),j.querySelector(`[data-subformat-setting="${x}"]`)?.focus())}),W.append(ie),o){P.append(W);continue}let ce=document.body.classList.contains("edit")&&!Et(t.workspace)?.readOnly,te=document.createElement(ce?"button":"span");te.className="subformat-default",te.dataset.defaultValue=K.name,te.dataset.isDefault=String(K.name===z),te.dataset.layoutChanged=String(K.name===z&&r.baseLayouts!==void 0&&r.layouts?.[x]!==r.baseLayouts[x]),te.innerHTML=xn,te.title=L(K.name===z?"Default":"Set as default"),te.setAttribute("aria-label",`${te.title}: ${U} \xB7 ${K.title}`),te instanceof HTMLButtonElement&&(te.type="button",te.tabIndex=-1,te.setAttribute("role","menuitem"),te.disabled=t.busy||r.layouts?.[x]===K.name,te.addEventListener("click",async()=>{if(!t.busy){t.busy=!0,te.disabled=!0,q.disabled=!0;try{let ue=await t.fetch("/api/subformat",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({action:"layouts",ext:r.ext,key:x,value:K.name,base:r.layouts?.[x]??null})}),J=await ue.json();if(!ue.ok)throw new Error(L(J.error??"Save failed"));r.layouts={...r.layouts,[x]:K.name},document.dispatchEvent(new CustomEvent("docs:subformat-saved",{detail:{file:J.file,workspace:t.workspace}}))}catch(ue){ot(ue)}finally{t.busy=!1,ut(e,i)}}})),W.append(te),P.append(W)}_n(q,P,K=>{K?t.openSetting=x:t.openSetting===x&&(t.openSetting=void 0)}),B===x&&q.isConnected&&q.click()}if(r.resource){let x=document.createElement("label");x.className="subformat-control format-folder",x.innerHTML=`<span class="subformat-control-label">${L("Folder")}</span><span class="format-folder-icon" aria-hidden="true">${Ct(`<path d="${Qs}"/><path d="m7 10 3 3 3-3"/>`)}</span>`;let _=new Set;for(let U of r.records){let D=U.file.split("/").slice(0,-1);for(let N=1;N<=D.length;N++)_.add(D.slice(0,N).join("/"))}let $=document.createElement("select");$.dataset.formatFolder="",$.setAttribute("aria-label",L("Folder")),$.add(new Option(L("All folders"),"."));for(let U of[..._].sort())$.add(new Option(U,U));if($.value=c.folder??".",$.title=`${L("Folder")}: ${$.selectedOptions[0]?.textContent}`,x.dataset.active=String($.value!=="."),$.onchange=()=>{c.folder=$.value,c.page=0,qe(e,n,t,r,i),j.querySelector("[data-format-folder]")?.focus({preventScroll:!0})},x.append($),j.append(x),c.view==="grid"){let U=document.createElement("div");U.className="format-layout",U.innerHTML=`<button type="button" data-format-layout aria-label="${L("Grid layout")}: ${c.columns} \xD7 ${c.rows}" title="${L("Grid layout")}: ${c.columns} \xD7 ${c.rows}" aria-haspopup="dialog" aria-expanded="false" aria-controls="format-layout-${t.id}"><span class="format-layout-count">${c.columns}\xD7${c.rows}</span>${Hl(c.columns??3,c.rows??2)}</button><div class="subformat-picker-menu format-layout-popover" id="format-layout-${t.id}" popover="auto" role="dialog" aria-label="${L("Grid layout")}"><fieldset class="format-grid-size"><legend><output aria-live="polite"></output></legend><button type="button" data-format-grid-resize aria-keyshortcuts="ArrowLeft ArrowRight ArrowUp ArrowDown" title="${L("Drag or use arrow keys to resize the grid")}"></button></fieldset></div>`,j.append(U);let D=U.querySelector("button"),N=U.querySelector("[popover]"),q=U.querySelector("[data-format-grid-resize]"),P=U.querySelector("output"),z=c.columns??3,K=c.rows??2,W=()=>{P.textContent=`${z} \xD7 ${K}`,q.setAttribute("aria-label",`${L("Columns")}: ${z}, ${L("Rows")}: ${K}`),q.innerHTML=`${Hl(z,K)}<span class="format-grid-grip">${Ct('<path d="m8 16 8-8m-2 8 2-2"/>')}</span>`},ie=()=>{z===c.columns&&K===c.rows||(c.columns=z,c.rows=K,c.page=0,N.hidePopover(),qe(e,n,t,r,i),j.querySelector("[data-format-layout]")?.click(),j.querySelector("[data-format-grid-resize]")?.focus())},ce,te=J=>{if(!ce)return;let{id:Ee}=ce;ce=void 0,q.hasPointerCapture(Ee)&&q.releasePointerCapture(Ee),J?ie():(z=c.columns??3,K=c.rows??2,W())};q.onpointerdown=J=>{ce||J.button!==0||(J.preventDefault(),q.focus(),ce={id:J.pointerId,x:J.clientX,y:J.clientY,columns:z,rows:K},q.setPointerCapture(J.pointerId))},q.onpointermove=J=>{if(!(!ce||J.pointerId!==ce.id)){if(!J.buttons)return te(!1);z=Math.min(12,Math.max(1,ce.columns+Math.round((J.clientX-ce.x)/16))),K=Math.min(12,Math.max(1,ce.rows+Math.round((J.clientY-ce.y)/16))),W()}},q.onpointerup=J=>{J.pointerId===ce?.id&&te(!0)},q.onpointercancel=q.onlostpointercapture=()=>te(!1),q.onkeydown=J=>{if(J.key==="Escape")return te(!1);J.key.startsWith("Arrow")&&(J.preventDefault(),J.stopPropagation(),z=Math.min(12,Math.max(1,z+(J.key==="ArrowRight"?1:J.key==="ArrowLeft"?-1:0))),K=Math.min(12,Math.max(1,K+(J.key==="ArrowDown"?1:J.key==="ArrowUp"?-1:0))),W(),ie())},W(),_n(D,N);let ue=document.createElement("div");ue.className="format-gallery",n.before(ue),ue.append(n);for(let J of[-1,1]){let Ee=document.createElement("button");Ee.type="button",Ee.dataset.formatPage=String(J),Ee.title=L(J<0?"Previous":"Next"),Ee.setAttribute("aria-label",Ee.title),Ee.innerHTML=Ct(J<0?'<path d="m12 5-5 5 5 5"/>':'<path d="m8 5 5 5-5 5"/>'),Ee.disabled=J<0?c.page===0:c.page===M-1,Ee.onclick=()=>{c.page=(c.page??0)+J,qe(e,n,t,r,i),n.scrollTo({top:0,left:0}),(e.querySelector(`[data-format-page="${J}"]:enabled`)??e.querySelector("[data-format-page]:enabled")??n).focus({preventScroll:!0})},J<0?ue.prepend(Ee):ue.append(Ee)}}}if(c.view==="list"||c.view==="table"){let x=w.filter(U=>c.view==="table"||U.name!==h),_=document.createElement("button");_.type="button",_.textContent=L("Fields"),r.resource&&(_.innerHTML=`${Ct(mn[2][2])}<span class="format-control-text">${L("Fields")}</span>`,_.title=L("Fields"),_.setAttribute("aria-label",L("Fields"))),_.dataset.subformatParameters="",_.disabled=t.busy||!x.length,_.setAttribute("aria-haspopup","menu"),_.setAttribute("aria-expanded","false");let $=document.createElement("div");$.id=`subformat-${t.id}-parameters`,$.className="subformat-picker-menu subformat-setting-menu",$.setAttribute("popover","auto"),$.setAttribute("role","menu"),$.setAttribute("aria-label",L("Fields")),_.setAttribute("aria-controls",$.id),j.append(_,$);for(let[U,D]of x.entries()){let N=document.createElement("div");N.className="subformat-setting-option subformat-parameter-option",N.setAttribute("role","none");let q=document.createElement("button");q.type="button",q.tabIndex=-1,q.className="subformat-field-toggle",q.dataset.subformatField=D.name,q.setAttribute("role","menuitemcheckbox"),q.setAttribute("aria-checked",String(!y.has(D.name))),q.disabled=t.busy,q.textContent=D.title,q.insertAdjacentHTML("beforeend",xn),q.addEventListener("click",()=>{y.has(D.name)?y.delete(D.name):y.add(D.name),t.hiddenFields.set(r.ext,y);let P=$.scrollTop;qe(e,n,t,r,i);let z=j.querySelector(`#${$.id}`);z&&(z.scrollTop=P),j.querySelector(`[data-subformat-field="${CSS.escape(D.name)}"]`)?.focus({preventScroll:!0})}),N.append(q);for(let P of[-1,1]){let z=document.createElement("button");z.type="button",z.tabIndex=-1,z.dataset.parameter=D.name,z.dataset.move=P<0?"up":"down",z.setAttribute("role","menuitem"),z.title=`${L(P<0?"Move up":"Move down")}: ${D.title}`,z.setAttribute("aria-label",z.title),z.disabled=t.busy||!x[U+P],z.innerHTML=`<svg width="16" height="16" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.5" aria-hidden="true"><path d="${P<0?"m5 12 5-5 5 5":"m5 8 5 5 5-5"}"/></svg>`,z.addEventListener("click",()=>{let K=x[U+P];if(t.busy||!K)return;let W=w.map(J=>J.name),ie=W.indexOf(D.name),ce=W.indexOf(K.name);W[ie]=K.name,W[ce]=D.name,t.parameterOrders.set(r.ext,W);let te=$.scrollTop;qe(e,n,t,r,i);let ue=j.querySelector(`#${$.id}`);if(ue){ue.scrollTop=te;let J=`[data-parameter="${CSS.escape(D.name)}"]`;(ue.querySelector(`${J}[data-move="${z.dataset.move}"]:not(:disabled)`)??ue.querySelector(`${J}:not(:disabled)`))?.focus({preventScroll:!0})}}),N.append(z)}$.append(N)}_n(_,$,U=>{U?t.openSetting="parameters":t.openSetting==="parameters"&&(t.openSetting=void 0)}),B==="parameters"&&_.isConnected&&!_.disabled&&_.click()}let H=document.createElement("button");H.type="button",H.dataset.subformatFilters="",H.textContent=`${L("Filters")}${k.length?` (${k.length})`:""}`,r.resource&&(H.innerHTML=`${Ct('<path d="M3 5h14l-5 6v5l-4 2v-7Z"/>')}<span class="format-control-text">${L("Filters")}</span>${k.length?`<span class="format-filter-count">${k.length}</span>`:""}`,H.title=L("Filters"),H.setAttribute("aria-label",`${L("Filters")}${k.length?` (${k.length})`:""}`),H.setAttribute("aria-haspopup","dialog")),H.disabled=t.busy||!r.fields.length,H.setAttribute("aria-expanded",String(B==="filters")),H.setAttribute("aria-controls",`subformat-${t.id}-filters`),H.addEventListener("click",()=>{t.openSetting=t.openSetting==="filters"?void 0:"filters",qe(e,n,t,r,i),(e.querySelector("[data-filter-field]")??j.querySelector("[data-subformat-filters]"))?.focus()}),j.append(H);let le=j.querySelector(".format-display-fields:popover-open");if(le&&Go(j.querySelector("[data-format-display]"),le),e.querySelector(":scope > .subformat-filters")?.remove(),B==="filters"){let x=document.createElement("form");x.id=`subformat-${t.id}-filters`,x.className="subformat-filters",x.setAttribute("aria-label",L("Filters")),x.innerHTML=`<p>${L("Match all conditions")}</p><div data-filter-rows></div><div class="subformat-filter-actions"><button type="button" data-filter-add>${L("Add filter")}</button><button type="submit">${L("Apply filters")}</button><button type="button" data-filter-clear>${L("Clear")}</button></div><p class="err" role="alert"></p>`,e.insertBefore(x,n.parentElement?.classList.contains("format-gallery")?n.parentElement:n);let _=x.querySelector("[data-filter-rows]"),$=x.querySelector("[data-filter-add]"),U=([D,N,q="eq"])=>{let P=document.createElement("div");P.className="subformat-filter-row",P.innerHTML=`<label>${L("Field")}<select data-filter-field></select></label><label>${L("Operator")}<select data-filter-operator></select></label><label>${L("Value")}<input data-filter-value></label><button type="button" data-filter-remove>${L("Remove filter")}</button>`;let z=P.querySelector("[data-filter-field]"),K=P.querySelector("[data-filter-operator]"),W=P.querySelector("input");for(let te of r.fields)z.add(new Option(te.title,te.name));z.value=D,W.value=N;let ie=()=>{let te=r.fields.find(ue=>ue.name===z.value);if(K.replaceChildren(),te)for(let ue of di(te))K.add(new Option(L(ui[ue]),ue))},ce=()=>{W.placeholder=K.value==="in"?L("Comma-separated values"):K.value==="empty"?"true / false":""};ie(),K.value=q,ce(),z.addEventListener("change",()=>{ie(),ce()}),K.addEventListener("change",ce),P.querySelector("[data-filter-remove]")?.addEventListener("click",()=>{P.remove(),$.focus()}),_.append(P)};for(let D of k)U(D);$.addEventListener("click",()=>{let D=r.fields[0];D&&(U([D.name,""]),_.lastElementChild?.querySelector("select")?.focus())}),x.addEventListener("submit",D=>{D.preventDefault();let N=[..._.children].map(q=>[q.querySelector("[data-filter-field]").value,q.querySelector("[data-filter-value]").value,q.querySelector("[data-filter-operator]").value]);try{$s({filters:N},r.fields),t.filters.set(r.ext,N),t.openSetting=void 0,qe(e,n,t,r,i),j.querySelector("[data-subformat-filters]")?.focus()}catch(q){let P=x.querySelector("[role=alert]");P.textContent=q instanceof Error?q.message:String(q)}}),x.querySelector("[data-filter-clear]")?.addEventListener("click",()=>{t.filters.delete(r.ext),t.openSetting=void 0,qe(e,n,t,r,i),j.querySelector("[data-subformat-filters]")?.focus()}),r.resource&&(x.classList.add("subformat-picker-menu","format-filter-popover"),x.popover="auto",x.setAttribute("role","dialog"),x.addEventListener("beforetoggle",D=>{D.newState==="closed"&&x.isConnected&&(t.openSetting=void 0,H.setAttribute("aria-expanded","false"))}),x.addEventListener("keydown",D=>{D.key==="Escape"&&H.focus()}),x.showPopover(),Go(H,x))}if(!o&&t.openSource&&document.body.classList.contains("edit")&&!Et(t.workspace)?.readOnly){let x=document.createElement("button");x.type="button",x.dataset.subformatIcon="",x.textContent=L("SVG icon"),x.disabled=t.busy,x.setAttribute("aria-expanded",String(t.iconForm?.dataset.ext===r.ext)),j.append(x),x.addEventListener("click",()=>{if(t.busy)return;if(t.iconForm?.dataset.ext===r.ext){t.iconForm=void 0,qe(e,n,t,r,i),j.querySelector("[data-subformat-icon]")?.focus();return}let $=document.createElement("form");t.iconForm=$,$.className="subformat-icon-form",$.dataset.ext=r.ext,$.innerHTML=`<fieldset><label>${L("SVG icon path")}<input name="icon" placeholder="icons/${be(r.ext)}.svg" autocomplete="off" spellcheck="false"></label><p>${L("Leave empty to remove. New Pages entries copy this path; existing pages keep their own icon.")}</p><div class="subformat-create-actions"><button type="button" data-cancel>${L("Cancel")}</button><button type="submit">${L("Save")}</button></div></fieldset>`;let U=$.elements.namedItem("icon");U.value=r.icon??"";let D=r.icon??null;$.querySelector("[data-cancel]")?.addEventListener("click",()=>{j.querySelector("[data-subformat-icon]")?.click()}),$.addEventListener("submit",async N=>{if(N.preventDefault(),t.busy)return;t.busy=!0;let q=$.querySelector("fieldset");q.disabled=!0;try{let P=await t.fetch("/api/subformat",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({action:"icon",ext:r.ext,value:U.value.trim(),base:D})}),z=await P.json();if(!P.ok)throw new Error(L(z.error??"Save failed"));r.icon=z.icon,r.iconSvg=z.iconSvg,t.iconForm=void 0,document.dispatchEvent(new CustomEvent("docs:subformat-saved",{detail:{file:z.file,workspace:t.workspace}}))}catch(P){ot(P)}finally{t.busy=!1,q.disabled=!1,ut(e,i),(t.iconForm?.querySelector("input")??j.querySelector("[data-subformat-icon]"))?.focus()}}),qe(e,n,t,r,i),U.focus()});let _=document.createElement("button");_.type="button",_.dataset.subformatCreate="",_.textContent=L("Create"),_.disabled=t.busy,j.append(_),_.addEventListener("click",()=>{if(t.recordForm){document.dispatchEvent(new CustomEvent("docs:subformat-create",{detail:t.recordForm}));return}let $=document.createElement("form");t.recordForm=$,Br.add($),$.dataset.workspace=t.workspace,$.className="subformat-create-form",$.dataset.subformatRecord=r.format,$.setAttribute("aria-label",L("Create")),$.innerHTML=`<fieldset class="subformat-register-fields"><input name="file" required aria-label="${L("File path")}" autocomplete="off" spellcheck="false"></fieldset><fieldset><textarea name="content" hidden></textarea><div data-subformat-schema-editor></div><div class="subformat-create-actions"><button type="button" data-cancel>${L("Cancel")}</button><button type="submit">${L("Create")}</button></div></fieldset>`;let U=$.elements.namedItem("file"),D=$.elements.namedItem("content"),N=r.defaultFolder?`${r.defaultFolder}/`:(r.records[0]?.file??as(`new.${r.ext}`)).match(/^.*\//)?.[0]??"",q="new";for(let W=2;r.records.some(ie=>ie.file===`${N}${q}.${r.ext}`);W++)q=`new-${W}`;U.value=`${N}${q}.${r.ext}`,D.value=r.template??(r.format==="json"?`{}
|
|
102
|
-
`:""),$.addEventListener("input",()=>{$.dataset.dirty="true"});let P=()=>{t.recordForm=void 0,Br.delete($),document.dispatchEvent(new CustomEvent("docs:subformat-editor-close",{detail:$})),$.remove()},z=()=>{t.busy||(P(),e.querySelector("[data-subformat-create]")?.focus())};$.querySelector("[data-cancel]")?.addEventListener("click",z);let K=W=>{W.key==="Escape"&&!W.defaultPrevented&&(W.preventDefault(),W.stopPropagation(),z())};$.addEventListener("keydown",K),$.querySelector(".subformat-register-fields")?.addEventListener("keydown",W=>K(W)),$.addEventListener("submit",async W=>{if(W.preventDefault(),t.busy)return;let ie=U.value.trim();if(document.querySelector(".subformat-toast")?.remove(),!Qe(ie)||!ie.endsWith(`.${r.ext}`)){ot(new Error(`${L("File path")}: *.${r.ext}`)),U.focus();return}t.busy=!0,_.disabled=!0;let ce=[...$.elements].filter(ue=>ue instanceof HTMLFieldSetElement);for(let ue of ce)ue.disabled=!0;let te=$.querySelector("[data-subformat-schema-editor]");te&&(te.inert=!0);try{let ue=await t.fetch("/api/subformat",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({action:"create",file:ie,content:D.value})}),J=await ue.json();if(!ue.ok)throw new Error(L(J.error??"Save failed"));r.records.push({file:ie,content:J.content,data:J.data,change:"added",references:[]}),document.dispatchEvent(new CustomEvent("docs:subformat-saved",{detail:{file:ie,workspace:t.workspace}})),t.busy=!1,P(),ut(e,i),t.openSource?.(ie,1)}catch(ue){ot(ue)}finally{t.busy=!1;for(let ue of ce)ue.disabled=!1;te&&(te.inert=!1),_.disabled=!1}}),document.dispatchEvent(new CustomEvent("docs:subformat-create",{detail:$})),U.focus(),U.select()})}if(t.iconForm?.dataset.ext===r.ext&&j.append(t.iconForm),n.setAttribute("aria-busy",String(t.busy)),n.dataset.subformatView=c.view,c.view==="table"){n.innerHTML=Dl({...r,fields:C,records:Y},e.getAttribute("aria-label")??r.ext);for(let x of n.querySelectorAll("[data-subformat-record]"))t.openSource&&x.removeAttribute("aria-haspopup"),x.addEventListener("click",_=>{_.detail===0&&x.focus({preventScroll:!0});let $=Y[Number(x.dataset.subformatRecord)];$&&Ul(t,r,$,$.file)});return}n.innerHTML='<div class="subformat-columns"></div>';let ke=0,ve=n.querySelector(".subformat-columns"),g=!o&&!!t.openSource&&document.body.classList.contains("edit")&&!Et(t.workspace)?.readOnly&&!d?.readOnly,$e=!o&&!!t.openSource&&document.body.classList.contains("edit")&&!Et(t.workspace)?.readOnly,se=()=>{let x=e.querySelector("[data-resource-search]")?.value??"";ut(e,x.normalize("NFKC").toLowerCase().trim().split(/\s+/).filter(Boolean))},p=async(x,_,$)=>{if(!(t.busy||!$e||x.data[_]===$)){t.busy=!0;try{let U=await t.fetch("/api/subformat",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({file:x.file,base:x.content,field:_,value:$})}),D=await U.json();if(!U.ok)throw new Error(L(D.error??"Save failed"));x.content=D.content,x.data=D.data,x.change=x.change==="added"?"added":"modified",document.dispatchEvent(new CustomEvent("docs:subformat-saved",{detail:{file:x.file,workspace:t.workspace}}))}catch(U){ot(U)}finally{t.busy=!1,se()}}},ge=new Map,Ne=async(x,_)=>{if(t.busy||!d||!g||x.data[d.name]===_)return;let $=n.querySelector(`[data-record-file="${CSS.escape(x.file)}"]`),U=ge.get(_);if(!$||!U)return;let D=zo(n),N=n.querySelector(".subformat-drag-preview");N&&!N.hidden&&D.set($,N.getBoundingClientRect()),t.busy=!0,document.querySelector(".subformat-toast")?.remove(),t.stopDrag?.(),n.setAttribute("aria-busy","true");for(let W of e.querySelectorAll(".subformat-controls button, .subformat-card select"))W.disabled=!0;let q={...x,data:{...x.data,[d.name]:_}},P=mi(Y.map(W=>W===x?q:W).filter(W=>W.data[d.name]===_),f,O),z=P[P.indexOf(q)+1];U.insertBefore($,z?U.querySelector(`[data-record-file="${CSS.escape(z.file)}"]`):null);let K=Uo(D);try{let W=await t.fetch("/api/subformat",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({file:x.file,base:x.content,field:d.name,value:_})}),ie=await W.json();if(!W.ok)throw new Error(L(ie.error??"Save failed"));x.content=ie.content,x.data=ie.data,x.change=x.change==="added"?"added":"modified",document.dispatchEvent(new CustomEvent("docs:subformat-saved",{detail:{file:x.file,workspace:t.workspace}}))}catch(W){ot(W)}finally{await K;let W=new Map([...zo(n)].map(([ce,te])=>[ce.dataset.recordFile,te]));t.busy=!1;let ie=e.querySelector("[data-resource-search]")?.value??"";if(ut(e,ie.normalize("NFKC").toLowerCase().trim().split(/\s+/).filter(Boolean)),Uo(new Map([...zo(n)].map(([ce,te])=>[ce,W.get(ce.dataset.recordFile)??te]))),document.activeElement===document.body){let ce=n.querySelector(`[data-record-file="${CSS.escape(x.file)}"]`);(ce?.querySelector(".subformat-card-details:not([hidden]) select")??ce?.querySelector(".subformat-card-open"))?.focus({preventScroll:!0})}}},Ve=d?[...d.enum??[],void 0]:[void 0];for(let x of Ve){let _=d?Y.filter(N=>N.data[d.name]===x):Y;if(d&&x===void 0&&!_.length)continue;let $=document.createElement("section");$.className="subformat-column";let U=d?x===void 0?L("Unassigned"):String(x):L("Records");$.setAttribute("aria-label",U),(!o||d)&&c.view!=="list"&&($.innerHTML=`<h2>${be(U)} <span class="subformat-count">${bh(_)}</span></h2>`);let D=document.createElement("div");D.className="subformat-cards",c.view==="grid"&&D.style.setProperty("--format-columns",String(c.columns??3)),c.view==="list"&&D.setAttribute("role","list"),$.append(D),ge.set(x,D),g&&x!==void 0&&(D.addEventListener("dragover",N=>{let q=r.records.find(P=>P.file===t.dragging);t.busy||!d||!q||(N.preventDefault(),N.dataTransfer&&(N.dataTransfer.dropEffect="move"),D.classList.toggle("is-drop-target",q.data[d.name]!==x))}),D.addEventListener("drop",N=>{N.preventDefault(),D.classList.remove("is-drop-target");let q=r.records.find(P=>P.file===t.dragging);q&&Ne(q,x)}));for(let N of _){let q=r.resource?JSON.stringify(N.data):N.file,P=document.createElement("article");P.className="subformat-card";let z=r.resource&&c.view!=="list";z&&P.classList.add("format-card"),c.view==="list"&&(P.classList.add("subformat-list-record"),P.setAttribute("role","listitem")),P.dataset.recordFile=N.file,N.change&&(P.dataset.recordChange=N.change);let K=h&&Object.hasOwn(N.data,h)?N.data[h]:void 0,W=K==null?N.file.split("/").at(-1)??N.file:typeof K=="object"?JSON.stringify(K):String(K),ie=C.filter(T=>T!==d&&T.name!==h&&(!z||!["format","folder"].includes(T.name))&&Object.hasOwn(N.data,T.name)),ce=$e?C.filter(T=>T!==d&&T.name!==h&&!T.readOnly&&(T.enum?.length||T.options?.length)):[],te=c.view==="list"?ie:ie.filter(T=>typeof N.data[T.name]!="object").sort((T,G)=>+!!G.format-+!!T.format).slice(0,3),ue=z?"":`<dl class="subformat-card-meta">${te.map(T=>Ko(T.title,N.data[T.name])).join("")}</dl>`,J=t.expanded.has(q)&&(!z||ie.length>0),Ee=`subformat-${t.id}-details-${encodeURIComponent(q)}`,Lt=N.references??[],Dn=`subformat-${t.id}-references-${encodeURIComponent(q)}`,Hr=Lt.map(({file:T,line:G,href:oe})=>`<li><a href="${be(oe?`${l?"#":""}${oe}`:`/_files/file/${encodeURIComponent(T)}#L${G}`)}" data-resource-source="${be(T)}" data-resource-line="${G}" draggable="false"><span>${be(T)}</span><span>L${G}</span></a></li>`).join(""),E=Ts(N.file,document.body.dataset.sourceBase);P.innerHTML=`<div class="subformat-card-tools"><span class="subformat-card-file">${be(N.file.split("/").at(-1)??N.file)}</span><button type="button" class="subformat-card-toggle" aria-expanded="${J}" aria-controls="${Ee}" aria-label="${L(J?"Collapse card":"Expand card")}"><svg width="16" height="16" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m5 7 5 5 5-5"/></svg></button><button type="button" class="subformat-card-references" popovertarget="${Dn}" aria-label="${be(`${L("references")}: ${Lt.length}`)}"${Lt.length?"":" disabled"}><svg width="12" height="12" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" aria-hidden="true"><path d="M4 2h8l4 4v12H4zM12 2v4h4M7 10h6M7 13h6"/></svg>${Lt.length}</button><button type="button" class="subformat-card-copy" aria-label="${L("Copy path")}"><svg width="14" height="14" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round" aria-hidden="true"><path d="m8 12 4-4m-5 2L5 12a3 3 0 0 0 4 4l2-2m-2-8 2-2a3 3 0 0 1 4 4l-2 2"/></svg>${xn}</button></div><div id="${Dn}" class="subformat-reference-list" popover="auto" aria-label="${L("references")}"><ul>${Hr}</ul></div><h3><button type="button" class="subformat-card-open"${t.openSource?"":' aria-haspopup="dialog"'}>${be(W)}</button></h3>${ue}<div class="subformat-card-details" id="${Ee}"${J?"":" hidden"}><dl>${ie.filter(T=>!ce.includes(T)).map(T=>Ko(T.title,N.data[T.name])).join("")}</dl></div>`;let I=P.querySelector(".subformat-card-copy"),X=P.querySelector(".subformat-card-tools"),ee=P.querySelector("h3");if(z){let T=document.createElement("header");T.className="format-card-header";let G=document.createElement("span");G.className="format-card-format",G.textContent=String(N.data.format),X.querySelector(".subformat-card-file")?.remove(),T.append(ee,G,X),P.prepend(T),ee.querySelector(".subformat-card-open")?.setAttribute("title",N.file),ee=T}let Me=t.previews.get(JSON.stringify(N.data));if(Me){let T=Me.cloneNode(!0);if(T.className="format-preview",c.view==="list"){P.classList.add("format-list-record"),T.classList.add("format-list-preview"),T.inert=!0;for(let G of T.querySelectorAll("video"))G.controls=!1}if(r.resource){for(let G of T.querySelectorAll(".downloadable-resource")){let oe=G.querySelector(":scope > .resource-download-tools");if(!oe)continue;G.id=`format-${t.id}-preview-${++ke}`;let ye=oe.querySelector("[data-resource-expand]");ye&&(ye.dataset.resourceExpand=G.id,ye.setAttribute("aria-controls",G.id)),X.append(...oe.children),oe.remove()}for(let G of T.querySelectorAll(".codeblk-head > [data-resource-download]"))X.append(G)}ee.after(T)}!r.resource&&(document.body.classList.contains("edit")||document.body.dataset.download==="easy")&&I.insertAdjacentHTML("afterend",_l(N.file,document.body.classList.contains("edit")?`/api/download?file=${encodeURIComponent(N.file)}`:`data:application/octet-stream;charset=utf-8,${encodeURIComponent(N.content)}`)),I.addEventListener("click",async()=>{try{await navigator.clipboard.writeText(E),I.dataset.copied="true",setTimeout(()=>delete I.dataset.copied,1500)}catch{ot(new Error(L("Copy failed")))}});let fe=P.querySelector(".subformat-reference-list"),Te=P.querySelector(".subformat-card-references");Te.hidden=o,fe.addEventListener("toggle",()=>{if(!fe.matches(":popover-open"))return;let T=Te.getBoundingClientRect(),G=innerHeight-T.bottom,oe=G<240&&T.top>G;Object.assign(fe.style,{left:`${Math.max(8,Math.min(T.right-fe.offsetWidth,innerWidth-fe.offsetWidth-8))}px`,maxHeight:`${Math.max(80,Math.min(320,(oe?T.top:G)-12))}px`,top:oe?"auto":`${T.bottom+4}px`,bottom:oe?`${innerHeight-T.top+4}px`:"auto"})}),fe.addEventListener("click",T=>{T.target.closest("a")&&fe.hidePopover()});let Oe=P.querySelector(".subformat-card-details"),De=P.querySelector(".subformat-card-meta");if(c.view==="list"&&De){let T=P.querySelector(".subformat-card-file");T.textContent=N.file,Oe.prepend(T),De.tabIndex=0,De.setAttribute("role","region"),De.setAttribute("aria-label",`${L("Parameters")}: ${W}`)}De&&(De.hidden=J);let Ye=P.querySelector(".subformat-card-toggle");z&&!ie.length&&(Ye.hidden=!0),Ye.addEventListener("click",()=>{let T=Oe.hidden;Oe.hidden=!T,De&&(De.hidden=T),T?t.expanded.add(q):t.expanded.delete(q),Ye.setAttribute("aria-expanded",String(T)),Ye.setAttribute("aria-label",L(T?"Collapse card":"Expand card"))});let dt=0,jn=T=>T instanceof Element&&(!T.closest("a, button, input, select, textarea, .subformat-card-meta[tabindex]")||!!T.closest(".subformat-card-open"));if(P.addEventListener("click",T=>{if(t.dragging||Date.now()<dt){T.preventDefault(),T.stopImmediatePropagation();return}T.target.closest(".subformat-reference-list")||!jn(T.target)||(T.detail===0&&P.querySelector(".subformat-card-open")?.focus({preventScroll:!0}),Ul(t,r,N,W))},!0),P.draggable=!!d&&g&&!t.busy,P.addEventListener("dragstart",T=>{if(!P.draggable||t.busy||!T.dataTransfer||T.target.closest(".subformat-reference-list")){T.preventDefault();return}t.dragging=N.file,T.dataTransfer.effectAllowed="move",T.dataTransfer.setData("application/x-dooc-record",N.file);let G=P.getBoundingClientRect(),oe=P.cloneNode(!0);oe.classList.add("subformat-drag-preview"),oe.hidden=!0,oe.setAttribute("aria-hidden","true"),oe.inert=!0,delete oe.dataset.recordFile;for(let ft of oe.querySelectorAll("[id]"))ft.removeAttribute("id");Object.assign(oe.style,{left:`${G.left}px`,top:`${G.top}px`,width:`${G.width}px`,height:`${G.height}px`,borderColor:getComputedStyle(P).borderColor});let ye=document.createElement("canvas");ye.width=ye.height=1,T.dataTransfer.setDragImage(ye,0,0),D.append(oe);let Je=0,zt=0,At=0,qn=()=>{At=0,P.classList.add("is-dragging"),oe.hidden=!1,oe.style.transform=`translate(${Je}px, ${zt}px)`},Wo=ft=>{Je=ft.clientX-T.clientX,zt=ft.clientY-T.clientY,At||(At=requestAnimationFrame(qn));let zr=ft.target.closest?.(".subformat-cards");for(let Yo of ve.querySelectorAll(".is-drop-target"))Yo!==zr&&Yo.classList.remove("is-drop-target")},$t=()=>{cancelAnimationFrame(At);let ft=oe.hidden?void 0:oe.getBoundingClientRect();oe.remove(),t.dragging=void 0,t.stopDrag=void 0,dt=Date.now()+250,P.classList.remove("is-dragging");for(let zr of ve.querySelectorAll(".is-drop-target"))zr.classList.remove("is-drop-target");document.removeEventListener("dragover",Wo,!0),document.removeEventListener("drop",$t),document.removeEventListener("dragend",$t,!0),P.removeEventListener("dragend",$t),!t.busy&&ft&&Uo(new Map([[P,ft]]))};t.stopDrag=$t,document.addEventListener("dragover",Wo,!0),document.addEventListener("drop",$t),document.addEventListener("dragend",$t,!0),P.addEventListener("dragend",$t),At=requestAnimationFrame(qn)}),d&&g){let T=document.createElement("label");T.textContent=d.title;let G=document.createElement("select");G.disabled=!g||t.busy,Object.hasOwn(N.data,d.name)||G.add(new Option(L("Unassigned"),"",!0,!0)),d.enum?.forEach((oe,ye)=>{G.add(new Option(String(oe),String(ye),!1,N.data[d.name]===oe))}),G.addEventListener("change",()=>{G.value!==""&&Ne(N,d.enum?.[Number(G.value)])}),T.append(G),Oe.append(T)}for(let T of ce){let G=N.data[T.name],oe=[...T.enum??T.options??[]];G!==void 0&&!oe.includes(G)&&oe.unshift(G);let ye=document.createElement("label");ye.textContent=T.title;let Je=document.createElement("select");Je.disabled=t.busy,G===void 0&&Je.add(new Option(L("Unassigned"),"",!0,!0)),oe.forEach((zt,At)=>{let qn=T.options?String(zt).split("/").at(-1):String(zt);Je.add(new Option(qn,String(At),!1,G===zt))}),Je.addEventListener("change",()=>{Je.value!==""&&p(N,T.name,oe[Number(Je.value)])}),ye.append(Je),Oe.append(ye)}D.append(P)}ve.append($)}o&&!Y.length&&(ve.innerHTML=`<p>${L("No results")}</p>`),ve.scrollLeft=a};var Gl=e=>{document.body.classList.contains("edit")&&Vl(),document.addEventListener("change",s=>{let a=s.target;if(!(a instanceof HTMLSelectElement)||!a.matches("[data-format-path]"))return;let l=document.createElement("a");l.href=`/_format${a.value?`/${a.value}`:""}`,l.hidden=!0,a.after(l),l.click(),l.remove()});let n=s=>{let a=s.target;if(!(a instanceof Element)||!a.matches("[data-resource-search], [data-resource-filter], [data-subformat-page]"))return;let l=a.closest("[data-resource-results], [data-subformat-embed]");if(!l)return;let u=l.querySelector("[data-resource-search]")?.value.normalize("NFKC").toLowerCase().trim().split(/\s+/).filter(Boolean)??[],c=l.querySelector("[data-resource-filter]")?.value??"";if(ut(l,u,e))return;let d=0;for(let h of l.querySelectorAll("[data-resource-item]")){let b=h.textContent?.normalize("NFKC").toLowerCase()??"";h.hidden=!!c&&h.dataset.resourceGroup!==c||!u.every(w=>b.includes(w)),h.hidden||d++}let m=l.querySelector("[data-resource-count]");m&&(m.textContent=String(d));let f=l.querySelector("[data-resource-empty]");f&&(f.hidden=d>0)};document.addEventListener("input",n),document.addEventListener("change",n);for(let s of document.querySelectorAll("[data-resource-filter]"))s.dispatchEvent(new Event("change",{bubbles:!0}));let t=()=>{for(let s of document.querySelectorAll("[data-subformat-page]"))ut(s,[],e)};t(),document.addEventListener("docs:page-shown",t);let r=new WeakSet,i=s=>{let a=[...s.querySelectorAll("[data-subformat-embed]")];s instanceof HTMLElement&&s.matches("[data-subformat-embed]")&&a.unshift(s);for(let l of a)r.has(l)||(r.add(l),ut(l,[],e))};i(document),new MutationObserver(s=>{for(let a of s)for(let l of a.addedNodes)l instanceof HTMLElement&&i(l)}).observe(document.body,{childList:!0,subtree:!0});let o;document.addEventListener("click",s=>{let l=s.target.closest?.(".subformat-reference-list a")?.closest("[data-record-file]")?.dataset.recordFile;if(!l)return;let u=CSS.escape(l),c=CSS.escape(l.split("/").map(encodeURIComponent).join("/"));clearInterval(o);let d=0;o=window.setInterval(()=>{let m=[...document.querySelectorAll(`main .codeblk[title="${u}"], main .subformat-embed [data-record-file="${u}"], main a[href$="${u}"], main a[href$="${c}"]`)].filter(f=>!f.closest("[data-resource-results]"));if(!(!m.length&&++d<50)){clearInterval(o),m[0]?.scrollIntoView({block:"center"});for(let f of m)f.classList.remove("search-flash"),f.offsetWidth,f.classList.add("search-flash"),setTimeout(()=>f.classList.remove("search-flash"),2600)}},100)}),e&&document.addEventListener("click",s=>{if(s.defaultPrevented||s.button!==0||s.metaKey||s.ctrlKey||s.shiftKey||s.altKey)return;let a=s.target.closest("[data-resource-source]");a?.dataset.resourceSource&&(s.preventDefault(),e(a.dataset.resourceSource,Number(a.dataset.resourceLine)||1))})};os();Gl();})();
|
|
101
|
+
`;break}case-2:{s=n?" ":" ";break}case-1:{if(!n&&i)continue;s=" ";break}default:s=String.fromCharCode(o)}i=o===-2,r.push(s)}return r.join("")}function Co(e){let r={constructs:xr([Eo,...(e||{}).extensions||[]]),content:i(ol),defined:[],document:i(al),flow:i(ll),lazy:{},string:i(ul),text:i(dl)};return r;function i(o){return s;function s(a){return hl(r,o,a)}}}function Lo(e){for(;!Ar(e););return e}var pl=/[\0\t\n\r]/g;function Ao(){let e=1,n="",t=!0,r;return i;function i(o,s,a){o=n+(typeof o=="string"?o.toString():new TextDecoder(s||void 0).decode(o));let l=[],u=0;for(n="",t&&(o.charCodeAt(0)===65279&&u++,t=void 0);u<o.length;){pl.lastIndex=u;let c=pl.exec(o),d=c&&c.index!==void 0?c.index:o.length,m=o.charCodeAt(d);if(!c){n=o.slice(u);break}if(m===10&&u===d&&r)l.push(-3),r=void 0;else switch(r&&(l.push(-5),r=void 0),u<d&&(l.push(o.slice(u,d)),e+=d-u),m){case 0:{l.push(65533),e++;break}case 9:{let f=Math.ceil(e/4)*4;for(l.push(-2);e++<f;)l.push(-1);break}case 10:{l.push(-4),e=1;break}default:r=!0,e=1}u=d+1}return a&&(r&&l.push(-5),n&&l.push(n),l.push(null)),l}}function vt(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?gl(e.position):"start"in e||"end"in e?gl(e):"line"in e||"column"in e?$o(e):""}function $o(e){return bl(e&&e.line)+":"+bl(e&&e.column)}function gl(e){return $o(e&&e.start)+"-"+$o(e&&e.end)}function bl(e){return e&&typeof e=="number"?e:1}var wl={}.hasOwnProperty;function Mo(e,n,t){return n&&typeof n=="object"&&(t=n,n=void 0),Ym(t)(Lo(Co(t).document().write(Ao()(e,n,!0))))}function Ym(e){let n={afterExit:[],beforeEnter:[],transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(te),autolinkProtocol:v,autolinkEmail:v,atxHeading:s(G),blockQuote:s(D),characterEscape:v,characterReference:v,codeFenced:s(N),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:s(N,a),codeText:s(q,a),codeTextData:v,data:v,codeFlowValue:v,definition:s(P),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:s(z),hardBreakEscape:s(K),hardBreakTrailing:s(K),htmlFlow:s(oe,a),htmlFlowData:v,htmlText:s(oe,a),htmlTextData:v,image:s(ce),label:a,link:s(te),listItem:s(Y),listItemValue:f,listOrdered:s(ue,m),listUnordered:s(ue),paragraph:s(Ee),reference:ge,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:s(G),strong:s(Lt),thematicBreak:s(Hr)},exit:{atxHeading:u(),atxHeadingSequence:S,autolink:u(),autolinkEmail:U,autolinkProtocol:$,blockQuote:u(),characterEscapeValue:ie,characterReferenceMarkerHexadecimal:Ge,characterReferenceMarkerNumeric:Ge,characterReferenceValue:x,characterReference:_,codeFenced:u(y),codeFencedFence:w,codeFencedFenceInfo:h,codeFencedFenceMeta:b,codeFlowValue:ie,codeIndented:u(C),codeText:u(H),codeTextData:ie,data:ie,definition:u(),definitionDestinationString:R,definitionLabelString:k,definitionTitleString:O,emphasis:u(),hardBreakEscape:u(B),hardBreakTrailing:u(B),htmlFlow:u(Z),htmlFlowData:ie,htmlText:u(A),htmlTextData:ie,image:u(ke),label:g,labelText:ve,lineEnding:j,link:u(le),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:Ne,resourceDestinationString:$e,resourceTitleString:se,resource:p,setextHeading:u(pe),setextHeadingLineSequence:W,setextHeadingText:M,strong:u(),thematicBreak:u()}};kl(n,(e||{}).mdastExtensions||[]);let t={};return r;function r(E){let I={type:"root",children:[],position:void 0},X={stack:[I],tokenStack:[],config:n,enter:l,exit:c,buffer:a,resume:d,data:t},ee=[],Me=[],fe=-1;for(;++fe<E.length;)if(Me.push(E[fe]),E[fe][1].type==="listOrdered"||E[fe][1].type==="listUnordered")if(E[fe][0]==="enter")ee.push(Me.length-1);else{let Te=ee.pop();o(Me,Te)}for(E=Me,fe=-1;++fe<E.length;){let Te=n[E[fe][0]];E[fe][0]==="enter"&&n.beforeEnter.length>0&&i(n.beforeEnter,{...X,sliceSerialize:E[fe][2].sliceSerialize},E[fe][1]),wl.call(Te,E[fe][1].type)&&Te[E[fe][1].type].call({...X,sliceSerialize:E[fe][2].sliceSerialize},E[fe][1]),E[fe][0]==="exit"&&n.afterExit.length>0&&i(n.afterExit,{...X,sliceSerialize:E[fe][2].sliceSerialize},E[fe][1])}if(X.tokenStack.length>0){let Te=X.tokenStack[X.tokenStack.length-1];(Te[1]||yl).call(X,void 0,Te[0])}for(I.position={start:St(E.length>0?E[0][1].start:{line:1,column:1,offset:0}),end:St(E.length>0?E[E.length-2][1].end:{line:1,column:1,offset:0})},fe=-1;++fe<n.transforms.length;)I=n.transforms[fe](I)||I;return I}function i(E,I,X){let ee=-1;for(;++ee<E.length;)E[ee].call(I,X)}function o(E,I){let X=E.length-1,ee=I-1,Me=-1,fe=!1,Te,Oe,De,Je,dt=[];for(;++ee<=X;){let J=E[ee];switch(J[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{J[0]==="enter"?Me++:Me--,Je=void 0;break}case"lineEndingBlank":{J[0]==="enter"&&(Te&&!Je&&!Me&&!De&&(De=ee),Je=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Je=void 0}if(!Me&&J[0]==="enter"&&J[1].type==="listItemPrefix"||Me===-1&&J[0]==="exit"&&(J[1].type==="listUnordered"||J[1].type==="listOrdered")){if(Te){let ne=ee;for(Oe=void 0;ne--;){let ye=E[ne];if(ye[1].type==="lineEnding"||ye[1].type==="lineEndingBlank"){if(ye[0]==="exit")continue;Oe&&(E[Oe][1].type="lineEndingBlank",fe=!0),ye[1].type="lineEnding",Oe=ne}else if(!(ye[1].type==="linePrefix"||ye[1].type==="blockQuotePrefix"||ye[1].type==="blockQuotePrefixWhitespace"||ye[1].type==="blockQuoteMarker"||ye[1].type==="listItemIndent"))break}De&&(!Oe||De<Oe)&&(Te._spread=!0),Te.end=Object.assign({},Oe?E[Oe][1].start:J[1].end),dt.push({at:Oe||ee,event:["exit",Te,J[2]]})}if(J[1].type==="listItemPrefix"){let ne={type:"listItem",_spread:!1,start:Object.assign({},J[1].start),end:void 0};Te=ne,dt.push({at:ee,event:["enter",ne,J[2]]}),De=void 0,Je=!0}}}let jn=E.splice(I),T=0;for(ee=-1;++ee<jn.length;){for(;T<dt.length&&dt[T].at===I+ee;)E.push(dt[T++].event);E.push(jn[ee])}E[I][1]._spread=fe}function s(E,I){return X;function X(ee){l.call(this,E(ee),ee),I&&I.call(this,ee)}}function a(){this.stack.push({type:"fragment",children:[]})}function l(E,I,X){this.stack[this.stack.length-1].children.push(E),this.stack.push(E),this.tokenStack.push([I,X||void 0]),E.position={start:St(I.start),end:void 0}}function u(E){return I;function I(X){E&&E.call(this,X),c.call(this,X)}}function c(E,I){let X=this.stack.pop(),ee=this.tokenStack.pop();if(!ee)throw new Error("Cannot close `"+E.type+"` ("+vt({start:E.start,end:E.end})+"): it\u2019s not open");ee[0].type!==E.type&&(I?I.call(this,E,ee[0]):(ee[1]||yl).call(this,E,ee[0])),X.position.end=St(E.end)}function d(){return Dt(this.stack.pop())}function m(){this.data.expectingFirstListItemValue=!0}function f(E){if(this.data.expectingFirstListItemValue){let I=this.stack[this.stack.length-2];I.start=Number.parseInt(this.sliceSerialize(E),10),this.data.expectingFirstListItemValue=void 0}}function h(){let E=this.resume(),I=this.stack[this.stack.length-1];I.lang=E}function b(){let E=this.resume(),I=this.stack[this.stack.length-1];I.meta=E}function w(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function y(){let E=this.resume(),I=this.stack[this.stack.length-1];I.value=E.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function C(){let E=this.resume(),I=this.stack[this.stack.length-1];I.value=E.replace(/(\r?\n|\r)$/g,"")}function k(E){let I=this.resume(),X=this.stack[this.stack.length-1];X.label=I,X.identifier=Pe(this.sliceSerialize(E)).toLowerCase()}function O(){let E=this.resume(),I=this.stack[this.stack.length-1];I.title=E}function R(){let E=this.resume(),I=this.stack[this.stack.length-1];I.url=E}function S(E){let I=this.stack[this.stack.length-1];if(!I.depth){let X=this.sliceSerialize(E).length;I.depth=X}}function M(){this.data.setextHeadingSlurpLineEnding=!0}function W(E){let I=this.stack[this.stack.length-1];I.depth=this.sliceSerialize(E).codePointAt(0)===61?1:2}function pe(){this.data.setextHeadingSlurpLineEnding=void 0}function v(E){let X=this.stack[this.stack.length-1].children,ee=X[X.length-1];(!ee||ee.type!=="text")&&(ee=Dn(),ee.position={start:St(E.start),end:void 0},X.push(ee)),this.stack.push(ee)}function ie(E){let I=this.stack.pop();I.value+=this.sliceSerialize(E),I.position.end=St(E.end)}function j(E){let I=this.stack[this.stack.length-1];if(this.data.atHardBreak){let X=I.children[I.children.length-1];X.position.end=St(E.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&n.canContainEols.includes(I.type)&&(v.call(this,E),ie.call(this,E))}function B(){this.data.atHardBreak=!0}function Z(){let E=this.resume(),I=this.stack[this.stack.length-1];I.value=E}function A(){let E=this.resume(),I=this.stack[this.stack.length-1];I.value=E}function H(){let E=this.resume(),I=this.stack[this.stack.length-1];I.value=E}function le(){let E=this.stack[this.stack.length-1];if(this.data.inReference){let I=this.data.referenceType||"shortcut";E.type+="Reference",E.referenceType=I,delete E.url,delete E.title}else delete E.identifier,delete E.label;this.data.referenceType=void 0}function ke(){let E=this.stack[this.stack.length-1];if(this.data.inReference){let I=this.data.referenceType||"shortcut";E.type+="Reference",E.referenceType=I,delete E.url,delete E.title}else delete E.identifier,delete E.label;this.data.referenceType=void 0}function ve(E){let I=this.sliceSerialize(E),X=this.stack[this.stack.length-2];X.label=Ha(I),X.identifier=Pe(I).toLowerCase()}function g(){let E=this.stack[this.stack.length-1],I=this.resume(),X=this.stack[this.stack.length-1];if(this.data.inReference=!0,X.type==="link"){let ee=E.children;X.children=ee}else X.alt=I}function $e(){let E=this.resume(),I=this.stack[this.stack.length-1];I.url=E}function se(){let E=this.resume(),I=this.stack[this.stack.length-1];I.title=E}function p(){this.data.inReference=void 0}function ge(){this.data.referenceType="collapsed"}function Ne(E){let I=this.resume(),X=this.stack[this.stack.length-1];X.label=I,X.identifier=Pe(this.sliceSerialize(E)).toLowerCase(),this.data.referenceType="full"}function Ge(E){this.data.characterReferenceType=E.type}function x(E){let I=this.sliceSerialize(E),X=this.data.characterReferenceType,ee;X?(ee=kr(I,X==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):ee=cn(I);let Me=this.stack[this.stack.length-1];Me.value+=ee}function _(E){let I=this.stack.pop();I.position.end=St(E.end)}function $(E){ie.call(this,E);let I=this.stack[this.stack.length-1];I.url=this.sliceSerialize(E)}function U(E){ie.call(this,E);let I=this.stack[this.stack.length-1];I.url="mailto:"+this.sliceSerialize(E)}function D(){return{type:"blockquote",children:[],position:void 0}}function N(){return{type:"code",lang:null,meta:null,value:"",position:void 0}}function q(){return{type:"inlineCode",value:"",position:void 0}}function P(){return{type:"definition",identifier:"",label:null,title:null,url:"",position:void 0}}function z(){return{type:"emphasis",children:[],position:void 0}}function G(){return{type:"heading",depth:0,children:[],position:void 0}}function K(){return{type:"break",position:void 0}}function oe(){return{type:"html",value:"",position:void 0}}function ce(){return{type:"image",title:null,url:"",alt:null,position:void 0}}function te(){return{type:"link",title:null,url:"",children:[],position:void 0}}function ue(E){return{type:"list",ordered:E.type==="listOrdered",start:null,spread:E._spread,children:[],position:void 0}}function Y(E){return{type:"listItem",spread:E._spread,checked:null,children:[],position:void 0}}function Ee(){return{type:"paragraph",children:[],position:void 0}}function Lt(){return{type:"strong",children:[],position:void 0}}function Dn(){return{type:"text",value:"",position:void 0}}function Hr(){return{type:"thematicBreak",position:void 0}}}function St(e){return{line:e.line,column:e.column,offset:e.offset}}function kl(e,n){let t=-1;for(;++t<n.length;){let r=n[t];Array.isArray(r)?kl(e,r):Jm(e,r)}}function Jm(e,n){let t;for(t in n)if(wl.call(n,t))switch(t){case"canContainEols":{let r=n[t];r&&e[t].push(...r);break}case"transforms":{let r=n[t];r&&e[t].push(...r);break}case"afterExit":case"beforeEnter":{let r=n[t];r&&e[t].push(r);break}case"enter":case"exit":{let r=n[t];r&&Object.assign(e[t],r);break}}}function yl(e,n){throw e?new Error("Cannot close `"+e.type+"` ("+vt({start:e.start,end:e.end})+"): a different token (`"+n.type+"`, "+vt({start:n.start,end:n.end})+") is open"):new Error("Cannot close document, a token (`"+n.type+"`, "+vt({start:n.start,end:n.end})+") is still open")}function Pr(e){let n=this;n.parser=t;function t(r){return Mo(r,{...n.data("settings"),...e,extensions:n.data("micromarkExtensions")||[],mdastExtensions:n.data("fromMarkdownExtensions")||[]})}}function To(e){if(e)throw e}var Dr=Qo(Ml(),1);function Rn(e){if(typeof e!="object"||e===null)return!1;let n=Object.getPrototypeOf(e);return(n===null||n===Object.prototype||Object.getPrototypeOf(n)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Io(){let e=[],n={run:t,use:r};return n;function t(...i){let o=-1,s=i.pop();if(typeof s!="function")throw new TypeError("Expected function as last argument, not "+s);a(null,...i);function a(l,...u){let c=e[++o],d=-1;if(l){s(l);return}for(;++d<i.length;)(u[d]===null||u[d]===void 0)&&(u[d]=i[d]);i=u,c?Tl(c,a)(...u):s(null,...u)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),n}}function Tl(e,n){let t;return r;function r(...s){let a=e.length>s.length,l;a&&s.push(i);try{l=e.apply(this,s)}catch(u){let c=u;if(a&&t)throw c;return i(c)}a||(l&&l.then&&typeof l.then=="function"?l.then(o,i):l instanceof Error?i(l):o(l))}function i(s,...a){t||(t=!0,n(s,...a))}function o(s){i(null,s)}}var Ae=class extends Error{constructor(n,t,r){super(),typeof t=="string"&&(r=t,t=void 0);let i="",o={},s=!1;if(t&&("line"in t&&"column"in t?o={place:t}:"start"in t&&"end"in t?o={place:t}:"type"in t?o={ancestors:[t],place:t.position}:o={...t}),typeof n=="string"?i=n:!o.cause&&n&&(s=!0,i=n.message,o.cause=n),!o.ruleId&&!o.source&&typeof r=="string"){let l=r.indexOf(":");l===-1?o.ruleId=r:(o.source=r.slice(0,l),o.ruleId=r.slice(l+1))}if(!o.place&&o.ancestors&&o.ancestors){let l=o.ancestors[o.ancestors.length-1];l&&(o.place=l.position)}let a=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=a?a.line:void 0,this.name=vt(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=s&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};Ae.prototype.file="";Ae.prototype.name="";Ae.prototype.reason="";Ae.prototype.message="";Ae.prototype.stack="";Ae.prototype.column=void 0;Ae.prototype.line=void 0;Ae.prototype.ancestors=void 0;Ae.prototype.cause=void 0;Ae.prototype.fatal=void 0;Ae.prototype.place=void 0;Ae.prototype.ruleId=void 0;Ae.prototype.source=void 0;var Ye={basename:Qm,dirname:Xm,extname:Zm,join:eh,sep:"/"};function Qm(e,n){if(n!==void 0&&typeof n!="string")throw new TypeError('"ext" argument must be a string');Pn(e);let t=0,r=-1,i=e.length,o;if(n===void 0||n.length===0||n.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(o){t=i+1;break}}else r<0&&(o=!0,r=i+1);return r<0?"":e.slice(t,r)}if(n===e)return"";let s=-1,a=n.length-1;for(;i--;)if(e.codePointAt(i)===47){if(o){t=i+1;break}}else s<0&&(o=!0,s=i+1),a>-1&&(e.codePointAt(i)===n.codePointAt(a--)?a<0&&(r=i):(a=-1,r=s));return t===r?r=s:r<0&&(r=e.length),e.slice(t,r)}function Xm(e){if(Pn(e),e.length===0)return".";let n=-1,t=e.length,r;for(;--t;)if(e.codePointAt(t)===47){if(r){n=t;break}}else r||(r=!0);return n<0?e.codePointAt(0)===47?"/":".":n===1&&e.codePointAt(0)===47?"//":e.slice(0,n)}function Zm(e){Pn(e);let n=e.length,t=-1,r=0,i=-1,o=0,s;for(;n--;){let a=e.codePointAt(n);if(a===47){if(s){r=n+1;break}continue}t<0&&(s=!0,t=n+1),a===46?i<0?i=n:o!==1&&(o=1):i>-1&&(o=-1)}return i<0||t<0||o===0||o===1&&i===t-1&&i===r+1?"":e.slice(i,t)}function eh(...e){let n=-1,t;for(;++n<e.length;)Pn(e[n]),e[n]&&(t=t===void 0?e[n]:t+"/"+e[n]);return t===void 0?".":th(t)}function th(e){Pn(e);let n=e.codePointAt(0)===47,t=nh(e,!n);return t.length===0&&!n&&(t="."),t.length>0&&e.codePointAt(e.length-1)===47&&(t+="/"),n?"/"+t:t}function nh(e,n){let t="",r=0,i=-1,o=0,s=-1,a,l;for(;++s<=e.length;){if(s<e.length)a=e.codePointAt(s);else{if(a===47)break;a=47}if(a===47){if(!(i===s-1||o===1))if(i!==s-1&&o===2){if(t.length<2||r!==2||t.codePointAt(t.length-1)!==46||t.codePointAt(t.length-2)!==46){if(t.length>2){if(l=t.lastIndexOf("/"),l!==t.length-1){l<0?(t="",r=0):(t=t.slice(0,l),r=t.length-1-t.lastIndexOf("/")),i=s,o=0;continue}}else if(t.length>0){t="",r=0,i=s,o=0;continue}}n&&(t=t.length>0?t+"/..":"..",r=2)}else t.length>0?t+="/"+e.slice(i+1,s):t=e.slice(i+1,s),r=s-i-1;i=s,o=0}else a===46&&o>-1?o++:o=-1}return t}function Pn(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}var Il={cwd:rh};function rh(){return"/"}function dn(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Nl(e){if(typeof e=="string")e=new URL(e);else if(!dn(e)){let n=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw n.code="ERR_INVALID_ARG_TYPE",n}if(e.protocol!=="file:"){let n=new TypeError("The URL must be of scheme file");throw n.code="ERR_INVALID_URL_SCHEME",n}return ih(e)}function ih(e){if(e.hostname!==""){let r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}let n=e.pathname,t=-1;for(;++t<n.length;)if(n.codePointAt(t)===37&&n.codePointAt(t+1)===50){let r=n.codePointAt(t+2);if(r===70||r===102){let i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(n)}var No=["history","path","basename","stem","extname","dirname"],Fn=class{constructor(n){let t;n?dn(n)?t={path:n}:typeof n=="string"||oh(n)?t={value:n}:t=n:t={},this.cwd="cwd"in t?"":Il.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<No.length;){let o=No[r];o in t&&t[o]!==void 0&&t[o]!==null&&(this[o]=o==="history"?[...t[o]]:t[o])}let i;for(i in t)No.includes(i)||(this[i]=t[i])}get basename(){return typeof this.path=="string"?Ye.basename(this.path):void 0}set basename(n){Ro(n,"basename"),Oo(n,"basename"),this.path=Ye.join(this.dirname||"",n)}get dirname(){return typeof this.path=="string"?Ye.dirname(this.path):void 0}set dirname(n){Ol(this.basename,"dirname"),this.path=Ye.join(n||"",this.basename)}get extname(){return typeof this.path=="string"?Ye.extname(this.path):void 0}set extname(n){if(Oo(n,"extname"),Ol(this.dirname,"extname"),n){if(n.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(n.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Ye.join(this.dirname,this.stem+(n||""))}get path(){return this.history[this.history.length-1]}set path(n){dn(n)&&(n=Nl(n)),Ro(n,"path"),this.path!==n&&this.history.push(n)}get stem(){return typeof this.path=="string"?Ye.basename(this.path,this.extname):void 0}set stem(n){Ro(n,"stem"),Oo(n,"stem"),this.path=Ye.join(this.dirname||"",n+(this.extname||""))}fail(n,t,r){let i=this.message(n,t,r);throw i.fatal=!0,i}info(n,t,r){let i=this.message(n,t,r);return i.fatal=void 0,i}message(n,t,r){let i=new Ae(n,t,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(n){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(n||void 0).decode(this.value)}};function Oo(e,n){if(e&&e.includes(Ye.sep))throw new Error("`"+n+"` cannot be a path: did not expect `"+Ye.sep+"`")}function Ro(e,n){if(!e)throw new Error("`"+n+"` cannot be empty")}function Ol(e,n){if(!e)throw new Error("Setting `"+n+"` requires `path` to be set too")}function oh(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}var Rl=(function(e){let r=this.constructor.prototype,i=r[e],o=function(){return i.apply(o,arguments)};return Object.setPrototypeOf(o,r),o});var sh={}.hasOwnProperty,Do=class e extends Rl{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=Io()}copy(){let n=new e,t=-1;for(;++t<this.attachers.length;){let r=this.attachers[t];n.use(...r)}return n.data((0,Dr.default)(!0,{},this.namespace)),n}data(n,t){return typeof n=="string"?arguments.length===2?(_o("data",this.frozen),this.namespace[n]=t,this):sh.call(this.namespace,n)&&this.namespace[n]||void 0:n?(_o("data",this.frozen),this.namespace=n,this):this.namespace}freeze(){if(this.frozen)return this;let n=this;for(;++this.freezeIndex<this.attachers.length;){let[t,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);let i=t.call(n,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(n){this.freeze();let t=_r(n),r=this.parser||this.Parser;return Po("parse",r),r(String(t),t)}process(n,t){let r=this;return this.freeze(),Po("process",this.parser||this.Parser),Fo("process",this.compiler||this.Compiler),t?i(void 0,t):new Promise(i);function i(o,s){let a=_r(n),l=r.parse(a);r.run(l,a,function(c,d,m){if(c||!d||!m)return u(c);let f=d,h=r.stringify(f,m);lh(h)?m.value=h:m.result=h,u(c,m)});function u(c,d){c||!d?s(c):o?o(d):t(void 0,d)}}}processSync(n){let t=!1,r;return this.freeze(),Po("processSync",this.parser||this.Parser),Fo("processSync",this.compiler||this.Compiler),this.process(n,i),Fl("processSync","process",t),r;function i(o,s){t=!0,To(o),r=s}}run(n,t,r){Pl(n),this.freeze();let i=this.transformers;return!r&&typeof t=="function"&&(r=t,t=void 0),r?o(void 0,r):new Promise(o);function o(s,a){let l=_r(t);i.run(n,l,u);function u(c,d,m){let f=d||n;c?a(c):s?s(f):r(void 0,f,m)}}}runSync(n,t){let r=!1,i;return this.run(n,t,o),Fl("runSync","run",r),i;function o(s,a){To(s),i=a,r=!0}}stringify(n,t){this.freeze();let r=_r(t),i=this.compiler||this.Compiler;return Fo("stringify",i),Pl(n),i(n,r)}use(n,...t){let r=this.attachers,i=this.namespace;if(_o("use",this.frozen),n!=null)if(typeof n=="function")l(n,t);else if(typeof n=="object")Array.isArray(n)?a(n):s(n);else throw new TypeError("Expected usable value, not `"+n+"`");return this;function o(u){if(typeof u=="function")l(u,[]);else if(typeof u=="object")if(Array.isArray(u)){let[c,...d]=u;l(c,d)}else s(u);else throw new TypeError("Expected usable value, not `"+u+"`")}function s(u){if(!("plugins"in u)&&!("settings"in u))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");a(u.plugins),u.settings&&(i.settings=(0,Dr.default)(!0,i.settings,u.settings))}function a(u){let c=-1;if(u!=null)if(Array.isArray(u))for(;++c<u.length;){let d=u[c];o(d)}else throw new TypeError("Expected a list of plugins, not `"+u+"`")}function l(u,c){let d=-1,m=-1;for(;++d<r.length;)if(r[d][0]===u){m=d;break}if(m===-1)r.push([u,...c]);else if(c.length>0){let[f,...h]=c,b=r[m][1];Rn(b)&&Rn(f)&&(f=(0,Dr.default)(!0,b,f)),r[m]=[u,f,...h]}}}},jo=new Do().freeze();function Po(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Fo(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function _o(e,n){if(n)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Pl(e){if(!Rn(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Fl(e,n,t){if(!t)throw new Error("`"+e+"` finished async. Use `"+n+"` instead")}function _r(e){return ah(e)?e:new Fn(e)}function ah(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function lh(e){return typeof e=="string"||ch(e)}function ch(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}var n$=new Map(Object.entries(Ut).map(([e,n])=>[n,e]));var qo=e=>`/_files/schema/${encodeURIComponent(e)}`;var U$=jo().use(Pr).use(dr).use(Rr);var hh=["string","number","bool","json","timestamp"];var nM=`pk / fk(<table>) / fk[](<table>) / enum("a"|"b") / ${hh.join(" / ")}`;var jr={headerH:26,rowH:19,padX:11,padBottom:9,gapNameType:18,minW:158,gapY:22,gapInnerX:30,gapGroupX:108,gapGroupY:40,framePad:14,frameLabelH:22,maxColH:1020,lane:10,corner:7,margin:16,legendH:24,radius:10,baselineDrop:4},ph=jr.margin,rM=jr.gapGroupY,iM=jr.frameLabelH,oM=jr.framePad;var _l=(e,n)=>`<a class="resource-download" href="${be(n)}" download="${be(wn(e))}" data-resource-download title="${be(`Download ${wn(e)}`)}" aria-label="${be(`Download ${wn(e)}`)}"><svg viewBox="0 0 20 20" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M10 2v10m-4-4 4 4 4-4M3 13v4h14v-4"/></svg></a>`,Dl=(e,n)=>`<div class="subformat-table" tabindex="0" role="region" aria-label="${be(n)}"><table><thead><tr><th scope="col" data-i18n="File name">File name</th>${e.fields.map(t=>`<th scope="col">${be(t.title)}</th>`).join("")}</tr></thead><tbody>${e.records.map((t,r)=>`<tr data-record-file="${be(t.file)}"><th scope="row"><button type="button" data-subformat-record="${r}" aria-haspopup="dialog" title="${be(t.file)}">${be(wn(t.file))}</button></th>${e.fields.map(i=>`<td><span>${Object.hasOwn(t.data,i.name)?be(typeof t.data[i.name]=="object"?JSON.stringify(t.data[i.name]):String(t.data[i.name])):""}</span></td>`).join("")}</tr>`).join("")}</tbody></table></div>${e.records.length?"":'<p data-i18n="No results">No results</p>'}`;var jl=e=>e.startsWith("/")&&!e.startsWith("//")?`${globalThis.__doocClientBase??""}${e}`:e,ql=e=>{let n=globalThis.__doocClientBase;return n&&(e===n||e.startsWith(`${n}/`))?e.slice(n.length)||"/":e};var Bl=()=>globalThis.__doocConnections??={active:"local",items:new Map},fn=()=>Bl().active;var Et=(e=fn())=>Bl().items.get(e);function Bo(e,n,t){let r=globalThis.__doocConnections,i=r?.items.get(t??r.active);return i?i.fetch(e,n):fetch(e,n)}var qr=(e,n,t)=>new Promise(r=>{let i=document.activeElement,o=document.createElement("dialog");o.className="app-dialog",o.setAttribute("aria-label",e);let s=document.createElement("h2");s.textContent=e;let a=typeof n=="string"?document.createElement("p"):n;typeof n=="string"&&(a.textContent=n);let l=document.createElement("div");l.className="dialog-actions";for(let u of t){let c=document.createElement("button");c.type="button",c.textContent=u.label,c.autofocus=u.value==="",c.classList.toggle("danger",!!u.danger),c.addEventListener("click",()=>o.close(u.value)),l.append(c)}o.append(s,a,l),o.addEventListener("close",()=>{o.remove(),i instanceof HTMLElement&&i.isConnected&&i.focus(),r(o.returnValue)},{once:!0}),document.body.append(o),o.showModal()}),Ho=async(e,n,t=!1)=>await qr(n,e,[{value:"",label:L("Cancel")},{value:"confirm",label:n,danger:t}])==="confirm";var Ct=e=>`<svg viewBox="0 0 20 20" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">${e}</svg>`,Hl=(e,n)=>{let t=Math.max(e,n)>6,r=t?96:Math.max(e,n)*16,i=t?'<rect x="8" y="8" width="24" height="24"/><path class="format-grid-ellipsis" d="M40 50c8-12 12 12 20 0"/><rect x="64" y="64" width="24" height="24"/>':Array.from({length:e*n},(o,s)=>`<rect x="${(r-e*16)/2+s%e*16+2}" y="${(r-n*16)/2+Math.floor(s/e)*16+2}" width="12" height="12"/>`).join("");return`<svg class="format-grid-boxes" viewBox="0 0 ${r} ${r}" aria-hidden="true">${i}</svg>`},mn=[["grid","Grid",'<rect x="3" y="3" width="5" height="5" rx=".5"/><rect x="12" y="3" width="5" height="5" rx=".5"/><rect x="3" y="12" width="5" height="5" rx=".5"/><rect x="12" y="12" width="5" height="5" rx=".5"/>'],["list","List",'<path d="M7 4h10M7 10h10M7 16h10M3 4h.1M3 10h.1M3 16h.1"/>'],["table","Table",'<rect x="3" y="3" width="14" height="14" rx="1"/><path d="M3 8h14M3 12h14M8 3v14"/>']],zl=new WeakMap,gh=0,zo=e=>new Map([...e.querySelectorAll("[data-record-file]")].map(n=>[n,n.getBoundingClientRect()])),Uo=e=>{if(matchMedia("(prefers-reduced-motion: reduce)").matches)return Promise.resolve([]);let n=[];for(let[t,r]of e){if(!t.isConnected)continue;let i=t.getBoundingClientRect(),o=r.left-i.left,s=r.top-i.top;Math.abs(o)<1&&Math.abs(s)<1||n.push(t.animate([{transform:`translate(${o}px, ${s}px)`},{transform:"none"}],{duration:180,easing:"cubic-bezier(0.16, 1, 0.3, 1)"}).finished.catch(()=>{}))}return Promise.all(n)},Br=new Set;var ot=e=>{document.querySelector(".subformat-toast")?.remove();let n=document.createElement("div");n.className="subformat-toast",n.setAttribute("role","alert"),n.textContent=e instanceof Error?e.message:String(e),document.body.append(n),setTimeout(()=>n.remove(),6e3)},Vl=()=>{document.addEventListener("docs:subformat-page-action",async e=>{let n=fn(),{id:t,action:r}=e.detail,i=document.querySelector(`#nav-groups [data-doc-id="${CSS.escape(t)}"] > .nav-row > a`);if(!i)return;let o=i.pathname,s=i.textContent?.trim()??"",a=s;if(r==="delete"){if(!await Ho(L("Remove this page from the sidebar? The records will be kept."),L("Remove page")))return}else if(r==="rename"){let l=document.createElement("label");l.textContent=L("title");let u=document.createElement("input");u.className="subformat-page-name",u.value=s,u.required=!0,l.append(u);let c=qr(L("Rename page"),l,[{value:"",label:L("Cancel")},{value:"save",label:L("Save")}]);if(u.focus(),u.select(),await c!=="save")return;a=u.value.trim()}else return;try{let l=await Bo("/api/subformat-page",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({id:t,action:r,title:a})},n),u=await l.json();if(!l.ok)throw new Error(u.error??L("Save failed"));if(r==="delete"&&fn()===n&&location.pathname===o){let c=[...document.querySelectorAll("#nav-docs .nav-row > a")].find(m=>m!==i),d=window.__docsNavigate;d?await d(c?ql(c.pathname):"/"):location.href=c?.href??jl("/")}document.dispatchEvent(new Event("docs:files-changed"))}catch(l){ot(l)}})},bh=e=>{let n=["added","modified"].map(i=>({change:i,count:e.filter(o=>o.change===i).length,label:L(i==="added"?"Added":"Modified")})),t=n.find(({count:i})=>i>0&&i===e.length),r=({change:i,count:o,label:s})=>`<span data-record-change="${i}" aria-label="${be(`${s}: ${o}`)}" title="${be(s)}">${o}</span>`;return t?r(t):`<span>${e.length}</span>${n.filter(({count:i})=>i>0).map(r).join("")}`},ut=(e,n,t)=>{let r=e.querySelector("[data-subformats]"),i=e.querySelector("[data-subformat-board]");if(!r||!i)return!1;let o=zl.get(e);if(!o){let c=e.closest("[data-pane-id]"),d=e.closest("[data-workspace]")?.dataset.workspace??fn();o={id:++gh,workspace:d,fetch:(b,w)=>Bo(b,w,d),collections:JSON.parse(r.content.textContent??"[]"),views:new Map,parameterOrders:new Map,hiddenFields:new Map,filters:new Map,expanded:new Set,previews:new Map([...e.querySelector("[data-format-previews]")?.content.querySelectorAll("[data-format-preview]")??[]].map(b=>[b.dataset.formatPreview??"",b])),openSource:t&&((b,w)=>{fn()===d&&(!c||c.classList.contains("active"))&&t(b,w)}),dialogOpen:!1,busy:!1},zl.set(e,o);let m=e.querySelector("[data-subformat-search]"),f=e.querySelector("[data-resource-search]"),h=f?.closest(".resource-search");m&&f&&h&&(h.id=`subformat-${o.id}-search`,m.setAttribute("aria-controls",h.id),m.addEventListener("click",()=>{let b=h.hidden;h.hidden=!b,m.setAttribute("aria-expanded",String(b)),b?f.focus():(f.value="",f.dispatchEvent(new Event("input",{bubbles:!0})),m.focus())}),f.addEventListener("keydown",b=>{b.key==="Escape"&&(b.preventDefault(),b.stopPropagation(),m.click())}))}let s=e.querySelector("[data-resource-filter]");s?.hasAttribute("data-subformat-filter")&&o.openSource&&document.body.classList.contains("edit")&&!Et(o.workspace)?.readOnly&&([...s.options].some(c=>c.value==="+")||s.add(new Option(L("Add subformat\u2026"),"+")),s.value==="+"&&(s.value=o.selected??o.collections[0]?.ext??"",kh(e,o,s)));let a=o.collections.find(c=>c.ext===(e.dataset.subformatPage??e.dataset.subformatEmbed??s?.value));if(s){for(let d of s.options){let m=o.collections.find(h=>h.ext===d.value),f=m&&fi(m);f?(d.dataset.subformatChange=f,d.setAttribute("aria-label",`${d.text} \xB7 ${L(f==="added"?"Added":"Modified")}`)):(delete d.dataset.subformatChange,d.removeAttribute("aria-label"))}let c=a&&fi(a);c?s.dataset.subformatChange=c:delete s.dataset.subformatChange,yh(e,s,o)}let l=e.querySelector("[data-subformat-relations]");l&&(l.hidden=s?.value!=="*"),i.hidden=!a;let u=e.querySelector(".resource-items");if(u&&(u.hidden=!!a),!a)return o.stopDrag?.(),e.querySelector(".subformat-controls")?.remove(),e.querySelector(".subformat-filters")?.remove(),l&&!l.hidden?(e.querySelector("[data-resource-empty]")?.setAttribute("hidden",""),!0):!1;if(i.setAttribute("aria-label",a.ext),o.selected=a.ext,Be(e,i,o,a,n),u){let c=0;for(let d of u.querySelectorAll("[data-resource-item]")){let m=d.textContent?.normalize("NFKC").toLowerCase()??"";d.hidden=!d.hasAttribute("data-resource-inline")||d.dataset.resourceGroup!==a.ext||!n.every(f=>m.includes(f)),d.hidden||c++}if(u.hidden=!c,c){e.querySelector("[data-resource-empty]")?.setAttribute("hidden","");let d=e.querySelector("[data-resource-count]");d&&(d.textContent=String(Number(d.textContent)+c))}}return!0},Vo=(e,n)=>{if(!n)return;if(!n.iconSvg){e.insertAdjacentHTML("afterbegin",Xs);return}let t=document.createElement("img");t.className="doc-icon",t.alt="",t.src=`data:image/svg+xml,${encodeURIComponent(n.iconSvg)}`,e.prepend(t)},yh=(e,n,t)=>{let r=e.querySelector("[data-subformat-trigger]"),i=e.querySelector("[data-subformat-options]");if(!r||!i)return;r.hidden=!t.openSource||!document.body.classList.contains("edit")||!!Et(t.workspace)?.readOnly;let o=r.closest(".resource-query");if(o&&(o.hidden=r.hidden),!r.hidden){r.textContent=n.selectedOptions[0]?.text||L("Subformats"),Vo(r,t.collections.find(s=>s.ext===n.value)),r.disabled=![...n.options].some(s=>s.value),n.dataset.subformatChange?r.dataset.subformatChange=n.dataset.subformatChange:delete r.dataset.subformatChange,i.replaceChildren();for(let s of n.options){if(!s.value)continue;let a=document.createElement("button");a.type="button",a.tabIndex=-1,a.textContent=s.text,Vo(a,t.collections.find(c=>c.ext===s.value)),a.setAttribute("role",s.value==="+"?"menuitem":"menuitemradio"),s.value==="+"?a.dataset.subformatAdd="":a.setAttribute("aria-checked",String(s.selected)),s.dataset.subformatChange&&(a.dataset.subformatChange=s.dataset.subformatChange,a.setAttribute("aria-label",s.getAttribute("aria-label")??s.text)),a.addEventListener("click",()=>{i.hidePopover(),n.value=s.value,n.dispatchEvent(new Event("change",{bubbles:!0})),s.value!=="+"&&r.focus()});let l=document.createElement("div");l.className="subformat-picker-option",l.setAttribute("role","none"),l.append(a);let u=t.collections.find(c=>c.ext===s.value);if(u&&t.openSource&&document.body.classList.contains("edit")&&!Et(t.workspace)?.readOnly)for(let c of["edit","delete"]){let d=document.createElement("button");d.type="button",d.tabIndex=-1,d.dataset.subformatAction=c,d.title=`${L(c==="edit"?"Edit":"Delete")}: ${u.ext}`,d.innerHTML=`<svg width="16" height="16" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="${c==="edit"?"m13 3 4 4M3 17l4-1L17 6a2.8 2.8 0 0 0-4-4L3 12Z":"m5 5 10 10M15 5 5 15"}"/></svg>`,d.setAttribute("role","menuitem"),d.setAttribute("aria-label",d.title),d.disabled=t.busy,d.addEventListener("click",()=>{t.busy||(i.hidePopover(),r.focus(),c==="edit"?t.openSource?.(u.schema,1):wh(e,t,n,u))}),l.append(d)}i.append(l)}_n(r,i)}},wh=async(e,n,t,r)=>{n.busy=!0;try{if(!await Ho(L("Delete subformat {ext} and its sidebar page? Records and schema files will be kept.",{ext:r.ext}),L("Delete"),!0))return;let{ext:i,format:o,schema:s,icon:a,layouts:l}=r,u=await n.fetch("/api/subformat",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({action:"delete",ext:i,base:{ext:i,format:o,schema:s,icon:a,layouts:l}})}),c=await u.json();if(!u.ok)throw new Error(L(c.error??"Save failed"));n.collections=n.collections.filter(d=>d!==r),n.views.delete(i),n.parameterOrders.delete(i),n.hiddenFields.delete(i),n.filters.delete(i);for(let d of[...t.options])d.value===i&&d.remove();n.collections.some(d=>d.ext===t.value)||(t.value=n.collections[0]?.ext??""),document.dispatchEvent(new CustomEvent("docs:subformat-saved",{detail:{file:c.file,workspace:n.workspace}})),document.dispatchEvent(new Event("docs:files-changed"))}catch(i){ot(i)}finally{n.busy=!1,t.dispatchEvent(new Event("change",{bubbles:!0})),e.querySelector("[data-subformat-trigger]")?.focus()}},Go=(e,n)=>{let t=e.getBoundingClientRect(),r=innerHeight-t.bottom,i=r<240&&t.top>r;Object.assign(n.style,{left:`${Math.max(8,Math.min(t.left,innerWidth-n.offsetWidth-8))}px`,maxHeight:`${Math.max(80,Math.min(360,(i?t.top:r)-12))}px`,top:i?"auto":`${t.bottom+4}px`,bottom:i?`${innerHeight-t.top+4}px`:"auto"})},_n=(e,n,t)=>{e.dataset.mounted||(e.dataset.mounted="true",e.addEventListener("click",()=>{if(n.matches(":popover-open")){n.hidePopover();return}n.showPopover(),Go(e,n),e.setAttribute("aria-expanded","true"),(n.querySelector('[aria-checked="true"], [aria-pressed="true"]')??n.querySelector("button:not(:disabled)"))?.focus()}),n.addEventListener("beforetoggle",r=>{let i=r.newState==="open";e.setAttribute("aria-expanded",String(i)),n.isConnected&&t?.(i)}),n.addEventListener("keydown",r=>{if(r.key==="Escape"&&e.focus(),r.target instanceof HTMLInputElement||r.target instanceof HTMLSelectElement)return;let i=[...n.querySelectorAll("button:not(:disabled)")],o=i.indexOf(document.activeElement);if(["ArrowDown","ArrowUp","Home","End"].includes(r.key)){r.preventDefault();let s=r.key==="Home"?0:r.key==="End"?i.length-1:(o+(r.key==="ArrowDown"?1:i.length-1))%i.length;i[s]?.focus()}}))},kh=(e,n,t)=>{if(n.registrationForm){document.dispatchEvent(new CustomEvent("docs:subformat-add",{detail:n.registrationForm}));return}let r=document.createElement("form");n.registrationForm=r,Br.add(r),r.dataset.workspace=n.workspace,r.className="subformat-create-form",r.dataset.subformatRegister="",r.setAttribute("aria-label",L("Add subformat")),r.innerHTML=`<fieldset class="subformat-register-fields"><input name="ext" required placeholder="ext." aria-label="${L("Extension")}" autocomplete="off" spellcheck="false"><label class="subformat-control"><span class="subformat-control-label">format</span><select id="subformat-format" name="format" data-placeholder="format" aria-label="${L("Storage format")}"><option value="json">json</option><option value="yaml">yaml</option><option value="toml">toml</option></select></label><input name="schema" placeholder="path" aria-label="${L("Schema file (optional)")}" autocomplete="off" spellcheck="false"></fieldset><fieldset><label class="subformat-register-icon">${L("SVG icon path (optional)")}<input name="icon" placeholder="icons/example.svg" autocomplete="off" spellcheck="false"></label><textarea name="content" hidden></textarea><div data-subformat-schema-editor></div><div class="subformat-create-actions"><button type="button" data-format>${L("Validate and apply")}</button><button type="button" data-cancel>${L("Cancel")}</button><button type="submit">${L("Add subformat")}</button></div></fieldset>`,r.elements.namedItem("content").value=As;let i=r.elements.namedItem("ext"),o=r.elements.namedItem("schema");i.addEventListener("input",()=>{i.value.trim()?o.placeholder=`${i.value.trim()}.schema.json`:o.placeholder="path"}),r.addEventListener("input",()=>{r.dataset.dirty="true"});let s=()=>{n.registrationForm=void 0,Br.delete(r),document.dispatchEvent(new CustomEvent("docs:subformat-editor-close",{detail:r})),r.remove()},a=()=>{n.busy||(s(),(e.querySelector("[data-subformat-trigger]")??t).focus())};r.querySelector("[data-cancel]")?.addEventListener("click",a);let l=u=>{u.key==="Escape"&&!u.defaultPrevented&&(u.preventDefault(),u.stopPropagation(),a())};r.addEventListener("keydown",l),r.querySelector(".subformat-register-fields")?.addEventListener("keydown",u=>l(u)),r.addEventListener("submit",async u=>{if(u.preventDefault(),n.busy)return;n.busy=!0;let c=[...r.elements].filter(f=>f instanceof HTMLFieldSetElement),d=f=>r.elements.namedItem(f).value.trim();for(let f of c)f.disabled=!0;let m=r.querySelector("[data-subformat-schema-editor]");m&&(m.inert=!0),document.querySelector(".subformat-toast")?.remove();try{let f=await n.fetch("/api/subformat",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({action:"register",ext:d("ext"),format:d("format"),schema:d("schema"),icon:d("icon"),content:r.elements.namedItem("content").value})}),h=await f.json();if(!f.ok)throw new Error(L(h.error??"Save failed"));let b=h.collection;n.collections.push(b),t.add(new Option(b.ext,b.ext),t.options.length-1),t.value=b.ext,s(),n.busy=!1,t.dispatchEvent(new Event("change",{bubbles:!0})),n.openSource?.(b.schema,1)}catch(f){ot(f)}finally{n.busy=!1;for(let f of c)f.disabled=!1;m&&(m.inert=!1)}}),document.dispatchEvent(new CustomEvent("docs:subformat-add",{detail:r})),r.elements.namedItem("ext").focus()};var Ko=(e,n)=>`<div><dt>${be(e)}</dt><dd>${be(typeof n=="object"?JSON.stringify(n,null,2):String(n))}</dd></div>`,Ul=async(e,n,t,r)=>{if(e.openSource)return e.openSource(t.file,n.resource&&Number(t.data.line)||1);if(e.dialogOpen)return;e.dialogOpen=!0;let i=document.createElement("div");i.className="subformat-detail",i.innerHTML=`<p class="subformat-detail-path">${be(t.file)}</p><dl>${Object.entries(t.data).map(([s,a])=>Ko(n.fields.find(l=>l.name===s)?.title??s,a)).join("")}</dl>`;let o=e.previews.get(JSON.stringify(t.data));if(o){let s=o.cloneNode(!0),a=s.querySelector(":scope > a.resource-source");a&&i.querySelector(".subformat-detail-path")?.replaceChildren(a),i.prepend(s)}try{await qr(r,i,[{value:"",label:L("Close")}])}finally{e.dialogOpen=!1}},Be=(e,n,t,r,i)=>{t.stopDrag?.();let o=e.hasAttribute("data-subformat-embed"),s=JSON.parse(e.dataset.subformatEmbedOptions??"{}"),a=n.querySelector(".subformat-columns")?.scrollLeft??0,l=!!document.querySelector("template[data-route]"),u=r.fields.filter(x=>x.enum?.length),c=t.views.get(r.ext)??{view:o?s.view??e.dataset.subformatEmbedView??"card":r.layouts?.view??"card",card_title:s.card_title??r.layouts?.card_title??"",group_by:s.group_by??(o?"":r.layouts?.group_by??u[0]?.name??""),sort_by:s.sort_by??r.layouts?.sort_by??"",sort_order:s.sort_order??r.layouts?.sort_order??"asc",columns:s.columns??3,rows:s.rows??2,folder:".",page:0};t.views.set(r.ext,c),u.some(x=>x.name===c.group_by)||(c.group_by="");let d=c.view==="card"?u.find(x=>x.name===c.group_by):void 0,m=r.fields.filter(x=>x.enum||x.format||x.type);m.some(x=>x.name===c.sort_by)||(c.sort_by="");let f=m.find(x=>x.name===c.sort_by),h=c.card_title,b=t.parameterOrders.get(r.ext)??s.fields??r.fields.map(x=>x.name),w=[...b.flatMap(x=>r.fields.filter(_=>_.name===x)),...r.fields.filter(x=>!b.includes(x.name))],y=t.hiddenFields.get(r.ext)??new Set(r.fields.filter(x=>s.fields&&!s.fields.includes(x.name)).map(x=>x.name)),C=w.filter(x=>!y.has(x.name)),k=t.filters.get(r.ext)??[],O=c.sort_order==="desc",R=mi(r.records.filter(x=>{let _=`${x.file} ${x.content}`.normalize("NFKC").toLowerCase();return i.every($=>_.includes($))&&(!r.resource||Rs(x.file,c.folder??"."))&&Ms(x,{filters:k},r.fields)}),f,O),S=(c.columns??3)*(c.rows??2),M=Math.max(1,Math.ceil(R.length/S));c.page=Math.min(c.page??0,M-1);let W=r.resource&&c.view==="grid"?R.slice(c.page*S,(c.page+1)*S):R,pe=e.querySelector("[data-resource-empty]");pe&&(pe.hidden=W.length>0);let v=e.querySelector("[data-resource-count]"),ie=r.resource&&c.view==="grid";v&&(v.classList.toggle("format-page-count",!!ie),v.textContent=ie?`${W.length?c.page+1:0} / ${W.length?M:0}`:String(R.length),v instanceof HTMLElement&&(v.title=ie?`${L("Pagination")}: ${v.textContent} \xB7 ${c.page*S+(W.length?1:0)}\u2013${Math.min((c.page+1)*S,R.length)} / ${R.length}`:""));let j=e.querySelector(".subformat-controls")??document.createElement("div");j.className="subformat-controls",o?e.querySelector(".subformat-embed-toolbar")?.insertBefore(j,v):e.querySelector(".resource-toolbar")?.append(j);let B=t.openSetting;j.replaceChildren(),n.parentElement?.classList.contains("format-gallery")&&n.parentElement.replaceWith(n);let Z=j;if(r.resource){let x=document.createElement("div");x.className="format-view-switch",x.setAttribute("role","group"),x.setAttribute("aria-label",L("View"));for(let[N,q,P]of mn){let z=document.createElement("button");z.type="button",z.dataset.formatView=N,z.title=L(q),z.setAttribute("aria-label",L(q)),z.setAttribute("aria-pressed",String(c.view===N||N==="grid"&&c.view==="card")),z.innerHTML=Ct(P),z.onclick=()=>{c.view=N,Be(e,n,t,r,i),j.querySelector(`[data-format-view="${N}"]`)?.focus()},x.append(z)}let _=Math.max(0,mn.findIndex(([N])=>N===c.view)),$=document.createElement("button"),U=mn[_]??mn[0];$.type="button",$.className="format-view-cycle",$.dataset.formatViewCycle="",$.title=`${L("View")}: ${L(U[1])}`,$.setAttribute("aria-label",$.title),$.innerHTML=Ct(U[2]),$.onclick=()=>{c.view=mn[_+1]?.[0]??"grid",Be(e,n,t,r,i),j.querySelector("[data-format-view-cycle]")?.focus()},x.append($),j.append(x);let D=document.createElement("div");D.className="format-display-settings",D.innerHTML=`<button type="button" data-format-display aria-label="${L("Display")}" title="${L("Display")}" aria-haspopup="dialog" aria-expanded="false" aria-controls="format-display-${t.id}">${Ct('<path d="M3 6h4m6 0h4M3 14h8m4 0h2"/><circle cx="10" cy="6" r="3"/><circle cx="13" cy="14" r="2"/>')}<span>${L("Display")}</span></button><div class="subformat-picker-menu format-display-fields" id="format-display-${t.id}" popover="auto" role="dialog" aria-label="${L("Display")}"></div>`,j.append(D),Z=D.lastElementChild,_n(D.firstElementChild,Z,N=>{t.displayOpen=N}),t.displayOpen&&Z.showPopover()}if(!r.resource&&!e.querySelector("[data-subformat-trigger]:not([hidden])")){let x=document.createElement("a");x.className="subformat-schema-link",x.href=l?`#${qo(r.ext)}`:qo(r.ext),x.textContent=r.ext,Vo(x,r),j.append(x)}let A=[{key:"view",fields:[r.resource?{name:"grid",title:L("Grid")}:{name:"card",title:L("Cards")},{name:"list",title:L("List")},...o?[{name:"table",title:L("Table")}]:[]]},...c.view==="table"?[]:[{key:"card_title",fields:[{name:"",title:L("File name")},...r.fields]}],...u.length&&c.view==="card"?[{key:"group_by",fields:[{name:"",title:L("No grouping")},...u]}]:[],{key:"sort_by",fields:[{name:"",title:L("File name")},...m]},{key:"sort_order",fields:[{name:"asc",title:L(f?.format?"Oldest first":"Ascending")},{name:"desc",title:L(f?.format?"Newest first":"Descending")}]}];for(let{key:x,fields:_}of A){if(r.resource&&x==="view")continue;let $=document.createElement("div");$.className="subformat-control";let U=x==="view"?L("View"):x.replaceAll("_"," "),D=`subformat-${t.id}-${r.ext}-${x}`,N=_.find(G=>G.name===c[x])?.title??L("File name");$.innerHTML=`<span class="subformat-control-label" id="${D}-label">${U}</span><button type="button" data-subformat-setting="${x}" aria-labelledby="${D}-label ${D}-value" aria-haspopup="menu" aria-expanded="false" aria-controls="${D}-menu"${t.busy?" disabled":""}><span id="${D}-value">${be(N)}</span><svg width="12" height="12" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.5" aria-hidden="true"><path d="m5 7 5 5 5-5"/></svg></button><div class="subformat-picker-menu subformat-setting-menu" id="${D}-menu" popover="auto" role="menu" aria-label="${U}"></div>`,Z.append($);let q=$.querySelector("button"),P=$.querySelector("[popover]"),z=r.layouts?.[x]??(x==="view"?"card":x==="sort_order"?"asc":x==="group_by"?u[0]?.name??"":"");for(let G of _){let K=document.createElement("div");K.className="subformat-setting-option",K.setAttribute("role","none");let oe=document.createElement("button");if(oe.type="button",oe.tabIndex=-1,oe.textContent=G.title,oe.dataset.settingValue=G.name,oe.setAttribute("role","menuitemradio"),oe.setAttribute("aria-checked",String(G.name===c[x])),oe.addEventListener("click",()=>{t.busy||(x==="sort_order"?c.sort_order=G.name:x==="view"?c.view=G.name:c[x]=G.name,P.hidePopover(),Be(e,n,t,r,i),j.querySelector(`[data-subformat-setting="${x}"]`)?.focus())}),K.append(oe),o){P.append(K);continue}let ce=document.body.classList.contains("edit")&&!Et(t.workspace)?.readOnly,te=document.createElement(ce?"button":"span");te.className="subformat-default",te.dataset.defaultValue=G.name,te.dataset.isDefault=String(G.name===z),te.dataset.layoutChanged=String(G.name===z&&r.baseLayouts!==void 0&&r.layouts?.[x]!==r.baseLayouts[x]),te.innerHTML=xn,te.title=L(G.name===z?"Default":"Set as default"),te.setAttribute("aria-label",`${te.title}: ${U} \xB7 ${G.title}`),te instanceof HTMLButtonElement&&(te.type="button",te.tabIndex=-1,te.setAttribute("role","menuitem"),te.disabled=t.busy||r.layouts?.[x]===G.name,te.addEventListener("click",async()=>{if(!t.busy){t.busy=!0,te.disabled=!0,q.disabled=!0;try{let ue=await t.fetch("/api/subformat",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({action:"layouts",ext:r.ext,key:x,value:G.name,base:r.layouts?.[x]??null})}),Y=await ue.json();if(!ue.ok)throw new Error(L(Y.error??"Save failed"));r.layouts={...r.layouts,[x]:G.name},document.dispatchEvent(new CustomEvent("docs:subformat-saved",{detail:{file:Y.file,workspace:t.workspace}}))}catch(ue){ot(ue)}finally{t.busy=!1,ut(e,i)}}})),K.append(te),P.append(K)}_n(q,P,G=>{G?t.openSetting=x:t.openSetting===x&&(t.openSetting=void 0)}),B===x&&q.isConnected&&q.click()}if(r.resource){let x=document.createElement("label");x.className="subformat-control format-folder",x.innerHTML=`<span class="subformat-control-label">${L("Folder")}</span><span class="format-folder-icon" aria-hidden="true">${Ct(`<path d="${Qs}"/><path d="m7 10 3 3 3-3"/>`)}</span>`;let _=new Set;for(let U of r.records){let D=U.file.split("/").slice(0,-1);for(let N=1;N<=D.length;N++)_.add(D.slice(0,N).join("/"))}let $=document.createElement("select");$.dataset.formatFolder="",$.setAttribute("aria-label",L("Folder")),$.add(new Option(L("All folders"),"."));for(let U of[..._].sort())$.add(new Option(U,U));if($.value=c.folder??".",$.title=`${L("Folder")}: ${$.selectedOptions[0]?.textContent}`,x.dataset.active=String($.value!=="."),$.onchange=()=>{c.folder=$.value,c.page=0,Be(e,n,t,r,i),j.querySelector("[data-format-folder]")?.focus({preventScroll:!0})},x.append($),j.append(x),c.view==="grid"){let U=document.createElement("div");U.className="format-layout",U.innerHTML=`<button type="button" data-format-layout aria-label="${L("Grid layout")}: ${c.columns} \xD7 ${c.rows}" title="${L("Grid layout")}: ${c.columns} \xD7 ${c.rows}" aria-haspopup="dialog" aria-expanded="false" aria-controls="format-layout-${t.id}"><span class="format-layout-count">${c.columns}\xD7${c.rows}</span>${Hl(c.columns??3,c.rows??2)}</button><div class="subformat-picker-menu format-layout-popover" id="format-layout-${t.id}" popover="auto" role="dialog" aria-label="${L("Grid layout")}"><fieldset class="format-grid-size"><legend><output aria-live="polite"></output></legend><button type="button" data-format-grid-resize aria-keyshortcuts="ArrowLeft ArrowRight ArrowUp ArrowDown" title="${L("Drag or use arrow keys to resize the grid")}"></button></fieldset></div>`,j.append(U);let D=U.querySelector("button"),N=U.querySelector("[popover]"),q=U.querySelector("[data-format-grid-resize]"),P=U.querySelector("output"),z=c.columns??3,G=c.rows??2,K=()=>{P.textContent=`${z} \xD7 ${G}`,q.setAttribute("aria-label",`${L("Columns")}: ${z}, ${L("Rows")}: ${G}`),q.innerHTML=`${Hl(z,G)}<span class="format-grid-grip">${Ct('<path d="m8 16 8-8m-2 8 2-2"/>')}</span>`},oe=()=>{z===c.columns&&G===c.rows||(c.columns=z,c.rows=G,c.page=0,N.hidePopover(),Be(e,n,t,r,i),j.querySelector("[data-format-layout]")?.click(),j.querySelector("[data-format-grid-resize]")?.focus())},ce,te=Y=>{if(!ce)return;let{id:Ee}=ce;ce=void 0,q.hasPointerCapture(Ee)&&q.releasePointerCapture(Ee),Y?oe():(z=c.columns??3,G=c.rows??2,K())};q.onpointerdown=Y=>{ce||Y.button!==0||(Y.preventDefault(),q.focus(),ce={id:Y.pointerId,x:Y.clientX,y:Y.clientY,columns:z,rows:G},q.setPointerCapture(Y.pointerId))},q.onpointermove=Y=>{if(!(!ce||Y.pointerId!==ce.id)){if(!Y.buttons)return te(!1);z=Math.min(12,Math.max(1,ce.columns+Math.round((Y.clientX-ce.x)/16))),G=Math.min(12,Math.max(1,ce.rows+Math.round((Y.clientY-ce.y)/16))),K()}},q.onpointerup=Y=>{Y.pointerId===ce?.id&&te(!0)},q.onpointercancel=q.onlostpointercapture=()=>te(!1),q.onkeydown=Y=>{if(Y.key==="Escape")return te(!1);Y.key.startsWith("Arrow")&&(Y.preventDefault(),Y.stopPropagation(),z=Math.min(12,Math.max(1,z+(Y.key==="ArrowRight"?1:Y.key==="ArrowLeft"?-1:0))),G=Math.min(12,Math.max(1,G+(Y.key==="ArrowDown"?1:Y.key==="ArrowUp"?-1:0))),K(),oe())},K(),_n(D,N);let ue=document.createElement("div");ue.className="format-gallery",n.before(ue),ue.append(n);for(let Y of[-1,1]){let Ee=document.createElement("button");Ee.type="button",Ee.dataset.formatPage=String(Y),Ee.title=L(Y<0?"Previous":"Next"),Ee.setAttribute("aria-label",Ee.title),Ee.innerHTML=Ct(Y<0?'<path d="m12 5-5 5 5 5"/>':'<path d="m8 5 5 5-5 5"/>'),Ee.disabled=Y<0?c.page===0:c.page===M-1,Ee.onclick=()=>{c.page=(c.page??0)+Y,Be(e,n,t,r,i),n.scrollTo({top:0,left:0}),(e.querySelector(`[data-format-page="${Y}"]:enabled`)??e.querySelector("[data-format-page]:enabled")??n).focus({preventScroll:!0})},Y<0?ue.prepend(Ee):ue.append(Ee)}}}if(c.view==="list"||c.view==="table"){let x=w.filter(U=>c.view==="table"||U.name!==h),_=document.createElement("button");_.type="button",_.textContent=L("Fields"),r.resource&&(_.innerHTML=`${Ct(mn[2][2])}<span class="format-control-text">${L("Fields")}</span>`,_.title=L("Fields"),_.setAttribute("aria-label",L("Fields"))),_.dataset.subformatParameters="",_.disabled=t.busy||!x.length,_.setAttribute("aria-haspopup","menu"),_.setAttribute("aria-expanded","false");let $=document.createElement("div");$.id=`subformat-${t.id}-parameters`,$.className="subformat-picker-menu subformat-setting-menu",$.setAttribute("popover","auto"),$.setAttribute("role","menu"),$.setAttribute("aria-label",L("Fields")),_.setAttribute("aria-controls",$.id),j.append(_,$);for(let[U,D]of x.entries()){let N=document.createElement("div");N.className="subformat-setting-option subformat-parameter-option",N.setAttribute("role","none");let q=document.createElement("button");q.type="button",q.tabIndex=-1,q.className="subformat-field-toggle",q.dataset.subformatField=D.name,q.setAttribute("role","menuitemcheckbox"),q.setAttribute("aria-checked",String(!y.has(D.name))),q.disabled=t.busy,q.textContent=D.title,q.insertAdjacentHTML("beforeend",xn),q.addEventListener("click",()=>{y.has(D.name)?y.delete(D.name):y.add(D.name),t.hiddenFields.set(r.ext,y);let P=$.scrollTop;Be(e,n,t,r,i);let z=j.querySelector(`#${$.id}`);z&&(z.scrollTop=P),j.querySelector(`[data-subformat-field="${CSS.escape(D.name)}"]`)?.focus({preventScroll:!0})}),N.append(q);for(let P of[-1,1]){let z=document.createElement("button");z.type="button",z.tabIndex=-1,z.dataset.parameter=D.name,z.dataset.move=P<0?"up":"down",z.setAttribute("role","menuitem"),z.title=`${L(P<0?"Move up":"Move down")}: ${D.title}`,z.setAttribute("aria-label",z.title),z.disabled=t.busy||!x[U+P],z.innerHTML=`<svg width="16" height="16" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.5" aria-hidden="true"><path d="${P<0?"m5 12 5-5 5 5":"m5 8 5 5 5-5"}"/></svg>`,z.addEventListener("click",()=>{let G=x[U+P];if(t.busy||!G)return;let K=w.map(Y=>Y.name),oe=K.indexOf(D.name),ce=K.indexOf(G.name);K[oe]=G.name,K[ce]=D.name,t.parameterOrders.set(r.ext,K);let te=$.scrollTop;Be(e,n,t,r,i);let ue=j.querySelector(`#${$.id}`);if(ue){ue.scrollTop=te;let Y=`[data-parameter="${CSS.escape(D.name)}"]`;(ue.querySelector(`${Y}[data-move="${z.dataset.move}"]:not(:disabled)`)??ue.querySelector(`${Y}:not(:disabled)`))?.focus({preventScroll:!0})}}),N.append(z)}$.append(N)}_n(_,$,U=>{U?t.openSetting="parameters":t.openSetting==="parameters"&&(t.openSetting=void 0)}),B==="parameters"&&_.isConnected&&!_.disabled&&_.click()}let H=document.createElement("button");H.type="button",H.dataset.subformatFilters="",H.textContent=`${L("Filters")}${k.length?` (${k.length})`:""}`,r.resource&&(H.innerHTML=`${Ct('<path d="M3 5h14l-5 6v5l-4 2v-7Z"/>')}<span class="format-control-text">${L("Filters")}</span>${k.length?`<span class="format-filter-count">${k.length}</span>`:""}`,H.title=L("Filters"),H.setAttribute("aria-label",`${L("Filters")}${k.length?` (${k.length})`:""}`),H.setAttribute("aria-haspopup","dialog")),H.disabled=t.busy||!r.fields.length,H.setAttribute("aria-expanded",String(B==="filters")),H.setAttribute("aria-controls",`subformat-${t.id}-filters`),H.addEventListener("click",()=>{t.openSetting=t.openSetting==="filters"?void 0:"filters",Be(e,n,t,r,i),(e.querySelector("[data-filter-field]")??j.querySelector("[data-subformat-filters]"))?.focus()}),j.append(H);let le=j.querySelector(".format-display-fields:popover-open");if(le&&Go(j.querySelector("[data-format-display]"),le),e.querySelector(":scope > .subformat-filters")?.remove(),B==="filters"){let x=document.createElement("form");x.id=`subformat-${t.id}-filters`,x.className="subformat-filters",x.setAttribute("aria-label",L("Filters")),x.innerHTML=`<p>${L("Match all conditions")}</p><div data-filter-rows></div><div class="subformat-filter-actions"><button type="button" data-filter-add>${L("Add filter")}</button><button type="submit">${L("Apply filters")}</button><button type="button" data-filter-clear>${L("Clear")}</button></div><p class="err" role="alert"></p>`,e.insertBefore(x,n.parentElement?.classList.contains("format-gallery")?n.parentElement:n);let _=x.querySelector("[data-filter-rows]"),$=x.querySelector("[data-filter-add]"),U=([D,N,q="eq"])=>{let P=document.createElement("div");P.className="subformat-filter-row",P.innerHTML=`<label>${L("Field")}<select data-filter-field></select></label><label>${L("Operator")}<select data-filter-operator></select></label><label>${L("Value")}<input data-filter-value></label><button type="button" data-filter-remove>${L("Remove filter")}</button>`;let z=P.querySelector("[data-filter-field]"),G=P.querySelector("[data-filter-operator]"),K=P.querySelector("input");for(let te of r.fields)z.add(new Option(te.title,te.name));z.value=D,K.value=N;let oe=()=>{let te=r.fields.find(ue=>ue.name===z.value);if(G.replaceChildren(),te)for(let ue of di(te))G.add(new Option(L(ui[ue]),ue))},ce=()=>{K.placeholder=G.value==="in"?L("Comma-separated values"):G.value==="empty"?"true / false":""};oe(),G.value=q,ce(),z.addEventListener("change",()=>{oe(),ce()}),G.addEventListener("change",ce),P.querySelector("[data-filter-remove]")?.addEventListener("click",()=>{P.remove(),$.focus()}),_.append(P)};for(let D of k)U(D);$.addEventListener("click",()=>{let D=r.fields[0];D&&(U([D.name,""]),_.lastElementChild?.querySelector("select")?.focus())}),x.addEventListener("submit",D=>{D.preventDefault();let N=[..._.children].map(q=>[q.querySelector("[data-filter-field]").value,q.querySelector("[data-filter-value]").value,q.querySelector("[data-filter-operator]").value]);try{$s({filters:N},r.fields),t.filters.set(r.ext,N),t.openSetting=void 0,Be(e,n,t,r,i),j.querySelector("[data-subformat-filters]")?.focus()}catch(q){let P=x.querySelector("[role=alert]");P.textContent=q instanceof Error?q.message:String(q)}}),x.querySelector("[data-filter-clear]")?.addEventListener("click",()=>{t.filters.delete(r.ext),t.openSetting=void 0,Be(e,n,t,r,i),j.querySelector("[data-subformat-filters]")?.focus()}),r.resource&&(x.classList.add("subformat-picker-menu","format-filter-popover"),x.popover="auto",x.setAttribute("role","dialog"),x.addEventListener("beforetoggle",D=>{D.newState==="closed"&&x.isConnected&&(t.openSetting=void 0,H.setAttribute("aria-expanded","false"))}),x.addEventListener("keydown",D=>{D.key==="Escape"&&H.focus()}),x.showPopover(),Go(H,x))}if(!o&&t.openSource&&document.body.classList.contains("edit")&&!Et(t.workspace)?.readOnly){let x=document.createElement("button");x.type="button",x.dataset.subformatIcon="",x.textContent=L("SVG icon"),x.disabled=t.busy,x.setAttribute("aria-expanded",String(t.iconForm?.dataset.ext===r.ext)),j.append(x),x.addEventListener("click",()=>{if(t.busy)return;if(t.iconForm?.dataset.ext===r.ext){t.iconForm=void 0,Be(e,n,t,r,i),j.querySelector("[data-subformat-icon]")?.focus();return}let $=document.createElement("form");t.iconForm=$,$.className="subformat-icon-form",$.dataset.ext=r.ext,$.innerHTML=`<fieldset><label>${L("SVG icon path")}<input name="icon" placeholder="icons/${be(r.ext)}.svg" autocomplete="off" spellcheck="false"></label><p>${L("Leave empty to remove. New Pages entries copy this path; existing pages keep their own icon.")}</p><div class="subformat-create-actions"><button type="button" data-cancel>${L("Cancel")}</button><button type="submit">${L("Save")}</button></div></fieldset>`;let U=$.elements.namedItem("icon");U.value=r.icon??"";let D=r.icon??null;$.querySelector("[data-cancel]")?.addEventListener("click",()=>{j.querySelector("[data-subformat-icon]")?.click()}),$.addEventListener("submit",async N=>{if(N.preventDefault(),t.busy)return;t.busy=!0;let q=$.querySelector("fieldset");q.disabled=!0;try{let P=await t.fetch("/api/subformat",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({action:"icon",ext:r.ext,value:U.value.trim(),base:D})}),z=await P.json();if(!P.ok)throw new Error(L(z.error??"Save failed"));r.icon=z.icon,r.iconSvg=z.iconSvg,t.iconForm=void 0,document.dispatchEvent(new CustomEvent("docs:subformat-saved",{detail:{file:z.file,workspace:t.workspace}}))}catch(P){ot(P)}finally{t.busy=!1,q.disabled=!1,ut(e,i),(t.iconForm?.querySelector("input")??j.querySelector("[data-subformat-icon]"))?.focus()}}),Be(e,n,t,r,i),U.focus()});let _=document.createElement("button");_.type="button",_.dataset.subformatCreate="",_.textContent=L("Create"),_.disabled=t.busy,j.append(_),_.addEventListener("click",()=>{if(t.recordForm){document.dispatchEvent(new CustomEvent("docs:subformat-create",{detail:t.recordForm}));return}let $=document.createElement("form");t.recordForm=$,Br.add($),$.dataset.workspace=t.workspace,$.className="subformat-create-form",$.dataset.subformatRecord=r.format,$.setAttribute("aria-label",L("Create")),$.innerHTML=`<fieldset class="subformat-register-fields"><input name="file" required aria-label="${L("File path")}" autocomplete="off" spellcheck="false"></fieldset><fieldset><textarea name="content" hidden></textarea><div data-subformat-schema-editor></div><div class="subformat-create-actions"><button type="button" data-cancel>${L("Cancel")}</button><button type="submit">${L("Create")}</button></div></fieldset>`;let U=$.elements.namedItem("file"),D=$.elements.namedItem("content"),N=r.defaultFolder?`${r.defaultFolder}/`:(r.records[0]?.file??as(`new.${r.ext}`)).match(/^.*\//)?.[0]??"",q="new";for(let K=2;r.records.some(oe=>oe.file===`${N}${q}.${r.ext}`);K++)q=`new-${K}`;U.value=`${N}${q}.${r.ext}`,D.value=r.template??(r.format==="json"?`{}
|
|
102
|
+
`:""),$.addEventListener("input",()=>{$.dataset.dirty="true"});let P=()=>{t.recordForm=void 0,Br.delete($),document.dispatchEvent(new CustomEvent("docs:subformat-editor-close",{detail:$})),$.remove()},z=()=>{t.busy||(P(),e.querySelector("[data-subformat-create]")?.focus())};$.querySelector("[data-cancel]")?.addEventListener("click",z);let G=K=>{K.key==="Escape"&&!K.defaultPrevented&&(K.preventDefault(),K.stopPropagation(),z())};$.addEventListener("keydown",G),$.querySelector(".subformat-register-fields")?.addEventListener("keydown",K=>G(K)),$.addEventListener("submit",async K=>{if(K.preventDefault(),t.busy)return;let oe=U.value.trim();if(document.querySelector(".subformat-toast")?.remove(),!Qe(oe)||!oe.endsWith(`.${r.ext}`)){ot(new Error(`${L("File path")}: *.${r.ext}`)),U.focus();return}t.busy=!0,_.disabled=!0;let ce=[...$.elements].filter(ue=>ue instanceof HTMLFieldSetElement);for(let ue of ce)ue.disabled=!0;let te=$.querySelector("[data-subformat-schema-editor]");te&&(te.inert=!0);try{let ue=await t.fetch("/api/subformat",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({action:"create",file:oe,content:D.value})}),Y=await ue.json();if(!ue.ok)throw new Error(L(Y.error??"Save failed"));r.records.push({file:oe,content:Y.content,data:Y.data,change:"added",references:[]}),document.dispatchEvent(new CustomEvent("docs:subformat-saved",{detail:{file:oe,workspace:t.workspace}})),t.busy=!1,P(),ut(e,i),t.openSource?.(oe,1)}catch(ue){ot(ue)}finally{t.busy=!1;for(let ue of ce)ue.disabled=!1;te&&(te.inert=!1),_.disabled=!1}}),document.dispatchEvent(new CustomEvent("docs:subformat-create",{detail:$})),U.focus(),U.select()})}if(t.iconForm?.dataset.ext===r.ext&&j.append(t.iconForm),n.setAttribute("aria-busy",String(t.busy)),n.dataset.subformatView=c.view,c.view==="table"){n.innerHTML=Dl({...r,fields:C,records:W},e.getAttribute("aria-label")??r.ext);for(let x of n.querySelectorAll("[data-subformat-record]"))t.openSource&&x.removeAttribute("aria-haspopup"),x.addEventListener("click",_=>{_.detail===0&&x.focus({preventScroll:!0});let $=W[Number(x.dataset.subformatRecord)];$&&Ul(t,r,$,$.file)});return}n.innerHTML='<div class="subformat-columns"></div>';let ke=0,ve=n.querySelector(".subformat-columns"),g=!o&&!!t.openSource&&document.body.classList.contains("edit")&&!Et(t.workspace)?.readOnly&&!d?.readOnly,$e=!o&&!!t.openSource&&document.body.classList.contains("edit")&&!Et(t.workspace)?.readOnly,se=()=>{let x=e.querySelector("[data-resource-search]")?.value??"";ut(e,x.normalize("NFKC").toLowerCase().trim().split(/\s+/).filter(Boolean))},p=async(x,_,$)=>{if(!(t.busy||!$e||x.data[_]===$)){t.busy=!0;try{let U=await t.fetch("/api/subformat",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({file:x.file,base:x.content,field:_,value:$})}),D=await U.json();if(!U.ok)throw new Error(L(D.error??"Save failed"));x.content=D.content,x.data=D.data,x.change=x.change==="added"?"added":"modified",document.dispatchEvent(new CustomEvent("docs:subformat-saved",{detail:{file:x.file,workspace:t.workspace}}))}catch(U){ot(U)}finally{t.busy=!1,se()}}},ge=new Map,Ne=async(x,_)=>{if(t.busy||!d||!g||x.data[d.name]===_)return;let $=n.querySelector(`[data-record-file="${CSS.escape(x.file)}"]`),U=ge.get(_);if(!$||!U)return;let D=zo(n),N=n.querySelector(".subformat-drag-preview");N&&!N.hidden&&D.set($,N.getBoundingClientRect()),t.busy=!0,document.querySelector(".subformat-toast")?.remove(),t.stopDrag?.(),n.setAttribute("aria-busy","true");for(let K of e.querySelectorAll(".subformat-controls button, .subformat-card select"))K.disabled=!0;let q={...x,data:{...x.data,[d.name]:_}},P=mi(W.map(K=>K===x?q:K).filter(K=>K.data[d.name]===_),f,O),z=P[P.indexOf(q)+1];U.insertBefore($,z?U.querySelector(`[data-record-file="${CSS.escape(z.file)}"]`):null);let G=Uo(D);try{let K=await t.fetch("/api/subformat",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({file:x.file,base:x.content,field:d.name,value:_})}),oe=await K.json();if(!K.ok)throw new Error(L(oe.error??"Save failed"));x.content=oe.content,x.data=oe.data,x.change=x.change==="added"?"added":"modified",document.dispatchEvent(new CustomEvent("docs:subformat-saved",{detail:{file:x.file,workspace:t.workspace}}))}catch(K){ot(K)}finally{await G;let K=new Map([...zo(n)].map(([ce,te])=>[ce.dataset.recordFile,te]));t.busy=!1;let oe=e.querySelector("[data-resource-search]")?.value??"";if(ut(e,oe.normalize("NFKC").toLowerCase().trim().split(/\s+/).filter(Boolean)),Uo(new Map([...zo(n)].map(([ce,te])=>[ce,K.get(ce.dataset.recordFile)??te]))),document.activeElement===document.body){let ce=n.querySelector(`[data-record-file="${CSS.escape(x.file)}"]`);(ce?.querySelector(".subformat-card-details:not([hidden]) select")??ce?.querySelector(".subformat-card-open"))?.focus({preventScroll:!0})}}},Ge=d?[...d.enum??[],void 0]:[void 0];for(let x of Ge){let _=d?W.filter(N=>N.data[d.name]===x):W;if(d&&x===void 0&&!_.length)continue;let $=document.createElement("section");$.className="subformat-column";let U=d?x===void 0?L("Unassigned"):String(x):L("Records");$.setAttribute("aria-label",U),(!o||d)&&c.view!=="list"&&($.innerHTML=`<h2>${be(U)} <span class="subformat-count">${bh(_)}</span></h2>`);let D=document.createElement("div");D.className="subformat-cards",c.view==="grid"&&D.style.setProperty("--format-columns",String(c.columns??3)),c.view==="list"&&D.setAttribute("role","list"),$.append(D),ge.set(x,D),g&&x!==void 0&&(D.addEventListener("dragover",N=>{let q=r.records.find(P=>P.file===t.dragging);t.busy||!d||!q||(N.preventDefault(),N.dataTransfer&&(N.dataTransfer.dropEffect="move"),D.classList.toggle("is-drop-target",q.data[d.name]!==x))}),D.addEventListener("drop",N=>{N.preventDefault(),D.classList.remove("is-drop-target");let q=r.records.find(P=>P.file===t.dragging);q&&Ne(q,x)}));for(let N of _){let q=r.resource?JSON.stringify(N.data):N.file,P=document.createElement("article");P.className="subformat-card";let z=r.resource&&c.view!=="list";z&&P.classList.add("format-card"),c.view==="list"&&(P.classList.add("subformat-list-record"),P.setAttribute("role","listitem")),P.dataset.recordFile=N.file,N.change&&(P.dataset.recordChange=N.change);let G=h&&Object.hasOwn(N.data,h)?N.data[h]:void 0,K=G==null?N.file.split("/").at(-1)??N.file:typeof G=="object"?JSON.stringify(G):String(G),oe=C.filter(T=>T!==d&&T.name!==h&&(!z||!["format","folder"].includes(T.name))&&Object.hasOwn(N.data,T.name)),ce=$e?C.filter(T=>T!==d&&T.name!==h&&!T.readOnly&&(T.enum?.length||T.options?.length)):[],te=c.view==="list"?oe:oe.filter(T=>typeof N.data[T.name]!="object").sort((T,J)=>+!!J.format-+!!T.format).slice(0,3),ue=z?"":`<dl class="subformat-card-meta">${te.map(T=>Ko(T.title,N.data[T.name])).join("")}</dl>`,Y=t.expanded.has(q)&&(!z||oe.length>0),Ee=`subformat-${t.id}-details-${encodeURIComponent(q)}`,Lt=N.references??[],Dn=`subformat-${t.id}-references-${encodeURIComponent(q)}`,Hr=Lt.map(({file:T,line:J,href:ne})=>`<li><a href="${be(ne?`${l?"#":""}${ne}`:`/_files/file/${encodeURIComponent(T)}#L${J}`)}" data-resource-source="${be(T)}" data-resource-line="${J}" draggable="false"><span>${be(T)}</span><span>L${J}</span></a></li>`).join(""),E=Ts(N.file,document.body.dataset.sourceBase);P.innerHTML=`<div class="subformat-card-tools"><span class="subformat-card-file">${be(N.file.split("/").at(-1)??N.file)}</span><button type="button" class="subformat-card-toggle" aria-expanded="${Y}" aria-controls="${Ee}" aria-label="${L(Y?"Collapse card":"Expand card")}"><svg width="16" height="16" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m5 7 5 5 5-5"/></svg></button><button type="button" class="subformat-card-references" popovertarget="${Dn}" aria-label="${be(`${L("references")}: ${Lt.length}`)}"${Lt.length?"":" disabled"}><svg width="12" height="12" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" aria-hidden="true"><path d="M4 2h8l4 4v12H4zM12 2v4h4M7 10h6M7 13h6"/></svg>${Lt.length}</button><button type="button" class="subformat-card-copy" aria-label="${L("Copy path")}"><svg width="14" height="14" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round" aria-hidden="true"><path d="m8 12 4-4m-5 2L5 12a3 3 0 0 0 4 4l2-2m-2-8 2-2a3 3 0 0 1 4 4l-2 2"/></svg>${xn}</button></div><div id="${Dn}" class="subformat-reference-list" popover="auto" aria-label="${L("references")}"><ul>${Hr}</ul></div><h3><button type="button" class="subformat-card-open"${t.openSource?"":' aria-haspopup="dialog"'}>${be(K)}</button></h3>${ue}<div class="subformat-card-details" id="${Ee}"${Y?"":" hidden"}><dl>${oe.filter(T=>!ce.includes(T)).map(T=>Ko(T.title,N.data[T.name])).join("")}</dl></div>`;let I=P.querySelector(".subformat-card-copy"),X=P.querySelector(".subformat-card-tools"),ee=P.querySelector("h3");if(z){let T=document.createElement("header");T.className="format-card-header";let J=document.createElement("span");J.className="format-card-format",J.textContent=String(N.data.format),X.querySelector(".subformat-card-file")?.remove(),T.append(ee,J,X),P.prepend(T),ee.querySelector(".subformat-card-open")?.setAttribute("title",N.file),ee=T}let Me=t.previews.get(JSON.stringify(N.data));if(Me){let T=Me.cloneNode(!0);if(T.className="format-preview",c.view==="list"){P.classList.add("format-list-record"),T.classList.add("format-list-preview"),T.inert=!0;for(let J of T.querySelectorAll("video"))J.controls=!1}if(r.resource){let J=T.querySelector(":scope > a.resource-source:not(:only-child)");J&&P.querySelector(".subformat-card-details")?.append(J);for(let ne of T.querySelectorAll(".downloadable-resource")){let ye=ne.querySelector(":scope > .resource-download-tools");if(!ye)continue;ne.id=`format-${t.id}-preview-${++ke}`;let je=ye.querySelector("[data-resource-expand]");je&&(je.dataset.resourceExpand=ne.id,je.setAttribute("aria-controls",ne.id)),X.append(...ye.children),ye.remove()}for(let ne of T.querySelectorAll(".codeblk-head > [data-resource-download]"))X.append(ne)}ee.after(T)}!r.resource&&(document.body.classList.contains("edit")||document.body.dataset.download==="easy")&&I.insertAdjacentHTML("afterend",_l(N.file,document.body.classList.contains("edit")?`/api/download?file=${encodeURIComponent(N.file)}`:`data:application/octet-stream;charset=utf-8,${encodeURIComponent(N.content)}`)),I.addEventListener("click",async()=>{try{await navigator.clipboard.writeText(E),I.dataset.copied="true",setTimeout(()=>delete I.dataset.copied,1500)}catch{ot(new Error(L("Copy failed")))}});let fe=P.querySelector(".subformat-reference-list"),Te=P.querySelector(".subformat-card-references");Te.hidden=o,fe.addEventListener("toggle",()=>{if(!fe.matches(":popover-open"))return;let T=Te.getBoundingClientRect(),J=innerHeight-T.bottom,ne=J<240&&T.top>J;Object.assign(fe.style,{left:`${Math.max(8,Math.min(T.right-fe.offsetWidth,innerWidth-fe.offsetWidth-8))}px`,maxHeight:`${Math.max(80,Math.min(320,(ne?T.top:J)-12))}px`,top:ne?"auto":`${T.bottom+4}px`,bottom:ne?`${innerHeight-T.top+4}px`:"auto"})}),fe.addEventListener("click",T=>{T.target.closest("a")&&fe.hidePopover()});let Oe=P.querySelector(".subformat-card-details"),De=P.querySelector(".subformat-card-meta");if(c.view==="list"&&De){let T=P.querySelector(".subformat-card-file");T.textContent=N.file,Oe.prepend(T),De.tabIndex=0,De.setAttribute("role","region"),De.setAttribute("aria-label",`${L("Parameters")}: ${K}`)}De&&(De.hidden=Y);let Je=P.querySelector(".subformat-card-toggle");z&&!oe.length&&(Je.hidden=!0),Je.addEventListener("click",()=>{let T=Oe.hidden;Oe.hidden=!T,De&&(De.hidden=T),T?t.expanded.add(q):t.expanded.delete(q),Je.setAttribute("aria-expanded",String(T)),Je.setAttribute("aria-label",L(T?"Collapse card":"Expand card"))});let dt=0,jn=T=>T instanceof Element&&(!T.closest("a, button, input, select, textarea, .subformat-card-meta[tabindex]")||!!T.closest(".subformat-card-open"));if(P.addEventListener("click",T=>{if(t.dragging||Date.now()<dt){T.preventDefault(),T.stopImmediatePropagation();return}T.target.closest(".subformat-reference-list")||!jn(T.target)||(T.detail===0&&P.querySelector(".subformat-card-open")?.focus({preventScroll:!0}),Ul(t,r,N,K))},!0),P.draggable=!!d&&g&&!t.busy,P.addEventListener("dragstart",T=>{if(!P.draggable||t.busy||!T.dataTransfer||T.target.closest(".subformat-reference-list")){T.preventDefault();return}t.dragging=N.file,T.dataTransfer.effectAllowed="move",T.dataTransfer.setData("application/x-dooc-record",N.file);let J=P.getBoundingClientRect(),ne=P.cloneNode(!0);ne.classList.add("subformat-drag-preview"),ne.hidden=!0,ne.setAttribute("aria-hidden","true"),ne.inert=!0,delete ne.dataset.recordFile;for(let ft of ne.querySelectorAll("[id]"))ft.removeAttribute("id");Object.assign(ne.style,{left:`${J.left}px`,top:`${J.top}px`,width:`${J.width}px`,height:`${J.height}px`,borderColor:getComputedStyle(P).borderColor});let ye=document.createElement("canvas");ye.width=ye.height=1,T.dataTransfer.setDragImage(ye,0,0),D.append(ne);let je=0,zt=0,At=0,qn=()=>{At=0,P.classList.add("is-dragging"),ne.hidden=!1,ne.style.transform=`translate(${je}px, ${zt}px)`},Wo=ft=>{je=ft.clientX-T.clientX,zt=ft.clientY-T.clientY,At||(At=requestAnimationFrame(qn));let zr=ft.target.closest?.(".subformat-cards");for(let Yo of ve.querySelectorAll(".is-drop-target"))Yo!==zr&&Yo.classList.remove("is-drop-target")},$t=()=>{cancelAnimationFrame(At);let ft=ne.hidden?void 0:ne.getBoundingClientRect();ne.remove(),t.dragging=void 0,t.stopDrag=void 0,dt=Date.now()+250,P.classList.remove("is-dragging");for(let zr of ve.querySelectorAll(".is-drop-target"))zr.classList.remove("is-drop-target");document.removeEventListener("dragover",Wo,!0),document.removeEventListener("drop",$t),document.removeEventListener("dragend",$t,!0),P.removeEventListener("dragend",$t),!t.busy&&ft&&Uo(new Map([[P,ft]]))};t.stopDrag=$t,document.addEventListener("dragover",Wo,!0),document.addEventListener("drop",$t),document.addEventListener("dragend",$t,!0),P.addEventListener("dragend",$t),At=requestAnimationFrame(qn)}),d&&g){let T=document.createElement("label");T.textContent=d.title;let J=document.createElement("select");J.disabled=!g||t.busy,Object.hasOwn(N.data,d.name)||J.add(new Option(L("Unassigned"),"",!0,!0)),d.enum?.forEach((ne,ye)=>{J.add(new Option(String(ne),String(ye),!1,N.data[d.name]===ne))}),J.addEventListener("change",()=>{J.value!==""&&Ne(N,d.enum?.[Number(J.value)])}),T.append(J),Oe.append(T)}for(let T of ce){let J=N.data[T.name],ne=[...T.enum??T.options??[]];J!==void 0&&!ne.includes(J)&&ne.unshift(J);let ye=document.createElement("label");ye.textContent=T.title;let je=document.createElement("select");je.disabled=t.busy,J===void 0&&je.add(new Option(L("Unassigned"),"",!0,!0)),ne.forEach((zt,At)=>{let qn=T.options?String(zt).split("/").at(-1):String(zt);je.add(new Option(qn,String(At),!1,J===zt))}),je.addEventListener("change",()=>{je.value!==""&&p(N,T.name,ne[Number(je.value)])}),ye.append(je),Oe.append(ye)}D.append(P)}ve.append($)}o&&!W.length&&(ve.innerHTML=`<p>${L("No results")}</p>`),ve.scrollLeft=a};var Gl=e=>{document.body.classList.contains("edit")&&Vl(),document.addEventListener("change",s=>{let a=s.target;if(!(a instanceof HTMLSelectElement)||!a.matches("[data-format-path]"))return;let l=document.createElement("a");l.href=`/_format${a.value?`/${a.value}`:""}`,l.hidden=!0,a.after(l),l.click(),l.remove()});let n=s=>{let a=s.target;if(!(a instanceof Element)||!a.matches("[data-resource-search], [data-resource-filter], [data-subformat-page]"))return;let l=a.closest("[data-resource-results], [data-subformat-embed]");if(!l)return;let u=l.querySelector("[data-resource-search]")?.value.normalize("NFKC").toLowerCase().trim().split(/\s+/).filter(Boolean)??[],c=l.querySelector("[data-resource-filter]")?.value??"";if(ut(l,u,e))return;let d=0;for(let h of l.querySelectorAll("[data-resource-item]")){let b=h.textContent?.normalize("NFKC").toLowerCase()??"";h.hidden=!!c&&h.dataset.resourceGroup!==c||!u.every(w=>b.includes(w)),h.hidden||d++}let m=l.querySelector("[data-resource-count]");m&&(m.textContent=String(d));let f=l.querySelector("[data-resource-empty]");f&&(f.hidden=d>0)};document.addEventListener("input",n),document.addEventListener("change",n);for(let s of document.querySelectorAll("[data-resource-filter]"))s.dispatchEvent(new Event("change",{bubbles:!0}));let t=()=>{for(let s of document.querySelectorAll("[data-subformat-page]"))ut(s,[],e)};t(),document.addEventListener("docs:page-shown",t);let r=new WeakSet,i=s=>{let a=[...s.querySelectorAll("[data-subformat-embed]")];s instanceof HTMLElement&&s.matches("[data-subformat-embed]")&&a.unshift(s);for(let l of a)r.has(l)||(r.add(l),ut(l,[],e))};i(document),new MutationObserver(s=>{for(let a of s)for(let l of a.addedNodes)l instanceof HTMLElement&&i(l)}).observe(document.body,{childList:!0,subtree:!0});let o;document.addEventListener("click",s=>{let l=s.target.closest?.(".subformat-reference-list a")?.closest("[data-record-file]")?.dataset.recordFile;if(!l)return;let u=CSS.escape(l),c=CSS.escape(l.split("/").map(encodeURIComponent).join("/"));clearInterval(o);let d=0;o=window.setInterval(()=>{let m=[...document.querySelectorAll(`main .codeblk[title="${u}"], main .subformat-embed [data-record-file="${u}"], main a[href$="${u}"], main a[href$="${c}"]`)].filter(f=>!f.closest("[data-resource-results]"));if(!(!m.length&&++d<50)){clearInterval(o),m[0]?.scrollIntoView({block:"center"});for(let f of m)f.classList.remove("search-flash"),f.offsetWidth,f.classList.add("search-flash"),setTimeout(()=>f.classList.remove("search-flash"),2600)}},100)}),e&&document.addEventListener("click",s=>{if(s.defaultPrevented||s.button!==0||s.metaKey||s.ctrlKey||s.shiftKey||s.altKey)return;let a=s.target.closest("[data-resource-source]");a?.dataset.resourceSource&&(s.preventDefault(),e(a.dataset.resourceSource,Number(a.dataset.resourceLine)||1))})};os();Gl();})();
|
|
103
103
|
/*! Bundled license information:
|
|
104
104
|
|
|
105
105
|
@dagrejs/dagre/dist/dagre.esm.js:
|